Skip to content

Commit

Permalink
Merge #14527: qa: Revert "Make qt wallet test compatible with qt4"
Browse files Browse the repository at this point in the history
fadffae Revert "Make qt wallet test compatible with qt4" (MarcoFalke)

Pull request description:

  This removes the file added in #10098

Tree-SHA512: 4aa887ec02aec943f3d74f469c935acf57e43ddbea6f979bb37d3a14670571fa2276cf578e8978de92b5854d8b462f24e5e0addfb27b92fbedf90726eb5d985e
  • Loading branch information
laanwj committed Oct 20, 2018
2 parents 6746a89 + fadffae commit 96c409c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 46 deletions.
3 changes: 0 additions & 3 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ QT_MOC_CPP = \
qt/moc_bitcoinamountfield.cpp \
qt/moc_bitcoingui.cpp \
qt/moc_bitcoinunits.cpp \
qt/moc_callback.cpp \
qt/moc_clientmodel.cpp \
qt/moc_coincontroldialog.cpp \
qt/moc_coincontroltreewidget.cpp \
Expand Down Expand Up @@ -168,7 +167,6 @@ BITCOIN_MM = \
QT_MOC = \
qt/bitcoin.moc \
qt/bitcoinamountfield.moc \
qt/callback.moc \
qt/intro.moc \
qt/overviewpage.moc \
qt/rpcconsole.moc
Expand All @@ -191,7 +189,6 @@ BITCOIN_QT_H = \
qt/bitcoinamountfield.h \
qt/bitcoingui.h \
qt/bitcoinunits.h \
qt/callback.h \
qt/clientmodel.h \
qt/coincontroldialog.h \
qt/coincontroltreewidget.h \
Expand Down
30 changes: 0 additions & 30 deletions src/qt/callback.h

This file was deleted.

3 changes: 1 addition & 2 deletions src/qt/test/addressbooktests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
#include <qt/addressbookpage.h>
#include <qt/addresstablemodel.h>
#include <qt/editaddressdialog.h>
#include <qt/callback.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#include <qt/qvalidatedlineedit.h>
#include <qt/walletmodel.h>

#include <key.h>
#include <pubkey.h>
#include <key_io.h>
#include <pubkey.h>
#include <wallet/wallet.h>

#include <QApplication>
Expand Down
11 changes: 4 additions & 7 deletions src/qt/test/util.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
#include <qt/callback.h>

#include <QApplication>
#include <QMessageBox>
#include <QTimer>
#include <QString>
#include <QPushButton>
#include <QString>
#include <QTimer>
#include <QWidget>

void ConfirmMessage(QString* text, int msec)
{
QTimer::singleShot(msec, makeCallback([text](Callback* callback) {
QTimer::singleShot(msec, [text]() {
for (QWidget* widget : QApplication::topLevelWidgets()) {
if (widget->inherits("QMessageBox")) {
QMessageBox* messageBox = qobject_cast<QMessageBox*>(widget);
if (text) *text = messageBox->text();
messageBox->defaultButton()->click();
}
}
delete callback;
}), &Callback::call);
});
}
6 changes: 2 additions & 4 deletions src/qt/test/wallettests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <interfaces/node.h>
#include <qt/bitcoinamountfield.h>
#include <qt/callback.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#include <qt/qvalidatedlineedit.h>
Expand Down Expand Up @@ -39,7 +38,7 @@ namespace
//! Press "Yes" or "Cancel" buttons in modal send confirmation dialog.
void ConfirmSend(QString* text = nullptr, bool cancel = false)
{
QTimer::singleShot(0, makeCallback([text, cancel](Callback* callback) {
QTimer::singleShot(0, [text, cancel]() {
for (QWidget* widget : QApplication::topLevelWidgets()) {
if (widget->inherits("SendConfirmationDialog")) {
SendConfirmationDialog* dialog = qobject_cast<SendConfirmationDialog*>(widget);
Expand All @@ -49,8 +48,7 @@ void ConfirmSend(QString* text = nullptr, bool cancel = false)
button->click();
}
}
delete callback;
}), &Callback::call);
});
}

//! Send coins to address and return txid.
Expand Down

0 comments on commit 96c409c

Please sign in to comment.