summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-12-01 07:49:46 +0100
committerMontel Laurent <[email protected]>2017-12-01 07:49:46 +0100
commitc0bf5b8f004bf09bad429a237e2b4cfcea4c2b3c (patch)
tree020ea4b5cc453fe0dbba713571aba46a27c98c7b
parent9e741f615091fcb278a99cda39d55abefa298447 (diff)
Initialize variables
-rw-r--r--src/libkdepim/ldap/kcmldap.cpp2
-rw-r--r--src/libkdepim/ldap/ldapclientsearch.cpp2
-rw-r--r--src/libkdepim/multiplyingline/multiplyinglineview_p.cpp7
-rw-r--r--src/libkdepim/multiplyingline/multiplyinglineview_p.h14
-rw-r--r--src/libkdepim/progresswidget/progressmanager.h18
5 files changed, 18 insertions, 25 deletions
diff --git a/src/libkdepim/ldap/kcmldap.cpp b/src/libkdepim/ldap/kcmldap.cpp
index 574515c..315db33 100644
--- a/src/libkdepim/ldap/kcmldap.cpp
+++ b/src/libkdepim/ldap/kcmldap.cpp
@@ -85,7 +85,7 @@ public:
private:
KLDAP::LdapServer mServer;
- bool mIsActive;
+ bool mIsActive = false;
};
KCMLdap::KCMLdap(QWidget *parent, const QVariantList &)
diff --git a/src/libkdepim/ldap/ldapclientsearch.cpp b/src/libkdepim/ldap/ldapclientsearch.cpp
index 3c10176..16dfa5f 100644
--- a/src/libkdepim/ldap/ldapclientsearch.cpp
+++ b/src/libkdepim/ldap/ldapclientsearch.cpp
@@ -74,7 +74,7 @@ public:
void slotDataTimer();
void slotFileChanged(const QString &);
- LdapClientSearch *q;
+ LdapClientSearch *q = nullptr;
QList<LdapClient *> mClients;
QStringList mAttributes;
QString mSearchText;
diff --git a/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp b/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp
index 28008e3..54a885f 100644
--- a/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp
+++ b/src/libkdepim/multiplyingline/multiplyinglineview_p.cpp
@@ -36,16 +36,9 @@ using namespace KPIM;
MultiplyingLineView::MultiplyingLineView(MultiplyingLineFactory *factory, MultiplyingLineEditor *parent)
: QScrollArea(parent)
- , mCurDelLine(nullptr)
, mPage(new QWidget(this))
, mTopLayout(new QVBoxLayout(this))
, mMultiplyingLineFactory(factory)
- , mLineHeight(0)
- , mFirstColumnWidth(0)
- , mCompletionMode(KCompletion::CompletionNone)
- , mAutoResize(false)
- , mDynamicSizeHint(true)
- , mModified(false)
{
setWidgetResizable(true);
setFrameStyle(QFrame::NoFrame);
diff --git a/src/libkdepim/multiplyingline/multiplyinglineview_p.h b/src/libkdepim/multiplyingline/multiplyinglineview_p.h
index 4d8d19c..1fdb9bf 100644
--- a/src/libkdepim/multiplyingline/multiplyinglineview_p.h
+++ b/src/libkdepim/multiplyingline/multiplyinglineview_p.h
@@ -123,16 +123,16 @@ protected Q_SLOTS:
private:
QList<MultiplyingLine *> mLines;
- QPointer<MultiplyingLine> mCurDelLine;
+ QPointer<MultiplyingLine> mCurDelLine = nullptr;
QWidget *mPage = nullptr;
QLayout *mTopLayout = nullptr;
MultiplyingLineFactory *mMultiplyingLineFactory = nullptr;
- int mLineHeight;
- int mFirstColumnWidth;
- KCompletion::CompletionMode mCompletionMode;
- bool mAutoResize;
- bool mDynamicSizeHint;
- bool mModified;
+ int mLineHeight = 0;
+ int mFirstColumnWidth = 0;
+ KCompletion::CompletionMode mCompletionMode = KCompletion::CompletionNone;
+ bool mAutoResize = false;
+ bool mDynamicSizeHint = true;
+ bool mModified = false;
};
}
diff --git a/src/libkdepim/progresswidget/progressmanager.h b/src/libkdepim/progresswidget/progressmanager.h
index 1b36965..5d243bb 100644
--- a/src/libkdepim/progresswidget/progressmanager.h
+++ b/src/libkdepim/progresswidget/progressmanager.h
@@ -241,17 +241,17 @@ private:
QString mLabel;
QString mStatus;
QPointer<ProgressItem> mParent;
- bool mCanBeCanceled;
- unsigned int mProgress;
+ bool mCanBeCanceled = false;
+ unsigned int mProgress = 0;
ProgressItemMap mChildren;
- unsigned int mTotal;
- unsigned int mCompleted;
+ unsigned int mTotal = 0;
+ unsigned int mCompleted = 0;
CryptoStatus mCryptoStatus;
- unsigned int mType;
- bool mWaitingForKids;
- bool mCanceled;
- bool mUsesBusyIndicator;
- bool mCompletedCalled;
+ unsigned int mType = 0;
+ bool mWaitingForKids = false;
+ bool mCanceled = false;
+ bool mUsesBusyIndicator = false;
+ bool mCompletedCalled = false;
};
struct ProgressManagerPrivate;