aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp6
-rw-r--r--src/qt/bitcoingui.cpp2
-rw-r--r--src/qt/clientmodel.h2
-rw-r--r--src/qt/guiutil.cpp1
-rw-r--r--src/qt/notificator.cpp5
-rw-r--r--src/qt/notificator.h2
-rw-r--r--src/qt/receivecoinsdialog.cpp4
-rw-r--r--src/qt/walletview.cpp4
-rw-r--r--src/qt/walletview.h1
9 files changed, 14 insertions, 13 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 57ce7da361..2f9e205c8d 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -53,7 +53,6 @@ static SplashScreen *splashref;
static bool ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
{
- // Message from network thread
if(guiref)
{
bool modal = (style & CClientUIInterface::MODAL);
@@ -160,7 +159,7 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
/* qDebug() message handler --> debug.log */
#if QT_VERSION < 0x050000
-void DebugMessageHandler(QtMsgType type, const char * msg)
+void DebugMessageHandler(QtMsgType type, const char *msg)
{
Q_UNUSED(type);
LogPrint("qt", "Bitcoin-Qt: %s\n", msg);
@@ -313,11 +312,12 @@ int main(int argc, char *argv[])
splash.finish(&window);
ClientModel clientModel(&optionsModel);
+ window.setClientModel(&clientModel);
+
WalletModel *walletModel = 0;
if(pwalletMain)
walletModel = new WalletModel(pwalletMain, &optionsModel);
- window.setClientModel(&clientModel);
if(walletModel)
{
window.addWallet("~Default", walletModel);
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index a44627690f..b3a566428d 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -405,7 +405,7 @@ void BitcoinGUI::createTrayIcon(bool fIsTestnet)
trayIcon->show();
#endif
- notificator = new Notificator(QApplication::applicationName(), trayIcon);
+ notificator = new Notificator(QApplication::applicationName(), trayIcon, this);
}
void BitcoinGUI::createTrayIconMenu()
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index dcc528f4fd..05e8412528 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -84,7 +84,7 @@ signals:
void alertsChanged(const QString &warnings);
void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut);
- //! Asynchronous message notification
+ //! Fired when a message should be reported to the user
void message(const QString &title, const QString &message, unsigned int style);
public slots:
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 2ce09b479e..8f8d67dc58 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -32,6 +32,7 @@
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
+
#include <QAbstractItemView>
#include <QApplication>
#include <QClipboard>
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index c9f6834ec2..1cef397d12 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -4,7 +4,6 @@
#include "notificator.h"
-
#include <QApplication>
#include <QByteArray>
#include <QIcon>
@@ -32,7 +31,7 @@
// https://wiki.ubuntu.com/NotificationDevelopmentGuidelines recommends at least 128
const int FREEDESKTOP_NOTIFICATION_ICON_SIZE = 128;
-Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, QWidget *parent):
+Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, QWidget *parent) :
QObject(parent),
parent(parent),
programName(programName),
@@ -48,7 +47,7 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon,
}
#ifdef USE_DBUS
interface = new QDBusInterface("org.freedesktop.Notifications",
- "/org/freedesktop/Notifications", "org.freedesktop.Notifications");
+ "/org/freedesktop/Notifications", "org.freedesktop.Notifications");
if(interface->isValid())
{
mode = Freedesktop;
diff --git a/src/qt/notificator.h b/src/qt/notificator.h
index d6298c3c0d..abab986992 100644
--- a/src/qt/notificator.h
+++ b/src/qt/notificator.h
@@ -29,7 +29,7 @@ public:
/** Create a new notificator.
@note Ownership of trayIcon is not transferred to this object.
*/
- Notificator(const QString &programName=QString(), QSystemTrayIcon *trayIcon=0, QWidget *parent=0);
+ Notificator(const QString &programName, QSystemTrayIcon *trayIcon, QWidget *parent);
~Notificator();
// Message class
diff --git a/src/qt/receivecoinsdialog.cpp b/src/qt/receivecoinsdialog.cpp
index 45b2325299..cad41abd66 100644
--- a/src/qt/receivecoinsdialog.cpp
+++ b/src/qt/receivecoinsdialog.cpp
@@ -101,11 +101,11 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "");
}
SendCoinsRecipient info(address, label,
- ui->reqAmount->value(), ui->reqMessage->text());
+ ui->reqAmount->value(), ui->reqMessage->text());
ReceiveRequestDialog *dialog = new ReceiveRequestDialog(this);
+ dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->setModel(model->getOptionsModel());
dialog->setInfo(info);
- dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
clear();
}
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index ea71d58aa6..1a9c7866db 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -263,8 +263,8 @@ void WalletView::usedSendingAddresses()
if(!walletModel)
return;
AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab, this);
- dlg->setModel(walletModel->getAddressTableModel());
dlg->setAttribute(Qt::WA_DeleteOnClose);
+ dlg->setModel(walletModel->getAddressTableModel());
dlg->show();
}
@@ -273,7 +273,7 @@ void WalletView::usedReceivingAddresses()
if(!walletModel)
return;
AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab, this);
- dlg->setModel(walletModel->getAddressTableModel());
dlg->setAttribute(Qt::WA_DeleteOnClose);
+ dlg->setModel(walletModel->getAddressTableModel());
dlg->show();
}
diff --git a/src/qt/walletview.h b/src/qt/walletview.h
index d951691621..ecfa06ac5a 100644
--- a/src/qt/walletview.h
+++ b/src/qt/walletview.h
@@ -96,6 +96,7 @@ public slots:
/** Re-emit encryption status signal */
void updateEncryptionStatus();
+
signals:
/** Signal that we want to show the main window */
void showNormalIfMinimized();