summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-11-27 07:25:18 +0100
committerMontel Laurent <[email protected]>2017-11-27 07:25:18 +0100
commit162fdf8ab36383b6b9db143dbe014307b723765a (patch)
treee8b11a87013263b7797808422d658c3a8ca3144f
parent44d4c6e3958bfbc903afbb14c6c1dd61dc2b6cf1 (diff)
Clean up
-rw-r--r--src/libkdepim/progresswidget/ssllabel.cpp8
-rw-r--r--src/libkdepim/widgets/kwidgetlister.cpp11
-rw-r--r--src/libkdepim/widgets/progressindicatorlabel.cpp5
-rw-r--r--src/libkdepim/widgets/progressindicatorwidget.cpp39
4 files changed, 28 insertions, 35 deletions
diff --git a/src/libkdepim/progresswidget/ssllabel.cpp b/src/libkdepim/progresswidget/ssllabel.cpp
index 122df3f..fec9582 100644
--- a/src/libkdepim/progresswidget/ssllabel.cpp
+++ b/src/libkdepim/progresswidget/ssllabel.cpp
@@ -59,23 +59,23 @@ void SSLLabel::setState(State state)
{
switch (state) {
case Encrypted:
- this->setToolTip(i18n("Connection is encrypted"));
+ setToolTip(i18n("Connection is encrypted"));
setPixmap(QIcon::fromTheme(QStringLiteral("security-high")).pixmap(IconSize(KIconLoader::Small)));
show();
break;
case Unencrypted:
- this->setToolTip(i18n("Connection is unencrypted"));
+ setToolTip(i18n("Connection is unencrypted"));
setPixmap(QIcon::fromTheme(QStringLiteral("security-low")).pixmap(IconSize(KIconLoader::Small)));
show();
break;
case Unknown:
case Done:
- this->setToolTip(QString());
+ setToolTip(QString());
hide();
break;
case Clean:
default:
- this->setToolTip(QString());
+ setToolTip(QString());
hide();
//we return because we do not save the state as the only
//action we want to perform is to hide ourself
diff --git a/src/libkdepim/widgets/kwidgetlister.cpp b/src/libkdepim/widgets/kwidgetlister.cpp
index fdaedd1..befc7e2 100644
--- a/src/libkdepim/widgets/kwidgetlister.cpp
+++ b/src/libkdepim/widgets/kwidgetlister.cpp
@@ -49,13 +49,6 @@ class Q_DECL_HIDDEN KWidgetLister::Private
public:
Private(KWidgetLister *qq)
: q(qq)
- , mBtnMore(nullptr)
- , mBtnFewer(nullptr)
- , mBtnClear(nullptr)
- , mLayout(nullptr)
- , mButtonBox(nullptr)
- , mMinWidgets(0)
- , mMaxWidgets(0)
{
}
@@ -74,8 +67,8 @@ public:
QVBoxLayout *mLayout = nullptr;
QWidget *mButtonBox = nullptr;
QList<QWidget *> mWidgetList;
- int mMinWidgets;
- int mMaxWidgets;
+ int mMinWidgets = 0;
+ int mMaxWidgets = 0;
};
void KWidgetLister::Private::enableControls()
diff --git a/src/libkdepim/widgets/progressindicatorlabel.cpp b/src/libkdepim/widgets/progressindicatorlabel.cpp
index 0e58522..2d1cd23 100644
--- a/src/libkdepim/widgets/progressindicatorlabel.cpp
+++ b/src/libkdepim/widgets/progressindicatorlabel.cpp
@@ -22,8 +22,8 @@
#include <QHBoxLayout>
-namespace KPIM {
-class ProgressIndicatorLabelPrivate
+using namespace KPIM;
+class KPIM::ProgressIndicatorLabelPrivate
{
public:
ProgressIndicatorLabelPrivate(const QString &_label, ProgressIndicatorLabel *qq)
@@ -99,4 +99,3 @@ void ProgressIndicatorLabel::setActiveLabel(const QString &label)
{
d->setActiveLabel(label);
}
-}
diff --git a/src/libkdepim/widgets/progressindicatorwidget.cpp b/src/libkdepim/widgets/progressindicatorwidget.cpp
index f80b5e9..6c6158b 100644
--- a/src/libkdepim/widgets/progressindicatorwidget.cpp
+++ b/src/libkdepim/widgets/progressindicatorwidget.cpp
@@ -22,7 +22,25 @@
#include <QTimer>
#include <KIconLoader>
-namespace KPIM {
+using namespace KPIM;
+class KPIM::ProgressIndicatorWidgetPrivate
+{
+public:
+ ProgressIndicatorWidgetPrivate(ProgressIndicatorWidget *qq)
+ : q(qq)
+ {
+ indicator = new IndicatorProgress(q);
+ }
+
+ ~ProgressIndicatorWidgetPrivate()
+ {
+ delete indicator;
+ }
+
+ IndicatorProgress *indicator = nullptr;
+ ProgressIndicatorWidget *q = nullptr;
+};
+
IndicatorProgress::IndicatorProgress(ProgressIndicatorWidget *widget, QObject *parent)
: QObject(parent)
, mProgressCount(0)
@@ -70,23 +88,6 @@ bool IndicatorProgress::isActive() const
return mIsActive;
}
-class ProgressIndicatorWidgetPrivate
-{
-public:
- ProgressIndicatorWidgetPrivate(ProgressIndicatorWidget *qq)
- : q(qq)
- {
- indicator = new IndicatorProgress(q);
- }
-
- ~ProgressIndicatorWidgetPrivate()
- {
- delete indicator;
- }
-
- IndicatorProgress *indicator = nullptr;
- ProgressIndicatorWidget *q = nullptr;
-};
ProgressIndicatorWidget::ProgressIndicatorWidget(QWidget *parent)
: QLabel(parent)
@@ -114,4 +115,4 @@ bool ProgressIndicatorWidget::isActive() const
{
return d->indicator->isActive();
}
-}
+