summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-11-23 15:30:05 +0100
committerArno <arno@disconnect.de>2018-11-23 15:30:05 +0100
commit2c542be7ddf0f8ef743ce3ccee8a71f4020776d1 (patch)
tree7ed380f0194be682cc19a81d28fe5e3e8ed813c4
parent819d643782e951284d06b88a3c30adf9a6260d17 (diff)
downloadSheMov-2c542be7ddf0f8ef743ce3ccee8a71f4020776d1.tar.gz
SheMov-2c542be7ddf0f8ef743ce3ccee8a71f4020776d1.tar.bz2
SheMov-2c542be7ddf0f8ef743ce3ccee8a71f4020776d1.zip
Use type safe connect in mappingtableeditor.cpp
Also use the proper typed return value in flags and remove the directory prefixes in the includes.
-rw-r--r--mappingtableeditor.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/mappingtableeditor.cpp b/mappingtableeditor.cpp
index d1fe985..4c85313 100644
--- a/mappingtableeditor.cpp
+++ b/mappingtableeditor.cpp
@@ -7,12 +7,12 @@
#include <QSqlQuery>
#include <QContextMenuEvent>
-#include <QtWidgets/QMenu>
-#include <QtWidgets/QHBoxLayout>
-#include <QtWidgets/QLineEdit>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QMessageBox>
+#include <QMenu>
+#include <QHBoxLayout>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QLabel>
+#include <QMessageBox>
#include <QSortFilterProxyModel>
#include "mappingtableeditor.h"
@@ -71,12 +71,12 @@ MappingTableEditor::MappingTableEditor(const QString &table, QWidget *parent) :
mView->addAction(mEditA);
//connections
- connect(mView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(selectionChanged(QModelIndex,QModelIndex)));
- connect(mClose, SIGNAL(clicked()), this, SLOT(accept()));
- connect(mDelete, SIGNAL(clicked()), this, SLOT(removeItem()));
- connect(mRename, SIGNAL(clicked()), this, SLOT(renameItem()));
- connect(mDeleteA, SIGNAL(triggered()), this, SLOT(removeItem()));
- connect(mEditA, SIGNAL(triggered()), this, SLOT(editItem()));
+ connect(mView->selectionModel(), &QItemSelectionModel::currentChanged, this, &MappingTableEditor::selectionChanged);
+ connect(mClose, &QPushButton::clicked, this, &MappingTableEditor::accept);
+ connect(mDelete, &QPushButton::clicked, this, &MappingTableEditor::removeItem);
+ connect(mRename, &QPushButton::clicked, this, &MappingTableEditor::renameItem);
+ connect(mDeleteA, &QAction::triggered, this, &MappingTableEditor::removeItem);
+ connect(mEditA, &QAction::triggered, this, &MappingTableEditor::editItem);
}
void MappingTableEditor::selectionChanged(const QModelIndex &cur, const QModelIndex &prev){
@@ -146,7 +146,7 @@ MappingTableEditorModel::MappingTableEditorModel(const QString &table, const QSt
Qt::ItemFlags MappingTableEditorModel::flags(const QModelIndex &index) const{
if(!index.isValid()){
- return 0;
+ return Qt::NoItemFlags;
}
Qt::ItemFlags retval = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
if(index.column() == 0){