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
libksysguard
Commits
1eb9c86f
Commit
1eb9c86f
authored
Mar 06, 2022
by
Volker Krause
Browse files
Add the last missing bits for building against Qt6
Also enables the Qt6 Linux CI.
parent
ae73bd15
Pipeline
#146284
passed with stage
in 1 minute and 34 seconds
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
1eb9c86f
...
...
@@ -4,3 +4,4 @@
include
:
-
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
-
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
-
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
CMakeLists.txt
View file @
1eb9c86f
...
...
@@ -7,7 +7,7 @@ set(PROJECT_VERSION_MAJOR 5)
# check with non-Plasma consumers (e.g. KDevelop) before bumping these versions to make sure the KDE CI does not break
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
86
"
)
set
(
KF5_MIN_VERSION
"5.
91
"
)
set
(
KDE_COMPILERSETTINGS_LEVEL
"5.82"
)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
...
...
@@ -23,6 +23,7 @@ include(ECMAddTests)
include
(
ECMInstallIcons
)
include
(
ECMSetupVersion
)
include
(
ECMQtDeclareLoggingCategory
)
include
(
ECMDeprecationSettings
)
include
(
CMakePackageConfigHelpers
)
include
(
CheckIncludeFiles
)
...
...
@@ -131,6 +132,10 @@ add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Des
option
(
ENABLE_KAUTH_HELPER
"Build and install ksysguardprocesslist_helper KAuth helper"
ON
)
add_feature_info
(
KAUTH_HELPER
${
ENABLE_KAUTH_HELPER
}
"Build and install ksysguardprocesslist_helper KAuth helper"
)
ecm_set_disabled_deprecation_versions
(
QT 5.15.0
)
add_definitions
(
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055B00
)
add_definitions
(
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)
add_definitions
(
-DQT_USE_QSTRINGBUILDER
)
...
...
processui/ProcessFilter.cpp
View file @
1eb9c86f
...
...
@@ -21,7 +21,7 @@
bool
ProcessFilter
::
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
{
if
((
mFilter
==
AllProcesses
||
mFilter
==
AllProcessesInTreeForm
)
&&
filterReg
Exp
().
isEmpty
())
if
((
mFilter
==
AllProcesses
||
mFilter
==
AllProcessesInTreeForm
)
&&
filterReg
ularExpression
().
pattern
().
isEmpty
())
return
true
;
// Shortcut for common case
ProcessModel
*
model
=
static_cast
<
ProcessModel
*>
(
sourceModel
());
...
...
@@ -91,17 +91,17 @@ bool ProcessFilter::filterAcceptsRow(int source_row, const QModelIndex &source_p
}
if
(
accepted
)
{
if
(
filterReg
Exp
().
isEmpty
())
if
(
filterReg
ularExpression
().
pattern
().
isEmpty
())
return
true
;
// Allow the user to search by PID
if
(
QString
::
number
(
process
->
pid
()).
contains
(
filterReg
Exp
()))
if
(
QString
::
number
(
process
->
pid
()).
contains
(
filterReg
ularExpression
()))
return
true
;
// None of our tests have rejected it. Pass it on to qsortfilterproxymodel's filter
if
(
QSortFilterProxyModel
::
filterAcceptsRow
(
source_row
,
source_parent
))
return
true
;
auto
strings
=
filterReg
Exp
().
pattern
().
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
auto
strings
=
filterReg
ularExpression
().
pattern
().
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
for
(
auto
string
:
strings
)
{
string
=
string
.
trimmed
();
if
(
process
->
name
().
indexOf
(
string
)
!=
-
1
||
QString
::
number
(
process
->
pid
()).
indexOf
(
string
)
!=
-
1
)
{
...
...
processui/ProcessModel.cpp
View file @
1eb9c86f
...
...
@@ -1405,9 +1405,9 @@ QVariant ProcessModel::data(const QModelIndex &index, int role) const
KSysGuard
::
Process
*
process
=
reinterpret_cast
<
KSysGuard
::
Process
*>
(
index
.
internalPointer
());
const
QVariant
value
=
d
->
mExtraAttributes
[
attr
]
->
data
(
process
);
if
(
value
.
canConvert
(
QMetaType
::
LongLong
)
&&
static_cast
<
QMetaType
::
Type
>
(
value
.
type
())
!=
QMetaType
::
QString
)
{
return
Qt
::
AlignRight
+
Qt
::
AlignVCenter
;
return
(
int
)(
Qt
::
AlignRight
|
Qt
::
AlignVCenter
)
;
}
return
Qt
::
AlignLeft
+
Qt
::
AlignVCenter
;
return
(
int
)(
Qt
::
AlignLeft
|
Qt
::
AlignVCenter
)
;
}
}
return
QVariant
();
...
...
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