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
PIM
KIMAP
Commits
e71eaefd
Commit
e71eaefd
authored
Sep 10, 2020
by
Laurent Montel
😁
Browse files
Modernize code
parent
b851abc5
Pipeline
#33775
passed with stage
in 18 minutes and 51 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/appendjob.cpp
View file @
e71eaefd
...
...
@@ -19,14 +19,14 @@ namespace KIMAP
class
AppendJobPrivate
:
public
JobPrivate
{
public:
AppendJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
)
,
uid
(
0
)
{
}
AppendJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
)
{
}
~
AppendJobPrivate
()
{
}
QString
mailBox
;
QList
<
QByteArray
>
flags
;
QDateTime
internalDate
;
QByteArray
content
;
qint64
uid
;
qint64
uid
=
0
;
};
}
...
...
src/copyjob.cpp
View file @
e71eaefd
...
...
@@ -20,12 +20,12 @@ namespace KIMAP
class
CopyJobPrivate
:
public
JobPrivate
{
public:
CopyJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
)
,
uidBased
(
false
)
{
}
CopyJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
)
{
}
~
CopyJobPrivate
()
{
}
QString
mailBox
;
ImapSet
set
;
bool
uidBased
;
bool
uidBased
=
false
;
ImapSet
resultingUids
;
};
}
...
...
src/fetchjob.cpp
View file @
e71eaefd
...
...
@@ -23,8 +23,6 @@ public:
FetchJobPrivate
(
FetchJob
*
job
,
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
)
,
q
(
job
)
,
uidBased
(
false
)
,
gmailEnabled
(
false
)
{
}
~
FetchJobPrivate
()
...
...
@@ -80,10 +78,10 @@ public:
FetchJob
*
const
q
;
ImapSet
set
;
bool
uidBased
;
bool
uidBased
=
false
;
FetchJob
::
FetchScope
scope
;
QString
selectedMailBox
;
bool
gmailEnabled
;
bool
gmailEnabled
=
false
;
QTimer
emitPendingsTimer
;
QMap
<
qint64
,
MessagePtr
>
pendingMessages
;
...
...
src/getmetadatajob.cpp
View file @
e71eaefd
...
...
@@ -19,10 +19,10 @@ namespace KIMAP
class
GetMetaDataJobPrivate
:
public
MetaDataJobBasePrivate
{
public:
GetMetaDataJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
MetaDataJobBasePrivate
(
session
,
name
),
maxSize
(
-
1
),
depth
(
"0"
)
{
}
GetMetaDataJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
MetaDataJobBasePrivate
(
session
,
name
),
depth
(
"0"
)
{
}
~
GetMetaDataJobPrivate
()
{
}
qint64
maxSize
;
qint64
maxSize
=
-
1
;
QByteArray
depth
;
QSet
<
QByteArray
>
entries
;
QSet
<
QByteArray
>
attributes
;
...
...
src/idlejob.cpp
View file @
e71eaefd
...
...
@@ -19,10 +19,7 @@ class IdleJobPrivate : public JobPrivate
{
public:
IdleJobPrivate
(
IdleJob
*
job
,
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
),
q
(
job
),
messageCount
(
-
1
),
recentCount
(
-
1
),
lastMessageCount
(
-
1
),
lastRecentCount
(
-
1
),
originalSocketTimeout
(
-
1
)
{
}
:
JobPrivate
(
session
,
name
),
q
(
job
)
{
}
~
IdleJobPrivate
()
{
}
void
emitStats
()
...
...
@@ -48,13 +45,13 @@ public:
QTimer
emitStatsTimer
;
int
messageCount
;
int
recentCount
;
int
messageCount
=
-
1
;
int
recentCount
=
-
1
;
int
lastMessageCount
;
int
lastRecentCount
;
int
lastMessageCount
=
-
1
;
int
lastRecentCount
=
-
1
;
int
originalSocketTimeout
;
int
originalSocketTimeout
=
-
1
;
};
}
...
...
src/loginjob.cpp
View file @
e71eaefd
...
...
@@ -62,7 +62,7 @@ public:
void
sslResponse
(
bool
response
);
void
saveServerGreeting
(
const
Response
&
response
);
LoginJob
*
q
;
LoginJob
*
const
q
;
QString
userName
;
QString
authorizationName
;
...
...
src/movejob.cpp
View file @
e71eaefd
...
...
@@ -22,7 +22,6 @@ class MoveJobPrivate : public JobPrivate
public:
MoveJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
)
,
uidBased
(
false
)
{}
~
MoveJobPrivate
()
...
...
@@ -31,7 +30,7 @@ public:
QString
mailBox
;
ImapSet
set
;
ImapSet
resultingUids
;
bool
uidBased
;
bool
uidBased
=
false
;
};
}
...
...
src/selectjob.cpp
View file @
e71eaefd
...
...
@@ -20,23 +20,21 @@ class SelectJobPrivate : public JobPrivate
{
public:
SelectJobPrivate
(
Session
*
session
,
const
QString
&
name
)
:
JobPrivate
(
session
,
name
),
readOnly
(
false
),
messageCount
(
-
1
),
recentCount
(
-
1
),
firstUnseenIndex
(
-
1
),
uidValidity
(
-
1
),
nextUid
(
-
1
),
highestmodseq
(
0
),
condstoreEnabled
(
false
)
{
}
:
JobPrivate
(
session
,
name
)
{
}
~
SelectJobPrivate
()
{
}
QString
mailBox
;
bool
readOnly
;
bool
readOnly
=
false
;
QList
<
QByteArray
>
flags
;
QList
<
QByteArray
>
permanentFlags
;
int
messageCount
;
int
recentCount
;
int
firstUnseenIndex
;
qint64
uidValidity
;
qint64
nextUid
;
quint64
highestmodseq
;
bool
condstoreEnabled
;
int
messageCount
=
-
1
;
int
recentCount
=
-
1
;
int
firstUnseenIndex
=
-
1
;
qint64
uidValidity
=
-
1
;
qint64
nextUid
=
-
1
;
quint64
highestmodseq
=
0
;
bool
condstoreEnabled
=
false
;
};
}
...
...
src/sessionlogger.cpp
View file @
e71eaefd
...
...
@@ -13,7 +13,6 @@
using
namespace
KIMAP
;
SessionLogger
::
SessionLogger
()
:
m_id
(
0
)
{
static
qint64
nextId
=
0
;
m_id
=
++
nextId
;
...
...
src/sessionlogger_p.h
View file @
e71eaefd
...
...
@@ -27,7 +27,7 @@ public:
private:
Q_DISABLE_COPY
(
SessionLogger
)
qint64
m_id
;
qint64
m_id
=
0
;
QFile
m_file
;
};
...
...
src/sessionthread.cpp
View file @
e71eaefd
...
...
@@ -27,9 +27,7 @@ static const int _kimap_sslErrorUiData = qRegisterMetaType<KSslErrorUiData>();
}
SessionThread
::
SessionThread
(
const
QString
&
hostName
,
quint16
port
)
:
QObject
(),
m_hostName
(
hostName
),
m_port
(
port
),
m_encryptedMode
(
false
),
m_useProxy
(
false
)
:
QObject
(),
m_hostName
(
hostName
),
m_port
(
port
)
{
// Just like the Qt docs now recommend, for event-driven threads:
// don't derive from QThread, create one directly and move the object to it.
...
...
Write
Preview
Markdown
is supported
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