mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-20 04:15:53 +01:00
commit
0a4d65dd99
@ -200,9 +200,9 @@ bool DaemonManager::stopWatcher(NetworkType::Type nettype) const
|
||||
if(counter >= 5) {
|
||||
qDebug() << "Killing it! ";
|
||||
#ifdef Q_OS_WIN
|
||||
QProcess::execute("taskkill /F /IM monerod.exe");
|
||||
QProcess::execute("taskkill", {"/F", "/IM", "monerod.exe"});
|
||||
#else
|
||||
QProcess::execute("pkill monerod");
|
||||
QProcess::execute("pkill", {"monerod"});
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <QDebug>
|
||||
#include <QReadLocker>
|
||||
#include <QWriteLocker>
|
||||
#include <QtGlobal>
|
||||
|
||||
|
||||
bool TransactionHistory::transaction(int index, std::function<void (TransactionInfo &)> callback)
|
||||
@ -58,7 +59,11 @@ bool TransactionHistory::transaction(int index, std::function<void (TransactionI
|
||||
|
||||
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();
|
||||
@ -143,7 +148,11 @@ bool TransactionHistory::TransactionHistory::locked() const
|
||||
TransactionHistory::TransactionHistory(Monero::TransactionHistory *pimpl, QObject *parent)
|
||||
: QObject(parent), m_pimpl(pimpl), m_minutesToUnlock(0), m_locked(false)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
m_firstDateTime = QDate(2014, 4, 18).startOfDay();
|
||||
#else
|
||||
m_firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block
|
||||
#endif
|
||||
m_lastDateTime = QDateTime::currentDateTime().addDays(1); // tomorrow (guard against jitter and timezones)
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "TransactionHistoryModel.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace {
|
||||
/**
|
||||
@ -204,9 +205,14 @@ bool TransactionHistorySortFilterModel::filterAcceptsRow(int source_row, const Q
|
||||
break;
|
||||
case TransactionHistoryModel::TransactionTimeStampRole:
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QDateTime from = dateFromFilter().startOfDay();
|
||||
QDateTime to = dateToFilter().endOfDay();
|
||||
#else
|
||||
QDateTime from = QDateTime(dateFromFilter());
|
||||
QDateTime to = QDateTime(dateToFilter());
|
||||
to = to.addDays(1); // including upperbound
|
||||
#endif
|
||||
QDateTime timestamp = data.toDateTime();
|
||||
bool matchFrom = from.isNull() || timestamp.isNull() || timestamp >= from;
|
||||
bool matchTo = to.isNull() || timestamp.isNull() || timestamp <= to;
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include <QtCore>
|
||||
#include <QApplication>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "TailsOS.h"
|
||||
#include "utils.h"
|
||||
@ -68,7 +69,8 @@ QByteArray fileOpen(QString path) {
|
||||
bool fileWrite(QString path, QString data) {
|
||||
QFile file(path);
|
||||
if(file.open(QIODevice::WriteOnly)){
|
||||
QTextStream out(&file); out << data << endl;
|
||||
QTextStream out(&file);
|
||||
out << data << '\n';
|
||||
file.close();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user