Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
Konversation
Commits
ba43804d
Commit
ba43804d
authored
Mar 08, 2022
by
Nicolas Fella
Browse files
Build without KGlobalAccel on Windows
It's not supported there
parent
632ea52f
Pipeline
#148743
passed with stage
in 2 minutes and 36 seconds
Changes
5
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
.kde-ci.yml
View file @
ba43804d
...
...
@@ -19,10 +19,13 @@ Dependencies:
'
frameworks/kparts'
:
'
@stable'
'
frameworks/kwallet'
:
'
@stable'
'
frameworks/kwidgetsaddons'
:
'
@stable'
'
frameworks/kglobalaccel'
:
'
@stable'
'
frameworks/kdbusaddons'
:
'
@stable'
'
frameworks/knewstuff'
:
'
@stable'
'
frameworks/knotifications'
:
'
@stable'
'
frameworks/kwindowsystem'
:
'
@stable'
'
frameworks/kitemviews'
:
'
@stable'
'
libraries/phonon'
:
'
@stable'
-
'
on'
:
[
'
Linux'
,
'
FreeBSD'
]
'
require'
:
'
frameworks/kglobalaccel'
:
'
@stable'
CMakeLists.txt
View file @
ba43804d
...
...
@@ -45,7 +45,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
Parts
Wallet
WidgetsAddons
GlobalAccel
DBusAddons
NewStuff
Notifications
...
...
@@ -53,6 +52,11 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
ItemViews
)
if
(
NOT WIN32
)
find_package
(
KF5 REQUIRED GlobalAccel
)
endif
()
set
(
HAVE_KGLOBALACCEL
${
KF5GlobalAccel_FOUND
}
)
if
(
KF5_VERSION VERSION_LESS 5.91.0
)
find_package
(
Qt5X11Extras
${
QT_MIN_VERSION
}
CONFIG
)
set_package_properties
(
Qt5X11Extras PROPERTIES
...
...
config-konversation.h.cmake
View file @
ba43804d
#cmakedefine HAVE_QCA2 1
#cmakedefine HAVE_STROPTS_H 1
#cmakedefine01 HAVE_X11
#cmakedefine01 HAVE_KGLOBALACCEL
src/CMakeLists.txt
View file @
ba43804d
...
...
@@ -253,7 +253,6 @@ target_link_libraries(konversation
KF5::Parts
KF5::Wallet
KF5::WidgetsAddons
KF5::GlobalAccel
KF5::DBusAddons
KF5::CoreAddons
KF5::Notifications
...
...
@@ -266,6 +265,10 @@ if(TARGET Qt5::X11Extras)
target_link_libraries
(
konversation Qt5::X11Extras
)
endif
()
if
(
TARGET KF5::GlobalAccel
)
target_link_libraries
(
konversation KF5::GlobalAccel
)
endif
()
if
(
Qca-qt5_FOUND
)
target_link_libraries
(
konversation qca-qt5
)
endif
()
...
...
src/mainwindow.cpp
View file @
ba43804d
...
...
@@ -45,9 +45,14 @@
#include
<KShortcutsDialog>
#include
<KStandardShortcut>
#include
<KNotifyConfigWidget>
#include
<KGlobalAccel>
#include
<KStartupInfo>
#include
"config-konversation.h"
#if HAVE_KGLOBALACCEL
#include
<KGlobalAccel>
#endif
MainWindow
::
MainWindow
()
:
KXmlGuiWindow
(
nullptr
)
{
setStateConfigGroup
(
QStringLiteral
(
"MainWindow"
));
...
...
@@ -292,7 +297,10 @@ MainWindow::MainWindow() : KXmlGuiWindow(nullptr)
action
->
setEnabled
(
false
);
connect
(
action
,
&
QAction
::
triggered
,
m_viewContainer
,
&
ViewContainer
::
showNextActiveView
);
actionCollection
()
->
addAction
(
QStringLiteral
(
"next_active_tab"
),
action
);
#if HAVE_KGLOBALACCEL
KGlobalAccel
::
setGlobalShortcut
(
action
,
QList
<
QKeySequence
>
());
#endif
if
(
Preferences
::
self
()
->
tabPlacement
()
==
Preferences
::
Left
)
{
...
...
@@ -538,7 +546,10 @@ MainWindow::MainWindow() : KXmlGuiWindow(nullptr)
action
->
setText
(
i18n
(
"Show/Hide Konversation"
));
connect
(
action
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
toggleVisibility
);
actionCollection
()
->
addAction
(
QStringLiteral
(
"toggle_mainwindow_visibility"
),
action
);
#if HAVE_KGLOBALACCEL
KGlobalAccel
::
setGlobalShortcut
(
action
,
QList
<
QKeySequence
>
());
#endif
action
=
new
KToggleAction
(
this
);
action
->
setEnabled
(
true
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment