diff options
author | Arno <arno@disconnect.de> | 2022-04-15 13:27:34 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2022-04-15 13:27:34 +0200 |
commit | 856119c5a43b4781b051b93a0713c152cfd99f85 (patch) | |
tree | 4e2fde4e7a76179cc243e0665091c6ad429ea640 /mappingtreewidget.cpp | |
parent | 62d3ca1482b202d2883eeb5e17e72300e8612477 (diff) | |
download | SheMov-856119c5a43b4781b051b93a0713c152cfd99f85.tar.gz SheMov-856119c5a43b4781b051b93a0713c152cfd99f85.tar.bz2 SheMov-856119c5a43b4781b051b93a0713c152cfd99f85.zip |
Make it run with Qt6
This is a huge commit. Changes:
* Obviously, make it compile
* Make it run (only scarcely tested)
* get rid of most of clang's warnings
Let's see what surprises are in store...
Diffstat (limited to 'mappingtreewidget.cpp')
-rw-r--r-- | mappingtreewidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mappingtreewidget.cpp b/mappingtreewidget.cpp index 6c6a495..7fd8071 100644 --- a/mappingtreewidget.cpp +++ b/mappingtreewidget.cpp @@ -106,7 +106,7 @@ MappingTreeWidget::MappingTreeWidget(QWidget *parent) : QWidget(parent){ //setup actions QAction *addActorA = new QAction(QIcon(":/fire.png"), tr("Add actor..."), this); - addActorA->setShortcut(Qt::CTRL + Qt::Key_A); + addActorA->setShortcut(Qt::CTRL | Qt::Key_A); connect(addActorA, &QAction::triggered, this, &MappingTreeWidget::addActor); mTree->addAction(addActorA); mTree->addAction(Helper::createSeparator(this)); @@ -243,7 +243,7 @@ void MappingTreeWidget::deleteChild(){ QModelIndex sel = selected(); QModelIndex real = mProxy->mapToSource(sel); if(mModel->rowCount(real) > 0){ - QString msg = QString(tr("Cannot delete item %1, because it has %2 children!")).arg(real.data().toString()).arg(QString::number(mModel->rowCount(real))); + QString msg = QString(tr("Cannot delete item %1, because it has %2 children!")).arg(real.data().toString(), QString::number(mModel->rowCount(real))); QMessageBox::critical(this, tr("Error"), msg); return; } @@ -252,7 +252,7 @@ void MappingTreeWidget::deleteChild(){ if(retval == QMessageBox::Yes){ if(!mModel->deleteChild(real)){ QSqlError last = mModel->lastError(); - QString msg = QString(tr("Failed to delete %1. Database said: %2")).arg(real.data().toString()).arg(last.text()); + QString msg = QString(tr("Failed to delete %1. Database said: %2")).arg(real.data().toString(), last.text()); QMessageBox::critical(this, tr("Error"), msg); } } |