From 856119c5a43b4781b051b93a0713c152cfd99f85 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 15 Apr 2022 13:27:34 +0200 Subject: 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... --- mappingtreewidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mappingtreewidget.cpp') 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); } } -- cgit v1.2.3-70-g09d2