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
KPMCore
Commits
73de1709
Commit
73de1709
authored
Jan 16, 2022
by
Andrius Štikonas
Browse files
Port to Qt6.
parent
08d2e3dc
Pipeline
#124109
passed with stage
in 58 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
73de1709
...
...
@@ -22,7 +22,7 @@ set(CMAKE_USE_RELATIVE_PATHS OFF)
set
(
CMAKE_BUILD_WITH_INSTALL_RPATH ON
)
# Dependencies
set
(
QT_MIN_VERSION
"5.1
4
.0"
)
set
(
QT_MIN_VERSION
"5.1
5
.0"
)
set
(
KF5_MIN_VERSION
"5.88"
)
set
(
BLKID_MIN_VERSION
"2.33.2"
)
# PolkitQt5-1
...
...
@@ -49,7 +49,11 @@ ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KPMCORE
PACKAGE_VERSION_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KPMcoreConfigVersion.cmake"
SOVERSION
${
SOVERSION
}
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
if
(
NOT QT_MAJOR_VERSION
)
set
(
QT_MAJOR_VERSION
"5"
)
endif
()
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
COMPONENTS REQUIRED
Core
DBus
Gui
...
...
@@ -63,7 +67,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
WidgetsAddons
)
find_package
(
PolkitQt
5
-1 REQUIRED
)
find_package
(
PolkitQt
${
QT_MAJOR_VERSION
}
-1 REQUIRED
)
# use sane compile flags
add_definitions
(
...
...
src/CMakeLists.txt
View file @
73de1709
...
...
@@ -33,11 +33,11 @@ ki18n_wrap_ui(kpmcore_SRCS ${gui_UIFILES})
add_library
(
kpmcore SHARED
${
kpmcore_SRCS
}
)
target_link_libraries
(
kpmcore PUBLIC
Qt
5
::Core
Qt
${
QT_MAJOR_VERSION
}
::Core
PRIVATE
${
BLKID_LIBRARIES
}
Qt
5
::DBus
Qt
5
::Gui
Qt
${
QT_MAJOR_VERSION
}
::DBus
Qt
${
QT_MAJOR_VERSION
}
::Gui
KF5::I18n
KF5::CoreAddons
KF5::WidgetsAddons
...
...
src/util/CMakeLists.txt
View file @
73de1709
...
...
@@ -11,19 +11,19 @@
set
(
helper_interface_xml org.kde.kpmcore.helperinterface.xml
)
qt
5
_generate_dbus_interface
(
qt_generate_dbus_interface
(
util/externalcommand.h
${
application_interface_xml
}
OPTIONS -a
)
qt
5
_generate_dbus_interface
(
qt_generate_dbus_interface
(
util/externalcommandhelper.h
${
helper_interface_xml
}
OPTIONS -a
)
qt
5
_add_dbus_interface
(
HelperInterface_SRCS
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
helper_interface_xml
}
externalcommandhelper_interface
)
qt_add_dbus_interface
(
HelperInterface_SRCS
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
helper_interface_xml
}
externalcommandhelper_interface
)
set
(
UTIL_SRC
${
HelperInterface_SRCS
}
...
...
@@ -49,10 +49,10 @@ add_executable(kpmcore_externalcommand
)
target_link_libraries
(
kpmcore_externalcommand
Qt
5
::Core
Qt
5
::DBus
Qt
${
QT_MAJOR_VERSION
}
::Core
Qt
${
QT_MAJOR_VERSION
}
::DBus
KF5::I18n
PolkitQt
5
-1::Core
PolkitQt
${
QT_MAJOR_VERSION
}
-1::Core
)
install
(
TARGETS kpmcore_externalcommand DESTINATION
${
KDE_INSTALL_LIBEXECDIR
}
)
...
...
src/util/externalcommandhelper.cpp
View file @
73de1709
...
...
@@ -309,7 +309,11 @@ QVariantMap ExternalCommandHelper::RunCommand(const QString& command, const QStr
if
(
!
isCallerAuthorized
())
{
return
{};
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QTextCodec
::
setCodecForLocale
(
QTextCodec
::
codecForName
(
"UTF-8"
));
#endif
QVariantMap
reply
;
reply
[
QStringLiteral
(
"success"
)]
=
true
;
...
...
test/CMakeLists.txt
View file @
73de1709
...
...
@@ -26,7 +26,7 @@ target_link_libraries(testhelpers PRIVATE kpmcore)
macro
(
kpm_test name
)
add_executable
(
${
name
}
${
ARGN
}
)
target_link_libraries
(
${
name
}
testhelpers kpmcore Qt
5
::Core
)
target_link_libraries
(
${
name
}
testhelpers kpmcore Qt
${
QT_MAJOR_VERSION
}
::Core
)
endmacro
()
###
...
...
Write
Preview
Markdown
is supported
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