summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-03-28 13:13:41 (GMT)
committerTobias Markmann <tm@ayena.de>2017-03-29 07:16:25 (GMT)
commit7c047cba09ecc963b66170b0abb2238aa895ccfb (patch)
tree78dfcb3e25333cb4c97f67acc8575601285a71af /Swift/QtUI
parentcd23d0d8a01583b7a5289821c27372ef9f6443e1 (diff)
downloadswift-7c047cba09ecc963b66170b0abb2238aa895ccfb.zip
swift-7c047cba09ecc963b66170b0abb2238aa895ccfb.tar.bz2
Initialise timerId member in QtGridSelectionDialog
Coverity raised this issue. Test-Information: All unit tests passed on macOS 10.12.4. Change-Id: Id65cdc5e0175ba7773d32b6dddbc9b4af6789019
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/Trellis/QtGridSelectionDialog.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/Trellis/QtGridSelectionDialog.h b/Swift/QtUI/Trellis/QtGridSelectionDialog.h
index 2cb36ca..c448979 100644
--- a/Swift/QtUI/Trellis/QtGridSelectionDialog.h
+++ b/Swift/QtUI/Trellis/QtGridSelectionDialog.h
@@ -1,66 +1,66 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
#include <QSize>
#include <QWidget>
namespace Swift {
class QtGridSelectionDialog : public QWidget {
Q_OBJECT
Q_PROPERTY(QSize currentGridSize READ getCurrentGridSize WRITE setCurrentGridSize NOTIFY currentGridSizeChanged)
Q_PROPERTY(QSize minGridSize READ getMinGridSize WRITE setMinGridSize NOTIFY minGridSizeChanged)
Q_PROPERTY(QSize maxGridSize READ getMaxGridSize WRITE setMaxGridSize NOTIFY maxGridSizeChanged)
public:
explicit QtGridSelectionDialog(QWidget* parent = nullptr);
virtual QSize sizeHint() const;
void setCurrentGridSize(const QSize& size);
QSize getCurrentGridSize() const;
void setMinGridSize(const QSize& size);
QSize getMinGridSize() const;
void setMaxGridSize(const QSize& size);
QSize getMaxGridSize() const;
QSize getFrameSize() const;
int getDescriptionTextHeight() const;
signals:
void currentGridSizeChanged(QSize);
void minGridSizeChanged(QSize);
void maxGridSizeChanged(QSize);
protected:
void keyReleaseEvent(QKeyEvent* event);
void mousePressEvent(QMouseEvent* event);
void paintEvent(QPaintEvent* event);
void showEvent(QShowEvent* event);
void hideEvent(QHideEvent* event);
bool event(QEvent* event);
void timerEvent(QTimerEvent* event);
private:
int getDescriptionTextHeight(int width) const;
private:
int padding;
int horizontalMargin;
int verticalMargin;
- int timerId;
+ int timerId = -1;
QSize frameSize;
QSize currentGridSize;
QSize minGridSize;
QSize maxGridSize;
const QString descriptionText;
};
}