From 8c685b765bf4ceba3c4cf8fdd9c9d680f338b7a9 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 20 Oct 2018 21:48:28 +0200 Subject: Itemviews: Cleanup examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleanup some minor issues in the chart example: - remove unused members - use initializer list for members - pass a proper role to dataChanged() - honor roles parameter in PieView::dataChanged() - use nullptr instead 0 - use new-style connect - fix indentation and other whitespaces Change-Id: Idb212b07c006fe3ae31bee9cd9b1ba4d03043b5e Reviewed-by: André Hartmann Reviewed-by: Paul Wicking --- examples/widgets/tutorials/modelview/6_treeview/mainwindow.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/widgets/tutorials/modelview/6_treeview/mainwindow.h') diff --git a/examples/widgets/tutorials/modelview/6_treeview/mainwindow.h b/examples/widgets/tutorials/modelview/6_treeview/mainwindow.h index d625d5991d..65d9c18658 100644 --- a/examples/widgets/tutorials/modelview/6_treeview/mainwindow.h +++ b/examples/widgets/tutorials/modelview/6_treeview/mainwindow.h @@ -51,9 +51,9 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include -QT_BEGIN_NAMESPACE // QT_BEGIN_NAMESPACE / QT_END_NAMESPACE are not needed in Qt user code +QT_BEGIN_NAMESPACE class QTreeView; //forward declarations class QStandardItemModel; class QStandardItem; @@ -66,11 +66,11 @@ class MainWindow : public QMainWindow private: QTreeView *treeView; QStandardItemModel *standardModel; - QList prepareRow( const QString &first, - const QString &second, - const QString &third ); + QList prepareRow(const QString &first, + const QString &second, + const QString &third) const; public: - MainWindow(QWidget *parent = 0); + MainWindow(QWidget *parent = nullptr); }; #endif // MAINWINDOW_H -- cgit v1.2.3