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
KLDAP
Commits
18cf88c3
Commit
18cf88c3
authored
Feb 04, 2021
by
Laurent Montel
😁
Browse files
Use auto vs auto * where it's possible
parent
1db6f10c
Pipeline
#49709
skipped
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/addhostdialog.cpp
View file @
18cf88c3
...
...
@@ -62,7 +62,7 @@ AddHostDialog::AddHostDialog(KLDAP::LdapServer *server, QWidget *parent)
,
d
(
new
KLDAP
::
AddHostDialogPrivate
(
this
))
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Add Host"
));
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
auto
mainLayout
=
new
QVBoxLayout
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
d
->
mOkButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
d
->
mOkButton
->
setDefault
(
true
);
...
...
@@ -76,7 +76,7 @@ AddHostDialog::AddHostDialog(KLDAP::LdapServer *server, QWidget *parent)
QWidget
*
page
=
new
QWidget
(
this
);
mainLayout
->
addWidget
(
page
);
mainLayout
->
addWidget
(
buttonBox
);
auto
*
layout
=
new
QHBoxLayout
(
page
);
auto
layout
=
new
QHBoxLayout
(
page
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
d
->
mCfg
=
new
KLDAP
::
LdapConfigWidget
(
KLDAP
::
LdapConfigWidget
::
W_USER
|
KLDAP
::
LdapConfigWidget
::
W_PASS
|
KLDAP
::
LdapConfigWidget
::
W_BINDDN
...
...
src/widgets/ldapclientsearch.cpp
View file @
18cf88c3
...
...
@@ -175,7 +175,7 @@ void LdapClientSearch::Private::readConfig()
mNoLDAPLookup
=
true
;
}
else
{
for
(
int
j
=
0
;
j
<
numHosts
;
++
j
)
{
auto
*
ldapClient
=
new
LdapClient
(
j
,
q
);
auto
ldapClient
=
new
LdapClient
(
j
,
q
);
auto
job
=
new
LdapSearchClientReadConfigServerJob
;
job
->
setCurrentIndex
(
j
);
job
->
setActive
(
true
);
...
...
src/widgets/ldapclientsearchconfigreadconfigjob.cpp
View file @
18cf88c3
...
...
@@ -180,7 +180,7 @@ void LdapClientSearchConfigReadConfigJob::readConfig()
void
LdapClientSearchConfigReadConfigJob
::
readLdapPasswordFinished
(
QKeychain
::
Job
*
baseJob
)
{
auto
*
job
=
qobject_cast
<
ReadPasswordJob
*>
(
baseJob
);
auto
job
=
qobject_cast
<
ReadPasswordJob
*>
(
baseJob
);
Q_ASSERT
(
job
);
if
(
!
job
->
error
())
{
mServer
.
setPassword
(
job
->
textData
());
...
...
src/widgets/ldapconfigurewidget.cpp
View file @
18cf88c3
...
...
@@ -146,7 +146,7 @@ void LdapConfigureWidget::slotMoveUp()
return
;
}
auto
*
above
=
static_cast
<
LdapWidgetItem
*>
(
mHostListView
->
item
(
mHostListView
->
row
(
item
)
-
1
));
auto
above
=
static_cast
<
LdapWidgetItem
*>
(
mHostListView
->
item
(
mHostListView
->
row
(
item
)
-
1
));
if
(
!
above
)
{
return
;
}
...
...
@@ -171,7 +171,7 @@ void LdapConfigureWidget::slotMoveDown()
return
;
}
auto
*
below
=
static_cast
<
LdapWidgetItem
*>
(
mHostListView
->
item
(
mHostListView
->
row
(
item
)
+
1
));
auto
below
=
static_cast
<
LdapWidgetItem
*>
(
mHostListView
->
item
(
mHostListView
->
row
(
item
)
+
1
));
if
(
!
below
)
{
return
;
}
...
...
@@ -192,7 +192,7 @@ void LdapConfigureWidget::load()
int
count
=
group
.
readEntry
(
"NumSelectedHosts"
,
0
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
auto
*
item
=
new
LdapWidgetItem
(
mHostListView
,
true
);
auto
item
=
new
LdapWidgetItem
(
mHostListView
,
true
);
item
->
setCheckState
(
Qt
::
Checked
);
auto
job
=
new
LdapWidgetItemReadConfigServerJob
(
this
);
job
->
setCurrentIndex
(
i
);
...
...
@@ -261,13 +261,13 @@ void LdapConfigureWidget::save()
void
LdapConfigureWidget
::
initGUI
()
{
auto
*
layout
=
new
QVBoxLayout
(
this
);
auto
layout
=
new
QVBoxLayout
(
this
);
layout
->
setObjectName
(
QStringLiteral
(
"layout"
));
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
QGroupBox
*
groupBox
=
new
QGroupBox
(
i18n
(
"LDAP Servers"
));
layout
->
addWidget
(
groupBox
);
auto
*
mainLayout
=
new
QVBoxLayout
;
auto
mainLayout
=
new
QVBoxLayout
;
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
groupBox
->
setLayout
(
mainLayout
);
...
...
@@ -278,7 +278,7 @@ void LdapConfigureWidget::initGUI()
QWidget
*
hBox
=
new
QWidget
(
this
);
mainLayout
->
addWidget
(
hBox
);
auto
*
hBoxHBoxLayout
=
new
QHBoxLayout
(
hBox
);
auto
hBoxHBoxLayout
=
new
QHBoxLayout
(
hBox
);
hBoxHBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hBoxHBoxLayout
->
setSpacing
(
6
);
// Contents of the hbox: listview and up/down buttons on the right (vbox)
...
...
@@ -287,7 +287,7 @@ void LdapConfigureWidget::initGUI()
mHostListView
->
setSortingEnabled
(
false
);
QWidget
*
upDownBox
=
new
QWidget
(
hBox
);
auto
*
upDownBoxVBoxLayout
=
new
QVBoxLayout
(
upDownBox
);
auto
upDownBoxVBoxLayout
=
new
QVBoxLayout
(
upDownBox
);
upDownBoxVBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hBoxHBoxLayout
->
addWidget
(
upDownBox
);
upDownBoxVBoxLayout
->
setSpacing
(
6
);
...
...
@@ -305,7 +305,7 @@ void LdapConfigureWidget::initGUI()
upDownBoxVBoxLayout
->
addWidget
(
spacer
);
upDownBoxVBoxLayout
->
setStretchFactor
(
spacer
,
100
);
auto
*
buttons
=
new
QDialogButtonBox
(
this
);
auto
buttons
=
new
QDialogButtonBox
(
this
);
QPushButton
*
add
=
buttons
->
addButton
(
i18n
(
"&Add Host..."
),
QDialogButtonBox
::
ActionRole
);
connect
(
add
,
&
QPushButton
::
clicked
,
this
,
&
LdapConfigureWidget
::
slotAddHost
);
mEditButton
=
buttons
->
addButton
(
i18n
(
"&Edit Host..."
),
QDialogButtonBox
::
ActionRole
);
...
...
src/widgets/ldapconfigwidget.cpp
View file @
18cf88c3
...
...
@@ -249,7 +249,7 @@ void LdapConfigWidget::Private::initWidget()
if
(
mFeatures
&
W_SECBOX
)
{
QGroupBox
*
btgroup
=
new
QGroupBox
(
i18n
(
"Security"
),
mParent
);
auto
*
hbox
=
new
QHBoxLayout
;
auto
hbox
=
new
QHBoxLayout
;
btgroup
->
setLayout
(
hbox
);
mSecNo
=
new
QRadioButton
(
i18nc
(
"@option:radio set no security"
,
"No"
),
btgroup
);
mSecNo
->
setObjectName
(
QStringLiteral
(
"kcfg_ldapnosec"
));
...
...
@@ -278,9 +278,9 @@ void LdapConfigWidget::Private::initWidget()
if
(
mFeatures
&
W_AUTHBOX
)
{
QGroupBox
*
authbox
=
new
QGroupBox
(
i18n
(
"Authentication"
),
mParent
);
auto
*
vbox
=
new
QVBoxLayout
;
auto
vbox
=
new
QVBoxLayout
;
authbox
->
setLayout
(
vbox
);
auto
*
hbox
=
new
QHBoxLayout
;
auto
hbox
=
new
QHBoxLayout
;
vbox
->
addLayout
(
hbox
);
mAnonymous
=
new
QRadioButton
(
i18nc
(
"@option:radio anonymous authentication"
,
"Anonymous"
),
authbox
);
...
...
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