Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
KSystemLog
Commits
97a19dad
Commit
97a19dad
authored
Jan 02, 2022
by
Laurent Montel
😁
Browse files
Adapt build system for building against qt6
parent
9e266fab
Pipeline
#117326
failed with stage
in 3 minutes and 44 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
97a19dad
...
...
@@ -9,7 +9,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project
(
KSystemlog VERSION
${
RELEASE_SERVICE_VERSION
}
)
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
8
9.0"
)
set
(
KF5_MIN_VERSION
"5.9
0
.0"
)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
${
ECM_MODULE_PATH
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
...
...
@@ -33,7 +33,7 @@ kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
ecm_setup_version
(
${
RELEASE_SERVICE_VERSION
}
VARIABLE_PREFIX KSYSTEMLOG
VERSION_HEADER
"
${
CMAKE_CURRENT_BINARY_DIR
}
/src/ksystemlog_version.h"
)
find_package
(
Qt
5
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
Concurrent
Core
Network
...
...
@@ -41,6 +41,9 @@ find_package (Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Test
PrintSupport
)
if
(
QT_MAJOR_VERSION STREQUAL
"6"
)
find_package
(
Qt6Core5Compat
)
endif
()
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS
XmlGui
...
...
@@ -102,8 +105,8 @@ if (${AUDIT_FOUND})
endif
(
${
AUDIT_FOUND
}
)
########### Subfolders ##########
add_definitions
(
-DQT_DISABLE_DEPRECATED_BEFORE=0x0
60000
)
add_definitions
(
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x0
600
00
)
add_definitions
(
-DQT_DISABLE_DEPRECATED_BEFORE=0x0
50f02
)
add_definitions
(
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x0
559
00
)
add_subdirectory
(
src
)
...
...
autotests/CMakeLists.txt
View file @
97a19dad
...
...
@@ -14,7 +14,7 @@ include_directories(
add_library
(
testCore STATIC testUtil.cpp testResources.qrc
)
target_link_libraries
(
testCore PUBLIC
Qt::Test
Qt
${
QT_MAJOR_VERSION
}
::Test
ksystemlog_lib
ksystemlog_base_mode
ksystemlog_config
...
...
src/CMakeLists.txt
View file @
97a19dad
...
...
@@ -84,4 +84,4 @@ install(TARGETS ksystemlog ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install
(
PROGRAMS org.kde.ksystemlog.desktop DESTINATION
${
KDE_INSTALL_APPDIR
}
)
install
(
FILES org.kde.ksystemlog.appdata.xml DESTINATION
${
KDE_INSTALL_METAINFODIR
}
)
install
(
FILES ksystemlogui.rc DESTINATION
${
KDE_INSTALL_KXMLGUI
5
DIR
}
/ksystemlog
)
install
(
FILES ksystemlogui.rc DESTINATION
${
KDE_INSTALL_KXMLGUIDIR
}
/ksystemlog
)
src/lib/CMakeLists.txt
View file @
97a19dad
...
...
@@ -50,8 +50,8 @@ add_dependencies(
target_link_libraries
(
ksystemlog_lib
ksystemlog_config
Qt::Widgets
Qt::PrintSupport
Qt
${
QT_MAJOR_VERSION
}
::Widgets
Qt
${
QT_MAJOR_VERSION
}
::PrintSupport
KF5::I18n
KF5::Archive
KF5::WidgetsAddons
...
...
src/mainWindow.cpp
View file @
97a19dad
...
...
@@ -351,12 +351,23 @@ void MainWindow::changeResumePauseAction(bool paused)
}
// Be sure that the button will always have a good size
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
auto
associatedWidgets
{
mResumePauseAction
->
associatedWidgets
()};
for
(
QWidget
*
widget
:
associatedWidgets
)
{
if
(
widget
->
sizeHint
().
width
()
>
widget
->
size
().
width
())
{
widget
->
setMinimumSize
(
widget
->
sizeHint
());
}
}
#else
const
auto
associatedWidgets
{
mResumePauseAction
->
associatedObjects
()};
for
(
QObject
*
obj
:
associatedWidgets
)
{
QWidget
*
widget
=
qobject_cast
<
QWidget
*>
(
obj
);
if
(
widget
&&
(
widget
->
sizeHint
().
width
()
>
widget
->
size
().
width
()))
{
widget
->
setMinimumSize
(
widget
->
sizeHint
());
}
}
#endif
}
void
MainWindow
::
fileOpen
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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