Page MenuHomePhabricator

D6542.id21304.diff
No OneTemporary

D6542.id21304.diff

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -247,7 +247,8 @@
}
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) {
- SplashScreen *splash = new SplashScreen(m_node, nullptr, networkStyle);
+ SplashScreen *splash =
+ new SplashScreen(m_node, Qt::WindowFlags(), networkStyle);
// We don't hold a direct pointer to the splash screen after creation, but
// the splash screen will take care of deleting itself when slotFinish
// happens.
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1361,7 +1361,7 @@
bool proxy_enabled = clientModel->getProxyInfo(ip_port);
if (proxy_enabled) {
- if (labelProxyIcon->pixmap() == nullptr) {
+ if (labelProxyIcon->pixmap(Qt::ReturnByValue).isNull()) {
QString ip_port_q = QString::fromStdString(ip_port);
labelProxyIcon->setPixmap(
platformStyle->SingleColorIcon(":/icons/proxy")
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -270,7 +270,7 @@
}
// contains IP at index 0 and port at index 1
QStringList ip_port =
- settings.value(name).toString().split(":", QString::SkipEmptyParts);
+ settings.value(name).toString().split(":", Qt::SkipEmptyParts);
if (ip_port.size() == 2) {
return {true, ip_port.at(0), ip_port.at(1)};
} else { // Invalid: return default
diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp
--- a/src/qt/receiverequestdialog.cpp
+++ b/src/qt/receiverequestdialog.cpp
@@ -41,14 +41,15 @@
}
QImage QRImageWidget::exportImage() {
- if (!pixmap()) {
+ if (pixmap(Qt::ReturnByValue).isNull()) {
return QImage();
}
- return pixmap()->toImage();
+ return pixmap(Qt::ReturnByValue).toImage();
}
void QRImageWidget::mousePressEvent(QMouseEvent *event) {
- if (event->button() == Qt::LeftButton && pixmap()) {
+ if (event->button() == Qt::LeftButton &&
+ !pixmap(Qt::ReturnByValue).isNull()) {
event->accept();
QMimeData *mimeData = new QMimeData;
mimeData->setImageData(exportImage());
@@ -62,7 +63,7 @@
}
void QRImageWidget::saveImage() {
- if (!pixmap()) {
+ if (pixmap(Qt::ReturnByValue).isNull()) {
return;
}
QString fn = GUIUtil::getSaveFileName(this, tr("Save QR Code"), QString(),
@@ -73,14 +74,14 @@
}
void QRImageWidget::copyImage() {
- if (!pixmap()) {
+ if (pixmap(Qt::ReturnByValue).isNull()) {
return;
}
QApplication::clipboard()->setImage(exportImage());
}
void QRImageWidget::contextMenuEvent(QContextMenuEvent *event) {
- if (!pixmap()) {
+ if (pixmap(Qt::ReturnByValue).isNull()) {
return;
}
contextMenu->exec(event->globalPos());
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -724,10 +724,8 @@
static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
connect(banAction365d, &QAction::triggered, signalMapper,
static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
- connect(
- signalMapper,
- static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
- this, &RPCConsole::banSelectedNode);
+ connect(signalMapper, &QSignalMapper::mappedInt, this,
+ &RPCConsole::banSelectedNode);
// peer table context menu signals
connect(ui->peerWidget, &QTableView::customContextMenuRequested, this,
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -190,18 +190,12 @@
coinControlUpdateLabels();
// fee section
- connect(ui->groupFee,
- static_cast<void (QButtonGroup::*)(int)>(
- &QButtonGroup::buttonClicked),
- this, &SendCoinsDialog::updateFeeSectionControls);
- connect(ui->groupFee,
- static_cast<void (QButtonGroup::*)(int)>(
- &QButtonGroup::buttonClicked),
- this, &SendCoinsDialog::coinControlUpdateLabels);
- connect(ui->groupCustomFee,
- static_cast<void (QButtonGroup::*)(int)>(
- &QButtonGroup::buttonClicked),
- this, &SendCoinsDialog::coinControlUpdateLabels);
+ connect(ui->groupFee, &QButtonGroup::idClicked, this,
+ &SendCoinsDialog::updateFeeSectionControls);
+ connect(ui->groupFee, &QButtonGroup::idClicked, this,
+ &SendCoinsDialog::coinControlUpdateLabels);
+ connect(ui->groupCustomFee, &QButtonGroup::idClicked, this,
+ &SendCoinsDialog::coinControlUpdateLabels);
connect(ui->customFee, &BitcoinAmountField::valueChanged, this,
&SendCoinsDialog::coinControlUpdateLabels);
connect(ui->checkBoxMinimumFee, &QCheckBox::stateChanged, this,
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -183,10 +183,8 @@
mapperThirdPartyTxUrls = new QSignalMapper(this);
// Connect actions
- connect(mapperThirdPartyTxUrls,
- static_cast<void (QSignalMapper::*)(const QString &)>(
- &QSignalMapper::mapped),
- this, &TransactionView::openThirdPartyTxUrl);
+ connect(mapperThirdPartyTxUrls, &QSignalMapper::mappedString, this,
+ &TransactionView::openThirdPartyTxUrl);
connect(dateWidget,
static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this,
@@ -276,7 +274,7 @@
// Add third party transaction URLs to context menu
QStringList listUrls =
_model->getOptionsModel()->getThirdPartyTxUrls().split(
- "|", QString::SkipEmptyParts);
+ "|", Qt::SkipEmptyParts);
for (int i = 0; i < listUrls.size(); ++i) {
QString host =
QUrl(listUrls[i].trimmed(), QUrl::StrictMode).host();
@@ -321,29 +319,30 @@
break;
case Today:
transactionProxyModel->setDateRange(
- QDateTime(current), TransactionFilterProxy::MAX_DATE);
+ current.startOfDay(), TransactionFilterProxy::MAX_DATE);
break;
case ThisWeek: {
// Find last Monday
QDate startOfWeek = current.addDays(-(current.dayOfWeek() - 1));
transactionProxyModel->setDateRange(
- QDateTime(startOfWeek), TransactionFilterProxy::MAX_DATE);
+ startOfWeek.startOfDay(), TransactionFilterProxy::MAX_DATE);
} break;
case ThisMonth:
transactionProxyModel->setDateRange(
- QDateTime(QDate(current.year(), current.month(), 1)),
+ QDate(current.year(), current.month(), 1).startOfDay(),
TransactionFilterProxy::MAX_DATE);
break;
case LastMonth:
transactionProxyModel->setDateRange(
- QDateTime(
- QDate(current.year(), current.month(), 1).addMonths(-1)),
- QDateTime(QDate(current.year(), current.month(), 1)));
+ QDate(current.year(), current.month(), 1)
+ .addMonths(-1)
+ .startOfDay(),
+ QDate(current.year(), current.month(), 1).startOfDay());
break;
case ThisYear:
transactionProxyModel->setDateRange(
- QDateTime(QDate(current.year(), 1, 1)),
+ QDate(current.year(), 1, 1).startOfDay(),
TransactionFilterProxy::MAX_DATE);
break;
case Range:
@@ -630,8 +629,8 @@
return;
}
- transactionProxyModel->setDateRange(QDateTime(dateFrom->date()),
- QDateTime(dateTo->date()).addDays(1));
+ transactionProxyModel->setDateRange(dateFrom->date().startOfDay(),
+ dateTo->date().startOfDay().addDays(1));
}
void TransactionView::focusTransaction(const QModelIndex &idx) {
diff --git a/src/qt/utilitydialog.h b/src/qt/utilitydialog.h
--- a/src/qt/utilitydialog.h
+++ b/src/qt/utilitydialog.h
@@ -43,7 +43,8 @@
Q_OBJECT
public:
- explicit ShutdownWindow(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
+ explicit ShutdownWindow(QWidget *parent = nullptr,
+ Qt::WindowFlags f = Qt::WindowFlags());
static QWidget *showShutdownWindow(BitcoinGUI *window);
protected:

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 1, 09:12 (1 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187172
Default Alt Text
D6542.id21304.diff (8 KB)

Event Timeline