diff --git a/CMakeLists.txt b/CMakeLists.txt index 38a08ec..c437407 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,8 @@ set(META_APP_CATEGORIES "Utility;Security;") set(META_APP_AUTHOR "Martchus") set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "A simple password store using AES-256-CBC encryption via OpenSSL") -set(META_GUI_OPTIONAL true) +set(META_GUI_OPTIONAL YES) +set(META_USE_QQC2 ON) set(META_VERSION_MAJOR 2) set(META_VERSION_MINOR 1) set(META_VERSION_PATCH 5) @@ -125,7 +126,10 @@ use_cpp_utilities() include(BasicConfig) # find qtutilities -if(WIDGETS_GUI OR QUICK_GUI) +if(QUICK_GUI) + find_package(qtutilities 5.11.0 REQUIRED) + use_qt_utilities() +elseif(WIDGETS_GUI) find_package(qtutilities 5.7.0 REQUIRED) use_qt_utilities() endif() @@ -139,6 +143,7 @@ if(WIDGETS_GUI OR QUICK_GUI) include(QtGuiConfig) include(QtConfig) endif() + include(WindowsResources) include(AppTarget) include(ShellCompletion) diff --git a/quickgui/initiatequick.cpp b/quickgui/initiatequick.cpp index 8ee7a83..38e54b9 100644 --- a/quickgui/initiatequick.cpp +++ b/quickgui/initiatequick.cpp @@ -3,6 +3,7 @@ #include "resources/config.h" +#define QT_UTILITIES_GUI_QTQUICK #include #include @@ -23,9 +24,6 @@ namespace QtGui { int runQuickGui(int argc, char *argv[], const QtConfigArguments &qtConfigArgs, const QString &file) { // init application -#ifdef __ANDROID__ - qputenv("QT_QUICK_CONTROLS_STYLE", "material"); -#endif SET_QT_APPLICATION_INFO; QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #ifdef PASSWORD_MANAGER_GUI_QTWIDGETS @@ -36,6 +34,7 @@ int runQuickGui(int argc, char *argv[], const QtConfigArguments &qtConfigArgs, c // apply settings specified via command line args qtConfigArgs.applySettings(); + qtConfigArgs.applySettingsForQuickGui(); // load translations and enforce UTF-8 locale QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));