mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 11:39:25 +00:00
cmake: drop support for Qt 5
This commit is contained in:
parent
5a24c7acfb
commit
dabe88340f
6 changed files with 7 additions and 47 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue