Compare commits
No commits in common. "master" and "v3.17.0" have entirely different histories.
119
.github/workflows/ci-linux.yml
vendored
@ -8,21 +8,14 @@ on:
|
|||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab.
|
# Allows you to run this workflow manually from the Actions tab.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
debug_enabled:
|
|
||||||
type: boolean
|
|
||||||
description: 'Run the build with tmate debugging enabled'
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VNOTE_VER: 3.19.2
|
VNOTE_VER: 3.17.0
|
||||||
CMAKE_VER: 3.24.3
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
name: Build On Ubuntu
|
name: Build On Ubuntu
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -37,86 +30,83 @@ jobs:
|
|||||||
git submodule sync --recursive
|
git submodule sync --recursive
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||||
|
|
||||||
- name: Install a Fresh CMake
|
|
||||||
run: |
|
|
||||||
wget --no-verbose https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-Linux-x86_64.sh
|
|
||||||
chmod +x cmake-${CMAKE_VER}-Linux-x86_64.sh
|
|
||||||
mkdir ${{runner.workspace}}/cmake
|
|
||||||
sudo ./cmake-${CMAKE_VER}-Linux-x86_64.sh --skip-license --prefix=${{runner.workspace}}/cmake
|
|
||||||
sudo rm -f /usr/local/bin/cmake /usr/local/bin/cpack
|
|
||||||
sudo ln -s ${{runner.workspace}}/cmake/bin/cmake /usr/local/bin/cmake
|
|
||||||
sudo ln -s ${{runner.workspace}}/cmake/bin/cpack /usr/local/bin/cpack
|
|
||||||
|
|
||||||
- name: Install linuxdeploy
|
- name: Install linuxdeploy
|
||||||
uses: miurahr/install-linuxdeploy-action@v1
|
uses: miurahr/install-linuxdeploy-action@v1
|
||||||
with:
|
with:
|
||||||
plugins: qt appimage
|
plugins: qt appimage
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get update
|
sudo DEBIAN_FRONTEND=noninteractive apt-get update
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libfcitx5-qt-dev fcitx-libs-dev extra-cmake-modules libxkbcommon-dev
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libfcitx-qt5-dev tree
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y tree
|
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y fuse libxcb-cursor-dev
|
|
||||||
python3 -m pip config set global.break-system-packages true
|
|
||||||
|
|
||||||
- name: Cache Qt
|
- name: Cache Qt
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v1 # not v2!
|
||||||
with:
|
with:
|
||||||
path: ${{runner.workspace}}/Qt
|
path: ../Qt
|
||||||
key: ${{ runner.os }}-QtCache-6.8
|
key: ${{ runner.os }}-QtCache-5.15
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v2
|
||||||
with:
|
with:
|
||||||
version: 6.8.3
|
version: 5.15.2
|
||||||
target: desktop
|
target: desktop
|
||||||
modules: 'qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat qtserialport'
|
modules: qtwebengine
|
||||||
tools: 'tools_opensslv3_src'
|
tools: tools_openssl_x64,1.1.1-4,qt.tools.openssl.gcc_64
|
||||||
cache: 'true'
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||||
|
|
||||||
- name: Compile OpenSSLV3
|
|
||||||
run: |
|
|
||||||
cd ${Qt6_DIR}/../../Tools/OpenSSLv3/src
|
|
||||||
./Configure
|
|
||||||
make -j2
|
|
||||||
sudo make install
|
|
||||||
|
|
||||||
- name: Create Build Dir
|
- name: Create Build Dir
|
||||||
run: mkdir build
|
run: mkdir build
|
||||||
working-directory: ${{runner.workspace}}
|
working-directory: ${{runner.workspace}}
|
||||||
|
|
||||||
- name: Compile fcitxqt5
|
- name: Compile qt5ct
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/fcitx/fcitx-qt5
|
wget --no-check-certificate -c https://versaweb.dl.sourceforge.net/project/qt5ct/qt5ct-1.1.tar.bz2
|
||||||
cd fcitx-qt5
|
tar xf qt5ct-1.*.tar.bz2
|
||||||
mkdir build && cd build
|
cd qt5ct-1.*/
|
||||||
cmake -DENABLE_QT5=OFF -DENABLE_QT6=ON ..
|
QT_SELECT=5 qmake
|
||||||
make -j2
|
|
||||||
sudo make install
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
|
|
||||||
- name: Compile qt6ct
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/trialuser02/qt6ct qt6ct.git
|
|
||||||
cd qt6ct.git
|
|
||||||
qmake
|
|
||||||
make -j$(nproc) && sudo make install
|
make -j$(nproc) && sudo make install
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Configure Project
|
- name: Configure Project
|
||||||
run: |
|
run: |
|
||||||
qmake -v
|
qmake -v
|
||||||
cmake --version
|
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ./
|
||||||
cmake ${GITHUB_WORKSPACE}
|
sudo chmod +rwx ./libfcitxplatforminputcontextplugin.so
|
||||||
|
cp ./libfcitxplatforminputcontextplugin.so $Qt5_Dir/plugins/platforminputcontexts
|
||||||
|
qmake CONFIG+=release -spec linux-g++-64 ${GITHUB_WORKSPACE}/vnote.pro
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
|
run: make -j$(nproc)
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
|
- name: Install Project
|
||||||
run: |
|
run: |
|
||||||
# Remove the libqsqlmimer.so as libmimerapi.so is not deployed with Qt6
|
mkdir AppDir
|
||||||
rm ${{runner.workspace}}/Qt/6.*/gcc_64/plugins/sqldrivers/libqsqlmimer.so
|
make install INSTALL_ROOT=${{runner.workspace}}/build/AppDir
|
||||||
cmake --build . --target pack
|
tree AppDir
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
|
- name: Package Project
|
||||||
|
run: |
|
||||||
|
# Move the lib out to avoid duplication
|
||||||
|
mv AppDir/usr/lib ./
|
||||||
|
LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
|
||||||
|
# Copy translations
|
||||||
|
mkdir -p AppDir/usr/translations
|
||||||
|
cp $Qt5_Dir/translations/qt_zh_CN.qm AppDir/usr/translations
|
||||||
|
# Package qt5ct (EXTRA_QT_PLUGINS seems not work)
|
||||||
|
# EXTRA_QT_PLUGINS="platformthemes/libqt5ct.so;styles/libqt5ct-style.so"
|
||||||
|
mkdir -p AppDir/usr/plugins/platformthemes
|
||||||
|
mkdir -p AppDir/usr/plugins/styles
|
||||||
|
cp $Qt5_Dir/plugins/platformthemes/* AppDir/usr/plugins/platformthemes/
|
||||||
|
cp $Qt5_Dir/plugins/styles/* AppDir/usr/plugins/styles/
|
||||||
|
# Package libssl.so and libcrypto.so
|
||||||
|
Qt5_Tools=$Qt5_Dir/../../Tools
|
||||||
|
linuxdeploy-x86_64.AppImage --appdir ./AppDir --plugin qt --output appimage -l $Qt5_Tools/OpenSSL/binary/lib/libcrypto.so.1.1 -l $Qt5_Tools/OpenSSL/binary/lib/libssl.so.1.1
|
||||||
|
tree AppDir
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Fix Package
|
- name: Fix Package
|
||||||
@ -133,14 +123,15 @@ jobs:
|
|||||||
linuxdeploy-plugin-appimage-x86_64.AppImage --appdir=./squashfs-root
|
linuxdeploy-plugin-appimage-x86_64.AppImage --appdir=./squashfs-root
|
||||||
mv VNote*.AppImage ../
|
mv VNote*.AppImage ../
|
||||||
popd
|
popd
|
||||||
mv VNote*.AppImage VNote-${{env.VNOTE_VER}}-linux-x64.AppImage
|
mv VNote*.AppImage vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage
|
||||||
|
cp vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage vnote-linux-x64.AppImage
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Archive Artifacts
|
- name: Archive Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: VNote-${{env.VNOTE_VER}}-linux-x64.AppImage
|
name: vnote-linux-x64_v${{env.VNOTE_VER}}
|
||||||
path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-linux-x64.AppImage
|
path: ${{runner.workspace}}/build/vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage
|
||||||
|
|
||||||
- name: Update Tag
|
- name: Update Tag
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
@ -153,7 +144,7 @@ jobs:
|
|||||||
uses: johnwbyrd/update-release@v1.0.0
|
uses: johnwbyrd/update-release@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-linux-x64.AppImage
|
files: ${{runner.workspace}}/build/vnote-linux-x64.AppImage
|
||||||
release: Continuous Build
|
release: Continuous Build
|
||||||
tag: continuous-build
|
tag: continuous-build
|
||||||
|
|
||||||
@ -162,7 +153,7 @@ jobs:
|
|||||||
uses: ncipollo/release-action@v1.11.0
|
uses: ncipollo/release-action@v1.11.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
artifacts: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-linux-x64.AppImage
|
artifacts: ${{runner.workspace}}/build/vnote-linux-x64_v${{env.VNOTE_VER}}.AppImage
|
||||||
commit: master
|
commit: master
|
||||||
tag: v${{env.VNOTE_VER}}
|
tag: v${{env.VNOTE_VER}}
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
|
217
.github/workflows/ci-macos.yml
vendored
@ -8,33 +8,27 @@ on:
|
|||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab.
|
# Allows you to run this workflow manually from the Actions tab.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
debug_enabled:
|
|
||||||
type: boolean
|
|
||||||
description: 'Run the build with tmate debugging enabled'
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VNOTE_VER: 3.19.2
|
VNOTE_VER: 3.17.0
|
||||||
CMAKE_VER: 3.24.3
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
environment: Mac-code-sign
|
|
||||||
name: Build On MacOS
|
name: Build On MacOS
|
||||||
|
runs-on: macos-latest
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- name: "Build on Arm64"
|
# - {
|
||||||
os: macos-latest
|
# name: "Build Qt 5.12",
|
||||||
arch: universal
|
# qt: 5.12.12
|
||||||
qt: 6.8.3
|
# }
|
||||||
|
- {
|
||||||
runs-on: ${{matrix.config.os}}
|
name: "Build Qt 5.15",
|
||||||
|
qt: 5.15.2
|
||||||
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE.
|
# Checks-out your repository under $GITHUB_WORKSPACE.
|
||||||
@ -50,50 +44,29 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
brew install tree libiodbc libpq
|
brew install tree
|
||||||
|
|
||||||
- name: Fix SQL
|
|
||||||
run: |
|
|
||||||
sudo mkdir -p /usr/local/opt/libiodbc/lib
|
|
||||||
sudo ln -s /opt/homebrew/opt/libiodbc/lib/libiodbc.2.dylib /usr/local/opt/libiodbc/lib/libiodbc.2.dylib
|
|
||||||
sudo mkdir -p /Applications/Postgres.app/Contents/Versions/14/lib
|
|
||||||
sudo ln -s /opt/homebrew/Cellar/libpq/16.3/lib/libpq.5.dylib /Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib
|
|
||||||
|
|
||||||
- name: Install a fresh CMake
|
|
||||||
run: |
|
|
||||||
wget --no-verbose https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-macos-universal.tar.gz
|
|
||||||
tar xzf cmake-${CMAKE_VER}-macos-universal.tar.gz
|
|
||||||
sudo rm -f /usr/local/bin/cmake /usr/local/bin/cpack
|
|
||||||
sudo ln -s ${{runner.workspace}}/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin/cmake /usr/local/bin/cmake
|
|
||||||
sudo ln -s ${{runner.workspace}}/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin/cpack /usr/local/bin/cpack
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
|
|
||||||
- name: Install macdeployqtfix
|
- name: Install macdeployqtfix
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/tamlok/macdeployqtfix.git macdeployqtfix --depth=1
|
git clone https://github.com/tamlok/macdeployqtfix.git macdeployqtfix --depth=1
|
||||||
working-directory: ${{runner.workspace}}
|
working-directory: ${{runner.workspace}}
|
||||||
|
|
||||||
- name: Install optool
|
|
||||||
run: |
|
|
||||||
wget --no-verbose https://github.com/alexzielenski/optool/releases/download/0.1/optool.zip
|
|
||||||
unzip ./optool.zip
|
|
||||||
sudo ln -s ./optool /usr/local/bin/optool
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
|
|
||||||
- name: Cache Qt
|
- name: Cache Qt
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v1 # not v2!
|
||||||
with:
|
with:
|
||||||
path: ${{runner.workspace}}/Qt
|
path: ../Qt
|
||||||
key: ${{ runner.os }}-QtCache-6.8
|
key: ${{ runner.os }}-QtCache-${{ matrix.config.qt }}
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
version: ${{matrix.config.qt}}
|
version: ${{ matrix.config.qt }}
|
||||||
target: desktop
|
target: desktop
|
||||||
modules: 'qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat qtserialport'
|
modules: qtwebengine
|
||||||
cache: 'true'
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||||
|
setup-python: 'false'
|
||||||
|
|
||||||
|
|
||||||
- name: Create Build Dir
|
- name: Create Build Dir
|
||||||
run: mkdir build
|
run: mkdir build
|
||||||
@ -102,111 +75,77 @@ jobs:
|
|||||||
- name: Configure Project
|
- name: Configure Project
|
||||||
run: |
|
run: |
|
||||||
qmake -v
|
qmake -v
|
||||||
cmake --version
|
qmake CONFIG+=release ${GITHUB_WORKSPACE}/vnote.pro
|
||||||
cmake -DMACDEPLOYQTFIX_EXECUTABLE=${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ${GITHUB_WORKSPACE}
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: |
|
run: make -j4
|
||||||
# Keep only required SQL drivers
|
|
||||||
rm ${{env.Qt6_DIR}}/plugins/sqldrivers/libqsqlmimer.dylib
|
|
||||||
rm ${{env.Qt6_DIR}}/plugins/sqldrivers/libqsqlodbc.dylib
|
|
||||||
rm ${{env.Qt6_DIR}}/plugins/sqldrivers/libqsqlpsql.dylib
|
|
||||||
|
|
||||||
# Build the project
|
|
||||||
cmake --build . --target pack
|
|
||||||
|
|
||||||
# Fix Qt frameworks
|
|
||||||
python3 ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py ./src/VNote.app/Contents/MacOS/VNote ${{env.Qt6_DIR}}/../..
|
|
||||||
|
|
||||||
# Only delete rpaths that exist to avoid errors
|
|
||||||
for rpath in $(otool -l ./src/VNote.app/Contents/MacOS/VNote | awk '/LC_RPATH/ {getline; getline; print $2}' | grep 'vnote'); do
|
|
||||||
echo "Checking rpath: $rpath"
|
|
||||||
if otool -l ./src/VNote.app/Contents/MacOS/VNote | grep -q "$rpath"; then
|
|
||||||
echo "Deleting rpath: $rpath"
|
|
||||||
install_name_tool -delete_rpath "$rpath" ./src/VNote.app/Contents/MacOS/VNote
|
|
||||||
else
|
|
||||||
echo "Rpath not found: $rpath"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for rpath in $(otool -l ./src/VNote.app/Contents/Frameworks/libVTextEdit.dylib | awk '/LC_RPATH/ {getline; getline; print $2}' | grep 'vnote'); do
|
|
||||||
echo "Checking rpath: $rpath"
|
|
||||||
if otool -l ./src/VNote.app/Contents/Frameworks/libVTextEdit.dylib | grep -q "$rpath"; then
|
|
||||||
echo "Deleting rpath: $rpath"
|
|
||||||
install_name_tool -delete_rpath "$rpath" ./src/VNote.app/Contents/Frameworks/libVTextEdit.dylib
|
|
||||||
else
|
|
||||||
echo "Rpath not found: $rpath"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Run macdeployqtfix again to ensure all dependencies are properly fixed
|
|
||||||
python3 ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py ./src/VNote.app/Contents/MacOS/VNote ${{env.Qt6_DIR}}/../..
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Codesign Bundle
|
- name: Deploy VSyntaxHighlighting Framework
|
||||||
# Extract the secrets we defined earlier as environment variables
|
|
||||||
env:
|
|
||||||
MACOS_CERTIFICATE: ${{ secrets.CLI_MACOS_CERTIFICATE }}
|
|
||||||
MACOS_CERTIFICATE_PWD: ${{ secrets.CLI_MACOS_CERTIFICATE_PWD }}
|
|
||||||
MACOS_CERTIFICATE_NAME: ${{ secrets.CLI_MACOS_CERTIFICATE_NAME }}
|
|
||||||
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.CLI_MACOS_CERTIFICATE }}
|
|
||||||
run: |
|
run: |
|
||||||
# Turn our base64-encoded certificate back to a regular .p12 file
|
my_lib_name=VSyntaxHighlighting
|
||||||
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
|
my_lib_framework=${my_lib_name}.framework
|
||||||
|
my_lib_dir=./libs/vtextedit/src/libs/syntax-highlighting
|
||||||
# We need to create a new keychain, otherwise using the certificate will prompt
|
frameworks_dir=./src/vnote.app/Contents/Frameworks
|
||||||
# with a UI dialog asking for the certificate password, which we can't
|
mkdir -p ${frameworks_dir}
|
||||||
# use in a headless CI environment
|
cp -R ${my_lib_dir}/${my_lib_framework} ${frameworks_dir}
|
||||||
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
|
||||||
security default-keychain -s build.keychain
|
|
||||||
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
|
||||||
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
|
||||||
|
|
||||||
echo "Codesigning main app bundle"
|
|
||||||
codesign --force --deep -s "$MACOS_CERTIFICATE_NAME" --entitlements ${{github.workspace}}/package/entitlements.xml --options runtime ./src/VNote.app
|
|
||||||
codesign -v -vvv ./src/VNote.app
|
|
||||||
|
|
||||||
hdiutil create -volname "VNote" -srcfolder ./src/VNote.app -ov -format UDZO VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
|
||||||
codesign --force --deep -s "$MACOS_CERTIFICATE_NAME" --entitlements ${{github.workspace}}/package/entitlements.xml --options runtime ./VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
|
||||||
codesign -v -vvv ./VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
|
||||||
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: "Notarize Bundle"
|
- name: Deploy VTextEdit Framework
|
||||||
# Extract the secrets we defined earlier as environment variables
|
|
||||||
env:
|
|
||||||
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.CLI_MACOS_NOTARY_USER }}
|
|
||||||
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.CLI_MACOS_TEAM_ID }}
|
|
||||||
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.CLI_MACOS_NOTARY_PWD }}
|
|
||||||
run: |
|
run: |
|
||||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
my_lib_name=VTextEdit
|
||||||
# from blocking the CI
|
my_lib_framework=${my_lib_name}.framework
|
||||||
echo "Create keychain profile"
|
my_lib_dir=./libs/vtextedit/src/editor
|
||||||
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
|
frameworks_dir=./src/vnote.app/Contents/Frameworks
|
||||||
|
mkdir -p ${frameworks_dir}
|
||||||
|
cp -R ${my_lib_dir}/${my_lib_framework} ${frameworks_dir}
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
|
- name: Cleanup rpath
|
||||||
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
|
run: |
|
||||||
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
|
app_target=./src/vnote.app/Contents/MacOS/vnote
|
||||||
# you're curious
|
install_name_tool -delete_rpath ${PWD}/src/../libs/vtextedit/src/editor ${app_target}
|
||||||
echo "Notarize app"
|
install_name_tool -delete_rpath ${PWD}/src/../libs/vtextedit/src/libs/syntax-highlighting ${app_target}
|
||||||
xcrun notarytool submit "${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg" --keychain-profile "notarytool-profile" --wait
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
|
- name: Mac Deploy
|
||||||
# validated by macOS even when an internet connection is not available.
|
run: |
|
||||||
echo "Attach staple"
|
pushd src
|
||||||
xcrun stapler staple "${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg"
|
macdeployqt vnote.app
|
||||||
|
|
||||||
# Enable tmate debugging of manually-triggered workflows if the input option was provided
|
# Remove unused sql drivers
|
||||||
- name: Setup tmate session
|
rm vnote.app/Contents/Plugins/sqldrivers/libqsqlodbc.dylib
|
||||||
uses: mxschmitt/action-tmate@v3
|
rm vnote.app/Contents/Plugins/sqldrivers/libqsqlpsql.dylib
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
|
|
||||||
|
|
||||||
- name: Archive DMG
|
python ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py vnote.app/Contents/MacOS/vnote $Qt5_Dir
|
||||||
uses: actions/upload-artifact@v4
|
# Fix Helpers/QtWebEngineProcess.app
|
||||||
|
pushd vnote.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/5/Helpers
|
||||||
|
python ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess $Qt5_Dir
|
||||||
|
popd
|
||||||
|
|
||||||
|
popd
|
||||||
|
tree ./
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
|
- name: Package Project
|
||||||
|
run: |
|
||||||
|
mkdir -p distrib/vnote
|
||||||
|
pushd distrib/vnote
|
||||||
|
mv ../../src/vnote.app ./
|
||||||
|
ln -s /Applications ./Applications
|
||||||
|
popd
|
||||||
|
sleep 60
|
||||||
|
hdiutil create -srcfolder ./distrib/vnote -format UDBZ vnote-mac-x64_v${{env.VNOTE_VER}}.dmg
|
||||||
|
cp vnote-mac-x64_v${{env.VNOTE_VER}}.dmg vnote-mac-x64-qt${{matrix.config.qt}}.dmg
|
||||||
|
mv vnote-mac-x64_v${{env.VNOTE_VER}}.dmg vnote-mac-x64-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.dmg
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
|
- name: Archive Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}
|
name: vnote-mac-x64-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}
|
||||||
path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
path: ${{runner.workspace}}/build/vnote-mac-x64-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.dmg
|
||||||
|
|
||||||
- name: Update Tag
|
- name: Update Tag
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
@ -219,7 +158,7 @@ jobs:
|
|||||||
uses: johnwbyrd/update-release@v1.0.0
|
uses: johnwbyrd/update-release@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
files: ${{runner.workspace}}/build/vnote-mac-x64-qt${{matrix.config.qt}}.dmg
|
||||||
release: Continuous Build
|
release: Continuous Build
|
||||||
tag: continuous-build
|
tag: continuous-build
|
||||||
|
|
||||||
@ -228,7 +167,7 @@ jobs:
|
|||||||
uses: ncipollo/release-action@v1.11.0
|
uses: ncipollo/release-action@v1.11.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
artifacts: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
artifacts: ${{runner.workspace}}/build/vnote-mac-x64-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.dmg
|
||||||
commit: master
|
commit: master
|
||||||
tag: v${{env.VNOTE_VER}}
|
tag: v${{env.VNOTE_VER}}
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
|
155
.github/workflows/ci-win.yml
vendored
@ -8,44 +8,43 @@ on:
|
|||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab.
|
# Allows you to run this workflow manually from the Actions tab.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
debug_enabled:
|
|
||||||
type: boolean
|
|
||||||
description: 'Run the build with tmate debugging enabled'
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VNOTE_VER: 3.19.2
|
VNOTE_VER: 3.17.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.config.name }}
|
name: ${{ matrix.config.name }}
|
||||||
runs-on: windows-${{ matrix.config.vs_version }}
|
runs-on: windows-2019
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- name: "Build on Win64 Qt 5.15"
|
# - {
|
||||||
arch: win64_msvc2019_64
|
# name: "Build On Win64 Qt 5.12",
|
||||||
vs_version: 2019
|
# arch: win64_msvc2017_64,
|
||||||
vs_cmd: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
|
# platform: x64,
|
||||||
|
# qt: 5.12.11
|
||||||
|
# }
|
||||||
|
# - {
|
||||||
|
# name: "Build On Win32 Qt 5.12",
|
||||||
|
# arch: win32_msvc2017,
|
||||||
|
# platform: x86,
|
||||||
|
# qt: 5.12.11
|
||||||
|
# }
|
||||||
|
- {
|
||||||
|
name: "Build On Win64 Qt 5.15",
|
||||||
|
arch: win64_msvc2019_64,
|
||||||
|
platform: x64,
|
||||||
qt: 5.15.2
|
qt: 5.15.2
|
||||||
qt_modules: qtwebengine
|
}
|
||||||
qt_tools: tools_opensslv3_x64
|
- {
|
||||||
qt_major: 5
|
name: "Build On Win32 Qt 5.15",
|
||||||
suffix: "-windows7"
|
arch: win32_msvc2019,
|
||||||
- name: "Build on Win64 Qt 6"
|
platform: x86,
|
||||||
arch: win64_msvc2022_64
|
qt: 5.15.2
|
||||||
vs_version: 2022
|
}
|
||||||
vs_cmd: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
|
|
||||||
qt: 6.8.3
|
|
||||||
qt_modules: "qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat"
|
|
||||||
qt_tools: tools_opensslv3_x64
|
|
||||||
qt_major: 6
|
|
||||||
suffix: ""
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE.
|
# Checks-out your repository under $GITHUB_WORKSPACE.
|
||||||
@ -62,70 +61,94 @@ jobs:
|
|||||||
|
|
||||||
- name: Cache Qt
|
- name: Cache Qt
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v1 # not v2!
|
||||||
with:
|
with:
|
||||||
path: ${{runner.workspace}}/Qt
|
path: ../Qt
|
||||||
key: ${{runner.os}}-${{matrix.config.arch}}-QtCache-${{matrix.config.qt}}
|
key: ${{ runner.os }}-${{matrix.config.arch}}-QtCache-5.12-1
|
||||||
|
|
||||||
- name: Install Qt Official Build
|
- name: Install Qt Official Build
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v2
|
||||||
with:
|
with:
|
||||||
version: ${{matrix.config.qt}}
|
version: ${{matrix.config.qt}}
|
||||||
target: desktop
|
target: desktop
|
||||||
arch: ${{matrix.config.arch}}
|
arch: ${{matrix.config.arch}}
|
||||||
modules: ${{matrix.config.qt_modules}}
|
modules: qtwebengine
|
||||||
tools: ${{matrix.config.qt_tools}}
|
tools: tools_openssl_${{matrix.config.platform}},1.1.1-4,qt.tools.openssl.win_${{matrix.config.platform}}
|
||||||
cache: 'true'
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||||
|
|
||||||
- name: Create Build Dir
|
- name: Create Build Dir
|
||||||
shell: bash
|
shell: bash
|
||||||
run: mkdir build
|
run: mkdir build
|
||||||
working-directory: ${{runner.workspace}}
|
working-directory: ${{runner.workspace}}
|
||||||
|
|
||||||
- name: Clone OpenSSL on 5.15
|
- name: Clone OpenSSL
|
||||||
shell: bash
|
shell: bash
|
||||||
if: ${{startsWith(matrix.config.qt, '5.15')}}
|
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git --depth=1
|
git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git --depth=1
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
# Enable tmate debugging of manually-triggered workflows if the input option was provided
|
|
||||||
- name: Setup tmate session
|
|
||||||
uses: mxschmitt/action-tmate@v3
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
|
|
||||||
|
|
||||||
- name: Configure and Build Project
|
- name: Configure and Build Project
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
cmake --version
|
qmake --version
|
||||||
call "${{matrix.config.vs_cmd}}"
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.config.platform}}
|
||||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=${{matrix.config.qt_major}} -DOPENSSL_EXTRA_LIB_DIR=${{runner.workspace}}\build\openssl-utils.git\1.1.1j\Win_x64 %GITHUB_WORKSPACE%
|
qmake -r -spec win32-msvc CONFIG-=debug CONFIG+=release %GITHUB_WORKSPACE%\vnote.pro
|
||||||
cmake --build .
|
nmake
|
||||||
cmake --build . --target=pack
|
|
||||||
7z x VNote*.zip -o*
|
|
||||||
dir
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Rename on 5.15
|
- name: Package Project
|
||||||
shell: bash
|
shell: cmd
|
||||||
if: ${{startsWith(matrix.config.qt, '5.15')}}
|
|
||||||
run: |
|
run: |
|
||||||
mv VNote-${{env.VNOTE_VER}}-win64 VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
|
qmake --version
|
||||||
mv VNote-${{env.VNOTE_VER}}-win64.zip VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip
|
mkdir "%DISTRIB_PATH%"
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.config.platform}}
|
||||||
|
windeployqt.exe --dir "%DISTRIB_PATH%" .\src\release\vnote.exe
|
||||||
|
copy .\src\release\vnote.exe "%DISTRIB_PATH%\vnote.exe"
|
||||||
|
copy .\src\release\vnote_extra.rcc "%DISTRIB_PATH%\vnote_extra.rcc"
|
||||||
|
copy .\libs\vtextedit\src\libs\syntax-highlighting\release\VSyntaxHighlighting.dll "%DISTRIB_PATH%\VSyntaxHighlighting.dll"
|
||||||
|
copy .\libs\vtextedit\src\editor\release\VTextEdit.dll "%DISTRIB_PATH%\VTextEdit.dll"
|
||||||
|
rem set qt_dir=%Qt5_Dir:/=\%
|
||||||
|
rem for %%I in ("%qt_dir%\..\..") do set "qt_topdir=%%~fI"
|
||||||
|
rem set openssl_dir=%qt_topdir%\Tools\OpenSSL\Win_${{matrix.config.platform}}\bin
|
||||||
|
set openssl_dir=openssl-utils.git\1.1.1j\Win_${{matrix.config.platform}}
|
||||||
|
copy %openssl_dir%\lib*.dll "%DISTRIB_PATH%\"
|
||||||
|
copy "%GITHUB_WORKSPACE%\README.md" "%DISTRIB_PATH%\README.md"
|
||||||
|
copy "%GITHUB_WORKSPACE%\COPYING.LESSER" "%DISTRIB_PATH%\COPYING.LESSER"
|
||||||
|
echo %GITHUB_SHA% > "%DISTRIB_PATH%\commit"
|
||||||
|
del /F /Q "%DISTRIB_PATH%\translations\qt_*.qm"
|
||||||
|
7z a vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}.zip "%DISTRIB_PATH%"
|
||||||
|
copy vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}.zip vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.zip
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
env:
|
||||||
|
DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote
|
||||||
|
|
||||||
|
- name: Package Installer
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
copy "%GITHUB_WORKSPACE%\src\data\core\icons\vnote.ico" "%DISTRIB_PATH%\vnote.ico"
|
||||||
|
git clone https://github.com/vnotex/mkmsi.git mkmsi.git --depth=1
|
||||||
|
python .\mkmsi.git\mkmsi.py --auto-create qt --source-dir "%DISTRIB_PATH%" --wix-root "C:\Program Files (x86)\WiX Toolset v3.11" --merge-module "C:\Program Files (x86)\Common Files\Merge Modules\Microsoft_VC140_CRT_${{matrix.config.platform}}.msm" --add-desktop-shortcut --project-version ${{env.VNOTE_VER}} --license %GITHUB_WORKSPACE%\package\lgpl-3.0.rtf --executable vnote.exe --wix-banner %GITHUB_WORKSPACE%\package\wix_banner.png --wix-dialog %GITHUB_WORKSPACE%\package\wix_dialog.png VNote
|
||||||
|
move VNote.msi .\distrib\VNote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.msi
|
||||||
|
del "%DISTRIB_PATH%\vnote.ico"
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
env:
|
||||||
|
DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote
|
||||||
|
|
||||||
- name: Archive Artifacts
|
- name: Archive Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
|
name: vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}
|
||||||
path: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
|
path: ${{env.DISTRIB_PATH}}
|
||||||
|
env:
|
||||||
|
DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote
|
||||||
|
|
||||||
- name: Archive Installer
|
- name: Archive Installer
|
||||||
if: ${{!startsWith(matrix.config.qt, '5.15')}}
|
uses: actions/upload-artifact@v2
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.msi
|
name: VNote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.msi
|
||||||
path: ${{runner.workspace}}/build/VNote*.msi
|
path: ${{runner.workspace}}/build/distrib/VNote*.msi
|
||||||
|
env:
|
||||||
|
DISTRIB_PATH: ${{runner.workspace}}/build/distrib/vnote
|
||||||
|
|
||||||
- name: Update Tag
|
- name: Update Tag
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
@ -139,18 +162,24 @@ jobs:
|
|||||||
uses: johnwbyrd/update-release@v1.0.0
|
uses: johnwbyrd/update-release@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# glob not supported
|
files: ${{runner.workspace}}/build/vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}.zip
|
||||||
files: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}.zip
|
|
||||||
release: Continuous Build
|
release: Continuous Build
|
||||||
tag: continuous-build
|
tag: continuous-build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
dir .
|
||||||
|
dir .\distrib
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
if: github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, '[Release]')
|
if: github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, '[Release]')
|
||||||
uses: ncipollo/release-action@v1.11.0
|
uses: ncipollo/release-action@v1.11.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# glob not supported
|
# We need hard code here.
|
||||||
artifacts: ${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-win64${{matrix.config.suffix}}
|
artifacts: "D:/a/vnote/build/vnote-win-${{matrix.config.platform}}-qt${{matrix.config.qt}}_v${{env.VNOTE_VER}}.zip"
|
||||||
commit: master
|
commit: master
|
||||||
tag: v${{env.VNOTE_VER}}
|
tag: v${{env.VNOTE_VER}}
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
|
4
.gitignore
vendored
@ -2,7 +2,6 @@
|
|||||||
*.pro.user.*
|
*.pro.user.*
|
||||||
.ccls
|
.ccls
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
compile_commands.json.*
|
|
||||||
compile_flags.txt
|
compile_flags.txt
|
||||||
.cache
|
.cache
|
||||||
.tasks
|
.tasks
|
||||||
@ -12,6 +11,3 @@ GRTAGS
|
|||||||
GTAGS
|
GTAGS
|
||||||
aqtinstall.log
|
aqtinstall.log
|
||||||
tags
|
tags
|
||||||
CMakeLists.txt.user
|
|
||||||
build
|
|
||||||
.DS_Store
|
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
cmake_minimum_required (VERSION 3.20)
|
|
||||||
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.1" CACHE STRING "Minimum OS X deployment version")
|
|
||||||
|
|
||||||
project(VNote
|
|
||||||
VERSION 3.19.2
|
|
||||||
DESCRIPTION "A pleasant note-taking platform"
|
|
||||||
HOMEPAGE_URL "https://app.vnote.fun"
|
|
||||||
LANGUAGES C CXX)
|
|
||||||
|
|
||||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type, defaults to Release")
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
|
|
||||||
set(QHOTKEY_INSTALL OFF CACHE BOOL "Disable installing QHotKey" FORCE)
|
|
||||||
add_subdirectory(libs)
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
|
||||||
|
|
||||||
# TODO: find a better way to organize tests
|
|
||||||
# add_subdirectory(tests)
|
|
27
README.md
@ -1,13 +1,11 @@
|
|||||||
# VNote
|
# VNote
|
||||||
  
|
  
|
||||||
|
|
||||||
[简体中文](README_zh_CN.md)
|
[简体中文](README_zh_CN.md)
|
||||||
|
|
||||||
[Project on Gitee](https://gitee.com/vnotex/vnote)
|
|
||||||
|
|
||||||
A pleasant note-taking platform.
|
A pleasant note-taking platform.
|
||||||
|
|
||||||
For more information, please visit [**VNote's Home Page**](https://vnotex.github.io/vnote).
|
For more information, please visit [**VNote's Home Page**](https://vnotex.github.io/vnote) or [Home Page on Gitee](https://tamlok.gitee.io/vnote).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -28,14 +26,33 @@ Continuous builds on `master` branch could be found at the [Continuous Build](ht
|
|||||||
Latest stable builds could be found at the [latest release](https://github.com/vnotex/vnote/releases/latest). Alternative download services are available:
|
Latest stable builds could be found at the [latest release](https://github.com/vnotex/vnote/releases/latest). Alternative download services are available:
|
||||||
|
|
||||||
* [Tianyi Netdisk](https://cloud.189.cn/t/Av67NvmEJVBv)
|
* [Tianyi Netdisk](https://cloud.189.cn/t/Av67NvmEJVBv)
|
||||||
* [Baidu Netdisk](https://pan.baidu.com/s/1lX69oMBw8XuJshQDN3HiHw?pwd=f8fk)
|
* [Baidu Netdisk](https://pan.baidu.com/s/1Fou1flmBsQUQ8Qs9V_M6Aw) with the code `note`
|
||||||
|
|
||||||
## Supports
|
## Supports
|
||||||
* [GitHub Issues](https://github.com/vnotex/vnote/issues);
|
* [GitHub Issues](https://github.com/vnotex/vnote/issues);
|
||||||
* Email: `tamlokveer at gmail.com`;
|
* Email: `tamlokveer at gmail.com`;
|
||||||
|
* [Slack](https://join.slack.com/t/vnote/shared_invite/enQtNDg2MzY0NDg3NzI4LTVhMzBlOTY0YzVhMmQyMTFmZDdhY2M3MDQxYTBjOTA2Y2IxOGRiZjg2NzdhMjkzYmUyY2VkMWJlZTNhMTQyODU);
|
||||||
* [Telegram](https://t.me/vnotex);
|
* [Telegram](https://t.me/vnotex);
|
||||||
* WeChat Public Account: vnotex;
|
* WeChat Public Account: vnotex;
|
||||||
|
|
||||||
|
## Donate
|
||||||
|
You could help VNote's development in many ways.
|
||||||
|
|
||||||
|
* Keep monitoring VNote and sending feedback for improvement.
|
||||||
|
* Spread and promote VNote to your friends. Popularity is a strong power to drive developers.
|
||||||
|
* Participate in the development of VNote and send [Pull Request](https://github.com/vnotex/vnote/pulls) to make VNote perfect.
|
||||||
|
* Last, really appreciate your donations to VNote if VNote does help.
|
||||||
|
|
||||||
|
**PayPal**: [PayPal.Me/vnotemd](https://www.paypal.me/vnotemd)
|
||||||
|
|
||||||
|
**Alipay**: `tamlokveer@gmail.com`
|
||||||
|
|
||||||
|
<img src="pics/alipay.png" width="256px" height="256px" />
|
||||||
|
|
||||||
|
**WeChat**
|
||||||
|
|
||||||
|
<img src="pics/wechat_pay.png" width="256px" height="256px" />
|
||||||
|
|
||||||
Thank [users who donated to VNote](https://github.com/vnotex/vnote/wiki/Donate-List)!
|
Thank [users who donated to VNote](https://github.com/vnotex/vnote/wiki/Donate-List)!
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
# VNote
|
# VNote
|
||||||
  
|
  
|
||||||
|
|
||||||
[English](README.md)
|
[English](README.md)
|
||||||
|
|
||||||
[Gitee托管项目](https://gitee.com/vnotex/vnote)
|
|
||||||
|
|
||||||
一个舒适的笔记平台!
|
一个舒适的笔记平台!
|
||||||
|
|
||||||
更多信息,请访问[VNote主页](https://vnotex.github.io/vnote)。
|
更多信息,请访问[VNote主页](https://vnotex.github.io/vnote)或者[由Gitee托管的主页](https://tamlok.gitee.io/vnote)。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -28,14 +26,33 @@ VNote不是一个简单的Markdown编辑器。通过提供强大的笔记管理
|
|||||||
最新的[稳定版本发布](https://github.com/vnotex/vnote/releases/latest)。其他下载选项:
|
最新的[稳定版本发布](https://github.com/vnotex/vnote/releases/latest)。其他下载选项:
|
||||||
|
|
||||||
* [天翼云盘](https://cloud.189.cn/t/Av67NvmEJVBv)
|
* [天翼云盘](https://cloud.189.cn/t/Av67NvmEJVBv)
|
||||||
* [百度云盘](https://pan.baidu.com/s/1lX69oMBw8XuJshQDN3HiHw?pwd=f8fk)
|
* [百度云盘](https://pan.baidu.com/s/1Fou1flmBsQUQ8Qs9V_M6Aw) 提取码`note`
|
||||||
|
|
||||||
## 支持
|
## 支持
|
||||||
* [GitHub Issues](https://github.com/vnotex/vnote/issues);
|
* [GitHub Issues](https://github.com/vnotex/vnote/issues);
|
||||||
* 邮件:`tamlokveer at gmail.com`;
|
* 邮件:`tamlokveer at gmail.com`;
|
||||||
|
* [Slack](https://join.slack.com/t/vnote/shared_invite/enQtNDg2MzY0NDg3NzI4LTVhMzBlOTY0YzVhMmQyMTFmZDdhY2M3MDQxYTBjOTA2Y2IxOGRiZjg2NzdhMjkzYmUyY2VkMWJlZTNhMTQyODU);
|
||||||
* [Telegram](https://t.me/vnotex);
|
* [Telegram](https://t.me/vnotex);
|
||||||
* 微信公众号:`vnotex`;
|
* 微信公众号:`vnotex`;
|
||||||
|
|
||||||
|
## 捐赠
|
||||||
|
有很多方式可以帮助VNote的开发:
|
||||||
|
|
||||||
|
* 持续关注VNote并反馈问题以帮助改进。
|
||||||
|
* 推荐VNote给朋友,口碑传播。
|
||||||
|
* 参与VNote的开发,发起[拉取请求](https://github.com/vnotex/vnote/pulls)一起改进VNote。
|
||||||
|
* 如果VNote真的好用,可以考虑捐赠。
|
||||||
|
|
||||||
|
**PayPal**:[PayPal.Me/vnotemd](https://www.paypal.me/vnotemd)
|
||||||
|
|
||||||
|
**支付宝**:`tamlokveer@gmail.com`
|
||||||
|
|
||||||
|
<img src="pics/alipay.png" width="256px" height="256px" />
|
||||||
|
|
||||||
|
**微信**
|
||||||
|
|
||||||
|
<img src="pics/wechat_pay.png" width="256px" height="256px" />
|
||||||
|
|
||||||
感谢这些[捐赠用户](https://github.com/vnotex/vnote/wiki/Donate-List)!
|
感谢这些[捐赠用户](https://github.com/vnotex/vnote/wiki/Donate-List)!
|
||||||
|
|
||||||
## 许可
|
## 许可
|
||||||
|
15
SECURITY.md
@ -1,15 +0,0 @@
|
|||||||
# Security Policy
|
|
||||||
|
|
||||||
## Supported Versions
|
|
||||||
|
|
||||||
Only the latest version is supported with security updates.
|
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
|
||||||
|
|
||||||
Please [contact support](mailto:tamlokveer@gmail.com) **with a proof of concept** that shows the security vulnerability. Please do not contact us without this proof of concept, as we cannot fix anything without this.
|
|
||||||
|
|
||||||
For general opinions on what makes an app more or less secure, please use the forum.
|
|
||||||
|
|
||||||
## Bounty
|
|
||||||
|
|
||||||
We **do not** offer a bounty for discovering vulnerabilities, please do not ask. We can however credit you and link to your website/profile in the changelog and release announcement.
|
|
24
changes.md
@ -1,28 +1,4 @@
|
|||||||
# Changes
|
# Changes
|
||||||
## v3.19.2
|
|
||||||
* Codesign MacOS Bundle
|
|
||||||
* Fix toolbar expansion button style
|
|
||||||
* Support hot-reloading of theme via --watch-themes option
|
|
||||||
|
|
||||||
## v3.19.1
|
|
||||||
* Fix toolbar button in Qt 6.8
|
|
||||||
|
|
||||||
## v3.19.0
|
|
||||||
* Add VSCode-sytle editor shortcuts
|
|
||||||
|
|
||||||
## v3.18.1
|
|
||||||
* Fix crash caused by Qt6 change
|
|
||||||
* Fix XSS protection exemption
|
|
||||||
* Check link before open
|
|
||||||
|
|
||||||
## v3.18.0
|
|
||||||
* Upgrade to Qt6
|
|
||||||
* Support MacOS universal build
|
|
||||||
* Upgrade Mermaid, Flowchart.js, and markdown-it
|
|
||||||
* Markdown-it
|
|
||||||
* Fix XSS protection and turn it on by default
|
|
||||||
* Support mark by `==xx==`
|
|
||||||
|
|
||||||
## v3.17.0
|
## v3.17.0
|
||||||
* Quick note: create note in given scheme (@feloxx)
|
* Quick note: create note in given scheme (@feloxx)
|
||||||
* MarkdownEditor: support inserting multiple images (@feloxx)
|
* MarkdownEditor: support inserting multiple images (@feloxx)
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
add_subdirectory(QHotkey)
|
|
||||||
add_subdirectory(vtextedit)
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 8abe0b2280533af57f423f5785acc4d9d4d73ab8
|
Subproject commit 18ac011008d3ae55abc19233ba94fad1ea9801d8
|
5
libs/libs.pro
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
|
SUBDIRS += \
|
||||||
|
vtextedit \
|
||||||
|
QHotkey
|
@ -1 +1 @@
|
|||||||
Subproject commit 50b1421793af3882ddc62ad4e6cf5537e1d7906f
|
Subproject commit 398ec0f8523d9c74a44cb746b5a1017741521e48
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.disable-library-validation</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.allow-jit</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.files.user-selected.read-write</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.network.client</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.get-task-allow</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.debugger</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.inherit</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>com.apple.security.files.user-selected.read-write</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.network.client</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.allow-jit</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.disable-library-validation</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.get-task-allow</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.cs.debugger</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.inherit</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@ -1,2 +0,0 @@
|
|||||||
[Platforms]
|
|
||||||
WindowsArguments = fontengine=freetype
|
|
@ -1,26 +0,0 @@
|
|||||||
# Privacy Policy
|
|
||||||
|
|
||||||
## Introduction
|
|
||||||
Welcome to VNote! We value your privacy and are committed to protecting your personal information. This Privacy Policy explains how we handle your information when you use our application.
|
|
||||||
|
|
||||||
## Information We Collect
|
|
||||||
VNote does not collect any personal or usage data from its users. Your interactions with the app remain private and are not stored or shared.
|
|
||||||
|
|
||||||
## How We Use Your Information
|
|
||||||
Since VNote does not collect any user data, we do not use, store, or process any personal information.
|
|
||||||
|
|
||||||
## Sharing Your Information
|
|
||||||
As VNote does not collect any user data, we do not share any personal information with third parties.
|
|
||||||
|
|
||||||
## Security
|
|
||||||
While VNote does not collect any user data, we still implement security measures to ensure the integrity and safety of the application itself.
|
|
||||||
|
|
||||||
## Your Choices
|
|
||||||
Since no data is collected, there are no choices or actions required from users regarding their personal information.
|
|
||||||
|
|
||||||
## Children's Privacy
|
|
||||||
Our services are not intended for children under the age of 13. We do not knowingly collect personal information from children under 13.
|
|
||||||
|
|
||||||
## Changes to This Privacy Policy
|
|
||||||
We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on our app. You are advised to review this Privacy Policy periodically for any changes.
|
|
||||||
|
|
@ -7,14 +7,8 @@ if len(sys.argv) < 2:
|
|||||||
exit
|
exit
|
||||||
|
|
||||||
newVersion = sys.argv[1]
|
newVersion = sys.argv[1]
|
||||||
shortVersion = re.match('^(\\d+\\.\\d+).', newVersion).group(1)
|
|
||||||
print("New version: {0}".format(newVersion))
|
print("New version: {0}".format(newVersion))
|
||||||
|
|
||||||
# CMakeList
|
|
||||||
regExp = re.compile('(\\s+)VERSION \\S+')
|
|
||||||
for line in fileinput.input(['CMakeLists.txt'], inplace = True):
|
|
||||||
print(regExp.sub('\\1VERSION ' + newVersion, line), end='')
|
|
||||||
|
|
||||||
# vnotex.json
|
# vnotex.json
|
||||||
regExp = re.compile('(\\s+)"version" : "\\S+"')
|
regExp = re.compile('(\\s+)"version" : "\\S+"')
|
||||||
for line in fileinput.input(['src/data/core/vnotex.json'], inplace = True):
|
for line in fileinput.input(['src/data/core/vnotex.json'], inplace = True):
|
||||||
@ -26,10 +20,6 @@ for line in fileinput.input(['.github/workflows/ci-win.yml', '.github/workflows/
|
|||||||
print(regExp.sub('\\1VNOTE_VER: ' + newVersion, line), end='')
|
print(regExp.sub('\\1VNOTE_VER: ' + newVersion, line), end='')
|
||||||
|
|
||||||
# Info.plist
|
# Info.plist
|
||||||
regExp = re.compile('(\\s+)<string>(?!10\\.15)\\d+\\.\\d+</string>')
|
|
||||||
for line in fileinput.input(['src/data/core/Info.plist'], inplace = True):
|
|
||||||
print(regExp.sub('\\1<string>' + shortVersion + '</string>', line), end='')
|
|
||||||
|
|
||||||
regExp = re.compile('(\\s+)<string>\\d+\\.\\d+\\.\\d+</string>')
|
regExp = re.compile('(\\s+)<string>\\d+\\.\\d+\\.\\d+</string>')
|
||||||
for line in fileinput.input(['src/data/core/Info.plist'], inplace = True):
|
for line in fileinput.input(['src/data/core/Info.plist'], inplace = True):
|
||||||
print(regExp.sub('\\1<string>' + newVersion + '</string>', line), end='')
|
print(regExp.sub('\\1<string>' + newVersion + '</string>', line), end='')
|
||||||
|
@ -1,179 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
||||||
|
|
||||||
set(CMAKE_INSTALL_BINDIR "." CACHE STRING "Binary dir for install")
|
|
||||||
|
|
||||||
set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6")
|
|
||||||
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core Gui Network PrintSupport Sql Svg Widgets WebChannel WebEngineWidgets LinguistTools)
|
|
||||||
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} OPTIONAL_COMPONENTS Core5Compat)
|
|
||||||
|
|
||||||
if ((QT_DEFAULT_MAJOR_VERSION GREATER 5))
|
|
||||||
qt_standard_project_setup()
|
|
||||||
else()
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Application icon on Windows
|
|
||||||
set(VX_APP_ICON_RC_WIN data/core/icons/vnote.rc)
|
|
||||||
|
|
||||||
# The MACOSX_BUNDLE_ICON_FILE variable is added to the Info.plist
|
|
||||||
# generated by CMake. This variable contains the .icns file name,
|
|
||||||
# without the path.
|
|
||||||
set(MACOSX_BUNDLE_ICON_FILE vnote.icns)
|
|
||||||
# And the following tells CMake where to find and install the file itself.
|
|
||||||
set(VX_APP_ICON_MACOS data/core/icons/vnote.icns)
|
|
||||||
set_source_files_properties(${VX_APP_ICON_MACOS} PROPERTIES
|
|
||||||
MACOSX_PACKAGE_LOCATION "Resources")
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
set(VX_TS_FILES data/core/translations/vnote_zh_CN.ts
|
|
||||||
data/core/translations/vnote_ja.ts)
|
|
||||||
if((QT_DEFAULT_MAJOR_VERSION EQUAL 6))
|
|
||||||
if((Qt6Widgets_VERSION VERSION_GREATER_EQUAL 6.7.0))
|
|
||||||
qt_add_lupdate(TS_FILES ${VX_TS_FILES}
|
|
||||||
SOURCE_TARGETS vnote)
|
|
||||||
else()
|
|
||||||
qt_add_lupdate(vnote TS_FILES ${VX_TS_FILES})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
# Generate .qm files from .ts files (lrelease)
|
|
||||||
set_source_files_properties(${VX_TS_FILES} PROPERTIES
|
|
||||||
OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations")
|
|
||||||
qt_add_translation(VX_QM_FILES ${VX_TS_FILES})
|
|
||||||
add_custom_target(lrelease DEPENDS ${VX_QM_FILES})
|
|
||||||
|
|
||||||
# TODO: VTextEdit translations
|
|
||||||
list(APPEND VX_QM_FILES
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/data/core/translations/qdialogbuttonbox_zh_CN.qm
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/data/core/translations/qtbase_ja.qm
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/data/core/translations/qtbase_zh_CN.qm
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/data/core/translations/qtv_ja.qm
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/data/core/translations/qtv_zh_CN.qm
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/data/core/translations/qwebengine_zh_CN.qm
|
|
||||||
)
|
|
||||||
|
|
||||||
# Resources
|
|
||||||
set(VX_RESOURCE_FILES data/core/core.qrc)
|
|
||||||
set(VX_EXTRA_RESOURCE_FILES_RCC ${CMAKE_CURRENT_BINARY_DIR}/vnote_extra.rcc)
|
|
||||||
qt_add_binary_resources(VX_EXTRA_RESOURCE data/extra/extra.qrc DESTINATION ${VX_EXTRA_RESOURCE_FILES_RCC} OPTIONS -compress 9)
|
|
||||||
|
|
||||||
add_executable(vnote WIN32 MACOSX_BUNDLE
|
|
||||||
application.cpp application.h
|
|
||||||
commandlineoptions.cpp commandlineoptions.h
|
|
||||||
fakeaccessible.cpp fakeaccessible.h
|
|
||||||
main.cpp
|
|
||||||
${VX_APP_ICON_RC_WIN} ${VX_APP_ICON_MACOS} ${VX_RESOURCE_FILES}
|
|
||||||
)
|
|
||||||
|
|
||||||
add_dependencies(vnote VX_EXTRA_RESOURCE)
|
|
||||||
|
|
||||||
set(VX_LIBS_FOLDER ../libs)
|
|
||||||
target_include_directories(vnote PRIVATE
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
find_program(GOLD_LINKER "ld.gold")
|
|
||||||
if (NOT ${GOLD_LINKER} STREQUAL GOLD_LINKER-NOTFOUND)
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_compile_definitions(vnote PRIVATE
|
|
||||||
QT_MESSAGELOGCONTEXT
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(core)
|
|
||||||
add_subdirectory(export)
|
|
||||||
add_subdirectory(imagehost)
|
|
||||||
add_subdirectory(search)
|
|
||||||
add_subdirectory(snippet)
|
|
||||||
add_subdirectory(task)
|
|
||||||
add_subdirectory(unitedentry)
|
|
||||||
add_subdirectory(utils)
|
|
||||||
add_subdirectory(widgets)
|
|
||||||
|
|
||||||
target_link_libraries(vnote PRIVATE
|
|
||||||
Qt::Core
|
|
||||||
Qt::Gui
|
|
||||||
Qt::Network
|
|
||||||
Qt::PrintSupport
|
|
||||||
Qt::Sql
|
|
||||||
Qt::Svg
|
|
||||||
Qt::WebChannel
|
|
||||||
Qt::WebEngineWidgets
|
|
||||||
Qt::Widgets
|
|
||||||
VTextEdit
|
|
||||||
qhotkey
|
|
||||||
)
|
|
||||||
|
|
||||||
if((QT_DEFAULT_MAJOR_VERSION GREATER 5))
|
|
||||||
target_link_libraries(vnote PRIVATE
|
|
||||||
Qt::Core5Compat
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Copy the qt.conf on Windows
|
|
||||||
if(WIN32)
|
|
||||||
add_custom_command(TARGET vnote POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
"${PROJECT_SOURCE_DIR}/package/qt.conf" $<TARGET_FILE_DIR:vnote>)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Installation
|
|
||||||
if (WIN32)
|
|
||||||
install(TARGETS vnote RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/package/qt.conf" DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
||||||
install(FILES ${VX_EXTRA_RESOURCE_FILES_RCC} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
||||||
install(FILES ${VX_QM_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/translations" OPTIONAL)
|
|
||||||
elseif(APPLE)
|
|
||||||
set(CMAKE_MACOSX_RPATH ON)
|
|
||||||
|
|
||||||
# TODO: declare install for macOS if necessary. For packing, we will manually copy files into
|
|
||||||
# the src/vnote.app bundle.
|
|
||||||
|
|
||||||
# The generated Info.plist will be overridden.
|
|
||||||
set_target_properties(vnote
|
|
||||||
PROPERTIES
|
|
||||||
OUTPUT_NAME "${PROJECT_NAME}"
|
|
||||||
MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}"
|
|
||||||
MACOSX_BUNDLE_INFO_STRING "${PROJECT_DESCRIPTION}"
|
|
||||||
MACOSX_BUNDLE_GUI_IDENTIFIER "fun.vnote.vnote"
|
|
||||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}"
|
|
||||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
|
|
||||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
|
||||||
MACOSX_BUNDLE_COPYRIGHT "Distributed under LGPL-3.0 license. Copyright (c) 2024 app.vnote.fun"
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
install(TARGETS vnote
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
)
|
|
||||||
install(FILES ${VX_EXTRA_RESOURCE_FILES_RCC} DESTINATION ${CMAKE_INSTALL_DATADIR})
|
|
||||||
install(FILES ${VX_QM_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/translations" OPTIONAL)
|
|
||||||
|
|
||||||
set(desktop.path applications)
|
|
||||||
set(desktop.files data/core/vnote.desktop)
|
|
||||||
set(icon16.path icons/hicolor/16x16/apps)
|
|
||||||
set(icon16.files data/core/logo/16x16/vnote.png)
|
|
||||||
set(icon32.path icons/hicolor/32x32/apps)
|
|
||||||
set(icon32.files data/core/logo/32x32/vnote.png)
|
|
||||||
set(icon48.path icons/hicolor/48x48/apps)
|
|
||||||
set(icon48.files data/core/logo/48x48/vnote.png)
|
|
||||||
set(icon64.path icons/hicolor/64x64/apps)
|
|
||||||
set(icon64.files data/core/logo/64x64/vnote.png)
|
|
||||||
set(icon128.path icons/hicolor/128x128/apps)
|
|
||||||
set(icon128.files data/core/logo/128x128/vnote.png)
|
|
||||||
set(icon256.path icons/hicolor/256x256/apps)
|
|
||||||
set(icon256.files data/core/logo/256x256/vnote.png)
|
|
||||||
set(iconsvg.path icons/hicolor/scalable/apps)
|
|
||||||
set(iconsvg.files data/core/logo/vnote.svg)
|
|
||||||
foreach(item IN ITEMS desktop icon16 icon32 icon48 icon64 icon128 icon256 iconsvg)
|
|
||||||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/${${item}.files}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/${${item}.path}
|
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/Packaging.cmake)
|
|
@ -1,16 +0,0 @@
|
|||||||
message(STATUS "VX_APPIMAGE_DEST_DIR ${VX_APPIMAGE_DEST_DIR}")
|
|
||||||
message(STATUS "VX_APPIMAGE_DESKTOP_FILE ${VX_APPIMAGE_DESKTOP_FILE}")
|
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${CMAKE_MAKE_PROGRAM} DESTDIR=${VX_APPIMAGE_DEST_DIR} install
|
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
||||||
execute_process(
|
|
||||||
COMMAND env QMAKE=${QMAKE_EXECUTABLE} LD_LIBRARY_PATH=/usr/local/lib64:$ENV{LD_LIBRARY_PATH} "${LINUXDEPLOY_EXECUTABLE}" --plugin=qt --output=appimage
|
|
||||||
--appdir=${VX_APPIMAGE_DEST_DIR} -e ${CMAKE_CURRENT_BINARY_DIR}/vnote -d ${VX_APPIMAGE_DESKTOP_FILE}
|
|
||||||
-i ${CMAKE_CURRENT_LIST_DIR}/data/core/logo/64x64/vnote.png
|
|
||||||
-l ${QT_PLUGINS_DIR}/platformthemes/libqgtk3.so
|
|
||||||
-l /usr/local/lib64/libcrypto.so.3
|
|
||||||
-l /usr/local/lib64/libssl.so.3
|
|
||||||
# --exclude-library option does not work as expected
|
|
||||||
# --exclude-library=libssl.so.1.1,libcrypto.so.1.1,libnss3.so,libnssutil3.so
|
|
||||||
WORKING_DIRECTORY ${CPACK_PACKAGE_DIRECTORY})
|
|
@ -1,6 +0,0 @@
|
|||||||
execute_process(COMMAND "optool" strip -t ${CMAKE_CURRENT_BINARY_DIR}/VNote.app
|
|
||||||
WORKING_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}
|
|
||||||
)
|
|
||||||
execute_process(COMMAND "${MACDEPLOYQT_EXECUTABLE}" ${CMAKE_CURRENT_BINARY_DIR}/VNote.app -always-overwrite -verbose=1
|
|
||||||
WORKING_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}
|
|
||||||
)
|
|
@ -1,165 +0,0 @@
|
|||||||
# from: https://github.com/miurahr/cmake-qt-packaging-example
|
|
||||||
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core)
|
|
||||||
|
|
||||||
get_target_property(QMAKE_EXECUTABLE Qt::qmake IMPORTED_LOCATION)
|
|
||||||
get_filename_component(QT_BIN_DIR "${QMAKE_EXECUTABLE}" DIRECTORY)
|
|
||||||
execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION)
|
|
||||||
|
|
||||||
set(QT_TOOLS_DIR "${QT_BIN_DIR}/../../../Tools")
|
|
||||||
cmake_path(NORMAL_PATH QT_TOOLS_DIR OUTPUT_VARIABLE QT_TOOLS_DIR)
|
|
||||||
|
|
||||||
set(QT_PLUGINS_DIR "${QT_BIN_DIR}/../plugins")
|
|
||||||
cmake_path(NORMAL_PATH QT_PLUGINS_DIR OUTPUT_VARIABLE QT_PLUGINS_DIR)
|
|
||||||
|
|
||||||
# To use the specific version of Qt
|
|
||||||
set(WINDEPLOYQT_EXECUTABLE "${QT_BIN_DIR}/windeployqt.exe")
|
|
||||||
|
|
||||||
find_program(LINUXDEPLOY_EXECUTABLE linuxdeploy linuxdeploy-x86_64.AppImage HINTS "${QT_BIN_DIR}")
|
|
||||||
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${QT_BIN_DIR}")
|
|
||||||
find_program(MACDEPLOYQTFIX_EXECUTABLE macdeployqtfix.py HINTS "${QT_BIN_DIR}")
|
|
||||||
find_package(Python)
|
|
||||||
|
|
||||||
function(windeployqt target)
|
|
||||||
# Bundle Library Files
|
|
||||||
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
|
|
||||||
|
|
||||||
if ((QT_DEFAULT_MAJOR_VERSION GREATER 5))
|
|
||||||
if(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG")
|
|
||||||
set(WINDEPLOYQT_ARGS --debug)
|
|
||||||
else()
|
|
||||||
set(WINDEPLOYQT_ARGS --release)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_target(deploy
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/winqt/"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E
|
|
||||||
env PATH="${QT_BIN_DIR}" "${WINDEPLOYQT_EXECUTABLE}"
|
|
||||||
${WINDEPLOYQT_ARGS}
|
|
||||||
--no-quick-import
|
|
||||||
--no-opengl-sw
|
|
||||||
--no-compiler-runtime
|
|
||||||
--translations zh_CN,ja
|
|
||||||
--dir "${CMAKE_CURRENT_BINARY_DIR}/winqt/"
|
|
||||||
$<TARGET_FILE:${target}>
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/winqt/generic/"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/winqt/styles/"
|
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/winqt/qmltooling/"
|
|
||||||
COMMENT "Deploying Qt..."
|
|
||||||
DEPENDS vnote lrelease
|
|
||||||
)
|
|
||||||
|
|
||||||
add_dependencies(pack deploy)
|
|
||||||
|
|
||||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/winqt/" DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
|
|
||||||
|
|
||||||
set(OPENSSL_ROOT_DIR "${QT_TOOLS_DIR}/OpenSSL/Win_x64" CACHE STRING "OpenSSL dir")
|
|
||||||
file(GLOB OPENSSL_LIBS_FILES "${OPENSSL_ROOT_DIR}/bin/lib*.dll")
|
|
||||||
cmake_path(NORMAL_PATH OPENSSL_LIBS_FILES OUTPUT_VARIABLE OPENSSL_LIBS_FILES)
|
|
||||||
install(FILES ${OPENSSL_LIBS_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
|
|
||||||
|
|
||||||
message(STATUS "OpenSSLExtraLIBDIR:${OPENSSL_EXTRA_LIB_DIR}")
|
|
||||||
file(GLOB OPENSSL_EXTRA_LIB_FILES "${OPENSSL_EXTRA_LIB_DIR}/lib*.dll")
|
|
||||||
cmake_path(NORMAL_PATH OPENSSL_EXTRA_LIB_FILES OUTPUT_VARIABLE OPENSSL_EXTRA_LIB_FILES)
|
|
||||||
message(STATUS "OpenSSLExtraLibFiles:${OPENSSL_EXTRA_LIB_FILES}")
|
|
||||||
install(FILES ${OPENSSL_EXTRA_LIB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
|
|
||||||
|
|
||||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
|
||||||
include(InstallRequiredSystemLibraries)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_VENDOR "VNoteX")
|
|
||||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
|
|
||||||
set(CPACK_PACKAGE_CONTACT "Le Tan <tamlokveer@gmail.com>")
|
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
|
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
|
|
||||||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING.LESSER")
|
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
|
|
||||||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}")
|
|
||||||
|
|
||||||
# Start menu entry on Windows
|
|
||||||
set(CPACK_PACKAGE_EXECUTABLES "vnote" "VNote")
|
|
||||||
# Desktop link on Windows
|
|
||||||
set(CPACK_CREATE_DESKTOP_LINKS "vnote")
|
|
||||||
|
|
||||||
set(CPACK_STRIP_FILES TRUE)
|
|
||||||
|
|
||||||
# WIX generator
|
|
||||||
set(CPACK_WIX_UPGRADE_GUID BA25F337-991A-4893-9D8A-AD5E89BAF5C4)
|
|
||||||
set(CPACK_WIX_PRODUCT_GUID BA25F337-991A-4893-9D8A-AD5E89BAF5C4)
|
|
||||||
set(CPACK_WIX_LICENSE_RTF "${PROJECT_SOURCE_DIR}/package/lgpl-3.0.rtf")
|
|
||||||
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_LIST_DIR}/data/core/icons/vnote.ico")
|
|
||||||
set(CPACK_WIX_UI_BANNER "${PROJECT_SOURCE_DIR}/package/wix_banner.png")
|
|
||||||
set(CPACK_WIX_UI_DIALOG "${PROJECT_SOURCE_DIR}/package/wix_dialog.png")
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# include CPack, so we get target for packages
|
|
||||||
set(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/BundleConfig.cmake")
|
|
||||||
|
|
||||||
add_custom_target(pack
|
|
||||||
COMMAND ${CMAKE_CPACK_COMMAND} "--config" "${CMAKE_BINARY_DIR}/BundleConfig.cmake" "--verbose"
|
|
||||||
COMMENT "Running CPACK. Please wait..."
|
|
||||||
DEPENDS vnote)
|
|
||||||
add_dependencies(pack lrelease)
|
|
||||||
|
|
||||||
set(CPACK_GENERATOR)
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_LIST_DIR}/data/core/logo/64x64/vnote.png")
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_BIN_DIR}" DOC "Path to the windeployqt utility")
|
|
||||||
|
|
||||||
list(APPEND CPACK_GENERATOR ZIP)
|
|
||||||
message(STATUS "Package generation - Windows - Zip")
|
|
||||||
|
|
||||||
find_program(WIX_EXECUTABLE wix HINTS "${QT_BIN_DIR}" DOC "Path to the WiX utility")
|
|
||||||
|
|
||||||
if (NOT WIX_EXECUTABLE-NOTFOUND)
|
|
||||||
list(APPEND CPACK_GENERATOR WIX)
|
|
||||||
message(STATUS "Package generation - Windows - WiX")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
windeployqt(vnote)
|
|
||||||
elseif(APPLE)
|
|
||||||
# Manually copy resources.
|
|
||||||
set(VX_BUNDLE_CONTENTS_DIR $<TARGET_FILE_DIR:vnote>/..)
|
|
||||||
add_custom_target(deploy
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/data/core/Info.plist" ${VX_BUNDLE_CONTENTS_DIR}
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
${VX_EXTRA_RESOURCE_FILES_RCC} ${VX_BUNDLE_CONTENTS_DIR}/Resources
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${VX_BUNDLE_CONTENTS_DIR}/Resources/translations
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
${VX_QM_FILES} ${VX_BUNDLE_CONTENTS_DIR}/Resources/translations
|
|
||||||
COMMENT "Copying resources into bundle Contents ${VX_BUNDLE_CONTENTS_DIR}"
|
|
||||||
DEPENDS vnote lrelease
|
|
||||||
)
|
|
||||||
add_dependencies(pack deploy)
|
|
||||||
|
|
||||||
message(STATUS "MACDeployQtExecutable: ${MACDEPLOYQT_EXECUTABLE}")
|
|
||||||
if (MACDEPLOYQT_EXECUTABLE)
|
|
||||||
message(STATUS "Package generation - MacOS - DMG")
|
|
||||||
|
|
||||||
list(APPEND CPACK_GENERATOR External)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CPackMacDeployQt.cmake.in "${CMAKE_BINARY_DIR}/CPackExternal.cmake")
|
|
||||||
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_BINARY_DIR}/CPackExternal.cmake")
|
|
||||||
include(InstallRequiredSystemLibraries)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(STATUS "LinuxDeployExecutable: ${LINUXDEPLOY_EXECUTABLE}")
|
|
||||||
if(LINUXDEPLOY_EXECUTABLE)
|
|
||||||
message(STATUS "Package generation - Linux - AppImage")
|
|
||||||
|
|
||||||
list(APPEND CPACK_GENERATOR External)
|
|
||||||
set(VX_APPIMAGE_DEST_DIR "${CPACK_PACKAGE_DIRECTORY}/_CPack_Packages/Linux/External/AppImage")
|
|
||||||
set(VX_APPIMAGE_DESKTOP_FILE "${VX_APPIMAGE_DEST_DIR}${CMAKE_INSTALL_PREFIX}/share/applications/vnote.desktop")
|
|
||||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/CPackLinuxDeployQt.cmake.in "${CMAKE_BINARY_DIR}/CPackExternal.cmake")
|
|
||||||
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_BINARY_DIR}/CPackExternal.cmake")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(CPack)
|
|
@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
#include <QFileOpenEvent>
|
#include <QFileOpenEvent>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
|
||||||
#include <QStyle>
|
|
||||||
#include <QFileSystemWatcher>
|
|
||||||
#include <QTimer>
|
|
||||||
#include <core/vnotex.h>
|
|
||||||
|
|
||||||
using namespace vnotex;
|
using namespace vnotex;
|
||||||
|
|
||||||
@ -15,53 +10,6 @@ Application::Application(int &p_argc, char **p_argv)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::watchThemeFolder(const QString &p_themeFolderPath)
|
|
||||||
{
|
|
||||||
if (p_themeFolderPath.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize watchers only when needed
|
|
||||||
if (!m_styleWatcher) {
|
|
||||||
m_styleWatcher = new QFileSystemWatcher(this);
|
|
||||||
}
|
|
||||||
if (!m_reloadTimer) {
|
|
||||||
m_reloadTimer = new QTimer(this);
|
|
||||||
m_reloadTimer->setSingleShot(true);
|
|
||||||
m_reloadTimer->setInterval(500); // 500ms debounce delay
|
|
||||||
connect(m_reloadTimer, &QTimer::timeout,
|
|
||||||
this, &Application::reloadThemeResources);
|
|
||||||
|
|
||||||
// Connect file watcher to timer
|
|
||||||
connect(m_styleWatcher, &QFileSystemWatcher::directoryChanged,
|
|
||||||
m_reloadTimer, qOverload<>(&QTimer::start));
|
|
||||||
connect(m_styleWatcher, &QFileSystemWatcher::fileChanged,
|
|
||||||
m_reloadTimer, qOverload<>(&QTimer::start));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch the theme folder and its files
|
|
||||||
m_styleWatcher->addPath(p_themeFolderPath);
|
|
||||||
|
|
||||||
// Also watch individual files in the theme folder
|
|
||||||
QDir themeDir(p_themeFolderPath);
|
|
||||||
QStringList files = themeDir.entryList(QDir::Files);
|
|
||||||
for (const QString &file : files) {
|
|
||||||
m_styleWatcher->addPath(themeDir.filePath(file));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Application::reloadThemeResources()
|
|
||||||
{
|
|
||||||
VNoteX::getInst().getThemeMgr().refreshCurrentTheme();
|
|
||||||
|
|
||||||
auto stylesheet = VNoteX::getInst().getThemeMgr().fetchQtStyleSheet();
|
|
||||||
if (!stylesheet.isEmpty()) {
|
|
||||||
setStyleSheet(stylesheet);
|
|
||||||
style()->unpolish(this);
|
|
||||||
style()->polish(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Application::event(QEvent *p_event)
|
bool Application::event(QEvent *p_event)
|
||||||
{
|
{
|
||||||
// On macOS, we need this to open file from Finder.
|
// On macOS, we need this to open file from Finder.
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#ifndef APPLICATION_H
|
#ifndef APPLICATION_H
|
||||||
#define APPLICATION_H
|
#define APPLICATION_H
|
||||||
#include <QApplication>
|
|
||||||
|
|
||||||
class QFileSystemWatcher;
|
#include <QApplication>
|
||||||
class QTimer;
|
|
||||||
|
|
||||||
namespace vnotex
|
namespace vnotex
|
||||||
{
|
{
|
||||||
@ -13,21 +11,11 @@ namespace vnotex
|
|||||||
public:
|
public:
|
||||||
Application(int &p_argc, char **p_argv);
|
Application(int &p_argc, char **p_argv);
|
||||||
|
|
||||||
// Set up theme folder watcher for hot-reload
|
|
||||||
void watchThemeFolder(const QString &p_themeFolderPath);
|
|
||||||
|
|
||||||
// Reload the theme resources (stylesheet, icons, etc)
|
|
||||||
void reloadThemeResources();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void openFileRequested(const QString &p_filePath);
|
void openFileRequested(const QString &p_filePath);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent *p_event) Q_DECL_OVERRIDE;
|
bool event(QEvent *p_event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
|
||||||
QFileSystemWatcher *m_styleWatcher = nullptr;
|
|
||||||
QTimer *m_reloadTimer = nullptr;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,12 +22,6 @@ CommandLineOptions::ParseResult CommandLineOptions::parse(const QStringList &p_a
|
|||||||
const QCommandLineOption verboseOpt("verbose", MainWindow::tr("Print more logs."));
|
const QCommandLineOption verboseOpt("verbose", MainWindow::tr("Print more logs."));
|
||||||
parser.addOption(verboseOpt);
|
parser.addOption(verboseOpt);
|
||||||
|
|
||||||
const QCommandLineOption logStderrOpt("log-stderr", MainWindow::tr("Log to stderr."));
|
|
||||||
parser.addOption(logStderrOpt);
|
|
||||||
|
|
||||||
const QCommandLineOption watchThemesOpt("watch-themes", MainWindow::tr("Watch theme folder for changes."));
|
|
||||||
parser.addOption(watchThemesOpt);
|
|
||||||
|
|
||||||
// WebEngine options.
|
// WebEngine options.
|
||||||
// No need to handle them. Just add them to the parser to avoid parse error.
|
// No need to handle them. Just add them to the parser to avoid parse error.
|
||||||
{
|
{
|
||||||
@ -69,13 +63,5 @@ CommandLineOptions::ParseResult CommandLineOptions::parse(const QStringList &p_a
|
|||||||
m_verbose = true;
|
m_verbose = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parser.isSet(logStderrOpt)) {
|
|
||||||
m_logToStderr = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.isSet(watchThemesOpt)) {
|
|
||||||
m_watchThemes = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ParseResult::Ok;
|
return ParseResult::Ok;
|
||||||
}
|
}
|
||||||
|
@ -25,11 +25,6 @@ public:
|
|||||||
QStringList m_pathsToOpen;
|
QStringList m_pathsToOpen;
|
||||||
|
|
||||||
bool m_verbose = false;
|
bool m_verbose = false;
|
||||||
|
|
||||||
bool m_logToStderr = false;
|
|
||||||
|
|
||||||
// Whether to watch theme folder for changes
|
|
||||||
bool m_watchThemes = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMMANDLINEOPTIONS_H
|
#endif // COMMANDLINEOPTIONS_H
|
||||||
|
@ -1,87 +0,0 @@
|
|||||||
target_sources(vnote PRIVATE
|
|
||||||
buffer/buffer.cpp buffer/buffer.h
|
|
||||||
buffer/bufferprovider.cpp buffer/bufferprovider.h
|
|
||||||
buffer/filebufferprovider.cpp buffer/filebufferprovider.h
|
|
||||||
buffer/filetypehelper.cpp buffer/filetypehelper.h
|
|
||||||
buffer/ibufferfactory.h
|
|
||||||
buffer/markdownbuffer.cpp buffer/markdownbuffer.h
|
|
||||||
buffer/markdownbufferfactory.cpp buffer/markdownbufferfactory.h
|
|
||||||
buffer/mindmapbuffer.cpp buffer/mindmapbuffer.h
|
|
||||||
buffer/mindmapbufferfactory.cpp buffer/mindmapbufferfactory.h
|
|
||||||
buffer/nodebufferprovider.cpp buffer/nodebufferprovider.h
|
|
||||||
buffer/pdfbuffer.cpp buffer/pdfbuffer.h
|
|
||||||
buffer/pdfbufferfactory.cpp buffer/pdfbufferfactory.h
|
|
||||||
buffer/textbuffer.cpp buffer/textbuffer.h
|
|
||||||
buffer/textbufferfactory.cpp buffer/textbufferfactory.h
|
|
||||||
buffer/urlbasedbufferprovider.h
|
|
||||||
buffermgr.cpp buffermgr.h
|
|
||||||
clipboarddata.cpp clipboarddata.h
|
|
||||||
configmgr.cpp configmgr.h
|
|
||||||
coreconfig.cpp coreconfig.h
|
|
||||||
editorconfig.cpp editorconfig.h
|
|
||||||
events.h
|
|
||||||
exception.h
|
|
||||||
externalfile.cpp externalfile.h
|
|
||||||
file.cpp file.h
|
|
||||||
filelocator.h
|
|
||||||
fileopenparameters.h
|
|
||||||
global.cpp global.h
|
|
||||||
historyitem.cpp historyitem.h
|
|
||||||
historymgr.cpp historymgr.h
|
|
||||||
htmltemplatehelper.cpp htmltemplatehelper.h
|
|
||||||
iconfig.h
|
|
||||||
location.h
|
|
||||||
logger.cpp logger.h
|
|
||||||
mainconfig.cpp mainconfig.h
|
|
||||||
markdowneditorconfig.cpp markdowneditorconfig.h
|
|
||||||
mindmapeditorconfig.cpp mindmapeditorconfig.h
|
|
||||||
namebasedserver.h
|
|
||||||
noncopyable.h
|
|
||||||
notebook/bundlenotebook.cpp notebook/bundlenotebook.h
|
|
||||||
notebook/bundlenotebookfactory.cpp notebook/bundlenotebookfactory.h
|
|
||||||
notebook/externalnode.cpp notebook/externalnode.h
|
|
||||||
notebook/historyi.h
|
|
||||||
notebook/inotebookfactory.h
|
|
||||||
notebook/node.cpp notebook/node.h
|
|
||||||
notebook/nodeparameters.cpp notebook/nodeparameters.h
|
|
||||||
notebook/notebook.cpp notebook/notebook.h
|
|
||||||
notebook/notebookdatabaseaccess.cpp notebook/notebookdatabaseaccess.h
|
|
||||||
notebook/notebookparameters.cpp notebook/notebookparameters.h
|
|
||||||
notebook/notebooktagmgr.cpp notebook/notebooktagmgr.h
|
|
||||||
notebook/tag.cpp notebook/tag.h
|
|
||||||
notebook/tagi.h
|
|
||||||
notebook/vxnode.cpp notebook/vxnode.h
|
|
||||||
notebook/vxnodefile.cpp notebook/vxnodefile.h
|
|
||||||
notebookbackend/inotebookbackend.cpp notebookbackend/inotebookbackend.h
|
|
||||||
notebookbackend/inotebookbackendfactory.h
|
|
||||||
notebookbackend/localnotebookbackend.cpp notebookbackend/localnotebookbackend.h
|
|
||||||
notebookbackend/localnotebookbackendfactory.cpp notebookbackend/localnotebookbackendfactory.h
|
|
||||||
notebookconfigmgr/bundlenotebookconfigmgr.cpp notebookconfigmgr/bundlenotebookconfigmgr.h
|
|
||||||
notebookconfigmgr/inotebookconfigmgr.cpp notebookconfigmgr/inotebookconfigmgr.h
|
|
||||||
notebookconfigmgr/inotebookconfigmgrfactory.h
|
|
||||||
notebookconfigmgr/notebookconfig.cpp notebookconfigmgr/notebookconfig.h
|
|
||||||
notebookconfigmgr/vxnodeconfig.cpp notebookconfigmgr/vxnodeconfig.h
|
|
||||||
notebookconfigmgr/vxnotebookconfigmgr.cpp notebookconfigmgr/vxnotebookconfigmgr.h
|
|
||||||
notebookconfigmgr/vxnotebookconfigmgrfactory.cpp notebookconfigmgr/vxnotebookconfigmgrfactory.h
|
|
||||||
notebookmgr.cpp notebookmgr.h
|
|
||||||
pdfviewerconfig.cpp pdfviewerconfig.h
|
|
||||||
quickaccesshelper.cpp quickaccesshelper.h
|
|
||||||
sessionconfig.cpp sessionconfig.h
|
|
||||||
singleinstanceguard.cpp singleinstanceguard.h
|
|
||||||
templatemgr.cpp templatemgr.h
|
|
||||||
texteditorconfig.cpp texteditorconfig.h
|
|
||||||
theme.cpp theme.h
|
|
||||||
thememgr.cpp thememgr.h
|
|
||||||
versioncontroller/dummyversioncontroller.cpp versioncontroller/dummyversioncontroller.h
|
|
||||||
versioncontroller/dummyversioncontrollerfactory.cpp versioncontroller/dummyversioncontrollerfactory.h
|
|
||||||
versioncontroller/iversioncontroller.h
|
|
||||||
versioncontroller/iversioncontrollerfactory.h
|
|
||||||
versioncontroller/versioncontrollerserver.cpp versioncontroller/versioncontrollerserver.h
|
|
||||||
vnotex.cpp vnotex.h
|
|
||||||
webresource.h
|
|
||||||
widgetconfig.cpp widgetconfig.h
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(vnote PRIVATE
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
@ -358,7 +358,7 @@ void Buffer::writeBackupFile()
|
|||||||
|
|
||||||
QString Buffer::generateBackupFileHead() const
|
QString Buffer::generateBackupFileHead() const
|
||||||
{
|
{
|
||||||
return QStringLiteral("vnotex_backup_file %1|").arg(getContentPath());
|
return QString("vnotex_backup_file %1|").arg(getContentPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Buffer::checkBackupFileOfPreviousSession()
|
void Buffer::checkBackupFileOfPreviousSession()
|
||||||
@ -373,7 +373,7 @@ void Buffer::checkBackupFileOfPreviousSession()
|
|||||||
QDir backupDir(backupDirPath);
|
QDir backupDir(backupDirPath);
|
||||||
QStringList backupFiles;
|
QStringList backupFiles;
|
||||||
{
|
{
|
||||||
const QString nameFilter = QStringLiteral("%1*%2").arg(getName(), config.getBackupFileExtension());
|
const QString nameFilter = QString("%1*%2").arg(getName(), config.getBackupFileExtension());
|
||||||
backupFiles = backupDir.entryList(QStringList(nameFilter),
|
backupFiles = backupDir.entryList(QStringList(nameFilter),
|
||||||
QDir::Files | QDir::Hidden | QDir::NoSymLinks | QDir::NoDotAndDotDot);
|
QDir::Files | QDir::Hidden | QDir::NoSymLinks | QDir::NoDotAndDotDot);
|
||||||
}
|
}
|
||||||
|
31
src/core/buffer/buffer.pri
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
SOURCES += \
|
||||||
|
$$PWD/buffer.cpp \
|
||||||
|
$$PWD/bufferprovider.cpp \
|
||||||
|
$$PWD/filebufferprovider.cpp \
|
||||||
|
$$PWD/markdownbuffer.cpp \
|
||||||
|
$$PWD/markdownbufferfactory.cpp \
|
||||||
|
$$PWD/filetypehelper.cpp \
|
||||||
|
$$PWD/mindmapbuffer.cpp \
|
||||||
|
$$PWD/mindmapbufferfactory.cpp \
|
||||||
|
$$PWD/nodebufferprovider.cpp \
|
||||||
|
$$PWD/pdfbuffer.cpp \
|
||||||
|
$$PWD/pdfbufferfactory.cpp \
|
||||||
|
$$PWD/textbuffer.cpp \
|
||||||
|
$$PWD/textbufferfactory.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/bufferprovider.h \
|
||||||
|
$$PWD/buffer.h \
|
||||||
|
$$PWD/filebufferprovider.h \
|
||||||
|
$$PWD/ibufferfactory.h \
|
||||||
|
$$PWD/markdownbuffer.h \
|
||||||
|
$$PWD/markdownbufferfactory.h \
|
||||||
|
$$PWD/filetypehelper.h \
|
||||||
|
$$PWD/mindmapbuffer.h \
|
||||||
|
$$PWD/mindmapbufferfactory.h \
|
||||||
|
$$PWD/nodebufferprovider.h \
|
||||||
|
$$PWD/pdfbuffer.h \
|
||||||
|
$$PWD/pdfbufferfactory.h \
|
||||||
|
$$PWD/textbuffer.h \
|
||||||
|
$$PWD/textbufferfactory.h \
|
||||||
|
$$PWD/urlbasedbufferprovider.h
|
@ -75,7 +75,7 @@ void BufferMgr::open(Node *p_node, const QSharedPointer<FileOpenParameters> &p_p
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!p_node->checkExists()) {
|
if (!p_node->checkExists()) {
|
||||||
auto msg = QStringLiteral("Failed to open node that does not exist (%1)").arg(p_node->fetchAbsolutePath());
|
auto msg = QString("Failed to open node that does not exist (%1)").arg(p_node->fetchAbsolutePath());
|
||||||
qWarning() << msg;
|
qWarning() << msg;
|
||||||
VNoteX::getInst().showStatusMessageShort(msg);
|
VNoteX::getInst().showStatusMessageShort(msg);
|
||||||
return;
|
return;
|
||||||
@ -133,7 +133,7 @@ void BufferMgr::open(const QString &p_filePath, const QSharedPointer<FileOpenPar
|
|||||||
|
|
||||||
QFileInfo finfo(p_filePath);
|
QFileInfo finfo(p_filePath);
|
||||||
if (!finfo.exists()) {
|
if (!finfo.exists()) {
|
||||||
auto msg = QStringLiteral("Failed to open file that does not exist (%1)").arg(p_filePath);
|
auto msg = QString("Failed to open file that does not exist (%1)").arg(p_filePath);
|
||||||
qWarning() << msg;
|
qWarning() << msg;
|
||||||
VNoteX::getInst().showStatusMessageShort(msg);
|
VNoteX::getInst().showStatusMessageShort(msg);
|
||||||
WidgetUtils::openUrlByDesktop(QUrl::fromUserInput(p_filePath));
|
WidgetUtils::openUrlByDesktop(QUrl::fromUserInput(p_filePath));
|
||||||
|
@ -63,14 +63,14 @@ void ClipboardData::fromJson(const QJsonObject &p_jobj)
|
|||||||
|| !p_jobj.contains(c_action)
|
|| !p_jobj.contains(c_action)
|
||||||
|| !p_jobj.contains(c_data)) {
|
|| !p_jobj.contains(c_data)) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("fail to parse ClipboardData from json (%1)").arg(p_jobj.keys().join(',')));
|
QString("fail to parse ClipboardData from json (%1)").arg(p_jobj.keys().join(',')));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto idRet = stringToID(p_jobj[c_instanceId].toString());
|
auto idRet = stringToID(p_jobj[c_instanceId].toString());
|
||||||
if (!idRet.first) {
|
if (!idRet.first) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("fail to parse ClipboardData from json (%1)").arg(p_jobj.keys().join(',')));
|
QString("fail to parse ClipboardData from json (%1)").arg(p_jobj.keys().join(',')));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_instanceId = idRet.second;
|
m_instanceId = idRet.second;
|
||||||
@ -79,7 +79,7 @@ void ClipboardData::fromJson(const QJsonObject &p_jobj)
|
|||||||
m_action = intToAction(act);
|
m_action = intToAction(act);
|
||||||
if (m_action == Action::Invalid) {
|
if (m_action == Action::Invalid) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("fail to parse ClipboardData from json (%1)").arg(p_jobj.keys().join(',')));
|
QString("fail to parse ClipboardData from json (%1)").arg(p_jobj.keys().join(',')));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,11 +191,12 @@ bool ConfigMgr::checkAppConfig()
|
|||||||
|
|
||||||
// Load extra data.
|
// Load extra data.
|
||||||
splash->showMessage("Loading extra resource data");
|
splash->showMessage("Loading extra resource data");
|
||||||
const QString extraRcc("app:vnote_extra.rcc");
|
const QString extraRcc(PathUtils::concatenateFilePath(QCoreApplication::applicationDirPath(),
|
||||||
|
QStringLiteral("vnote_extra.rcc")));
|
||||||
bool ret = QResource::registerResource(extraRcc);
|
bool ret = QResource::registerResource(extraRcc);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
Exception::throwOne(Exception::Type::FailToReadFile,
|
Exception::throwOne(Exception::Type::FailToReadFile,
|
||||||
QStringLiteral("failed to register resource file %1").arg(extraRcc));
|
QString("failed to register resource file %1").arg(extraRcc));
|
||||||
}
|
}
|
||||||
auto cleanup = qScopeGuard([extraRcc]() {
|
auto cleanup = qScopeGuard([extraRcc]() {
|
||||||
QResource::unregisterResource(extraRcc);
|
QResource::unregisterResource(extraRcc);
|
||||||
@ -570,38 +571,6 @@ QString ConfigMgr::getApplicationVersion()
|
|||||||
return appVersion;
|
return appVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigMgr::initAppPrefixPath()
|
|
||||||
{
|
|
||||||
// Support QFile("app:abc.txt").
|
|
||||||
QStringList potential_dirs;
|
|
||||||
auto app_dir_path = QCoreApplication::applicationDirPath();
|
|
||||||
qInfo() << "app prefix path: " << app_dir_path;
|
|
||||||
potential_dirs << app_dir_path;
|
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
|
||||||
QDir localBinDir(app_dir_path);
|
|
||||||
if (localBinDir.exists("../local/bin/vnote")) {
|
|
||||||
auto app_dir_path2 = localBinDir.cleanPath(localBinDir.filePath("../local/share"));
|
|
||||||
qInfo() << "app prefix path: " << app_dir_path2;
|
|
||||||
potential_dirs << app_dir_path2;
|
|
||||||
}
|
|
||||||
if (localBinDir.exists("../share")) {
|
|
||||||
auto app_dir_path3 = localBinDir.cleanPath(localBinDir.filePath("../share"));
|
|
||||||
qInfo() << "app prefix path: " << app_dir_path3;
|
|
||||||
potential_dirs << app_dir_path3;
|
|
||||||
}
|
|
||||||
#elif defined(Q_OS_MACOS)
|
|
||||||
QDir localBinDir(app_dir_path);
|
|
||||||
if (localBinDir.exists("../Resources")) {
|
|
||||||
auto app_dir_path2 = localBinDir.cleanPath(localBinDir.filePath("../Resources"));
|
|
||||||
qInfo() << "app prefix path: " << app_dir_path2;
|
|
||||||
potential_dirs << app_dir_path2;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QDir::setSearchPaths("app", potential_dirs);
|
|
||||||
}
|
|
||||||
|
|
||||||
QJsonValue ConfigMgr::parseAndReadConfig(const QString &p_exp) const
|
QJsonValue ConfigMgr::parseAndReadConfig(const QString &p_exp) const
|
||||||
{
|
{
|
||||||
if (p_exp.startsWith(QStringLiteral("main."))) {
|
if (p_exp.startsWith(QStringLiteral("main."))) {
|
||||||
|
@ -120,8 +120,6 @@ namespace vnotex
|
|||||||
|
|
||||||
static QString getApplicationVersion();
|
static QString getApplicationVersion();
|
||||||
|
|
||||||
static void initAppPrefixPath();
|
|
||||||
|
|
||||||
static void initForUnitTest();
|
static void initForUnitTest();
|
||||||
|
|
||||||
static const QString c_orgName;
|
static const QString c_orgName;
|
||||||
|
76
src/core/core.pri
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
INCLUDEPATH *= $$PWD
|
||||||
|
|
||||||
|
include($$PWD/notebookbackend/notebookbackend.pri)
|
||||||
|
|
||||||
|
include($$PWD/versioncontroller/versioncontroller.pri)
|
||||||
|
|
||||||
|
include($$PWD/notebookconfigmgr/notebookconfigmgr.pri)
|
||||||
|
|
||||||
|
include($$PWD/notebook/notebook.pri)
|
||||||
|
|
||||||
|
include($$PWD/buffer/buffer.pri)
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
$$PWD/buffermgr.cpp \
|
||||||
|
$$PWD/configmgr.cpp \
|
||||||
|
$$PWD/coreconfig.cpp \
|
||||||
|
$$PWD/editorconfig.cpp \
|
||||||
|
$$PWD/externalfile.cpp \
|
||||||
|
$$PWD/file.cpp \
|
||||||
|
$$PWD/global.cpp \
|
||||||
|
$$PWD/historyitem.cpp \
|
||||||
|
$$PWD/historymgr.cpp \
|
||||||
|
$$PWD/htmltemplatehelper.cpp \
|
||||||
|
$$PWD/logger.cpp \
|
||||||
|
$$PWD/mainconfig.cpp \
|
||||||
|
$$PWD/markdowneditorconfig.cpp \
|
||||||
|
$$PWD/mindmapeditorconfig.cpp \
|
||||||
|
$$PWD/pdfviewerconfig.cpp \
|
||||||
|
$$PWD/quickaccesshelper.cpp \
|
||||||
|
$$PWD/singleinstanceguard.cpp \
|
||||||
|
$$PWD/templatemgr.cpp \
|
||||||
|
$$PWD/texteditorconfig.cpp \
|
||||||
|
$$PWD/vnotex.cpp \
|
||||||
|
$$PWD/thememgr.cpp \
|
||||||
|
$$PWD/notebookmgr.cpp \
|
||||||
|
$$PWD/theme.cpp \
|
||||||
|
$$PWD/sessionconfig.cpp \
|
||||||
|
$$PWD/clipboarddata.cpp \
|
||||||
|
$$PWD/widgetconfig.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/buffermgr.h \
|
||||||
|
$$PWD/configmgr.h \
|
||||||
|
$$PWD/coreconfig.h \
|
||||||
|
$$PWD/editorconfig.h \
|
||||||
|
$$PWD/events.h \
|
||||||
|
$$PWD/externalfile.h \
|
||||||
|
$$PWD/file.h \
|
||||||
|
$$PWD/filelocator.h \
|
||||||
|
$$PWD/fileopenparameters.h \
|
||||||
|
$$PWD/historyitem.h \
|
||||||
|
$$PWD/historymgr.h \
|
||||||
|
$$PWD/htmltemplatehelper.h \
|
||||||
|
$$PWD/location.h \
|
||||||
|
$$PWD/logger.h \
|
||||||
|
$$PWD/mainconfig.h \
|
||||||
|
$$PWD/markdowneditorconfig.h \
|
||||||
|
$$PWD/mindmapeditorconfig.h \
|
||||||
|
$$PWD/noncopyable.h \
|
||||||
|
$$PWD/pdfviewerconfig.h \
|
||||||
|
$$PWD/quickaccesshelper.h \
|
||||||
|
$$PWD/singleinstanceguard.h \
|
||||||
|
$$PWD/iconfig.h \
|
||||||
|
$$PWD/templatemgr.h \
|
||||||
|
$$PWD/texteditorconfig.h \
|
||||||
|
$$PWD/vnotex.h \
|
||||||
|
$$PWD/thememgr.h \
|
||||||
|
$$PWD/global.h \
|
||||||
|
$$PWD/namebasedserver.h \
|
||||||
|
$$PWD/exception.h \
|
||||||
|
$$PWD/notebookmgr.h \
|
||||||
|
$$PWD/theme.h \
|
||||||
|
$$PWD/sessionconfig.h \
|
||||||
|
$$PWD/clipboarddata.h \
|
||||||
|
$$PWD/webresource.h \
|
||||||
|
$$PWD/widgetconfig.h
|
@ -47,46 +47,46 @@ namespace vnotex
|
|||||||
{
|
{
|
||||||
switch (p_type) {
|
switch (p_type) {
|
||||||
case Type::InvalidPath:
|
case Type::InvalidPath:
|
||||||
return QStringLiteral("InvalidPath");
|
return QString("InvalidPath");
|
||||||
|
|
||||||
case Type::FailToCreateDir:
|
case Type::FailToCreateDir:
|
||||||
return QStringLiteral("FailToCreateDir");
|
return QString("FailToCreateDir");
|
||||||
|
|
||||||
case Type::FailToWriteFile:
|
case Type::FailToWriteFile:
|
||||||
return QStringLiteral("FailToWriteFile");
|
return QString("FailToWriteFile");
|
||||||
|
|
||||||
case Type::FailToReadFile:
|
case Type::FailToReadFile:
|
||||||
return QStringLiteral("FailToReadFile");
|
return QString("FailToReadFile");
|
||||||
|
|
||||||
case Type::FailToRenameFile:
|
case Type::FailToRenameFile:
|
||||||
return QStringLiteral("FailToRenameFile");
|
return QString("FailToRenameFile");
|
||||||
|
|
||||||
case Type::FailToCopyFile:
|
case Type::FailToCopyFile:
|
||||||
return QStringLiteral("FailToCopyFile");
|
return QString("FailToCopyFile");
|
||||||
|
|
||||||
case Type::FailToCopyDir:
|
case Type::FailToCopyDir:
|
||||||
return QStringLiteral("FailToCopyDir");
|
return QString("FailToCopyDir");
|
||||||
|
|
||||||
case Type::FailToRemoveFile:
|
case Type::FailToRemoveFile:
|
||||||
return QStringLiteral("FailToRemoveFile");
|
return QString("FailToRemoveFile");
|
||||||
|
|
||||||
case Type::FailToRemoveDir:
|
case Type::FailToRemoveDir:
|
||||||
return QStringLiteral("FailToRemoveDir");
|
return QString("FailToRemoveDir");
|
||||||
|
|
||||||
case Type::FileMissingOnDisk:
|
case Type::FileMissingOnDisk:
|
||||||
return QStringLiteral("FileMissingOnDisk");
|
return QString("FileMissingOnDisk");
|
||||||
|
|
||||||
case Type::EssentialFileMissing:
|
case Type::EssentialFileMissing:
|
||||||
return QStringLiteral("EssentialFileMissing");
|
return QString("EssentialFileMissing");
|
||||||
|
|
||||||
case Type::FileExistsOnCreate:
|
case Type::FileExistsOnCreate:
|
||||||
return QStringLiteral("FileExistsOnCreate");
|
return QString("FileExistsOnCreate");
|
||||||
|
|
||||||
case Type::DirExistsOnCreate:
|
case Type::DirExistsOnCreate:
|
||||||
return QStringLiteral("DirExistsOnCreate");
|
return QString("DirExistsOnCreate");
|
||||||
|
|
||||||
case Type::InvalidArgument:
|
case Type::InvalidArgument:
|
||||||
return QStringLiteral("InvalidArgument");
|
return QString("InvalidArgument");
|
||||||
}
|
}
|
||||||
|
|
||||||
return QString::number(static_cast<int>(p_type));
|
return QString::number(static_cast<int>(p_type));
|
||||||
|
@ -25,27 +25,27 @@ HtmlTemplateHelper::Template HtmlTemplateHelper::s_mindMapEditorTemplate;
|
|||||||
QString MarkdownWebGlobalOptions::toJavascriptObject() const
|
QString MarkdownWebGlobalOptions::toJavascriptObject() const
|
||||||
{
|
{
|
||||||
return QStringLiteral("window.vxOptions = {\n")
|
return QStringLiteral("window.vxOptions = {\n")
|
||||||
+ QStringLiteral("webPlantUml: %1,\n").arg(Utils::boolToString(m_webPlantUml))
|
+ QString("webPlantUml: %1,\n").arg(Utils::boolToString(m_webPlantUml))
|
||||||
+ QStringLiteral("plantUmlWebService: '%1',\n").arg(m_plantUmlWebService)
|
+ QString("plantUmlWebService: '%1',\n").arg(m_plantUmlWebService)
|
||||||
+ QStringLiteral("webGraphviz: %1,\n").arg(Utils::boolToString(m_webGraphviz))
|
+ QString("webGraphviz: %1,\n").arg(Utils::boolToString(m_webGraphviz))
|
||||||
+ QStringLiteral("mathJaxScript: '%1',\n").arg(m_mathJaxScript)
|
+ QString("mathJaxScript: '%1',\n").arg(m_mathJaxScript)
|
||||||
+ QStringLiteral("constrainImageWidthEnabled: %1,\n").arg(Utils::boolToString(m_constrainImageWidthEnabled))
|
+ QString("constrainImageWidthEnabled: %1,\n").arg(Utils::boolToString(m_constrainImageWidthEnabled))
|
||||||
+ QStringLiteral("imageAlignCenterEnabled: %1,\n").arg(Utils::boolToString(m_imageAlignCenterEnabled))
|
+ QString("imageAlignCenterEnabled: %1,\n").arg(Utils::boolToString(m_imageAlignCenterEnabled))
|
||||||
+ QStringLiteral("protectFromXss: %1,\n").arg(Utils::boolToString(m_protectFromXss))
|
+ QString("protectFromXss: %1,\n").arg(Utils::boolToString(m_protectFromXss))
|
||||||
+ QStringLiteral("htmlTagEnabled: %1,\n").arg(Utils::boolToString(m_htmlTagEnabled))
|
+ QString("htmlTagEnabled: %1,\n").arg(Utils::boolToString(m_htmlTagEnabled))
|
||||||
+ QStringLiteral("autoBreakEnabled: %1,\n").arg(Utils::boolToString(m_autoBreakEnabled))
|
+ QString("autoBreakEnabled: %1,\n").arg(Utils::boolToString(m_autoBreakEnabled))
|
||||||
+ QStringLiteral("linkifyEnabled: %1,\n").arg(Utils::boolToString(m_linkifyEnabled))
|
+ QString("linkifyEnabled: %1,\n").arg(Utils::boolToString(m_linkifyEnabled))
|
||||||
+ QStringLiteral("indentFirstLineEnabled: %1,\n").arg(Utils::boolToString(m_indentFirstLineEnabled))
|
+ QString("indentFirstLineEnabled: %1,\n").arg(Utils::boolToString(m_indentFirstLineEnabled))
|
||||||
+ QStringLiteral("codeBlockLineNumberEnabled: %1,\n").arg(Utils::boolToString(m_codeBlockLineNumberEnabled))
|
+ QString("codeBlockLineNumberEnabled: %1,\n").arg(Utils::boolToString(m_codeBlockLineNumberEnabled))
|
||||||
+ QStringLiteral("sectionNumberEnabled: %1,\n").arg(Utils::boolToString(m_sectionNumberEnabled))
|
+ QString("sectionNumberEnabled: %1,\n").arg(Utils::boolToString(m_sectionNumberEnabled))
|
||||||
+ QStringLiteral("transparentBackgroundEnabled: %1,\n").arg(Utils::boolToString(m_transparentBackgroundEnabled))
|
+ QString("transparentBackgroundEnabled: %1,\n").arg(Utils::boolToString(m_transparentBackgroundEnabled))
|
||||||
+ QStringLiteral("scrollable: %1,\n").arg(Utils::boolToString(m_scrollable))
|
+ QString("scrollable: %1,\n").arg(Utils::boolToString(m_scrollable))
|
||||||
+ QStringLiteral("bodyWidth: %1,\n").arg(m_bodyWidth)
|
+ QString("bodyWidth: %1,\n").arg(m_bodyWidth)
|
||||||
+ QStringLiteral("bodyHeight: %1,\n").arg(m_bodyHeight)
|
+ QString("bodyHeight: %1,\n").arg(m_bodyHeight)
|
||||||
+ QStringLiteral("transformSvgToPngEnabled: %1,\n").arg(Utils::boolToString(m_transformSvgToPngEnabled))
|
+ QString("transformSvgToPngEnabled: %1,\n").arg(Utils::boolToString(m_transformSvgToPngEnabled))
|
||||||
+ QStringLiteral("mathJaxScale: %1,\n").arg(m_mathJaxScale)
|
+ QString("mathJaxScale: %1,\n").arg(m_mathJaxScale)
|
||||||
+ QStringLiteral("removeCodeToolBarEnabled: %1,\n").arg(Utils::boolToString(m_removeCodeToolBarEnabled))
|
+ QString("removeCodeToolBarEnabled: %1,\n").arg(Utils::boolToString(m_removeCodeToolBarEnabled))
|
||||||
+ QStringLiteral("sectionNumberBaseLevel: %1\n").arg(m_sectionNumberBaseLevel)
|
+ QString("sectionNumberBaseLevel: %1\n").arg(m_sectionNumberBaseLevel)
|
||||||
+ QStringLiteral("}");
|
+ QStringLiteral("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ static QString fillStyleTag(const QString &p_styleFile)
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
auto url = PathUtils::pathToUrl(p_styleFile);
|
auto url = PathUtils::pathToUrl(p_styleFile);
|
||||||
return QStringLiteral("<link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").arg(url.toString());
|
return QString("<link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").arg(url.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString fillScriptTag(const QString &p_scriptFile)
|
static QString fillScriptTag(const QString &p_scriptFile)
|
||||||
@ -92,7 +92,7 @@ static QString fillScriptTag(const QString &p_scriptFile)
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
auto url = PathUtils::pathToUrl(p_scriptFile);
|
auto url = PathUtils::pathToUrl(p_scriptFile);
|
||||||
return QStringLiteral("<script type=\"text/javascript\" src=\"%1\"></script>\n").arg(url.toString());
|
return QString("<script type=\"text/javascript\" src=\"%1\"></script>\n").arg(url.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fillThemeStyles(QString &p_template, const QString &p_webStyleSheetFile, const QString &p_highlightStyleSheetFile)
|
static void fillThemeStyles(QString &p_template, const QString &p_webStyleSheetFile, const QString &p_highlightStyleSheetFile)
|
||||||
@ -300,7 +300,7 @@ void HtmlTemplateHelper::fillTitle(QString &p_template, const QString &p_title)
|
|||||||
{
|
{
|
||||||
if (!p_title.isEmpty()) {
|
if (!p_title.isEmpty()) {
|
||||||
p_template.replace("<!-- VX_TITLE_PLACEHOLDER -->",
|
p_template.replace("<!-- VX_TITLE_PLACEHOLDER -->",
|
||||||
QStringLiteral("<title>%1</title>").arg(HtmlUtils::escapeHtml(p_title)));
|
QString("<title>%1</title>").arg(HtmlUtils::escapeHtml(p_title)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QBitArray>
|
#include <QBitArray>
|
||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
#include <QIODevice>
|
|
||||||
|
|
||||||
namespace vnotex
|
namespace vnotex
|
||||||
{
|
{
|
||||||
|
@ -8,27 +8,19 @@ using namespace vnotex;
|
|||||||
|
|
||||||
QFile Logger::s_file;
|
QFile Logger::s_file;
|
||||||
|
|
||||||
bool Logger::s_verbose = false;
|
bool Logger::s_debugLog = false;
|
||||||
|
|
||||||
bool Logger::s_logToStderr = false;
|
void Logger::init(bool p_debugLog)
|
||||||
|
|
||||||
void Logger::init(bool p_verbose, bool p_logToStderr)
|
|
||||||
{
|
{
|
||||||
s_verbose = p_verbose;
|
s_debugLog = p_debugLog;
|
||||||
s_logToStderr = p_logToStderr;
|
|
||||||
|
|
||||||
#if defined(QT_NO_DEBUG)
|
#if defined(QT_NO_DEBUG)
|
||||||
if (!s_logToStderr) {
|
s_file.setFileName(ConfigMgr::getInst().getLogFile());
|
||||||
s_file.setFileName(ConfigMgr::getInst().getLogFile());
|
if (s_file.size() >= 5 * 1024 * 1024) {
|
||||||
if (s_file.size() >= 5 * 1024 * 1024) {
|
s_file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||||
s_file.open(QIODevice::WriteOnly | QIODevice::Text);
|
} else {
|
||||||
} else {
|
s_file.open(QIODevice::Append | QIODevice::Text);
|
||||||
s_file.open(QIODevice::Append | QIODevice::Text);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
// Always log to stderr in debug.
|
|
||||||
s_logToStderr = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
qInstallMessageHandler(Logger::log);
|
qInstallMessageHandler(Logger::log);
|
||||||
@ -52,7 +44,7 @@ static QString getFileName(const char *p_file)
|
|||||||
void Logger::log(QtMsgType p_type, const QMessageLogContext &p_context, const QString &p_msg)
|
void Logger::log(QtMsgType p_type, const QMessageLogContext &p_context, const QString &p_msg)
|
||||||
{
|
{
|
||||||
#if defined(QT_NO_DEBUG)
|
#if defined(QT_NO_DEBUG)
|
||||||
if (!s_verbose && p_type == QtDebugMsg) {
|
if (!s_debugLog && p_type == QtDebugMsg) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -84,43 +76,43 @@ void Logger::log(QtMsgType p_type, const QMessageLogContext &p_context, const QS
|
|||||||
|
|
||||||
QString fileName = getFileName(p_context.file);
|
QString fileName = getFileName(p_context.file);
|
||||||
|
|
||||||
if (!s_logToStderr) {
|
#if defined(QT_NO_DEBUG)
|
||||||
QTextStream stream(&s_file);
|
QTextStream stream(&s_file);
|
||||||
stream << header << (QStringLiteral("(%1:%2) ").arg(fileName).arg(p_context.line))
|
stream << header << (QString("(%1:%2) ").arg(fileName).arg(p_context.line))
|
||||||
<< localMsg << "\n";
|
<< localMsg << "\n";
|
||||||
|
|
||||||
if (p_type == QtFatalMsg) {
|
if (p_type == QtFatalMsg) {
|
||||||
s_file.close();
|
s_file.close();
|
||||||
abort();
|
abort();
|
||||||
}
|
|
||||||
} else {
|
|
||||||
std::string fileStr = fileName.toStdString();
|
|
||||||
const char *file = fileStr.c_str();
|
|
||||||
|
|
||||||
switch (p_type) {
|
|
||||||
case QtDebugMsg:
|
|
||||||
fprintf(stderr, "%s(%s:%u) %s\n",
|
|
||||||
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
|
||||||
break;
|
|
||||||
case QtInfoMsg:
|
|
||||||
fprintf(stderr, "%s(%s:%u) %s\n",
|
|
||||||
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
|
||||||
break;
|
|
||||||
case QtWarningMsg:
|
|
||||||
fprintf(stderr, "%s(%s:%u) %s\n",
|
|
||||||
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
|
||||||
break;
|
|
||||||
case QtCriticalMsg:
|
|
||||||
fprintf(stderr, "%s(%s:%u) %s\n",
|
|
||||||
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
|
||||||
break;
|
|
||||||
case QtFatalMsg:
|
|
||||||
fprintf(stderr, "%s(%s:%u) %s\n",
|
|
||||||
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
|
||||||
abort();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
fflush(stderr);
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
std::string fileStr = fileName.toStdString();
|
||||||
|
const char *file = fileStr.c_str();
|
||||||
|
|
||||||
|
switch (p_type) {
|
||||||
|
case QtDebugMsg:
|
||||||
|
fprintf(stderr, "%s(%s:%u) %s\n",
|
||||||
|
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
||||||
|
break;
|
||||||
|
case QtInfoMsg:
|
||||||
|
fprintf(stderr, "%s(%s:%u) %s\n",
|
||||||
|
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
||||||
|
break;
|
||||||
|
case QtWarningMsg:
|
||||||
|
fprintf(stderr, "%s(%s:%u) %s\n",
|
||||||
|
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
||||||
|
break;
|
||||||
|
case QtCriticalMsg:
|
||||||
|
fprintf(stderr, "%s(%s:%u) %s\n",
|
||||||
|
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
||||||
|
break;
|
||||||
|
case QtFatalMsg:
|
||||||
|
fprintf(stderr, "%s(%s:%u) %s\n",
|
||||||
|
header.toStdString().c_str(), file, p_context.line, localMsg.constData());
|
||||||
|
abort();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
fflush(stderr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -13,16 +13,14 @@ namespace vnotex
|
|||||||
public:
|
public:
|
||||||
Logger() = delete;
|
Logger() = delete;
|
||||||
|
|
||||||
static void init(bool p_verbose, bool p_logToStderr);
|
static void init(bool p_debugLog);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void log(QtMsgType p_type, const QMessageLogContext &p_context, const QString &p_msg);
|
static void log(QtMsgType p_type, const QMessageLogContext &p_context, const QString &p_msg);
|
||||||
|
|
||||||
static QFile s_file;
|
static QFile s_file;
|
||||||
|
|
||||||
static bool s_verbose;
|
static bool s_debugLog;
|
||||||
|
|
||||||
static bool s_logToStderr;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ namespace vnotex
|
|||||||
bool m_fetchImagesInParseAndPaste = true;
|
bool m_fetchImagesInParseAndPaste = true;
|
||||||
|
|
||||||
// Whether protect from Cross-Site Scripting.
|
// Whether protect from Cross-Site Scripting.
|
||||||
bool m_protectFromXss = true;
|
bool m_protectFromXss = false;
|
||||||
|
|
||||||
// Whether allow HTML tag in Markdown source.
|
// Whether allow HTML tag in Markdown source.
|
||||||
bool m_htmlTagEnabled = true;
|
bool m_htmlTagEnabled = true;
|
||||||
|
@ -93,7 +93,7 @@ void BundleNotebook::remove()
|
|||||||
|
|
||||||
// Remove notebook root folder if it is empty.
|
// Remove notebook root folder if it is empty.
|
||||||
if (!FileUtils::removeDirIfEmpty(getRootFolderAbsolutePath())) {
|
if (!FileUtils::removeDirIfEmpty(getRootFolderAbsolutePath())) {
|
||||||
qInfo() << QStringLiteral("root folder of notebook (%1) is not empty and needs manual clean up")
|
qInfo() << QString("root folder of notebook (%1) is not empty and needs manual clean up")
|
||||||
.arg(getRootFolderAbsolutePath());
|
.arg(getRootFolderAbsolutePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ static void checkRootFolderForNewNotebook(const NotebookParameters &p_paras)
|
|||||||
qCritical() << msg;
|
qCritical() << msg;
|
||||||
throw Exception(Exception::Type::InvalidPath, msg);
|
throw Exception(Exception::Type::InvalidPath, msg);
|
||||||
} else if (p_paras.m_ensureEmptyRootFolder && !PathUtils::isEmptyDir(p_paras.m_rootFolderPath)) {
|
} else if (p_paras.m_ensureEmptyRootFolder && !PathUtils::isEmptyDir(p_paras.m_rootFolderPath)) {
|
||||||
QString msg = QStringLiteral("local root folder must be empty: %1 (%2)")
|
QString msg = QString("local root folder must be empty: %1 (%2)")
|
||||||
.arg(p_paras.m_rootFolderPath, PathUtils::absolutePath(p_paras.m_rootFolderPath));
|
.arg(p_paras.m_rootFolderPath, PathUtils::absolutePath(p_paras.m_rootFolderPath));
|
||||||
qCritical() << msg;
|
qCritical() << msg;
|
||||||
throw Exception(Exception::Type::InvalidPath, msg);
|
throw Exception(Exception::Type::InvalidPath, msg);
|
||||||
@ -88,7 +88,7 @@ void BundleNotebookFactory::checkParameters(const NotebookParameters &p_paras) c
|
|||||||
auto configMgr = dynamic_cast<BundleNotebookConfigMgr *>(p_paras.m_notebookConfigMgr.data());
|
auto configMgr = dynamic_cast<BundleNotebookConfigMgr *>(p_paras.m_notebookConfigMgr.data());
|
||||||
if (!configMgr) {
|
if (!configMgr) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("Invalid notebook configuration manager"));
|
QString("Invalid notebook configuration manager"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include <core/exception.h>
|
#include <core/exception.h>
|
||||||
#include "notebook.h"
|
#include "notebook.h"
|
||||||
#include "nodeparameters.h"
|
#include "nodeparameters.h"
|
||||||
#include <QRandomGenerator>
|
|
||||||
|
|
||||||
using namespace vnotex;
|
using namespace vnotex;
|
||||||
|
|
||||||
@ -484,7 +483,7 @@ QList<QSharedPointer<File>> Node::collectFiles()
|
|||||||
|
|
||||||
ID Node::generateSignature()
|
ID Node::generateSignature()
|
||||||
{
|
{
|
||||||
return static_cast<ID>(QDateTime::currentDateTime().toSecsSinceEpoch() + (static_cast<qulonglong>(QRandomGenerator::global()->generate()) << 32));
|
return static_cast<ID>(QDateTime::currentDateTime().toSecsSinceEpoch() + (static_cast<qulonglong>(qrand()) << 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node::checkSignature()
|
void Node::checkSignature()
|
||||||
|
@ -254,7 +254,7 @@ QSharedPointer<Node> Notebook::copyNodeAsChildOf(const QSharedPointer<Node> &p_s
|
|||||||
|
|
||||||
if (Node::isAncestor(p_src.data(), p_dest)) {
|
if (Node::isAncestor(p_src.data(), p_dest)) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("source (%1) is the ancestor of destination (%2)")
|
QString("source (%1) is the ancestor of destination (%2)")
|
||||||
.arg(p_src->fetchPath(), p_dest->fetchPath()));
|
.arg(p_src->fetchPath(), p_dest->fetchPath()));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
30
src/core/notebook/notebook.pri
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
SOURCES += \
|
||||||
|
$$PWD/externalnode.cpp \
|
||||||
|
$$PWD/nodeparameters.cpp \
|
||||||
|
$$PWD/notebook.cpp \
|
||||||
|
$$PWD/bundlenotebookfactory.cpp \
|
||||||
|
$$PWD/notebookdatabaseaccess.cpp \
|
||||||
|
$$PWD/notebookparameters.cpp \
|
||||||
|
$$PWD/bundlenotebook.cpp \
|
||||||
|
$$PWD/node.cpp \
|
||||||
|
$$PWD/notebooktagmgr.cpp \
|
||||||
|
$$PWD/tag.cpp \
|
||||||
|
$$PWD/vxnode.cpp \
|
||||||
|
$$PWD/vxnodefile.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/externalnode.h \
|
||||||
|
$$PWD/historyi.h \
|
||||||
|
$$PWD/nodeparameters.h \
|
||||||
|
$$PWD/notebook.h \
|
||||||
|
$$PWD/inotebookfactory.h \
|
||||||
|
$$PWD/bundlenotebookfactory.h \
|
||||||
|
$$PWD/notebookdatabaseaccess.h \
|
||||||
|
$$PWD/notebookparameters.h \
|
||||||
|
$$PWD/bundlenotebook.h \
|
||||||
|
$$PWD/node.h \
|
||||||
|
$$PWD/notebooktagmgr.h \
|
||||||
|
$$PWD/tag.h \
|
||||||
|
$$PWD/tagi.h \
|
||||||
|
$$PWD/vxnode.h \
|
||||||
|
$$PWD/vxnodefile.h
|
@ -30,7 +30,7 @@ bool NotebookDatabaseAccess::open()
|
|||||||
auto db = QSqlDatabase::addDatabase(QStringLiteral("QSQLITE"), m_connectionName);
|
auto db = QSqlDatabase::addDatabase(QStringLiteral("QSQLITE"), m_connectionName);
|
||||||
db.setDatabaseName(m_databaseFile);
|
db.setDatabaseName(m_databaseFile);
|
||||||
if (!db.open()) {
|
if (!db.open()) {
|
||||||
qWarning() << QStringLiteral("failed to open notebook database (%1) (%2)").arg(m_databaseFile, db.lastError().text());
|
qWarning() << QString("failed to open notebook database (%1) (%2)").arg(m_databaseFile, db.lastError().text());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,35 +71,35 @@ void NotebookDatabaseAccess::setupTables(QSqlDatabase &p_db, int p_configVersion
|
|||||||
|
|
||||||
if (m_fresh) {
|
if (m_fresh) {
|
||||||
// Node.
|
// Node.
|
||||||
bool ret = query.exec(QStringLiteral("CREATE TABLE %1 (\n"
|
bool ret = query.exec(QString("CREATE TABLE %1 (\n"
|
||||||
" id INTEGER PRIMARY KEY,\n"
|
" id INTEGER PRIMARY KEY,\n"
|
||||||
" name TEXT NOT NULL,\n"
|
" name TEXT NOT NULL,\n"
|
||||||
" signature INTEGER NOT NULL,\n"
|
" signature INTEGER NOT NULL,\n"
|
||||||
" parent_id INTEGER NULL REFERENCES %1(id) ON DELETE CASCADE ON UPDATE CASCADE)\n").arg(c_nodeTableName));
|
" parent_id INTEGER NULL REFERENCES %1(id) ON DELETE CASCADE ON UPDATE CASCADE)\n").arg(c_nodeTableName));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
qWarning() << QStringLiteral("failed to create database table (%1) (%2)").arg(c_nodeTableName, query.lastError().text());
|
qWarning() << QString("failed to create database table (%1) (%2)").arg(c_nodeTableName, query.lastError().text());
|
||||||
m_valid = false;
|
m_valid = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tag.
|
// Tag.
|
||||||
ret = query.exec(QStringLiteral("CREATE TABLE %1 (\n"
|
ret = query.exec(QString("CREATE TABLE %1 (\n"
|
||||||
" name TEXT PRIMARY KEY,\n"
|
" name TEXT PRIMARY KEY,\n"
|
||||||
" parent_name TEXT NULL REFERENCES %1(name) ON DELETE CASCADE ON UPDATE CASCADE) WITHOUT ROWID\n").arg(c_tagTableName));
|
" parent_name TEXT NULL REFERENCES %1(name) ON DELETE CASCADE ON UPDATE CASCADE) WITHOUT ROWID\n").arg(c_tagTableName));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
qWarning() << QStringLiteral("failed to create database table (%1) (%2)").arg(c_tagTableName, query.lastError().text());
|
qWarning() << QString("failed to create database table (%1) (%2)").arg(c_tagTableName, query.lastError().text());
|
||||||
m_valid = false;
|
m_valid = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Node_Tag.
|
// Node_Tag.
|
||||||
ret = query.exec(QStringLiteral("CREATE TABLE %1 (\n"
|
ret = query.exec(QString("CREATE TABLE %1 (\n"
|
||||||
" node_id INTEGER REFERENCES %2(id) ON DELETE CASCADE ON UPDATE CASCADE,\n"
|
" node_id INTEGER REFERENCES %2(id) ON DELETE CASCADE ON UPDATE CASCADE,\n"
|
||||||
" tag_name TEXT REFERENCES %3(name) ON DELETE CASCADE ON UPDATE CASCADE)\n").arg(c_nodeTagTableName,
|
" tag_name TEXT REFERENCES %3(name) ON DELETE CASCADE ON UPDATE CASCADE)\n").arg(c_nodeTagTableName,
|
||||||
c_nodeTableName,
|
c_nodeTableName,
|
||||||
c_tagTableName));
|
c_tagTableName));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
qWarning() << QStringLiteral("failed to create database table (%1) (%2)").arg(c_nodeTagTableName, query.lastError().text());
|
qWarning() << QString("failed to create database table (%1) (%2)").arg(c_nodeTagTableName, query.lastError().text());
|
||||||
m_valid = false;
|
m_valid = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ bool NotebookDatabaseAccess::addNode(Node *p_node, bool p_ignoreId)
|
|||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
if (p_ignoreId) {
|
if (p_ignoreId) {
|
||||||
query.prepare(QStringLiteral("INSERT INTO %1 (name, signature, parent_id)\n"
|
query.prepare(QString("INSERT INTO %1 (name, signature, parent_id)\n"
|
||||||
" VALUES (:name, :signature, :parent_id)").arg(c_nodeTableName));
|
" VALUES (:name, :signature, :parent_id)").arg(c_nodeTableName));
|
||||||
query.bindValue(":name", p_node->getName());
|
query.bindValue(":name", p_node->getName());
|
||||||
query.bindValue(":signature", p_node->getSignature());
|
query.bindValue(":signature", p_node->getSignature());
|
||||||
@ -170,10 +170,10 @@ bool NotebookDatabaseAccess::addNode(Node *p_node, bool p_ignoreId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (useNewId) {
|
if (useNewId) {
|
||||||
query.prepare(QStringLiteral("INSERT INTO %1 (name, signature, parent_id)\n"
|
query.prepare(QString("INSERT INTO %1 (name, signature, parent_id)\n"
|
||||||
" VALUES (:name, :signature, :parent_id)").arg(c_nodeTableName));
|
" VALUES (:name, :signature, :parent_id)").arg(c_nodeTableName));
|
||||||
} else {
|
} else {
|
||||||
query.prepare(QStringLiteral("INSERT INTO %1 (id, name, signature, parent_id)\n"
|
query.prepare(QString("INSERT INTO %1 (id, name, signature, parent_id)\n"
|
||||||
" VALUES (:id, :name, :signature, :parent_id)").arg(c_nodeTableName));
|
" VALUES (:id, :name, :signature, :parent_id)").arg(c_nodeTableName));
|
||||||
query.bindValue(":id", p_node->getId());
|
query.bindValue(":id", p_node->getId());
|
||||||
}
|
}
|
||||||
@ -212,7 +212,7 @@ QSharedPointer<NotebookDatabaseAccess::NodeRecord> NotebookDatabaseAccess::query
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("SELECT id, name, signature, parent_id FROM %1 WHERE id = :id").arg(c_nodeTableName));
|
query.prepare(QString("SELECT id, name, signature, parent_id FROM %1 WHERE id = :id").arg(c_nodeTableName));
|
||||||
query.bindValue(":id", p_id);
|
query.bindValue(":id", p_id);
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
qWarning() << "failed to query node" << query.executedQuery() << query.lastError().text();
|
qWarning() << "failed to query node" << query.executedQuery() << query.lastError().text();
|
||||||
@ -264,7 +264,7 @@ QStringList NotebookDatabaseAccess::queryNodeParentPath(ID p_id)
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("WITH RECURSIVE cte_parents(id, name, parent_id) AS (\n"
|
query.prepare(QString("WITH RECURSIVE cte_parents(id, name, parent_id) AS (\n"
|
||||||
" SELECT node.id, node.name, node.parent_id\n"
|
" SELECT node.id, node.name, node.parent_id\n"
|
||||||
" FROM %1 node\n"
|
" FROM %1 node\n"
|
||||||
" WHERE node.id = :id\n"
|
" WHERE node.id = :id\n"
|
||||||
@ -315,7 +315,7 @@ bool NotebookDatabaseAccess::updateNode(const Node *p_node)
|
|||||||
|
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("UPDATE %1\n"
|
query.prepare(QString("UPDATE %1\n"
|
||||||
"SET name = :name,\n"
|
"SET name = :name,\n"
|
||||||
" signature = :signature,\n"
|
" signature = :signature,\n"
|
||||||
" parent_id = :parent_id\n"
|
" parent_id = :parent_id\n"
|
||||||
@ -367,7 +367,7 @@ bool NotebookDatabaseAccess::removeNode(ID p_id)
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("DELETE FROM %1\n"
|
query.prepare(QString("DELETE FROM %1\n"
|
||||||
"WHERE id = :id").arg(c_nodeTableName));
|
"WHERE id = :id").arg(c_nodeTableName));
|
||||||
query.bindValue(":id", p_id);
|
query.bindValue(":id", p_id);
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
@ -455,7 +455,7 @@ bool NotebookDatabaseAccess::addTag(const QString &p_name, const QString &p_pare
|
|||||||
|
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("INSERT INTO %1 (name, parent_name)\n"
|
query.prepare(QString("INSERT INTO %1 (name, parent_name)\n"
|
||||||
" VALUES (:name, :parent_name)").arg(c_tagTableName));
|
" VALUES (:name, :parent_name)").arg(c_tagTableName));
|
||||||
query.bindValue(":name", p_name);
|
query.bindValue(":name", p_name);
|
||||||
query.bindValue(":parent_name", p_parentName.isEmpty() ? QVariant() : p_parentName);
|
query.bindValue(":parent_name", p_parentName.isEmpty() ? QVariant() : p_parentName);
|
||||||
@ -473,7 +473,7 @@ QSharedPointer<NotebookDatabaseAccess::TagRecord> NotebookDatabaseAccess::queryT
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("SELECT name, parent_name FROM %1 WHERE name = :name").arg(c_tagTableName));
|
query.prepare(QString("SELECT name, parent_name FROM %1 WHERE name = :name").arg(c_tagTableName));
|
||||||
query.bindValue(":name", p_name);
|
query.bindValue(":name", p_name);
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
qWarning() << "failed to query tag" << query.executedQuery() << query.lastError().text();
|
qWarning() << "failed to query tag" << query.executedQuery() << query.lastError().text();
|
||||||
@ -494,7 +494,7 @@ bool NotebookDatabaseAccess::updateTagParent(const QString &p_name, const QStrin
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("UPDATE %1\n"
|
query.prepare(QString("UPDATE %1\n"
|
||||||
"SET parent_name = :parent_name\n"
|
"SET parent_name = :parent_name\n"
|
||||||
"WHERE name = :name").arg(c_tagTableName));
|
"WHERE name = :name").arg(c_tagTableName));
|
||||||
query.bindValue(":name", p_name);
|
query.bindValue(":name", p_name);
|
||||||
@ -518,7 +518,7 @@ bool NotebookDatabaseAccess::renameTag(const QString &p_name, const QString &p_n
|
|||||||
|
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("UPDATE %1\n"
|
query.prepare(QString("UPDATE %1\n"
|
||||||
"SET name = :new_name\n"
|
"SET name = :new_name\n"
|
||||||
"WHERE name = :name").arg(c_tagTableName));
|
"WHERE name = :name").arg(c_tagTableName));
|
||||||
query.bindValue(":name", p_name);
|
query.bindValue(":name", p_name);
|
||||||
@ -537,7 +537,7 @@ bool NotebookDatabaseAccess::removeTag(const QString &p_name)
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("DELETE FROM %1\n"
|
query.prepare(QString("DELETE FROM %1\n"
|
||||||
"WHERE name = :name").arg(c_tagTableName));
|
"WHERE name = :name").arg(c_tagTableName));
|
||||||
query.bindValue(":name", p_name);
|
query.bindValue(":name", p_name);
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
@ -560,12 +560,7 @@ bool NotebookDatabaseAccess::updateNodeTags(Node *p_node)
|
|||||||
const auto &nodeTags = p_node->getTags();
|
const auto &nodeTags = p_node->getTags();
|
||||||
|
|
||||||
{
|
{
|
||||||
QStringList tagsList = queryNodeTags(p_node->getId());
|
const auto tags = QSet<QString>::fromList(queryNodeTags(p_node->getId()));
|
||||||
QSet<QString> tags;
|
|
||||||
for (const auto &s : tagsList)
|
|
||||||
{
|
|
||||||
tags.insert(s);
|
|
||||||
}
|
|
||||||
if (tags.isEmpty() && nodeTags.isEmpty()) {
|
if (tags.isEmpty() && nodeTags.isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -603,7 +598,7 @@ QStringList NotebookDatabaseAccess::queryNodeTags(ID p_id)
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("SELECT tag_name FROM %1 WHERE node_id = :node_id").arg(c_nodeTagTableName));
|
query.prepare(QString("SELECT tag_name FROM %1 WHERE node_id = :node_id").arg(c_nodeTagTableName));
|
||||||
query.bindValue(":node_id", p_id);
|
query.bindValue(":node_id", p_id);
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
qWarning() << "failed to query node's tags" << query.executedQuery() << query.lastError().text();
|
qWarning() << "failed to query node's tags" << query.executedQuery() << query.lastError().text();
|
||||||
@ -621,7 +616,7 @@ bool NotebookDatabaseAccess::removeNodeTags(ID p_id)
|
|||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("DELETE FROM %1\n"
|
query.prepare(QString("DELETE FROM %1\n"
|
||||||
"WHERE node_id = :node_id").arg(c_nodeTagTableName));
|
"WHERE node_id = :node_id").arg(c_nodeTagTableName));
|
||||||
query.bindValue(":node_id", p_id);
|
query.bindValue(":node_id", p_id);
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
@ -641,7 +636,7 @@ bool NotebookDatabaseAccess::addNodeTags(ID p_id, const QStringList &p_tags)
|
|||||||
|
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("INSERT INTO %1 (node_id, tag_name)\n"
|
query.prepare(QString("INSERT INTO %1 (node_id, tag_name)\n"
|
||||||
" VALUES (?, ?)").arg(c_nodeTagTableName));
|
" VALUES (?, ?)").arg(c_nodeTagTableName));
|
||||||
|
|
||||||
QVariantList ids;
|
QVariantList ids;
|
||||||
@ -668,7 +663,7 @@ QList<ID> NotebookDatabaseAccess::queryTagNodes(const QString &p_tag)
|
|||||||
QList<ID> nodes;
|
QList<ID> nodes;
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("SELECT node_id FROM %1 WHERE tag_name = :tag_name").arg(c_nodeTagTableName));
|
query.prepare(QString("SELECT node_id FROM %1 WHERE tag_name = :tag_name").arg(c_nodeTagTableName));
|
||||||
query.bindValue(":tag_name", p_tag);
|
query.bindValue(":tag_name", p_tag);
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
qWarning() << "failed to query nodes of tag" << query.executedQuery() << query.lastError().text();
|
qWarning() << "failed to query nodes of tag" << query.executedQuery() << query.lastError().text();
|
||||||
@ -696,14 +691,14 @@ QList<ID> NotebookDatabaseAccess::queryTagNodesRecursive(const QString &p_tag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return allIds.values();
|
return allIds.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList NotebookDatabaseAccess::queryTagAndChildren(const QString &p_tag)
|
QStringList NotebookDatabaseAccess::queryTagAndChildren(const QString &p_tag)
|
||||||
{
|
{
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("WITH RECURSIVE cte_children(name, parent_name) AS (\n"
|
query.prepare(QString("WITH RECURSIVE cte_children(name, parent_name) AS (\n"
|
||||||
" SELECT tag.name, tag.parent_name\n"
|
" SELECT tag.name, tag.parent_name\n"
|
||||||
" FROM %1 tag\n"
|
" FROM %1 tag\n"
|
||||||
" WHERE tag.name = :name\n"
|
" WHERE tag.name = :name\n"
|
||||||
@ -747,7 +742,7 @@ QStringList NotebookDatabaseAccess::getNodesOfTags(const QStringList &p_tags)
|
|||||||
allIds.insert(id);
|
allIds.insert(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nodeIds = allIds.values();
|
nodeIds = allIds.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &id : nodeIds) {
|
for (const auto &id : nodeIds) {
|
||||||
@ -768,7 +763,7 @@ QList<NotebookDatabaseAccess::TagRecord> NotebookDatabaseAccess::getAllTags()
|
|||||||
|
|
||||||
auto db = getDatabase();
|
auto db = getDatabase();
|
||||||
QSqlQuery query(db);
|
QSqlQuery query(db);
|
||||||
query.prepare(QStringLiteral("SELECT name, parent_name FROM %1 ORDER BY parent_name, name").arg(c_tagTableName));
|
query.prepare(QString("SELECT name, parent_name FROM %1 ORDER BY parent_name, name").arg(c_tagTableName));
|
||||||
if (!query.exec()) {
|
if (!query.exec()) {
|
||||||
qWarning() << "failed to query tags" << query.executedQuery() << query.lastError().text();
|
qWarning() << "failed to query tags" << query.executedQuery() << query.lastError().text();
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -11,7 +11,7 @@ void INotebookBackend::constrainPath(const QString &p_path) const
|
|||||||
{
|
{
|
||||||
if (!PathUtils::pathContains(m_rootPath, p_path)) {
|
if (!PathUtils::pathContains(m_rootPath, p_path)) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("path (%1) does not locate in root folder (%2)")
|
QString("path (%1) does not locate in root folder (%2)")
|
||||||
.arg(p_path, m_rootPath));
|
.arg(p_path, m_rootPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ void LocalNotebookBackend::makePath(const QString &p_dirPath)
|
|||||||
QDir dir(getRootPath());
|
QDir dir(getRootPath());
|
||||||
if (!dir.mkpath(p_dirPath)) {
|
if (!dir.mkpath(p_dirPath)) {
|
||||||
Exception::throwOne(Exception::Type::FailToCreateDir,
|
Exception::throwOne(Exception::Type::FailToCreateDir,
|
||||||
QStringLiteral("fail to create directory: %1").arg(p_dirPath));
|
QString("fail to create directory: %1").arg(p_dirPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
src/core/notebookbackend/notebookbackend.pri
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
SOURCES += \
|
||||||
|
$$PWD/localnotebookbackend.cpp \
|
||||||
|
$$PWD/localnotebookbackendfactory.cpp \
|
||||||
|
$$PWD/inotebookbackend.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/inotebookbackend.h \
|
||||||
|
$$PWD/localnotebookbackend.h \
|
||||||
|
$$PWD/inotebookbackendfactory.h \
|
||||||
|
$$PWD/localnotebookbackendfactory.h
|
@ -56,7 +56,7 @@ void NotebookConfig::fromJson(const QJsonObject &p_jobj)
|
|||||||
|| !p_jobj.contains(QStringLiteral("version_controller"))
|
|| !p_jobj.contains(QStringLiteral("version_controller"))
|
||||||
|| !p_jobj.contains(QStringLiteral("config_mgr"))) {
|
|| !p_jobj.contains(QStringLiteral("config_mgr"))) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("failed to read notebook configuration from JSON (%1)").arg(QJsonObjectToString(p_jobj)));
|
QString("failed to read notebook configuration from JSON (%1)").arg(QJsonObjectToString(p_jobj)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
src/core/notebookconfigmgr/notebookconfigmgr.pri
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
SOURCES += \
|
||||||
|
$$PWD/vxnodeconfig.cpp \
|
||||||
|
$$PWD/vxnotebookconfigmgr.cpp \
|
||||||
|
$$PWD/vxnotebookconfigmgrfactory.cpp \
|
||||||
|
$$PWD/inotebookconfigmgr.cpp \
|
||||||
|
$$PWD/notebookconfig.cpp \
|
||||||
|
$$PWD/bundlenotebookconfigmgr.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/inotebookconfigmgr.h \
|
||||||
|
$$PWD/vxnodeconfig.h \
|
||||||
|
$$PWD/vxnotebookconfigmgr.h \
|
||||||
|
$$PWD/inotebookconfigmgrfactory.h \
|
||||||
|
$$PWD/vxnotebookconfigmgrfactory.h \
|
||||||
|
$$PWD/notebookconfig.h \
|
||||||
|
$$PWD/bundlenotebookconfigmgr.h
|
@ -126,12 +126,12 @@ QSharedPointer<NodeConfig> VXNotebookConfigMgr::readNodeConfig(const QString &p_
|
|||||||
auto backend = getBackend();
|
auto backend = getBackend();
|
||||||
if (!backend->exists(p_path)) {
|
if (!backend->exists(p_path)) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("node path (%1) does not exist").arg(p_path));
|
QString("node path (%1) does not exist").arg(p_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backend->isFile(p_path)) {
|
if (backend->isFile(p_path)) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("node (%1) is a file node without config").arg(p_path));
|
QString("node (%1) is a file node without config").arg(p_path));
|
||||||
} else {
|
} else {
|
||||||
auto configPath = PathUtils::concatenateFilePath(p_path, c_nodeConfigName);
|
auto configPath = PathUtils::concatenateFilePath(p_path, c_nodeConfigName);
|
||||||
auto data = backend->readFile(configPath);
|
auto data = backend->readFile(configPath);
|
||||||
@ -309,7 +309,7 @@ QSharedPointer<Node> VXNotebookConfigMgr::newFileNode(Node *p_parent,
|
|||||||
if (getBackend()->childExistsCaseInsensitive(p_parent->fetchPath(), p_name)) {
|
if (getBackend()->childExistsCaseInsensitive(p_parent->fetchPath(), p_name)) {
|
||||||
// File already exists. Exception.
|
// File already exists. Exception.
|
||||||
Exception::throwOne(Exception::Type::FileExistsOnCreate,
|
Exception::throwOne(Exception::Type::FileExistsOnCreate,
|
||||||
QStringLiteral("file (%1) already exists when creating new node").arg(node->fetchPath()));
|
QString("file (%1) already exists when creating new node").arg(node->fetchPath()));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ QSharedPointer<Node> VXNotebookConfigMgr::newFolderNode(Node *p_parent,
|
|||||||
if (getBackend()->childExistsCaseInsensitive(p_parent->fetchPath(), p_name)) {
|
if (getBackend()->childExistsCaseInsensitive(p_parent->fetchPath(), p_name)) {
|
||||||
// Dir already exists. Exception.
|
// Dir already exists. Exception.
|
||||||
Exception::throwOne(Exception::Type::DirExistsOnCreate,
|
Exception::throwOne(Exception::Type::DirExistsOnCreate,
|
||||||
QStringLiteral("dir (%1) already exists when creating new node").arg(node->fetchPath()));
|
QString("dir (%1) already exists when creating new node").arg(node->fetchPath()));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,7 +465,7 @@ QSharedPointer<Node> VXNotebookConfigMgr::loadNodeByPath(const QSharedPointer<No
|
|||||||
return p_root;
|
return p_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto paths = p.split('/', Qt::SkipEmptyParts);
|
auto paths = p.split('/', QString::SkipEmptyParts);
|
||||||
auto node = p_root;
|
auto node = p_root;
|
||||||
for (auto &pa : paths) {
|
for (auto &pa : paths) {
|
||||||
// Find child @pa in @node.
|
// Find child @pa in @node.
|
||||||
|
@ -108,7 +108,7 @@ QSharedPointer<INotebookBackend> NotebookMgr::createNotebookBackend(const QStrin
|
|||||||
return factory->createNotebookBackend(p_rootFolderPath);
|
return factory->createNotebookBackend(p_rootFolderPath);
|
||||||
} else {
|
} else {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("failed to find notebook backend factory %1").arg(p_backendName));
|
QString("failed to find notebook backend factory %1").arg(p_backendName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -121,7 +121,7 @@ QSharedPointer<IVersionController> NotebookMgr::createVersionController(const QS
|
|||||||
return factory->createVersionController();
|
return factory->createVersionController();
|
||||||
} else {
|
} else {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("failed to find version controller factory %1").arg(p_controllerName));
|
QString("failed to find version controller factory %1").arg(p_controllerName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -135,7 +135,7 @@ QSharedPointer<INotebookConfigMgr> NotebookMgr::createNotebookConfigMgr(const QS
|
|||||||
return factory->createNotebookConfigMgr(p_backend);
|
return factory->createNotebookConfigMgr(p_backend);
|
||||||
} else {
|
} else {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("failed to find notebook config manager factory %1").arg(p_mgrName));
|
QString("failed to find notebook config manager factory %1").arg(p_mgrName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -171,7 +171,7 @@ QSharedPointer<Notebook> NotebookMgr::newNotebook(const QSharedPointer<NotebookP
|
|||||||
auto factory = m_notebookServer->getItem(p_parameters->m_type);
|
auto factory = m_notebookServer->getItem(p_parameters->m_type);
|
||||||
if (!factory) {
|
if (!factory) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("failed to find notebook factory %1").arg(p_parameters->m_type));
|
QString("failed to find notebook factory %1").arg(p_parameters->m_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto notebook = factory->newNotebook(*p_parameters);
|
auto notebook = factory->newNotebook(*p_parameters);
|
||||||
@ -246,7 +246,7 @@ QSharedPointer<Notebook> NotebookMgr::readNotebookFromConfig(const SessionConfig
|
|||||||
auto factory = m_notebookServer->getItem(p_item.m_type);
|
auto factory = m_notebookServer->getItem(p_item.m_type);
|
||||||
if (!factory) {
|
if (!factory) {
|
||||||
Exception::throwOne(Exception::Type::InvalidArgument,
|
Exception::throwOne(Exception::Type::InvalidArgument,
|
||||||
QStringLiteral("failed to find notebook factory %1").arg(p_item.m_type));
|
QString("failed to find notebook factory %1").arg(p_item.m_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto backend = createNotebookBackend(p_item.m_backend, p_item.m_rootFolderPath);
|
auto backend = createNotebookBackend(p_item.m_backend, p_item.m_rootFolderPath);
|
||||||
@ -330,7 +330,7 @@ void NotebookMgr::closeNotebook(ID p_id)
|
|||||||
emit notebooksUpdated();
|
emit notebooksUpdated();
|
||||||
setCurrentNotebookAfterUpdate();
|
setCurrentNotebookAfterUpdate();
|
||||||
|
|
||||||
qInfo() << QStringLiteral("notebook %1 (%2) is closed").arg(notebookToClose->getName(),
|
qInfo() << QString("notebook %1 (%2) is closed").arg(notebookToClose->getName(),
|
||||||
notebookToClose->getRootFolderPath());
|
notebookToClose->getRootFolderPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,13 +359,13 @@ void NotebookMgr::removeNotebook(ID p_id)
|
|||||||
try {
|
try {
|
||||||
nbToRemove->remove();
|
nbToRemove->remove();
|
||||||
} catch (Exception &p_e) {
|
} catch (Exception &p_e) {
|
||||||
qWarning() << QStringLiteral("failed to remove notebook %1 (%2) (%3)").arg(nbToRemove->getName(),
|
qWarning() << QString("failed to remove notebook %1 (%2) (%3)").arg(nbToRemove->getName(),
|
||||||
nbToRemove->getRootFolderPath(),
|
nbToRemove->getRootFolderPath(),
|
||||||
p_e.what());
|
p_e.what());
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
qInfo() << QStringLiteral("notebook %1 (%2) is removed").arg(nbToRemove->getName(),
|
qInfo() << QString("notebook %1 (%2) is removed").arg(nbToRemove->getName(),
|
||||||
nbToRemove->getRootFolderPath());
|
nbToRemove->getRootFolderPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ QJsonObject SessionConfig::ExternalProgram::toJson() const
|
|||||||
QString SessionConfig::ExternalProgram::fetchCommand(const QString &p_file) const
|
QString SessionConfig::ExternalProgram::fetchCommand(const QString &p_file) const
|
||||||
{
|
{
|
||||||
auto command(m_command);
|
auto command(m_command);
|
||||||
command.replace(QStringLiteral("%1"), QStringLiteral("\"%1\"").arg(p_file));
|
command.replace(QStringLiteral("%1"), QString("\"%1\"").arg(p_file));
|
||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,11 +24,6 @@ Theme::Theme(const QString &p_themeFolderPath,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QString vnotex::Theme::getThemeFolder() const
|
|
||||||
{
|
|
||||||
return m_themeFolderPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Theme::isValidThemeFolder(const QString &p_folder)
|
bool Theme::isValidThemeFolder(const QString &p_folder)
|
||||||
{
|
{
|
||||||
QDir dir(p_folder);
|
QDir dir(p_folder);
|
||||||
@ -55,12 +50,12 @@ QString Theme::getDisplayName(const QString &p_folder, const QString &p_locale)
|
|||||||
|
|
||||||
if (!p_locale.isEmpty()) {
|
if (!p_locale.isEmpty()) {
|
||||||
// Check full locale.
|
// Check full locale.
|
||||||
auto fullLocale = QStringLiteral("%1_%2").arg(prefix, p_locale);
|
auto fullLocale = QString("%1_%2").arg(prefix, p_locale);
|
||||||
if (metaObj.contains(fullLocale)) {
|
if (metaObj.contains(fullLocale)) {
|
||||||
return metaObj.value(fullLocale).toString();
|
return metaObj.value(fullLocale).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto shortLocale = QStringLiteral("%1_%2").arg(prefix, p_locale.split('_')[0]);
|
auto shortLocale = QString("%1_%2").arg(prefix, p_locale.split('_')[0]);
|
||||||
if (metaObj.contains(shortLocale)) {
|
if (metaObj.contains(shortLocale)) {
|
||||||
return metaObj.value(shortLocale).toString();
|
return metaObj.value(shortLocale).toString();
|
||||||
}
|
}
|
||||||
@ -263,6 +258,7 @@ QString Theme::fetchQtStyleSheet() const
|
|||||||
translateStyleByPalette(m_palette, style);
|
translateStyleByPalette(m_palette, style);
|
||||||
translateUrlToAbsolute(m_themeFolderPath, style);
|
translateUrlToAbsolute(m_themeFolderPath, style);
|
||||||
translateFontFamilyList(style);
|
translateFontFamilyList(style);
|
||||||
|
translateScaledSize(WidgetUtils::calculateScaleFactor(), style);
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +297,7 @@ void Theme::translateUrlToAbsolute(const QString &p_basePath, QString &p_style)
|
|||||||
const int urlCapturedIdx = 2;
|
const int urlCapturedIdx = 2;
|
||||||
|
|
||||||
QDir dir(p_basePath);
|
QDir dir(p_basePath);
|
||||||
const int literalSize = QStringLiteral("url(").size();
|
const int literalSize = QString("url(").size();
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
QRegularExpressionMatch match;
|
QRegularExpressionMatch match;
|
||||||
while (pos < p_style.size()) {
|
while (pos < p_style.size()) {
|
||||||
@ -350,7 +346,7 @@ void Theme::translateFontFamilyList(QString &p_style)
|
|||||||
family = "\"" + family + "\"";
|
family = "\"" + family + "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
auto newStr = QStringLiteral("%1font-family: %2;").arg(match.captured(prefixCapturedIdx), family);
|
auto newStr = QString("%1font-family: %2;").arg(match.captured(prefixCapturedIdx), family);
|
||||||
p_style.replace(idx, match.capturedLength(), newStr);
|
p_style.replace(idx, match.capturedLength(), newStr);
|
||||||
pos = idx + newStr.size();
|
pos = idx + newStr.size();
|
||||||
} else {
|
} else {
|
||||||
@ -359,6 +355,40 @@ void Theme::translateFontFamilyList(QString &p_style)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Theme::translateScaledSize(qreal p_factor, QString &p_style)
|
||||||
|
{
|
||||||
|
QRegularExpression scaleRe("(\\s|:)\\$([+-]?)(\\d+)(?=\\D)");
|
||||||
|
const int prefixCapturedIdx = 1;
|
||||||
|
const int signCapturedIdx = 2;
|
||||||
|
const int numCapturedIdx = 3;
|
||||||
|
|
||||||
|
qDebug() << "translateScaledSize of Qt style sheet" << p_factor;
|
||||||
|
|
||||||
|
int pos = 0;
|
||||||
|
QRegularExpressionMatch match;
|
||||||
|
while (pos < p_style.size()) {
|
||||||
|
int idx = p_style.indexOf(scaleRe, pos, &match);
|
||||||
|
if (idx == -1) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto numStr = match.captured(numCapturedIdx);
|
||||||
|
bool ok = false;
|
||||||
|
int val = numStr.toInt(&ok);
|
||||||
|
if (!ok) {
|
||||||
|
pos = idx + match.capturedLength();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
val = val * p_factor + 0.5;
|
||||||
|
auto newStr = QString("%1%2%3").arg(match.captured(prefixCapturedIdx),
|
||||||
|
match.captured(signCapturedIdx),
|
||||||
|
QString::number(val));
|
||||||
|
p_style.replace(idx, match.capturedLength(), newStr);
|
||||||
|
pos = idx + newStr.size();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString Theme::paletteColor(const QString &p_name) const
|
QString Theme::paletteColor(const QString &p_name) const
|
||||||
{
|
{
|
||||||
auto val = findValueByKeyPath(m_palette, p_name).toString();
|
auto val = findValueByKeyPath(m_palette, p_name).toString();
|
||||||
|
@ -47,8 +47,6 @@ namespace vnotex
|
|||||||
|
|
||||||
QString name() const;
|
QString name() const;
|
||||||
|
|
||||||
QString getThemeFolder() const;
|
|
||||||
|
|
||||||
static bool isValidThemeFolder(const QString &p_folder);
|
static bool isValidThemeFolder(const QString &p_folder);
|
||||||
|
|
||||||
static Theme *fromFolder(const QString &p_folder);
|
static Theme *fromFolder(const QString &p_folder);
|
||||||
@ -115,6 +113,8 @@ namespace vnotex
|
|||||||
// Thus we need to choose one available font from the list.
|
// Thus we need to choose one available font from the list.
|
||||||
static void translateFontFamilyList(QString &p_style);
|
static void translateFontFamilyList(QString &p_style);
|
||||||
|
|
||||||
|
static void translateScaledSize(qreal p_factor, QString &p_style);
|
||||||
|
|
||||||
static QJsonObject readJsonFile(const QString &p_filePath);
|
static QJsonObject readJsonFile(const QString &p_filePath);
|
||||||
|
|
||||||
static QJsonObject readPaletteFile(const QString &p_folder);
|
static QJsonObject readPaletteFile(const QString &p_folder);
|
||||||
|
@ -24,6 +24,8 @@ ThemeMgr::ThemeMgr(const QString &p_currentThemeName, QObject *p_parent)
|
|||||||
loadAvailableThemes();
|
loadAvailableThemes();
|
||||||
|
|
||||||
loadCurrentTheme(p_currentThemeName);
|
loadCurrentTheme(p_currentThemeName);
|
||||||
|
|
||||||
|
IconUtils::setDefaultIconForeground(paletteColor("base#icon#fg"), paletteColor("base#icon#disabled#fg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ThemeMgr::getIconFile(const QString &p_icon) const
|
QString ThemeMgr::getIconFile(const QString &p_icon) const
|
||||||
@ -54,7 +56,7 @@ void ThemeMgr::loadAvailableThemes()
|
|||||||
|
|
||||||
if (m_themes.isEmpty()) {
|
if (m_themes.isEmpty()) {
|
||||||
Exception::throwOne(Exception::Type::EssentialFileMissing,
|
Exception::throwOne(Exception::Type::EssentialFileMissing,
|
||||||
QStringLiteral("no available themes found in paths: %1").arg(s_searchPaths.join(QLatin1Char(';'))));
|
QString("no available themes found in paths: %1").arg(s_searchPaths.join(QLatin1Char(';'))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +91,6 @@ const Theme &ThemeMgr::getCurrentTheme() const
|
|||||||
|
|
||||||
void ThemeMgr::loadCurrentTheme(const QString &p_themeName)
|
void ThemeMgr::loadCurrentTheme(const QString &p_themeName)
|
||||||
{
|
{
|
||||||
m_currentTheme.reset();
|
|
||||||
auto themeFolder = findThemeFolder(p_themeName);
|
auto themeFolder = findThemeFolder(p_themeName);
|
||||||
if (themeFolder.isNull()) {
|
if (themeFolder.isNull()) {
|
||||||
qWarning() << "failed to locate theme" << p_themeName;
|
qWarning() << "failed to locate theme" << p_themeName;
|
||||||
@ -103,8 +104,6 @@ void ThemeMgr::loadCurrentTheme(const QString &p_themeName)
|
|||||||
qWarning() << "fall back to default theme" << defaultTheme;
|
qWarning() << "fall back to default theme" << defaultTheme;
|
||||||
m_currentTheme.reset(loadTheme(findThemeFolder(defaultTheme)));
|
m_currentTheme.reset(loadTheme(findThemeFolder(defaultTheme)));
|
||||||
}
|
}
|
||||||
|
|
||||||
IconUtils::setDefaultIconForeground(paletteColor("base#icon#fg"), paletteColor("base#icon#disabled#fg"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Theme *ThemeMgr::loadTheme(const QString &p_themeFolder)
|
Theme *ThemeMgr::loadTheme(const QString &p_themeFolder)
|
||||||
@ -212,14 +211,6 @@ QPixmap ThemeMgr::getThemePreview(const QString &p_name) const
|
|||||||
void ThemeMgr::refresh()
|
void ThemeMgr::refresh()
|
||||||
{
|
{
|
||||||
loadAvailableThemes();
|
loadAvailableThemes();
|
||||||
refreshCurrentTheme();
|
|
||||||
}
|
|
||||||
|
|
||||||
void vnotex::ThemeMgr::refreshCurrentTheme()
|
|
||||||
{
|
|
||||||
if (m_currentTheme) {
|
|
||||||
loadCurrentTheme(m_currentTheme->name());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThemeMgr::addWebStylesSearchPath(const QString &p_path)
|
void ThemeMgr::addWebStylesSearchPath(const QString &p_path)
|
||||||
|
@ -60,11 +60,10 @@ namespace vnotex
|
|||||||
|
|
||||||
const ThemeInfo *findTheme(const QString &p_name) const;
|
const ThemeInfo *findTheme(const QString &p_name) const;
|
||||||
|
|
||||||
// Refresh the themes list and reload current theme.
|
// Refresh the themes list.
|
||||||
|
// Won't affect current theme since we do not support changing theme real time for now.
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
||||||
void refreshCurrentTheme();
|
|
||||||
|
|
||||||
// Return all web stylesheets available, including those from themes and web styles search paths.
|
// Return all web stylesheets available, including those from themes and web styles search paths.
|
||||||
// <DisplayName, FilePath>.
|
// <DisplayName, FilePath>.
|
||||||
QVector<QPair<QString, QString>> getWebStyles() const;
|
QVector<QPair<QString, QString>> getWebStyles() const;
|
||||||
|
11
src/core/versioncontroller/versioncontroller.pri
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
SOURCES += \
|
||||||
|
$$PWD/dummyversioncontroller.cpp \
|
||||||
|
$$PWD/versioncontrollerserver.cpp \
|
||||||
|
$$PWD/dummyversioncontrollerfactory.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/iversioncontroller.h \
|
||||||
|
$$PWD/dummyversioncontroller.h \
|
||||||
|
$$PWD/versioncontrollerserver.h \
|
||||||
|
$$PWD/iversioncontrollerfactory.h \
|
||||||
|
$$PWD/dummyversioncontrollerfactory.h
|
@ -16,32 +16,28 @@
|
|||||||
<string>public.plain-text</string>
|
<string>public.plain-text</string>
|
||||||
<string>net.daringfireball.markdown</string>
|
<string>net.daringfireball.markdown</string>
|
||||||
</array>
|
</array>
|
||||||
<key>LSHandlerRank</key>
|
|
||||||
<string>Owner</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>VNote</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>VNote</string>
|
<string>vnote</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>3.19</string>
|
<string>3.17.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>3.19.2</string>
|
<string>3.17.0.1</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Distributed under LGPL-3.0 license. Copyright (c) 2025 app.vnote.fun</string>
|
<string>Created by VNoteX</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>vnote.icns</string>
|
<string>vnote.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>fun.vnote.vnote</string>
|
<string>com.vnotex.vnote</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>public.app-category.productivity</string>
|
<string>????</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.15</string>
|
<string>10.12</string>
|
||||||
<key>NOTE</key>
|
<key>NOTE</key>
|
||||||
<string>A pleasant note-taking platform</string>
|
<string>Visit [GitHub VNote](https://github.com/vnotex/vnote) for details.</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
@ -95,5 +95,15 @@
|
|||||||
<file>logo/vnote.png</file>
|
<file>logo/vnote.png</file>
|
||||||
<file>logo/256x256/vnote.png</file>
|
<file>logo/256x256/vnote.png</file>
|
||||||
<file>logo/vnote_mono.png</file>
|
<file>logo/vnote_mono.png</file>
|
||||||
|
<file>translations/qdialogbuttonbox_zh_CN.qm</file>
|
||||||
|
<file>translations/qwebengine_zh_CN.qm</file>
|
||||||
|
<file>translations/qt_zh_CN.qm</file>
|
||||||
|
<file>translations/vnote_zh_CN.qm</file>
|
||||||
|
<file>translations/qtbase_zh_CN.qm</file>
|
||||||
|
<file>translations/vtextedit_zh_CN.qm</file>
|
||||||
|
<file>translations/qt_ja.qm</file>
|
||||||
|
<file>translations/vnote_ja.qm</file>
|
||||||
|
<file>translations/qtbase_ja.qm</file>
|
||||||
|
<file>translations/vtextedit_ja.qm</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<component type="desktop-application">
|
|
||||||
<id>fun.vnote.app.VNote</id>
|
|
||||||
<name>VNote</name>
|
|
||||||
<summary>A pleasant note-taking platform</summary>
|
|
||||||
<developer_name>Le Tan</developer_name>
|
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
|
||||||
<project_license>LGPL-3.0-only</project_license>
|
|
||||||
<description>
|
|
||||||
<p>Simple notes management</p>
|
|
||||||
<ul>
|
|
||||||
<li>All plain text, no database</li>
|
|
||||||
<li>Self-contained notebooks, infinite levels of folders, plain notes</li>
|
|
||||||
<li>Tags and attachments</li>
|
|
||||||
<li>Explore and edit external files</li>
|
|
||||||
</ul>
|
|
||||||
<p>Own your data</p>
|
|
||||||
<ul>
|
|
||||||
<li>All files on your local disk</li>
|
|
||||||
<li>One notebook is exactly one directory</li>
|
|
||||||
<li>Work from anywhere seamlessly via third-party service of your choice</li>
|
|
||||||
</ul>
|
|
||||||
<p>Concentration</p>
|
|
||||||
<ul>
|
|
||||||
<li>In-place preview or side-by-side live preview</li>
|
|
||||||
<li>Focus on your note in both read and edit mode</li>
|
|
||||||
</ul>
|
|
||||||
<p>Pleasant Markdown experience</p>
|
|
||||||
<ul>
|
|
||||||
<li>Minimized gap between read and write of Markdown</li>
|
|
||||||
<li>Syntax highlights and in-place preview</li>
|
|
||||||
<li>Effective images management</li>
|
|
||||||
<li>Interactive outline</li>
|
|
||||||
<li>UML diagrams, flowcharts, and math formulas</li>
|
|
||||||
</ul>
|
|
||||||
<p>Highly customizable</p>
|
|
||||||
<ul>
|
|
||||||
<li>Themes and styles</li>
|
|
||||||
<li>Shortcuts and behaviors</li>
|
|
||||||
</ul>
|
|
||||||
<p>By programmers, for programmers</p>
|
|
||||||
<ul>
|
|
||||||
<li>Vi mode and Vi-like navigation</li>
|
|
||||||
<li>Line number in editor</li>
|
|
||||||
<li>Multiple tabs</li>
|
|
||||||
<li>Window splits</li>
|
|
||||||
<li>Fuzzy search and jump</li>
|
|
||||||
<li>Versatile shortcuts</li>
|
|
||||||
</ul>
|
|
||||||
</description>
|
|
||||||
<launchable type="desktop-id">fun.vnote.app.VNote.desktop</launchable>
|
|
||||||
<url type="donation">https://github.com/vnotex/vnote#donate</url>
|
|
||||||
<url type="faq">https://app.vnote.fun/en_us/#!docs/Users/Frequently%20Asked%20Questions.md</url>
|
|
||||||
<url type="help">https://join.slack.com/t/vnote/shared_invite/enQtNDg2MzY0NDg3NzI4LTQ1Yzk1YjA5MjAyYTU0MjJkMTUxNmRiYWQ2YjlkOWU0ZGZlMTFlZTAxNzg0ZGUyNzI0ZGY2NDg4MmU1M2FkMDg</url>
|
|
||||||
<url type="homepage">https://app.vnote.fun/</url>
|
|
||||||
<url type="vcs-browser">https://github.com/vnotex/vnote</url>
|
|
||||||
<screenshots>
|
|
||||||
<screenshot type="default">
|
|
||||||
<image>https://app.vnote.fun/en_us/vx_images/90420129296.png</image>
|
|
||||||
</screenshot>
|
|
||||||
<screenshot>
|
|
||||||
<image>https://app.vnote.fun/en_us/vx_images/4085821110870.png</image>
|
|
||||||
</screenshot>
|
|
||||||
</screenshots>
|
|
||||||
<content_rating type="oars-1.1" />
|
|
||||||
<releases>
|
|
||||||
<release version="3.18.2" date="2024-08-06" />
|
|
||||||
<release version="3.18.1" date="2024-07-10" />
|
|
||||||
<release version="3.18.0" date="2024-07-01" />
|
|
||||||
<release version="3.17.0" date="2023-09-27" />
|
|
||||||
</releases>
|
|
||||||
</component>
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
IDI_ICON1 ICON DISCARDABLE "vnote.ico"
|
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 26 KiB |
79
src/data/core/translations/qdialogbuttonbox_zh_CN.ts
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="zh_CN">
|
||||||
|
<context>
|
||||||
|
<name>QPlatformTheme</name>
|
||||||
|
<message>
|
||||||
|
<source>OK</source>
|
||||||
|
<translation>确定</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Save</source>
|
||||||
|
<translation>保存</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Save All</source>
|
||||||
|
<translation>全部保存</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open</source>
|
||||||
|
<translation>打开</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&Yes</source>
|
||||||
|
<translation>是(&Y)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Yes to &All</source>
|
||||||
|
<translation>全部选择是(&A)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&No</source>
|
||||||
|
<translation>否(&N)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>N&o to All</source>
|
||||||
|
<translation>全部选择否(&O)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Abort</source>
|
||||||
|
<translation>终止</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Retry</source>
|
||||||
|
<translation>重试</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore</source>
|
||||||
|
<translation>忽略</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Close</source>
|
||||||
|
<translation>关闭</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cancel</source>
|
||||||
|
<translation>取消</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Discard</source>
|
||||||
|
<translation>放弃</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Help</source>
|
||||||
|
<translation>帮助</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Apply</source>
|
||||||
|
<translation>应用</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reset</source>
|
||||||
|
<translation>重置</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Restore Defaults</source>
|
||||||
|
<translation>恢复默认</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
7967
src/data/core/translations/qt_zh_CN.ts
Normal file
7554
src/data/core/translations/qtbase_zh_CN.ts
Normal file
193
src/data/core/translations/qwebengine_zh_CN.ts
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="zh_CN">
|
||||||
|
<!--QWebEngineView uses different sources for its standard context menu.-->
|
||||||
|
<!--https://code.woboq.org/qt5/qtwebengine/src/core/render_view_context_menu_qt.cpp.html-->
|
||||||
|
<!--https://code.woboq.org/qt5/qtwebengine/src/webenginewidgets/api/qwebenginepage.cpp.html-->
|
||||||
|
<context>
|
||||||
|
<name>RenderViewContextMenuQt</name>
|
||||||
|
<message>
|
||||||
|
<source>Back</source>
|
||||||
|
<translation>后退</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Forward</source>
|
||||||
|
<translation>前进</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reload</source>
|
||||||
|
<translation>重新加载</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cut</source>
|
||||||
|
<translation>剪切</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Copy</source>
|
||||||
|
<translation>复制</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Paste</source>
|
||||||
|
<translation>粘贴</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Undo</source>
|
||||||
|
<translation>撤消</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Redo</source>
|
||||||
|
<translation>恢复</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Select all</source>
|
||||||
|
<translation>选择全部</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Paste and match style</source>
|
||||||
|
<translation>粘贴并匹配样式</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open link in new window</source>
|
||||||
|
<translation>在新窗口打开链接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open link in new tab</source>
|
||||||
|
<translation>在新标签页打开链接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Copy link address</source>
|
||||||
|
<translation>复制链接地址</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Save link</source>
|
||||||
|
<translation>保存链接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Copy image</source>
|
||||||
|
<translation>复制图片</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Copy image address</source>
|
||||||
|
<translation>复制图片地址</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Save image</source>
|
||||||
|
<translation>保存图片</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Copy media address</source>
|
||||||
|
<translation>复制媒体地址</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show controls</source>
|
||||||
|
<translation>显示控件</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Loop</source>
|
||||||
|
<translation>循环</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Save media</source>
|
||||||
|
<translation>保存媒体</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Inspect</source>
|
||||||
|
<translation>查看</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Exit full screen</source>
|
||||||
|
<translation>退出全屏</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Save page</source>
|
||||||
|
<translation>保存页面</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>View page source</source>
|
||||||
|
<translation>查看页面源码</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>QWebEnginePage</name>
|
||||||
|
<message>
|
||||||
|
<source>Stop</source>
|
||||||
|
<translation>停止</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reload and Bypass Cache</source>
|
||||||
|
<translation>忽略缓存重新加载</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open link in this window</source>
|
||||||
|
<translation>在当前窗口打开链接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Open link in new background tab</source>
|
||||||
|
<translation>在后台新标签页打开链接</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Toggle Play/Pause</source>
|
||||||
|
<translation>切换播放/暂停</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Toggle Mute</source>
|
||||||
|
<translation>切换静音</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Close Page</source>
|
||||||
|
<translation>关闭页面</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Unselect</source>
|
||||||
|
<translation>取消选择</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&Bold</source>
|
||||||
|
<translation>粗体(&B)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&Italic</source>
|
||||||
|
<translation>斜体(&I)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&Underline</source>
|
||||||
|
<translation>下划线(&U)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&Strikethrough</source>
|
||||||
|
<translation>删除线(&S)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Align &Left</source>
|
||||||
|
<translation>左对齐(&L)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Align &Center</source>
|
||||||
|
<translation>居中对齐(&C)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Align &Right</source>
|
||||||
|
<translation>右对齐(&R)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Align &Justified</source>
|
||||||
|
<translation>两端对齐(&J)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&Indent</source>
|
||||||
|
<translation>缩进(&I)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>&Outdent</source>
|
||||||
|
<translation>减小缩进(&O)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Insert &Ordered List</source>
|
||||||
|
<translation>插入有序列表(&O)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Insert &Unordered List</source>
|
||||||
|
<translation>插入无序列表(&U)</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
BIN
src/data/core/translations/vnote_ja.qm
Normal file
@ -70,17 +70,17 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QWebEnginePage</name>
|
<name>QWebEnginePage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="313"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="303"/>
|
||||||
<source>&Back</source>
|
<source>&Back</source>
|
||||||
<translation>戻る(&B)</translation>
|
<translation>戻る(&B)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="314"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="304"/>
|
||||||
<source>&Forward</source>
|
<source>&Forward</source>
|
||||||
<translation>進む(&F)</translation>
|
<translation>進む(&F)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="315"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="305"/>
|
||||||
<source>&Reload</source>
|
<source>&Reload</source>
|
||||||
<translation>再読み込み(&R)</translation>
|
<translation>再読み込み(&R)</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1101,12 +1101,12 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::FullScreenToggleAction</name>
|
<name>vnotex::FullScreenToggleAction</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="12"/>
|
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="11"/>
|
||||||
<source>F&ull Screen</source>
|
<source>F&ull Screen</source>
|
||||||
<translation>フルスクリーン(&F)</translation>
|
<translation>フルスクリーン(&F)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="14"/>
|
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="13"/>
|
||||||
<source>Exit F&ull Screen</source>
|
<source>Exit F&ull Screen</source>
|
||||||
<translation>フルスクリーン終了(&A)</translation>
|
<translation>フルスクリーン終了(&A)</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1802,90 +1802,85 @@
|
|||||||
<translation>ログをさらに印刷します。</translation>
|
<translation>ログをさらに印刷します。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="25"/>
|
<location filename="../../../commandlineoptions.cpp" line="29"/>
|
||||||
<source>Log to stderr.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../commandlineoptions.cpp" line="32"/>
|
|
||||||
<source>WebEngine remote debugging port.</source>
|
<source>WebEngine remote debugging port.</source>
|
||||||
<translation>WebEngineリモートデバッグポート。</translation>
|
<translation>WebEngineリモートデバッグポート。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="33"/>
|
<location filename="../../../commandlineoptions.cpp" line="30"/>
|
||||||
<source>port_number</source>
|
<source>port_number</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="37"/>
|
<location filename="../../../commandlineoptions.cpp" line="34"/>
|
||||||
<source>WebEngine without sandbox.</source>
|
<source>WebEngine without sandbox.</source>
|
||||||
<translation>サンドボックスのないWebEngine。</translation>
|
<translation>サンドボックスのないWebEngine。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="41"/>
|
<location filename="../../../commandlineoptions.cpp" line="38"/>
|
||||||
<source>WebEngine with GPU disabled.</source>
|
<source>WebEngine with GPU disabled.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../main.cpp" line="135"/>
|
<location filename="../../../main.cpp" line="134"/>
|
||||||
<source>%1 failed to start.</source>
|
<source>%1 failed to start.</source>
|
||||||
<translation>%1を開始できませんでした。</translation>
|
<translation>%1を開始できませんでした。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../main.cpp" line="136"/>
|
<location filename="../../../main.cpp" line="135"/>
|
||||||
<source>Failed to initialize configuration manager. Please check if all the files are intact or reinstall the application.</source>
|
<source>Failed to initialize configuration manager. Please check if all the files are intact or reinstall the application.</source>
|
||||||
<translation>設定マネージャの初期化に失敗しました。すべてのファイルが正常かどうかを確認するか、アプリケーションを再インストールしてください。</translation>
|
<translation>設定マネージャの初期化に失敗しました。すべてのファイルが正常かどうかを確認するか、アプリケーションを再インストールしてください。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="819"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="813"/>
|
||||||
<source>Failed to check for updates (%1)</source>
|
<source>Failed to check for updates (%1)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="821"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="815"/>
|
||||||
<source>Updates available: %1</source>
|
<source>Updates available: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="107"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="104"/>
|
||||||
<source>Initializing core components...</source>
|
<source>Initializing core components...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="385"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="377"/>
|
||||||
<source>Do you want to minimize %1 to system tray instead of quitting when closed?</source>
|
<source>Do you want to minimize %1 to system tray instead of quitting when closed?</source>
|
||||||
<translation>終了する代わりに、%1をシステムトレイに最小化しますか?</translation>
|
<translation>終了する代わりに、%1をシステムトレイに最小化しますか?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="387"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="379"/>
|
||||||
<source>You could change the option in Settings later.</source>
|
<source>You could change the option in Settings later.</source>
|
||||||
<translation>設定の選択肢は、後で変更することができます。</translation>
|
<translation>設定の選択肢は、後で変更することができます。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="440"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="432"/>
|
||||||
<source>%1 is still running here.</source>
|
<source>%1 is still running here.</source>
|
||||||
<translation>%1はまだ実行中です。</translation>
|
<translation>%1はまだ実行中です。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="599"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="593"/>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="610"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="604"/>
|
||||||
<source>Global</source>
|
<source>Global</source>
|
||||||
<translation>グローバル</translation>
|
<translation>グローバル</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="714"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="708"/>
|
||||||
<source>There is one export dialog running. Please close it first.</source>
|
<source>There is one export dialog running. Please close it first.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="835"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="829"/>
|
||||||
<source>Failed to load %n notebook(s).</source>
|
<source>Failed to load %n notebook(s).</source>
|
||||||
<translation type="unfinished">
|
<translation type="unfinished">
|
||||||
<numerusform></numerusform>
|
<numerusform></numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="836"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="830"/>
|
||||||
<source>These notebooks may be moved or deleted. It is recommended to remove them from configuration and open them with the correct root folder path later.
|
<source>These notebooks may be moved or deleted. It is recommended to remove them from configuration and open them with the correct root folder path later.
|
||||||
Remove them from the configuration?</source>
|
Remove them from the configuration?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -2173,16 +2168,6 @@ Remove them from the configuration?</source>
|
|||||||
<source>About Qt</source>
|
<source>About Qt</source>
|
||||||
<translation>Qtについて</translation>
|
<translation>Qtについて</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../../../utils/widgetutils.cpp" line="84"/>
|
|
||||||
<source>Are you sure to open link (%1)?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../utils/widgetutils.cpp" line="85"/>
|
|
||||||
<source>Malicious link might do harm to your device.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>vnotex::ManageNotebooksDialog</name>
|
<name>vnotex::ManageNotebooksDialog</name>
|
||||||
@ -2247,7 +2232,7 @@ Remove them from the configuration?</source>
|
|||||||
<name>vnotex::MarkdownEditor</name>
|
<name>vnotex::MarkdownEditor</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="250"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="250"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="748"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="747"/>
|
||||||
<source>Insert Link</source>
|
<source>Insert Link</source>
|
||||||
<translation>リンクを挿入</translation>
|
<translation>リンクを挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2263,7 +2248,7 @@ Remove them from the configuration?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="377"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="377"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1557"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1554"/>
|
||||||
<source>Failed to read local image file (%1) (%2).</source>
|
<source>Failed to read local image file (%1) (%2).</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2283,185 +2268,185 @@ Remove them from the configuration?</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="553"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="552"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="590"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="589"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="660"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="659"/>
|
||||||
<source>Insert From Clipboard</source>
|
<source>Insert From Clipboard</source>
|
||||||
<translation>クリップボードから挿入</translation>
|
<translation>クリップボードから挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="554"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="553"/>
|
||||||
<source>Insert From URL</source>
|
<source>Insert From URL</source>
|
||||||
<translation>URLから挿入</translation>
|
<translation>URLから挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="555"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="554"/>
|
||||||
<source>Insert From Image Data</source>
|
<source>Insert From Image Data</source>
|
||||||
<translation>イメージデータから挿入</translation>
|
<translation>イメージデータから挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="556"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="555"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="593"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="592"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="663"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="662"/>
|
||||||
<source>Insert As Image Link</source>
|
<source>Insert As Image Link</source>
|
||||||
<translation>イメージリンクとして挿入</translation>
|
<translation>イメージリンクとして挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="591"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="590"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="662"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="661"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="812"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="811"/>
|
||||||
<source>Insert As Image</source>
|
<source>Insert As Image</source>
|
||||||
<translation>イメージとして挿入</translation>
|
<translation>イメージとして挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="592"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="591"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="678"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="677"/>
|
||||||
<source>Insert As Text</source>
|
<source>Insert As Text</source>
|
||||||
<translation>テキストとして挿入</translation>
|
<translation>テキストとして挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="665"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="664"/>
|
||||||
<source>Insert As Relative Image Link</source>
|
<source>Insert As Relative Image Link</source>
|
||||||
<translation>相対イメージリンクとして挿入</translation>
|
<translation>相対イメージリンクとして挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="669"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="668"/>
|
||||||
<source>Insert As Link</source>
|
<source>Insert As Link</source>
|
||||||
<translation>リンクとして挿入</translation>
|
<translation>リンクとして挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="671"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="670"/>
|
||||||
<source>Insert As Relative Link</source>
|
<source>Insert As Relative Link</source>
|
||||||
<translation>相対リンクとして挿入</translation>
|
<translation>相対リンクとして挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="674"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="673"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="815"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="814"/>
|
||||||
<source>Attach And Insert Link</source>
|
<source>Attach And Insert Link</source>
|
||||||
<translation>リンクを添付して挿入</translation>
|
<translation>リンクを添付して挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="680"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="679"/>
|
||||||
<source>Insert File Content</source>
|
<source>Insert File Content</source>
|
||||||
<translation>ファイルの内容を挿入</translation>
|
<translation>ファイルの内容を挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="810"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="809"/>
|
||||||
<source>Insert From Clipboard (%n items)</source>
|
<source>Insert From Clipboard (%n items)</source>
|
||||||
<translation type="unfinished">
|
<translation type="unfinished">
|
||||||
<numerusform></numerusform>
|
<numerusform></numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="863"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="862"/>
|
||||||
<source>Insert Image From Clipboard</source>
|
<source>Insert Image From Clipboard</source>
|
||||||
<translation>クリップボードからイメージを挿入</translation>
|
<translation>クリップボードからイメージを挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="879"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="878"/>
|
||||||
<source>Insert Image From URL</source>
|
<source>Insert Image From URL</source>
|
||||||
<translation>URLからイメージを挿入</translation>
|
<translation>URLからイメージを挿入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1072"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1071"/>
|
||||||
<source>&Read</source>
|
<source>&Read</source>
|
||||||
<translation>読み取り(&R)</translation>
|
<translation>読み取り(&R)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1090"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1089"/>
|
||||||
<source>Rich Paste</source>
|
<source>Rich Paste</source>
|
||||||
<translation>リッチ貼り付け</translation>
|
<translation>リッチ貼り付け</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1090"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1089"/>
|
||||||
<source>Paste as Plain Text</source>
|
<source>Paste as Plain Text</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1099"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1098"/>
|
||||||
<source>Parse to Markdown and Paste</source>
|
<source>Parse to Markdown and Paste</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1111"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1110"/>
|
||||||
<source>Insert Snippet</source>
|
<source>Insert Snippet</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1476"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1473"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1575"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1572"/>
|
||||||
<source>Failed to upload image to image host (%1) as (%2).</source>
|
<source>Failed to upload image to image host (%1) as (%2).</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1655"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1652"/>
|
||||||
<source>View Image</source>
|
<source>View Image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1664"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1661"/>
|
||||||
<source>Copy Image URL</source>
|
<source>Copy Image URL</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1674"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1671"/>
|
||||||
<source>Copy Image</source>
|
<source>Copy Image</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1731"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1728"/>
|
||||||
<source>Copy In-Place Preview</source>
|
<source>Copy In-Place Preview</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1776"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1773"/>
|
||||||
<source>Open Link</source>
|
<source>Open Link</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1785"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1782"/>
|
||||||
<source>Copy Link</source>
|
<source>Copy Link</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1215"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1214"/>
|
||||||
<source>Fetching images to local...</source>
|
<source>Fetching images to local...</source>
|
||||||
<translation>ローカルにイメージを取得しています...</translation>
|
<translation>ローカルにイメージを取得しています...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1216"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1215"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1521"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1518"/>
|
||||||
<source>Abort</source>
|
<source>Abort</source>
|
||||||
<translation>中止</translation>
|
<translation>中止</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1221"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1220"/>
|
||||||
<source>Fetch Images To Local</source>
|
<source>Fetch Images To Local</source>
|
||||||
<translation>イメージをローカルに取得</translation>
|
<translation>イメージをローカルに取得</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1249"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1247"/>
|
||||||
<source>Fetching image (%1)</source>
|
<source>Fetching image (%1)</source>
|
||||||
<translation>イメージ (%1) を取得しています</translation>
|
<translation>イメージ (%1) を取得しています</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1488"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1485"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1526"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1523"/>
|
||||||
<source>Upload Images To Image Host</source>
|
<source>Upload Images To Image Host</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1492"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1489"/>
|
||||||
<source>None</source>
|
<source>None</source>
|
||||||
<translation type="unfinished">なし</translation>
|
<translation type="unfinished">なし</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1520"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1517"/>
|
||||||
<source>Uploading local images...</source>
|
<source>Uploading local images...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1548"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1545"/>
|
||||||
<source>Upload image (%1)</source>
|
<source>Upload image (%1)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2831,76 +2816,66 @@ Remove them from the configuration?</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::MarkdownViewWindow</name>
|
<name>vnotex::MarkdownViewWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="459"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="453"/>
|
||||||
<source>Markdown Viewer</source>
|
<source>Markdown Viewer</source>
|
||||||
<translation>Markdownビューア</translation>
|
<translation>Markdownビューア</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="808"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="800"/>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="840"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="832"/>
|
||||||
<source>Clear Obsolete Images</source>
|
<source>Clear Obsolete Images</source>
|
||||||
<translation>古いイメージをクリア</translation>
|
<translation>古いイメージをクリア</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="809"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="801"/>
|
||||||
<source>These images seems to be not in use anymore. Please confirm the deletion of them.</source>
|
<source>These images seems to be not in use anymore. Please confirm the deletion of them.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="810"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="802"/>
|
||||||
<source>Deleted local images could be found in the recycle bin of notebook if it is from a bundle notebook.</source>
|
<source>Deleted local images could be found in the recycle bin of notebook if it is from a bundle notebook.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="834"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="826"/>
|
||||||
<source>Clearing obsolete images...</source>
|
<source>Clearing obsolete images...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="835"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="827"/>
|
||||||
<source>Abort</source>
|
<source>Abort</source>
|
||||||
<translation type="unfinished">中止</translation>
|
<translation type="unfinished">中止</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="849"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="841"/>
|
||||||
<source>Clear image (%1)</source>
|
<source>Clear image (%1)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="861"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="853"/>
|
||||||
<source>Cleared %n obsolete images</source>
|
<source>Cleared %n obsolete images</source>
|
||||||
<translation type="unfinished">
|
<translation type="unfinished">
|
||||||
<numerusform></numerusform>
|
<numerusform></numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1286"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1278"/>
|
||||||
<source>View Mode Not Supported In Read Mode</source>
|
<source>View Mode Not Supported In Read Mode</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1304"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1296"/>
|
||||||
<source>Edit Only</source>
|
<source>Edit Only</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1315"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1307"/>
|
||||||
<source>Edit with Preview</source>
|
<source>Edit with Preview</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1424"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1011"/>
|
||||||
<source>Printed to PDF</source>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1020"/>
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1424"/>
|
|
||||||
<source>Failed to print to PDF</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1019"/>
|
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1028"/>
|
|
||||||
<source>Replace is not supported in read mode</source>
|
<source>Replace is not supported in read mode</source>
|
||||||
<translation>置換は読み取りモードではサポートされていません</translation>
|
<translation>置換は読み取りモードではサポートされていません</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2908,12 +2883,12 @@ Remove them from the configuration?</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::MarkdownViewer</name>
|
<name>vnotex::MarkdownViewer</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="136"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="131"/>
|
||||||
<source>&Edit</source>
|
<source>&Edit</source>
|
||||||
<translation>編集(&E)</translation>
|
<translation>編集(&E)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="421"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="411"/>
|
||||||
<source>Cross Copy</source>
|
<source>Cross Copy</source>
|
||||||
<translation>クロスコピー</translation>
|
<translation>クロスコピー</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -4021,7 +3996,7 @@ Description: %3</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::OutlineProvider</name>
|
<name>vnotex::OutlineProvider</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/outlineprovider.h" line="105"/>
|
<location filename="../../../widgets/outlineprovider.h" line="103"/>
|
||||||
<source>[EMPTY]</source>
|
<source>[EMPTY]</source>
|
||||||
<translation>[空]</translation>
|
<translation>[空]</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -5937,12 +5912,12 @@ Backup file last modified time: %2</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::WebViewExporter</name>
|
<name>vnotex::WebViewExporter</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../export/webviewexporter.cpp" line="355"/>
|
<location filename="../../../export/webviewexporter.cpp" line="354"/>
|
||||||
<source>Table of Contents</source>
|
<source>Table of Contents</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../export/webviewexporter.cpp" line="590"/>
|
<location filename="../../../export/webviewexporter.cpp" line="586"/>
|
||||||
<source>Copy output file (%1) to (%2).</source>
|
<source>Copy output file (%1) to (%2).</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
BIN
src/data/core/translations/vnote_zh_CN.qm
Normal file
@ -70,17 +70,17 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>QWebEnginePage</name>
|
<name>QWebEnginePage</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="313"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="303"/>
|
||||||
<source>&Back</source>
|
<source>&Back</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="314"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="304"/>
|
||||||
<source>&Forward</source>
|
<source>&Forward</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="315"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="305"/>
|
||||||
<source>&Reload</source>
|
<source>&Reload</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1110,12 +1110,12 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::FullScreenToggleAction</name>
|
<name>vnotex::FullScreenToggleAction</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="12"/>
|
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="11"/>
|
||||||
<source>F&ull Screen</source>
|
<source>F&ull Screen</source>
|
||||||
<translation>全屏(&U)</translation>
|
<translation>全屏(&U)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="14"/>
|
<location filename="../../../widgets/fullscreentoggleaction.cpp" line="13"/>
|
||||||
<source>Exit F&ull Screen</source>
|
<source>Exit F&ull Screen</source>
|
||||||
<translation>退出全屏(&U)</translation>
|
<translation>退出全屏(&U)</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1351,7 +1351,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../../../unitedentry/helpunitedentry.cpp" line="35"/>
|
<location filename="../../../unitedentry/helpunitedentry.cpp" line="35"/>
|
||||||
<source>Clear the input except the entry name</source>
|
<source>Clear the input except the entry name</source>
|
||||||
<translation>清除输入但保留入口名字</translation>
|
<translation>清楚输入但保留入口名字</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../unitedentry/helpunitedentry.cpp" line="36"/>
|
<location filename="../../../unitedentry/helpunitedentry.cpp" line="36"/>
|
||||||
@ -1802,55 +1802,55 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::MainWindow</name>
|
<name>vnotex::MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="819"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="813"/>
|
||||||
<source>Failed to check for updates (%1)</source>
|
<source>Failed to check for updates (%1)</source>
|
||||||
<translation>无法检查更新(%1)</translation>
|
<translation>无法检查更新(%1)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="821"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="815"/>
|
||||||
<source>Updates available: %1</source>
|
<source>Updates available: %1</source>
|
||||||
<translation>有可用更新: %1</translation>
|
<translation>有可用更新: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="107"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="104"/>
|
||||||
<source>Initializing core components...</source>
|
<source>Initializing core components...</source>
|
||||||
<translation>正在初始化核心组件...</translation>
|
<translation>正在初始化核心组件...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="385"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="377"/>
|
||||||
<source>Do you want to minimize %1 to system tray instead of quitting when closed?</source>
|
<source>Do you want to minimize %1 to system tray instead of quitting when closed?</source>
|
||||||
<translation>关闭时,是否将%1最小化到系统托盘而非退出?</translation>
|
<translation>关闭时,是否将%1最小化到系统托盘而非退出?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="387"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="379"/>
|
||||||
<source>You could change the option in Settings later.</source>
|
<source>You could change the option in Settings later.</source>
|
||||||
<translation>稍后可以在设置里面更改。</translation>
|
<translation>稍后可以在设置里面更改。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="440"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="432"/>
|
||||||
<source>%1 is still running here.</source>
|
<source>%1 is still running here.</source>
|
||||||
<translation>%1仍然在此运行。</translation>
|
<translation>%1仍然在此运行。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="599"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="593"/>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="610"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="604"/>
|
||||||
<source>Global</source>
|
<source>Global</source>
|
||||||
<translation>全局</translation>
|
<translation>全局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="714"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="708"/>
|
||||||
<source>There is one export dialog running. Please close it first.</source>
|
<source>There is one export dialog running. Please close it first.</source>
|
||||||
<translation>已有导出对话框运行。请先将其关闭。</translation>
|
<translation>已有导出对话框运行。请先将其关闭。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="835"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="829"/>
|
||||||
<source>Failed to load %n notebook(s).</source>
|
<source>Failed to load %n notebook(s).</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>无法加载 %n 个笔记本。</numerusform>
|
<numerusform>无法加载 %n 个笔记本。</numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/mainwindow.cpp" line="836"/>
|
<location filename="../../../widgets/mainwindow.cpp" line="830"/>
|
||||||
<source>These notebooks may be moved or deleted. It is recommended to remove them from configuration and open them with the correct root folder path later.
|
<source>These notebooks may be moved or deleted. It is recommended to remove them from configuration and open them with the correct root folder path later.
|
||||||
Remove them from the configuration?</source>
|
Remove them from the configuration?</source>
|
||||||
<translation>这些笔记本可能已被移动或者删除。推荐将其从配置中移除并稍后使用正确的根文件夹路径重新打开。
|
<translation>这些笔记本可能已被移动或者删除。推荐将其从配置中移除并稍后使用正确的根文件夹路径重新打开。
|
||||||
@ -2144,12 +2144,12 @@ Remove them from the configuration?</source>
|
|||||||
<translation>关于Qt</translation>
|
<translation>关于Qt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../main.cpp" line="135"/>
|
<location filename="../../../main.cpp" line="134"/>
|
||||||
<source>%1 failed to start.</source>
|
<source>%1 failed to start.</source>
|
||||||
<translation>%1无法启动。</translation>
|
<translation>%1无法启动。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../main.cpp" line="136"/>
|
<location filename="../../../main.cpp" line="135"/>
|
||||||
<source>Failed to initialize configuration manager. Please check if all the files are intact or reinstall the application.</source>
|
<source>Failed to initialize configuration manager. Please check if all the files are intact or reinstall the application.</source>
|
||||||
<translation>无法初始化配置管理器。请检查全部文件的完整性或者重新安装应用。</translation>
|
<translation>无法初始化配置管理器。请检查全部文件的完整性或者重新安装应用。</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2169,40 +2169,25 @@ Remove them from the configuration?</source>
|
|||||||
<translation>输出更多日志信息。</translation>
|
<translation>输出更多日志信息。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="25"/>
|
<location filename="../../../commandlineoptions.cpp" line="29"/>
|
||||||
<source>Log to stderr.</source>
|
|
||||||
<translation>打印日志到错误输出。</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../commandlineoptions.cpp" line="32"/>
|
|
||||||
<source>WebEngine remote debugging port.</source>
|
<source>WebEngine remote debugging port.</source>
|
||||||
<translation>WebEngine远程调试端口。</translation>
|
<translation>WebEngine远程调试端口。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="33"/>
|
<location filename="../../../commandlineoptions.cpp" line="30"/>
|
||||||
<source>port_number</source>
|
<source>port_number</source>
|
||||||
<translation>端口</translation>
|
<translation>端口</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="37"/>
|
<location filename="../../../commandlineoptions.cpp" line="34"/>
|
||||||
<source>WebEngine without sandbox.</source>
|
<source>WebEngine without sandbox.</source>
|
||||||
<translation>在非沙盒下运行WebEngine。</translation>
|
<translation>在非沙盒下运行WebEngine。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../commandlineoptions.cpp" line="41"/>
|
<location filename="../../../commandlineoptions.cpp" line="38"/>
|
||||||
<source>WebEngine with GPU disabled.</source>
|
<source>WebEngine with GPU disabled.</source>
|
||||||
<translation>WebEngine中禁用GPU。</translation>
|
<translation>WebEngine中禁用GPU。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="../../../utils/widgetutils.cpp" line="84"/>
|
|
||||||
<source>Are you sure to open link (%1)?</source>
|
|
||||||
<translation>确认打开链接 (%1)?</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../utils/widgetutils.cpp" line="85"/>
|
|
||||||
<source>Malicious link might do harm to your device.</source>
|
|
||||||
<translation>可疑的链接可能会损坏设备。</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>vnotex::ManageNotebooksDialog</name>
|
<name>vnotex::ManageNotebooksDialog</name>
|
||||||
@ -2271,7 +2256,7 @@ Remove them from the configuration?</source>
|
|||||||
<name>vnotex::MarkdownEditor</name>
|
<name>vnotex::MarkdownEditor</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="250"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="250"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="748"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="747"/>
|
||||||
<source>Insert Link</source>
|
<source>Insert Link</source>
|
||||||
<translation>插入链接</translation>
|
<translation>插入链接</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2287,7 +2272,7 @@ Remove them from the configuration?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="377"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="377"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1557"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1554"/>
|
||||||
<source>Failed to read local image file (%1) (%2).</source>
|
<source>Failed to read local image file (%1) (%2).</source>
|
||||||
<translation>无法读取本地图片文件(%1)(%2)。</translation>
|
<translation>无法读取本地图片文件(%1)(%2)。</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2307,185 +2292,185 @@ Remove them from the configuration?</source>
|
|||||||
<translation>更多高级粘贴,请尝试编辑器上下文菜单中的“多功能粘贴”和“解析为Markdown并粘贴”功能</translation>
|
<translation>更多高级粘贴,请尝试编辑器上下文菜单中的“多功能粘贴”和“解析为Markdown并粘贴”功能</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="553"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="552"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="590"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="589"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="660"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="659"/>
|
||||||
<source>Insert From Clipboard</source>
|
<source>Insert From Clipboard</source>
|
||||||
<translation>从剪切板插入</translation>
|
<translation>从剪切板插入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="554"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="553"/>
|
||||||
<source>Insert From URL</source>
|
<source>Insert From URL</source>
|
||||||
<translation>从URL插入</translation>
|
<translation>从URL插入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="555"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="554"/>
|
||||||
<source>Insert From Image Data</source>
|
<source>Insert From Image Data</source>
|
||||||
<translation>从图片数据插入</translation>
|
<translation>从图片数据插入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="556"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="555"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="593"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="592"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="663"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="662"/>
|
||||||
<source>Insert As Image Link</source>
|
<source>Insert As Image Link</source>
|
||||||
<translation>插入为图片链接</translation>
|
<translation>插入为图片链接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="591"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="590"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="662"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="661"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="812"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="811"/>
|
||||||
<source>Insert As Image</source>
|
<source>Insert As Image</source>
|
||||||
<translation>插入为图片</translation>
|
<translation>插入为图片</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="592"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="591"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="678"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="677"/>
|
||||||
<source>Insert As Text</source>
|
<source>Insert As Text</source>
|
||||||
<translation>插入为文本</translation>
|
<translation>插入为文本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="665"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="664"/>
|
||||||
<source>Insert As Relative Image Link</source>
|
<source>Insert As Relative Image Link</source>
|
||||||
<translation>插入为相对图片链接</translation>
|
<translation>插入为相对图片链接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="669"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="668"/>
|
||||||
<source>Insert As Link</source>
|
<source>Insert As Link</source>
|
||||||
<translation>插入为链接</translation>
|
<translation>插入为链接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="671"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="670"/>
|
||||||
<source>Insert As Relative Link</source>
|
<source>Insert As Relative Link</source>
|
||||||
<translation>插入为相对链接</translation>
|
<translation>插入为相对链接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="674"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="673"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="815"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="814"/>
|
||||||
<source>Attach And Insert Link</source>
|
<source>Attach And Insert Link</source>
|
||||||
<translation>添加为附件并插入链接</translation>
|
<translation>添加为附件并插入链接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="680"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="679"/>
|
||||||
<source>Insert File Content</source>
|
<source>Insert File Content</source>
|
||||||
<translation>插入文件内容</translation>
|
<translation>插入文件内容</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="810"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="809"/>
|
||||||
<source>Insert From Clipboard (%n items)</source>
|
<source>Insert From Clipboard (%n items)</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>从剪切板插入(%n项)</numerusform>
|
<numerusform>从剪切板插入(%n项)</numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="863"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="862"/>
|
||||||
<source>Insert Image From Clipboard</source>
|
<source>Insert Image From Clipboard</source>
|
||||||
<translation>从剪切板插入图片</translation>
|
<translation>从剪切板插入图片</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="879"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="878"/>
|
||||||
<source>Insert Image From URL</source>
|
<source>Insert Image From URL</source>
|
||||||
<translation>从URL插入图片</translation>
|
<translation>从URL插入图片</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1072"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1071"/>
|
||||||
<source>&Read</source>
|
<source>&Read</source>
|
||||||
<translation>阅读(&R)</translation>
|
<translation>阅读(&R)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1090"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1089"/>
|
||||||
<source>Rich Paste</source>
|
<source>Rich Paste</source>
|
||||||
<translation>多功能粘贴</translation>
|
<translation>多功能粘贴</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1090"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1089"/>
|
||||||
<source>Paste as Plain Text</source>
|
<source>Paste as Plain Text</source>
|
||||||
<translation>粘贴为纯文本</translation>
|
<translation>粘贴为纯文本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1099"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1098"/>
|
||||||
<source>Parse to Markdown and Paste</source>
|
<source>Parse to Markdown and Paste</source>
|
||||||
<translation>解析为Markodwn并粘贴</translation>
|
<translation>解析为Markodwn并粘贴</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1111"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1110"/>
|
||||||
<source>Insert Snippet</source>
|
<source>Insert Snippet</source>
|
||||||
<translation>插入片段</translation>
|
<translation>插入片段</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1476"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1473"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1575"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1572"/>
|
||||||
<source>Failed to upload image to image host (%1) as (%2).</source>
|
<source>Failed to upload image to image host (%1) as (%2).</source>
|
||||||
<translation>无法上传图片为(%2)到图床(%1)中。</translation>
|
<translation>无法上传图片为(%2)到图床(%1)中。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1655"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1652"/>
|
||||||
<source>View Image</source>
|
<source>View Image</source>
|
||||||
<translation>查看图片</translation>
|
<translation>查看图片</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1664"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1661"/>
|
||||||
<source>Copy Image URL</source>
|
<source>Copy Image URL</source>
|
||||||
<translation>复制图片地址</translation>
|
<translation>复制图片地址</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1674"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1671"/>
|
||||||
<source>Copy Image</source>
|
<source>Copy Image</source>
|
||||||
<translation>复制图片</translation>
|
<translation>复制图片</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1731"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1728"/>
|
||||||
<source>Copy In-Place Preview</source>
|
<source>Copy In-Place Preview</source>
|
||||||
<translation>复制原地预览</translation>
|
<translation>复制原地预览</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1776"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1773"/>
|
||||||
<source>Open Link</source>
|
<source>Open Link</source>
|
||||||
<translation>打开链接</translation>
|
<translation>打开链接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1785"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1782"/>
|
||||||
<source>Copy Link</source>
|
<source>Copy Link</source>
|
||||||
<translation>复制链接</translation>
|
<translation>复制链接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1215"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1214"/>
|
||||||
<source>Fetching images to local...</source>
|
<source>Fetching images to local...</source>
|
||||||
<translation>正在获取图片到本地...</translation>
|
<translation>正在获取图片到本地...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1216"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1215"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1521"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1518"/>
|
||||||
<source>Abort</source>
|
<source>Abort</source>
|
||||||
<translation>终止</translation>
|
<translation>终止</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1221"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1220"/>
|
||||||
<source>Fetch Images To Local</source>
|
<source>Fetch Images To Local</source>
|
||||||
<translation>获取图片到本地</translation>
|
<translation>获取图片到本地</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1249"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1247"/>
|
||||||
<source>Fetching image (%1)</source>
|
<source>Fetching image (%1)</source>
|
||||||
<translation>正在获取图片(%1)</translation>
|
<translation>正在获取图片(%1)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1488"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1485"/>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1526"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1523"/>
|
||||||
<source>Upload Images To Image Host</source>
|
<source>Upload Images To Image Host</source>
|
||||||
<translation>上传图片到图床</translation>
|
<translation>上传图片到图床</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1492"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1489"/>
|
||||||
<source>None</source>
|
<source>None</source>
|
||||||
<translation>无</translation>
|
<translation>无</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1520"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1517"/>
|
||||||
<source>Uploading local images...</source>
|
<source>Uploading local images...</source>
|
||||||
<translation>正在上传本地图片...</translation>
|
<translation>正在上传本地图片...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1548"/>
|
<location filename="../../../widgets/editors/markdowneditor.cpp" line="1545"/>
|
||||||
<source>Upload image (%1)</source>
|
<source>Upload image (%1)</source>
|
||||||
<translation>上传图片(%1)</translation>
|
<translation>上传图片(%1)</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2875,76 +2860,66 @@ Remove them from the configuration?</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::MarkdownViewWindow</name>
|
<name>vnotex::MarkdownViewWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="459"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="453"/>
|
||||||
<source>Markdown Viewer</source>
|
<source>Markdown Viewer</source>
|
||||||
<translation>Markdown查看器</translation>
|
<translation>Markdown查看器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="808"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="800"/>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="840"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="832"/>
|
||||||
<source>Clear Obsolete Images</source>
|
<source>Clear Obsolete Images</source>
|
||||||
<translation>清空无用图片</translation>
|
<translation>清空无用图片</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="809"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="801"/>
|
||||||
<source>These images seems to be not in use anymore. Please confirm the deletion of them.</source>
|
<source>These images seems to be not in use anymore. Please confirm the deletion of them.</source>
|
||||||
<translation>这些图片似乎已经不再使用。请确认并删除。</translation>
|
<translation>这些图片似乎已经不再使用。请确认并删除。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="810"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="802"/>
|
||||||
<source>Deleted local images could be found in the recycle bin of notebook if it is from a bundle notebook.</source>
|
<source>Deleted local images could be found in the recycle bin of notebook if it is from a bundle notebook.</source>
|
||||||
<translation>如果这是一个自包含笔记本,已删除的本地图片可以在笔记本回收站中找回。</translation>
|
<translation>如果这是一个自包含笔记本,已删除的本地图片可以在笔记本回收站中找回。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="834"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="826"/>
|
||||||
<source>Clearing obsolete images...</source>
|
<source>Clearing obsolete images...</source>
|
||||||
<translation>正在清空无用图片...</translation>
|
<translation>正在清空无用图片...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="835"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="827"/>
|
||||||
<source>Abort</source>
|
<source>Abort</source>
|
||||||
<translation>终止</translation>
|
<translation>终止</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="849"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="841"/>
|
||||||
<source>Clear image (%1)</source>
|
<source>Clear image (%1)</source>
|
||||||
<translation>清空图片(%1)</translation>
|
<translation>清空图片(%1)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="861"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="853"/>
|
||||||
<source>Cleared %n obsolete images</source>
|
<source>Cleared %n obsolete images</source>
|
||||||
<translation>
|
<translation>
|
||||||
<numerusform>清空 %n 无用图片</numerusform>
|
<numerusform>清空 %n 无用图片</numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1286"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1278"/>
|
||||||
<source>View Mode Not Supported In Read Mode</source>
|
<source>View Mode Not Supported In Read Mode</source>
|
||||||
<translation>阅读模式不支持查看模式</translation>
|
<translation>阅读模式不支持查看模式</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1304"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1296"/>
|
||||||
<source>Edit Only</source>
|
<source>Edit Only</source>
|
||||||
<translation>纯编辑</translation>
|
<translation>纯编辑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1315"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1307"/>
|
||||||
<source>Edit with Preview</source>
|
<source>Edit with Preview</source>
|
||||||
<translation>预览辅助的编辑</translation>
|
<translation>预览辅助的编辑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1424"/>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1011"/>
|
||||||
<source>Printed to PDF</source>
|
<location filename="../../../widgets/markdownviewwindow.cpp" line="1020"/>
|
||||||
<translation>已打印为PDF</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1424"/>
|
|
||||||
<source>Failed to print to PDF</source>
|
|
||||||
<translation>无法打印为PDF</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1019"/>
|
|
||||||
<location filename="../../../widgets/markdownviewwindow.cpp" line="1028"/>
|
|
||||||
<source>Replace is not supported in read mode</source>
|
<source>Replace is not supported in read mode</source>
|
||||||
<translation>阅读模式不支持替换</translation>
|
<translation>阅读模式不支持替换</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2952,12 +2927,12 @@ Remove them from the configuration?</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::MarkdownViewer</name>
|
<name>vnotex::MarkdownViewer</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="136"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="131"/>
|
||||||
<source>&Edit</source>
|
<source>&Edit</source>
|
||||||
<translation>编辑(&E)</translation>
|
<translation>编辑(&E)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/editors/markdownviewer.cpp" line="421"/>
|
<location filename="../../../widgets/editors/markdownviewer.cpp" line="411"/>
|
||||||
<source>Cross Copy</source>
|
<source>Cross Copy</source>
|
||||||
<translation>交叉复制</translation>
|
<translation>交叉复制</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -4093,7 +4068,7 @@ Description: %3</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::OutlineProvider</name>
|
<name>vnotex::OutlineProvider</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../widgets/outlineprovider.h" line="105"/>
|
<location filename="../../../widgets/outlineprovider.h" line="103"/>
|
||||||
<source>[EMPTY]</source>
|
<source>[EMPTY]</source>
|
||||||
<translation>[空]</translation>
|
<translation>[空]</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -6037,12 +6012,12 @@ Backup file last modified time: %2</source>
|
|||||||
<context>
|
<context>
|
||||||
<name>vnotex::WebViewExporter</name>
|
<name>vnotex::WebViewExporter</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../export/webviewexporter.cpp" line="355"/>
|
<location filename="../../../export/webviewexporter.cpp" line="354"/>
|
||||||
<source>Table of Contents</source>
|
<source>Table of Contents</source>
|
||||||
<translation>目录</translation>
|
<translation>目录</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../export/webviewexporter.cpp" line="590"/>
|
<location filename="../../../export/webviewexporter.cpp" line="586"/>
|
||||||
<source>Copy output file (%1) to (%2).</source>
|
<source>Copy output file (%1) to (%2).</source>
|
||||||
<translation>复制输出文件(%1)为(%2)。</translation>
|
<translation>复制输出文件(%1)为(%2)。</translation>
|
||||||
</message>
|
</message>
|
||||||
|
BIN
src/data/core/translations/vtextedit_ja.qm
Normal file
BIN
src/data/core/translations/vtextedit_zh_CN.qm
Normal file
@ -10,4 +10,4 @@ Icon=vnote
|
|||||||
Terminal=false
|
Terminal=false
|
||||||
Exec=vnote %F
|
Exec=vnote %F
|
||||||
MimeType=text/markdown;
|
MimeType=text/markdown;
|
||||||
Categories=Utility
|
Categories=Qt;Utility;TextEditor;Office;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"metadata" : {
|
"metadata" : {
|
||||||
"//comment": "When releasing new version, please go through the following configs to check if override is needed.",
|
"//comment": "When releasing new version, please go through the following configs to check if override is needed.",
|
||||||
"//Comment": "markdown_editor#override_viewer_resource",
|
"//Comment": "markdown_editor#override_viewer_resource",
|
||||||
"version" : "3.19.2"
|
"version" : "3.17.0"
|
||||||
},
|
},
|
||||||
"core" : {
|
"core" : {
|
||||||
"theme" : "pure",
|
"theme" : "pure",
|
||||||
@ -325,7 +325,6 @@
|
|||||||
"web/js/markdown-it/markdownItAnchor.umd.js",
|
"web/js/markdown-it/markdownItAnchor.umd.js",
|
||||||
"web/js/markdown-it/markdownItTocDoneRight.umd.js",
|
"web/js/markdown-it/markdownItTocDoneRight.umd.js",
|
||||||
"web/js/markdown-it/markdown-it-implicit-figure.js",
|
"web/js/markdown-it/markdown-it-implicit-figure.js",
|
||||||
"web/js/markdown-it/markdown-it-mark.min.js",
|
|
||||||
"web/js/markdownit.js"
|
"web/js/markdownit.js"
|
||||||
],
|
],
|
||||||
"styles" : [
|
"styles" : [
|
||||||
@ -463,7 +462,7 @@
|
|||||||
"//comment" : "Whether fetch images to local in Parse To Markdown And Paste",
|
"//comment" : "Whether fetch images to local in Parse To Markdown And Paste",
|
||||||
"fetch_images_in_parse_and_paste" : true,
|
"fetch_images_in_parse_and_paste" : true,
|
||||||
"//comment" : "Whether protect from Cross-Site Scripting attack",
|
"//comment" : "Whether protect from Cross-Site Scripting attack",
|
||||||
"protect_from_xss" : true,
|
"protect_from_xss" : false,
|
||||||
"//comment" : "Whether allow HTML tags in source",
|
"//comment" : "Whether allow HTML tags in source",
|
||||||
"html_tag" : true,
|
"html_tag" : true,
|
||||||
"//comment" : "Whether auto break a line with '\\n'",
|
"//comment" : "Whether auto break a line with '\\n'",
|
||||||
|
@ -213,11 +213,6 @@ This is the 1^st^ superscript.
|
|||||||
This is the H~2~O subscript.
|
This is the H~2~O subscript.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Mark
|
|
||||||
```md
|
|
||||||
Let's mark the ==word==.
|
|
||||||
```
|
|
||||||
|
|
||||||
### Alert
|
### Alert
|
||||||
```md
|
```md
|
||||||
::: alert-info
|
::: alert-info
|
||||||
|
@ -59,18 +59,6 @@ Expand the selection to the beginning or end of current paragraph.
|
|||||||
Expand the selection to the beginning or end of current line.
|
Expand the selection to the beginning or end of current line.
|
||||||
- `Ctrl+Shift+Home`, `Ctrl+Shift+End`
|
- `Ctrl+Shift+Home`, `Ctrl+Shift+End`
|
||||||
Expand the selection to the beginning or end of current note.
|
Expand the selection to the beginning or end of current note.
|
||||||
- `Ctrl+Shift+G`
|
|
||||||
Go to line.
|
|
||||||
- `Ctrl+C/X`
|
|
||||||
Copy/Cut line if there is no selection.
|
|
||||||
- `Ctrl+L`
|
|
||||||
Select line.
|
|
||||||
- `Alt+Up/Down`
|
|
||||||
Move line up/down.
|
|
||||||
- `Shift+Alt+Up/Down`
|
|
||||||
Copy line up/down.
|
|
||||||
- `Ctrl+Shift+K`
|
|
||||||
Delete line.
|
|
||||||
|
|
||||||
## Markdown Editor
|
## Markdown Editor
|
||||||
### Read Mode
|
### Read Mode
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Welcome to VNote
|
# Welcome to VNote
|
||||||
A pleasant note-taking platform.
|
A pleasant note-taking platform.
|
||||||
|
|
||||||
For more information, please visit [**VNote's Home Page**](https://vnotex.github.io/vnote).
|
For more information, please visit [**VNote's Home Page**](https://vnotex.github.io/vnote) or [Home Page on Gitee](https://tamlok.gitee.io/vnote).
|
||||||
|
|
||||||
## FAQs
|
## FAQs
|
||||||
* Hover the mouse over buttons to get detailed information.
|
* Hover the mouse over buttons to get detailed information.
|
||||||
@ -11,4 +11,4 @@ For more information, please visit [**VNote's Home Page**](https://vnotex.github
|
|||||||
* Feedbacks are appreciated! Please [post an issue](https://github.com/vnotex/vnote/issues) on GitHub if there is any.
|
* Feedbacks are appreciated! Please [post an issue](https://github.com/vnotex/vnote/issues) on GitHub if there is any.
|
||||||
|
|
||||||
### Windows Users
|
### Windows Users
|
||||||
* If VNote hangs frequently or behaves unexpectedly in interface, please check the **OpenGL** option. Check details [here](https://github.com/vnotex/vnote/issues/853).
|
* if VNote hangs frequently or behaves unexpectedly in interface, please check the **OpenGL** option. [Details here](https://github.com/vnotex/vnote/issues/853).
|
||||||
|
@ -213,11 +213,6 @@ This is the 1^st^ superscript.
|
|||||||
This is the H~2~O subscript.
|
This is the H~2~O subscript.
|
||||||
```
|
```
|
||||||
|
|
||||||
### 标记
|
|
||||||
```md
|
|
||||||
Let's mark the ==word==.
|
|
||||||
```
|
|
||||||
|
|
||||||
### 警告
|
### 警告
|
||||||
```md
|
```md
|
||||||
::: alert-info
|
::: alert-info
|
||||||
|
@ -59,18 +59,6 @@ VNote的很多部件均支持`Ctrl+J`和`Ctrl+K`导航。
|
|||||||
扩展选定到行首和行尾。
|
扩展选定到行首和行尾。
|
||||||
- `Ctrl+Shift+Home`, `Ctrl+Shift+End`
|
- `Ctrl+Shift+Home`, `Ctrl+Shift+End`
|
||||||
扩展选定到笔记开始或结尾处。
|
扩展选定到笔记开始或结尾处。
|
||||||
- `Ctrl+Shift+G`
|
|
||||||
跳转到指定行。
|
|
||||||
- `Ctrl+C/X`
|
|
||||||
在没有选中文本时复制/剪切整行。
|
|
||||||
- `Ctrl+L`
|
|
||||||
选择当前行。
|
|
||||||
- `Alt+Up/Down`
|
|
||||||
向上/向下移动行。
|
|
||||||
- `Shift+Alt+Up/Down`
|
|
||||||
向上/向下复制行。
|
|
||||||
- `Ctrl+Shift+K`
|
|
||||||
删除行。
|
|
||||||
|
|
||||||
## Markdown 编辑器
|
## Markdown 编辑器
|
||||||
### 阅读模式
|
### 阅读模式
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# 欢迎使用 VNote
|
# 欢迎使用 VNote
|
||||||
一个舒适的笔记平台。
|
一个舒适的笔记平台。
|
||||||
|
|
||||||
更多信息,请访问[VNote主页](https://vnotex.github.io/vnote)。
|
更多信息,请访问[VNote主页](https://vnotex.github.io/vnote)或者[由Gitee托管的主页](https://tamlok.gitee.io/vnote)。
|
||||||
|
|
||||||
## 常见问题
|
## 常见问题
|
||||||
* 将鼠标悬停在按钮上可以获取详细信息。
|
* 将鼠标悬停在按钮上可以获取详细信息。
|
||||||
|
@ -49,10 +49,8 @@
|
|||||||
<file>web/js/markdown-it/markdown-it-sup.min.js</file>
|
<file>web/js/markdown-it/markdown-it-sup.min.js</file>
|
||||||
<file>web/js/markdown-it/markdown-it-task-lists.js</file>
|
<file>web/js/markdown-it/markdown-it-task-lists.js</file>
|
||||||
<file>web/js/markdown-it/markdown-it-texmath.js</file>
|
<file>web/js/markdown-it/markdown-it-texmath.js</file>
|
||||||
<file>web/js/markdown-it/markdown-it-mark.min.js</file>
|
|
||||||
<file>web/js/markdown-it/markdown-it-inject-linenumbers.js</file>
|
<file>web/js/markdown-it/markdown-it-inject-linenumbers.js</file>
|
||||||
<file>web/js/markdown-it/xss.min.js</file>
|
<file>web/js/markdown-it/markdown-it-xss.min.js</file>
|
||||||
<file>web/js/markdown-it/markdown-it-xss.js</file>
|
|
||||||
<file>web/js/markdown-it/markdown-it-implicit-figure.js</file>
|
<file>web/js/markdown-it/markdown-it-implicit-figure.js</file>
|
||||||
<file>web/js/markdown-it/markdown-it.min.js</file>
|
<file>web/js/markdown-it/markdown-it.min.js</file>
|
||||||
<file>web/js/markdownit.js</file>
|
<file>web/js/markdownit.js</file>
|
||||||
@ -349,7 +347,6 @@
|
|||||||
<file>themes/moonlight/checkbox_unchecked.svg</file>
|
<file>themes/moonlight/checkbox_unchecked.svg</file>
|
||||||
<file>themes/moonlight/checkbox_unchecked_disabled.svg</file>
|
<file>themes/moonlight/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/moonlight/close.svg</file>
|
<file>themes/moonlight/close.svg</file>
|
||||||
<file>themes/moonlight/expand_toolbar.svg</file>
|
|
||||||
<file>themes/moonlight/close_grey.svg</file>
|
<file>themes/moonlight/close_grey.svg</file>
|
||||||
<file>themes/moonlight/cover.png</file>
|
<file>themes/moonlight/cover.png</file>
|
||||||
<file>themes/moonlight/down.svg</file>
|
<file>themes/moonlight/down.svg</file>
|
||||||
@ -382,7 +379,6 @@
|
|||||||
<file>themes/pure/checkbox_unchecked.svg</file>
|
<file>themes/pure/checkbox_unchecked.svg</file>
|
||||||
<file>themes/pure/checkbox_unchecked_disabled.svg</file>
|
<file>themes/pure/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/pure/close.svg</file>
|
<file>themes/pure/close.svg</file>
|
||||||
<file>themes/pure/expand_toolbar.svg</file>
|
|
||||||
<file>themes/pure/close_grey.svg</file>
|
<file>themes/pure/close_grey.svg</file>
|
||||||
<file>themes/pure/cover.png</file>
|
<file>themes/pure/cover.png</file>
|
||||||
<file>themes/pure/down.svg</file>
|
<file>themes/pure/down.svg</file>
|
||||||
@ -415,7 +411,6 @@
|
|||||||
<file>themes/solarized-dark/checkbox_unchecked.svg</file>
|
<file>themes/solarized-dark/checkbox_unchecked.svg</file>
|
||||||
<file>themes/solarized-dark/checkbox_unchecked_disabled.svg</file>
|
<file>themes/solarized-dark/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/solarized-dark/close.svg</file>
|
<file>themes/solarized-dark/close.svg</file>
|
||||||
<file>themes/solarized-dark/expand_toolbar.svg</file>
|
|
||||||
<file>themes/solarized-dark/close_grey.svg</file>
|
<file>themes/solarized-dark/close_grey.svg</file>
|
||||||
<file>themes/solarized-dark/cover.png</file>
|
<file>themes/solarized-dark/cover.png</file>
|
||||||
<file>themes/solarized-dark/down.svg</file>
|
<file>themes/solarized-dark/down.svg</file>
|
||||||
@ -448,7 +443,6 @@
|
|||||||
<file>themes/solarized-light/checkbox_unchecked.svg</file>
|
<file>themes/solarized-light/checkbox_unchecked.svg</file>
|
||||||
<file>themes/solarized-light/checkbox_unchecked_disabled.svg</file>
|
<file>themes/solarized-light/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/solarized-light/close.svg</file>
|
<file>themes/solarized-light/close.svg</file>
|
||||||
<file>themes/solarized-light/expand_toolbar.svg</file>
|
|
||||||
<file>themes/solarized-light/close_grey.svg</file>
|
<file>themes/solarized-light/close_grey.svg</file>
|
||||||
<file>themes/solarized-light/cover.png</file>
|
<file>themes/solarized-light/cover.png</file>
|
||||||
<file>themes/solarized-light/down.svg</file>
|
<file>themes/solarized-light/down.svg</file>
|
||||||
@ -808,7 +802,6 @@
|
|||||||
<file>themes/vscode-dark/checkbox_unchecked.svg</file>
|
<file>themes/vscode-dark/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vscode-dark/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vscode-dark/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vscode-dark/close.svg</file>
|
<file>themes/vscode-dark/close.svg</file>
|
||||||
<file>themes/vscode-dark/expand_toolbar.svg</file>
|
|
||||||
<file>themes/vscode-dark/close_grey.svg</file>
|
<file>themes/vscode-dark/close_grey.svg</file>
|
||||||
<file>themes/vscode-dark/cover.png</file>
|
<file>themes/vscode-dark/cover.png</file>
|
||||||
<file>themes/vscode-dark/down.svg</file>
|
<file>themes/vscode-dark/down.svg</file>
|
||||||
@ -842,7 +835,6 @@
|
|||||||
<file>themes/vue-light/checkbox_unchecked.svg</file>
|
<file>themes/vue-light/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vue-light/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vue-light/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vue-light/close.svg</file>
|
<file>themes/vue-light/close.svg</file>
|
||||||
<file>themes/vue-light/expand_toolbar.svg</file>
|
|
||||||
<file>themes/vue-light/close_grey.svg</file>
|
<file>themes/vue-light/close_grey.svg</file>
|
||||||
<file>themes/vue-light/cover.png</file>
|
<file>themes/vue-light/cover.png</file>
|
||||||
<file>themes/vue-light/down.svg</file>
|
<file>themes/vue-light/down.svg</file>
|
||||||
@ -875,7 +867,6 @@
|
|||||||
<file>themes/vue-dark/checkbox_unchecked.svg</file>
|
<file>themes/vue-dark/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vue-dark/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vue-dark/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vue-dark/close.svg</file>
|
<file>themes/vue-dark/close.svg</file>
|
||||||
<file>themes/vue-dark/expand_toolbar.svg</file>
|
|
||||||
<file>themes/vue-dark/close_grey.svg</file>
|
<file>themes/vue-dark/close_grey.svg</file>
|
||||||
<file>themes/vue-dark/cover.png</file>
|
<file>themes/vue-dark/cover.png</file>
|
||||||
<file>themes/vue-dark/down.svg</file>
|
<file>themes/vue-dark/down.svg</file>
|
||||||
@ -912,7 +903,6 @@
|
|||||||
<file>themes/vx-idea/checkbox_unchecked.svg</file>
|
<file>themes/vx-idea/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vx-idea/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vx-idea/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vx-idea/close.svg</file>
|
<file>themes/vx-idea/close.svg</file>
|
||||||
<file>themes/vx-idea/expand_toolbar.svg</file>
|
|
||||||
<file>themes/vx-idea/close_grey.svg</file>
|
<file>themes/vx-idea/close_grey.svg</file>
|
||||||
<file>themes/vx-idea/cover.png</file>
|
<file>themes/vx-idea/cover.png</file>
|
||||||
<file>themes/vx-idea/down.svg</file>
|
<file>themes/vx-idea/down.svg</file>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
|
Before Width: | Height: | Size: 891 B |
@ -5,6 +5,7 @@
|
|||||||
* same specificity and the rule that appears last takes precedence.
|
* same specificity and the rule that appears last takes precedence.
|
||||||
* VNote specific syntax:
|
* VNote specific syntax:
|
||||||
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
||||||
|
* - $2px: 2 will be scaled by multiplying current display scaled factor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QWidget {
|
QWidget {
|
||||||
@ -147,16 +148,13 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
qproperty-icon: url(expand_toolbar.svg);
|
background-color: @widgets#qtoolbar#extension#bg;
|
||||||
background-color: @widgets#qtoolbutton#bg;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbutton#hover#bg;
|
background-color: @widgets#qtoolbar#extension#hover#bg;
|
||||||
}
|
margin: 30px;
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
|
||||||
background-color: @widgets#qtoolbutton#pressed#bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
@ -588,7 +586,7 @@ QTabBar::close-button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTabBar::scroller {
|
QTabBar::scroller {
|
||||||
width: 20px;
|
width: $20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabBar QToolButton {
|
QTabBar QToolButton {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* same specificity and the rule that appears last takes precedence.
|
* same specificity and the rule that appears last takes precedence.
|
||||||
* VNote specific syntax:
|
* VNote specific syntax:
|
||||||
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
||||||
|
* - $2px: 2 will be scaled by multiplying current display scaled factor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QWidget[HitSettingWidget="true"] {
|
QWidget[HitSettingWidget="true"] {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#222222"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#222222"></path></svg>
|
|
Before Width: | Height: | Size: 891 B |
@ -5,6 +5,7 @@
|
|||||||
* same specificity and the rule that appears last takes precedence.
|
* same specificity and the rule that appears last takes precedence.
|
||||||
* VNote specific syntax:
|
* VNote specific syntax:
|
||||||
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
||||||
|
* - $2px: 2 will be scaled by multiplying current display scaled factor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QWidget {
|
QWidget {
|
||||||
@ -166,16 +167,13 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
qproperty-icon: url(expand_toolbar.svg);
|
background-color: @widgets#qtoolbar#extension#bg;
|
||||||
background-color: @widgets#qtoolbutton#bg;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbutton#hover#bg;
|
background-color: @widgets#qtoolbar#extension#hover#bg;
|
||||||
}
|
margin: 30px;
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
|
||||||
background-color: @widgets#qtoolbutton#pressed#bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
@ -626,7 +624,7 @@ QTabBar::close-button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTabBar::scroller {
|
QTabBar::scroller {
|
||||||
width: 20px;
|
width: $20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabBar QToolButton {
|
QTabBar QToolButton {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
|
Before Width: | Height: | Size: 891 B |
@ -5,6 +5,7 @@
|
|||||||
* same specificity and the rule that appears last takes precedence.
|
* same specificity and the rule that appears last takes precedence.
|
||||||
* VNote specific syntax:
|
* VNote specific syntax:
|
||||||
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
||||||
|
* - $2px: 2 will be scaled by multiplying current display scaled factor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QWidget {
|
QWidget {
|
||||||
@ -143,16 +144,13 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
qproperty-icon: url(expand_toolbar.svg);
|
background-color: @widgets#qtoolbar#extension#bg;
|
||||||
background-color: @widgets#qtoolbutton#bg;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbutton#hover#bg;
|
background-color: @widgets#qtoolbar#extension#hover#bg;
|
||||||
}
|
margin: 30px;
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
|
||||||
background-color: @widgets#qtoolbutton#pressed#bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
@ -584,7 +582,7 @@ QTabBar::close-button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTabBar::scroller {
|
QTabBar::scroller {
|
||||||
width: 20px;
|
width: $20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabBar QToolButton {
|
QTabBar QToolButton {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
|
Before Width: | Height: | Size: 891 B |
@ -5,6 +5,7 @@
|
|||||||
* same specificity and the rule that appears last takes precedence.
|
* same specificity and the rule that appears last takes precedence.
|
||||||
* VNote specific syntax:
|
* VNote specific syntax:
|
||||||
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
||||||
|
* - $2px: 2 will be scaled by multiplying current display scaled factor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QWidget {
|
QWidget {
|
||||||
@ -143,16 +144,13 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
qproperty-icon: url(expand_toolbar.svg);
|
background-color: @widgets#qtoolbar#extension#bg;
|
||||||
background-color: @widgets#qtoolbutton#bg;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbutton#hover#bg;
|
background-color: @widgets#qtoolbar#extension#hover#bg;
|
||||||
}
|
margin: 30px;
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
|
||||||
background-color: @widgets#qtoolbutton#pressed#bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
@ -584,7 +582,7 @@ QTabBar::close-button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTabBar::scroller {
|
QTabBar::scroller {
|
||||||
width: 20px;
|
width: $20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabBar QToolButton {
|
QTabBar QToolButton {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
|
Before Width: | Height: | Size: 891 B |
@ -5,6 +5,7 @@
|
|||||||
* same specificity and the rule that appears last takes precedence.
|
* same specificity and the rule that appears last takes precedence.
|
||||||
* VNote specific syntax:
|
* VNote specific syntax:
|
||||||
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
||||||
|
* - $2px: 2 will be scaled by multiplying current display scaled factor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QWidget {
|
QWidget {
|
||||||
@ -143,16 +144,13 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
qproperty-icon: url(expand_toolbar.svg);
|
background-color: @widgets#qtoolbar#extension#bg;
|
||||||
background-color: @widgets#qtoolbutton#bg;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbutton#hover#bg;
|
background-color: @widgets#qtoolbar#extension#hover#bg;
|
||||||
}
|
margin: 30px;
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
|
||||||
background-color: @widgets#qtoolbutton#pressed#bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
@ -584,7 +582,7 @@ QTabBar::close-button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTabBar::scroller {
|
QTabBar::scroller {
|
||||||
width: 20px;
|
width: $20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabBar QToolButton {
|
QTabBar QToolButton {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#4d5765"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#4d5765"></path></svg>
|
|
Before Width: | Height: | Size: 891 B |
@ -5,6 +5,7 @@
|
|||||||
* same specificity and the rule that appears last takes precedence.
|
* same specificity and the rule that appears last takes precedence.
|
||||||
* VNote specific syntax:
|
* VNote specific syntax:
|
||||||
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
* - @widgets#toolbox#title#border: reference to a color defined in palette.ini;
|
||||||
|
* - $2px: 2 will be scaled by multiplying current display scaled factor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QWidget {
|
QWidget {
|
||||||
@ -148,16 +149,13 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
qproperty-icon: url(expand_toolbar.svg);
|
background-color: @widgets#qtoolbar#extension#bg;
|
||||||
background-color: @widgets#qtoolbutton#bg;
|
margin: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbutton#hover#bg;
|
background-color: @widgets#qtoolbar#extension#hover#bg;
|
||||||
}
|
margin: 30px;
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
|
||||||
background-color: @widgets#qtoolbutton#pressed#bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
@ -589,7 +587,7 @@ QTabBar::close-button:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTabBar::scroller {
|
QTabBar::scroller {
|
||||||
width: 20px;
|
width: $20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTabBar QToolButton {
|
QTabBar QToolButton {
|
||||||
|