]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
more deprecation warning/Qt6 stuff
authorgg <chown_tee@proton.me>
Sat, 10 Jan 2026 05:13:33 +0000 (00:13 -0500)
committergg <chown_tee@proton.me>
Sat, 10 Jan 2026 05:13:33 +0000 (00:13 -0500)
src/plugins/crowdfunding/CCSProgressDelegate.cpp
src/qrcode/utils/QrCodeUtils.cpp
src/qrcode/utils/QrCodeUtils.h
src/utils/WebsocketClient.cpp
src/widgets/NodeWidget.cpp

index c915d24d445a78d97e09311779dd3e33391624b5..021b36eaa6f45a4adf04ef2e763091b3be2950db 100644 (file)
@@ -23,7 +23,7 @@ void CCSProgressDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
     progressBarOption.state = QStyle::State_Enabled;
     progressBarOption.direction = QApplication::layoutDirection();
     progressBarOption.rect = option.rect;
-    progressBarOption.fontMetrics = QApplication::fontMetrics();
+    progressBarOption.fontMetrics = QFontMetrics(qApp->font());
     progressBarOption.minimum = 0;
     progressBarOption.maximum = 100;
     progressBarOption.textAlignment = Qt::AlignCenter;
index e957780f0e1214d52128d2d8ce3688cfc6d88683..ee3841eb33db6053e814cfab8a2e180d69dbf273 100644 (file)
@@ -3,14 +3,14 @@
 
 #include "QrCodeUtils.h"
 
-Result QrCodeUtils::ReadBarcode(const QImage& img, const ZXing::DecodeHints& hints)
+Result QrCodeUtils::ReadBarcode(const QImage& img, const ZXing::ReaderOptions& hints)
 {
     auto ImgFmtFromQImg = [](const QImage& img){
         switch (img.format()) {
             case QImage::Format_ARGB32:
             case QImage::Format_RGB32:
 #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
-                return ZXing::ImageFormat::BGRX;
+                return ZXing::ImageFormat::BGRA;
 
 #else
                 return ZXing::ImageFormat::XRGB;
@@ -21,7 +21,7 @@ Result QrCodeUtils::ReadBarcode(const QImage& img, const ZXing::DecodeHints& hin
 
             case QImage::Format_RGBX8888:
             case QImage::Format_RGBA8888: 
-                return ZXing::ImageFormat::RGBX;
+                return ZXing::ImageFormat::RGBA;
 
             case QImage::Format_Grayscale8: 
                 return ZXing::ImageFormat::Lum;
@@ -50,7 +50,7 @@ Result QrCodeUtils::ReadBarcode(const QImage& img, const ZXing::DecodeHints& hin
 
 
 QString QrCodeUtils::scanImage(const QImage &img) {
-    const auto hints = ZXing::DecodeHints()
+    const auto hints = ZXing::ReaderOptions()
             .setFormats(ZXing::BarcodeFormat::QRCode | ZXing::BarcodeFormat::DataMatrix)
             .setTryHarder(true)
             .setBinarizer(ZXing::Binarizer::FixedThreshold);
index 305bc96843f74d0c510e3225ae9a221957935659..b41c7be04bbaa772dccee95021cfaf76f833e862 100644 (file)
@@ -27,7 +27,7 @@ private:
 class QrCodeUtils {
 public:
     static QString scanImage(const QImage &img);
-    static Result ReadBarcode(const QImage& img, const ZXing::DecodeHints& hints = { });
+    static Result ReadBarcode(const QImage& img, const ZXing::ReaderOptions& hints = { });
 };
 
 #endif //FEATHER_QRCODEUTILS_H
index 815666bfdc64808601ffe5f5835e5aaf7fe0bb53..fd0e089a6a35d5991e6634748f9fbb0f60549a7e 100644 (file)
@@ -20,7 +20,7 @@ WebsocketClient::WebsocketClient(QObject *parent)
     connect(webSocket, &QWebSocket::stateChanged, this, &WebsocketClient::onStateChanged);
     connect(webSocket, &QWebSocket::connected, this, &WebsocketClient::onConnected);
     connect(webSocket, &QWebSocket::disconnected, this, &WebsocketClient::onDisconnected);
-    connect(webSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error), this, &WebsocketClient::onError);
+    connect(webSocket, &QWebSocket::errorOccurred, this, &WebsocketClient::onError);
 
     connect(webSocket, &QWebSocket::binaryMessageReceived, this, &WebsocketClient::onbinaryMessageReceived);
 
index b2c94e775284e3bdefb5ee1e68cd65a1cdfefddc..b01e5d23226f8de00182582742b669dec53cdee5 100644 (file)
@@ -21,8 +21,8 @@ NodeWidget::NodeWidget(QWidget *parent)
 
     connect(ui->btn_addCustomNodes, &QPushButton::clicked, this, &NodeWidget::onCustomAddClicked);
 
-    connect(ui->checkBox_websocketList, &QCheckBox::stateChanged, [this](int id){
-        bool custom = (id == 0);
+    connect(ui->checkBox_websocketList, &QCheckBox::checkStateChanged, [this](Qt::CheckState state){
+        bool custom = (state == Qt::Unchecked);
         ui->stackedWidget->setCurrentIndex(custom);
         ui->frame_addCustomNodes->setVisible(custom);
         conf()->set(Config::nodeSource, custom);