Use a common way to check for Qt6 instead of introducing UB

This commit is contained in:
Alexey Sokolov 2025-01-02 23:18:05 +00:00 committed by Adam Honse
parent 49036313d0
commit b2ea4212fd
2 changed files with 1 additions and 3 deletions

View file

@ -21,8 +21,6 @@ CONFIG += c++17
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 5): DEFINES += _QT6
#-----------------------------------------------------------------------------------------------#
# Application Configuration #
#-----------------------------------------------------------------------------------------------#

View file

@ -70,7 +70,7 @@ void OpenRGBSupportedDevicesPage::on_GetHardwareIDsButton_clicked()
void OpenRGBSupportedDevicesPage::on_Filter_textChanged(const QString &arg1)
{
#ifdef _QT6
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
detectorSortModel->setFilterRegularExpression(QRegularExpression(arg1 , QRegularExpression::CaseInsensitiveOption));
#else
detectorSortModel->setFilterRegExp(QRegExp(arg1, Qt::CaseInsensitive));