Fix Qt 6 deprecation warnings

This commit is contained in:
Alexander Babikov
2025-08-15 00:31:57 +05:00
parent bc3caa557f
commit d2509bd2ad
6 changed files with 40 additions and 0 deletions

View File

@@ -736,7 +736,11 @@ MainWindow::MainWindow(QWidget *parent)
setContextMenuPolicy(Qt::PreventContextMenu);
/* Remove default Shift+F10 handler, which unfocuses keyboard input even with no context menu. */
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
connect(new QShortcut(QKeySequence(Qt::SHIFT | Qt::Key_F10), this), &QShortcut::activated, this, [](){});
#else
connect(new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_F10), this), &QShortcut::activated, this, [](){});
#endif
connect(this, &MainWindow::initRendererMonitor, this, &MainWindow::initRendererMonitorSlot);
connect(this, &MainWindow::initRendererMonitorForNonQtThread, this, &MainWindow::initRendererMonitorSlot, Qt::BlockingQueuedConnection);