QSqlTableModel: let select() and selectRow() be slots
authorMark Brand <mabrand@mabrand.nl>
Sat, 13 Oct 2012 11:07:38 +0000 (13:07 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sun, 14 Oct 2012 07:55:57 +0000 (09:55 +0200)
It's convenient to be able to connect a button to select()
and signals that provide a row to selectRow().

Change-Id: I520d5564943f679ec9e68331878a211dd52b4a06
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
src/sql/models/qsqltablemodel.h

index 0b038e1..df1946f 100644 (file)
@@ -66,9 +66,6 @@ public:
     explicit QSqlTableModel(QObject *parent = 0, QSqlDatabase db = QSqlDatabase());
     virtual ~QSqlTableModel();
 
-    virtual bool select();
-    virtual bool selectRow(int row);
-
     virtual void setTable(const QString &tableName);
     QString tableName() const;
 
@@ -111,6 +108,9 @@ public:
     virtual void revertRow(int row);
 
 public Q_SLOTS:
+    virtual bool select();
+    virtual bool selectRow(int row);
+
     bool submit();
     void revert();