diff --git a/lib/legacy/switch-file.cpp b/lib/legacy/switch-file.cpp index 0feed74d..30e52556 100644 --- a/lib/legacy/switch-file.cpp +++ b/lib/legacy/switch-file.cpp @@ -122,11 +122,7 @@ void SwitcherData::writeToStatusFile(const QString &msg) QFile file(QString::fromStdString(fileIO.writePath)); if (file.open(QIODevice::ReadWrite)) { QTextStream stream(&file); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - stream << msg << "\n"; -#else stream << msg << Qt::endl; -#endif } file.close(); } diff --git a/lib/macro/macro-input.cpp b/lib/macro/macro-input.cpp index 026f74d9..527cdca9 100644 --- a/lib/macro/macro-input.cpp +++ b/lib/macro/macro-input.cpp @@ -181,15 +181,7 @@ void MacroInputEdit::SetInputVariablesAndValues( _variables = inputs; _values = values; if ((size_t)_values.size() < _variables._inputVariables.size()) { -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - for (int i = 0; - _variables._inputVariables.size() - (size_t)_values.size(); - i++) { - _values.push_back({}); - } -#else _values.resize(_variables._inputVariables.size()); -#endif } SetupWidgets(); } diff --git a/lib/macro/macro-segment-list.cpp b/lib/macro/macro-segment-list.cpp index 98a0856c..ee46ee45 100644 --- a/lib/macro/macro-segment-list.cpp +++ b/lib/macro/macro-segment-list.cpp @@ -178,11 +178,7 @@ void MacroSegmentList::mousePressEvent(QMouseEvent *event) { if (event->button() == Qt::LeftButton || event->button() == Qt::RightButton) { -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - _dragPosition = GetDragIndex(event->globalPos()); -#else _dragPosition = GetDragIndex(event->globalPosition().toPoint()); -#endif emit SelectionChanged(_dragPosition); } else { _dragPosition = -1; @@ -300,11 +296,7 @@ void MacroSegmentList::dragMoveEvent(QDragMoveEvent *event) return; } -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - _dragCursorPos = (mapToGlobal(event->pos())); -#else _dragCursorPos = (mapToGlobal(event->position().toPoint())); -#endif CheckDropLine(_dragCursorPos); } @@ -450,16 +442,6 @@ void MacroSegmentList::dropEvent(QDropEvent *event) { HideLastDropLine(); auto widget = qobject_cast(event->source()); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - if (widget && !widget->geometry().contains(event->pos()) && - widgetIsInLayout(widget, _contentLayout)) { - int dropPosition = GetDropIndex(mapToGlobal(event->pos())); - if (dropPosition == -1) { - return; - } - emit Reorder(dropPosition, _dragPosition); - } -#else if (widget && !widget->geometry().contains(event->position().toPoint()) && widgetIsInLayout(widget, _contentLayout)) { @@ -470,7 +452,6 @@ void MacroSegmentList::dropEvent(QDropEvent *event) } emit Reorder(dropPosition, _dragPosition); } -#endif _dragPosition = -1; } diff --git a/lib/macro/macro-segment.cpp b/lib/macro/macro-segment.cpp index ce719ef6..cd6cbf43 100644 --- a/lib/macro/macro-segment.cpp +++ b/lib/macro/macro-segment.cpp @@ -294,13 +294,8 @@ bool MacroSegmentEdit::eventFilter(QObject *obj, QEvent *ev) QMouseEvent *newEvent = new QMouseEvent( mouseEvent->type(), _headerInfo->mapTo(this, mouseEvent->pos()), -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - mouseEvent->globalPos(), -#else - mouseEvent->globalPosition(), -#endif - mouseEvent->button(), mouseEvent->buttons(), - mouseEvent->modifiers()); + mouseEvent->globalPosition(), mouseEvent->button(), + mouseEvent->buttons(), mouseEvent->modifiers()); QApplication::sendEvent(parentWidget(), newEvent); } return QWidget::eventFilter(obj, ev); diff --git a/lib/macro/macro-tree.cpp b/lib/macro/macro-tree.cpp index f0b5b037..bfeb8ee1 100644 --- a/lib/macro/macro-tree.cpp +++ b/lib/macro/macro-tree.cpp @@ -889,14 +889,7 @@ void MacroTree::dropEvent(QDropEvent *event) QModelIndexList indices = selectedIndexes(); DropIndicatorPosition indicator = dropIndicatorPosition(); - int row = indexAt( -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - event->position().toPoint() -#else - event->pos() -#endif - ) - .row(); + int row = indexAt(event->position().toPoint()).row(); bool emptyDrop = row == -1; if (emptyDrop) { diff --git a/lib/utils/auto-update-tooltip-label.cpp b/lib/utils/auto-update-tooltip-label.cpp index 819b9d92..fcd8ea6b 100644 --- a/lib/utils/auto-update-tooltip-label.cpp +++ b/lib/utils/auto-update-tooltip-label.cpp @@ -14,11 +14,7 @@ AutoUpdateTooltipLabel::AutoUpdateTooltipLabel( &AutoUpdateTooltipLabel::UpdateTooltip); } -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) void AutoUpdateTooltipLabel::enterEvent(QEnterEvent *event) -#else -void AutoUpdateTooltipLabel::enterEvent(QEvent *event) -#endif { _timer->start(_updateIntervalMs); QLabel::enterEvent(event); diff --git a/lib/utils/auto-update-tooltip-label.hpp b/lib/utils/auto-update-tooltip-label.hpp index 1657cbc7..8ac4c122 100644 --- a/lib/utils/auto-update-tooltip-label.hpp +++ b/lib/utils/auto-update-tooltip-label.hpp @@ -17,11 +17,7 @@ public: int updateIntervalMs = 300); protected: -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) void enterEvent(QEnterEvent *event) override; -#else - void enterEvent(QEvent *event) override; -#endif void leaveEvent(QEvent *event) override; private slots: diff --git a/plugins/video/macro-condition-video.cpp b/plugins/video/macro-condition-video.cpp index f310fc39..7b5c3c51 100644 --- a/plugins/video/macro-condition-video.cpp +++ b/plugins/video/macro-condition-video.cpp @@ -1384,23 +1384,12 @@ void MacroConditionVideoEdit::ImageBrowseButtonClicked() "AdvSceneSwitcher.condition.video.askFileAction"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - msgBox.setButtonText( - QMessageBox::Yes, - obs_module_text( - "AdvSceneSwitcher.condition.video.askFileAction.file")); - msgBox.setButtonText( - QMessageBox::No, - obs_module_text( - "AdvSceneSwitcher.condition.video.askFileAction.screenshot")); -#else auto yes = msgBox.button(QMessageBox::StandardButton::Yes); yes->setText(obs_module_text( "AdvSceneSwitcher.condition.video.askFileAction.file")); auto no = msgBox.button(QMessageBox::StandardButton::No); no->setText(obs_module_text( "AdvSceneSwitcher.condition.video.askFileAction.screenshot")); -#endif msgBox.setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint); const auto result = msgBox.exec();