Commit 0ed5bf03 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more const variable/pointer

parent 9383812f
Pipeline #76097 passed with stage
in 5 minutes and 48 seconds
......@@ -17,7 +17,6 @@ class Q_DECL_HIDDEN LdapDN::LdapDNPrivate
{
public:
LdapDNPrivate()
: m_dn()
{
}
......@@ -25,8 +24,8 @@ public:
{
}
bool isValidRDNString(const QString &rdn) const;
QStringList splitOnNonEscapedChar(const QString &rdn, QChar ch) const;
Q_REQUIRED_RESULT bool isValidRDNString(const QString &rdn) const;
Q_REQUIRED_RESULT QStringList splitOnNonEscapedChar(const QString &rdn, QChar ch) const;
QString m_dn;
};
......
......@@ -323,7 +323,7 @@ void LdapServer::setUrl(const LdapUrl &url)
d->mAuth = Simple;
d->mBindDn = url.extension(QStringLiteral("bindname"), critical);
} else {
QString user = url.userName();
const QString user = url.userName();
if (user.isEmpty()) {
d->mAuth = Anonymous;
} else {
......
......@@ -33,8 +33,8 @@ using namespace KLDAP;
LdapConfigureWidget::LdapConfigureWidget(QWidget *parent)
: QWidget(parent)
, mClientSearchConfig(new KLDAP::LdapClientSearchConfig)
{
mClientSearchConfig = new KLDAP::LdapClientSearchConfig;
initGUI();
connect(mHostListView, &QListWidget::currentItemChanged, this, &LdapConfigureWidget::slotSelectionChanged);
......
......@@ -55,7 +55,7 @@ private:
QToolButton *mUpButton = nullptr;
QToolButton *mDownButton = nullptr;
KLDAP::LdapClientSearchConfig *mClientSearchConfig = nullptr;
KLDAP::LdapClientSearchConfig *const mClientSearchConfig;
};
}
......@@ -305,7 +305,7 @@ void LdapConfigWidget::Private::sendQuery()
return;
}
if (mProg == nullptr) {
if (!mProg) {
mProg = new QProgressDialog(mParent);
mProg->setWindowTitle(i18nc("@title:window", "LDAP Query"));
mProg->setModal(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment