Commit 16533cd5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some warning + initialize variable in headers

parent 1d6335aa
Pipeline #74269 passed with stage
in 11 minutes and 15 seconds
......@@ -96,7 +96,6 @@ CollectionPropertiesDialog::Private::Private(CollectionPropertiesDialog *qq, con
: q(qq)
, mCollection(collection)
, mPageNames(pageNames)
, mTabWidget(nullptr)
{
if (s_defaultPage) {
registerBuiltinPages();
......
......@@ -41,12 +41,12 @@ class HtmlDifferencesReporter : public AbstractDifferencesReporter
public:
HtmlDifferencesReporter() = default;
QString toHtml() const
Q_REQUIRED_RESULT QString toHtml() const
{
return header() + mContent + footer();
}
QString plainText() const
Q_REQUIRED_RESULT QString plainText() const
{
return mTextContent;
}
......
......@@ -66,11 +66,7 @@ class Q_DECL_HIDDEN ControlGui::Private
public:
explicit Private(ControlGui *parent)
: mParent(parent)
, mEventLoop(nullptr)
, mProgressIndicator(nullptr)
, mSuccess(false)
, mStarting(false)
, mStopping(false)
{
}
......@@ -110,10 +106,10 @@ public:
QEventLoop *mEventLoop = nullptr;
QPointer<Internal::ControlProgressIndicator> mProgressIndicator;
QList<QPointer<QWidget>> mPendingOverlays;
bool mSuccess;
bool mSuccess = false;
bool mStarting;
bool mStopping;
bool mStarting = false;
bool mStopping = false;
};
bool ControlGui::Private::exec()
......
......@@ -47,8 +47,6 @@ static bool isParentOf(QWidget *o1, QWidget *o2)
ErrorOverlay::ErrorOverlay(QWidget *baseWidget, QWidget *parent)
: QWidget(parent ? parent : baseWidget->window())
, mBaseWidget(baseWidget)
, mOverlayActive(false)
, mBaseWidgetIsParent(false)
, ui(new Ui::ErrorOverlay)
{
Q_ASSERT(baseWidget);
......
......@@ -51,9 +51,9 @@ private Q_SLOTS:
private:
QPointer<QWidget> mBaseWidget;
bool mPreviousState;
bool mOverlayActive;
bool mBaseWidgetIsParent;
bool mPreviousState = false;
bool mOverlayActive = false;
bool mBaseWidgetIsParent = false;
QScopedPointer<Ui::ErrorOverlay> ui;
};
......
......@@ -55,7 +55,7 @@ void ItemView::Private::init()
mParent->connect(mParent, &QAbstractItemView::clicked, mParent, [this](const auto &index) {
itemClicked(index);
});
mParent->connect(mParent, &QAbstractItemView::doubleClicked, [this](const auto &index) {
mParent->connect(mParent, &QAbstractItemView::doubleClicked, mParent, [this](const auto &index) {
itemDoubleClicked(index);
});
......
......@@ -20,7 +20,6 @@ using namespace Akonadi;
DelegateAnimator::DelegateAnimator(QAbstractItemView *view)
: QObject(view)
, m_view(view)
, m_timerId(-1)
{
m_pixmapSequence = KIconLoader::global()->loadPixmapSequence(QStringLiteral("process-working"), 22);
}
......
......@@ -54,7 +54,7 @@ private:
QSet<Animation> m_animations;
QAbstractItemView *const m_view;
KPixmapSequence m_pixmapSequence;
int m_timerId;
int m_timerId = -1;
};
uint qHash(const Akonadi::DelegateAnimator::Animation &anim);
......
Supports Markdown
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