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
Games
KShisen
Commits
eea1dc94
Commit
eea1dc94
authored
Dec 28, 2021
by
Laurent Montel
Browse files
Adapt for building against qt6
parent
38f9e1f7
Pipeline
#115334
passed with stage
in 35 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
eea1dc94
...
...
@@ -13,7 +13,7 @@ set(KSHISEN_VERSION "${KSHISEN_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}"
project
(
kshisen VERSION
${
KSHISEN_VERSION
}
)
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
85
.0"
)
set
(
KF5_MIN_VERSION
"5.
90
.0"
)
# Found this somewhere but cannot re-find it now ... but want to investigate later, so keeping this here for now.
#set(CXX_CLANG_TIDY ON)
...
...
@@ -36,7 +36,9 @@ include(ECMQtDeclareLoggingCategory)
include
(
ECMSetupVersion
)
include
(
FeatureSummary
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
REQUIRED NO_MODULE COMPONENTS Core Gui
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
REQUIRED NO_MODULE COMPONENTS Core Gui
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
QuickWidgets
${
REQUIRED_QT_VERSION
}
CONFIG
)
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS
Config
Crash
...
...
src/CMakeLists.txt
View file @
eea1dc94
...
...
@@ -43,7 +43,7 @@ target_link_libraries(kshisen
KF5::DBusAddons
KF5::I18n
KF5::XmlGui
Qt::Gui
Qt
${
QT_MAJOR_VERSION
}
::Gui
)
install
(
TARGETS kshisen
${
KDE_INSTALL_TARGETS_DEFAULT_ARGS
}
)
...
...
src/main.cpp
View file @
eea1dc94
...
...
@@ -19,8 +19,9 @@
#include
<KCrash>
#include
<KDBusService>
#include
<KLocalizedString>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include
<Kdelibs4ConfigMigrator>
#endif
// KShisen
#include
"app.h"
#include
"debug.h"
...
...
@@ -29,14 +30,17 @@
int
main
(
int
argc
,
char
**
argv
)
{
// Fixes blurry icons with fractional scaling
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QGuiApplication
::
setAttribute
(
Qt
::
AA_UseHighDpiPixmaps
);
#endif
QApplication
a
(
argc
,
argv
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// Migrate pre-existing (4.x) configuration
Kdelibs4ConfigMigrator
migrate
(
QStringLiteral
(
"kshisen"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
QStringLiteral
(
"kshisenrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
QStringLiteral
(
"kshisenui.rc"
));
migrate
.
migrate
();
#endif
KLocalizedString
::
setApplicationDomain
(
"kshisen"
);
...
...
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