├── .clang-format ├── .clang-tidy ├── .github ├── actions │ └── install-dependencies │ │ └── action.yml ├── dependabot.yml └── workflows │ ├── clean_cache.yml │ ├── cmake.yml │ ├── codeql.yml │ ├── delete_workflow.yml │ ├── qmake.yml │ ├── readme.yml │ └── toolchain.yml ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── Qt-App.pro ├── README.en.md ├── README.md ├── cmake ├── build_info.cmake ├── common.cmake ├── qt.cmake ├── qt_utils.cmake ├── utils.cmake └── vcpkg.cmake ├── common.pri ├── docs ├── CrashReport.jpg └── Qt-App.jpg ├── examples ├── CMakeLists.txt ├── examples.pro └── i18n │ ├── CMakeLists.txt │ ├── i18n.pro │ └── main.cc ├── packaging ├── fonts.cmake ├── macos │ ├── distribution.xml │ ├── dmgbuild.py │ ├── package.sh │ ├── resources │ │ ├── conclusion.html │ │ └── welcome.html │ ├── scripts │ │ ├── postinstall │ │ └── preinstall │ └── utils.sh ├── rename_packages.sh ├── ubuntu │ ├── DEBIAN │ │ ├── control │ │ ├── postinst │ │ ├── postrm │ │ ├── preinst │ │ └── prerm │ ├── Qt-App.desktop │ ├── Qt-App.sh │ ├── package.sh │ └── usr │ │ └── share │ │ └── applications │ │ └── Qt-App.desktop └── windows │ ├── ChineseSimplified.isl │ ├── app.iss │ ├── package.ps1 │ └── utils.ps1 ├── scripts └── windows │ └── setVsDev.ps1 ├── src ├── 3rdparty │ ├── 3rdparty.pri │ ├── 3rdparty.pro │ ├── CMakeLists.txt │ ├── qtsingleapplication │ │ ├── CMakeLists.txt │ │ ├── README.txt │ │ ├── namespace.patch │ │ ├── qtlocalpeer.cpp │ │ ├── qtlocalpeer.h │ │ ├── qtsingleapplication.cpp │ │ ├── qtsingleapplication.h │ │ └── qtsingleapplication.pri │ └── thirdparty_global.hpp ├── CMakeLists.txt ├── aggregation │ ├── CMakeLists.txt │ ├── aggregate.cpp │ ├── aggregate.h │ ├── aggregation.pro │ ├── aggregation.qbs │ ├── aggregation_global.h │ └── examples │ │ └── text │ │ ├── main.cpp │ │ ├── main.h │ │ ├── main.ui │ │ └── myinterfaces.h ├── apps │ ├── CMakeLists.txt │ ├── app │ │ ├── CMakeLists.txt │ │ ├── PkgInfo │ │ ├── app.icns │ │ ├── app.ico │ │ ├── app.pro │ │ ├── app.rc │ │ └── main.cc │ ├── apps.pro │ └── crashreport │ │ ├── CMakeLists.txt │ │ ├── app.icns │ │ ├── app.ico │ │ ├── app.rc │ │ ├── crashreport.pro │ │ ├── crashwidgets.cc │ │ ├── crashwidgets.hpp │ │ └── main.cc ├── core │ ├── CMakeLists.txt │ ├── core.pro │ ├── core_global.h │ ├── corewidget.cc │ └── corewidget.hpp ├── dump │ ├── CMakeLists.txt │ ├── breakpad.cc │ ├── breakpad.hpp │ ├── crashpad.cc │ ├── crashpad.hpp │ ├── dump.pro │ └── dump_global.hpp ├── extensionsystem │ ├── CMakeLists.txt │ ├── extensionsystem.pro │ ├── extensionsystem.qbs │ ├── extensionsystem_global.h │ ├── extensionsystemtr.h │ ├── invoker.cpp │ ├── invoker.h │ ├── iplugin.cpp │ ├── iplugin.h │ ├── optionsparser.cpp │ ├── optionsparser.h │ ├── plugindetailsview.cpp │ ├── plugindetailsview.h │ ├── pluginerroroverview.cpp │ ├── pluginerroroverview.h │ ├── pluginerrorview.cpp │ ├── pluginerrorview.h │ ├── pluginmanager.cpp │ ├── pluginmanager.h │ ├── pluginmanager_p.h │ ├── pluginspec.cpp │ ├── pluginspec.h │ ├── pluginspec_p.h │ ├── pluginview.cpp │ └── pluginview.h ├── gui │ ├── CMakeLists.txt │ ├── camelcasecursor.cpp │ ├── camelcasecursor.h │ ├── categorysortfiltermodel.cpp │ ├── categorysortfiltermodel.h │ ├── completinglineedit.cpp │ ├── completinglineedit.h │ ├── dialog.cc │ ├── dialog.hpp │ ├── fancylineedit.cpp │ ├── fancylineedit.h │ ├── gui.pro │ ├── gui_global.hpp │ ├── historycompleter.cpp │ ├── historycompleter.h │ ├── itemviews.cpp │ ├── itemviews.h │ ├── mainwidget.cc │ ├── mainwidget.hpp │ ├── messagebox.cpp │ ├── messagebox.h │ ├── multitextcursor.cpp │ ├── multitextcursor.h │ ├── pushbutton.cc │ ├── pushbutton.hpp │ ├── treemodel.cpp │ ├── treemodel.h │ ├── waitwidget.cpp │ └── waitwidget.h ├── lib.pri ├── plugins │ ├── CMakeLists.txt │ ├── aboutplugin │ │ ├── CMakeLists.txt │ │ ├── aboutplugin.cc │ │ ├── aboutplugin.hpp │ │ ├── aboutplugin.json │ │ ├── aboutplugin.pro │ │ ├── aboutwidget.cc │ │ └── aboutwidget.hpp │ ├── coreplugin │ │ ├── CMakeLists.txt │ │ ├── configwidget.cpp │ │ ├── configwidget.h │ │ ├── coreplugin.cpp │ │ ├── coreplugin.h │ │ ├── coreplugin.json │ │ ├── coreplugin.pro │ │ ├── coreplugintr.h │ │ ├── mainwindow.cpp │ │ ├── mainwindow.h │ │ ├── plugindialog.cpp │ │ └── plugindialog.h │ ├── guiplugin │ │ ├── CMakeLists.txt │ │ ├── guiplugin.cc │ │ ├── guiplugin.hpp │ │ ├── guiplugin.json │ │ ├── guiplugin.pro │ │ ├── guiwidget.cc │ │ └── guiwidget.hpp │ ├── hashplugin │ │ ├── CMakeLists.txt │ │ ├── cpubenchthread.cc │ │ ├── cpubenchthread.hpp │ │ ├── hashplugin.cc │ │ ├── hashplugin.hpp │ │ ├── hashplugin.json │ │ ├── hashplugin.pro │ │ ├── hashthread.cc │ │ ├── hashthread.hpp │ │ ├── hashwidget.cc │ │ └── hashwidget.hpp │ ├── helloplugin │ │ ├── CMakeLists.txt │ │ ├── helloplugin.cc │ │ ├── helloplugin.hpp │ │ ├── helloplugin.json │ │ ├── helloplugin.pro │ │ ├── hellowidget.cc │ │ └── hellowidget.hpp │ ├── plugins.pri │ ├── plugins.pro │ └── systeminfoplugin │ │ ├── CMakeLists.txt │ │ ├── systeminfoplugin.cc │ │ ├── systeminfoplugin.hpp │ │ ├── systeminfoplugin.json │ │ ├── systeminfoplugin.pro │ │ ├── systeminfowidget.cc │ │ └── systeminfowidget.hpp ├── resource │ ├── CMakeLists.txt │ ├── icon │ │ ├── app.png │ │ ├── broken.png │ │ ├── common │ │ │ ├── arrow-down-insens.png │ │ │ ├── arrow-down-prelight.png │ │ │ ├── arrow-down-small-insens.png │ │ │ ├── arrow-down-small-prelight.png │ │ │ ├── arrow-down-small.png │ │ │ ├── arrow-down.png │ │ │ ├── arrow-left-insens.png │ │ │ ├── arrow-left-prelight.png │ │ │ ├── arrow-left.png │ │ │ ├── arrow-right-insens.png │ │ │ ├── arrow-right-prelight.png │ │ │ ├── arrow-right.png │ │ │ ├── arrow-up-insens.png │ │ │ ├── arrow-up-prelight.png │ │ │ ├── arrow-up-small-insens.png │ │ │ ├── arrow-up-small-prelight.png │ │ │ ├── arrow-up-small.png │ │ │ ├── arrow-up.png │ │ │ ├── checkbox-checked-dark.png │ │ │ ├── checkbox-checked-dark@2.png │ │ │ ├── checkbox-checked-insensitive-dark.png │ │ │ ├── checkbox-checked-insensitive-dark@2.png │ │ │ ├── checkbox-checked-insensitive-selected.png │ │ │ ├── checkbox-checked-insensitive-selected@2.png │ │ │ ├── checkbox-checked-insensitive.png │ │ │ ├── checkbox-checked-insensitive@2.png │ │ │ ├── checkbox-checked-selected.png │ │ │ ├── checkbox-checked-selected@2.png │ │ │ ├── checkbox-checked-selectionmode-dark.png │ │ │ ├── checkbox-checked-selectionmode-dark@2.png │ │ │ ├── checkbox-checked-selectionmode.png │ │ │ ├── checkbox-checked-selectionmode@2.png │ │ │ ├── checkbox-checked.png │ │ │ ├── checkbox-checked@2.png │ │ │ ├── checkbox-mixed-dark.png │ │ │ ├── checkbox-mixed-dark@2.png │ │ │ ├── checkbox-mixed-insensitive-dark.png │ │ │ ├── checkbox-mixed-insensitive-dark@2.png │ │ │ ├── checkbox-mixed-insensitive-selected.png │ │ │ ├── checkbox-mixed-insensitive-selected@2.png │ │ │ ├── checkbox-mixed-insensitive.png │ │ │ ├── checkbox-mixed-insensitive@2.png │ │ │ ├── checkbox-mixed-selected.png │ │ │ ├── checkbox-mixed-selected@2.png │ │ │ ├── checkbox-mixed.png │ │ │ ├── checkbox-mixed@2.png │ │ │ ├── checkbox-selectionmode-dark.png │ │ │ ├── checkbox-selectionmode-dark@2.png │ │ │ ├── checkbox-selectionmode.png │ │ │ ├── checkbox-selectionmode@2.png │ │ │ ├── checkbox-unchecked-dark.png │ │ │ ├── checkbox-unchecked-dark@2.png │ │ │ ├── checkbox-unchecked-insensitive-dark.png │ │ │ ├── checkbox-unchecked-insensitive-dark@2.png │ │ │ ├── checkbox-unchecked-insensitive-selected.png │ │ │ ├── checkbox-unchecked-insensitive-selected@2.png │ │ │ ├── checkbox-unchecked-insensitive.png │ │ │ ├── checkbox-unchecked-insensitive@2.png │ │ │ ├── checkbox-unchecked-selected.png │ │ │ ├── checkbox-unchecked-selected@2.png │ │ │ ├── checkbox-unchecked.png │ │ │ ├── checkbox-unchecked@2.png │ │ │ ├── combobox-arrow.png │ │ │ ├── combobox-arrow@2.png │ │ │ ├── minus.png │ │ │ ├── plus.png │ │ │ ├── radio-checked-dark.png │ │ │ ├── radio-checked-dark@2.png │ │ │ ├── radio-checked-insensitive-dark.png │ │ │ ├── radio-checked-insensitive-dark@2.png │ │ │ ├── radio-checked-insensitive-selected.png │ │ │ ├── radio-checked-insensitive-selected@2.png │ │ │ ├── radio-checked-insensitive.png │ │ │ ├── radio-checked-insensitive@2.png │ │ │ ├── radio-checked-selected.png │ │ │ ├── radio-checked-selected@2.png │ │ │ ├── radio-checked.png │ │ │ ├── radio-checked@2.png │ │ │ ├── radio-mixed-dark.png │ │ │ ├── radio-mixed-dark@2.png │ │ │ ├── radio-mixed-insensitive-dark.png │ │ │ ├── radio-mixed-insensitive-dark@2.png │ │ │ ├── radio-mixed-insensitive-selected.png │ │ │ ├── radio-mixed-insensitive-selected@2.png │ │ │ ├── radio-mixed-insensitive.png │ │ │ ├── radio-mixed-insensitive@2.png │ │ │ ├── radio-mixed-selected.png │ │ │ ├── radio-mixed-selected@2.png │ │ │ ├── radio-mixed.png │ │ │ ├── radio-mixed@2.png │ │ │ ├── radio-unchecked-dark.png │ │ │ ├── radio-unchecked-dark@2.png │ │ │ ├── radio-unchecked-insensitive-dark.png │ │ │ ├── radio-unchecked-insensitive-dark@2.png │ │ │ ├── radio-unchecked-insensitive-selected.png │ │ │ ├── radio-unchecked-insensitive-selected@2.png │ │ │ ├── radio-unchecked-insensitive.png │ │ │ ├── radio-unchecked-insensitive@2.png │ │ │ ├── radio-unchecked-selected.png │ │ │ ├── radio-unchecked-selected@2.png │ │ │ ├── radio-unchecked.png │ │ │ ├── radio-unchecked@2.png │ │ │ ├── setting-dark.png │ │ │ ├── setting-dark@2.png │ │ │ ├── setting-icon-dark.png │ │ │ ├── setting-icon-dark@2.png │ │ │ ├── setting-icon.png │ │ │ ├── setting-icon@2.png │ │ │ ├── setting.png │ │ │ └── setting@2.png │ │ ├── crash.png │ │ ├── mactitle │ │ │ ├── titlebutton-close-active-alt.png │ │ │ ├── titlebutton-close-active-alt@2.png │ │ │ ├── titlebutton-close-active.png │ │ │ ├── titlebutton-close-active@2.png │ │ │ ├── titlebutton-close-alt.png │ │ │ ├── titlebutton-close-alt@2.png │ │ │ ├── titlebutton-close-backdrop-alt.png │ │ │ ├── titlebutton-close-backdrop-alt@2.png │ │ │ ├── titlebutton-close-backdrop-hover-alt.png │ │ │ ├── titlebutton-close-backdrop-hover-alt@2.png │ │ │ ├── titlebutton-close-backdrop-hover.png │ │ │ ├── titlebutton-close-backdrop-hover@2.png │ │ │ ├── titlebutton-close-backdrop.png │ │ │ ├── titlebutton-close-backdrop@2.png │ │ │ ├── titlebutton-close-hover-alt.png │ │ │ ├── titlebutton-close-hover-alt@2.png │ │ │ ├── titlebutton-close-hover.png │ │ │ ├── titlebutton-close-hover@2.png │ │ │ ├── titlebutton-close.png │ │ │ ├── titlebutton-close@2.png │ │ │ ├── titlebutton-maximize-active-alt.png │ │ │ ├── titlebutton-maximize-active-alt@2.png │ │ │ ├── titlebutton-maximize-active.png │ │ │ ├── titlebutton-maximize-active@2.png │ │ │ ├── titlebutton-maximize-alt.png │ │ │ ├── titlebutton-maximize-alt@2.png │ │ │ ├── titlebutton-maximize-backdrop-alt.png │ │ │ ├── titlebutton-maximize-backdrop-alt@2.png │ │ │ ├── titlebutton-maximize-backdrop-hover-alt.png │ │ │ ├── titlebutton-maximize-backdrop-hover-alt@2.png │ │ │ ├── titlebutton-maximize-backdrop-hover.png │ │ │ ├── titlebutton-maximize-backdrop-hover@2.png │ │ │ ├── titlebutton-maximize-backdrop.png │ │ │ ├── titlebutton-maximize-backdrop@2.png │ │ │ ├── titlebutton-maximize-hover-alt.png │ │ │ ├── titlebutton-maximize-hover-alt@2.png │ │ │ ├── titlebutton-maximize-hover.png │ │ │ ├── titlebutton-maximize-hover@2.png │ │ │ ├── titlebutton-maximize.png │ │ │ ├── titlebutton-maximize@2.png │ │ │ ├── titlebutton-minimize-active-alt.png │ │ │ ├── titlebutton-minimize-active-alt@2.png │ │ │ ├── titlebutton-minimize-active.png │ │ │ ├── titlebutton-minimize-active@2.png │ │ │ ├── titlebutton-minimize-alt.png │ │ │ ├── titlebutton-minimize-alt@2.png │ │ │ ├── titlebutton-minimize-backdrop-alt.png │ │ │ ├── titlebutton-minimize-backdrop-alt@2.png │ │ │ ├── titlebutton-minimize-backdrop-hover-alt.png │ │ │ ├── titlebutton-minimize-backdrop-hover-alt@2.png │ │ │ ├── titlebutton-minimize-backdrop-hover.png │ │ │ ├── titlebutton-minimize-backdrop-hover@2.png │ │ │ ├── titlebutton-minimize-backdrop.png │ │ │ ├── titlebutton-minimize-backdrop@2.png │ │ │ ├── titlebutton-minimize-hover-alt.png │ │ │ ├── titlebutton-minimize-hover-alt@2.png │ │ │ ├── titlebutton-minimize-hover.png │ │ │ ├── titlebutton-minimize-hover@2.png │ │ │ ├── titlebutton-minimize.png │ │ │ ├── titlebutton-minimize@2.png │ │ │ ├── titlebutton-restore-active-alt.png │ │ │ ├── titlebutton-restore-active-alt@2.png │ │ │ ├── titlebutton-restore-active.png │ │ │ ├── titlebutton-restore-active@2.png │ │ │ ├── titlebutton-restore-alt.png │ │ │ ├── titlebutton-restore-alt@2.png │ │ │ ├── titlebutton-restore-backdrop-alt.png │ │ │ ├── titlebutton-restore-backdrop-alt@2.png │ │ │ ├── titlebutton-restore-backdrop-hover-alt.png │ │ │ ├── titlebutton-restore-backdrop-hover-alt@2.png │ │ │ ├── titlebutton-restore-backdrop-hover.png │ │ │ ├── titlebutton-restore-backdrop-hover@2.png │ │ │ ├── titlebutton-restore-backdrop.png │ │ │ ├── titlebutton-restore-backdrop@2.png │ │ │ ├── titlebutton-restore-hover-alt.png │ │ │ ├── titlebutton-restore-hover-alt@2.png │ │ │ ├── titlebutton-restore-hover.png │ │ │ ├── titlebutton-restore-hover@2.png │ │ │ ├── titlebutton-restore.png │ │ │ └── titlebutton-restore@2.png │ │ ├── notLoad.png │ │ └── ok.png │ ├── qss │ │ ├── common.css │ │ ├── mainwidget.css │ │ ├── sidebarbutton.css │ │ └── specific.css │ ├── resource.cc │ ├── resource.hpp │ ├── resource.pro │ ├── resource.qrc │ └── resource_global.hpp ├── slib.pri ├── src.pro └── utils │ ├── CMakeLists.txt │ ├── algorithm.h │ ├── appinfo.cc │ ├── appinfo.hpp │ ├── benchmarker.cpp │ ├── benchmarker.h │ ├── countdownlatch.cc │ ├── countdownlatch.hpp │ ├── executeondestruction.h │ ├── hostosinfo.cpp │ ├── hostosinfo.h │ ├── indexedcontainerproxyconstiterator.h │ ├── languageconfig.cc │ ├── languageconfig.hpp │ ├── logasync.cpp │ ├── logasync.h │ ├── logfile.cc │ ├── logfile.hpp │ ├── mimetypes │ ├── mimedatabase.cpp │ ├── mimedatabase.h │ ├── mimedatabase_p.h │ ├── mimeglobpattern.cpp │ ├── mimeglobpattern_p.h │ ├── mimemagicrule.cpp │ ├── mimemagicrule_p.h │ ├── mimemagicrulematcher.cpp │ ├── mimemagicrulematcher_p.h │ ├── mimeprovider.cpp │ ├── mimeprovider_p.h │ ├── mimetype.cpp │ ├── mimetype.h │ ├── mimetype_p.h │ ├── mimetypeparser.cpp │ ├── mimetypeparser_p.h │ ├── mimetypes.pri │ └── mimeutils.cpp │ ├── mimeutils.h │ ├── osspecificaspects.h │ ├── predicates.h │ ├── qtcassert.cpp │ ├── qtcassert.h │ ├── qtcsettings.cpp │ ├── qtcsettings.h │ ├── singleton.hpp │ ├── stringutils.cpp │ ├── stringutils.h │ ├── taskqueue.h │ ├── utils.cpp │ ├── utils.h │ ├── utils.pro │ ├── utils_global.h │ ├── utilstr.h │ ├── validator.cc │ └── validator.hpp ├── tests ├── CMakeLists.txt ├── breakpadtest │ ├── CMakeLists.txt │ ├── breakpadtest.pro │ └── main.cc ├── crashpadtest │ ├── CMakeLists.txt │ ├── crashpadtest.pro │ └── main.cc └── tests.pro ├── translations ├── qt-app_en.ts └── qt-app_zh_CN.ts └── vcpkg.json /.clang-tidy: -------------------------------------------------------------------------------- 1 | Checks: > 2 | clang-analyzer-*, 3 | bugprone-*, 4 | performance-*, 5 | cert-*, 6 | misc-*, 7 | modernize-*, 8 | cppcoreguidelines-*, 9 | concurrency-*, 10 | -modernize-use-trailing-return-type, 11 | -cppcoreguidelines-avoid-magic-numbers, 12 | -llvm-header-guard, 13 | -readability-identifier-length, 14 | -readability-magic-numbers, 15 | -modernize-pass-by-value, 16 | -cert-err58-cpp, 17 | -hicpp-exception-baseclass 18 | 19 | WarningsAsErrors: > 20 | clang-analyzer-*, 21 | bugprone-*, 22 | performance-*, 23 | cert-*, 24 | misc-*, 25 | concurrency-mt-unsafe, 26 | concurrency-thread-canceltype, 27 | cppcoreguidelines-pro-type-*, 28 | cppcoreguidelines-owning-memory, 29 | cppcoreguidelines-no-malloc, 30 | hicpp-noexcept, 31 | performance-no-int-to-ptr, 32 | performance-trivially-destructible, 33 | bugprone-exception-escape 34 | 35 | HeaderFilterRegex: '.' 36 | AnalyzeTemporaryDtors: true 37 | FormatStyle: file 38 | User: user -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" # See documentation for possible values 9 | directories : 10 | - "/" # Location of package manifests 11 | - "/.github/actions/**" 12 | schedule: 13 | interval: "weekly" 14 | -------------------------------------------------------------------------------- /.github/workflows/clean_cache.yml: -------------------------------------------------------------------------------- 1 | name: Cleanup caches by a branch 2 | on: 3 | # 每周一 0 点触发 4 | schedule: 5 | - cron: '0 0 * * 1' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | cleanup: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | # `actions:write` permission is required to delete caches 13 | # See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id 14 | actions: write 15 | contents: read 16 | steps: 17 | - name: Check out code 18 | uses: actions/checkout@v4 19 | 20 | - name: Cleanup 21 | run: | 22 | gh extension install actions/gh-actions-cache 23 | 24 | REPO=${{ github.repository }} 25 | BRANCH=${{ github.ref }} 26 | 27 | echo "Fetching list of cache key" 28 | cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) 29 | 30 | ## Setting this to not fail the workflow while deleting cache keys. 31 | set +e 32 | echo "Deleting caches..." 33 | for cacheKey in $cacheKeysForPR 34 | do 35 | gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm 36 | done 37 | echo "Done" 38 | env: 39 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 40 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: CodeQL 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - 'docs/**' 7 | - 'translations/**' 8 | - '.clang-*' 9 | - '.gitignore' 10 | - '*.pri' 11 | - 'LICENSE' 12 | - '*.pro' 13 | - 'README*' 14 | pull_request: 15 | paths-ignore: 16 | - 'docs/**' 17 | - 'translations/**' 18 | - '.clang-*' 19 | - '.gitignore' 20 | - '*.pri' 21 | - 'LICENSE' 22 | - '*.pro' 23 | - 'README*' 24 | 25 | schedule: 26 | - cron: '0 0 1 * *' 27 | workflow_dispatch: 28 | 29 | env: 30 | MACOSX_DEPLOYMENT_TARGET: 11.0 31 | 32 | jobs: 33 | CodeQL: 34 | runs-on: ubuntu-latest 35 | 36 | steps: 37 | - uses: actions/checkout@v4 38 | with: 39 | fetch-depth: 1 40 | 41 | - uses: ./.github/actions/install-dependencies 42 | 43 | - name: Initialize CodeQL 44 | uses: github/codeql-action/init@v3 45 | with: 46 | languages: cpp 47 | 48 | - name: Autobuild 49 | uses: github/codeql-action/autobuild@v3 50 | 51 | - name: Perform CodeQL Analysis 52 | uses: github/codeql-action/analyze@v3 53 | -------------------------------------------------------------------------------- /.github/workflows/readme.yml: -------------------------------------------------------------------------------- 1 | name: Translate README 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | paths: 9 | - README.md 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: actions/setup-node@v4 17 | # ISO Langusge Codes: https://cloud.google.com/translate/docs/languages 18 | - name: Adding README - English 19 | uses: dephraiim/translate-readme@main 20 | with: 21 | LANG: en -------------------------------------------------------------------------------- /.github/workflows/toolchain.yml: -------------------------------------------------------------------------------- 1 | name: Build toolchain 2 | 3 | on: 4 | # 清理 Cache 后触发 5 | workflow_run: 6 | workflows: [Cleanup caches by a branch] 7 | types: completed 8 | # 手动触发 9 | workflow_dispatch: 10 | 11 | env: 12 | MACOSX_DEPLOYMENT_TARGET: 11.0 13 | 14 | jobs: 15 | build: 16 | name: Build 17 | runs-on: ${{ matrix.os }} 18 | strategy: 19 | fail-fast: false 20 | matrix: 21 | os: 22 | - windows-latest 23 | - macos-latest 24 | - ubuntu-latest 25 | 26 | steps: 27 | - uses: actions/checkout@v4 28 | with: 29 | fetch-depth: 1 30 | 31 | - uses: ./.github/actions/install-dependencies 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # C++ objects and libs 2 | *.o 3 | *.a 4 | *.so 5 | *.so.* 6 | *.dll 7 | *.dylib 8 | *.lib 9 | *.exp 10 | *.slo 11 | *.lo 12 | *.la 13 | *.lai 14 | 15 | # Qt generated files 16 | *.moc 17 | moc_*.cpp 18 | moc_*.h 19 | qrc_*.cpp 20 | ui_*.h 21 | *.qmlc 22 | *.jsc 23 | *.qm 24 | *.prl 25 | 26 | # Qt build files and configurations 27 | object_script.*.Release 28 | object_script.*.Debug 29 | *_plugin_import.cpp 30 | /.qmake.cache 31 | /.qmake.stash 32 | *.pro.user 33 | *.pro.user.* 34 | *.qbs.user 35 | *.qbs.user.* 36 | Makefile* 37 | *build-* 38 | target_wrapper.* 39 | 40 | # QtCreator generated files 41 | *.autosave 42 | *.qmlproject.user 43 | *.qmlproject.user.* 44 | CMakeLists.txt.user* 45 | compile_commands.json 46 | *creator.user* 47 | 48 | # Temporary and machine-specific files 49 | *~ 50 | *.autosave 51 | *.core 52 | *.flc 53 | .*.swp 54 | *.ib_pdb_index 55 | *.idb 56 | *.ilk 57 | *.pdb 58 | *.sln 59 | *.suo 60 | *.vcproj 61 | *vcproj.*.* 62 | *.ncb 63 | *.sdf 64 | *.opensdf 65 | *.vcxproj 66 | *vcxproj.* 67 | *.Debug 68 | *.Release 69 | *.pyc 70 | 71 | # System and editor files 72 | core 73 | !core/ 74 | tags 75 | .DS_Store 76 | .directory 77 | *.*# 78 | .#* 79 | 80 | # Visual Studio generated files 81 | *.sln 82 | *.suo 83 | 84 | # MinGW generated files 85 | *.o 86 | 87 | # Binaries 88 | *.dll 89 | *.exe 90 | 91 | # Others 92 | .cache 93 | .vscode 94 | bin-* 95 | build 96 | packet 97 | releases 98 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.25.1) 2 | 3 | include(cmake/vcpkg.cmake) 4 | include(cmake/qt.cmake) 5 | 6 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") 7 | include(utils) 8 | include(qt_utils) 9 | 10 | project( 11 | Qt-App 12 | VERSION 0.1.1 13 | DESCRIPTION "This is a qt Application template" 14 | HOMEPAGE_URL "https://github.com/RealChuan/Qt-App" 15 | LANGUAGES CXX) 16 | 17 | include(cmake/common.cmake) 18 | 19 | find_package( 20 | Qt6 REQUIRED 21 | COMPONENTS Widgets 22 | Network 23 | Core5Compat 24 | LinguistTools) 25 | 26 | qt_standard_project_setup(I18N_SOURCE_LANGUAGE en I18N_TRANSLATED_LANGUAGES 27 | zh_CN) 28 | # qt_standard_project_setup will set CMAKE_RUNTIME_OUTPUT_DIRECTORY, we need to 29 | # set it back, and use EXECUTABLE_OUTPUT_PATH 30 | unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY) 31 | 32 | find_package(unofficial-breakpad CONFIG REQUIRED) 33 | if(unofficial-breakpad_FOUND) 34 | message(STATUS "found unofficial-breakpad") 35 | endif() 36 | find_package(crashpad CONFIG REQUIRED) 37 | if(crashpad_FOUND) 38 | message(STATUS "found crashpad") 39 | endif() 40 | 41 | include_directories(src) 42 | add_subdirectory(src) 43 | add_subdirectory(tests) 44 | add_subdirectory(examples) 45 | 46 | add_translations(${PROJECT_NAME}) 47 | 48 | include(cmake/build_info.cmake) 49 | -------------------------------------------------------------------------------- /Qt-App.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG += ordered 3 | 4 | SUBDIRS += \ 5 | src \ 6 | examples \ 7 | tests 8 | 9 | TRANSLATIONS += \ 10 | translations/qt-app_en.ts \ 11 | translations/qt-app_zh_CN.ts 12 | 13 | DISTFILES += \ 14 | docs/** \ 15 | .clang* \ 16 | LICENSE \ 17 | README* 18 | -------------------------------------------------------------------------------- /cmake/build_info.cmake: -------------------------------------------------------------------------------- 1 | # 输出 CMake 版本和构建系统类型 2 | message("CMake Version: ${CMAKE_VERSION}") 3 | message("Generator: ${CMAKE_GENERATOR}") 4 | 5 | # 输出编译器信息 6 | message("C Compiler ID: ${CMAKE_C_COMPILER_ID}") 7 | message("C++ Compiler ID: ${CMAKE_CXX_COMPILER_ID}") 8 | message("C++ Compiler Version: ${CMAKE_CXX_COMPILER_VERSION}") 9 | 10 | # 输出构建类型和编译选项 11 | message("Build Type: ${CMAKE_BUILD_TYPE}") 12 | message("C++ Compiler Flags: ${CMAKE_CXX_FLAGS}") 13 | 14 | # 输出链接选项 15 | message("Executable Linker Flags: ${CMAKE_EXE_LINKER_FLAGS}") 16 | 17 | # 输出构建和源代码目录 18 | message("Build Directory: ${CMAKE_BINARY_DIR}") 19 | message("Source Directory: ${CMAKE_SOURCE_DIR}") 20 | 21 | # 输出目标架构 22 | message("Target Processor: ${CMAKE_SYSTEM_PROCESSOR}") 23 | -------------------------------------------------------------------------------- /cmake/common.cmake: -------------------------------------------------------------------------------- 1 | if(CMAKE_HOST_APPLE) 2 | set(CMAKE_OSX_DEPLOYMENT_TARGET 3 | "11.0" 4 | CACHE STRING "Minimum OS X version") 5 | endif() 6 | 7 | set(CMAKE_CXX_STANDARD 20) 8 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 9 | set(CMAKE_CXX_EXTENSIONS OFF) 10 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON) 11 | 12 | if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION 13 | VERSION_LESS 8) 14 | message(FATAL_ERROR "GCC版本需要至少8.0以支持C++20。") 15 | elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION 16 | VERSION_LESS 10) 17 | message(FATAL_ERROR "Clang版本需要至少10.0以支持C++20。") 18 | elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION 19 | VERSION_LESS 19.28) 20 | message(FATAL_ERROR "MSVC版本需要至少2019 16.10以支持C++20。") 21 | endif() 22 | 23 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 24 | set(CMAKE_DEBUG_POSTFIX d) 25 | 26 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 27 | message("Setting build type to 'RelWithDebInfo' as none was specified.") 28 | set(CMAKE_BUILD_TYPE 29 | RelWithDebInfo 30 | CACHE STRING "Choose the type of build." FORCE) 31 | # Set the possible values of build type for cmake-gui 32 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" 33 | "MinSizeRel" "RelWithDebInfo") 34 | endif() 35 | 36 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 37 | set(BITS "64") 38 | else() 39 | set(BITS "32") 40 | endif() 41 | 42 | message(STATUS "Current Platform is ${BITS} bits.") 43 | 44 | set(EXECUTABLE_OUTPUT_PATH 45 | ${PROJECT_SOURCE_DIR}/bin-${BITS}/${CMAKE_BUILD_TYPE}) 46 | set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin-${BITS}/libs) 47 | link_directories(${LIBRARY_OUTPUT_PATH}) 48 | 49 | include_directories(${PROJECT_SOURCE_DIR}) 50 | -------------------------------------------------------------------------------- /cmake/qt.cmake: -------------------------------------------------------------------------------- 1 | if(CMAKE_HOST_WIN32) 2 | list(APPEND CMAKE_PREFIX_PATH "C:\\Qt\\6.9.1\\msvc2022_64") 3 | elseif(CMAKE_HOST_APPLE) 4 | 5 | elseif(CMAKE_HOST_LINUX) 6 | list(APPEND CMAKE_PREFIX_PATH "/opt/Qt/6.9.1/gcc_64") 7 | endif() 8 | 9 | add_definitions(-DQT_DEPRECATED_WARNINGS 10 | -DQT_DISABLE_DEPRECATED_BEFORE=0x060000) 11 | -------------------------------------------------------------------------------- /cmake/qt_utils.cmake: -------------------------------------------------------------------------------- 1 | function(add_translations OUTPUT_NAME) 2 | # 转换输出名称为小写 3 | string(TOLOWER ${OUTPUT_NAME} Lower_Output_Name) 4 | 5 | # 添加翻译文件 6 | qt_add_translations( 7 | ${OUTPUT_NAME} 8 | TS_FILE_BASE 9 | ${Lower_Output_Name} 10 | TS_FILE_DIR 11 | translations 12 | INCLUDE_DIRECTORIES 13 | directory 14 | ${PROJECT_SOURCE_DIR}/src 15 | LUPDATE_OPTIONS 16 | -no-obsolete) 17 | 18 | # 确定翻译文件的输出位置 19 | if(CMAKE_HOST_APPLE) 20 | set(output_location 21 | "${EXECUTABLE_OUTPUT_PATH}/${OUTPUT_NAME}.app/Contents/Resources/translations" 22 | ) 23 | else() 24 | set(output_location "${EXECUTABLE_OUTPUT_PATH}/translations") 25 | endif() 26 | 27 | # 查找所有的翻译文件(.ts) 28 | file(GLOB_RECURSE TS_FILES "${PROJECT_SOURCE_DIR}/translations/*.ts") 29 | 30 | # 设置翻译文件的输出位置 31 | foreach(ts_file ${TS_FILES}) 32 | set_source_files_properties("${ts_file}" PROPERTIES OUTPUT_LOCATION 33 | "${output_location}") 34 | endforeach() 35 | endfunction() 36 | -------------------------------------------------------------------------------- /cmake/utils.cmake: -------------------------------------------------------------------------------- 1 | function(add_custom_library target_name) 2 | if(CMAKE_HOST_WIN32) 3 | add_library(${target_name} SHARED ${ARGN}) 4 | add_custom_command( 5 | TARGET ${target_name} 6 | POST_BUILD 7 | COMMAND 8 | ${CMAKE_COMMAND} -E copy_if_different $ 9 | ${EXECUTABLE_OUTPUT_PATH}/$) 10 | else() 11 | add_library(${target_name} ${ARGN}) 12 | endif() 13 | endfunction(add_custom_library) 14 | 15 | function(add_custom_plugin target_name) 16 | add_library(${target_name} SHARED ${ARGN}) 17 | add_custom_command( 18 | TARGET ${target_name} 19 | POST_BUILD 20 | COMMAND ${CMAKE_COMMAND} -E copy_if_different $ 21 | ${EXECUTABLE_OUTPUT_PATH}/plugins/$ 22 | ) 23 | add_rpath(${target_name}) 24 | endfunction(add_custom_plugin) 25 | 26 | function(add_share_library target_name) 27 | add_library(${target_name} SHARED ${ARGN}) 28 | add_custom_command( 29 | TARGET ${target_name} 30 | POST_BUILD 31 | COMMAND ${CMAKE_COMMAND} -E copy_if_different $ 32 | ${EXECUTABLE_OUTPUT_PATH}/$) 33 | add_rpath(${target_name}) 34 | endfunction(add_share_library) 35 | 36 | function(add_rpath target_name) 37 | if(CMAKE_HOST_APPLE) 38 | set_target_properties( 39 | ${target_name} 40 | PROPERTIES LINK_FLAGS "-Wl,-rpath,./:./../Frameworks:./../../Frameworks") 41 | elseif(CMAKE_HOST_LINUX) 42 | set_target_properties(${target_name} 43 | PROPERTIES LINK_FLAGS "-Wl,-rpath,./:./lib:./../lib") 44 | endif() 45 | endfunction() 46 | -------------------------------------------------------------------------------- /cmake/vcpkg.cmake: -------------------------------------------------------------------------------- 1 | if(CMAKE_HOST_WIN32) 2 | set(CMAKE_TOOLCHAIN_FILE 3 | "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" 4 | CACHE STRING "Vcpkg toolchain file") 5 | elseif(CMAKE_HOST_APPLE) 6 | set(CMAKE_TOOLCHAIN_FILE 7 | "/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake" 8 | CACHE STRING "Vcpkg toolchain file") 9 | elseif(CMAKE_HOST_LINUX) 10 | set(CMAKE_TOOLCHAIN_FILE 11 | "/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake" 12 | CACHE STRING "Vcpkg toolchain file") 13 | endif() 14 | -------------------------------------------------------------------------------- /docs/CrashReport.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/docs/CrashReport.jpg -------------------------------------------------------------------------------- /docs/Qt-App.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/docs/Qt-App.jpg -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(i18n) 2 | -------------------------------------------------------------------------------- /examples/examples.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG += ordered 3 | 4 | SUBDIRS += \ 5 | i18n 6 | -------------------------------------------------------------------------------- /examples/i18n/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES main.cc) 2 | qt_add_executable(I18N MANUAL_FINALIZATION ${PROJECT_SOURCES}) 3 | set_target_properties(I18N PROPERTIES WIN32_EXECUTABLE TRUE) 4 | set_target_properties(I18N PROPERTIES RUNTIME_OUTPUT_DIRECTORY 5 | "${EXECUTABLE_OUTPUT_PATH}/examples") 6 | 7 | target_link_libraries(I18N PRIVATE Qt::Core) 8 | qt_finalize_executable(I18N) 9 | -------------------------------------------------------------------------------- /examples/i18n/i18n.pro: -------------------------------------------------------------------------------- 1 | include(../../common.pri) 2 | 3 | QT = core 4 | 5 | CONFIG += cmdline 6 | 7 | TEMPLATE = app 8 | 9 | TARGET = I18N 10 | 11 | SOURCES += \ 12 | main.cc 13 | 14 | DESTDIR = $$APP_OUTPUT_PATH/examples 15 | -------------------------------------------------------------------------------- /examples/i18n/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | auto main(int argc, char *argv[]) -> int 5 | { 6 | auto metaEnums = QMetaEnum::fromType(); 7 | for (int i = 0; i < metaEnums.keyCount(); ++i) { 8 | qDebug() << metaEnums.key(i) << metaEnums.value(i); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packaging/fonts.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | # 下载文件 4 | file( 5 | DOWNLOAD 6 | "https://github.com/RealChuan/Qt-App/releases/download/0.0.1/fonts.7z" 7 | "fonts.7z" 8 | STATUS status 9 | SHOW_PROGRESS) 10 | 11 | list(GET status 0 error_code) 12 | list(GET status 1 error_message) 13 | 14 | if(error_code GREATER 0) 15 | message(FATAL_ERROR "Error downloading file: ${error_message}") 16 | endif() 17 | 18 | # 解压文件 19 | execute_process(COMMAND 7z x fonts.7z -o./fonts RESULT_VARIABLE error_code) 20 | 21 | if(NOT error_code EQUAL 0) 22 | message(FATAL_ERROR "Error extracting file") 23 | endif() 24 | 25 | execute_process(COMMAND rm -f fonts.7z) 26 | 27 | # 列出文件 28 | file(GLOB_RECURSE files ./fonts/*) 29 | foreach(file IN LISTS files) 30 | message("${file}") 31 | endforeach() 32 | -------------------------------------------------------------------------------- /packaging/macos/distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Qt-App 4 | org.youth 5 | 6 | 7 | 8 | 9 | 10 | 11 | tmp.pkg 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /packaging/macos/package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | cd "$(dirname "$0")" 4 | source utils.sh 5 | 6 | cd ../.. 7 | project_dir="$(pwd)" 8 | echo "Current directory: ${project_dir}" 9 | 10 | packet_dir="${project_dir}/packaging/packet" 11 | releases_dir="${project_dir}/packaging/releases" 12 | 13 | sudo chmod -R +x ${packet_dir} 14 | mv -vf "${packet_dir}/fonts" "${packet_dir}/Qt-App.app/Contents/MacOS/" 15 | 16 | macdeployqt "${packet_dir}/Qt-App.app" -always-overwrite 17 | 18 | ls -al "${packet_dir}/Qt-App.app/Contents/Frameworks" 19 | 20 | # package with 7z 21 | zip_path="${releases_dir}/Qt-App.7z" 22 | 7z a -t7z -r -mx=9 -mmt "${zip_path}" "${packet_dir}/Qt-App.app" 23 | 24 | # package with pkg 25 | version="0.1.1" 26 | mkdir -p ${packet_dir}/output 27 | # process_plist "${project_dir}/packaging/macos/distribution.xml" 28 | sudo chmod -R +x ${project_dir}/packaging/macos/scripts 29 | pkgbuild --root ${packet_dir}/Qt-App.app --identifier org.qt-app.client \ 30 | --version ${version} \ 31 | --scripts ${project_dir}/packaging/macos/scripts \ 32 | --ownership recommended ${packet_dir}/output/tmp.pkg \ 33 | --install-location /Applications/Qt-App.app 34 | productbuild --distribution ${project_dir}/packaging/macos/distribution.xml \ 35 | --resources resources --package-path ${packet_dir}/output \ 36 | --version ${version} ${releases_dir}/Qt-App.pkg 37 | 38 | # package with dmg 39 | pip3 install dmgbuild 40 | 41 | cd "${packet_dir}" 42 | dmgbuild -s "${project_dir}/packaging/macos/dmgbuild.py" "Qt-App.app" "Qt-App.dmg" 43 | mv -v "${packet_dir}/Qt-App.dmg" "${releases_dir}" 44 | 45 | echo "Deployment macos completed." 46 | -------------------------------------------------------------------------------- /packaging/macos/resources/conclusion.html: -------------------------------------------------------------------------------- 1 | The Qt-App has been successfully installed. -------------------------------------------------------------------------------- /packaging/macos/resources/welcome.html: -------------------------------------------------------------------------------- 1 | Welcome to the installation of Qt-App 0.1.1. Please press continue to proceed with the installation. -------------------------------------------------------------------------------- /packaging/macos/scripts/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | echo "Postinstall script is not implemented for macOS." 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /packaging/macos/scripts/preinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | echo "Preinstall script is not implemented for macOS." 4 | 5 | sudo killall -9 Qt-App || true 6 | sudo killall -9 CrashReport || true 7 | 8 | exit 0 9 | -------------------------------------------------------------------------------- /packaging/macos/utils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | delete_file_or_dir() { 4 | local target=$1 5 | 6 | if [ -e "$target" ]; then 7 | if [ -d "$target" ]; then 8 | rm -rf "$target" 9 | echo "Directory deleted: $target" 10 | else 11 | rm -f "$target" 12 | echo "File deleted: $target" 13 | fi 14 | else 15 | echo "Error: $target does not exist." 16 | fi 17 | } 18 | 19 | process_plist() { 20 | local plist_path="$1" 21 | 22 | if [ -z "$plist_path" ]; then 23 | echo "Error: Plist file path is not provided." 24 | return 1 25 | fi 26 | 27 | if [ ! -f "$plist_path" ]; then 28 | echo "Error: Plist file does not exist at path: $plist_path" 29 | return 1 30 | fi 31 | 32 | echo "Converting plist to XML format..." 33 | plutil -convert xml1 "$plist_path" 2>/dev/null 34 | 35 | echo "Linting plist file..." 36 | plutil -lint "$plist_path" 2>/dev/null 37 | 38 | if [ $? -eq 0 ]; then 39 | echo "Plist file processed successfully." 40 | else 41 | echo "Error occurred while processing plist file." 42 | return 2 43 | fi 44 | } 45 | 46 | notarize_app() { 47 | local target=$1 48 | if [ ! -f "$target" ]; then 49 | echo "Error: $target does not exist." 50 | exit 1 51 | fi 52 | 53 | xcrun notarytool submit $target --apple-id "******" \ 54 | --team-id "******" --password "******" --wait 55 | xcrun stapler staple $target 56 | } 57 | -------------------------------------------------------------------------------- /packaging/rename_packages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | 3 | cd "$(dirname "$0")" 4 | cd .. 5 | project_dir="$(pwd)" 6 | echo "Current directory: ${project_dir}" 7 | 8 | releases_dir="${project_dir}/packaging/releases" 9 | TAG_NAME="${GITHUB_REF#refs/tags/}" 10 | 11 | cd ${releases_dir} 12 | ls -al 13 | 14 | cd windows* 15 | mv *.7z Qt-App_${TAG_NAME}_windows_x86_64.7z 16 | mv *.exe Qt-App_${TAG_NAME}_x86_64.exe 17 | mv * ${releases_dir}/ 18 | cd .. 19 | 20 | cd ubuntu* 21 | mv *.7z Qt-App_${TAG_NAME}_ubuntu_x86_64.7z 22 | mv *.AppImage Qt-App_${TAG_NAME}_x86_64.AppImage 23 | mv *.deb Qt-App_${TAG_NAME}_x86_64.deb 24 | mv * ${releases_dir}/ 25 | cd .. 26 | 27 | cd macos*x86* 28 | mv *.7z Qt-App_${TAG_NAME}_macos_x86_64.7z 29 | mv *.dmg Qt-App_${TAG_NAME}_x86_64.dmg 30 | mv *.pkg Qt-App_${TAG_NAME}_x86_64.pkg 31 | mv * ${releases_dir}/ 32 | cd .. 33 | 34 | cd macos*arm* 35 | mv *.7z Qt-App_${TAG_NAME}_macos_aarch64.7z 36 | mv *.dmg Qt-App_${TAG_NAME}_aarch64.dmg 37 | mv *.pkg Qt-App_${TAG_NAME}_aarch64.pkg 38 | mv * ${releases_dir}/ 39 | cd .. 40 | 41 | cd ${releases_dir} 42 | wget -nv "https://github.com/RealChuan/Qt-App/releases/download/0.0.1/fonts.7z" 43 | 44 | rm -rf windows* 45 | rm -rf ubuntu* 46 | rm -rf macos* 47 | 48 | ls -al 49 | 50 | exit 0 51 | -------------------------------------------------------------------------------- /packaging/ubuntu/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: qt-app 2 | Version: 0.1.1 3 | Architecture: amd64 4 | Description: qt-app 5 | Section: admin 6 | Priority: optional 7 | Maintainer: https://github.com/RealChuan 8 | Homepage: https://github.com/RealChuan/Qt-App 9 | Depends: libc6 (>= 2.35) 10 | -------------------------------------------------------------------------------- /packaging/ubuntu/DEBIAN/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | chmod +x /opt/Qt-App/Qt-App 4 | chmod +x /opt/Qt-App/Qt-App.sh 5 | chmod 777 /opt/Qt-App/app.png 6 | chmod 744 /usr/share/applications/Qt-App.desktop 7 | 8 | exit 0 9 | -------------------------------------------------------------------------------- /packaging/ubuntu/DEBIAN/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | delete_file_or_dir() { 4 | local target=$1 5 | 6 | if [ -e "$target" ]; then 7 | if [ -d "$target" ]; then 8 | rm -rf "$target" 9 | else 10 | rm "$target" 11 | fi 12 | fi 13 | } 14 | 15 | if [ "$1" = "remove" -o "$1" = "purge" ]; then 16 | delete_file_or_dir ~/.config/Youth/Qt-App 17 | delete_file_or_dir ~/.config/Youth/CrashReport 18 | fi 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /packaging/ubuntu/DEBIAN/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | killall -q -9 Qt-App || true 4 | killall -q -9 CrashReport || true 5 | 6 | exit 0 7 | -------------------------------------------------------------------------------- /packaging/ubuntu/DEBIAN/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | killall -q -9 Qt-App || true 4 | killall -q -9 CrashReport || true 5 | 6 | exit 0 7 | -------------------------------------------------------------------------------- /packaging/ubuntu/Qt-App.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Qt-App 3 | Comment=A qt Application template 4 | GenericName=Qt-App 5 | Exec=AppRun %F 6 | Icon=app 7 | Type=Application 8 | StartupNotify=false 9 | StartupWMClass=Qt-App 10 | Categories=Utility; 11 | -------------------------------------------------------------------------------- /packaging/ubuntu/Qt-App.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /opt/Qt-App/Qt-App 3 | -------------------------------------------------------------------------------- /packaging/ubuntu/usr/share/applications/Qt-App.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Qt-App 3 | Comment=A qt Application template 4 | GenericName=Qt-App 5 | Exec=/opt/Qt-App/Qt-App 6 | Icon=/opt/Qt-App/app.png 7 | Type=Application 8 | StartupNotify=false 9 | StartupWMClass=Qt-App 10 | Categories=Utility; 11 | -------------------------------------------------------------------------------- /packaging/windows/package.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = 'Stop' 2 | 3 | Set-Location $PSScriptRoot\..\.. 4 | $ProjectDir = (Get-Location).Path 5 | Write-Host $ProjectDir 6 | 7 | Import-Module (Join-Path $ProjectDir "packaging\windows\utils.ps1") 8 | 9 | Invoke-Expression -Command "$ProjectDir\scripts\windows\setVsDev.ps1" 10 | 11 | $releases_dir = Join-Path $ProjectDir "packaging\releases" 12 | $packet_dir = Join-Path $ProjectDir "packaging\packet" 13 | $plugin_dir = Join-Path $packet_dir "plugins" 14 | if (Test-Path $plugin_dir) { 15 | Copy-Item $plugin_dir/* -Destination $packet_dir -Recurse -Force -Verbose 16 | } 17 | 18 | $exeFiles = Get-ChildItem -Path $packet_dir -Filter *.exe | ForEach-Object { $_.FullName } 19 | $dllFiles = Get-ChildItem -Path $packet_dir -Filter *.dll | ForEach-Object { $_.FullName } 20 | $allFiles = $exeFiles + $dllFiles 21 | foreach ($file in $allFiles) { 22 | if ($file -ne "crashpad_handler.exe" -and ($file.EndsWith(".exe") -or $file.EndsWith(".dll"))) { 23 | Write-Host "Deploying $file..." 24 | windeployqt --force --compiler-runtime $file 25 | } 26 | } 27 | 28 | $Remove_List_Relative = @( 29 | "*Test*", 30 | "*plugin*.dll", 31 | "examples" 32 | ) 33 | $Remove_List_Absolute = $Remove_List_Relative | ForEach-Object { 34 | Join-Path $packet_dir $_ 35 | } 36 | foreach ($item in $Remove_List_Absolute) { 37 | Remove-SafeItem -Path $item 38 | } 39 | 40 | # packaging with 7z 41 | $zip_path = Join-Path $releases_dir "Qt-App.7z" 42 | 7z a -t7z -r -mx=9 -mmt $zip_path $packet_dir\* 43 | 44 | # packaging with iscc 45 | ISCC (Join-Path $PSScriptRoot "app.iss") 46 | 47 | Write-Host "Packaging complete." 48 | 49 | exit 0 50 | -------------------------------------------------------------------------------- /packaging/windows/utils.ps1: -------------------------------------------------------------------------------- 1 | function Remove-SafeItem { 2 | param( 3 | [Parameter(Mandatory = $true)] 4 | [string]$Path 5 | ) 6 | 7 | try { 8 | $resolvedPaths = Resolve-Path -Path $Path -ErrorAction SilentlyContinue 9 | 10 | if (-not $resolvedPaths) { 11 | Write-Host "No valid path found for the pattern: '$Path'." 12 | return 13 | } 14 | foreach ($resolvedPath in $resolvedPaths) { 15 | if (Test-Path $resolvedPath.Path) { 16 | if (Test-Path $resolvedPath.Path -PathType Container) { 17 | Remove-Item -Path $resolvedPath.Path -Recurse -Force -Verbose 18 | Write-Host "Directory '$($resolvedPath.Path)' has been removed." 19 | } 20 | elseif (Test-Path $resolvedPath.Path -PathType Leaf) { 21 | Remove-Item -Path $resolvedPath.Path -Force -Verbose 22 | Write-Host "File '$($resolvedPath.Path)' has been removed." 23 | } 24 | } 25 | else { 26 | Write-Host "The resolved path '$($resolvedPath.Path)' does not exist or has been removed." 27 | } 28 | } 29 | } 30 | catch { 31 | Write-Error "An error occurred: $($_.Exception.Message)" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/3rdparty/3rdparty.pri: -------------------------------------------------------------------------------- 1 | win32{ 2 | contains(QT_ARCH, i386) { 3 | vcpkg_path = C:/vcpkg/installed/x86-windows 4 | } else:contains(QT_ARCH, arm64) { 5 | vcpkg_path = C:/vcpkg/installed/arm64-windows 6 | } else { 7 | vcpkg_path = C:/vcpkg/installed/x64-windows 8 | } 9 | } 10 | 11 | macx{ 12 | contains(QMAKE_APPLE_DEVICE_ARCHS, arm64) { 13 | vcpkg_path = /usr/local/share/vcpkg/installed/arm64-osx 14 | } else { 15 | vcpkg_path = /usr/local/share/vcpkg/installed/x64-osx 16 | } 17 | } 18 | 19 | unix:!macx{ 20 | contains(QT_ARCH, arm64) { 21 | vcpkg_path = /usr/local/share/vcpkg/installed/arm64-linux 22 | }else{ 23 | vcpkg_path = /usr/local/share/vcpkg/installed/x64-linux 24 | } 25 | } 26 | 27 | message("QT_ARCH: "$$QT_ARCH) 28 | message("vcpkg_path: "$$vcpkg_path) 29 | 30 | CONFIG(debug, debug|release) { 31 | suffix = d 32 | LIBS += -L$$vcpkg_path/debug/lib 33 | }else{ 34 | LIBS += -L$$vcpkg_path/lib 35 | } 36 | 37 | LIBS += -llibbreakpad_client$$suffix -llibbreakpad$$suffix 38 | LIBS += -lvcpkg_crashpad_client_common -lvcpkg_crashpad_client -lvcpkg_crashpad_util -lvcpkg_crashpad_base 39 | 40 | INCLUDEPATH += \ 41 | $$vcpkg_path/include \ 42 | $$vcpkg_path/include/crashpad 43 | 44 | # for crashpad 45 | win32{ 46 | CONFIG(debug, debug|release) { 47 | LIBS += -lzlibd 48 | }else{ 49 | LIBS += -lzlib 50 | } 51 | DEFINES += NOMINMAX 52 | LIBS += -lAdvapi32 53 | } 54 | 55 | unix{ 56 | LIBS += -lz 57 | } 58 | 59 | macx{ 60 | LIBS += \ 61 | -lbsm \ 62 | -lmig_output \ 63 | -framework ApplicationServices \ 64 | -framework CoreFoundation \ 65 | -framework Foundation \ 66 | -framework IOKit \ 67 | -framework Security 68 | } 69 | -------------------------------------------------------------------------------- /src/3rdparty/3rdparty.pro: -------------------------------------------------------------------------------- 1 | include(../slib.pri) 2 | include(qtsingleapplication/qtsingleapplication.pri) 3 | 4 | DEFINES += THRIDPARTY_LIBRARY 5 | TARGET = $$replaceLibName(thirdparty) 6 | 7 | HEADERS += \ 8 | thirdparty_global.hpp 9 | -------------------------------------------------------------------------------- /src/3rdparty/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES 2 | qtsingleapplication/qtsingleapplication.cpp 3 | qtsingleapplication/qtsingleapplication.h 4 | qtsingleapplication/qtlocalpeer.cpp 5 | qtsingleapplication/qtlocalpeer.h 6 | thirdparty_global.hpp) 7 | 8 | add_custom_library(thirdparty ${PROJECT_SOURCES}) 9 | target_link_libraries(thirdparty PRIVATE Qt::Network Qt::Widgets) 10 | 11 | if(CMAKE_HOST_WIN32) 12 | target_compile_definitions(thirdparty PRIVATE "THRIDPARTY_LIBRARY") 13 | endif() 14 | -------------------------------------------------------------------------------- /src/3rdparty/qtsingleapplication/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(shared_qtsingleapplication STATIC 2 | qtsingleapplication.cpp qtsingleapplication.h 3 | qtlocalpeer.cpp qtlocalpeer.h 4 | ) 5 | target_link_libraries(shared_qtsingleapplication Qt::Core Qt::Network Qt::Widgets) 6 | target_include_directories(shared_qtsingleapplication PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") 7 | if (WIN32) 8 | target_compile_definitions(shared_qtsingleapplication PRIVATE "QT_QTSINGLEAPPLICATION_EXPORT=__declspec(dllexport)") 9 | endif() 10 | 11 | if (WITH_SANITIZE) 12 | qtc_enable_sanitize(shared_qtsingleapplication ${SANITIZE_FLAGS}) 13 | endif() 14 | -------------------------------------------------------------------------------- /src/3rdparty/qtsingleapplication/README.txt: -------------------------------------------------------------------------------- 1 | This is the src directory of the QtSingleApplication solution 2 | integrated over from addons/main/utils/qtsingleapplication/src . 3 | 4 | namespace.patch was applied to introduce the SharedTools namespace. 5 | 6 | It additionally requires the QtLockedFile solution. 7 | 8 | History: 9 | 10 | 16.05.2008 Integrated 11 | -------------------------------------------------------------------------------- /src/3rdparty/qtsingleapplication/qtlocalpeer.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | namespace SharedTools { 14 | 15 | class QtLocalPeer : public QObject 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); 21 | bool isClient(); 22 | bool sendMessage(const QString &message, int timeout, bool block); 23 | QString applicationId() const 24 | { return id; } 25 | static QString appSessionId(const QString &appId); 26 | 27 | Q_SIGNALS: 28 | void messageReceived(const QString &message, QObject *socket); 29 | 30 | protected: 31 | void receiveConnection(); 32 | 33 | QString id; 34 | QString socketName; 35 | QLocalServer* server{nullptr}; 36 | QScopedPointer lockFile; 37 | }; 38 | 39 | } // namespace SharedTools 40 | -------------------------------------------------------------------------------- /src/3rdparty/qtsingleapplication/qtsingleapplication.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include <3rdparty/thirdparty_global.hpp> 7 | 8 | #include 9 | 10 | QT_FORWARD_DECLARE_CLASS(QSharedMemory) 11 | 12 | namespace SharedTools { 13 | 14 | class QtLocalPeer; 15 | 16 | class THRIDPARTY_EXPORT QtSingleApplication : public QApplication 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | QtSingleApplication(const QString &id, int &argc, char **argv); 22 | ~QtSingleApplication(); 23 | 24 | bool isRunning(qint64 pid = -1); 25 | 26 | void setActivationWindow(QWidget *aw, bool activateOnMessage = true); 27 | QWidget *activationWindow() const; 28 | bool event(QEvent *event) override; 29 | 30 | QString applicationId() const; 31 | void setBlock(bool value); 32 | 33 | bool sendMessage(const QString &message, int timeout = 5000, qint64 pid = -1); 34 | void activateWindow(); 35 | 36 | Q_SIGNALS: 37 | void messageReceived(const QString &message, QObject *socket); 38 | void fileOpenRequest(const QString &file); 39 | 40 | private: 41 | QString instancesFileName(const QString &appId); 42 | 43 | qint64 firstPeer; 44 | QSharedMemory *instances; 45 | QtLocalPeer *pidPeer; 46 | QWidget *actWin; 47 | QString appId; 48 | bool block; 49 | }; 50 | 51 | // Instantiates Freeze Detector when QTC_FREEZE_DETECTOR env var is set. 52 | QtSingleApplication *createApplication(const QString &id, int &argc, char **argv); 53 | 54 | } // namespace SharedTools 55 | -------------------------------------------------------------------------------- /src/3rdparty/qtsingleapplication/qtsingleapplication.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | HEADERS += $$PWD/qtsingleapplication.h $$PWD/qtlocalpeer.h 4 | SOURCES += $$PWD/qtsingleapplication.cpp $$PWD/qtlocalpeer.cpp 5 | 6 | QT *= network widgets 7 | -------------------------------------------------------------------------------- /src/3rdparty/thirdparty_global.hpp: -------------------------------------------------------------------------------- 1 | #ifndef THIRDPARTY_GLOBAL_HPP 2 | #define THIRDPARTY_GLOBAL_HPP 3 | 4 | #include 5 | 6 | #if defined(THRIDPARTY_LIBRARY) 7 | #define THRIDPARTY_EXPORT Q_DECL_EXPORT 8 | #elif defined(THRIDPARTY_STATIC_LIBRARY) // Abuse single files for manual tests 9 | # define THRIDPARTY_EXPORT 10 | #else 11 | #define THRIDPARTY_EXPORT Q_DECL_IMPORT 12 | #endif 13 | 14 | #endif // THIRDPARTY_GLOBAL_HPP 15 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(utils) 2 | add_subdirectory(dump) 3 | add_subdirectory(resource) 4 | add_subdirectory(gui) 5 | add_subdirectory(3rdparty) 6 | add_subdirectory(aggregation) 7 | add_subdirectory(extensionsystem) 8 | add_subdirectory(core) 9 | add_subdirectory(plugins) 10 | add_subdirectory(apps) 11 | -------------------------------------------------------------------------------- /src/aggregation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES aggregate.cpp aggregate.h aggregation_global.h) 2 | add_custom_library(aggregation ${PROJECT_SOURCES}) 3 | target_link_libraries(aggregation PRIVATE Qt::Core) 4 | 5 | if(CMAKE_HOST_WIN32) 6 | target_compile_definitions(aggregation PRIVATE "AGGREGATION_LIBRARY") 7 | endif() 8 | -------------------------------------------------------------------------------- /src/aggregation/aggregation.pro: -------------------------------------------------------------------------------- 1 | include(../slib.pri) 2 | 3 | DEFINES += AGGREGATION_LIBRARY 4 | TARGET = $$replaceLibName(aggregation) 5 | 6 | HEADERS += \ 7 | aggregate.h \ 8 | aggregation_global.h 9 | 10 | SOURCES += \ 11 | aggregate.cpp 12 | -------------------------------------------------------------------------------- /src/aggregation/aggregation.qbs: -------------------------------------------------------------------------------- 1 | import qbs 1.0 2 | 3 | Project { 4 | name: "Aggregation" 5 | 6 | QtcLibrary { 7 | Depends { name: "Qt.core" } 8 | cpp.defines: base.concat("AGGREGATION_LIBRARY") 9 | 10 | files: [ 11 | "aggregate.cpp", 12 | "aggregate.h", 13 | "aggregation_global.h", 14 | ] 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/aggregation/aggregation_global.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | #if defined(AGGREGATION_LIBRARY) 9 | # define AGGREGATION_EXPORT Q_DECL_EXPORT 10 | #elif defined(AGGREGATION_STATIC_LIBRARY) 11 | # define AGGREGATION_EXPORT 12 | #else 13 | # define AGGREGATION_EXPORT Q_DECL_IMPORT 14 | #endif 15 | -------------------------------------------------------------------------------- /src/aggregation/examples/text/main.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "myinterfaces.h" 7 | #include "ui_main.h" 8 | 9 | #include 10 | 11 | #include 12 | 13 | class MyMain : public QWidget 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit MyMain(QWidget *parent = 0, Qt::WFlags flags = 0); 19 | ~MyMain(); 20 | 21 | void add(IComboEntry *obj); 22 | 23 | private: 24 | void select(int index); 25 | 26 | Ui::mainClass ui; 27 | 28 | QList m_entries; 29 | }; 30 | -------------------------------------------------------------------------------- /src/aggregation/examples/text/myinterfaces.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | #include 9 | 10 | class IComboEntry : public QObject 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | IComboEntry(QString title) : m_title(title) {} 16 | virtual ~IComboEntry() {} 17 | QString title() const { return m_title; } 18 | 19 | private: 20 | QString m_title; 21 | }; 22 | 23 | class IText1 : public QObject 24 | { 25 | Q_OBJECT 26 | 27 | public: 28 | IText1(QString text) : m_text(text) {} 29 | virtual ~IText1() {} 30 | QString text() const { return m_text; } 31 | 32 | private: 33 | QString m_text; 34 | }; 35 | 36 | class IText2 : public QObject 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | IText2(QString text) : m_text(text) {} 42 | QString text() const { return m_text; } 43 | 44 | private: 45 | QString m_text; 46 | }; 47 | 48 | class IText3 : public QObject 49 | { 50 | Q_OBJECT 51 | 52 | public: 53 | IText3(QString text) : m_text(text) {} 54 | virtual ~IText3() {} 55 | QString text() const { return m_text; } 56 | 57 | private: 58 | QString m_text; 59 | }; 60 | -------------------------------------------------------------------------------- /src/apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(crashreport) 2 | add_subdirectory(app) 3 | -------------------------------------------------------------------------------- /src/apps/app/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /src/apps/app/app.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/apps/app/app.icns -------------------------------------------------------------------------------- /src/apps/app/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/apps/app/app.ico -------------------------------------------------------------------------------- /src/apps/app/app.pro: -------------------------------------------------------------------------------- 1 | include(../../../common.pri) 2 | 3 | QT += core gui network widgets core5compat 4 | 5 | TEMPLATE = app 6 | 7 | TARGET = Qt-App 8 | 9 | LIBS += \ 10 | -l$$replaceLibName(dump) \ 11 | -l$$replaceLibName(extensionsystem) \ 12 | -l$$replaceLibName(thirdparty) \ 13 | -l$$replaceLibName(gui) \ 14 | -l$$replaceLibName(resource) \ 15 | -l$$replaceLibName(utils) 16 | 17 | include(../../3rdparty/3rdparty.pri) 18 | 19 | DESTDIR = $$APP_OUTPUT_PATH 20 | 21 | RC_ICONS = app.ico 22 | ICON = app.icns 23 | 24 | SOURCES += \ 25 | main.cc 26 | 27 | win32{ 28 | src_path = $$vcpkg_path/tools/crashpad 29 | dist_path = $$APP_OUTPUT_PATH 30 | QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$replace(src_path, /, \\) $$replace(dist_path, /, \\) 31 | } 32 | 33 | macx{ 34 | QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$APP_OUTPUT_PATH/plugins $$APP_OUTPUT_PATH/Qt-App.app/Contents/MacOS 35 | QMAKE_POST_LINK += & $$QMAKE_COPY_FILE $$APP_OUTPUT_PATH/CrashReport $$APP_OUTPUT_PATH/Qt-App.app/Contents/MacOS/CrashReport 36 | QMAKE_POST_LINK += & $$QMAKE_COPY_DIR "$$vcpkg_path/tools/crashpad/" "$$APP_OUTPUT_PATH/Qt-App.app/Contents/MacOS" 37 | } 38 | 39 | unix:!macx{ 40 | QMAKE_POST_LINK += $$QMAKE_COPY_DIR "$$vcpkg_path/tools/crashpad" "$$APP_OUTPUT_PATH" 41 | } 42 | -------------------------------------------------------------------------------- /src/apps/app/app.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | IDI_ICON1 ICON "app.ico" 4 | 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION 0,1,1,0 7 | PRODUCTVERSION 0,1,1,0 8 | FILEFLAGSMASK 0x3fL 9 | #ifdef _DEBUG 10 | FILEFLAGS VS_FF_DEBUG 11 | #else 12 | FILEFLAGS 0x0L 13 | #endif 14 | FILEOS VOS_NT_WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE VFT2_UNKNOWN 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "000404b0" 21 | BEGIN 22 | VALUE "CompanyName", "The Youth.\0" 23 | VALUE "FileDescription", "Qt-App\0" 24 | VALUE "FileVersion", "0.1.1.0\0" 25 | VALUE "LegalCopyright", "Copyright (C) 2017-2025 Youth.\0" 26 | VALUE "OriginalFilename", "Qt-App\0" 27 | VALUE "ProductName", "Qt-App\0" 28 | VALUE "ProductVersion", "0.1.1.0\0" 29 | VALUE "InternalName", "Qt-App\0" 30 | VALUE "Comments", "Qt-App\0" 31 | VALUE "LegalTrademarks", "Youth\0" 32 | END 33 | END 34 | BLOCK "VarFileInfo" 35 | BEGIN 36 | VALUE "Translation", 0x0004, 1200 37 | END 38 | END 39 | /* End of Version info */ 40 | 41 | -------------------------------------------------------------------------------- /src/apps/apps.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG += ordered 3 | 4 | SUBDIRS += \ 5 | crashreport \ 6 | app 7 | -------------------------------------------------------------------------------- /src/apps/crashreport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES crashwidgets.cc crashwidgets.hpp main.cc) 2 | if(CMAKE_HOST_WIN32) 3 | list(APPEND PROJECT_SOURCES app.rc) 4 | endif() 5 | qt_add_executable(CrashReport MANUAL_FINALIZATION ${PROJECT_SOURCES}) 6 | add_rpath(CrashReport) 7 | set_target_properties(CrashReport PROPERTIES WIN32_EXECUTABLE ON) 8 | target_link_libraries( 9 | CrashReport 10 | PRIVATE dump 11 | thirdparty 12 | gui 13 | resource 14 | utils 15 | Qt::Network 16 | Qt::Core5Compat 17 | Qt::Widgets) 18 | qt_finalize_executable(CrashReport) 19 | -------------------------------------------------------------------------------- /src/apps/crashreport/app.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/apps/crashreport/app.icns -------------------------------------------------------------------------------- /src/apps/crashreport/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/apps/crashreport/app.ico -------------------------------------------------------------------------------- /src/apps/crashreport/app.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | IDI_ICON1 ICON "app.ico" 4 | 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION 0,1,1,0 7 | PRODUCTVERSION 0,1,1,0 8 | FILEFLAGSMASK 0x3fL 9 | #ifdef _DEBUG 10 | FILEFLAGS VS_FF_DEBUG 11 | #else 12 | FILEFLAGS 0x0L 13 | #endif 14 | FILEOS VOS_NT_WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE VFT2_UNKNOWN 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "000404b0" 21 | BEGIN 22 | VALUE "CompanyName", "The Youth.\0" 23 | VALUE "FileDescription", "Qt-App\0" 24 | VALUE "FileVersion", "0.1.1.0\0" 25 | VALUE "LegalCopyright", "Copyright (C) 2025 Youth.\0" 26 | VALUE "OriginalFilename", "Qt-App\0" 27 | VALUE "ProductName", "Qt-App\0" 28 | VALUE "ProductVersion", "0.1.1.0\0" 29 | VALUE "InternalName", "Qt-App\0" 30 | VALUE "Comments", "Qt-App\0" 31 | VALUE "LegalTrademarks", "Youth\0" 32 | END 33 | END 34 | BLOCK "VarFileInfo" 35 | BEGIN 36 | VALUE "Translation", 0x0004, 1200 37 | END 38 | END 39 | /* End of Version info */ 40 | 41 | -------------------------------------------------------------------------------- /src/apps/crashreport/crashreport.pro: -------------------------------------------------------------------------------- 1 | include(../../../common.pri) 2 | 3 | QT += core gui network widgets core5compat 4 | 5 | macx { 6 | CONFIG -= app_bundle 7 | } 8 | 9 | TEMPLATE = app 10 | 11 | TARGET = CrashReport 12 | 13 | LIBS += \ 14 | -l$$replaceLibName(dump) \ 15 | -l$$replaceLibName(thirdparty) \ 16 | -l$$replaceLibName(gui) \ 17 | -l$$replaceLibName(resource) \ 18 | -l$$replaceLibName(utils) 19 | 20 | include(../../3rdparty/3rdparty.pri) 21 | 22 | DESTDIR = $$APP_OUTPUT_PATH 23 | 24 | RC_ICONS = app.ico 25 | ICON = app.icns 26 | 27 | SOURCES += \ 28 | crashwidgets.cc \ 29 | main.cc 30 | 31 | HEADERS += \ 32 | crashwidgets.hpp 33 | -------------------------------------------------------------------------------- /src/apps/crashreport/crashwidgets.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CRASHWIDGETS_HPP 2 | #define CRASHWIDGETS_HPP 3 | 4 | #include 5 | 6 | namespace Crash { 7 | 8 | class CrashWidgets : public GUI::MainWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit CrashWidgets(QWidget *parent = nullptr); 13 | ~CrashWidgets() override; 14 | 15 | private slots: 16 | void onOpenCrashPath(); 17 | void onRestart(); 18 | 19 | private: 20 | void setupUI(); 21 | void init(); 22 | 23 | class CrashWidgetsPrivate; 24 | QScopedPointer d_ptr; 25 | }; 26 | 27 | } // namespace Crash 28 | 29 | #endif // CRASHWIDGETS_HPP 30 | -------------------------------------------------------------------------------- /src/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES core_global.h corewidget.cc corewidget.hpp) 2 | add_share_library(core ${PROJECT_SOURCES}) 3 | target_link_libraries(core PRIVATE Qt::Widgets) 4 | 5 | if(CMAKE_HOST_WIN32) 6 | target_compile_definitions(core PRIVATE "CORE_LIBRARY") 7 | endif() 8 | -------------------------------------------------------------------------------- /src/core/core.pro: -------------------------------------------------------------------------------- 1 | include(../lib.pri) 2 | 3 | QT += widgets 4 | 5 | DEFINES += CORE_LIBRARY 6 | TARGET = $$replaceLibName(core) 7 | 8 | HEADERS += \ 9 | core_global.h \ 10 | corewidget.hpp 11 | 12 | SOURCES += \ 13 | corewidget.cc 14 | -------------------------------------------------------------------------------- /src/core/core_global.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_GLOBAL_H 2 | #define CORE_GLOBAL_H 3 | 4 | #include 5 | 6 | #if defined(CORE_LIBRARY) 7 | # define CORE_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define CORE_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // CORE_GLOBAL_H 13 | -------------------------------------------------------------------------------- /src/core/corewidget.cc: -------------------------------------------------------------------------------- 1 | #include "corewidget.hpp" 2 | 3 | #include 4 | 5 | namespace Core { 6 | 7 | class CoreWidget::CoreWidgetPrivate 8 | { 9 | public: 10 | CoreWidgetPrivate(CoreWidget *q) 11 | : q_ptr(q) 12 | {} 13 | ~CoreWidgetPrivate() 14 | { 15 | if (!buttonPtr.isNull()) { 16 | delete buttonPtr.data(); 17 | } 18 | if (!widgetPtr.isNull()) { 19 | delete widgetPtr.data(); 20 | } 21 | } 22 | 23 | CoreWidget *q_ptr; 24 | 25 | QPointer buttonPtr; 26 | QPointer widgetPtr; 27 | }; 28 | 29 | CoreWidget::CoreWidget(QObject *parent) 30 | : QObject{parent} 31 | , d_ptr(new CoreWidgetPrivate(this)) 32 | {} 33 | 34 | CoreWidget::~CoreWidget() {} 35 | 36 | QPushButton *CoreWidget::button() const 37 | { 38 | return d_ptr->buttonPtr.data(); 39 | } 40 | 41 | QWidget *CoreWidget::widget() const 42 | { 43 | return d_ptr->widgetPtr.data(); 44 | } 45 | 46 | void CoreWidget::setWidget(QWidget *widget) 47 | { 48 | d_ptr->widgetPtr = widget; 49 | } 50 | 51 | void CoreWidget::setButton(QPushButton *button, Type type) 52 | { 53 | d_ptr->buttonPtr = button; 54 | d_ptr->buttonPtr->setProperty("Type", type); 55 | } 56 | 57 | } // namespace Core 58 | -------------------------------------------------------------------------------- /src/core/corewidget.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COREWIDGET_HPP 2 | #define COREWIDGET_HPP 3 | 4 | #include "core_global.h" 5 | 6 | #include 7 | 8 | class QPushButton; 9 | 10 | namespace Core { 11 | 12 | class CORE_EXPORT CoreWidget : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | enum Type : int { Main, Help }; 17 | 18 | explicit CoreWidget(QObject *parent = nullptr); 19 | ~CoreWidget() override; 20 | 21 | [[nodiscard]] auto button() const -> QPushButton *; 22 | [[nodiscard]] auto widget() const -> QWidget *; 23 | 24 | protected: 25 | void setWidget(QWidget *widget); 26 | void setButton(QPushButton *button, Type type); 27 | 28 | private: 29 | class CoreWidgetPrivate; 30 | QScopedPointer d_ptr; 31 | }; 32 | 33 | } // namespace Core 34 | 35 | #endif // COREWIDGET_HPP 36 | -------------------------------------------------------------------------------- /src/dump/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES breakpad.hpp breakpad.cc crashpad.hpp crashpad.cc 2 | dump_global.hpp) 3 | add_custom_library(dump ${PROJECT_SOURCES}) 4 | target_link_libraries( 5 | dump PRIVATE utils Qt::Widgets unofficial::breakpad::libbreakpad 6 | unofficial::breakpad::libbreakpad_client crashpad::crashpad) 7 | 8 | if(CMAKE_HOST_WIN32) 9 | target_compile_definitions(dump PRIVATE "DUMP_LIBRARY") 10 | endif() 11 | -------------------------------------------------------------------------------- /src/dump/breakpad.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BREAKPAD_HPP 2 | #define BREAKPAD_HPP 3 | 4 | #include "dump_global.hpp" 5 | 6 | #include 7 | 8 | #include 9 | 10 | namespace Dump { 11 | 12 | class DUMP_EXPORT BreakPad : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | void setDumpPath(const QString &path); 17 | 18 | signals: 19 | void crash(); 20 | 21 | private: 22 | explicit BreakPad(QObject *parent = nullptr); 23 | ~BreakPad() override; 24 | 25 | class BreakPadPrivate; 26 | QScopedPointer d_ptr; 27 | 28 | SINGLETON(BreakPad) 29 | }; 30 | 31 | DUMP_EXPORT void openCrashReporter(); 32 | 33 | } // namespace Dump 34 | 35 | #endif // BREAKPAD_HPP 36 | -------------------------------------------------------------------------------- /src/dump/crashpad.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CRASHPAD_HPP 2 | #define CRASHPAD_HPP 3 | 4 | #include "dump_global.hpp" 5 | 6 | #include 7 | 8 | namespace Dump { 9 | 10 | class DUMP_EXPORT CrashPad : public QObject 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit CrashPad(const QString &dumpPath, 15 | const QString &libexecPath, 16 | const QString &reportUrl, 17 | bool crashReportingEnabled, 18 | QObject *parent = nullptr); 19 | ~CrashPad() override; 20 | 21 | private: 22 | class CrashPadPrivate; 23 | QScopedPointer d_ptr; 24 | }; 25 | 26 | } // namespace Dump 27 | 28 | #endif // CRASHPAD_HPP 29 | -------------------------------------------------------------------------------- /src/dump/dump.pro: -------------------------------------------------------------------------------- 1 | include(../3rdparty/3rdparty.pri) 2 | include(../slib.pri) 3 | 4 | DEFINES += DUMP_LIBRARY 5 | TARGET = $$replaceLibName(dump) 6 | 7 | LIBS += \ 8 | -l$$replaceLibName(utils) 9 | 10 | SOURCES += \ 11 | breakpad.cc \ 12 | crashpad.cc 13 | 14 | HEADERS += \ 15 | breakpad.hpp \ 16 | crashpad.hpp \ 17 | dump_global.hpp 18 | -------------------------------------------------------------------------------- /src/dump/dump_global.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DUMP_GLOBAL_HPP 2 | #define DUMP_GLOBAL_HPP 3 | 4 | #include 5 | 6 | #if defined(DUMP_LIBRARY) 7 | #define DUMP_EXPORT Q_DECL_EXPORT 8 | #else 9 | #define DUMP_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // DUMP_GLOBAL_HPP 13 | -------------------------------------------------------------------------------- /src/extensionsystem/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES 2 | extensionsystem_global.h 3 | extensionsystemtr.h 4 | invoker.cpp 5 | invoker.h 6 | iplugin.cpp 7 | iplugin.h 8 | optionsparser.cpp 9 | optionsparser.h 10 | plugindetailsview.cpp 11 | plugindetailsview.h 12 | pluginerroroverview.cpp 13 | pluginerroroverview.h 14 | pluginerrorview.cpp 15 | pluginerrorview.h 16 | pluginmanager.cpp 17 | pluginmanager.h 18 | pluginmanager_p.h 19 | pluginspec.cpp 20 | pluginspec.h 21 | pluginspec_p.h 22 | pluginview.cpp 23 | pluginview.h) 24 | 25 | include_directories(${PROJECT_SOURCE_DIR}/utils) 26 | 27 | set_property(SOURCE pluginmanager.cpp PROPERTY SKIP_AUTOMOC ON) 28 | 29 | add_share_library(extensionsystem ${PROJECT_SOURCES} ${SOURCE}) 30 | target_link_libraries(extensionsystem PRIVATE aggregation gui resource utils 31 | Qt::Core5Compat Qt::Widgets) 32 | 33 | if(CMAKE_HOST_WIN32) 34 | target_compile_definitions(extensionsystem PRIVATE "EXTENSIONSYSTEM_LIBRARY") 35 | endif() 36 | -------------------------------------------------------------------------------- /src/extensionsystem/extensionsystem.pro: -------------------------------------------------------------------------------- 1 | include(../lib.pri) 2 | 3 | QT += widgets core5compat 4 | 5 | DEFINES += EXTENSIONSYSTEM_LIBRARY 6 | TARGET = $$replaceLibName(extensionsystem) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(aggregation) \ 10 | -l$$replaceLibName(gui) \ 11 | -l$$replaceLibName(resource) \ 12 | -l$$replaceLibName(utils) 13 | 14 | HEADERS += \ 15 | extensionsystem_global.h \ 16 | extensionsystemtr.h \ 17 | invoker.h \ 18 | iplugin.h \ 19 | optionsparser.h \ 20 | plugindetailsview.h \ 21 | pluginerroroverview.h \ 22 | pluginerrorview.h \ 23 | pluginmanager.h \ 24 | pluginmanager_p.h \ 25 | pluginspec.h \ 26 | pluginspec_p.h \ 27 | pluginview.h 28 | 29 | SOURCES += \ 30 | invoker.cpp \ 31 | iplugin.cpp \ 32 | optionsparser.cpp \ 33 | plugindetailsview.cpp \ 34 | pluginerroroverview.cpp \ 35 | pluginerrorview.cpp \ 36 | pluginmanager.cpp \ 37 | pluginspec.cpp \ 38 | pluginview.cpp 39 | 40 | INCLUDEPATH += $$PWD/../utils 41 | DEPENDPATH += $$PWD/../utils 42 | -------------------------------------------------------------------------------- /src/extensionsystem/extensionsystem.qbs: -------------------------------------------------------------------------------- 1 | import qbs 1.0 2 | 3 | Project { 4 | name: "ExtensionSystem" 5 | 6 | QtcLibrary { 7 | cpp.defines: base.concat([ 8 | "EXTENSIONSYSTEM_LIBRARY", 9 | "IDE_TEST_DIR=\".\"" 10 | ]) 11 | 12 | Depends { name: "Qt"; submodules: ["core", "widgets"] } 13 | Depends { name: "Aggregation" } 14 | Depends { name: "Utils" } 15 | 16 | files: [ 17 | "extensionsystem_global.h", 18 | "extensionsystemtr.h", 19 | "invoker.cpp", 20 | "invoker.h", 21 | "iplugin.cpp", 22 | "iplugin.h", 23 | "optionsparser.cpp", 24 | "optionsparser.h", 25 | "plugindetailsview.cpp", 26 | "plugindetailsview.h", 27 | "pluginerroroverview.cpp", 28 | "pluginerroroverview.h", 29 | "pluginerrorview.cpp", 30 | "pluginerrorview.h", 31 | "pluginmanager.cpp", 32 | "pluginmanager.h", 33 | "pluginmanager_p.h", 34 | "pluginspec.cpp", 35 | "pluginspec.h", 36 | "pluginspec_p.h", 37 | "pluginview.cpp", 38 | "pluginview.h", 39 | ] 40 | 41 | Export { 42 | Depends { name: "Qt.core" } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/extensionsystem/extensionsystem_global.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #if defined(EXTENSIONSYSTEM_LIBRARY) 10 | # define EXTENSIONSYSTEM_EXPORT Q_DECL_EXPORT 11 | #elif defined(EXTENSIONSYSTEM_STATIC_LIBRARY) 12 | # define EXTENSIONSYSTEM_EXPORT 13 | #else 14 | # define EXTENSIONSYSTEM_EXPORT Q_DECL_IMPORT 15 | #endif 16 | 17 | Q_DECLARE_LOGGING_CATEGORY(pluginLog) 18 | -------------------------------------------------------------------------------- /src/extensionsystem/extensionsystemtr.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace ExtensionSystem { 9 | 10 | struct Tr 11 | { 12 | Q_DECLARE_TR_FUNCTIONS(QtC::ExtensionSystem) 13 | }; 14 | 15 | } // ExtensionSystem 16 | -------------------------------------------------------------------------------- /src/extensionsystem/iplugin.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "extensionsystem_global.h" 7 | 8 | #include 9 | 10 | #include 11 | 12 | namespace ExtensionSystem { 13 | 14 | namespace Internal { 15 | class IPluginPrivate; 16 | } 17 | 18 | using TestCreator = std::function; 19 | 20 | class EXTENSIONSYSTEM_EXPORT IPlugin : public QObject 21 | { 22 | Q_OBJECT 23 | 24 | public: 25 | enum ShutdownFlag { SynchronousShutdown, AsynchronousShutdown }; 26 | 27 | IPlugin(); 28 | ~IPlugin() override; 29 | 30 | virtual auto initialize(const QStringList &arguments, QString *errorString) -> bool; 31 | virtual void extensionsInitialized() {} 32 | virtual auto delayedInitialize() -> bool { return false; } 33 | virtual auto aboutToShutdown() -> ShutdownFlag { return SynchronousShutdown; } 34 | virtual auto remoteCommand(const QStringList & /* options */, 35 | const QString & /* workingDirectory */, 36 | const QStringList & /* arguments */) -> QObject * 37 | { 38 | return nullptr; 39 | } 40 | 41 | // Deprecated in 10.0, use addTest() 42 | [[nodiscard]] virtual auto createTestObjects() const -> QVector; 43 | 44 | protected: 45 | virtual void initialize() {} 46 | 47 | template 48 | void addTest(Args &&...args) 49 | { 50 | addTestCreator([args...] { return new Test(args...); }); 51 | } 52 | void addTestCreator(const TestCreator &creator); 53 | 54 | signals: 55 | void asynchronousShutdownFinished(); 56 | 57 | protected: 58 | void addObject(QObject *obj); 59 | 60 | private: 61 | Internal::IPluginPrivate *d; 62 | }; 63 | 64 | } // namespace ExtensionSystem 65 | -------------------------------------------------------------------------------- /src/extensionsystem/plugindetailsview.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "extensionsystem_global.h" 7 | 8 | #include 9 | 10 | namespace ExtensionSystem { 11 | 12 | class PluginSpec; 13 | 14 | namespace Internal { class PluginDetailsViewPrivate; } 15 | 16 | class EXTENSIONSYSTEM_EXPORT PluginDetailsView : public QWidget 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit PluginDetailsView(QWidget *parent = nullptr); 22 | ~PluginDetailsView() override; 23 | 24 | void update(PluginSpec *spec); 25 | 26 | private: 27 | Internal::PluginDetailsViewPrivate *d = nullptr; 28 | }; 29 | 30 | } // namespace ExtensionSystem 31 | -------------------------------------------------------------------------------- /src/extensionsystem/pluginerroroverview.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "extensionsystem_global.h" 7 | 8 | #include 9 | 10 | namespace ExtensionSystem { 11 | 12 | class EXTENSIONSYSTEM_EXPORT PluginErrorOverview : public QDialog 13 | { 14 | public: 15 | explicit PluginErrorOverview(QWidget *parent = nullptr); 16 | }; 17 | 18 | } // ExtensionSystem 19 | -------------------------------------------------------------------------------- /src/extensionsystem/pluginerrorview.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "extensionsystem_global.h" 7 | 8 | #include 9 | 10 | namespace ExtensionSystem { 11 | 12 | class PluginSpec; 13 | namespace Internal { class PluginErrorViewPrivate; } 14 | 15 | class EXTENSIONSYSTEM_EXPORT PluginErrorView : public QWidget 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit PluginErrorView(QWidget *parent = nullptr); 21 | ~PluginErrorView() override; 22 | 23 | void update(PluginSpec *spec); 24 | 25 | private: 26 | Internal::PluginErrorViewPrivate *d = nullptr; 27 | }; 28 | 29 | } // namespace ExtensionSystem 30 | -------------------------------------------------------------------------------- /src/extensionsystem/pluginview.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "extensionsystem_global.h" 7 | 8 | #include 9 | 10 | #include 11 | 12 | #include 13 | 14 | namespace GUI { 15 | class CategorySortFilterModel; 16 | class TreeView; 17 | } // namespace GUI 18 | 19 | namespace ExtensionSystem { 20 | 21 | class PluginSpec; 22 | 23 | namespace Internal { 24 | class CollectionItem; 25 | class PluginItem; 26 | } // Internal 27 | 28 | class EXTENSIONSYSTEM_EXPORT PluginView : public QWidget 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | explicit PluginView(QWidget *parent = nullptr); 34 | ~PluginView() override; 35 | 36 | [[nodiscard]] auto currentPlugin() const -> PluginSpec *; 37 | void setFilter(const QString &filter); 38 | void cancelChanges(); 39 | 40 | signals: 41 | void currentPluginChanged(ExtensionSystem::PluginSpec *spec); 42 | void pluginActivated(ExtensionSystem::PluginSpec *spec); 43 | void pluginSettingsChanged(ExtensionSystem::PluginSpec *spec); 44 | 45 | private: 46 | [[nodiscard]] auto pluginForIndex(const QModelIndex &index) const -> PluginSpec *; 47 | void updatePlugins(); 48 | auto setPluginsEnabled(const QSet &plugins, bool enable) -> bool; 49 | 50 | GUI::TreeView *m_categoryView; 51 | GUI::TreeModel *m_model; 52 | GUI::CategorySortFilterModel *m_sortModel; 53 | std::unordered_map m_affectedPlugins; 54 | 55 | friend class Internal::CollectionItem; 56 | friend class Internal::PluginItem; 57 | }; 58 | 59 | } // namespae ExtensionSystem 60 | -------------------------------------------------------------------------------- /src/gui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES 2 | camelcasecursor.cpp 3 | camelcasecursor.h 4 | categorysortfiltermodel.cpp 5 | categorysortfiltermodel.h 6 | mainwidget.cc 7 | mainwidget.hpp 8 | completinglineedit.cpp 9 | completinglineedit.h 10 | dialog.cc 11 | dialog.hpp 12 | fancylineedit.cpp 13 | fancylineedit.h 14 | gui_global.hpp 15 | historycompleter.cpp 16 | historycompleter.h 17 | itemviews.cpp 18 | itemviews.h 19 | messagebox.cpp 20 | messagebox.h 21 | multitextcursor.cpp 22 | multitextcursor.h 23 | pushbutton.cc 24 | pushbutton.hpp 25 | treemodel.cpp 26 | treemodel.h 27 | waitwidget.cpp 28 | waitwidget.h) 29 | 30 | add_custom_library(gui ${PROJECT_SOURCES}) 31 | target_link_libraries(gui PRIVATE resource utils Qt::Widgets) 32 | 33 | if(CMAKE_HOST_WIN32) 34 | target_compile_definitions(gui PRIVATE "GUI_LIBRARY") 35 | endif() 36 | -------------------------------------------------------------------------------- /src/gui/camelcasecursor.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The Qt Company Ltd. 2 | // Copyright (C) 2019 Andre Hartmann 3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 4 | 5 | #pragma once 6 | 7 | #include "gui_global.hpp" 8 | 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | class QLineEdit; 13 | class QPlainTextEdit; 14 | QT_END_NAMESPACE 15 | 16 | namespace GUI { 17 | 18 | class MultiTextCursor; 19 | 20 | class GUI_EXPORT CamelCaseCursor 21 | { 22 | public: 23 | static auto left(QTextCursor *cursor, QPlainTextEdit *edit, QTextCursor::MoveMode mode) -> bool; 24 | static auto left(MultiTextCursor *cursor, QPlainTextEdit *edit, QTextCursor::MoveMode mode) -> bool; 25 | static auto left(QLineEdit *edit, QTextCursor::MoveMode mode) -> bool; 26 | static auto right(QTextCursor *cursor, QPlainTextEdit *edit, QTextCursor::MoveMode mode) -> bool; 27 | static auto right(MultiTextCursor *cursor, QPlainTextEdit *edit, QTextCursor::MoveMode mode) -> bool; 28 | static auto right(QLineEdit *edit, QTextCursor::MoveMode mode) -> bool; 29 | }; 30 | 31 | } // namespace GUI 32 | -------------------------------------------------------------------------------- /src/gui/categorysortfiltermodel.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #include "categorysortfiltermodel.h" 5 | 6 | #include 7 | 8 | namespace GUI { 9 | 10 | CategorySortFilterModel::CategorySortFilterModel(QObject *parent) 11 | : QSortFilterProxyModel(parent) 12 | {} 13 | 14 | void CategorySortFilterModel::setNewItemRole(int role) 15 | { 16 | m_newItemRole = role; 17 | invalidate(); 18 | } 19 | 20 | auto CategorySortFilterModel::filterAcceptsRow(int source_row, 21 | const QModelIndex &source_parent) const -> bool 22 | { 23 | if (!source_parent.isValid()) { 24 | // category items should be visible if any of its children match 25 | const QRegularExpression ®exp = filterRegularExpression(); 26 | const QModelIndex &categoryIndex = sourceModel()->index(source_row, 0, source_parent); 27 | if (regexp.match(sourceModel()->data(categoryIndex, filterRole()).toString()).hasMatch()) 28 | return true; 29 | 30 | if (m_newItemRole != -1 && categoryIndex.isValid()) { 31 | if (categoryIndex.data(m_newItemRole).toBool()) 32 | return true; 33 | } 34 | 35 | const int rowCount = sourceModel()->rowCount(categoryIndex); 36 | for (int row = 0; row < rowCount; ++row) { 37 | if (filterAcceptsRow(row, categoryIndex)) 38 | return true; 39 | } 40 | return false; 41 | } 42 | 43 | if (m_newItemRole != -1) { 44 | const QModelIndex &idx = sourceModel()->index(source_row, 0, source_parent); 45 | if (idx.data(m_newItemRole).toBool()) 46 | return true; 47 | } 48 | 49 | return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); 50 | } 51 | 52 | } // namespace GUI 53 | -------------------------------------------------------------------------------- /src/gui/categorysortfiltermodel.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "gui_global.hpp" 7 | 8 | #include 9 | 10 | namespace GUI { 11 | 12 | class GUI_EXPORT CategorySortFilterModel : public QSortFilterProxyModel 13 | { 14 | public: 15 | explicit CategorySortFilterModel(QObject *parent = nullptr); 16 | 17 | // "New" items will always be accepted, regardless of the filter. 18 | void setNewItemRole(int role); 19 | 20 | protected: 21 | [[nodiscard]] auto filterAcceptsRow(int source_row, const QModelIndex &source_parent) const -> bool override; 22 | 23 | private: 24 | int m_newItemRole = -1; 25 | }; 26 | 27 | } // namespace GUI 28 | -------------------------------------------------------------------------------- /src/gui/completinglineedit.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 Orgad Shaneh . 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #include "completinglineedit.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace GUI { 12 | 13 | CompletingLineEdit::CompletingLineEdit(QWidget *parent) 14 | : QLineEdit(parent) 15 | {} 16 | 17 | auto CompletingLineEdit::event(QEvent *e) -> bool 18 | { 19 | // workaround for QTCREATORBUG-9453 20 | if (e->type() == QEvent::ShortcutOverride) { 21 | if (QCompleter *comp = completer()) { 22 | if (comp->popup() && comp->popup()->isVisible()) { 23 | auto *ke = static_cast(e); 24 | if (ke->key() == Qt::Key_Escape && !ke->modifiers()) { 25 | ke->accept(); 26 | return true; 27 | } 28 | } 29 | } 30 | } 31 | return QLineEdit::event(e); 32 | } 33 | 34 | void CompletingLineEdit::keyPressEvent(QKeyEvent *e) 35 | { 36 | if (e->key() == Qt::Key_Down && !e->modifiers()) { 37 | if (QCompleter *comp = completer()) { 38 | if (!comp->popup()->isVisible()) { 39 | comp->complete(); 40 | return; 41 | } 42 | } 43 | } 44 | QLineEdit::keyPressEvent(e); 45 | } 46 | 47 | } // namespace GUI 48 | -------------------------------------------------------------------------------- /src/gui/completinglineedit.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 Orgad Shaneh . 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "gui_global.hpp" 7 | 8 | #include 9 | 10 | namespace GUI { 11 | 12 | class GUI_EXPORT CompletingLineEdit : public QLineEdit 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit CompletingLineEdit(QWidget *parent = nullptr); 18 | 19 | protected: 20 | auto event(QEvent *e) -> bool override; 21 | void keyPressEvent(QKeyEvent *e) override; 22 | }; 23 | 24 | } // namespace GUI 25 | -------------------------------------------------------------------------------- /src/gui/dialog.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "mainwidget.hpp" 4 | 5 | #include 6 | 7 | namespace GUI { 8 | 9 | #ifndef Q_OS_MACOS 10 | class GUI_EXPORT Dialog : public MainWidget 11 | { 12 | Q_OBJECT 13 | public: 14 | enum ExecFlag : int { Accepted, Rejected, Closed }; 15 | 16 | explicit Dialog(QWidget *parent = nullptr); 17 | ~Dialog() override; 18 | 19 | auto exec() -> int; 20 | 21 | signals: 22 | void accepted(); 23 | void rejected(); 24 | 25 | public slots: 26 | void accept(); 27 | void reject(); 28 | 29 | private slots: 30 | void onClosed(); 31 | void onMoveParentCenter(); 32 | 33 | private: 34 | void buildConnect(); 35 | 36 | class DialogPrivate; 37 | QScopedPointer d_ptr; 38 | }; 39 | #else 40 | class GUI_EXPORT Dialog : public QDialog 41 | { 42 | Q_OBJECT 43 | public: 44 | explicit Dialog(QWidget *parent = nullptr) 45 | : QDialog(parent) 46 | { 47 | setWindowFlags((windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint); 48 | } 49 | 50 | void setMinButtonVisible(bool) {} 51 | void setRestoreMaxButtonVisible(bool) {} 52 | 53 | void setIcon(const QIcon &icon) { setWindowIcon(icon); } 54 | void setTitle(const QString &title) { setWindowTitle(title); } 55 | void setCentralWidget(QWidget *widget); 56 | int shadowPadding() { return 0; } 57 | }; 58 | #endif 59 | 60 | } // namespace GUI 61 | -------------------------------------------------------------------------------- /src/gui/gui.pro: -------------------------------------------------------------------------------- 1 | include(../slib.pri) 2 | 3 | QT += widgets 4 | 5 | DEFINES += GUI_LIBRARY 6 | TARGET = $$replaceLibName(gui) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(resource) \ 10 | -l$$replaceLibName(utils) 11 | 12 | HEADERS += \ 13 | camelcasecursor.h \ 14 | categorysortfiltermodel.h \ 15 | mainwidget.hpp \ 16 | completinglineedit.h \ 17 | dialog.hpp \ 18 | fancylineedit.h \ 19 | gui_global.hpp \ 20 | historycompleter.h \ 21 | itemviews.h \ 22 | messagebox.h \ 23 | multitextcursor.h \ 24 | pushbutton.hpp \ 25 | treemodel.h \ 26 | waitwidget.h 27 | 28 | SOURCES += \ 29 | camelcasecursor.cpp \ 30 | categorysortfiltermodel.cpp \ 31 | mainwidget.cc \ 32 | completinglineedit.cpp \ 33 | dialog.cc \ 34 | fancylineedit.cpp \ 35 | historycompleter.cpp \ 36 | itemviews.cpp \ 37 | messagebox.cpp \ 38 | multitextcursor.cpp \ 39 | pushbutton.cc \ 40 | treemodel.cpp \ 41 | waitwidget.cpp 42 | -------------------------------------------------------------------------------- /src/gui/gui_global.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GUI_GLOBAL_HPP 2 | #define GUI_GLOBAL_HPP 3 | 4 | #include 5 | 6 | #if defined(GUI_LIBRARY) 7 | # define GUI_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define GUI_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // GUI_GLOBAL_HPP 13 | -------------------------------------------------------------------------------- /src/gui/historycompleter.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "gui_global.hpp" 7 | 8 | #include 9 | 10 | namespace Utils { 11 | class QtcSettings; 12 | } 13 | 14 | namespace GUI { 15 | 16 | class HistoryCompleterPrivate; 17 | class GUI_EXPORT HistoryCompleter : public QCompleter 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | static void setSettings(Utils::QtcSettings *settings); 23 | explicit HistoryCompleter(const QString &historyKey, QObject *parent = nullptr); 24 | auto removeHistoryItem(int index) -> bool; 25 | [[nodiscard]] auto historyItem() const -> QString; 26 | [[nodiscard]] auto hasHistory() const -> bool { return historySize() > 0; } 27 | static auto historyExistsFor(const QString &historyKey) -> bool; 28 | 29 | private: 30 | ~HistoryCompleter() override; 31 | [[nodiscard]] auto historySize() const -> int; 32 | [[nodiscard]] auto maximalHistorySize() const -> int; 33 | void setMaximalHistorySize(int numberOfEntries); 34 | 35 | public Q_SLOTS: 36 | void clearHistory(); 37 | void addEntry(const QString &str); 38 | 39 | private: 40 | HistoryCompleterPrivate *d; 41 | }; 42 | 43 | } // namespace GUI 44 | -------------------------------------------------------------------------------- /src/gui/itemviews.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #include "itemviews.h" 5 | 6 | /*! 7 | \class Utils::TreeView 8 | 9 | \brief The TreeView adds setActivationMode to QTreeView 10 | to allow for single click/double click behavior on 11 | platforms where the default is different. Use with care. 12 | 13 | Also adds sane keyboard navigation for mac. 14 | */ 15 | 16 | /*! 17 | \class Utils::TreeWidget 18 | 19 | \brief The TreeWidget adds setActivationMode to QTreeWidget 20 | to allow for single click/double click behavior on 21 | platforms where the default is different. Use with care. 22 | 23 | Also adds sane keyboard navigation for mac. 24 | */ 25 | 26 | /*! 27 | \class Utils::ListView 28 | 29 | \brief The ListView adds setActivationMode to QListView 30 | to allow for single click/double click behavior on 31 | platforms where the default is different. Use with care. 32 | 33 | Also adds sane keyboard navigation for mac. 34 | */ 35 | 36 | /*! 37 | \class Utils::ListWidget 38 | 39 | \brief The ListWidget adds setActivationMode to QListWidget 40 | to allow for single click/double click behavior on 41 | platforms where the default is different. Use with care. 42 | 43 | Also adds sane keyboard navigation for mac. 44 | */ 45 | -------------------------------------------------------------------------------- /src/gui/mainwidget.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "gui_global.hpp" 4 | 5 | #include 6 | 7 | namespace GUI { 8 | 9 | #ifndef Q_OS_MACOS 10 | class GUI_EXPORT MainWidget : public QWidget 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit MainWidget(QWidget *parent = nullptr); 15 | ~MainWidget() override; 16 | 17 | void setRestoreMaxButtonVisible(bool visible); 18 | void setMinButtonVisible(bool visible); 19 | 20 | void setTitle(const QString &title); 21 | void setIcon(const QIcon &icon); 22 | 23 | void setCentralWidget(QWidget *centralWidget); 24 | void setTitleBar(QWidget *titleBar); 25 | 26 | void setShadowPadding(int shadowPadding = 10); 27 | auto shadowPadding() -> int; 28 | 29 | void setSizeGripVisible(bool visible); 30 | 31 | signals: 32 | void aboutToclose(); 33 | 34 | private slots: 35 | void onShowMaximized(); 36 | void onShowNormal(); 37 | 38 | protected: 39 | void mousePressEvent(QMouseEvent *event) override; 40 | void mouseMoveEvent(QMouseEvent *event) override; 41 | void mouseReleaseEvent(QMouseEvent *event) override; 42 | void mouseDoubleClickEvent(QMouseEvent *event) override; 43 | void changeEvent(QEvent *event) override; 44 | 45 | private: 46 | void buildConnnect(); 47 | void setTr(); 48 | 49 | class MainWidgetPrivate; 50 | QScopedPointer d_ptr; 51 | }; 52 | #else 53 | class GUI_EXPORT MainWidget : public QMainWindow 54 | { 55 | Q_OBJECT 56 | public: 57 | explicit MainWidget(QWidget *parent = nullptr) 58 | : QMainWindow(parent) 59 | {} 60 | 61 | void setIcon(const QIcon &icon) { setWindowIcon(icon); } 62 | void setTitle(const QString &title) { setWindowTitle(title); } 63 | void setTitleBar(QWidget *widget); 64 | int shadowPadding() { return 0; } 65 | 66 | signals: 67 | void aboutToclose(); 68 | }; 69 | #endif 70 | 71 | } // namespace GUI 72 | -------------------------------------------------------------------------------- /src/gui/messagebox.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dialog.hpp" 4 | 5 | namespace GUI { 6 | 7 | class GUI_EXPORT MessageBox : public Dialog 8 | { 9 | Q_OBJECT 10 | public: 11 | enum StandardButton : int { Yes = 1 << 0, No = 1 << 1, Close = 1 << 2 }; 12 | Q_DECLARE_FLAGS(StandardButtons, StandardButton) 13 | Q_FLAG(StandardButtons) 14 | 15 | explicit MessageBox(QWidget *parent = nullptr); 16 | ~MessageBox() override; 17 | 18 | void setIcon(const QIcon &icon); 19 | void setMessage(const QString &msg); 20 | 21 | void setButtonVisible(StandardButtons buttons); 22 | 23 | static auto Info(QWidget *parent, const QString &msg, StandardButtons buttons = Close) -> int; 24 | static auto Warning(QWidget *parent, const QString &msg, StandardButtons buttons) -> int; 25 | 26 | static auto checkButton(StandardButtons buttons, StandardButton button) -> bool; 27 | 28 | private: 29 | void buildConnect(); 30 | 31 | class MessBoxPrivate; 32 | QScopedPointer d_ptr; 33 | }; 34 | 35 | } // namespace GUI 36 | 37 | Q_DECLARE_OPERATORS_FOR_FLAGS(GUI::MessageBox::StandardButtons) 38 | -------------------------------------------------------------------------------- /src/gui/pushbutton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PUSHBUTTON_HPP 2 | #define PUSHBUTTON_HPP 3 | 4 | #include 5 | 6 | namespace GUI { 7 | 8 | class PushButton : public QPushButton 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit PushButton(QWidget *parent = nullptr); 13 | ~PushButton() override; 14 | 15 | void setNormalIcon(const QIcon &icon); 16 | void setHoverIcon(const QIcon &icon); 17 | void setActiveIcon(const QIcon &icon); 18 | 19 | private slots: 20 | void onToggled(bool checked); 21 | 22 | protected: 23 | auto eventFilter(QObject *watched, QEvent *event) -> bool override; 24 | 25 | private: 26 | void buildConnect(); 27 | 28 | class PushButtonPrivate; 29 | QScopedPointer d_ptr; 30 | }; 31 | 32 | auto createPushButton(const QStringList &normalIconPaths, 33 | const QStringList &hoverIconPaths, 34 | const QStringList &activeIconPaths, 35 | QWidget *parent = nullptr) -> PushButton *; 36 | 37 | } // namespace GUI 38 | 39 | #endif // PUSHBUTTON_HPP 40 | -------------------------------------------------------------------------------- /src/gui/waitwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "waitwidget.h" 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace GUI { 8 | 9 | class WaitWidget::WaitWidgetPrivate 10 | { 11 | public: 12 | explicit WaitWidgetPrivate(WaitWidget *q) 13 | : q_ptr(q) 14 | { 15 | processBar = new QProgressBar(q_ptr); 16 | processBar->setMaximumHeight(5); 17 | processBar->setTextVisible(false); 18 | processBar->setRange(0, 100); 19 | 20 | timer = new QTimer(q_ptr); 21 | } 22 | 23 | void setupUI() 24 | { 25 | auto *layout = new QHBoxLayout(q_ptr); 26 | layout->setContentsMargins({}); 27 | layout->setSpacing(0); 28 | layout->addWidget(processBar); 29 | } 30 | 31 | QWidget *q_ptr; 32 | QProgressBar *processBar; 33 | QTimer *timer; 34 | }; 35 | 36 | WaitWidget::WaitWidget() 37 | : d_ptr(new WaitWidgetPrivate(this)) 38 | { 39 | setWindowFlags(windowFlags() | Qt::FramelessWindowHint | Qt::WindowCloseButtonHint 40 | | Qt::MSWindowsFixedSizeDialogHint); 41 | //setAttribute(Qt::WA_StyledBackground); 42 | setAttribute(Qt::WA_TranslucentBackground); 43 | d_ptr->setupUI(); 44 | connect(d_ptr->timer, &QTimer::timeout, this, &WaitWidget::updateProgressBar); 45 | d_ptr->timer->start(100); 46 | resize(600, 5); 47 | Utils::windowCenter(this); 48 | } 49 | 50 | WaitWidget::~WaitWidget() {} 51 | 52 | void WaitWidget::fullProgressBar() 53 | { 54 | int value = d_ptr->processBar->value(); 55 | if (value < 100) { 56 | d_ptr->processBar->setValue(100); 57 | } 58 | } 59 | 60 | void WaitWidget::updateProgressBar() 61 | { 62 | int value = d_ptr->processBar->value() + 5; 63 | if (value >= 95) { 64 | d_ptr->timer->stop(); 65 | return; 66 | } 67 | d_ptr->processBar->setValue(value); 68 | } 69 | 70 | } // namespace GUI 71 | -------------------------------------------------------------------------------- /src/gui/waitwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef WAITWIDGET_H 2 | #define WAITWIDGET_H 3 | 4 | #include "gui_global.hpp" 5 | 6 | #include 7 | 8 | namespace GUI { 9 | 10 | class GUI_EXPORT WaitWidget : public QSplashScreen 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit WaitWidget(); 15 | ~WaitWidget() override; 16 | 17 | void fullProgressBar(); 18 | 19 | private slots: 20 | void updateProgressBar(); 21 | 22 | private: 23 | class WaitWidgetPrivate; 24 | QScopedPointer d_ptr; 25 | }; 26 | 27 | } // namespace GUI 28 | 29 | #endif // WAITWIDGET_H 30 | -------------------------------------------------------------------------------- /src/lib.pri: -------------------------------------------------------------------------------- 1 | include(../common.pri) 2 | 3 | 4 | TEMPLATE = lib 5 | 6 | win32 { 7 | DESTDIR = $$APP_OUTPUT_PATH/../libs 8 | DLLDESTDIR = $$APP_OUTPUT_PATH 9 | } 10 | 11 | unix{ 12 | DESTDIR = $$APP_OUTPUT_PATH 13 | } 14 | -------------------------------------------------------------------------------- /src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(coreplugin) 2 | add_subdirectory(hashplugin) 3 | add_subdirectory(systeminfoplugin) 4 | add_subdirectory(helloplugin) 5 | add_subdirectory(aboutplugin) 6 | add_subdirectory(guiplugin) 7 | -------------------------------------------------------------------------------- /src/plugins/aboutplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES aboutplugin.cc aboutplugin.hpp aboutwidget.cc 2 | aboutwidget.hpp) 3 | 4 | add_custom_plugin(aboutplugin ${PROJECT_SOURCES}) 5 | target_link_libraries(aboutplugin PRIVATE core extensionsystem utils 6 | Qt::Widgets) 7 | -------------------------------------------------------------------------------- /src/plugins/aboutplugin/aboutplugin.cc: -------------------------------------------------------------------------------- 1 | #include "aboutplugin.hpp" 2 | #include "aboutwidget.hpp" 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | AboutPluginWidget::AboutPluginWidget(QObject *parent) 9 | { 10 | auto *aboutWidget = new AboutWidget; 11 | aboutWidget->setObjectName("AboutWidget"); 12 | setWidget(aboutWidget); 13 | setButton(new QPushButton(tr("About")), Core::CoreWidget::Help); 14 | } 15 | 16 | bool AboutPlugin::initialize(const QStringList &arguments, QString *errorString) 17 | { 18 | addObject(new AboutPluginWidget(this)); 19 | return true; 20 | } 21 | 22 | } // namespace Plugin 23 | -------------------------------------------------------------------------------- /src/plugins/aboutplugin/aboutplugin.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ABOUTPLUGIN_HPP 2 | #define ABOUTPLUGIN_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace Plugin { 8 | 9 | class AboutPluginWidget : public Core::CoreWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit AboutPluginWidget(QObject *parent = nullptr); 14 | }; 15 | 16 | class AboutPlugin : public ExtensionSystem::IPlugin 17 | { 18 | Q_OBJECT 19 | Q_PLUGIN_METADATA(IID "Youth.Qt.plugin" FILE "aboutplugin.json") 20 | public: 21 | AboutPlugin() = default; 22 | 23 | auto initialize(const QStringList &arguments, QString *errorString) -> bool override; 24 | void extensionsInitialized() override {} 25 | }; 26 | 27 | } // namespace Plugin 28 | 29 | #endif // ABOUTPLUGIN_HPP 30 | -------------------------------------------------------------------------------- /src/plugins/aboutplugin/aboutplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AboutPlugin", 3 | "Version": "0.1.1", 4 | "CompatVersion": "0.1.1", 5 | "Required": false, 6 | "Vendor": "Youth", 7 | "Copyright": "(C) 2025 The Youth Ltd", 8 | "License": "GNU General Public License v3.0", 9 | "Category": "Help", 10 | "Description": "About" 11 | } -------------------------------------------------------------------------------- /src/plugins/aboutplugin/aboutplugin.pro: -------------------------------------------------------------------------------- 1 | include(../plugins.pri) 2 | 3 | QT += widgets core5compat 4 | 5 | DEFINES += ABOUTPLUGIN_LIBRARY 6 | TARGET = $$replaceLibName(aboutplugin) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(core) \ 10 | -l$$replaceLibName(extensionsystem) \ 11 | -l$$replaceLibName(utils) 12 | 13 | SOURCES += \ 14 | aboutplugin.cc \ 15 | aboutwidget.cc 16 | 17 | HEADERS += \ 18 | aboutplugin.hpp \ 19 | aboutwidget.hpp 20 | 21 | DISTFILES += \ 22 | aboutplugin.json 23 | -------------------------------------------------------------------------------- /src/plugins/aboutplugin/aboutwidget.cc: -------------------------------------------------------------------------------- 1 | #include "aboutwidget.hpp" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | namespace Plugin { 9 | 10 | AboutWidget::AboutWidget(QWidget *parent) 11 | : QWidget{parent} 12 | { 13 | setupUI(); 14 | } 15 | 16 | void AboutWidget::setupUI() 17 | { 18 | auto text = QString("%1 %2
") 20 | .arg(Utils::appName, Utils::version); 21 | 22 | auto *textLayout = new QVBoxLayout; 23 | textLayout->setSpacing(20); 24 | textLayout->addStretch(); 25 | textLayout->addWidget(new QLabel{text, this}); 26 | textLayout->addWidget(new QLabel{Utils::systemInfo(), this}); 27 | textLayout->addWidget(new QLabel{Utils::copyright, this}); 28 | textLayout->addStretch(); 29 | 30 | auto *iconButton = new QToolButton(this); 31 | iconButton->setIconSize({64, 64}); 32 | iconButton->setIcon(qApp->windowIcon()); 33 | 34 | auto *topLayout = new QHBoxLayout; 35 | topLayout->setSpacing(20); 36 | topLayout->addWidget(iconButton); 37 | topLayout->addStretch(); 38 | topLayout->addLayout(textLayout); 39 | topLayout->addStretch(); 40 | 41 | auto *aboutQtButton = new QToolButton(this); 42 | aboutQtButton->setText(tr("About Qt")); 43 | connect(aboutQtButton, &QToolButton::clicked, qApp, &QApplication::aboutQt); 44 | 45 | auto *layout = new QVBoxLayout(this); 46 | layout->setContentsMargins(30, 30, 30, 30); 47 | layout->addStretch(); 48 | layout->addLayout(topLayout); 49 | layout->addStretch(); 50 | layout->addWidget(aboutQtButton, 0, Qt::AlignCenter); 51 | } 52 | 53 | } // namespace Plugin 54 | -------------------------------------------------------------------------------- /src/plugins/aboutplugin/aboutwidget.hpp: -------------------------------------------------------------------------------- 1 | #ifndef ABOUTWIDGET_HPP 2 | #define ABOUTWIDGET_HPP 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | class AboutWidget : public QWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit AboutWidget(QWidget *parent = nullptr); 13 | 14 | private slots: 15 | void setupUI(); 16 | }; 17 | 18 | } // namespace Plugin 19 | 20 | #endif // ABOUTWIDGET_HPP 21 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES 2 | configwidget.cpp 3 | configwidget.h 4 | coreplugin.cpp 5 | coreplugin.h 6 | coreplugintr.h 7 | mainwindow.cpp 8 | mainwindow.h 9 | plugindialog.cpp 10 | plugindialog.h) 11 | 12 | add_custom_plugin(coreplugin ${PROJECT_SOURCES}) 13 | target_link_libraries(coreplugin PRIVATE core extensionsystem gui resource 14 | utils Qt::Widgets) 15 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/configwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIGWIDGET_H 2 | #define CONFIGWIDGET_H 3 | 4 | #include 5 | 6 | class ConfigWidget : public QWidget 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit ConfigWidget(QWidget *parent = nullptr); 11 | ~ConfigWidget() override; 12 | 13 | private slots: 14 | void onReloadLanguage(int index); 15 | 16 | protected: 17 | void changeEvent(QEvent *event) override; 18 | 19 | private: 20 | void buildConnect(); 21 | void setTr(); 22 | 23 | class ConfigWidgetPrivate; 24 | QScopedPointer d_ptr; 25 | }; 26 | 27 | #endif // CONFIGWIDGET_H 28 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/coreplugin.cpp: -------------------------------------------------------------------------------- 1 | #include "coreplugin.h" 2 | #include "mainwindow.h" 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | CorePlugin::CorePlugin() = default; 9 | 10 | CorePlugin::~CorePlugin() = default; 11 | 12 | auto CorePlugin::initialize(const QStringList &, QString *) -> bool 13 | { 14 | m_mainWindowPtr.reset(new MainWindow); 15 | return true; 16 | } 17 | 18 | void CorePlugin::extensionsInitialized() 19 | { 20 | m_mainWindowPtr->extensionsInitialized(); 21 | } 22 | 23 | auto CorePlugin::remoteCommand(const QStringList &, const QString &, const QStringList &) 24 | -> QObject * 25 | { 26 | m_mainWindowPtr->setWindowState(m_mainWindowPtr->windowState() & ~Qt::WindowMinimized); 27 | m_mainWindowPtr->show(); 28 | m_mainWindowPtr->raise(); 29 | m_mainWindowPtr->activateWindow(); 30 | return nullptr; 31 | } 32 | 33 | } // namespace Plugin 34 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/coreplugin.h: -------------------------------------------------------------------------------- 1 | #ifndef COREPLUGIN_H 2 | #define COREPLUGIN_H 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | class MainWindow; 9 | class CorePlugin : public ExtensionSystem::IPlugin 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID "Youth.Qt.plugin" FILE "coreplugin.json") 13 | public: 14 | CorePlugin(); 15 | ~CorePlugin() override; 16 | 17 | auto initialize(const QStringList &arguments, QString *errorString) -> bool override; 18 | void extensionsInitialized() override; 19 | auto remoteCommand(const QStringList &, const QString &, const QStringList &) 20 | -> QObject * override; 21 | 22 | private: 23 | QScopedPointer m_mainWindowPtr; 24 | }; 25 | 26 | } // namespace Plugin 27 | 28 | #endif // COREPLUGIN_H 29 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/coreplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "CorePlugin", 3 | "Version": "0.1.1", 4 | "CompatVersion": "0.1.1", 5 | "Required": true, 6 | "Vendor": "Youth", 7 | "Copyright": "(C) 2025 The Youth Ltd", 8 | "License": "GNU General Public License v3.0", 9 | "Category": "Core", 10 | "Description": "MainWindow" 11 | } -------------------------------------------------------------------------------- /src/plugins/coreplugin/coreplugin.pro: -------------------------------------------------------------------------------- 1 | include(../plugins.pri) 2 | 3 | QT += widgets core5compat 4 | 5 | DEFINES += COREPLUGIN_LIBRARY 6 | TARGET = $$replaceLibName(coreplugin) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(core) \ 10 | -l$$replaceLibName(extensionsystem) \ 11 | -l$$replaceLibName(gui) \ 12 | -l$$replaceLibName(resource) \ 13 | -l$$replaceLibName(utils) 14 | 15 | SOURCES += \ 16 | configwidget.cpp \ 17 | coreplugin.cpp \ 18 | mainwindow.cpp \ 19 | plugindialog.cpp 20 | 21 | HEADERS += \ 22 | configwidget.h \ 23 | coreplugin.h \ 24 | coreplugintr.h \ 25 | mainwindow.h \ 26 | plugindialog.h 27 | 28 | DISTFILES += \ 29 | coreplugin.json 30 | 31 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/coreplugintr.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace Plugin { 9 | 10 | struct Tr 11 | { 12 | Q_DECLARE_TR_FUNCTIONS(QtC::Core) 13 | }; 14 | 15 | } // namespace Plugin 16 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/mainwindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Plugin { 6 | 7 | class MainWindow : public GUI::MainWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit MainWindow(QWidget *parent = nullptr); 12 | ~MainWindow() override; 13 | 14 | void extensionsInitialized(); 15 | 16 | private slots: 17 | void onShowGroupButton(int id); 18 | void onAboutPlugins(); 19 | 20 | protected: 21 | bool eventFilter(QObject *watched, QEvent *event) override; 22 | 23 | private: 24 | void buildConnect(); 25 | void initMenu(); 26 | 27 | class MainWindowPrivate; 28 | QScopedPointer d_ptr; 29 | }; 30 | 31 | } // namespace Plugin 32 | -------------------------------------------------------------------------------- /src/plugins/coreplugin/plugindialog.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | QT_BEGIN_NAMESPACE 9 | class QPushButton; 10 | QT_END_NAMESPACE 11 | 12 | namespace ExtensionSystem { 13 | class PluginSpec; 14 | class PluginView; 15 | } // namespace ExtensionSystem 16 | 17 | namespace Plugin { 18 | 19 | class PluginDialog : public GUI::Dialog 20 | { 21 | Q_OBJECT 22 | 23 | public: 24 | explicit PluginDialog(QWidget *parent); 25 | 26 | private: 27 | void updateButtons(); 28 | void openDetails(ExtensionSystem::PluginSpec *spec); 29 | void openErrorDetails(); 30 | void closeDialog(); 31 | void showInstallWizard(); 32 | 33 | ExtensionSystem::PluginView *m_view; 34 | 35 | QPushButton *m_detailsButton; 36 | QPushButton *m_errorDetailsButton; 37 | QPushButton *m_installButton; 38 | bool m_isRestartRequired = false; 39 | }; 40 | 41 | } // namespace Plugin 42 | -------------------------------------------------------------------------------- /src/plugins/guiplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES guiplugin.cc guiplugin.hpp guiwidget.cc guiwidget.hpp) 2 | 3 | add_custom_plugin(guiplugin ${PROJECT_SOURCES}) 4 | target_link_libraries(guiplugin PRIVATE core extensionsystem gui utils 5 | Qt::Widgets) 6 | -------------------------------------------------------------------------------- /src/plugins/guiplugin/guiplugin.cc: -------------------------------------------------------------------------------- 1 | #include "guiplugin.hpp" 2 | #include "guiwidget.hpp" 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | GuiPluginWidget::GuiPluginWidget(QObject *parent) 9 | { 10 | setWidget(new GuiWidget); 11 | setButton(new QPushButton(tr("Gui")), Core::CoreWidget::Main); 12 | } 13 | 14 | bool GuiPlugin::initialize(const QStringList &arguments, QString *errorString) 15 | { 16 | addObject(new GuiPluginWidget(this)); 17 | return true; 18 | } 19 | 20 | } // namespace Plugin 21 | -------------------------------------------------------------------------------- /src/plugins/guiplugin/guiplugin.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GUIPLUGIN_HPP 2 | #define GUIPLUGIN_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace Plugin { 8 | 9 | class GuiPluginWidget : public Core::CoreWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit GuiPluginWidget(QObject *parent = nullptr); 14 | }; 15 | 16 | class GuiPlugin : public ExtensionSystem::IPlugin 17 | { 18 | Q_OBJECT 19 | Q_PLUGIN_METADATA(IID "Youth.Qt.plugin" FILE "guiplugin.json") 20 | public: 21 | GuiPlugin() = default; 22 | 23 | auto initialize(const QStringList &arguments, QString *errorString) -> bool override; 24 | void extensionsInitialized() override {} 25 | }; 26 | 27 | } // namespace Plugin 28 | 29 | #endif // GUIPLUGIN_HPP 30 | -------------------------------------------------------------------------------- /src/plugins/guiplugin/guiplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "GuiPlugin", 3 | "Version": "0.1.1", 4 | "CompatVersion": "0.1.1", 5 | "Required": false, 6 | "Vendor": "Youth", 7 | "Copyright": "(C) 2025 The Youth Ltd", 8 | "License": "GNU General Public License v3.0", 9 | "Category": "Main", 10 | "Description": "Gui" 11 | } -------------------------------------------------------------------------------- /src/plugins/guiplugin/guiplugin.pro: -------------------------------------------------------------------------------- 1 | include(../plugins.pri) 2 | 3 | QT += widgets 4 | 5 | DEFINES += GUIPLUGIN_LIBRARY 6 | TARGET = $$replaceLibName(guiplugin) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(core) \ 10 | -l$$replaceLibName(extensionsystem) \ 11 | -l$$replaceLibName(gui) \ 12 | -l$$replaceLibName(utils) 13 | 14 | SOURCES += \ 15 | guiplugin.cc \ 16 | guiwidget.cc 17 | 18 | HEADERS += \ 19 | guiplugin.hpp \ 20 | guiwidget.hpp 21 | 22 | DISTFILES += \ 23 | guiplugin.json 24 | -------------------------------------------------------------------------------- /src/plugins/guiplugin/guiwidget.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GUIWIDGET_HPP 2 | #define GUIWIDGET_HPP 3 | 4 | #include 5 | 6 | class QGroupBox; 7 | 8 | namespace Plugin { 9 | 10 | class GuiWidget : public QWidget 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit GuiWidget(QWidget *parent = nullptr); 15 | 16 | private: 17 | void setupUI(); 18 | auto createButtonGroup() -> QGroupBox *; 19 | auto createInputGroup() -> QGroupBox *; 20 | auto createBarGroup() -> QGroupBox *; 21 | auto createMenu() -> QMenu *; 22 | }; 23 | 24 | } // namespace Plugin 25 | 26 | #endif // GUIWIDGET_HPP 27 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES 2 | cpubenchthread.cc 3 | cpubenchthread.hpp 4 | hashplugin.cc 5 | hashplugin.hpp 6 | hashthread.cc 7 | hashthread.hpp 8 | hashwidget.cc 9 | hashwidget.hpp) 10 | 11 | add_custom_plugin(hashplugin ${PROJECT_SOURCES}) 12 | target_link_libraries(hashplugin PRIVATE core extensionsystem gui resource 13 | utils Qt::Widgets) 14 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/cpubenchthread.cc: -------------------------------------------------------------------------------- 1 | #include "cpubenchthread.hpp" 2 | 3 | #include 4 | 5 | namespace Plugin { 6 | 7 | class CpuBenchThread::CpuBenchThreadPrivate 8 | { 9 | public: 10 | explicit CpuBenchThreadPrivate(CpuBenchThread *parent) 11 | : q_ptr{parent} 12 | {} 13 | 14 | CpuBenchThread *q_ptr; 15 | 16 | Params params; 17 | }; 18 | 19 | CpuBenchThread::CpuBenchThread(QObject *parent) 20 | : QThread{parent} 21 | , d_ptr{new CpuBenchThreadPrivate{this}} 22 | {} 23 | 24 | CpuBenchThread::~CpuBenchThread() 25 | { 26 | stop(); 27 | } 28 | 29 | void CpuBenchThread::startBench(const Params ¶ms) 30 | { 31 | if (isRunning()) { 32 | return; 33 | } 34 | d_ptr->params = params; 35 | start(); 36 | } 37 | 38 | void CpuBenchThread::stop() 39 | { 40 | if (isRunning()) { 41 | quit(); 42 | wait(); 43 | } 44 | } 45 | 46 | void CpuBenchThread::run() 47 | { 48 | auto result = Utils::cpuBench(d_ptr->params.iterations, 49 | d_ptr->params.durationMs, 50 | d_ptr->params.dataSize, 51 | d_ptr->params.algorithm); 52 | emit benchFinished(result); 53 | } 54 | 55 | } // namespace Plugin 56 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/cpubenchthread.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | class CpuBenchThread : public QThread 9 | { 10 | Q_OBJECT 11 | public: 12 | struct Params 13 | { 14 | int iterations = 10; 15 | int durationMs = 1000; 16 | int dataSize = 1024 * 1024; // 1MB 17 | QCryptographicHash::Algorithm algorithm = QCryptographicHash::Sha256; 18 | }; 19 | 20 | explicit CpuBenchThread(QObject *parent = nullptr); 21 | ~CpuBenchThread() override; 22 | 23 | void startBench(const Params ¶ms); 24 | void stop(); 25 | 26 | signals: 27 | void benchFinished(double result); // MB/s 28 | 29 | protected: 30 | void run() override; 31 | 32 | private: 33 | class CpuBenchThreadPrivate; 34 | QScopedPointer d_ptr; 35 | }; 36 | 37 | } // namespace Plugin 38 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/hashplugin.cc: -------------------------------------------------------------------------------- 1 | #include "hashplugin.hpp" 2 | #include "hashwidget.hpp" 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | HashPluginWidget::HashPluginWidget(QObject *parent) 9 | { 10 | setWidget(new HashWidget); 11 | setButton(new QPushButton(tr("Hash")), Core::CoreWidget::Main); 12 | } 13 | 14 | auto HashPlugin::initialize(const QStringList &arguments, QString *errorString) -> bool 15 | { 16 | addObject(new HashPluginWidget(this)); 17 | return true; 18 | } 19 | 20 | } // namespace Plugin 21 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/hashplugin.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HASHPLUGIN_HPP 2 | #define HASHPLUGIN_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace Plugin { 8 | 9 | class HashPluginWidget : public Core::CoreWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit HashPluginWidget(QObject *parent = nullptr); 14 | }; 15 | 16 | class HashPlugin : public ExtensionSystem::IPlugin 17 | { 18 | Q_OBJECT 19 | Q_PLUGIN_METADATA(IID "Youth.Qt.plugin" FILE "hashplugin.json") 20 | public: 21 | HashPlugin() = default; 22 | 23 | auto initialize(const QStringList &arguments, QString *errorString) -> bool override; 24 | void extensionsInitialized() override {} 25 | }; 26 | 27 | } // namespace Plugin 28 | 29 | #endif // HASHPLUGIN_HPP 30 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/hashplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "HashPlugin", 3 | "Version": "0.1.1", 4 | "CompatVersion": "0.1.1", 5 | "Required": false, 6 | "Vendor": "Youth", 7 | "Copyright": "(C) 2025 The Youth Ltd", 8 | "License": "GNU General Public License v3.0", 9 | "Category": "Main", 10 | "Description": "Hash" 11 | } -------------------------------------------------------------------------------- /src/plugins/hashplugin/hashplugin.pro: -------------------------------------------------------------------------------- 1 | include(../plugins.pri) 2 | 3 | QT += widgets core5compat 4 | 5 | DEFINES += HASHPLUGIN_LIBRARY 6 | TARGET = $$replaceLibName(hashplugin) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(core) \ 10 | -l$$replaceLibName(extensionsystem) \ 11 | -l$$replaceLibName(gui) \ 12 | -l$$replaceLibName(resource) \ 13 | -l$$replaceLibName(utils) 14 | 15 | HEADERS += \ 16 | cpubenchthread.hpp \ 17 | hashplugin.hpp \ 18 | hashthread.hpp \ 19 | hashwidget.hpp 20 | 21 | SOURCES += \ 22 | cpubenchthread.cc \ 23 | hashplugin.cc \ 24 | hashthread.cc \ 25 | hashwidget.cc 26 | 27 | DISTFILES += \ 28 | hashplugin.json 29 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/hashthread.cc: -------------------------------------------------------------------------------- 1 | #include "hashthread.hpp" 2 | 3 | #include 4 | 5 | namespace Plugin { 6 | 7 | class HashThread::HashThreadPrivate 8 | { 9 | public: 10 | explicit HashThreadPrivate(HashThread *q) 11 | : q_ptr(q) 12 | {} 13 | 14 | HashThread *q_ptr; 15 | 16 | QString input; 17 | QCryptographicHash::Algorithm algorithm; 18 | std::atomic_bool running{false}; 19 | }; 20 | 21 | HashThread::HashThread(QObject *parent) 22 | : QThread{parent} 23 | , d_ptr{new HashThreadPrivate{this}} 24 | {} 25 | 26 | HashThread::~HashThread() 27 | { 28 | stop(); 29 | } 30 | 31 | auto HashThread::startHash(const QString &input, QCryptographicHash::Algorithm algorithm) -> bool 32 | { 33 | if (isRunning()) { 34 | return false; 35 | } 36 | d_ptr->input = input; 37 | d_ptr->algorithm = algorithm; 38 | d_ptr->running.store(true); 39 | start(); 40 | return true; 41 | } 42 | 43 | void HashThread::stop() 44 | { 45 | d_ptr->running.store(false); 46 | if (isRunning()) { 47 | quit(); 48 | wait(); 49 | } 50 | } 51 | 52 | void HashThread::run() 53 | { 54 | QCryptographicHash hashObj{d_ptr->algorithm}; 55 | QFile file{d_ptr->input}; 56 | if (file.exists() && file.open(QIODevice::ReadOnly)) { 57 | while (d_ptr->running.load() && !file.atEnd()) { 58 | auto data = file.read(1024 * 1024); // 1MB 59 | hashObj.addData(data); 60 | } 61 | } else { 62 | hashObj.addData(d_ptr->input.toUtf8()); 63 | } 64 | emit hashFinished(hashObj.result().toHex()); 65 | } 66 | 67 | } // namespace Plugin 68 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/hashthread.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | class HashThread : public QThread 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit HashThread(QObject *parent = nullptr); 13 | ~HashThread() override; 14 | 15 | auto startHash(const QString &input, QCryptographicHash::Algorithm algorithm) -> bool; 16 | void stop(); 17 | 18 | signals: 19 | void hashFinished(const QString &hash); 20 | 21 | protected: 22 | void run() override; 23 | 24 | private: 25 | class HashThreadPrivate; 26 | QScopedPointer d_ptr; 27 | }; 28 | 29 | } // namespace Plugin 30 | -------------------------------------------------------------------------------- /src/plugins/hashplugin/hashwidget.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Plugin { 6 | 7 | class HashWidget : public QWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit HashWidget(QWidget *parent = nullptr); 12 | ~HashWidget() override; 13 | 14 | private slots: 15 | void onTestHash(); 16 | void onTestBenchFinished(double result); // MB/s 17 | void onSelectFile(); 18 | void onCalculate(); 19 | void onHashFinished(const QString &result); 20 | 21 | private: 22 | void buildConnect(); 23 | 24 | class HashWidgetPrivate; 25 | QScopedPointer d_ptr; 26 | }; 27 | 28 | } // namespace Plugin 29 | -------------------------------------------------------------------------------- /src/plugins/helloplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES helloplugin.cc helloplugin.hpp hellowidget.cc 2 | hellowidget.hpp) 3 | 4 | add_custom_plugin(helloplugin ${PROJECT_SOURCES}) 5 | target_link_libraries(helloplugin PRIVATE core extensionsystem Qt::Widgets) 6 | -------------------------------------------------------------------------------- /src/plugins/helloplugin/helloplugin.cc: -------------------------------------------------------------------------------- 1 | #include "helloplugin.hpp" 2 | #include "hellowidget.hpp" 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | HelloPluginWidget::HelloPluginWidget(QObject *parent) 9 | { 10 | setWidget(new HelloWidget); 11 | setButton(new QPushButton(tr("Hello")), Core::CoreWidget::Main); 12 | } 13 | 14 | bool HelloPlugin::initialize(const QStringList &arguments, QString *errorString) 15 | { 16 | addObject(new HelloPluginWidget(this)); 17 | return true; 18 | } 19 | 20 | } // namespace Plugin 21 | -------------------------------------------------------------------------------- /src/plugins/helloplugin/helloplugin.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HELLOPLUGIN_HPP 2 | #define HELLOPLUGIN_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace Plugin { 8 | 9 | class HelloPluginWidget : public Core::CoreWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit HelloPluginWidget(QObject *parent = nullptr); 14 | }; 15 | 16 | class HelloPlugin : public ExtensionSystem::IPlugin 17 | { 18 | Q_OBJECT 19 | Q_PLUGIN_METADATA(IID "Youth.Qt.plugin" FILE "helloplugin.json") 20 | public: 21 | HelloPlugin() = default; 22 | 23 | auto initialize(const QStringList &arguments, QString *errorString) -> bool override; 24 | void extensionsInitialized() override {} 25 | }; 26 | 27 | } // namespace Plugin 28 | 29 | #endif // HELLOPLUGIN_HPP 30 | -------------------------------------------------------------------------------- /src/plugins/helloplugin/helloplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "HelloPlugin", 3 | "Version": "0.1.1", 4 | "CompatVersion": "0.1.1", 5 | "Required": false, 6 | "Vendor": "Youth", 7 | "Copyright": "(C) 2025 The Youth Ltd", 8 | "License": "GNU General Public License v3.0", 9 | "Category": "Main", 10 | "Description": "Hello" 11 | } -------------------------------------------------------------------------------- /src/plugins/helloplugin/helloplugin.pro: -------------------------------------------------------------------------------- 1 | include(../plugins.pri) 2 | 3 | QT += widgets 4 | 5 | DEFINES += HELLOPLUGIN_LIBRARY 6 | TARGET = $$replaceLibName(helloplugin) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(core) \ 10 | -l$$replaceLibName(extensionsystem) 11 | 12 | SOURCES += \ 13 | helloplugin.cc \ 14 | hellowidget.cc 15 | 16 | HEADERS += \ 17 | helloplugin.hpp \ 18 | hellowidget.hpp 19 | 20 | DISTFILES += \ 21 | helloplugin.json 22 | -------------------------------------------------------------------------------- /src/plugins/helloplugin/hellowidget.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HELLOWIDGET_HPP 2 | #define HELLOWIDGET_HPP 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | class HelloWidget : public QWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit HelloWidget(QWidget *parent = nullptr); 13 | ~HelloWidget() override; 14 | 15 | private slots: 16 | void onPrevious(); 17 | void onNext(); 18 | 19 | protected: 20 | void changeEvent(QEvent *event) override; 21 | 22 | private: 23 | void setupTr(); 24 | void buildConnect(); 25 | 26 | class HelloWidgetPrivate; 27 | QScopedPointer d_ptr; 28 | }; 29 | 30 | } // namespace Plugin 31 | 32 | #endif // HELLOWIDGET_HPP 33 | -------------------------------------------------------------------------------- /src/plugins/plugins.pri: -------------------------------------------------------------------------------- 1 | include(../../common.pri) 2 | 3 | TEMPLATE = lib 4 | 5 | win32 { 6 | DESTDIR = $$APP_OUTPUT_PATH/../libs 7 | DLLDESTDIR = $$APP_OUTPUT_PATH/plugins 8 | } 9 | 10 | unix { 11 | DESTDIR = $$APP_OUTPUT_PATH/plugins 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/plugins.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG += ordered 3 | 4 | SUBDIRS += \ 5 | aboutplugin \ 6 | coreplugin \ 7 | guiplugin \ 8 | hashplugin \ 9 | helloplugin \ 10 | systeminfoplugin 11 | -------------------------------------------------------------------------------- /src/plugins/systeminfoplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES systeminfoplugin.cc systeminfoplugin.hpp 2 | systeminfowidget.cc systeminfowidget.hpp) 3 | 4 | add_custom_plugin(systeminfoplugin ${PROJECT_SOURCES}) 5 | target_link_libraries(systeminfoplugin PRIVATE core extensionsystem utils 6 | Qt::Widgets) 7 | -------------------------------------------------------------------------------- /src/plugins/systeminfoplugin/systeminfoplugin.cc: -------------------------------------------------------------------------------- 1 | #include "systeminfoplugin.hpp" 2 | #include "systeminfowidget.hpp" 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | SystemInfoPluginWidget::SystemInfoPluginWidget(QObject *parent) 9 | { 10 | setWidget(new SystemInfoWidget); 11 | setButton(new QPushButton(tr("System Info")), Core::CoreWidget::Help); 12 | } 13 | 14 | bool SystemInfoPlugin::initialize(const QStringList &arguments, QString *errorString) 15 | { 16 | addObject(new SystemInfoPluginWidget(this)); 17 | return true; 18 | } 19 | 20 | } // namespace Plugin 21 | -------------------------------------------------------------------------------- /src/plugins/systeminfoplugin/systeminfoplugin.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SYSTEMINFOPLUGIN_HPP 2 | #define SYSTEMINFOPLUGIN_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace Plugin { 8 | 9 | class SystemInfoPluginWidget : public Core::CoreWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit SystemInfoPluginWidget(QObject *parent = nullptr); 14 | }; 15 | 16 | class SystemInfoPlugin : public ExtensionSystem::IPlugin 17 | { 18 | Q_OBJECT 19 | Q_PLUGIN_METADATA(IID "Youth.Qt.plugin" FILE "systeminfoplugin.json") 20 | public: 21 | SystemInfoPlugin() = default; 22 | 23 | auto initialize(const QStringList &arguments, QString *errorString) -> bool override; 24 | void extensionsInitialized() override {} 25 | }; 26 | 27 | } // namespace Plugin 28 | 29 | #endif // SYSTEMINFOPLUGIN_HPP 30 | -------------------------------------------------------------------------------- /src/plugins/systeminfoplugin/systeminfoplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "SystemInfoPlugin", 3 | "Version": "0.1.1", 4 | "CompatVersion": "0.1.1", 5 | "Required": false, 6 | "Vendor": "Youth", 7 | "Copyright": "(C) 2025 The Youth Ltd", 8 | "License": "GNU General Public License v3.0", 9 | "Category": "Help", 10 | "Description": "SystemInfo" 11 | } -------------------------------------------------------------------------------- /src/plugins/systeminfoplugin/systeminfoplugin.pro: -------------------------------------------------------------------------------- 1 | include(../plugins.pri) 2 | 3 | QT += widgets 4 | 5 | DEFINES += SYSTEMINFOPLUGIN_LIBRARY 6 | TARGET = $$replaceLibName(systeminfoplugin) 7 | 8 | LIBS += \ 9 | -l$$replaceLibName(core) \ 10 | -l$$replaceLibName(extensionsystem) \ 11 | -l$$replaceLibName(utils) 12 | 13 | SOURCES += \ 14 | systeminfoplugin.cc \ 15 | systeminfowidget.cc 16 | 17 | HEADERS += \ 18 | systeminfoplugin.hpp \ 19 | systeminfowidget.hpp 20 | 21 | DISTFILES += \ 22 | systeminfoplugin.json 23 | -------------------------------------------------------------------------------- /src/plugins/systeminfoplugin/systeminfowidget.cc: -------------------------------------------------------------------------------- 1 | #include "systeminfowidget.hpp" 2 | 3 | #include 4 | 5 | namespace Plugin { 6 | 7 | SystemInfoWidget::SystemInfoWidget(QWidget *parent) 8 | : QWidget{parent} 9 | { 10 | setupUI(); 11 | } 12 | 13 | void SystemInfoWidget::setupUI() 14 | { 15 | auto *textBrowser = new QTextBrowser(this); 16 | 17 | auto *layout = new QVBoxLayout(this); 18 | layout->setContentsMargins({}); 19 | layout->addWidget(textBrowser); 20 | 21 | auto systemEnviroment = QProcess::systemEnvironment(); 22 | for (const auto &info : std::as_const(systemEnviroment)) { 23 | textBrowser->append(info); 24 | textBrowser->append("\n"); 25 | } 26 | 27 | auto cursor = textBrowser->textCursor(); 28 | cursor.setPosition(0); 29 | textBrowser->setTextCursor(cursor); 30 | } 31 | 32 | } // namespace Plugin 33 | -------------------------------------------------------------------------------- /src/plugins/systeminfoplugin/systeminfowidget.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SYSTEMINFOWIDGET_HPP 2 | #define SYSTEMINFOWIDGET_HPP 3 | 4 | #include 5 | 6 | namespace Plugin { 7 | 8 | class SystemInfoWidget : public QWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit SystemInfoWidget(QWidget *parent = nullptr); 13 | 14 | private: 15 | void setupUI(); 16 | }; 17 | 18 | } // namespace Plugin 19 | 20 | #endif // SYSTEMINFOWIDGET_HPP 21 | -------------------------------------------------------------------------------- /src/resource/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES resource_global.hpp resource.cc resource.hpp) 2 | qt_add_resources(RESOURCE_SOURCES resource.qrc) 3 | 4 | add_custom_library(resource ${PROJECT_SOURCES} ${RESOURCE_SOURCES}) 5 | target_link_libraries(resource PRIVATE Qt::Widgets) 6 | 7 | if(CMAKE_HOST_WIN32) 8 | target_compile_definitions(resource PRIVATE "RESOURCE_LIBRARY") 9 | endif() 10 | -------------------------------------------------------------------------------- /src/resource/icon/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/app.png -------------------------------------------------------------------------------- /src/resource/icon/broken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/broken.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-down-insens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-down-insens.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-down-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-down-prelight.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-down-small-insens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-down-small-insens.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-down-small-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-down-small-prelight.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-down-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-down-small.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-down.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-left-insens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-left-insens.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-left-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-left-prelight.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-left.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-right-insens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-right-insens.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-right-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-right-prelight.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-right.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-up-insens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-up-insens.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-up-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-up-prelight.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-up-small-insens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-up-small-insens.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-up-small-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-up-small-prelight.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-up-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-up-small.png -------------------------------------------------------------------------------- /src/resource/icon/common/arrow-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/arrow-up.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-insensitive-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-insensitive-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-insensitive-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-insensitive-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-insensitive-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-insensitive-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-insensitive-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-insensitive-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-insensitive.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-insensitive@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-insensitive@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-selectionmode-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-selectionmode-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-selectionmode-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-selectionmode-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-selectionmode.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked-selectionmode@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked-selectionmode@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-checked@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-checked@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-insensitive-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-insensitive-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-insensitive-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-insensitive-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-insensitive-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-insensitive-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-insensitive-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-insensitive-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-insensitive.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-insensitive@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-insensitive@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-mixed@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-mixed@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-selectionmode-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-selectionmode-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-selectionmode-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-selectionmode-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-selectionmode.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-selectionmode@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-selectionmode@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-insensitive-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-insensitive-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-insensitive-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-insensitive-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-insensitive-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-insensitive-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-insensitive-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-insensitive-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-insensitive.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-insensitive@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-insensitive@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked.png -------------------------------------------------------------------------------- /src/resource/icon/common/checkbox-unchecked@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/checkbox-unchecked@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/combobox-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/combobox-arrow.png -------------------------------------------------------------------------------- /src/resource/icon/common/combobox-arrow@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/combobox-arrow@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/minus.png -------------------------------------------------------------------------------- /src/resource/icon/common/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/plus.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-insensitive-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-insensitive-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-insensitive-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-insensitive-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-insensitive-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-insensitive-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-insensitive-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-insensitive-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-insensitive.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-insensitive@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-insensitive@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-checked@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-checked@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-insensitive-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-insensitive-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-insensitive-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-insensitive-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-insensitive-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-insensitive-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-insensitive-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-insensitive-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-insensitive.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-insensitive@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-insensitive@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-mixed@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-mixed@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-insensitive-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-insensitive-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-insensitive-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-insensitive-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-insensitive-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-insensitive-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-insensitive-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-insensitive-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-insensitive.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-insensitive@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-insensitive@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-selected.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked-selected@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked-selected@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked.png -------------------------------------------------------------------------------- /src/resource/icon/common/radio-unchecked@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/radio-unchecked@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting-icon-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting-icon-dark.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting-icon-dark@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting-icon-dark@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting-icon.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting-icon@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting-icon@2.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting.png -------------------------------------------------------------------------------- /src/resource/icon/common/setting@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/common/setting@2.png -------------------------------------------------------------------------------- /src/resource/icon/crash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/crash.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-active-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-active-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-active-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-active-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-active.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-active@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-active@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-backdrop@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-backdrop@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-close@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-close@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-active-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-active-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-active-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-active-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-active.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-active@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-active@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-backdrop@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-backdrop@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-maximize@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-maximize@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-active-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-active-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-active-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-active-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-active.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-active@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-active@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-backdrop@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-backdrop@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-minimize@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-minimize@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-active-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-active-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-active-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-active-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-active.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-active@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-active@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-backdrop@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-backdrop@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-hover-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-hover-alt.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-hover-alt@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-hover-alt@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-hover.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore-hover@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore-hover@2.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore.png -------------------------------------------------------------------------------- /src/resource/icon/mactitle/titlebutton-restore@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/mactitle/titlebutton-restore@2.png -------------------------------------------------------------------------------- /src/resource/icon/notLoad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/notLoad.png -------------------------------------------------------------------------------- /src/resource/icon/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RealChuan/Qt-App/584dad7e71853978b8d9e7f1eb1e4951c6c8ab0e/src/resource/icon/ok.png -------------------------------------------------------------------------------- /src/resource/qss/sidebarbutton.css: -------------------------------------------------------------------------------- 1 | #MenuWidget { 2 | min-width: 200px; 3 | max-width: 200px; 4 | padding: 0px; 5 | background: rgb(54, 62, 78); 6 | border-bottom-left-radius: 5px; 7 | } 8 | 9 | .GroupButton, 10 | .GroupItemButton { 11 | border: 0; 12 | color: #EEE; 13 | border-radius: 0; 14 | background: rgb(54, 62, 78); 15 | } 16 | 17 | .GroupButton:hover, 18 | .GroupItemButton:hover { 19 | border-color: #389cff; 20 | background: #389cff; 21 | color: white; 22 | } 23 | 24 | .GroupButton { 25 | height: 40px; 26 | font-size: 16px; 27 | text-align: left; 28 | padding-left: 6px; 29 | } 30 | 31 | .GroupItemButton { 32 | height: 38px; 33 | font-size: 14px; 34 | text-align: left; 35 | 36 | padding-left: 35px; 37 | border-width: 3px; 38 | border-style: none none none solid; 39 | border-color: rgb(54, 62, 78); 40 | } 41 | 42 | .GroupItemButton:checked { 43 | color: #39a3ff; 44 | background: rgb(85, 79, 73); 45 | border-color: #39a3ff; 46 | } -------------------------------------------------------------------------------- /src/resource/qss/specific.css: -------------------------------------------------------------------------------- 1 | #CrashLabel { 2 | font-size: 18px; 3 | } 4 | 5 | #HomeLabel { 6 | font-weight: bold; 7 | font-size: 30px; 8 | font-weight: bold; 9 | } 10 | 11 | #AboutWidget QLabel { 12 | font-size: 14px; 13 | } -------------------------------------------------------------------------------- /src/resource/resource.cc: -------------------------------------------------------------------------------- 1 | #include "resource.hpp" 2 | 3 | Resource::Resource() = default; 4 | -------------------------------------------------------------------------------- /src/resource/resource.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RESOURCE_HPP 2 | #define RESOURCE_HPP 3 | 4 | #include "resource_global.hpp" 5 | 6 | class RESOURCE_EXPORT Resource 7 | { 8 | public: 9 | Resource(); 10 | }; 11 | 12 | #endif // RESOURCE_HPP 13 | -------------------------------------------------------------------------------- /src/resource/resource.pro: -------------------------------------------------------------------------------- 1 | include(../slib.pri) 2 | 3 | QT += widgets 4 | 5 | DEFINES += RESOURCE_LIBRARY 6 | TARGET = $$replaceLibName(resource) 7 | 8 | SOURCES += \ 9 | resource.cc 10 | 11 | HEADERS += \ 12 | resource_global.hpp \ 13 | resource.hpp 14 | 15 | RESOURCES += \ 16 | resource.qrc 17 | -------------------------------------------------------------------------------- /src/resource/resource_global.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RESOURCE_GLOBAL_HPP 2 | #define RESOURCE_GLOBAL_HPP 3 | 4 | #include 5 | 6 | #if defined(RESOURCE_LIBRARY) 7 | # define RESOURCE_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define RESOURCE_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // RESOURCE_GLOBAL_HPP 13 | -------------------------------------------------------------------------------- /src/slib.pri: -------------------------------------------------------------------------------- 1 | include(../common.pri) 2 | 3 | TEMPLATE = lib 4 | 5 | win32 { 6 | DESTDIR = $$APP_OUTPUT_PATH/../libs 7 | DLLDESTDIR = $$APP_OUTPUT_PATH 8 | } 9 | 10 | unix{ 11 | CONFIG += staticlib 12 | DESTDIR = $$APP_OUTPUT_PATH/../libs 13 | } 14 | -------------------------------------------------------------------------------- /src/src.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG += ordered 3 | 4 | SUBDIRS += \ 5 | utils \ 6 | dump \ 7 | resource \ 8 | gui \ 9 | 3rdparty \ 10 | aggregation \ 11 | extensionsystem \ 12 | core \ 13 | plugins \ 14 | apps 15 | -------------------------------------------------------------------------------- /src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES 2 | mimetypes/mimedatabase_p.h 3 | mimetypes/mimedatabase.cpp 4 | mimetypes/mimedatabase.h 5 | mimetypes/mimeglobpattern_p.h 6 | mimetypes/mimeglobpattern.cpp 7 | mimetypes/mimemagicrule_p.h 8 | mimetypes/mimemagicrule.cpp 9 | mimetypes/mimemagicrulematcher_p.h 10 | mimetypes/mimemagicrulematcher.cpp 11 | mimetypes/mimeprovider_p.h 12 | mimetypes/mimeprovider.cpp 13 | mimetypes/mimetype_p.h 14 | mimetypes/mimetype.cpp 15 | mimetypes/mimetype.h 16 | mimetypes/mimetypeparser_p.h 17 | mimetypes/mimetypeparser.cpp 18 | mimetypes/mimeutils.cpp 19 | algorithm.h 20 | appinfo.cc 21 | appinfo.hpp 22 | benchmarker.cpp 23 | benchmarker.h 24 | countdownlatch.cc 25 | countdownlatch.hpp 26 | executeondestruction.h 27 | hostosinfo.cpp 28 | hostosinfo.h 29 | indexedcontainerproxyconstiterator.h 30 | languageconfig.cc 31 | languageconfig.hpp 32 | logasync.cpp 33 | logasync.h 34 | logfile.cc 35 | logfile.hpp 36 | mimeutils.h 37 | osspecificaspects.h 38 | predicates.h 39 | qtcassert.cpp 40 | qtcassert.h 41 | qtcsettings.cpp 42 | qtcsettings.h 43 | singleton.hpp 44 | stringutils.cpp 45 | stringutils.h 46 | taskqueue.h 47 | utils_global.h 48 | utils.cpp 49 | utils.h 50 | utilstr.h 51 | validator.cc 52 | validator.hpp) 53 | 54 | add_custom_library(utils ${PROJECT_SOURCES}) 55 | target_link_libraries(utils PRIVATE Qt::Widgets Qt::Core5Compat) 56 | 57 | if(CMAKE_HOST_WIN32) 58 | target_compile_definitions(utils PRIVATE "UTILS_LIBRARY") 59 | target_link_libraries(utils PRIVATE dbghelp) 60 | endif() 61 | -------------------------------------------------------------------------------- /src/utils/appinfo.cc: -------------------------------------------------------------------------------- 1 | #include "appinfo.hpp" 2 | 3 | namespace Utils {} 4 | -------------------------------------------------------------------------------- /src/utils/appinfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Utils { 6 | 7 | static const auto version = "0.1.1"; 8 | static constexpr auto appName = "Qt-App"; 9 | static constexpr auto crashName = "CrashReport"; 10 | static constexpr auto organzationName = "Youth"; 11 | static constexpr auto organizationDomain = "Youth"; 12 | static constexpr auto copyright = "Copyright 2017-2025 Youth. All rights reserved."; 13 | 14 | } // namespace Utils 15 | -------------------------------------------------------------------------------- /src/utils/benchmarker.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2017 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "utils_global.h" 7 | 8 | #include 9 | #include 10 | 11 | QT_BEGIN_NAMESPACE 12 | class QLoggingCategory; 13 | QT_END_NAMESPACE 14 | 15 | namespace Utils { 16 | 17 | class UTILS_EXPORT Benchmarker 18 | { 19 | public: 20 | Benchmarker(const QString &testsuite, 21 | const QString &testcase, 22 | const QString &tagData = QString()); 23 | Benchmarker(const QLoggingCategory &cat, 24 | const QString &testsuite, 25 | const QString &testcase, 26 | const QString &tagData = QString()); 27 | ~Benchmarker(); 28 | 29 | void report(qint64 ms); 30 | static void report(const QString &testsuite, 31 | const QString &testcase, 32 | qint64 ms, 33 | const QString &tags = QString()); 34 | static void report(const QLoggingCategory &cat, 35 | const QString &testsuite, 36 | const QString &testcase, 37 | qint64 ms, 38 | const QString &tags = QString()); 39 | 40 | private: 41 | const QLoggingCategory &m_category; 42 | QElapsedTimer m_timer; 43 | QString m_tagData; 44 | QString m_testsuite; 45 | QString m_testcase; 46 | }; 47 | 48 | } // namespace Utils 49 | -------------------------------------------------------------------------------- /src/utils/countdownlatch.cc: -------------------------------------------------------------------------------- 1 | #include "countdownlatch.hpp" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace Utils { 8 | 9 | struct CountDownLatch::CountDownLatchPrivate 10 | { 11 | mutable QMutex mutex; 12 | QWaitCondition waintCondition; 13 | int count; 14 | }; 15 | 16 | CountDownLatch::CountDownLatch(int count) 17 | : d_ptr(new CountDownLatchPrivate) 18 | { 19 | d_ptr->count = count; 20 | } 21 | 22 | CountDownLatch::~CountDownLatch() = default; 23 | 24 | void CountDownLatch::wait() 25 | { 26 | QMutexLocker locker(&d_ptr->mutex); 27 | while (d_ptr->count > 0) { 28 | d_ptr->waintCondition.wait(&d_ptr->mutex); 29 | } 30 | } 31 | 32 | void CountDownLatch::countDown() 33 | { 34 | QMutexLocker locker(&d_ptr->mutex); 35 | d_ptr->count--; 36 | if (d_ptr->count == 0) { 37 | d_ptr->waintCondition.wakeAll(); 38 | } 39 | } 40 | 41 | auto CountDownLatch::getCount() const -> int 42 | { 43 | QMutexLocker locker(&d_ptr->mutex); 44 | return d_ptr->count; 45 | } 46 | 47 | } // namespace Utils 48 | -------------------------------------------------------------------------------- /src/utils/countdownlatch.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COUNTDOWNLATCH_HPP 2 | #define COUNTDOWNLATCH_HPP 3 | 4 | #include "utils_global.h" 5 | 6 | #include 7 | 8 | namespace Utils { 9 | 10 | class UTILS_EXPORT CountDownLatch 11 | { 12 | Q_DISABLE_COPY_MOVE(CountDownLatch) 13 | public: 14 | explicit CountDownLatch(int count); 15 | ~CountDownLatch(); 16 | 17 | void wait(); 18 | void countDown(); 19 | [[nodiscard]] auto getCount() const -> int; 20 | 21 | private: 22 | struct CountDownLatchPrivate; 23 | QScopedPointer d_ptr; 24 | }; 25 | 26 | } // namespace Utils 27 | 28 | #endif // COUNTDOWNLATCH_HPP 29 | -------------------------------------------------------------------------------- /src/utils/executeondestruction.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace Utils { 9 | 10 | class ExecuteOnDestruction 11 | { 12 | public: 13 | ExecuteOnDestruction() noexcept : destructionCode([] {}) {} 14 | explicit ExecuteOnDestruction(std::function code) : destructionCode(std::move(code)) {} 15 | ~ExecuteOnDestruction() { if (destructionCode) destructionCode(); } 16 | 17 | void reset(std::function code) { destructionCode = std::move(code); } 18 | 19 | private: 20 | std::function destructionCode; 21 | }; 22 | 23 | } // Utils 24 | -------------------------------------------------------------------------------- /src/utils/languageconfig.hpp: -------------------------------------------------------------------------------- 1 | #ifndef LANGUAGECONFIG_HPP 2 | #define LANGUAGECONFIG_HPP 3 | 4 | #include "singleton.hpp" 5 | #include "utils_global.h" 6 | 7 | #include 8 | 9 | class QTranslator; 10 | 11 | namespace Utils { 12 | 13 | class UTILS_EXPORT LanguageConfig : public QObject 14 | { 15 | Q_OBJECT 16 | public: 17 | enum Language : int { Chinese, English }; 18 | 19 | auto currentLanguage() -> Language; 20 | 21 | void loadLanguage(Language language); 22 | void loadLanguage(); 23 | 24 | private: 25 | explicit LanguageConfig(QObject *parent = nullptr); 26 | ~LanguageConfig() override; 27 | 28 | void getConfig(); 29 | void saveConfig(); 30 | 31 | class LanguageConfigPrivate; 32 | QScopedPointer d_ptr; 33 | 34 | SINGLETON(LanguageConfig) 35 | }; 36 | 37 | } // namespace Utils 38 | 39 | #endif // LANGUAGECONFIG_HPP 40 | -------------------------------------------------------------------------------- /src/utils/logasync.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "singleton.hpp" 6 | #include "utils_global.h" 7 | 8 | namespace Utils { 9 | 10 | class UTILS_EXPORT LogAsync : public QThread 11 | { 12 | Q_OBJECT 13 | public: 14 | enum class Orientation : int { 15 | Standard = 1 << 0, 16 | File = 1 << 1, 17 | StandardAndFile = Standard | File 18 | }; 19 | 20 | void setLogPath(const QString &path); 21 | auto logPath() -> QString; 22 | 23 | void setAutoDelFile(bool on); 24 | auto autoDelFile() -> bool; 25 | 26 | void setAutoDelFileDays(qint64 days); 27 | auto autoDelFileDays() -> qint64; 28 | 29 | void setOrientation(Orientation orientation); 30 | auto orientation() -> Orientation; 31 | 32 | void setLogLevel(QtMsgType type); 33 | auto logLevel() -> QtMsgType; 34 | 35 | void setMaxConsoleLineSize(int size); 36 | auto maxConsoleLineSize() -> int; 37 | 38 | void startWork(); 39 | void stop(); 40 | 41 | signals: 42 | void appendBuf(const QString &); 43 | 44 | protected: 45 | void run() override; 46 | 47 | private: 48 | explicit LogAsync(QObject *parent = nullptr); 49 | ~LogAsync() override; 50 | 51 | class LogAsyncPrivate; 52 | QScopedPointer d_ptr; 53 | 54 | SINGLETON(LogAsync) 55 | }; 56 | 57 | } // namespace Utils 58 | -------------------------------------------------------------------------------- /src/utils/logfile.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Utils { 6 | 7 | class LogFile : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit LogFile(QObject *parent = nullptr); 12 | ~LogFile() override; 13 | 14 | public slots: 15 | void onWrite(const QString &msg); 16 | 17 | private slots: 18 | void onFlush(); 19 | 20 | private: 21 | auto rollFile(int count) -> bool; 22 | void setTimer(); 23 | 24 | class LogFilePrivate; 25 | QScopedPointer d_ptr; 26 | }; 27 | 28 | } // namespace Utils 29 | -------------------------------------------------------------------------------- /src/utils/mimetypes/mimemagicrulematcher.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 3 | 4 | #include "mimemagicrulematcher_p.h" 5 | 6 | #include "mimetype_p.h" 7 | 8 | namespace Utils { 9 | 10 | /*! 11 | \internal 12 | \class MimeMagicRuleMatcher 13 | \inmodule QtCore 14 | 15 | \brief The MimeMagicRuleMatcher class checks a number of rules based on operator "or". 16 | 17 | It is used for rules parsed from XML files. 18 | 19 | \sa MimeType, MimeDatabase, MagicRule, MagicStringRule, MagicByteRule, GlobPattern 20 | \sa MimeTypeParserBase, MimeTypeParser 21 | */ 22 | 23 | MimeMagicRuleMatcher::MimeMagicRuleMatcher(const QString &mime, unsigned thePriority) : 24 | m_list(), 25 | m_priority(thePriority), 26 | m_mimetype(mime) 27 | { 28 | } 29 | 30 | auto MimeMagicRuleMatcher::operator==(const MimeMagicRuleMatcher &other) const -> bool 31 | { 32 | return m_list == other.m_list && 33 | m_priority == other.m_priority; 34 | } 35 | 36 | void MimeMagicRuleMatcher::addRule(const MimeMagicRule &rule) 37 | { 38 | m_list.append(rule); 39 | } 40 | 41 | void MimeMagicRuleMatcher::addRules(const QList &rules) 42 | { 43 | m_list.append(rules); 44 | } 45 | 46 | auto MimeMagicRuleMatcher::magicRules() const -> QList 47 | { 48 | return m_list; 49 | } 50 | 51 | // Check for a match on contents of a file 52 | auto MimeMagicRuleMatcher::matches(const QByteArray &data) const -> bool 53 | { 54 | for (const MimeMagicRule &magicRule : m_list) { 55 | if (magicRule.matches(data)) 56 | return true; 57 | } 58 | 59 | return false; 60 | } 61 | 62 | // Return a priority value from 1..100 63 | auto MimeMagicRuleMatcher::priority() const -> unsigned 64 | { 65 | return m_priority; 66 | } 67 | 68 | } // namespace Utils 69 | -------------------------------------------------------------------------------- /src/utils/mimetypes/mimemagicrulematcher_p.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 3 | 4 | #pragma once 5 | 6 | // 7 | // W A R N I N G 8 | // ------------- 9 | // 10 | // This file is not part of the Qt API. It exists purely as an 11 | // implementation detail. This header file may change from version to 12 | // version without notice, or even be removed. 13 | // 14 | // We mean it. 15 | // 16 | 17 | #include "mimemagicrule_p.h" 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace Utils { 24 | 25 | class MimeMagicRuleMatcher 26 | { 27 | public: 28 | explicit MimeMagicRuleMatcher(const QString &mime, unsigned priority = 65535); 29 | 30 | void swap(MimeMagicRuleMatcher &other) noexcept 31 | { 32 | qSwap(m_list, other.m_list); 33 | qSwap(m_priority, other.m_priority); 34 | qSwap(m_mimetype, other.m_mimetype); 35 | } 36 | 37 | auto operator==(const MimeMagicRuleMatcher &other) const -> bool; 38 | 39 | void addRule(const MimeMagicRule &rule); 40 | void addRules(const QList &rules); 41 | [[nodiscard]] auto magicRules() const -> QList; 42 | 43 | [[nodiscard]] auto matches(const QByteArray &data) const -> bool; 44 | 45 | [[nodiscard]] auto priority() const -> unsigned; 46 | 47 | [[nodiscard]] auto mimetype() const -> QString { return m_mimetype; } 48 | 49 | private: 50 | QList m_list; 51 | unsigned m_priority; 52 | QString m_mimetype; 53 | }; 54 | 55 | } // namespace Utils 56 | 57 | QT_BEGIN_NAMESPACE 58 | Q_DECLARE_SHARED(Utils::MimeMagicRuleMatcher) 59 | QT_END_NAMESPACE 60 | -------------------------------------------------------------------------------- /src/utils/mimetypes/mimetypes.pri: -------------------------------------------------------------------------------- 1 | HEADERS += \ 2 | $$PWD/mimedatabase.h \ 3 | $$PWD/mimedatabase_p.h \ 4 | $$PWD/mimeglobpattern_p.h \ 5 | $$PWD/mimemagicrule_p.h \ 6 | $$PWD/mimemagicrulematcher_p.h \ 7 | $$PWD/mimeprovider_p.h \ 8 | $$PWD/mimetype.h \ 9 | $$PWD/mimetype_p.h \ 10 | $$PWD/mimetypeparser_p.h 11 | 12 | SOURCES += \ 13 | $$PWD/mimedatabase.cpp \ 14 | $$PWD/mimeglobpattern.cpp \ 15 | $$PWD/mimemagicrule.cpp \ 16 | $$PWD/mimemagicrulematcher.cpp \ 17 | $$PWD/mimeprovider.cpp \ 18 | $$PWD/mimetype.cpp \ 19 | $$PWD/mimetypeparser.cpp \ 20 | $$PWD/mimeutils.cpp 21 | -------------------------------------------------------------------------------- /src/utils/qtcassert.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2016 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include "utils_global.h" 7 | 8 | namespace Utils { 9 | UTILS_EXPORT void writeAssertLocation(const char *msg); 10 | UTILS_EXPORT void dumpBacktrace(int maxdepth); 11 | } // namespace Utils 12 | 13 | #define QTC_ASSERT_STRINGIFY_HELPER(x) #x 14 | #define QTC_ASSERT_STRINGIFY(x) QTC_ASSERT_STRINGIFY_HELPER(x) 15 | #define QTC_ASSERT_STRING(cond) \ 16 | ::Utils::writeAssertLocation("\"" cond "\" in " __FILE__ ":" QTC_ASSERT_STRINGIFY(__LINE__)) 17 | 18 | // The 'do {...} while (0)' idiom is not used for the main block here to be 19 | // able to use 'break' and 'continue' as 'actions'. 20 | 21 | #define QTC_ASSERT(cond, action) \ 22 | if (Q_LIKELY(cond)) { \ 23 | } else { \ 24 | QTC_ASSERT_STRING(#cond); \ 25 | action; \ 26 | } \ 27 | do { \ 28 | } while (0) 29 | #define QTC_CHECK(cond) \ 30 | if (Q_LIKELY(cond)) { \ 31 | } else { \ 32 | QTC_ASSERT_STRING(#cond); \ 33 | } \ 34 | do { \ 35 | } while (0) 36 | #define QTC_GUARD(cond) ((Q_LIKELY(cond)) ? true : (QTC_ASSERT_STRING(#cond), false)) 37 | -------------------------------------------------------------------------------- /src/utils/qtcsettings.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #include "qtcsettings.h" 5 | 6 | namespace Utils { 7 | 8 | /*! 9 | \class Utils::QtcSettings 10 | \inheaderfile utils/qtcsettings.h 11 | \inmodule QtCreator 12 | 13 | \brief The QtcSettings class is an extension of the QSettings class. 14 | 15 | Use Utils::QtcSettings::setValueWithDefault() to write values with a 16 | default. 17 | */ 18 | 19 | /*! 20 | \fn template void setValueWithDefault(const QString &key, const T &val, const T &defaultValue) 21 | 22 | Sets the value of setting \a key to \a val. If \a val is the same as the \a 23 | defaultValue, the settings key is removed instead. This makes sure that 24 | settings are only written if actually necessary, namely when the user 25 | changed them from the default. It also makes a new default value for a 26 | setting in a new version of the application take effect, if the user did 27 | not change the setting before. 28 | 29 | \sa QSettings::setValue() 30 | */ 31 | 32 | } // namespace Utils 33 | -------------------------------------------------------------------------------- /src/utils/singleton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SINGLETON_HPP 2 | #define SINGLETON_HPP 3 | 4 | #include 5 | 6 | namespace Utils { 7 | 8 | template 9 | class Singleton 10 | { 11 | Q_DISABLE_COPY_MOVE(Singleton) 12 | public: 13 | static auto getInstance() -> T *; 14 | 15 | private: 16 | Singleton() = default; 17 | ~Singleton() = default; 18 | }; 19 | 20 | template 21 | auto Singleton::getInstance() -> T * 22 | { 23 | static T t; 24 | return &t; 25 | } 26 | 27 | } // namespace Utils 28 | 29 | #define SINGLETON(Class) \ 30 | private: \ 31 | Q_DISABLE_COPY_MOVE(Class); \ 32 | friend class Utils::Singleton; \ 33 | \ 34 | public: \ 35 | static Class *instance() \ 36 | { \ 37 | return Utils::Singleton::getInstance(); \ 38 | } 39 | 40 | #endif // SINGLETON_HPP 41 | -------------------------------------------------------------------------------- /src/utils/utils.pro: -------------------------------------------------------------------------------- 1 | include(../slib.pri) 2 | include(mimetypes/mimetypes.pri) 3 | 4 | QT += widgets core5compat 5 | 6 | DEFINES += UTILS_LIBRARY 7 | TARGET = $$replaceLibName(utils) 8 | 9 | win32 { 10 | LIBS += -ldbghelp 11 | } 12 | 13 | SOURCES += \ 14 | appinfo.cc \ 15 | benchmarker.cpp \ 16 | countdownlatch.cc \ 17 | hostosinfo.cpp \ 18 | languageconfig.cc \ 19 | logasync.cpp \ 20 | logfile.cc \ 21 | qtcassert.cpp \ 22 | qtcsettings.cpp \ 23 | stringutils.cpp \ 24 | utils.cpp \ 25 | validator.cc 26 | 27 | HEADERS += \ 28 | algorithm.h \ 29 | appinfo.hpp \ 30 | benchmarker.h \ 31 | countdownlatch.hpp \ 32 | executeondestruction.h \ 33 | hostosinfo.h \ 34 | indexedcontainerproxyconstiterator.h \ 35 | languageconfig.hpp \ 36 | logasync.h \ 37 | logfile.hpp \ 38 | mimeutils.h \ 39 | osspecificaspects.h \ 40 | predicates.h \ 41 | qtcassert.h \ 42 | qtcsettings.h \ 43 | singleton.hpp \ 44 | stringutils.h \ 45 | taskqueue.h \ 46 | utils_global.h \ 47 | utils.h \ 48 | utilstr.h \ 49 | validator.hpp 50 | -------------------------------------------------------------------------------- /src/utils/utils_global.h: -------------------------------------------------------------------------------- 1 | #ifndef UTILS_GLOBAL_H 2 | #define UTILS_GLOBAL_H 3 | 4 | #include 5 | 6 | #if defined(UTILS_LIBRARY) 7 | # define UTILS_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define UTILS_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // UTILS_GLOBAL_H 13 | -------------------------------------------------------------------------------- /src/utils/utilstr.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 The Qt Company Ltd. 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace Utils { 9 | 10 | struct Tr 11 | { 12 | Q_DECLARE_TR_FUNCTIONS(Utils) 13 | }; 14 | 15 | } // namespace Utils 16 | -------------------------------------------------------------------------------- /src/utils/validator.cc: -------------------------------------------------------------------------------- 1 | #include "validator.hpp" 2 | 3 | namespace Utils { 4 | 5 | auto IntValidator::validate(QString &input, int &pos) const -> QValidator::State 6 | { 7 | const State originalRes = QIntValidator::validate(input, pos); 8 | if (originalRes != Intermediate || input.isEmpty()) { 9 | return originalRes; 10 | } 11 | 12 | const auto extracted = locale().toLongLong(input); 13 | if (extracted > 0) { 14 | if (extracted > top() && -extracted < bottom()) { 15 | return Invalid; 16 | } 17 | } else if (extracted < bottom()) { 18 | return Invalid; 19 | } 20 | return originalRes; 21 | } 22 | 23 | auto DoubleValidator::validate(QString &input, int &pos) const -> QValidator::State 24 | { 25 | const State originalRes = QDoubleValidator::validate(input, pos); 26 | if (originalRes != Intermediate || input.isEmpty()) { 27 | return originalRes; 28 | } 29 | 30 | const auto extracted = locale().toDouble(input); 31 | if (extracted > 0) { 32 | if (extracted > top() && -extracted < bottom()) { 33 | return Invalid; 34 | } 35 | } else if (extracted < bottom()) { 36 | return Invalid; 37 | } 38 | return originalRes; 39 | } 40 | 41 | } // namespace Utils 42 | -------------------------------------------------------------------------------- /src/utils/validator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef VALIDATOR_HPP 2 | #define VALIDATOR_HPP 3 | 4 | #include "utils_global.h" 5 | 6 | #include 7 | 8 | namespace Utils { 9 | 10 | class UTILS_EXPORT IntValidator : public QIntValidator 11 | { 12 | Q_OBJECT 13 | public: 14 | using QIntValidator::QIntValidator; 15 | 16 | auto validate(QString &input, int &pos) const -> State override; 17 | }; 18 | 19 | class UTILS_EXPORT DoubleValidator : public QDoubleValidator 20 | { 21 | Q_OBJECT 22 | public: 23 | using QDoubleValidator::QDoubleValidator; 24 | 25 | auto validate(QString &input, int &pos) const -> State override; 26 | }; 27 | 28 | } // namespace Utils 29 | 30 | #endif // VALIDATOR_HPP 31 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(breakpadtest) 2 | add_subdirectory(crashpadtest) 3 | -------------------------------------------------------------------------------- /tests/breakpadtest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES main.cc) 2 | qt_add_executable(BreakpadTest MANUAL_FINALIZATION ${PROJECT_SOURCES}) 3 | set_target_properties(BreakpadTest PROPERTIES WIN32_EXECUTABLE TRUE) 4 | 5 | target_link_libraries( 6 | BreakpadTest PRIVATE dump unofficial::breakpad::libbreakpad 7 | unofficial::breakpad::libbreakpad_client) 8 | qt_finalize_executable(BreakpadTest) 9 | -------------------------------------------------------------------------------- /tests/breakpadtest/breakpadtest.pro: -------------------------------------------------------------------------------- 1 | include(../../common.pri) 2 | 3 | QT = core widgets core5compat 4 | 5 | CONFIG += cmdline 6 | 7 | TARGET = BreakpadTest 8 | 9 | LIBS += \ 10 | -l$$replaceLibName(dump) \ 11 | -l$$replaceLibName(utils) 12 | 13 | include(../../src/3rdparty/3rdparty.pri) 14 | 15 | SOURCES += \ 16 | main.cc 17 | 18 | DESTDIR = $$APP_OUTPUT_PATH 19 | -------------------------------------------------------------------------------- /tests/breakpadtest/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | void crash() 7 | { 8 | int *p = nullptr; 9 | *p = 1; 10 | } 11 | 12 | auto main(int argc, char *argv[]) -> int 13 | { 14 | QCoreApplication a(argc, argv); 15 | 16 | QDir dir(a.applicationDirPath()); 17 | if (!dir.exists("breakpad")) { 18 | dir.mkdir("breakpad"); 19 | } 20 | auto crashPath = dir.filePath("breakpad"); 21 | 22 | auto *breakPad = Dump::BreakPad::instance(); 23 | breakPad->setDumpPath(crashPath); 24 | 25 | crash(); 26 | 27 | return a.exec(); 28 | } 29 | -------------------------------------------------------------------------------- /tests/crashpadtest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(PROJECT_SOURCES main.cc) 2 | qt_add_executable(CrashpadTest MANUAL_FINALIZATION ${PROJECT_SOURCES}) 3 | set_target_properties(CrashpadTest PROPERTIES WIN32_EXECUTABLE TRUE) 4 | 5 | target_link_libraries(CrashpadTest PRIVATE dump crashpad::crashpad) 6 | qt_finalize_executable(CrashpadTest) 7 | 8 | string(REPLACE "share/crashpad" "tools/crashpad" crash_handler_path 9 | ${crashpad_DIR}) 10 | message(STATUS "crashpad tools directory: ${crash_handler_path}") 11 | 12 | if(CMAKE_HOST_APPLE) 13 | add_custom_command( 14 | TARGET CrashpadTest 15 | POST_BUILD 16 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${crash_handler_path} 17 | ${EXECUTABLE_OUTPUT_PATH}) 18 | endif() 19 | -------------------------------------------------------------------------------- /tests/crashpadtest/crashpadtest.pro: -------------------------------------------------------------------------------- 1 | include(../../common.pri) 2 | 3 | QT = core 4 | 5 | CONFIG += cmdline 6 | 7 | TARGET = CrashpadTest 8 | 9 | LIBS += -l$$replaceLibName(dump) 10 | 11 | include(../../src/3rdparty/3rdparty.pri) 12 | 13 | SOURCES += \ 14 | main.cc 15 | 16 | DESTDIR = $$APP_OUTPUT_PATH 17 | 18 | macx{ 19 | QMAKE_POST_LINK += $$QMAKE_COPY_DIR "$$vcpkg_path/tools/crashpad/" "$$APP_OUTPUT_PATH" 20 | } 21 | -------------------------------------------------------------------------------- /tests/crashpadtest/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | void crash() 7 | { 8 | int *p = nullptr; 9 | *p = 1; 10 | } 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | QCoreApplication a(argc, argv); 15 | 16 | QDir dir(a.applicationDirPath()); 17 | if (!dir.exists("crashpad")) { 18 | dir.mkdir("crashpad"); 19 | } 20 | auto crashPath = dir.filePath("crashpad"); 21 | 22 | Dump::CrashPad crashpad(crashPath, a.applicationDirPath(), "", true); 23 | 24 | crash(); 25 | 26 | return a.exec(); 27 | } 28 | -------------------------------------------------------------------------------- /tests/tests.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | CONFIG += ordered 3 | 4 | SUBDIRS += \ 5 | breakpadtest \ 6 | crashpadtest 7 | -------------------------------------------------------------------------------- /translations/qt-app_en.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", 3 | "name": "qt-app", 4 | "version": "0.1.1", 5 | "description": "manifest", 6 | "dependencies": [ 7 | "breakpad", 8 | "crashpad" 9 | ], 10 | "builtin-baseline": "a9eee3b18df395dbb8be71a31bd78ea441056e42" 11 | } 12 | --------------------------------------------------------------------------------