aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/addressbookpage.cpp2
-rw-r--r--src/qt/bitcoinamountfield.h2
-rw-r--r--src/qt/bitcoingui.cpp121
-rw-r--r--src/qt/bitcoingui.h5
-rw-r--r--src/qt/forms/addressbookpage.ui4
-rw-r--r--src/qt/forms/sendcoinsdialog.ui4
-rw-r--r--src/qt/macdockiconhandler.mm4
-rw-r--r--src/qt/notificator.cpp8
-rw-r--r--src/qt/notificator.h2
-rw-r--r--src/qt/optionsdialog.cpp2
-rw-r--r--src/qt/rpcconsole.cpp34
-rw-r--r--src/qt/sendcoinsdialog.cpp2
-rw-r--r--src/qt/sendcoinsdialog.h2
-rw-r--r--src/qt/sendcoinsentry.cpp2
-rw-r--r--src/qt/sendcoinsentry.h2
-rw-r--r--src/qt/transactionrecord.cpp14
-rw-r--r--src/qt/transactionview.cpp10
17 files changed, 90 insertions, 130 deletions
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index 8a74a47f58..e20358c70e 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -27,7 +27,7 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
{
ui->setupUi(this);
-#ifdef Q_WS_MAC // Icons on push buttons are very uncommon on Mac
+#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->newAddressButton->setIcon(QIcon());
ui->copyToClipboard->setIcon(QIcon());
ui->deleteButton->setIcon(QIcon());
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index ca4a888e4e..66792e00a9 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -31,7 +31,7 @@ public:
/** Make field empty and ready for new input. */
void clear();
- /** Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907),
+ /** Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907),
in these cases we have to set it up manually.
*/
QWidget *setupTabChain(QWidget *prev);
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 27b974b5c6..19a6a65a1b 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -26,7 +26,7 @@
#include "guiutil.h"
#include "rpcconsole.h"
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include "macdockiconhandler.h"
#endif
@@ -70,7 +70,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
{
resize(850, 550);
setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet"));
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
qApp->setWindowIcon(QIcon(":icons/bitcoin"));
setWindowIcon(QIcon(":icons/bitcoin"));
#else
@@ -115,9 +115,6 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
centralWidget->addWidget(addressBookPage);
centralWidget->addWidget(receiveCoinsPage);
centralWidget->addWidget(sendCoinsPage);
-#ifdef FIRST_CLASS_MESSAGING
- centralWidget->addWidget(signVerifyMessageDialog);
-#endif
setCentralWidget(centralWidget);
// Create status bar
@@ -186,7 +183,7 @@ BitcoinGUI::~BitcoinGUI()
{
if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
trayIcon->hide();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
delete appMenuBar;
#endif
}
@@ -201,6 +198,18 @@ void BitcoinGUI::createActions()
overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
tabGroup->addAction(overviewAction);
+ sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this);
+ sendCoinsAction->setToolTip(tr("Send coins to a Bitcoin address"));
+ sendCoinsAction->setCheckable(true);
+ sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
+ tabGroup->addAction(sendCoinsAction);
+
+ receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive coins"), this);
+ receiveCoinsAction->setToolTip(tr("Show the list of addresses for receiving payments"));
+ receiveCoinsAction->setCheckable(true);
+ receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
+ tabGroup->addAction(receiveCoinsAction);
+
historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this);
historyAction->setToolTip(tr("Browse transaction history"));
historyAction->setCheckable(true);
@@ -213,52 +222,16 @@ void BitcoinGUI::createActions()
addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
tabGroup->addAction(addressBookAction);
- receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive coins"), this);
- receiveCoinsAction->setToolTip(tr("Show the list of addresses for receiving payments"));
- receiveCoinsAction->setCheckable(true);
- receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
- tabGroup->addAction(receiveCoinsAction);
-
- sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this);
- sendCoinsAction->setToolTip(tr("Send coins to a Bitcoin address"));
- sendCoinsAction->setCheckable(true);
- sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
- tabGroup->addAction(sendCoinsAction);
-
- signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this);
- signMessageAction->setToolTip(tr("Sign a message to prove you own a Bitcoin address"));
- tabGroup->addAction(signMessageAction);
-
- verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
- verifyMessageAction->setToolTip(tr("Verify a message to ensure it was signed with a specified Bitcoin address"));
- tabGroup->addAction(verifyMessageAction);
-
-#ifdef FIRST_CLASS_MESSAGING
- firstClassMessagingAction = new QAction(QIcon(":/icons/edit"), tr("S&ignatures"), this);
- firstClassMessagingAction->setToolTip(signMessageAction->toolTip() + QString(". / ") + verifyMessageAction->toolTip() + QString("."));
- firstClassMessagingAction->setCheckable(true);
- tabGroup->addAction(firstClassMessagingAction);
-#endif
-
connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
+ connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
+ connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
+ connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
+ connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage()));
- connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
- connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
- connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
- connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
- connect(signMessageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
- connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
- connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
- connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
-#ifdef FIRST_CLASS_MESSAGING
- connect(firstClassMessagingAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
- // Always start with the sign message tab for FIRST_CLASS_MESSAGING
- connect(firstClassMessagingAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
-#endif
quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
quitAction->setToolTip(tr("Quit application"));
@@ -274,8 +247,6 @@ void BitcoinGUI::createActions()
optionsAction->setToolTip(tr("Modify configuration options for Bitcoin"));
optionsAction->setMenuRole(QAction::PreferencesRole);
toggleHideAction = new QAction(QIcon(":/icons/bitcoin"), tr("&Show / Hide"), this);
- exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this);
- exportAction->setToolTip(tr("Export the data in the current tab to a file"));
encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
encryptWalletAction->setToolTip(tr("Encrypt or decrypt wallet"));
encryptWalletAction->setCheckable(true);
@@ -283,22 +254,29 @@ void BitcoinGUI::createActions()
backupWalletAction->setToolTip(tr("Backup wallet to another location"));
changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this);
changePassphraseAction->setToolTip(tr("Change the passphrase used for wallet encryption"));
+ signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this);
+ verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
+
+ exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this);
+ exportAction->setToolTip(tr("Export the data in the current tab to a file"));
openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this);
openRPCConsoleAction->setToolTip(tr("Open debugging and diagnostic console"));
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
connect(encryptWalletAction, SIGNAL(triggered(bool)), this, SLOT(encryptWallet(bool)));
connect(backupWalletAction, SIGNAL(triggered()), this, SLOT(backupWallet()));
connect(changePassphraseAction, SIGNAL(triggered()), this, SLOT(changePassphrase()));
+ connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
+ connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
}
void BitcoinGUI::createMenuBar()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Create a decoupled menu bar on Mac which stays even if the window is closed
appMenuBar = new QMenuBar();
#else
@@ -310,10 +288,8 @@ void BitcoinGUI::createMenuBar()
QMenu *file = appMenuBar->addMenu(tr("&File"));
file->addAction(backupWalletAction);
file->addAction(exportAction);
-#ifndef FIRST_CLASS_MESSAGING
file->addAction(signMessageAction);
file->addAction(verifyMessageAction);
-#endif
file->addSeparator();
file->addAction(quitAction);
@@ -339,9 +315,6 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
-#ifdef FIRST_CLASS_MESSAGING
- toolbar->addAction(firstClassMessagingAction);
-#endif
QToolBar *toolbar2 = addToolBar(tr("Actions toolbar"));
toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
@@ -357,7 +330,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
if(clientModel->isTestNet())
{
setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]"));
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
qApp->setWindowIcon(QIcon(":icons/bitcoin_testnet"));
setWindowIcon(QIcon(":icons/bitcoin_testnet"));
#else
@@ -421,7 +394,7 @@ void BitcoinGUI::setWalletModel(WalletModel *walletModel)
void BitcoinGUI::createTrayIcon()
{
QMenu *trayIconMenu;
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
trayIcon = new QSystemTrayIcon(this);
trayIconMenu = new QMenu(this);
trayIcon->setContextMenu(trayIconMenu);
@@ -441,15 +414,13 @@ void BitcoinGUI::createTrayIcon()
trayIconMenu->addSeparator();
trayIconMenu->addAction(sendCoinsAction);
trayIconMenu->addAction(receiveCoinsAction);
-#ifndef FIRST_CLASS_MESSAGING
trayIconMenu->addSeparator();
-#endif
trayIconMenu->addAction(signMessageAction);
trayIconMenu->addAction(verifyMessageAction);
trayIconMenu->addSeparator();
trayIconMenu->addAction(optionsAction);
trayIconMenu->addAction(openRPCConsoleAction);
-#ifndef Q_WS_MAC // This is built-in on Mac
+#ifndef Q_OS_MAC // This is built-in on Mac
trayIconMenu->addSeparator();
trayIconMenu->addAction(quitAction);
#endif
@@ -457,7 +428,7 @@ void BitcoinGUI::createTrayIcon()
notificator = new Notificator(qApp->applicationName(), trayIcon);
}
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
{
if(reason == QSystemTrayIcon::Trigger)
@@ -501,7 +472,7 @@ void BitcoinGUI::setNumConnections(int count)
void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
{
- // don't show / hide progressBar and its label if we have no connection(s) to the network
+ // don't show / hide progress bar and its label if we have no connection to the network
if (!clientModel || clientModel->getNumConnections() == 0)
{
progressBarLabel->setVisible(false);
@@ -539,7 +510,7 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
tooltip = tr("Downloaded %1 blocks of transaction history.").arg(count);
}
- // Override progressBarLabel text and hide progressBar, when we have warnings to display
+ // Override progressBarLabel text and hide progress bar, when we have warnings to display
if (!strStatusBarWarnings.isEmpty())
{
progressBarLabel->setText(strStatusBarWarnings);
@@ -618,7 +589,7 @@ void BitcoinGUI::error(const QString &title, const QString &message, bool modal)
void BitcoinGUI::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
-#ifndef Q_WS_MAC // Ignored on Mac
+#ifndef Q_OS_MAC // Ignored on Mac
if(e->type() == QEvent::WindowStateChange)
{
if(clientModel && clientModel->getOptionsModel()->getMinimizeToTray())
@@ -638,7 +609,7 @@ void BitcoinGUI::closeEvent(QCloseEvent *event)
{
if(clientModel)
{
-#ifndef Q_WS_MAC // Ignored on Mac
+#ifndef Q_OS_MAC // Ignored on Mac
if(!clientModel->getOptionsModel()->getMinimizeToTray() &&
!clientModel->getOptionsModel()->getMinimizeOnClose())
{
@@ -747,18 +718,8 @@ void BitcoinGUI::gotoSendCoinsPage()
void BitcoinGUI::gotoSignMessageTab(QString addr)
{
-#ifdef FIRST_CLASS_MESSAGING
- firstClassMessagingAction->setChecked(true);
- centralWidget->setCurrentWidget(signVerifyMessageDialog);
-
- exportAction->setEnabled(false);
- disconnect(exportAction, SIGNAL(triggered()), 0, 0);
-
- signVerifyMessageDialog->showTab_SM(false);
-#else
// call show() in showTab_SM()
signVerifyMessageDialog->showTab_SM(true);
-#endif
if(!addr.isEmpty())
signVerifyMessageDialog->setAddress_SM(addr);
@@ -766,18 +727,8 @@ void BitcoinGUI::gotoSignMessageTab(QString addr)
void BitcoinGUI::gotoVerifyMessageTab(QString addr)
{
-#ifdef FIRST_CLASS_MESSAGING
- firstClassMessagingAction->setChecked(true);
- centralWidget->setCurrentWidget(signVerifyMessageDialog);
-
- exportAction->setEnabled(false);
- disconnect(exportAction, SIGNAL(triggered()), 0, 0);
-
- signVerifyMessageDialog->showTab_VM(false);
-#else
// call show() in showTab_VM()
signVerifyMessageDialog->showTab_VM(true);
-#endif
if(!addr.isEmpty())
signVerifyMessageDialog->setAddress_VM(addr);
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index acf84eb941..c67e887c0f 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -80,7 +80,6 @@ private:
QAction *addressBookAction;
QAction *signMessageAction;
QAction *verifyMessageAction;
- QAction *firstClassMessagingAction;
QAction *aboutAction;
QAction *receiveCoinsAction;
QAction *optionsAction;
@@ -124,7 +123,7 @@ public slots:
/** Asks the user whether to pay the transaction fee or to cancel the transaction.
It is currently not possible to pass a return value to another thread through
BlockingQueuedConnection, so an indirected pointer is used.
- http://bugreports.qt.nokia.com/browse/QTBUG-10440
+ https://bugreports.qt-project.org/browse/QTBUG-10440
@param[in] nFeeRequired the required fee
@param[out] payFee true to pay the fee, false to not pay the fee
@@ -153,7 +152,7 @@ private slots:
void optionsClicked();
/** Show about dialog */
void aboutClicked();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
/** Handle tray icon clicked */
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
#endif
diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui
index eac35c27ae..71ab75ca3f 100644
--- a/src/qt/forms/addressbookpage.ui
+++ b/src/qt/forms/addressbookpage.ui
@@ -102,7 +102,7 @@
<string>Sign a message to prove you own a Bitcoin address</string>
</property>
<property name="text">
- <string>&amp;Sign Message</string>
+ <string>Sign &amp;Message</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
@@ -127,7 +127,7 @@
<item>
<widget class="QPushButton" name="deleteButton">
<property name="toolTip">
- <string>Delete the currently selected address from the list. Only sending addresses can be deleted.</string>
+ <string>Delete the currently selected address from the list</string>
</property>
<property name="text">
<string>&amp;Delete</string>
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 10a1586d4a..6e17565ab0 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -64,7 +64,7 @@
<string>Send to multiple recipients at once</string>
</property>
<property name="text">
- <string>&amp;Add Recipient</string>
+ <string>Add &amp;Recipient</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
@@ -153,7 +153,7 @@
<string>Confirm the send action</string>
</property>
<property name="text">
- <string>&amp;Send</string>
+ <string>S&amp;end</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm
index df56e6949d..75684403eb 100644
--- a/src/qt/macdockiconhandler.mm
+++ b/src/qt/macdockiconhandler.mm
@@ -1,8 +1,8 @@
#include "macdockiconhandler.h"
-#include <QtGui/QMenu>
-#include <QtGui/QWidget>
+#include <QMenu>
+#include <QWidget>
extern void qt_mac_set_dock_menu(QMenu*);
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index c1c177dbfe..8028190b82 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -16,7 +16,7 @@
#include <stdint.h>
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <ApplicationServices/ApplicationServices.h>
extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret);
#endif
@@ -46,7 +46,7 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon,
mode = Freedesktop;
}
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Check if Growl is installed (based on Qt's tray icon implementation)
CFURLRef cfurl;
OSStatus status = LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, CFSTR("growlTicket"), kLSRolesAll, 0, &cfurl);
@@ -225,7 +225,7 @@ void Notificator::notifySystray(Class cls, const QString &title, const QString &
}
// Based on Qt's tray icon implementation
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void Notificator::notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon)
{
const QString script(
@@ -285,7 +285,7 @@ void Notificator::notify(Class cls, const QString &title, const QString &text, c
case QSystemTray:
notifySystray(cls, title, text, icon, millisTimeout);
break;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
case Growl12:
case Growl13:
notifyGrowl(cls, title, text, icon);
diff --git a/src/qt/notificator.h b/src/qt/notificator.h
index 8abc0b2ec2..abb47109b3 100644
--- a/src/qt/notificator.h
+++ b/src/qt/notificator.h
@@ -61,7 +61,7 @@ private:
void notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout);
#endif
void notifySystray(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon);
#endif
};
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index f8d1fe56fb..8025126c25 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -46,7 +46,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
ui->proxyIp->installEventFilter(this);
/* Window elements init */
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
ui->tabWindow->setVisible(false);
#endif
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 7d5b6fed53..2b8a0c049b 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -192,13 +192,14 @@ RPCConsole::RPCConsole(QWidget *parent) :
{
ui->setupUi(this);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export"));
ui->showCLOptionsButton->setIcon(QIcon(":/icons/options"));
#endif
// Install event filter for up and down arrow
ui->lineEdit->installEventFilter(this);
+ ui->messagesWidget->installEventFilter(this);
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
@@ -218,15 +219,34 @@ RPCConsole::~RPCConsole()
bool RPCConsole::eventFilter(QObject* obj, QEvent *event)
{
- if(obj == ui->lineEdit)
+ if(event->type() == QEvent::KeyPress) // Special key handling
{
- if(event->type() == QEvent::KeyPress)
+ QKeyEvent *keyevt = static_cast<QKeyEvent*>(event);
+ int key = keyevt->key();
+ Qt::KeyboardModifiers mod = keyevt->modifiers();
+ switch(key)
{
- QKeyEvent *key = static_cast<QKeyEvent*>(event);
- switch(key->key())
+ case Qt::Key_Up: if(obj == ui->lineEdit) { browseHistory(-1); return true; } break;
+ case Qt::Key_Down: if(obj == ui->lineEdit) { browseHistory(1); return true; } break;
+ case Qt::Key_PageUp: /* pass paging keys to messages widget */
+ case Qt::Key_PageDown:
+ if(obj == ui->lineEdit)
{
- case Qt::Key_Up: browseHistory(-1); return true;
- case Qt::Key_Down: browseHistory(1); return true;
+ QApplication::postEvent(ui->messagesWidget, new QKeyEvent(*keyevt));
+ return true;
+ }
+ break;
+ default:
+ // Typing in messages widget brings focus to line edit, and redirects key there
+ // Exclude most combinations and keys that emit no text, except paste shortcuts
+ if(obj == ui->messagesWidget && (
+ (!mod && !keyevt->text().isEmpty() && key != Qt::Key_Tab) ||
+ ((mod & Qt::ControlModifier) && key == Qt::Key_V) ||
+ ((mod & Qt::ShiftModifier) && key == Qt::Key_Insert)))
+ {
+ ui->lineEdit->setFocus();
+ QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt));
+ return true;
}
}
}
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 789681ad90..ca2c615333 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -21,7 +21,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
{
ui->setupUi(this);
-#ifdef Q_WS_MAC // Icons on push buttons are very uncommon on Mac
+#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->addButton->setIcon(QIcon());
ui->clearButton->setIcon(QIcon());
ui->sendButton->setIcon(QIcon());
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index def2f83c30..8a6e050c11 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -25,7 +25,7 @@ public:
void setModel(WalletModel *model);
- /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907).
+ /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
*/
QWidget *setupTabChain(QWidget *prev);
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 71891e79ca..c4d84c388c 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -17,7 +17,7 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) :
{
ui->setupUi(this);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
ui->payToLayout->setSpacing(4);
#endif
#if QT_VERSION >= 0x040700
diff --git a/src/qt/sendcoinsentry.h b/src/qt/sendcoinsentry.h
index db6cba0d80..0ac14c1472 100644
--- a/src/qt/sendcoinsentry.h
+++ b/src/qt/sendcoinsentry.h
@@ -27,7 +27,7 @@ public:
void setValue(const SendCoinsRecipient &value);
- /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907).
+ /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
*/
QWidget *setupTabChain(QWidget *prev);
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index cc60e2732b..4c3071984f 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -9,18 +9,8 @@ bool TransactionRecord::showTransaction(const CWalletTx &wtx)
{
if (wtx.IsCoinBase())
{
- // Don't show generated coin until confirmed by at least one block after it
- // so we don't get the user's hopes up until it looks like it's probably accepted.
- //
- // It is not an error when generated blocks are not accepted. By design,
- // some percentage of blocks, like 10% or more, will end up not accepted.
- // This is the normal mechanism by which the network copes with latency.
- //
- // We display regular transactions right away before any confirmation
- // because they can always get into some block eventually. Generated coins
- // are special because if their block is not accepted, they are not valid.
- //
- if (wtx.GetDepthInMainChain() < 2)
+ // Ensures we show generated coins / mined transactions at depth 1
+ if (!wtx.IsInMainChain())
{
return false;
}
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index ed2a70a350..7acf5deaa3 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -38,7 +38,7 @@ TransactionView::TransactionView(QWidget *parent) :
QHBoxLayout *hlayout = new QHBoxLayout();
hlayout->setContentsMargins(0,0,0,0);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
hlayout->setSpacing(5);
hlayout->addSpacing(26);
#else
@@ -47,7 +47,7 @@ TransactionView::TransactionView(QWidget *parent) :
#endif
dateWidget = new QComboBox(this);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
dateWidget->setFixedWidth(121);
#else
dateWidget->setFixedWidth(120);
@@ -62,7 +62,7 @@ TransactionView::TransactionView(QWidget *parent) :
hlayout->addWidget(dateWidget);
typeWidget = new QComboBox(this);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
typeWidget->setFixedWidth(121);
#else
typeWidget->setFixedWidth(120);
@@ -91,7 +91,7 @@ TransactionView::TransactionView(QWidget *parent) :
/* Do not move this to the XML file, Qt before 4.7 will choke on it */
amountWidget->setPlaceholderText(tr("Min amount"));
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
amountWidget->setFixedWidth(97);
#else
amountWidget->setFixedWidth(100);
@@ -110,7 +110,7 @@ TransactionView::TransactionView(QWidget *parent) :
vlayout->setSpacing(0);
int width = view->verticalScrollBar()->sizeHint().width();
// Cover scroll bar width with spacing
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
hlayout->addSpacing(width+2);
#else
hlayout->addSpacing(width);