summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tools/completer/mainwindow.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-09-06 20:27:33 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-09-11 20:36:17 +0200
commit3fede6cb547b783377e833c9b269d4cecfe47e61 (patch)
treefb5bbbe2613017487436d669b9ecfe090e29074c /examples/widgets/tools/completer/mainwindow.h
parent78437ef0d2d662663bbc827befc849cad5886b63 (diff)
Cleanup QtWidgets (tools) examples
Cleanup QtWidgets tools examples: - use member-init (clang-tidy) - fix includes/don't include QtWidgets globally - include own header first - use nullptr (clang-tidy) - avoid c-style casts - use QVector instead QList - use QItemDelegate instead QStyledItemDelegate Change-Id: Ibe9440cdf711e5cc2138c054864edebe1fc95731 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/tools/completer/mainwindow.h')
-rw-r--r--examples/widgets/tools/completer/mainwindow.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/examples/widgets/tools/completer/mainwindow.h b/examples/widgets/tools/completer/mainwindow.h
index 2bb351ec47..6e6238bf32 100644
--- a/examples/widgets/tools/completer/mainwindow.h
+++ b/examples/widgets/tools/completer/mainwindow.h
@@ -59,7 +59,6 @@ class QComboBox;
class QCompleter;
class QLabel;
class QLineEdit;
-class QProgressBar;
class QCheckBox;
class QSpinBox;
QT_END_NAMESPACE
@@ -70,7 +69,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow(QWidget *parent = 0);
+ MainWindow(QWidget *parent = nullptr);
private slots:
void about();
@@ -83,16 +82,16 @@ private slots:
//! [1]
private:
void createMenu();
- QAbstractItemModel *modelFromFile(const QString& fileName);
+ QAbstractItemModel *modelFromFile(const QString &fileName);
- QComboBox *caseCombo;
- QComboBox *modeCombo;
- QComboBox *modelCombo;
- QSpinBox *maxVisibleSpinBox;
- QCheckBox *wrapCheckBox;
- QCompleter *completer;
- QLabel *contentsLabel;
- QLineEdit *lineEdit;
+ QComboBox *caseCombo = nullptr;
+ QComboBox *modeCombo = nullptr;
+ QComboBox *modelCombo = nullptr;
+ QSpinBox *maxVisibleSpinBox = nullptr;
+ QCheckBox *wrapCheckBox = nullptr;
+ QCompleter *completer = nullptr;
+ QLabel *contentsLabel = nullptr;
+ QLineEdit *lineEdit = nullptr;
};
//! [1]