blob: cf93b3b66def1bb19a9093aeac18c2f61b383c9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From 4295aba5c02533040723d140e062aebd231b3f18 Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Thu, 28 Nov 2019 12:56:34 +0100
Subject: Port away from deprecated KWindowSystem API (with ifdefs)
---
src/application.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/application.cpp b/src/application.cpp
index 4667c24..538624b 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -50,6 +50,7 @@
#include <KTextEdit>
#include <KSharedConfig>
#include <KStartupInfo>
+#include <kwindowsystem_version.h>
using namespace Konversation;
@@ -1392,7 +1393,12 @@ void Application::handleActivate(const QStringList& arguments)
newInstance(m_commandLineParser);
+#if KWINDOWSYSTEM_VERSION <= QT_VERSION_CHECK(5, 62, 0)
KStartupInfo::setNewStartupId(mainWindow, KStartupInfo::startupId());
+#else
+ mainWindow->setAttribute(Qt::WA_NativeWindow, true);
+ KStartupInfo::setNewStartupId(mainWindow->windowHandle(), KStartupInfo::startupId());
+#endif
mainWindow->show();
mainWindow->raise();
}
--
cgit v1.1
|