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
KMail Account Wizard
Commits
742cea84
Commit
742cea84
authored
Jan 24, 2021
by
Laurent Montel
😁
Browse files
modernize code
parent
baa4a9aa
Pipeline
#48549
failed with stage
in 11 minutes and 15 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dialog.cpp
View file @
742cea84
...
...
@@ -93,7 +93,7 @@ Dialog::Dialog(QWidget *parent)
//TODO ? necessary ???
Q_EMIT
page
->
pageEnteredNext
();
connect
(
button
(
QDialogButtonBox
::
Cancel
),
&
QPushButton
::
clicked
,
this
,
&
Dialog
::
reject
);
KHelpMenu
*
helpMenu
=
new
KHelpMenu
(
this
,
KAboutData
::
applicationData
(),
true
);
auto
*
helpMenu
=
new
KHelpMenu
(
this
,
KAboutData
::
applicationData
(),
true
);
//Initialize menu
QMenu
*
menu
=
helpMenu
->
menu
();
helpMenu
->
action
(
KHelpMenu
::
menuAboutApp
)
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"akonadi"
)));
...
...
@@ -153,7 +153,7 @@ void Dialog::slotBackOk()
QObject
*
Dialog
::
addPage
(
const
QString
&
uiFile
,
const
QString
&
title
)
{
qCDebug
(
ACCOUNTWIZARD_LOG
)
<<
uiFile
;
DynamicPage
*
page
=
new
DynamicPage
(
Global
::
assistantBasePath
()
+
uiFile
,
this
);
auto
*
page
=
new
DynamicPage
(
Global
::
assistantBasePath
()
+
uiFile
,
this
);
connect
(
page
,
&
DynamicPage
::
leavePageNextOk
,
this
,
&
Dialog
::
slotNextOk
);
connect
(
page
,
&
DynamicPage
::
leavePageBackOk
,
this
,
&
Dialog
::
slotBackOk
);
KPageWidgetItem
*
item
=
insertPage
(
mLastPage
,
page
,
title
);
...
...
src/ldap.cpp
View file @
742cea84
...
...
@@ -160,7 +160,7 @@ void Ldap::edit()
KLDAP
::
LdapClientSearchConfig
clientSearchConfig
;
KConfigGroup
group
=
clientSearchConfig
.
config
()
->
group
(
QStringLiteral
(
"LDAP"
));
KLDAP
::
LdapClientSearchConfigReadConfigJob
*
job
=
new
KLDAP
::
LdapClientSearchConfigReadConfigJob
(
this
);
auto
*
job
=
new
KLDAP
::
LdapClientSearchConfigReadConfigJob
(
this
);
connect
(
job
,
&
KLDAP
::
LdapClientSearchConfigReadConfigJob
::
configLoaded
,
this
,
[
this
,
group
](
KLDAP
::
LdapServer
server
)
{
KLDAP
::
AddHostDialog
dlg
(
&
server
,
nullptr
);
...
...
src/loadpage.cpp
View file @
742cea84
...
...
@@ -43,7 +43,7 @@ void LoadPage::enterPageNext()
ui
.
statusLabel
->
setText
(
i18n
(
"Loading script '%1'..."
,
Global
::
assistantBasePath
()
+
scriptFile
));
m_action
=
new
Kross
::
Action
(
this
,
QStringLiteral
(
"AccountWizard"
));
typedef
QPair
<
QObject
*
,
QString
>
ObjectStringPair
;
using
ObjectStringPair
=
QPair
<
QObject
*
,
QString
>
;
for
(
const
ObjectStringPair
&
exportedObject
:
qAsConst
(
m_exportedObjects
))
{
m_action
->
addQObject
(
exportedObject
.
first
,
exportedObject
.
second
);
}
...
...
src/providerpage.cpp
View file @
742cea84
...
...
@@ -69,7 +69,7 @@ void ProviderPage::fillModel(const KNSCore::EntryInternal::List &list)
for
(
const
KNSCore
::
EntryInternal
&
e
:
list
)
{
qCDebug
(
ACCOUNTWIZARD_LOG
)
<<
"Found Entry: "
<<
e
.
name
();
QStandardItem
*
item
=
new
QStandardItem
(
e
.
name
());
auto
*
item
=
new
QStandardItem
(
e
.
name
());
item
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
item
->
setData
(
e
.
name
(),
Qt
::
ToolTipRole
);
item
->
setData
(
e
.
uniqueId
(),
Qt
::
UserRole
);
...
...
src/typepage.cpp
View file @
742cea84
...
...
@@ -86,7 +86,7 @@ TypePage::TypePage(KAssistantDialog *parent)
continue
;
}
}
QStandardItem
*
item
=
new
QStandardItem
(
f
.
readName
());
auto
*
item
=
new
QStandardItem
(
f
.
readName
());
item
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
item
->
setData
(
entry
,
Qt
::
UserRole
);
if
(
!
f
.
readIcon
().
isEmpty
())
{
...
...
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