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
Utilities
KGpg
Commits
ff28cfc1
Commit
ff28cfc1
authored
Sep 16, 2020
by
Laurent Montel
😁
Browse files
Port deprecated method
parent
1b212054
Changes
7
Hide whitespace changes
Inline
Side-by-side
core/KGpgRootNode.cpp
View file @
ff28cfc1
...
...
@@ -62,7 +62,11 @@ KGpgRootNode::addGroups(const QStringList &groups)
if
(
parts
.
count
()
<
2
)
continue
;
const
QString
groupName
=
parts
.
first
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
new
KGpgGroupNode
(
this
,
groupName
,
parts
.
at
(
1
).
split
(
QLatin1Char
(
';'
),
QString
::
SkipEmptyParts
));
#else
new
KGpgGroupNode
(
this
,
groupName
,
parts
.
at
(
1
).
split
(
QLatin1Char
(
';'
),
Qt
::
SkipEmptyParts
));
#endif
}
}
...
...
editor/kgpgtextedit.cpp
View file @
ff28cfc1
...
...
@@ -187,7 +187,11 @@ void KgpgTextEdit::slotEncode()
if
(
KGpgSettings
::
allowCustomEncryptionOptions
())
{
const
QString
customoptions
=
dialog
->
getCustomOptions
();
if
(
!
customoptions
.
isEmpty
())
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
options
<<
customoptions
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
options
<<
customoptions
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
}
if
(
KGpgSettings
::
pgpCompatibility
())
...
...
keysmanager.cpp
View file @
ff28cfc1
...
...
@@ -2731,7 +2731,11 @@ KeysManager::clipEncrypt()
QStringList
options
;
if
(
!
dialog
->
getCustomOptions
().
isEmpty
()
&&
KGpgSettings
::
allowCustomEncryptionOptions
())
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
options
=
dialog
->
getCustomOptions
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
options
=
dialog
->
getCustomOptions
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
if
(
dialog
->
getUntrusted
())
encOptions
|=
KGpgEncrypt
::
AllowUntrustedEncryption
;
...
...
@@ -2822,7 +2826,7 @@ KeysManager::clipDecrypt()
return
;
}
KgpgEditor
*
kgpgtxtedit
=
new
KgpgEditor
(
this
,
imodel
,
nullptr
);
KgpgEditor
*
kgpgtxtedit
=
new
KgpgEditor
(
this
,
imodel
,
{}
);
kgpgtxtedit
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
connect
(
this
,
&
KeysManager
::
fontChanged
,
kgpgtxtedit
,
&
KgpgEditor
::
slotSetFont
);
kgpgtxtedit
->
m_editor
->
setPlainText
(
cliptext
);
...
...
@@ -2840,7 +2844,7 @@ KeysManager::clipSign()
return
;
}
KgpgEditor
*
kgpgtxtedit
=
new
KgpgEditor
(
this
,
imodel
,
nullptr
);
KgpgEditor
*
kgpgtxtedit
=
new
KgpgEditor
(
this
,
imodel
,
{}
);
kgpgtxtedit
->
setAttribute
(
Qt
::
WA_DeleteOnClose
);
connect
(
kgpgtxtedit
->
m_editor
,
&
KgpgTextEdit
::
verifyFinished
,
kgpgtxtedit
,
&
KgpgEditor
::
closeWindow
);
...
...
kgpgexternalactions.cpp
View file @
ff28cfc1
...
...
@@ -105,7 +105,11 @@ void KGpgExternalActions::slotEncryptionKeySelected()
const
QString
customopts
(
dialog
->
getCustomOptions
().
isEmpty
());
if
(
!
customopts
.
isEmpty
())
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
opts
<<
customopts
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
opts
<<
customopts
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
}
QStringList
keys
=
dialog
->
selectedKeys
();
...
...
@@ -181,7 +185,11 @@ void KGpgExternalActions::startFolderEncode()
QStringList
selec
=
dialog
->
selectedKeys
();
KGpgEncrypt
::
EncryptOptions
encOptions
=
KGpgEncrypt
::
DefaultEncryption
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
encryptOptions
=
dialog
->
getCustomOptions
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
encryptOptions
=
dialog
->
getCustomOptions
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
if
(
dialog
->
getSymmetric
())
{
selec
.
clear
();
}
else
{
...
...
transactions/kgpgdecrypt.cpp
View file @
ff28cfc1
...
...
@@ -54,7 +54,11 @@ KGpgDecrypt::command() const
if
(
!
m_outFilename
.
isEmpty
())
ret
<<
QLatin1String
(
"-o"
)
<<
m_outFilename
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
ret
<<
KGpgSettings
::
customDecrypt
().
simplified
().
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
ret
<<
KGpgSettings
::
customDecrypt
().
simplified
().
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
return
ret
;
}
...
...
transactions/kgpgtransactionprivate.cpp
View file @
ff28cfc1
...
...
@@ -324,7 +324,11 @@ bool KGpgTransactionPrivate::keyConsidered(const QString& line)
if
(
!
line
.
startsWith
(
QLatin1String
(
"[GNUPG:] KEY_CONSIDERED "
)))
return
false
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
&
parts
=
line
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
&
parts
=
line
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
if
(
parts
.
count
()
<
3
)
m_parent
->
setSuccess
(
KGpgTransaction
::
TS_MSG_SEQUENCE
);
else
if
(
!
m_expectedFingerprints
.
isEmpty
()
&&
...
...
transactions/kgpgverify.cpp
View file @
ff28cfc1
...
...
@@ -122,7 +122,11 @@ KGpgVerify::getReport(const QStringList &log, const KGpgItemModel *model)
// VALIDSIG <fingerprint in hex> <sig_creation_date> <sig-timestamp>
// <expire-timestamp> <sig-version> <reserved> <pubkey-algo>
// <hash-algo> <sig-class> <primary-key-fpr>
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
vsig
=
msg
.
mid
(
9
).
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
vsig
=
msg
.
mid
(
9
).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
Q_ASSERT
(
vsig
.
count
()
>=
10
);
const
KGpgKeyNode
*
node
=
model
->
findKeyNode
(
vsig
[
9
]);
...
...
Write
Preview
Supports
Markdown
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