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
Plasma Vault
Commits
dbe85a8a
Commit
dbe85a8a
authored
Mar 15, 2022
by
Laurent Montel
Browse files
Make it compile against qt6
parent
05a2eb9e
Pipeline
#150548
passed with stage
in 54 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
dbe85a8a
...
...
@@ -45,7 +45,7 @@ include(KDEGitCommitHooks)
# Qt
set
(
CMAKE_AUTOMOC ON
)
find_package
(
Qt
5
${
QT_MIN_VERSION
}
CONFIG REQUIRED
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
CONFIG REQUIRED
COMPONENTS
Core
DBus
...
...
fileitemplugin/plasmavaultfileitemaction.cpp
View file @
dbe85a8a
...
...
@@ -47,7 +47,7 @@ QList<QAction *> PlasmaVaultFileItemAction::actions(const KFileItemListPropertie
auto
fileItem
=
fileItemInfos
.
urlList
()[
0
].
toLocalFile
();
auto
createAction
=
[
this
](
const
QIcon
&
icon
,
const
QString
&
name
,
QString
command
,
QString
device
,
QWidget
*
parentWidget
)
{
QAction
*
action
=
new
QAction
(
icon
,
name
,
parentWidget
);
QAction
*
action
=
new
QAction
(
icon
,
name
,
this
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
command
,
device
]()
{
auto
method
=
QDBusMessage
::
createMethodCall
(
"org.kde.kded5"
,
"/modules/plasmavault"
,
"org.kde.plasmavault"
,
command
);
...
...
kded/engine/vault.cpp
View file @
dbe85a8a
...
...
@@ -13,9 +13,10 @@
#include
<QUrl>
#include
<QPointer>
#include
<KSharedConfig>
#include
<KConfig>
#include
<KConfigGroup>
#include
<KSharedConfig>
#include
<QRegularExpression>
#include
<processcore/process.h>
#include
<processcore/processes.h>
...
...
@@ -498,9 +499,7 @@ FutureResult<> Vault::close()
// based on ksolidnotify.cpp
QStringList
blockApps
;
const
auto
&
pidList
=
result
.
split
(
QRegExp
(
QStringLiteral
(
"
\\
s+"
)),
Qt
::
SkipEmptyParts
);
const
auto
&
pidList
=
result
.
split
(
QRegularExpression
(
QStringLiteral
(
"
\\
s+"
)),
Qt
::
SkipEmptyParts
);
if
(
pidList
.
isEmpty
())
{
d
->
updateMessage
(
i18n
(
"Unable to close the vault because an application is using it"
));
...
...
@@ -555,9 +554,7 @@ FutureResult<> Vault::forceClose()
|
onSuccess
([]
(
const
QString
&
result
)
{
// based on ksolidnotify.cpp
const
auto
&
pidList
=
result
.
split
(
QRegExp
(
QStringLiteral
(
"
\\
s+"
)),
Qt
::
SkipEmptyParts
);
const
auto
&
pidList
=
result
.
split
(
QRegularExpression
(
QStringLiteral
(
"
\\
s+"
)),
Qt
::
SkipEmptyParts
);
KSysGuard
::
Processes
procs
;
...
...
kded/ui/dialogdsl.cpp
View file @
dbe85a8a
...
...
@@ -101,7 +101,7 @@ PlasmaVault::Vault::Payload CompoundDialogModule::fields() const
PlasmaVault
::
Vault
::
Payload
result
;
for
(
const
auto
&
child
:
m_children
)
{
result
.
unite
(
child
->
fields
());
result
.
insert
(
child
->
fields
());
}
return
result
;
...
...
kded/ui/vaultconfigurationdialog.cpp
View file @
dbe85a8a
...
...
@@ -117,7 +117,7 @@ public:
qDebug
()
<<
"Getting the data"
;
for
(
const
auto
*
module
:
currentModuleDialogs
)
{
qDebug
()
<<
"Data: "
<<
module
->
fields
();
collectedPayload
.
unite
(
module
->
fields
());
collectedPayload
.
insert
(
module
->
fields
());
}
const
auto
name
=
collectedPayload
[
KEY_NAME
].
toString
();
...
...
kded/ui/vaultcreationwizard.cpp
View file @
dbe85a8a
...
...
@@ -103,7 +103,7 @@ public:
auto
collectedPayload
=
firstStepModule
->
fields
();
for
(
const
auto
*
module
:
currentStepModules
)
{
collectedPayload
.
unite
(
module
->
fields
());
collectedPayload
.
insert
(
module
->
fields
());
}
const
auto
name
=
collectedPayload
[
KEY_NAME
].
toString
();
...
...
kded/ui/vaultimportingwizard.cpp
View file @
dbe85a8a
...
...
@@ -60,7 +60,7 @@ public:
{
auto
collectedPayload
=
firstStepModule
->
fields
();
for
(
const
auto
*
module
:
currentStepModules
)
{
collectedPayload
.
unite
(
module
->
fields
());
collectedPayload
.
insert
(
module
->
fields
());
}
const
auto
name
=
collectedPayload
[
KEY_NAME
].
toString
();
...
...
kded/ui/vaultwizardbase.h
View file @
dbe85a8a
...
...
@@ -145,7 +145,7 @@ public:
// previously collected data to it
auto
collectedPayload
=
firstStepModule
==
module
?
PlasmaVault
::
Vault
::
Payload
{}
:
firstStepModule
->
fields
();
for
(
const
auto
*
module
:
currentStepModules
)
{
collectedPayload
.
unite
(
module
->
fields
());
collectedPayload
.
insert
(
module
->
fields
());
}
currentModule
->
init
(
collectedPayload
);
}
...
...
plasma/vaultapplet.cpp
View file @
dbe85a8a
...
...
@@ -13,8 +13,8 @@
#include
"vaultsmodel.h"
VaultApplet
::
VaultApplet
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
Plasma
::
Applet
(
parent
,
args
)
VaultApplet
::
VaultApplet
(
QObject
*
parent
,
const
KPluginMetaData
&
data
,
const
QVariantList
&
args
)
:
Plasma
::
Applet
(
parent
,
data
,
args
)
{
}
...
...
plasma/vaultapplet.h
View file @
dbe85a8a
...
...
@@ -19,7 +19,7 @@ class VaultApplet : public Plasma::Applet
Q_PROPERTY
(
QObject
*
vaultsModel
READ
vaultsModel
CONSTANT
)
public:
explicit
VaultApplet
(
QObject
*
parent
,
const
QVariantList
&
args
);
explicit
VaultApplet
(
QObject
*
parent
,
const
KPluginMetaData
&
data
,
const
QVariantList
&
args
);
~
VaultApplet
()
override
;
QObject
*
vaultsModel
();
...
...
plasma/vaultsmodel.cpp
View file @
dbe85a8a
...
...
@@ -360,8 +360,11 @@ bool SortedVaultsModelProxy::lessThan(const QModelIndex &left, const QModelIndex
{
const
auto
leftData
=
sourceModel
()
->
data
(
left
,
VaultsModel
::
VaultName
);
const
auto
rightData
=
sourceModel
()
->
data
(
right
,
VaultsModel
::
VaultName
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
return
leftData
<
rightData
;
#else
return
QPartialOrdering
::
Less
==
QVariant
::
compare
(
leftData
,
rightData
);
#endif
}
bool
SortedVaultsModelProxy
::
filterAcceptsRow
(
int
sourceRow
,
const
QModelIndex
&
sourceParent
)
const
...
...
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