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
libksieve
Commits
8268bcc1
Commit
8268bcc1
authored
Sep 10, 2020
by
Laurent Montel
😁
Browse files
Modernize code
parent
1c0d57ab
Pipeline
#33746
passed with stage
in 17 minutes and 8 seconds
Changes
26
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/kmanagesieve/response.h
View file @
8268bcc1
...
...
@@ -25,8 +25,6 @@ public:
};
Response
()
:
m_type
(
None
)
,
m_quantity
(
0
)
{
}
...
...
@@ -51,8 +49,8 @@ public:
bool
parseResponse
(
const
QByteArray
&
line
);
private:
Type
m_type
;
uint
m_quantity
;
Type
m_type
=
None
;
uint
m_quantity
=
0
;
QByteArray
m_key
;
QByteArray
m_value
;
QByteArray
m_extra
;
...
...
src/kmanagesieve/session.cpp
View file @
8268bcc1
...
...
@@ -29,11 +29,6 @@ Q_DECLARE_METATYPE(KSslErrorUiData)
Session
::
Session
(
QObject
*
parent
)
:
QObject
(
parent
)
,
m_thread
(
new
SessionThread
(
this
))
,
m_currentJob
(
nullptr
)
,
m_state
(
None
)
,
m_supportsStartTls
(
false
)
,
m_connected
(
false
)
,
m_disconnected
(
true
)
{
qRegisterMetaType
<
KManageSieve
::
AuthDetails
>
();
qRegisterMetaType
<
KManageSieve
::
Response
>
();
...
...
src/kmanagesieve/session.h
View file @
8268bcc1
...
...
@@ -46,7 +46,7 @@ public:
void
killJob
(
SieveJob
*
job
,
KJob
::
KillVerbosity
verbosity
);
void
sendData
(
const
QByteArray
&
data
);
QStringList
sieveExtensions
()
const
;
Q_REQUIRED_RESULT
QStringList
sieveExtensions
()
const
;
/**
* @return true if we are not connected nor currently connecting, i.e. it's ok to call connectToHost()
...
...
@@ -54,15 +54,15 @@ public:
bool
disconnected
()
const
;
private:
bool
requestCapabilitiesAfterStartTls
()
const
;
Q_REQUIRED_RESULT
bool
requestCapabilitiesAfterStartTls
()
const
;
QStringList
requestedSaslMethod
()
const
;
bool
allowUnencrypted
()
const
;
Q_REQUIRED_RESULT
QStringList
requestedSaslMethod
()
const
;
Q_REQUIRED_RESULT
bool
allowUnencrypted
()
const
;
private
Q_SLOTS
:
void
setErrorMessage
(
int
error
,
const
QString
&
msg
);
void
processResponse
(
const
KManageSieve
::
Response
&
response
,
const
QByteArray
&
data
);
KManageSieve
::
AuthDetails
requestAuthDetails
(
const
QUrl
&
url
);
Q_REQUIRED_RESULT
KManageSieve
::
AuthDetails
requestAuthDetails
(
const
QUrl
&
url
);
void
authenticationDone
();
void
sslError
(
const
KSslErrorUiData
&
data
);
void
sslDone
();
...
...
@@ -85,10 +85,10 @@ private:
StartTls
,
Authenticating
};
State
m_state
;
State
m_state
=
None
;
bool
m_supportsStartTls
=
false
;
bool
m_connected
=
false
;
bool
m_disconnected
=
fals
e
;
bool
m_disconnected
=
tru
e
;
friend
class
SessionThread
;
};
...
...
src/kmanagesieve/sessionthread.cpp
View file @
8268bcc1
...
...
@@ -36,10 +36,6 @@ static const sasl_callback_t callbacks[] = {
SessionThread
::
SessionThread
(
Session
*
session
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_session
(
session
)
,
m_sasl_conn
(
nullptr
)
,
m_sasl_client_interact
(
nullptr
)
,
m_pendingQuantity
(
-
1
)
,
m_sslCheck
(
nullptr
)
{
static
bool
saslInitialized
=
false
;
if
(
!
saslInitialized
)
{
...
...
src/kmanagesieve/sessionthread_p.h
View file @
8268bcc1
...
...
@@ -84,7 +84,7 @@ private:
QByteArray
m_data
;
Response
m_lastResponse
;
qint64
m_pendingQuantity
;
qint64
m_pendingQuantity
=
-
1
;
QTimer
*
m_sslCheck
=
nullptr
;
};
...
...
src/ksieveui/autocreatescripts/commonwidgets/sievecommonactioncondition.h
View file @
8268bcc1
...
...
@@ -54,8 +54,8 @@ Q_SIGNALS:
private:
Q_DISABLE_COPY
(
SieveCommonActionCondition
)
QString
mName
;
QString
mLabel
;
const
QString
mName
;
const
QString
mLabel
;
QString
mComment
;
};
}
...
...
src/ksieveui/autocreatescripts/sieveactionwidgetlister.h
View file @
8268bcc1
...
...
@@ -85,7 +85,7 @@ private:
void
reconnectWidget
(
SieveActionWidget
*
w
);
void
updateAddRemoveButton
();
SieveEditorGraphicalModeWidget
*
mSieveGraphicalModeWidget
=
nullptr
;
SieveEditorGraphicalModeWidget
*
const
mSieveGraphicalModeWidget
;
};
}
...
...
src/ksieveui/autocreatescripts/sievescriptblockwidget.cpp
View file @
8268bcc1
...
...
@@ -26,7 +26,6 @@ using namespace KSieveUi;
SieveScriptBlockWidget
::
SieveScriptBlockWidget
(
SieveEditorGraphicalModeWidget
*
graphicalModeWidget
,
QWidget
*
parent
)
:
SieveWidgetPageAbstract
(
parent
)
,
mMatchCondition
(
AndCondition
)
,
mSieveGraphicalModeWidget
(
graphicalModeWidget
)
{
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
...
...
src/ksieveui/autocreatescripts/sievescriptblockwidget.h
View file @
8268bcc1
...
...
@@ -52,7 +52,7 @@ private:
void
slotAddBlock
();
void
updateWidget
();
void
updateCondition
();
MatchCondition
mMatchCondition
;
MatchCondition
mMatchCondition
=
AndCondition
;
QGroupBox
*
mConditions
=
nullptr
;
SieveEditorGraphicalModeWidget
*
const
mSieveGraphicalModeWidget
;
SieveConditionWidgetLister
*
mScriptConditionLister
=
nullptr
;
...
...
src/ksieveui/editor/webengine/sieveeditorhelphtmlwidget.cpp
View file @
8268bcc1
...
...
@@ -23,7 +23,6 @@ qreal zoomBy()
}
SieveEditorHelpHtmlWidget
::
SieveEditorHelpHtmlWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mZoomFactor
(
100
)
{
QVBoxLayout
*
lay
=
new
QVBoxLayout
(
this
);
lay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
src/ksieveui/editor/webengine/sieveeditorhelphtmlwidget.h
View file @
8268bcc1
...
...
@@ -57,7 +57,7 @@ private:
SieveEditorLoadProgressIndicator
*
mProgressIndicator
=
nullptr
;
KPIMTextEdit
::
SlideContainer
*
mSliderContainer
=
nullptr
;
KSieveUi
::
FindBarWebEngineView
*
mFindBar
=
nullptr
;
qreal
mZoomFactor
;
qreal
mZoomFactor
=
100
;
};
}
...
...
src/ksieveui/editor/webengine/sieveeditorloadprogressindicator.cpp
View file @
8268bcc1
...
...
@@ -12,7 +12,6 @@
using
namespace
KSieveUi
;
SieveEditorLoadProgressIndicator
::
SieveEditorLoadProgressIndicator
(
QObject
*
parent
)
:
QObject
(
parent
)
,
mProgressCount
(
0
)
{
mProgressPix
=
KIconLoader
::
global
()
->
loadPixmapSequence
(
QStringLiteral
(
"process-working"
),
KIconLoader
::
SizeSmallMedium
);
mProgressTimer
=
new
QTimer
(
this
);
...
...
src/ksieveui/editor/webengine/sieveeditorloadprogressindicator.h
View file @
8268bcc1
...
...
@@ -27,7 +27,7 @@ Q_SIGNALS:
private:
Q_DISABLE_COPY
(
SieveEditorLoadProgressIndicator
)
void
slotTimerDone
();
int
mProgressCount
;
int
mProgressCount
=
0
;
KPixmapSequence
mProgressPix
;
QTimer
*
mProgressTimer
=
nullptr
;
};
...
...
src/ksieveui/managescriptsjob/checkscriptjob.cpp
View file @
8268bcc1
...
...
@@ -15,15 +15,10 @@ using namespace KSieveUi;
class
KSieveUi
::
CheckScriptJobPrivate
{
public:
CheckScriptJobPrivate
()
:
mIsActive
(
false
)
{
}
QUrl
mUrl
;
QString
mOriginalScript
;
QString
mCurrentScript
;
bool
mIsActive
;
bool
mIsActive
=
false
;
};
CheckScriptJob
::
CheckScriptJob
(
QObject
*
parent
)
...
...
src/ksieveui/managescriptsjob/generateglobalscriptjob.h
View file @
8268bcc1
...
...
@@ -38,7 +38,7 @@ private:
void
writeMasterScript
();
void
writeUserScript
();
QStringList
mListUserActiveScripts
;
QUrl
mCurrentUrl
;
const
QUrl
mCurrentUrl
;
KManageSieve
::
SieveJob
*
mMasterJob
=
nullptr
;
KManageSieve
::
SieveJob
*
mUserJob
=
nullptr
;
};
...
...
src/ksieveui/managescriptsjob/parseuserscriptjob.h
View file @
8268bcc1
...
...
@@ -43,9 +43,9 @@ private:
void
slotGetResult
(
KManageSieve
::
SieveJob
*
job
,
bool
,
const
QString
&
,
bool
);
void
emitSuccess
(
const
QStringList
&
activeScriptList
);
void
emitError
(
const
QString
&
msgError
);
QString
loadInclude
();
QStringList
extractActiveScript
(
const
QString
&
doc
);
QUrl
mCurrentUrl
;
Q_REQUIRED_RESULT
QString
loadInclude
();
Q_REQUIRED_RESULT
QStringList
extractActiveScript
(
const
QString
&
doc
);
const
QUrl
mCurrentUrl
;
KManageSieve
::
SieveJob
*
mSieveJob
=
nullptr
;
QXmlStreamReader
*
mStreamReader
=
nullptr
;
QStringList
mActiveScripts
;
...
...
src/ksieveui/managescriptsjob/renamescriptjob.cpp
View file @
8268bcc1
...
...
@@ -13,15 +13,10 @@ using namespace KSieveUi;
class
KSieveUi
::
RenameScriptJobPrivate
{
public:
RenameScriptJobPrivate
()
:
mIsActive
(
false
)
{
}
QString
mNewName
;
QUrl
mOldUrl
;
QUrl
mNewUrl
;
bool
mIsActive
;
bool
mIsActive
=
false
;
};
RenameScriptJob
::
RenameScriptJob
(
QObject
*
parent
)
...
...
src/ksieveui/sieveimapinstance/sieveimapinstance.cpp
View file @
8268bcc1
...
...
@@ -7,7 +7,6 @@
#include "sieveimapinstance.h"
using
namespace
KSieveUi
;
SieveImapInstance
::
SieveImapInstance
()
:
mStatus
(
Idle
)
{
}
...
...
src/ksieveui/sieveimapinstance/sieveimapinstance.h
View file @
8268bcc1
...
...
@@ -50,7 +50,7 @@ private:
QStringList
mCapabilities
;
QString
mName
;
QString
mIdentifier
;
Status
mStatus
;
Status
mStatus
=
Idle
;
};
}
Q_DECLARE_TYPEINFO
(
KSieveUi
::
SieveImapInstance
,
Q_MOVABLE_TYPE
);
...
...
src/ksieveui/vacation/vacationcheckjob.h
View file @
8268bcc1
...
...
@@ -50,8 +50,8 @@ private:
QStringList
mActiveScripts
;
QStringList
mSieveCapabilities
;
QString
mScript
;
QString
mServerName
;
QUrl
mUrl
;
const
QString
mServerName
;
const
QUrl
mUrl
;
KManageSieve
::
SieveJob
*
mSieveJob
=
nullptr
;
ParseUserScriptJob
*
mParseJob
=
nullptr
;
int
mScriptPos
=
-
1
;
...
...
Prev
1
2
Next
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