From: gg Date: Tue, 13 Jan 2026 03:37:38 +0000 (-0500) Subject: Qt 6.7 + handles checkbox status change differently X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=1dd3f43c8ae1dfac6ebfdc400590e1bddd927db7;p=gamesguru%2Ffeather.git Qt 6.7 + handles checkbox status change differently --- diff --git a/src/dialog/QrCodeDialog.cpp b/src/dialog/QrCodeDialog.cpp index 1710ae26..6025d6f4 100644 --- a/src/dialog/QrCodeDialog.cpp +++ b/src/dialog/QrCodeDialog.cpp @@ -40,7 +40,10 @@ void QrCodeDialog::saveImage() { } QFile file(filename); - file.open(QIODevice::WriteOnly); + if (!file.open(QIODevice::WriteOnly)) { + QMessageBox::critical(this, "Error", "Could not open file for writing."); + return; + } m_pixmap.save(&file, "PNG"); QMessageBox::information(this, "Information", "QR code saved to file"); } diff --git a/src/widgets/NodeWidget.cpp b/src/widgets/NodeWidget.cpp index 995f07f4..49b2a6b4 100644 --- a/src/widgets/NodeWidget.cpp +++ b/src/widgets/NodeWidget.cpp @@ -3,6 +3,7 @@ #include "NodeWidget.h" #include "ui_NodeWidget.h" +#include #include #include @@ -21,8 +22,13 @@ NodeWidget::NodeWidget(QWidget *parent) connect(ui->btn_addCustomNodes, &QPushButton::clicked, this, &NodeWidget::onCustomAddClicked); +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + connect(ui->checkBox_websocketList, &QCheckBox::checkStateChanged, [this](Qt::CheckState state){ + bool custom = (state == Qt::Unchecked); +#else connect(ui->checkBox_websocketList, &QCheckBox::stateChanged, [this](int state){ bool custom = (state == Qt::Unchecked); +#endif ui->stackedWidget->setCurrentIndex(custom); ui->frame_addCustomNodes->setVisible(custom); conf()->set(Config::nodeSource, custom);