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
PIM
KAlarm
Commits
5ab72634
Commit
5ab72634
authored
Aug 02, 2022
by
David Jarvie
Browse files
Use more descriptive name for X11 cmake variable
parent
308aa746
Pipeline
#212081
passed with stage
in 2 minutes and 57 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
5ab72634
...
...
@@ -128,18 +128,19 @@ configure_file(kalarm-version-string.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kalarm-
if
(
NOT APPLE
)
option
(
WITHOUT_X11
"Build without X11 integration (skips finding X11)"
OFF
)
add_feature_info
(
WITHOUT_X11
${
WITHOUT_X11
}
"Disable X11 integration, even if X11 is available"
)
if
(
NOT WITHOUT_X11
)
find_package
(
X11
)
set
(
KDEPIM_HAV
E_X11
${
X11_FOUND
}
)
set
(
ENABL
E_X11
${
X11_FOUND
}
)
if
(
X11_FOUND
)
if
(
QT_MAJOR_VERSION STREQUAL
"5"
)
find_package
(
Qt5X11Extras
${
QT_REQUIRED_VERSION
}
REQUIRED NO_MODULE
)
else
()
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_REQUIRED_VERSION
}
CONFIG REQUIRED Gui
)
# qtx11extras_p.h for Qt6 < 6.2
endif
()
add_feature_info
(
ENABLE_X11
${
ENABLE_X11
}
"Enable use of X11"
)
endif
()
endif
()
add_feature_info
(
WITHOUT_X11
${
WITHOUT_X11
}
"Build without X11 integration"
)
endif
()
set
(
CMAKE_MODULE_PATH
${
ECM_MODULE_PATH
}
)
...
...
@@ -166,9 +167,10 @@ ecm_qt_install_logging_categories(
DESTINATION
${
KDE_INSTALL_LOGGINGCATEGORIESDIR
}
)
if
(
KF5DocTools_FOUND
)
if
(
KF5DocTools_FOUND
)
kdoctools_install
(
po
)
add_subdirectory
(
doc
)
endif
()
ki18n_install
(
po
)
feature_summary
(
WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES
)
src/CMakeLists.txt
View file @
5ab72634
...
...
@@ -335,7 +335,7 @@ if (ENABLE_WAKE_FROM_SUSPEND)
target_link_libraries
(
kalarm_bin KF5::AuthCore
)
endif
()
if
(
KDEPIM_HAV
E_X11
)
if
(
ENABL
E_X11
)
if
(
QT_MAJOR_VERSION STREQUAL
"5"
)
target_link_libraries
(
kalarm_bin Qt
${
QT_MAJOR_VERSION
}
::X11Extras
${
X11_X11_LIB
}
)
elseif
(
Qt6_VERSION_MINOR LESS 2
)
...
...
src/config-kalarm.h.cmake
View file @
5ab72634
/* config-kalarm.h. Generated by cmake from config-kalarm.h.cmake */
/* Define to 1 if
you have
th
e
Xlib */
#cmakedefine01
KDEPIM_HAV
E_X11
/* Define to 1 if
building wi
th Xlib */
#cmakedefine01
ENABL
E_X11
/* Define to 1 if wake-from-suspend is enabled */
#cmakedefine01 ENABLE_WAKE_FROM_SUSPEND
src/lib/desktop.cpp
View file @
5ab72634
...
...
@@ -10,7 +10,7 @@
#include
"config-kalarm.h"
#if
KDEPIM_HAV
E_X11
#if
ENABL
E_X11
#include
<KWindowSystem>
#endif
#include
<QGuiApplication>
...
...
@@ -47,7 +47,7 @@ Type currentIdentity()
*/
QRect
workArea
(
int
screen
)
{
#if
KDEPIM_HAV
E_X11
#if
ENABL
E_X11
if
(
screen
<
0
)
return
KWindowSystem
::
workArea
();
#endif
...
...
src/messagewindow.cpp
View file @
5ab72634
...
...
@@ -33,7 +33,7 @@
#include
<KWindowSystem>
#include
<KSqueezedTextLabel>
#include
<KIdleTime>
#if
KDEPIM_HAV
E_X11
#if
ENABL
E_X11
#include
<KWindowInfo>
#include
<netwm.h>
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
...
...
@@ -1338,7 +1338,7 @@ FullScreenType haveFullScreenWindow(int screen)
{
FullScreenType
type
=
NoFullScreen
;
//TODO: implement on Wayland
#if
KDEPIM_HAV
E_X11
#if
ENABL
E_X11
if
(
KWindowSystem
::
isPlatformX11
())
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
...
...
@@ -1367,7 +1367,7 @@ FullScreenType haveFullScreenWindow(int screen)
}
}
}
#endif //
KDEPIM_HAV
E_X11
#endif //
ENABL
E_X11
return
type
;
}
...
...
@@ -1380,7 +1380,7 @@ FullScreenType findFullScreenWindows(const QVector<QRect>& screenRects, QVector<
FullScreenType
result
=
NoFullScreen
;
screenTypes
.
fill
(
NoFullScreen
);
//TODO: implement on Wayland
#if
KDEPIM_HAV
E_X11
#if
ENABL
E_X11
if
(
KWindowSystem
::
isPlatformX11
())
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
...
...
@@ -1430,7 +1430,7 @@ FullScreenType findFullScreenWindows(const QVector<QRect>& screenRects, QVector<
}
}
}
#endif //
KDEPIM_HAV
E_X11
#endif //
ENABL
E_X11
return
result
;
}
...
...
src/prefdlg.cpp
View file @
5ab72634
...
...
@@ -58,7 +58,7 @@ using namespace KHolidays;
#include
<KAboutData>
#include
<KStandardGuiItem>
#include
<QIcon>
#if
KDEPIM_HAV
E_X11
#if
ENABL
E_X11
#include
<KWindowInfo>
#endif
#include
<KWindowSystem>
...
...
@@ -125,7 +125,7 @@ void KAlarmPrefDlg::display()
else
{
mInstance
->
restoreTab
();
#if
KDEPIM_HAV
E_X11
#if
ENABL
E_X11
KWindowInfo
info
=
KWindowInfo
(
mInstance
->
winId
(),
NET
::
WMGeometry
|
NET
::
WMDesktop
);
KWindowSystem
::
setCurrentDesktop
(
info
.
desktop
());
#endif
...
...
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