mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-09 15:12:59 -04:00
Use a common way to check for Qt6 instead of introducing UB
This commit is contained in:
committed by
Adam Honse
parent
49036313d0
commit
b2ea4212fd
@@ -21,8 +21,6 @@ CONFIG += c++17
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 5): DEFINES += _QT6
|
||||
|
||||
#-----------------------------------------------------------------------------------------------#
|
||||
# Application Configuration #
|
||||
#-----------------------------------------------------------------------------------------------#
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user