mirror of
https://github.com/tnodir/fort
synced 2024-11-15 13:26:48 +00:00
UI: Fix build for Qt 5.
This commit is contained in:
parent
1f73f0795e
commit
b10340c394
2
src/3rdparty/qcustomplot/qcustomplot.h
vendored
2
src/3rdparty/qcustomplot/qcustomplot.h
vendored
@ -164,7 +164,9 @@ class QCP { // when in moc-run, make it look like a class, so we get Q_GADGET, Q
|
||||
Q_ENUMS(SelectionRectMode)
|
||||
Q_ENUMS(SelectionType)
|
||||
public:
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0)
|
||||
extern const QMetaObject staticMetaObject; // in moc-run we create a static meta object for QCP "fake" object. This line is the link to it via QCP::staticMetaObject in normal operation as namespace
|
||||
#endif
|
||||
|
||||
|
@ -75,7 +75,9 @@ void MainPage::setupTabBar()
|
||||
m_tabBar->addTab(statisticsPage, IconCache::icon(":/icons/database.png"), QString());
|
||||
m_tabBar->addTab(schedulePage, IconCache::icon(":/icons/clock.png"), QString());
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
m_tabBar->setTabVisible(2, false); // TODO: Impl. Network Rules
|
||||
#endif
|
||||
}
|
||||
|
||||
QLayout *MainPage::setupDialogButtons()
|
||||
|
@ -16,7 +16,14 @@ bool HotKeyManager::addAction(QAction *action, const QKeySequence &shortcut)
|
||||
{
|
||||
const int hotKeyId = m_actions.size();
|
||||
|
||||
if (!m_nativeEventFilter->registerHotKey(hotKeyId, shortcut[0]))
|
||||
const auto keyCombination = shortcut[0];
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
const int key = keyCombination;
|
||||
#else
|
||||
const int key = keyCombination.toCombined();
|
||||
#endif
|
||||
|
||||
if (!m_nativeEventFilter->registerHotKey(hotKeyId, key))
|
||||
return false;
|
||||
|
||||
action->setText(action->text() + '\t' + shortcut.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user