summaryrefslogtreecommitdiffstats
path: root/examples/sql/cachedtable/tableeditor.cpp
diff options
context:
space:
mode:
authorMichael Winkelmann <Michael.winkelmann@qt.io>2017-07-20 16:39:01 +0200
committerTopi Reiniö <topi.reinio@qt.io>2017-09-14 10:48:48 +0000
commit3d67793a9ec01f15e3dcf6b59e6e0df5f59bdfad (patch)
treee8bd72349e2580e2dfb4908a96653f3fa3644922 /examples/sql/cachedtable/tableeditor.cpp
parent590e71a69cc74b4e7da1ccb19a1304047dbaecb8 (diff)
Revamp SQL examples to C++11
Changed signals and slots to new syntax, used nullptr and replaced foreach with new C++11 range based for loops. Also fixed a few minor flaws. Task-number: QTBUG-60633 Change-Id: Ice4030133971912f96752d9d84c638c70fd73e35 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/sql/cachedtable/tableeditor.cpp')
-rw-r--r--examples/sql/cachedtable/tableeditor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/sql/cachedtable/tableeditor.cpp b/examples/sql/cachedtable/tableeditor.cpp
index 71e441486d..95c3047c76 100644
--- a/examples/sql/cachedtable/tableeditor.cpp
+++ b/examples/sql/cachedtable/tableeditor.cpp
@@ -85,9 +85,9 @@ TableEditor::TableEditor(const QString &tableName, QWidget *parent)
//! [2]
//! [3]
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submit()));
- connect(revertButton, SIGNAL(clicked()), model, SLOT(revertAll()));
- connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(submitButton, &QPushButton::clicked, this, &TableEditor::submit);
+ connect(revertButton, &QPushButton::clicked, model, &QSqlTableModel::revertAll);
+ connect(quitButton, &QPushButton::clicked, this, &TableEditor::close);
//! [3]
//! [4]