Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 162fdf8a authored by Laurent Montel's avatar Laurent Montel 😁

Clean up

parent 44d4c6e3
......@@ -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
......
......@@ -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()
......
......@@ -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);
}
}
......@@ -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();
}
}
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