aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitcoin-qt.pro15
-rw-r--r--doc/readme-qt.rst10
-rw-r--r--src/bitcoinrpc.cpp11
-rw-r--r--src/qt/addressbookpage.cpp2
-rw-r--r--src/qt/bitcoinamountfield.h2
-rw-r--r--src/qt/bitcoingui.cpp20
-rw-r--r--src/qt/bitcoingui.h4
-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.cpp2
-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/transactionview.cpp10
19 files changed, 57 insertions, 51 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index c7d81ed6c..26044f0f0 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -31,6 +31,13 @@ contains(RELEASE, 1) {
}
}
+!win32 {
+# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
+QMAKE_CXXFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
+QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
+# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
+# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
+}
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
@@ -83,12 +90,6 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
}
-!windows {
- # for extra security against potential buffer overflows
- QMAKE_CXXFLAGS += -fstack-protector
- QMAKE_LFLAGS += -fstack-protector
- # do not enable this on windows cross compile with mingw 4.2.x, as it will result in a non-working executable!
-}
# regenerate src/build.h
!windows|contains(USE_BUILD_INFO, 1) {
@@ -100,7 +101,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
DEFINES += HAVE_BUILD_INFO
}
-QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter
+QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector
# Input
DEPENDPATH += src src/json src/qt
diff --git a/doc/readme-qt.rst b/doc/readme-qt.rst
index 951e86f9c..f6adbd8fd 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 c3c2db38a..03d142f85 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -9,6 +9,7 @@
#include "ui_interface.h"
#include "base58.h"
#include "bitcoinrpc.h"
+#include "db.h"
#undef printf
#include <boost/asio.hpp>
@@ -173,11 +174,14 @@ Value help(const Array& params, bool fHelp)
Value stop(const Array& params, bool fHelp)
{
- if (fHelp || params.size() != 0)
+ if (fHelp || params.size() > 1)
throw runtime_error(
- "stop\n"
- "Stop Bitcoin server.");
+ "stop <detach>\n"
+ "<detach> is true or false to detach the database or not for this stop only\n"
+ "Stop Bitcoin server (and possibly override the detachdb config value).");
// Shutdown will take long enough that the response should get back
+ if (params.size() > 0)
+ bitdb.SetDetach(params[0].get_bool());
StartShutdown();
return "Bitcoin server stopping";
}
@@ -1126,6 +1130,7 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
//
// Special case non-string parameter types
//
+ if (strMethod == "stop" && n > 0) ConvertTo<bool>(params[0]);
if (strMethod == "setgenerate" && n > 0) ConvertTo<bool>(params[0]);
if (strMethod == "setgenerate" && n > 1) ConvertTo<boost::int64_t>(params[1]);
if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]);
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index 8a74a47f5..e20358c70 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 ca4a888e4..66792e00a 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 eeb01d7ec..19a6a65a1 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
@@ -183,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
}
@@ -276,7 +276,7 @@ void BitcoinGUI::createActions()
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
@@ -330,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
@@ -394,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);
@@ -420,7 +420,7 @@ void BitcoinGUI::createTrayIcon()
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
@@ -428,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)
@@ -589,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())
@@ -609,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())
{
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 7f2022c28..c67e887c0 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -123,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
@@ -152,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 eac35c27a..71ab75ca3 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 10a1586d4..6e17565ab 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 df56e6949..75684403e 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 c1c177dbf..8028190b8 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 8abc0b2ec..abb47109b 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 f8d1fe56f..8025126c2 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 8a6dafcf7..2b8a0c049 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -192,7 +192,7 @@ 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
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 789681ad9..ca2c61533 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 def2f83c3..8a6e050c1 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 71891e79c..c4d84c388 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 db6cba0d8..0ac14c147 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/transactionview.cpp b/src/qt/transactionview.cpp
index ed2a70a35..7acf5deaa 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);