diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fdad5df..479d4ab 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,7 @@ set(QT_COMPONENTS Network Svg WebSockets + SvgWidgets ) if (WITH_SCANNER) @@ -17,10 +18,7 @@ if (WITH_SCANNER) MultimediaWidgets) endif() -find_package(Qt6 COMPONENTS ${QT_COMPONENTS} SvgWidgets) -if (NOT Qt6_FOUND) - find_package(Qt5 5.15 REQUIRED COMPONENTS ${QT_COMPONENTS}) -endif() +find_package(Qt6 REQUIRED COMPONENTS ${QT_COMPONENTS}) set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication") add_subdirectory(third-party/singleapplication) @@ -85,7 +83,7 @@ if (WITH_SCANNER) "qrcode/utils/*.cpp") endif() -if (WITH_SCANNER AND Qt6_FOUND) +if (WITH_SCANNER) file(GLOB SCANNER_FILES "qrcode/scanner/*.h" "qrcode/scanner/*.cpp") @@ -185,7 +183,7 @@ if(XMRIG) target_compile_definitions(feather PRIVATE HAS_XMRIG=1) endif() -if(WITH_SCANNER AND Qt6_FOUND) +if(WITH_SCANNER) target_compile_definitions(feather PRIVATE WITH_SCANNER=1) endif() @@ -248,6 +246,7 @@ target_link_libraries(feather Qt::Network Qt::Svg Qt::WebSockets + Qt::SvgWidgets Threads::Threads ${QRENCODE_LIBRARY} ${POLYSEED_LIBRARY} @@ -265,10 +264,6 @@ if(DEPENDS) target_link_libraries(feather ${ICONV_LIBRARIES}) endif() -if(Qt6_FOUND) - target_link_libraries(feather Qt::SvgWidgets) -endif() - if(DEVICE_TREZOR_READY) target_link_libraries(feather ${TREZOR_DEP_LIBS}) endif() @@ -281,15 +276,7 @@ if (WITH_SCANNER) ) endif() -if(UNIX AND NOT APPLE AND STATIC AND NOT Qt6_FOUND) - target_link_libraries(feather - Qt5::QSvgIconPlugin - Qt5::QSvgPlugin - Qt5::QXcbIntegrationPlugin - ) -endif() - -if(STATIC AND UNIX AND NOT APPLE AND Qt6_FOUND) +if(STATIC AND UNIX AND NOT APPLE) target_link_libraries(feather Qt6::QComposePlatformInputContextPlugin) endif() diff --git a/src/SendWidget.cpp b/src/SendWidget.cpp index 21d1fd6..0896dcf 100644 --- a/src/SendWidget.cpp +++ b/src/SendWidget.cpp @@ -120,18 +120,7 @@ void SendWidget::fillAddress(const QString &address) { } void SendWidget::scanClicked() { -#if defined(WITH_SCANNER) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - auto cameras = QCameraInfo::availableCameras(); - if (cameras.count() < 1) { - Utils::showError(this, "Can't open QR scanner", "No available cameras found"); - return; - } - - auto *dialog = new QrCodeScanDialog(this); - dialog->exec(); - ui->lineAddress->setText(dialog->decodedString); - dialog->deleteLater(); -#elif defined(WITH_SCANNER) +#if defined(WITH_SCANNER) auto cameras = QMediaDevices::videoInputs(); if (cameras.empty()) { Utils::showError(this, "Can't open QR scanner", "No available cameras found"); diff --git a/src/components.cpp b/src/components.cpp index d1eb4bc..54c685a 100644 --- a/src/components.cpp +++ b/src/components.cpp @@ -52,11 +52,7 @@ void HelpLabel::mouseReleaseEvent(QMouseEvent *event) Utils::showInfo(this, m_text, m_informativeText, {}, m_doc); } -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -void HelpLabel::enterEvent(QEvent *event) -#else void HelpLabel::enterEvent(QEnterEvent *event) -#endif { font.setUnderline(true); setFont(font); diff --git a/src/components.h b/src/components.h index ce180c6..851cdf3 100644 --- a/src/components.h +++ b/src/components.h @@ -49,11 +49,7 @@ public: protected: void mouseReleaseEvent(QMouseEvent *event) override; -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - void enterEvent(QEvent *event) override; -#else void enterEvent(QEnterEvent *event) override; -#endif void leaveEvent(QEvent *event) override; private: diff --git a/src/libwalletqt/TransactionHistory.cpp b/src/libwalletqt/TransactionHistory.cpp index e9fa983..2a5877e 100644 --- a/src/libwalletqt/TransactionHistory.cpp +++ b/src/libwalletqt/TransactionHistory.cpp @@ -45,11 +45,7 @@ TransactionInfo* TransactionHistory::transaction(int index) void TransactionHistory::refresh(quint32 accountIndex) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QDateTime firstDateTime = QDate(2014, 4, 18).startOfDay(); -#else - QDateTime firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block -#endif QDateTime lastDateTime = QDateTime::currentDateTime().addDays(1); // tomorrow (guard against jitter and timezones) emit refreshStarted(); diff --git a/src/main.cpp b/src/main.cpp index 71cf064..da90b57 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -125,10 +125,6 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) { constants::networkType = NetworkType::MAINNET; // Setup QApplication -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); -#endif QApplication::setDesktopSettingsAware(true); // use system font QApplication::setApplicationVersion(FEATHER_VERSION);