Gui: Qt6 port

* QString::indexOf() is now marked as [[nodiscard]]
* Replace deprecated methods of QMessageBox
* QMouseEvent::globalPos() is deprecated, use globalPosition().toPoint()
* QWidget::enterEvent() requires a QEnterEvent as argument
* QLibraryInfo::location() is deprecated, use path()
* QVariant::Type is deprecated, use QMetaType::Type
* QVariant::canConvert(int) is deprecated, use QVariant::canConvert(QMetaType) or QVariant::canConvert<T>()
* QMessageBox::standardIcon is deprecated, use QStyle::standardIcon()
* Replace deprecated method QMessageBox::question(), ...
* QApplication::fontMetrics() is deprecated
* QDropEvent::mouseButtons() is deprecated, use buttons()
* QDropEvent::keyboardModifiers() is deprecated, use modifiers()
* Constructor of QFontDatabase is deprecated, use static methods instead
* Qt::AA_DisableHighDpiScaling is deprecated
* Qt::AA_EnableHighDpiScaling is deprecated
* Qt::AA_UseHighDpiPixmaps is deprecated
This commit is contained in:
wmayer
2022-11-05 15:08:58 +01:00
parent a11bde5105
commit 09ae3b2ab8
19 changed files with 123 additions and 49 deletions

View File

@@ -319,9 +319,9 @@ void ProgressDialog::onCancel()
bool ProgressDialog::canAbort() const
{
int ret = QMessageBox::question(getMainWindow(),tr("Aborting"),
tr("Do you really want to abort the operation?"), QMessageBox::Yes,
QMessageBox::No|QMessageBox::Default);
auto ret = QMessageBox::question(getMainWindow(),tr("Aborting"),
tr("Do you really want to abort the operation?"), QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
return (ret == QMessageBox::Yes) ? true : false;
}