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
Games
Konquest
Commits
b4a129aa
Commit
b4a129aa
authored
Dec 30, 2021
by
Laurent Montel
😁
Browse files
Adapt build system for building against qt6 + fix compile error
parent
5fc769e0
Pipeline
#116196
passed with stage
in 57 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
b4a129aa
...
...
@@ -13,7 +13,7 @@ set(KONQUEST_VERSION "${KONQUEST_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION
project
(
konquest VERSION
${
KONQUEST_VERSION
}
)
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
85
.0"
)
set
(
KF5_MIN_VERSION
"5.
90
.0"
)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED CONFIG
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
ECM_MODULE_PATH
}
)
...
...
@@ -27,7 +27,12 @@ include(ECMInstallIcons)
include
(
ECMSetupVersion
)
include
(
FeatureSummary
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
REQUIRED NO_MODULE COMPONENTS Widgets Svg
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
REQUIRED NO_MODULE COMPONENTS Widgets Svg
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
QuickWidgets
${
REQUIRED_QT_VERSION
}
CONFIG
)
if
(
QT_MAJOR_VERSION STREQUAL
"6"
)
find_package
(
Qt6StateMachine
${
REQUIRED_QT_VERSION
}
CONFIG
)
endif
()
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS
Config
CoreAddons
...
...
@@ -45,7 +50,7 @@ find_package(KF5KDEGames 7.3.0 REQUIRED)
add_definitions
(
-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055
6
00
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055
9
00
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)
...
...
src/CMakeLists.txt
View file @
b4a129aa
...
...
@@ -72,8 +72,11 @@ target_link_libraries(konquest
KF5::I18n
KF5::XmlGui
KF5::WidgetsAddons
Qt::Svg
Qt
${
QT_MAJOR_VERSION
}
::Svg
)
if
(
QT_MAJOR_VERSION STREQUAL
"6"
)
target_link_libraries
(
konquest Qt6::StateMachine
)
endif
()
install
(
TARGETS konquest
${
KDE_INSTALL_TARGETS_DEFAULT_ARGS
}
)
...
...
src/players/ai/becai/becai.cpp
View file @
b4a129aa
...
...
@@ -430,9 +430,11 @@ AiBecai::play()
// Process the first few possible targets from the target list. As this
// is a priority list, only consider the first few ones and do not
// process possible targets with low priority (high score).
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QMapIterator
<
double
,
TargetPlanet
>
targetListIt
(
targetList
);
#else
QMultiMapIterator
<
double
,
TargetPlanet
>
targetListIt
(
targetList
);
#endif
int
skipCount
=
3
;
while
(
targetListIt
.
hasNext
()
&&
(
skipCount
>
0
))
{
...
...
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