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
PIM
KDE PIM Runtime
Commits
b7a26f3b
Commit
b7a26f3b
authored
Sep 14, 2022
by
Laurent Montel
Browse files
const'ify + use QStringLiteral + remove SLOT usage when not necessary
parent
f0de6e61
Pipeline
#231780
failed with stage
in 10 minutes and 26 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
resources/imap/gmailpasswordrequester.h
View file @
b7a26f3b
...
...
@@ -27,10 +27,8 @@ public:
void
requestPassword
(
RequestType
request
,
const
QString
&
serverError
)
override
;
void
cancelPasswordRequests
()
override
;
private
Q_SLOTS
:
void
onTokenRequestFinished
(
KGAPI2
::
AccountPromise
*
promise
);
private:
void
onTokenRequestFinished
(
KGAPI2
::
AccountPromise
*
promise
);
ImapResourceBase
*
const
mResource
;
QPointer
<
KGAPI2
::
AccountPromise
>
mPendingPromise
;
};
resources/imap/imapresource.cpp
View file @
b7a26f3b
...
...
@@ -51,7 +51,7 @@ QString ImapResource::defaultName() const
QByteArray
ImapResource
::
clientId
()
const
{
return
"Kontact IMAP Resource"
;
return
QByteArrayLiteral
(
"Kontact IMAP Resource"
)
;
}
QDialog
*
ImapResource
::
createConfigureDialog
(
WId
windowId
)
...
...
resources/imap/imapresource.h
View file @
b7a26f3b
...
...
@@ -28,6 +28,6 @@ protected:
QString
defaultName
()
const
override
;
QByteArray
clientId
()
const
override
;
private
Q_SLOTS
:
private:
void
onConfigurationDone
(
int
result
);
};
resources/imap/imapresourcebase.cpp
View file @
b7a26f3b
...
...
@@ -85,7 +85,6 @@ ImapResourceBase::ImapResourceBase(const QString &id)
:
ResourceBase
(
id
)
,
m_pool
(
new
SessionPool
(
2
,
this
))
,
m_settings
(
nullptr
)
,
m_idle
(
nullptr
)
{
QTimer
::
singleShot
(
0
,
this
,
&
ImapResourceBase
::
updateResourceName
);
...
...
resources/imap/removecollectionrecursivetask.cpp
View file @
b7a26f3b
...
...
@@ -46,7 +46,7 @@ void RemoveCollectionRecursiveTask::onMailBoxesReceived(const QList<KIMAP::MailB
// we use a map here that has the level of nesting as key.
QMultiMap
<
int
,
KIMAP
::
MailBoxDescriptor
>
foldersToDelete
;
for
(
int
i
=
0
;
i
<
descriptors
.
size
();
++
i
)
{
for
(
int
i
=
0
,
total
=
descriptors
.
size
();
i
<
total
;
++
i
)
{
const
KIMAP
::
MailBoxDescriptor
descriptor
=
descriptors
[
i
];
if
(
descriptor
.
name
==
mailBox
||
descriptor
.
name
.
startsWith
(
mailBox
+
descriptor
.
separator
))
{
// a sub folder to delete
...
...
resources/imap/settingspasswordrequester.h
View file @
b7a26f3b
...
...
@@ -27,12 +27,12 @@ private Q_SLOTS:
void
askUserInput
(
const
QString
&
serverError
);
void
onPasswordRequestCompleted
(
const
QString
&
password
,
bool
userRejected
);
void
onDialogDestroyed
();
void
slotCancelClicked
();
void
slotYesClicked
();
void
slotNoClicked
();
void
onSettingsDialogFinished
(
int
result
);
private:
void
slotCancelClicked
();
void
slotYesClicked
();
void
slotNoClicked
();
QString
requestManualAuth
(
bool
*
userRejected
);
ImapResourceBase
*
const
m_resource
;
...
...
resources/imap/setupserver.h
View file @
b7a26f3b
...
...
@@ -56,7 +56,7 @@ public:
Q_REQUIRED_RESULT
bool
shouldClearCache
()
const
;
private
Q_SLOTS
:
private:
/**
* Call this if you want the settings saved from this page.
*/
...
...
@@ -65,8 +65,6 @@ private Q_SLOTS:
void
slotEncryptionRadioChanged
();
void
slotSubcriptionCheckboxChanged
();
void
slotShowServerInfo
();
private:
void
readSettings
();
void
populateDefaultAuthenticationOptions
();
...
...
resources/imap/tests/testsubscriptiondialog.cpp
View file @
b7a26f3b
...
...
@@ -20,10 +20,10 @@ int main(int argc, char **argv)
return
1
;
}
QString
server
=
app
.
arguments
().
at
(
1
);
int
port
=
app
.
arguments
().
at
(
2
).
toInt
();
QString
user
=
app
.
arguments
().
at
(
3
);
QString
password
=
app
.
arguments
().
at
(
4
);
const
QString
server
=
app
.
arguments
().
at
(
1
);
const
int
port
=
app
.
arguments
().
at
(
2
).
toInt
();
const
QString
user
=
app
.
arguments
().
at
(
3
);
const
QString
password
=
app
.
arguments
().
at
(
4
);
qDebug
()
<<
"Querying:"
<<
server
<<
port
<<
user
<<
password
;
qDebug
();
...
...
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