Browse Source

Merge branch 'master' of github.com:adityapk00/zec-qt-wallet

pull/45/head
Aditya Kulkarni 5 years ago
parent
commit
e8405fc0e8
  1. 3
      src/main.cpp
  2. 14
      src/mainwindow.cpp
  3. 1
      src/mainwindow.h

3
src/main.cpp

@ -233,6 +233,9 @@ public:
QTimer::singleShot(1, [=]() { w->payZcashURI(uri); });
});
// For MacOS, we have an event filter
a.installEventFilter(w);
// Check if starting headless
if (parser.isSet(headlessOption)) {
Settings::getInstance()->setHeadless(true);

14
src/mainwindow.cpp

@ -745,6 +745,20 @@ void MainWindow::balancesReady() {
}
// Event filter for MacOS specific handling of payment URIs
bool MainWindow::eventFilter(QObject *object, QEvent *event) {
if (event->type() == QEvent::FileOpen) {
QFileOpenEvent *fileEvent = static_cast<QFileOpenEvent*>(event);
if (!fileEvent->url().isEmpty())
payZcashURI(fileEvent->url().toString());
return true;
}
return QObject::eventFilter(object, event);
}
// Pay the Zcash URI by showing a confirmation window. If the URI parameter is empty, the UI
// will prompt for one.
void MainWindow::payZcashURI(QString uri) {

1
src/mainwindow.h

@ -118,6 +118,7 @@ private:
void doImport(QList<QString>* keys);
void restoreSavedStates();
bool eventFilter(QObject *object, QEvent *event);
bool uiPaymentsReady = false;
QString pendingURIPayment;

Loading…
Cancel
Save