Network
Svg
WebSockets
+ SvgWidgets
)
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)
"qrcode/utils/*.cpp")
endif()
-if (WITH_SCANNER AND Qt6_FOUND)
+if (WITH_SCANNER)
file(GLOB SCANNER_FILES
"qrcode/scanner/*.h"
"qrcode/scanner/*.cpp")
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()
Qt::Network
Qt::Svg
Qt::WebSockets
+ Qt::SvgWidgets
Threads::Threads
${QRENCODE_LIBRARY}
${POLYSEED_LIBRARY}
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()
)
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()
}
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");
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);
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:
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();
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);