diff --git a/cli.cpp b/cli.cpp index bc3875f0..9ecd37f3 100644 --- a/cli.cpp +++ b/cli.cpp @@ -29,7 +29,7 @@ \*-------------------------------------------------------------*/ #ifdef _WIN32 #include - #define strcasecmp strcmpi + #define strcasecmp _strcmpi #endif using namespace std::chrono_literals; diff --git a/main.cpp b/main.cpp index 9b06f0e9..a9cf6404 100644 --- a/main.cpp +++ b/main.cpp @@ -221,8 +221,10 @@ int main(int argc, char* argv[]) /*-----------------------------------------------------*\ | Enable high DPI scaling support | \*-----------------------------------------------------*/ - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); + #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); + #endif /*-----------------------------------------------------*\ | Enable high DPI fractional scaling support on Windows | diff --git a/qt/DeviceView.cpp b/qt/DeviceView.cpp index 1131854a..eb187910 100644 --- a/qt/DeviceView.cpp +++ b/qt/DeviceView.cpp @@ -596,10 +596,17 @@ void DeviceView::mousePressEvent(QMouseEvent *event) /*-----------------------------------------------------*\ | It's okay if the size becomes negative | \*-----------------------------------------------------*/ - selectionRect.setLeft(event->x()); - selectionRect.setTop(event->y()); - selectionRect.setRight(event->x()); - selectionRect.setBottom(event->y()); + #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + selectionRect.setLeft(event->position().x()); + selectionRect.setTop(event->position().y()); + selectionRect.setRight(event->position().x()); + selectionRect.setBottom(event->position().y()); + #else + selectionRect.setLeft(event->x()); + selectionRect.setTop(event->y()); + selectionRect.setRight(event->x()); + selectionRect.setBottom(event->y()); + #endif updateSelection(); update(); @@ -611,8 +618,14 @@ void DeviceView::mouseMoveEvent(QMouseEvent *event) if(per_led) { lastMousePos = event->pos(); - selectionRect.setRight(event->x()); - selectionRect.setBottom(event->y()); + + #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + selectionRect.setRight(event->position().x()); + selectionRect.setBottom(event->position().y()); + #else + selectionRect.setRight(event->x()); + selectionRect.setBottom(event->y()); + #endif if(mouseDown) { diff --git a/qt/OpenRGBDialog/OpenRGBDialog.cpp b/qt/OpenRGBDialog/OpenRGBDialog.cpp index 72553497..2ee9392b 100644 --- a/qt/OpenRGBDialog/OpenRGBDialog.cpp +++ b/qt/OpenRGBDialog/OpenRGBDialog.cpp @@ -1641,7 +1641,11 @@ void OpenRGBDialog::onShowDialogMessage() DontShowAgain = false; - QObject::connect(CheckBox_DontShowAgain, &QCheckBox::stateChanged, [this](int state) + #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QObject::connect(CheckBox_DontShowAgain, &QCheckBox::checkStateChanged, [this](Qt::CheckState state) + #else + QObject::connect(CheckBox_DontShowAgain, &QCheckBox::stateChanged, [this](int state) + #endif { if(static_cast(state) == Qt::CheckState::Checked) {