}
qsizetype Wallet::seedLength() const {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
auto seedLength = this->getCacheAttribute("feather.seed").split(" ", Qt::SkipEmptyParts).length();
+#else
+ auto seedLength = this->getCacheAttribute("feather.seed").split(" ", QString::SkipEmptyParts).length();
+#endif
+
return seedLength ? seedLength : 25;
}
QString filename = Utils::getRestoreHeightFilename(static_cast<NetworkType::Type>(nettype));
std::unique_ptr<RestoreHeightLookup> lookup(RestoreHeightLookup::fromFile(filename, static_cast<NetworkType::Type>(nettype)));
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
uint64_t startHeight = lookup->dateToHeight(start.startOfDay().toSecsSinceEpoch());
uint64_t endHeight = lookup->dateToHeight(end.startOfDay().toSecsSinceEpoch());
+#else
+ // Legacy Qt 5.12
+ uint64_t startHeight = lookup->dateToHeight(QDateTime(start, QTime(0, 0, 0)).toSecsSinceEpoch());
+ uint64_t endHeight = lookup->dateToHeight(QDateTime(end, QTime(0, 0, 0)).toSecsSinceEpoch());
+#endif
if (startHeight >= endHeight)
return;
#define FEATHER_CONSTRUCTIONINFO_H
#include <QSet>
+#include <QVector> // Qt 5.12 support (Ubuntu 20.04)
#include "Output.h"
#include "Input.h"
#include "TxFiatHistory.h"
#include <QJsonObject>
+#include <QDebug> // For Qt5 compatibility
+#include <QSet> // For Qt5 compatibility
#include "utils/Utils.h"
bool fileWrite(const QString &path, const QString &data) {
QFile file(path);
if (file.open(QIODevice::WriteOnly)) {
- QTextStream out(&file); out << data << Qt::endl;
+ QTextStream out(&file);
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ out << data << Qt::endl;
+#else
+ out << data << endl; // Legacy Qt 5.12 uses the global/stream 'endl'
+#endif
file.close();
return true;
}
QPixmap infoIcon = QPixmap(":/assets/images/info2.svg");
ui->infoIcon->setPixmap(infoIcon.scaledToWidth(32, Qt::SmoothTransformation));
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect(ui->btnGroup_network, &QButtonGroup::idClicked, [this](int id) {
+#else
+ // Qt 5.12: Explicitly select the 'int' overload of buttonClicked
+ connect(ui->btnGroup_network, QOverload<int>::of(&QButtonGroup::buttonClicked), [this](int id) {
+#endif
ui->frame_customNode->setVisible(id == Button::CUSTOM);
});
+
connect(ui->line_customNode, &QLineEdit::textEdited, [this]{
this->completeChanged();
});
seed = seed.replace("\n", " ").replace("\r", "").trimmed();
auto errStyle = "QTextEdit{border: 1px solid red;}";
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QStringList seedSplit = seed.split(" ", Qt::SkipEmptyParts);
+#else
+ QStringList seedSplit = seed.split(" ", QString::SkipEmptyParts);
+#endif
if (seedSplit.length() != m_mode->length) {
if (!(m_mode->type == Seed::Type::MONERO && seedSplit.length() == 24)) {