Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-11-24 12:31:56 +0300
committerHannah von Reth <hannah.vonreth@owncloud.com>2021-11-24 12:31:56 +0300
commit7743544328812a690abc11a00ae0250a768fdeb2 (patch)
tree2e7a1dd1c0f65ecb89432cdb6f9b8786ff3ed803 /src/gui
parentbff3481ffaa1a3b514b6ff3ce75f51e803eb0319 (diff)
parent10be49238b57d2fb4ecd175eec910299dc47a745 (diff)
Merge remote-tracking branch 'origin/2.10'
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/CMakeLists.txt8
-rw-r--r--src/gui/guiutility.cpp11
2 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index f955ef52f..acf943987 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)
@@ -176,7 +176,7 @@ elseif( WIN32 )
guiutility_win.cpp
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 76f7ed38c..b3bf51451 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>
@@ -65,11 +68,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) {