Add DEBUG macro for less typing

This commit is contained in:
Duke
2023-03-26 07:55:34 -07:00
parent 557e10e5e8
commit 0b72d01f4a
2 changed files with 10 additions and 9 deletions

View File

@@ -37,6 +37,7 @@
#include <QCoreApplication>
#include <QGuiApplication>
#include <QKeyEvent>
#include "sdl.h"
using json = nlohmann::json;
@@ -158,11 +159,11 @@ MainWindow::MainWindow(QWidget *parent) :
// Rescan
QObject::connect(ui->actionRescan, &QAction::triggered, [=]() {
Ui_Restore restoreSeed;
QDialog dialog(this);
restoreSeed.setupUi(&dialog);
Settings::saveRestore(&dialog);
DEBUG("rescan action triggered");
Ui_Restore restoreSeed;
QDialog dialog(this);
restoreSeed.setupUi(&dialog);
Settings::saveRestore(&dialog);
rpc->fetchSeed([=](json reply) {
if (isJsonError(reply)) {
@@ -260,15 +261,14 @@ MainWindow::MainWindow(QWidget *parent) :
// Then reload the connection. The ConnectionLoader deletes itself.
auto cl = new ConnectionLoader(this, rpc);
cl->loadConnection();
});
});
});
}
});
dialog.exec();
});
}); // actionReason
// Import Privkey
QObject::connect(ui->actionImport_Privatkey, &QAction::triggered, this, &MainWindow::importPrivKey);

1
src/sdl.h Normal file
View File

@@ -0,0 +1 @@
#define DEBUG(x) (qDebug() << QString(__func__) << ": " << x)