diff options
-rw-r--r-- | .craft.shelf | 2 | ||||
-rw-r--r-- | src/gui/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/gui/guiutility.cpp | 11 |
3 files changed, 11 insertions, 10 deletions
diff --git a/.craft.shelf b/.craft.shelf index a91603bb4..373b9e872 100644 --- a/.craft.shelf +++ b/.craft.shelf @@ -8,7 +8,7 @@ revision = feca22a30f8d3a2122fd9b2097351fcb2da28543 [craft/craft-blueprints-owncloud] version = master -revision = f2ef3cfe9c17827e5db19c2cce06397376d8e9e0 +revision = 0e31c84c29e776a4708e4e443b47752bf8ad67a2 [craft/craft-core] version = master diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 95ac47a57..0e9b611e2 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -2,9 +2,9 @@ include(ECMAddAppIcon) find_package(Qt5 REQUIRED COMPONENTS Widgets) -#if (WIN32) -# find_package(Qt5 REQUIRED COMPONENTS WinExtras) -#endif() +if (WIN32) + find_package(Qt5 REQUIRED COMPONENTS WinExtras) +endif() add_subdirectory(updater) @@ -173,7 +173,7 @@ elseif( WIN32 ) target_sources(owncloudCore PRIVATE folderwatcher_win.cpp navigationpanehelper.cpp) -# target_link_libraries(owncloudCore PUBLIC Qt5::WinExtras) + target_link_libraries(owncloudCore PUBLIC Qt5::WinExtras) elseif(UNIX AND NOT APPLE ) ## handle DBUS for Fdo notifications find_package(Qt5 COMPONENTS DBus) diff --git a/src/gui/guiutility.cpp b/src/gui/guiutility.cpp index 8414d0c5c..7608d6aaa 100644 --- a/src/gui/guiutility.cpp +++ b/src/gui/guiutility.cpp @@ -25,6 +25,9 @@ #ifdef Q_OS_WIN #include <QMetaMethod> +#include <QtWinExtras/qwinfunctions.h> +#include <qt_windows.h> + #include <chrono> #include <thread> @@ -63,11 +66,9 @@ void startShutdownWatcher() WNDCLASS wc = {}; wc.hInstance = GetModuleHandle(nullptr); wc.lpszClassName = L"ocWindowMessageWatcher"; -#if MIRALL_VERSION_MINOR > 9 -// TODO: for now we won't display a proper icon -#error "Please add the QtWinExtras dependency" - wc.hIcon = QtWin::toHICON(Theme::instance()->applicationIcon().pixmap(64, 64)); -#endif + if (qobject_cast<QGuiApplication *>(qApp)) { + wc.hIcon = QtWin::toHICON(Theme::instance()->applicationIcon().pixmap(64, 64)); + } wc.lpfnWndProc = [](HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -> LRESULT { // qDebug() << MSG { hwnd, msg, wParam, lParam, 0, {} }; if (msg == WM_QUERYENDSESSION) { |