From ec78dafa94a3fce5360d9aca4f1a931862f6332a Mon Sep 17 00:00:00 2001 From: eelke Date: Sat, 6 Jan 2018 21:33:24 +0100 Subject: [PATCH] Removed on_ from the name of the slots to prevent warning about not being able to find the signals. The old name followed the pattern used by Qt to automatically deduce what signal should be connected to which slot. However as these are signals from a sub object it cannot find them and I have made the connections manually. To prevent getting warnings at runtime I changed the name. --- pglab/TablesPage.cpp | 12 ++++++------ pglab/TablesPage.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pglab/TablesPage.cpp b/pglab/TablesPage.cpp index 296c561..02bf5fd 100644 --- a/pglab/TablesPage.cpp +++ b/pglab/TablesPage.cpp @@ -51,13 +51,13 @@ TablesPage::TablesPage(QWidget *parent) : connect(ui->tableListTable->selectionModel(), &QItemSelectionModel::currentRowChanged, this, - &TablesPage::on_tableListTable_currentRowChanged); + &TablesPage::tableListTable_currentRowChanged); // connect(ui->constraintsTable->selectionModel(), &QItemSelectionModel::currentRowChanged, this, -// &TablesPage::on_constraintsTable_currentRowChanged); +// &TablesPage::constraintsTable_currentRowChanged); connect(ui->constraintsTable->selectionModel(), &QItemSelectionModel::selectionChanged, this, - &TablesPage::on_constraintsTable_selectionChanged); + &TablesPage::constraintsTable_selectionChanged); } @@ -78,7 +78,7 @@ void TablesPage::setCatalog(std::shared_ptr cat) } -void TablesPage::on_tableListTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous) +void TablesPage::tableListTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous) { if (current.row() != previous.row()) { PgClass table = m_tablesModel->getTable(current.row()); @@ -94,7 +94,7 @@ void TablesPage::on_tableListTable_currentRowChanged(const QModelIndex ¤t, } } -void TablesPage::on_constraintsTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous) +void TablesPage::constraintsTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous) { if (current.row() != previous.row()) { // QString drop_definition = m_constraintModel->dropDefinition(current.row()); @@ -107,7 +107,7 @@ void TablesPage::on_constraintsTable_currentRowChanged(const QModelIndex ¤ } } -void TablesPage::on_constraintsTable_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) +void TablesPage::constraintsTable_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) { const auto indexes = ui->constraintsTable->selectionModel()->selectedIndexes(); boost::container::flat_set rijen; diff --git a/pglab/TablesPage.h b/pglab/TablesPage.h index 6d29497..3cfd30a 100644 --- a/pglab/TablesPage.h +++ b/pglab/TablesPage.h @@ -36,9 +36,9 @@ private: private slots: - void on_tableListTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous); - void on_constraintsTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous); - void on_constraintsTable_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); + void tableListTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous); + void constraintsTable_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous); + void constraintsTable_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); }; #endif // TABLESPAGE_H