summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-09-09 07:45:27 +0200
committerMontel Laurent <[email protected]>2017-09-09 07:45:27 +0200
commit43309a439746227180bfcb0f44b3f77ac30a1658 (patch)
treee24f97cb663c78548f5b9057a41860868732db4c
parentfc05f6df57b2b258120881ff65c0edb3617c3592 (diff)
Initialize pointer here too
-rw-r--r--src/libkdepim/ldap/ldapclientsearch.h2
-rw-r--r--src/libkdepim/multiplyingline/multiplyinglineview_p.cpp2
-rw-r--r--src/libkdepim/prefs/kprefsdialog.cpp4
-rw-r--r--src/libkdepim/prefs/kprefsdialog.h68
-rw-r--r--src/libkdepim/progresswidget/progressdialog.h16
-rw-r--r--src/libkdepim/tests/testldapclient.h2
-rw-r--r--src/libkdepim/widgets/kcheckcombobox.cpp2
-rw-r--r--src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.h2
-rw-r--r--src/libkdepimakonadi/addressline/completionorder/completionorderwidget.cpp2
-rw-r--r--src/libkdepimakonadi/addressline/plugins/addressesslineeditabstractplugin.h4
-rw-r--r--src/libkdepimakonadi/job/addcontactjob.cpp4
11 files changed, 54 insertions, 54 deletions
diff --git a/src/libkdepim/ldap/ldapclientsearch.h b/src/libkdepim/ldap/ldapclientsearch.h
index bdabff9..ce30fe4 100644
--- a/src/libkdepim/ldap/ldapclientsearch.h
+++ b/src/libkdepim/ldap/ldapclientsearch.h
@@ -37,7 +37,7 @@ class LdapClient;
*/
struct LdapResultObject {
typedef QVector<LdapResultObject> List;
- const LdapClient *client;
+ const LdapClient *client = nullptr;
KLDAP::LdapObject object;
};
diff --git a/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp b/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp
index 59f4cbd..28008e3 100644
--- a/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp
+++ b/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp
@@ -321,7 +321,7 @@ bool MultiplyingLineView::isModified() const
}
QListIterator<MultiplyingLine *> it(mLines);
- MultiplyingLine *line;
+ MultiplyingLine *line = nullptr;
while (it.hasNext()) {
line = it.next();
if (line->isModified()) {
diff --git a/src/libkdepim/prefs/kprefsdialog.cpp b/src/libkdepim/prefs/kprefsdialog.cpp
index 240027c..9e80b1b 100644
--- a/src/libkdepim/prefs/kprefsdialog.cpp
+++ b/src/libkdepim/prefs/kprefsdialog.cpp
@@ -793,8 +793,8 @@ void KPrefsDialog::autoCreate()
for (it = items.constBegin(); it != items.constEnd(); ++it) {
QString group = (*it)->group();
- QWidget *page;
- QGridLayout *layout;
+ QWidget *page = nullptr;
+ QGridLayout *layout = nullptr;
int currentRow;
if (!mGroupPages.contains(group)) {
page = new QWidget(this);
diff --git a/src/libkdepim/prefs/kprefsdialog.h b/src/libkdepim/prefs/kprefsdialog.h
index f570425..80512e9 100644
--- a/src/libkdepim/prefs/kprefsdialog.h
+++ b/src/libkdepim/prefs/kprefsdialog.h
@@ -112,9 +112,9 @@ public:
QList<QWidget *> widgets() const override;
private:
- KConfigSkeleton::ItemBool *mItem;
+ KConfigSkeleton::ItemBool *mItem = nullptr;
- QCheckBox *mCheck;
+ QCheckBox *mCheck = nullptr;
};
/**
@@ -153,10 +153,10 @@ public:
QList<QWidget *> widgets() const override;
private:
- KConfigSkeleton::ItemInt *mItem;
+ KConfigSkeleton::ItemInt *mItem = nullptr;
- QLabel *mLabel;
- QSpinBox *mSpin;
+ QLabel *mLabel = nullptr;
+ QSpinBox *mSpin = nullptr;
};
/**
@@ -192,10 +192,10 @@ public:
void writeConfig() override;
private:
- KConfigSkeleton::ItemDateTime *mItem;
+ KConfigSkeleton::ItemDateTime *mItem = nullptr;
- QLabel *mLabel;
- KTimeComboBox *mTimeEdit;
+ QLabel *mLabel = nullptr;
+ KTimeComboBox *mTimeEdit = nullptr;
};
/**
@@ -232,10 +232,10 @@ public:
void writeConfig() override;
private:
- KConfigSkeleton::ItemDateTime *mItem;
+ KConfigSkeleton::ItemDateTime *mItem = nullptr;
- QLabel *mLabel;
- QTimeEdit *mTimeEdit;
+ QLabel *mLabel = nullptr;
+ QTimeEdit *mTimeEdit = nullptr;
};
/**
@@ -271,10 +271,10 @@ public:
void writeConfig() override;
private:
- KConfigSkeleton::ItemDateTime *mItem;
+ KConfigSkeleton::ItemDateTime *mItem = nullptr;
- QLabel *mLabel;
- KDateComboBox *mDateEdit;
+ QLabel *mLabel = nullptr;
+ KDateComboBox *mDateEdit = nullptr;
};
/**
@@ -315,10 +315,10 @@ public:
void writeConfig() override;
private:
- KConfigSkeleton::ItemColor *mItem;
+ KConfigSkeleton::ItemColor *mItem = nullptr;
- QLabel *mLabel;
- KColorButton *mButton;
+ QLabel *mLabel = nullptr;
+ KColorButton *mButton = nullptr;
};
/**
@@ -367,11 +367,11 @@ protected Q_SLOTS:
void selectFont();
private:
- KConfigSkeleton::ItemFont *mItem;
+ KConfigSkeleton::ItemFont *mItem = nullptr;
- QLabel *mLabel;
- QLabel *mPreview;
- QPushButton *mButton;
+ QLabel *mLabel = nullptr;
+ QLabel *mPreview = nullptr;
+ QPushButton *mButton = nullptr;
};
/**
@@ -420,10 +420,10 @@ public:
QList<QWidget *> widgets() const override;
private:
- KConfigSkeleton::ItemEnum *mItem;
+ KConfigSkeleton::ItemEnum *mItem = nullptr;
- QGroupBox *mBox;
- QButtonGroup *mGroup;
+ QGroupBox *mBox = nullptr;
+ QButtonGroup *mGroup = nullptr;
};
/**
@@ -462,9 +462,9 @@ public:
QLabel *label() const;
private:
- KConfigSkeleton::ItemEnum *mItem;
- KComboBox *mCombo;
- QLabel *mLabel;
+ KConfigSkeleton::ItemEnum *mItem = nullptr;
+ KComboBox *mCombo = nullptr;
+ QLabel *mLabel = nullptr;
};
/**
@@ -507,10 +507,10 @@ public:
QList<QWidget *> widgets() const override;
private:
- KConfigSkeleton::ItemString *mItem;
+ KConfigSkeleton::ItemString *mItem = nullptr;
- QLabel *mLabel;
- KLineEdit *mEdit;
+ QLabel *mLabel = nullptr;
+ KLineEdit *mEdit = nullptr;
};
/**
@@ -556,10 +556,10 @@ public:
QList<QWidget *> widgets() const override;
private:
- KConfigSkeleton::ItemPath *mItem;
+ KConfigSkeleton::ItemPath *mItem = nullptr;
- QLabel *mLabel;
- KUrlRequester *mURLRequester;
+ QLabel *mLabel = nullptr;
+ KUrlRequester *mURLRequester = nullptr;
};
/**
@@ -708,7 +708,7 @@ public:
void writeWidConfig();
private:
- KConfigSkeleton *mPrefs;
+ KConfigSkeleton *mPrefs = nullptr;
QList<KPrefsWid *> mPrefsWids;
};
diff --git a/src/libkdepim/progresswidget/progressdialog.h b/src/libkdepim/progresswidget/progressdialog.h
index 3711710..af83e5d 100644
--- a/src/libkdepim/progresswidget/progressdialog.h
+++ b/src/libkdepim/progresswidget/progressdialog.h
@@ -72,7 +72,7 @@ protected:
void resizeEvent(QResizeEvent *event) override;
private:
- QWidget *mBigBox;
+ QWidget *mBigBox = nullptr;
};
class TransactionItem : public QWidget
@@ -113,13 +113,13 @@ public Q_SLOTS:
void slotItemCanceled();
protected:
- QProgressBar *mProgress;
- QPushButton *mCancelButton;
- QLabel *mItemLabel;
- QLabel *mItemStatus;
- QFrame *mFrame;
- SSLLabel *mSSLLabel;
- ProgressItem *mItem;
+ QProgressBar *mProgress = nullptr;
+ QPushButton *mCancelButton = nullptr;
+ QLabel *mItemLabel = nullptr;
+ QLabel *mItemStatus = nullptr;
+ QFrame *mFrame = nullptr;
+ SSLLabel *mSSLLabel = nullptr;
+ ProgressItem *mItem = nullptr;
};
class KDEPIM_EXPORT ProgressDialog : public OverlayWidget
diff --git a/src/libkdepim/tests/testldapclient.h b/src/libkdepim/tests/testldapclient.h
index 521fcff..b73cee1 100644
--- a/src/libkdepim/tests/testldapclient.h
+++ b/src/libkdepim/tests/testldapclient.h
@@ -52,7 +52,7 @@ private Q_SLOTS:
private:
bool check(const QString &, QString, QString);
- KLDAP::LdapClient *mClient;
+ KLDAP::LdapClient *mClient = nullptr;
};
#endif
diff --git a/src/libkdepim/widgets/kcheckcombobox.cpp b/src/libkdepim/widgets/kcheckcombobox.cpp
index 503c1ce..7323cb2 100644
--- a/src/libkdepim/widgets/kcheckcombobox.cpp
+++ b/src/libkdepim/widgets/kcheckcombobox.cpp
@@ -40,7 +40,7 @@ using namespace KPIM;
namespace KPIM {
class Q_DECL_HIDDEN KCheckComboBox::Private
{
- KCheckComboBox *q;
+ KCheckComboBox *q = nullptr;
public:
Private(KCheckComboBox *qq)
diff --git a/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.h b/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.h
index e84e940..2ed9ba1 100644
--- a/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.h
+++ b/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.h
@@ -139,7 +139,7 @@ private:
QString mSearchString;
QList<KJob *> mMightBeGroupJobs;
KContacts::ContactGroup::List mGroups;
- KConfig *mRecentAddressConfig;
+ KConfig *mRecentAddressConfig = nullptr;
bool mUseCompletion;
bool mCompletionInitialized;
bool mSmartPaste;
diff --git a/src/libkdepimakonadi/addressline/completionorder/completionorderwidget.cpp b/src/libkdepimakonadi/addressline/completionorder/completionorderwidget.cpp
index 6a78fa0..3fa6d55 100644
--- a/src/libkdepimakonadi/addressline/completionorder/completionorderwidget.cpp
+++ b/src/libkdepimakonadi/addressline/completionorder/completionorderwidget.cpp
@@ -225,7 +225,7 @@ public:
}
private:
- CompletionItem *mItem;
+ CompletionItem *mItem = nullptr;
};
CompletionOrderWidget::CompletionOrderWidget(QWidget *parent)
diff --git a/src/libkdepimakonadi/addressline/plugins/addressesslineeditabstractplugin.h b/src/libkdepimakonadi/addressline/plugins/addressesslineeditabstractplugin.h
index 7c1c6c4..b622a8f 100644
--- a/src/libkdepimakonadi/addressline/plugins/addressesslineeditabstractplugin.h
+++ b/src/libkdepimakonadi/addressline/plugins/addressesslineeditabstractplugin.h
@@ -50,8 +50,8 @@ Q_SIGNALS:
void wasUpdated();
private:
- KPIM::AddresseeLineEdit *mLinedit;
- bool mEnabled;
+ KPIM::AddresseeLineEdit *mLinedit = nullptr;
+ bool mEnabled = false;
};
}
diff --git a/src/libkdepimakonadi/job/addcontactjob.cpp b/src/libkdepimakonadi/job/addcontactjob.cpp
index d4a5744..ca52a76 100644
--- a/src/libkdepimakonadi/job/addcontactjob.cpp
+++ b/src/libkdepimakonadi/job/addcontactjob.cpp
@@ -138,9 +138,9 @@ public:
AddContactJob *q;
KContacts::Addressee mContact;
- QWidget *mParentWidget;
+ QWidget *mParentWidget = nullptr;
Akonadi::Collection mCollection;
- bool mShowMessageBox;
+ bool mShowMessageBox = false;
};
AddContactJob::AddContactJob(const KContacts::Addressee &contact, QWidget *parentWidget, QObject *parent)