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
Plasma
Milou
Commits
841138e6
Commit
841138e6
authored
Apr 24, 2022
by
Laurent Montel
Browse files
Adapt to build against qt6
parent
8118e8d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
841138e6
...
...
@@ -5,14 +5,12 @@ set(PROJECT_VERSION "5.24.80")
set
(
PROJECT_VERSION_MAJOR 5
)
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
86
"
)
set
(
KF5_MIN_VERSION
"5.
90
"
)
set
(
KDE_COMPILERSETTINGS_LEVEL
"5.82"
)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
${
ECM_MODULE_PATH
}
)
find_package
(
Qt5
${
QT_MIN_VERSION
}
REQUIRED NO_MODULE COMPONENTS Qml Quick Widgets
)
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS CoreAddons I18n Declarative ItemModels Service Plasma Runner
)
include
(
FeatureSummary
)
include
(
KDEInstallDirs
)
...
...
@@ -23,6 +21,9 @@ include(GenerateExportHeader)
include
(
KDEClangFormat
)
include
(
KDEGitCommitHooks
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
REQUIRED NO_MODULE COMPONENTS Qml Quick Widgets
)
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS CoreAddons I18n Declarative ItemModels Service Plasma Runner
)
add_definitions
(
-DQT_DISABLE_DEPRECATED_BEFORE=0x050c00
)
add_definitions
(
-DQT_NO_FOREACH -DQT_NO_KEYWORDS
)
...
...
lib/sourcesmodel.cpp
View file @
841138e6
...
...
@@ -261,8 +261,11 @@ void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch> &l)
// that do not
// The rest are given the same preference as given by the runners.
const
QString
simplifiedQuery
=
m_queryString
.
simplified
();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
auto
words
=
simplifiedQuery
.
splitRef
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#else
const
auto
words
=
QStringView
(
simplifiedQuery
).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
QSet
<
QString
>
higherTypes
;
for
(
const
QString
&
type
:
qAsConst
(
m_types
))
{
const
TypeData
td
=
m_matches
.
value
(
type
);
...
...
lib/test/CMakeLists.txt
View file @
841138e6
find_package
(
Qt
5
${
REQUIRED_QT_VERSION
}
CONFIG REQUIRED Test
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
REQUIRED_QT_VERSION
}
CONFIG REQUIRED Test
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/..
)
...
...
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