aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--bitcoin-qt.pro6
-rw-r--r--doc/readme-qt.rst10
-rw-r--r--src/bitcoinrpc.cpp2
-rw-r--r--src/main.h8
-rw-r--r--src/makefile.linux-mingw2
-rw-r--r--src/makefile.mingw1
-rw-r--r--src/makefile.osx2
-rw-r--r--src/makefile.unix2
-rw-r--r--src/net.cpp2
-rw-r--r--src/netbase.cpp4
-rw-r--r--src/netbase.h2
-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.ui2
-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
-rw-r--r--src/wallet.cpp2
30 files changed, 107 insertions, 155 deletions
diff --git a/.gitignore b/.gitignore
index 2b70e2cca5..95152ce4fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,6 @@ src/*.exe
src/bitcoin
src/bitcoind
src/test_bitcoin
-src/build.h
.*.swp
*.*~*
*.bak
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index cdd3bc2b81..ed2cfa8f77 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -65,12 +65,6 @@ contains(USE_DBUS, 1) {
QT += dbus
}
-# use: qmake "FIRST_CLASS_MESSAGING=1"
-contains(FIRST_CLASS_MESSAGING, 1) {
- message(Building with first-class messaging)
- DEFINES += FIRST_CLASS_MESSAGING
-}
-
# use: qmake "USE_IPV6=1" ( enabled by default; default)
# or: qmake "USE_IPV6=0" (disabled by default)
# or: qmake "USE_IPV6=-" (not supported)
diff --git a/doc/readme-qt.rst b/doc/readme-qt.rst
index 951e86f9cb..f6adbd8fdd 100644
--- a/doc/readme-qt.rst
+++ b/doc/readme-qt.rst
@@ -27,7 +27,7 @@ Alternatively, install `Qt Creator`_ and open the `bitcoin-qt.pro` file.
An executable named `bitcoin-qt` will be built.
-.. _`Qt Creator`: http://qt.nokia.com/downloads/
+.. _`Qt Creator`: http://qt-project.org/downloads/
Windows
--------
@@ -42,7 +42,7 @@ Windows build instructions:
- Open the bitcoin-qt.pro file in Qt Creator and build as normal (ctrl-B)
-.. _`Qt Windows SDK`: http://qt.nokia.com/downloads/sdk-windows-cpp
+.. _`Qt Windows SDK`: http://qt-project.org/downloads/
.. _`dependencies archive`: https://download.visucore.com/bitcoin/qtgui_deps_1.zip
.. [#] PGP signature: https://download.visucore.com/bitcoin/qtgui_deps_1.zip.sig (signed with RSA key ID `610945D0`_)
.. _`610945D0`: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x610945D0
@@ -64,7 +64,7 @@ Mac OS X
- Open the bitcoin-qt.pro file in Qt Creator and build as normal (cmd-B)
-.. _`Qt Mac OS X SDK`: http://qt.nokia.com/downloads/sdk-mac-os-cpp
+.. _`Qt Mac OS X SDK`: http://qt-project.org/downloads/
.. _`MacPorts`: http://www.macports.org/install.php
@@ -108,8 +108,8 @@ FreeDesktop notification interface through DBUS using the following qmake option
Generation of QR codes
-----------------------
-libqrencode may be used to generate QRCode images for payment requests.
-It can be downloaded from http://fukuchi.org/works/qrencode/index.html.en, or installed via your package manager. Pass the USE_QRCODE
+libqrencode may be used to generate QRCode images for payment requests.
+It can be downloaded from http://fukuchi.org/works/qrencode/index.html.en, or installed via your package manager. Pass the USE_QRCODE
flag to qmake to control this:
+--------------+--------------------------------------------------------------------------+
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 40ffc57fea..03d142f858 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -820,7 +820,7 @@ void ThreadRPCServer2(void* parg)
}
catch(boost::system::system_error &e)
{
- strerr = strprintf(_("An error occurred while setting up the RPC port %i for listening on IPv4: %s"), endpoint.port(), e.what());
+ strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv4: %s"), endpoint.port(), e.what());
}
if (!fListening) {
diff --git a/src/main.h b/src/main.h
index 2e208fed4f..770c202338 100644
--- a/src/main.h
+++ b/src/main.h
@@ -158,7 +158,7 @@ public:
if (IsNull())
return "null";
else
- return strprintf("(nFile=%d, nBlockPos=%d, nTxPos=%d)", nFile, nBlockPos, nTxPos);
+ return strprintf("(nFile=%u, nBlockPos=%u, nTxPos=%u)", nFile, nBlockPos, nTxPos);
}
void print() const
@@ -214,7 +214,7 @@ public:
std::string ToString() const
{
- return strprintf("COutPoint(%s, %d)", hash.ToString().substr(0,10).c_str(), n);
+ return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10).c_str(), n);
}
void print() const
@@ -586,7 +586,7 @@ public:
std::string ToString() const
{
std::string str;
- str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%d, vout.size=%d, nLockTime=%d)\n",
+ str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
GetHash().ToString().substr(0,10).c_str(),
nVersion,
vin.size(),
@@ -1128,7 +1128,7 @@ public:
std::string ToString() const
{
- return strprintf("CBlockIndex(pprev=%08x, pnext=%08x, nFile=%d, nBlockPos=%-6d nHeight=%d, merkle=%s, hashBlock=%s)",
+ return strprintf("CBlockIndex(pprev=%08x, pnext=%08x, nFile=%u, nBlockPos=%-6u nHeight=%d, merkle=%s, hashBlock=%s)",
pprev, pnext, nFile, nBlockPos, nHeight,
hashMerkleRoot.ToString().substr(0,10).c_str(),
GetBlockHash().ToString().substr(0,20).c_str());
diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw
index 4ba0cf06f0..2804f14055 100644
--- a/src/makefile.linux-mingw
+++ b/src/makefile.linux-mingw
@@ -111,6 +111,6 @@ clean:
-rm -f bitcoind.exe
-rm -f obj-test/*.o
-rm -f test_bitcoin.exe
- -rm -f src/build.h
+ -rm -f obj/build.h
FORCE:
diff --git a/src/makefile.mingw b/src/makefile.mingw
index 9bbd739365..5cb2c84f4d 100644
--- a/src/makefile.mingw
+++ b/src/makefile.mingw
@@ -104,6 +104,5 @@ clean:
-del /Q bitcoind test_bitcoin
-del /Q obj\*
-del /Q obj-test\*
- -del /Q build.h
FORCE:
diff --git a/src/makefile.osx b/src/makefile.osx
index 547f751aba..359739bd5e 100644
--- a/src/makefile.osx
+++ b/src/makefile.osx
@@ -156,6 +156,6 @@ clean:
-rm -f obj-test/*.o
-rm -f obj/*.P
-rm -f obj-test/*.P
- -rm -f src/build.h
+ -rm -f obj/build.h
FORCE:
diff --git a/src/makefile.unix b/src/makefile.unix
index 6f8f96e3af..a41b57b4fc 100644
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -172,6 +172,6 @@ clean:
-rm -f obj-test/*.o
-rm -f obj/*.P
-rm -f obj-test/*.P
- -rm -f src/build.h
+ -rm -f obj/build.h
FORCE:
diff --git a/src/net.cpp b/src/net.cpp
index c0693306af..651f4a974c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1025,7 +1025,7 @@ void ThreadMapPort2(void* parg)
{
printf("ThreadMapPort started\n");
- std::string port = strprintf("%d", GetListenPort());
+ std::string port = strprintf("%u", GetListenPort());
const char * multicastif = 0;
const char * minissdpdpath = 0;
struct UPNPDev * devlist = 0;
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 76a3d25d3a..daa8a8d07e 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -599,7 +599,7 @@ CNetAddr::CNetAddr(const std::string &strIp, bool fAllowLookup)
*this = vIP[0];
}
-int CNetAddr::GetByte(int n) const
+unsigned int CNetAddr::GetByte(int n) const
{
return ip[15-n];
}
@@ -1135,7 +1135,7 @@ std::vector<unsigned char> CService::GetKey() const
std::string CService::ToStringPort() const
{
- return strprintf("%i", port);
+ return strprintf("%u", port);
}
std::string CService::ToStringIPPort() const
diff --git a/src/netbase.h b/src/netbase.h
index 07ca12cb96..560e2182df 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -66,7 +66,7 @@ class CNetAddr
enum Network GetNetwork() const;
std::string ToString() const;
std::string ToStringIP() const;
- int GetByte(int n) const;
+ unsigned int GetByte(int n) const;
uint64 GetHash() const;
bool GetInAddr(struct in_addr* pipv4Addr) const;
std::vector<unsigned char> GetGroup() const;
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..4474ab7cf8 100644
--- a/src/qt/forms/addressbookpage.ui
+++ b/src/qt/forms/addressbookpage.ui
@@ -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);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 880f7aa8bd..a10f187309 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -960,7 +960,7 @@ int64 CWallet::GetImmatureBalance() const
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx& pcoin = (*it).second;
- if (pcoin.IsCoinBase() && pcoin.GetBlocksToMaturity() > 0 && pcoin.GetDepthInMainChain() >= 2)
+ if (pcoin.IsCoinBase() && pcoin.GetBlocksToMaturity() > 0 && pcoin.IsInMainChain())
nTotal += GetCredit(pcoin);
}
}