aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitcoin-qt.pro6
-rw-r--r--doc/readme-qt.rst8
-rw-r--r--share/setup.nsi2
-rw-r--r--src/bitcoinrpc.cpp2
-rw-r--r--src/init.cpp2
-rw-r--r--src/qt/askpassphrasedialog.cpp11
-rw-r--r--src/qt/bitcoin.cpp5
-rw-r--r--src/qt/bitcoinamountfield.h2
-rw-r--r--src/qt/bitcoingui.h2
-rw-r--r--src/qt/forms/addressbookpage.ui2
-rw-r--r--src/qt/forms/sendcoinsdialog.ui2
-rw-r--r--src/qt/sendcoinsdialog.h2
-rw-r--r--src/qt/sendcoinsentry.h2
-rw-r--r--src/qt/transactiondesc.cpp13
-rw-r--r--src/util.cpp10
15 files changed, 46 insertions, 25 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index e4cb415ace..7bfdeea357 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -4,6 +4,7 @@ VERSION = 0.6.4.0
INCLUDEPATH += src src/json src/qt
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
+CONFIG += thread
# for boost 1.37, add -mt to the boost libraries
# use: qmake BOOST_LIB_SUFFIX=-mt
@@ -311,7 +312,7 @@ windows:!contains(MINGW_THREAD_BUGFIX, 0) {
QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
}
-!windows:!mac {
+!windows:!macx {
DEFINES += LINUX
LIBS += -lrt
}
@@ -322,6 +323,9 @@ macx:LIBS += -framework Foundation -framework ApplicationServices -framework App
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
macx:ICON = src/qt/res/icons/bitcoin.icns
macx:TARGET = "Bitcoin-Qt"
+macx:QMAKE_CFLAGS_THREAD += -pthread
+macx:QMAKE_LFLAGS_THREAD += -pthread
+macx:QMAKE_CXXFLAGS_THREAD += -pthread
# Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
diff --git a/doc/readme-qt.rst b/doc/readme-qt.rst
index f55b9e7bd2..866b147c56 100644
--- a/doc/readme-qt.rst
+++ b/doc/readme-qt.rst
@@ -40,7 +40,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
@@ -62,7 +62,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
@@ -106,8 +106,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/share/setup.nsi b/share/setup.nsi
index 226d0e99e5..f38a18104f 100644
--- a/share/setup.nsi
+++ b/share/setup.nsi
@@ -103,7 +103,7 @@ Section -post SEC0001
# WriteRegStr HKCR "bitcoin" "URL Protocol" ""
# WriteRegStr HKCR "bitcoin" "" "URL:Bitcoin"
# WriteRegStr HKCR "bitcoin\DefaultIcon" "" $INSTDIR\bitcoin-qt.exe
- # WriteRegStr HKCR "bitcoin\shell\open\command" "" '"$INSTDIR\bitcoin-qt.exe" "$$1"'
+ # WriteRegStr HKCR "bitcoin\shell\open\command" "" '"$INSTDIR\bitcoin-qt.exe" "%1"'
SectionEnd
# Macro for selecting uninstaller sections
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 15d1a7450c..af011f4437 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -1708,7 +1708,7 @@ Value encryptwallet(const Array& params, bool fHelp)
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
StartShutdown();
- return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet";
+ return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
}
diff --git a/src/init.cpp b/src/init.cpp
index 6b96fc6c94..f4168b1729 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -258,7 +258,7 @@ bool AppInit2(int argc, char* argv[])
// On Windows, show a message box, as there is no stderr
ThreadSafeMessageBox(strUsage, _("Usage"), wxOK | wxMODAL);
#else
- fprintf(stderr, "%s", strUsage.c_str());
+ fprintf(stdout, "%s", strUsage.c_str());
#endif
return false;
}
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index 2126edf0b2..cae021c982 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -109,7 +109,16 @@ void AskPassphraseDialog::accept()
if(model->setWalletEncrypted(true, newpass1))
{
QMessageBox::warning(this, tr("Wallet encrypted"),
- tr("Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer."));
+ "<qt>" +
+ tr("Bitcoin will close now to finish the encryption process. "
+ "Remember that encrypting your wallet cannot fully protect "
+ "your bitcoins from being stolen by malware infecting your computer.") +
+ "<br><br><b>" +
+ tr("IMPORTANT: Any previous backups you have made of your wallet file "
+ "should be replaced with the newly generated, encrypted wallet file. "
+ "For security reasons, previous backups of the unencrypted wallet file "
+ "will become useless as soon as you start using the new, encrypted wallet.") +
+ "</b></qt>");
QApplication::quit();
}
else
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 21e766c9e2..5acfd1ca74 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -170,7 +170,10 @@ int main(int argc, char *argv[])
// ... then bitcoin.conf:
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
- fprintf(stderr, "Error: Specified directory does not exist\n");
+ // This message can not be translated, as translation is not initialized yet
+ // (which not yet possible because lang=XX can be overridden in bitcoin.conf in the data directory)
+ QMessageBox::critical(0, "Bitcoin",
+ QString("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
return 1;
}
ReadConfigFile(mapArgs, mapMultiArgs);
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.h b/src/qt/bitcoingui.h
index d9e0b4d87b..f66c420d53 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -119,7 +119,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
diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui
index e47eb57ff9..15a8f31996 100644
--- a/src/qt/forms/addressbookpage.ui
+++ b/src/qt/forms/addressbookpage.ui
@@ -96,7 +96,7 @@
<string>Sign a message to prove you own this address</string>
</property>
<property name="text">
- <string>&amp;Sign Message</string>
+ <string>Sign &amp;Message</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 04cf404ae3..7eadec98b2 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -144,7 +144,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/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 2498a9a71e..94fa97d201 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.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/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 286cddf2a9..c6c9a08f04 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -69,11 +69,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
{
strHTML += tr("<b>Source:</b> Generated<br>");
}
- else if (!wtx.mapValue["from"].empty())
+ else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty())
{
// Online transaction
- if (!wtx.mapValue["from"].empty())
- strHTML += tr("<b>From:</b> ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>";
+ strHTML += tr("<b>From:</b> ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>";
}
else
{
@@ -110,7 +109,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
// To
//
string strAddress;
- if (!wtx.mapValue["to"].empty())
+ if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty())
{
// Online transaction
strAddress = wtx.mapValue["to"];
@@ -167,7 +166,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
if (wallet->IsMine(txout))
continue;
- if (wtx.mapValue["to"].empty())
+ if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty())
{
// Offline transaction
CBitcoinAddress address;
@@ -216,9 +215,9 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
//
// Message
//
- if (!wtx.mapValue["message"].empty())
+ if (wtx.mapValue.count("message") && !wtx.mapValue["message"].empty())
strHTML += QString("<br><b>") + tr("Message:") + "</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "<br>";
- if (!wtx.mapValue["comment"].empty())
+ if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
strHTML += QString("<br><b>") + tr("Comment:") + "</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
strHTML += QString("<b>") + tr("Transaction ID:") + "</b> " + wtx.GetHash().ToString().c_str() + "<br>";
diff --git a/src/util.cpp b/src/util.cpp
index 7ec2a82c64..8a2e0d65db 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -216,8 +216,14 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
if (fileout)
{
static bool fStartedNewLine = true;
- static boost::mutex mutexDebugLog;
- boost::mutex::scoped_lock scoped_lock(mutexDebugLog);
+
+ // This routine may be called by global destructors during shutdown.
+ // Since the order of destruction of static/global objects is undefined,
+ // allocate mutexDebugLog on the heap the first time this routine
+ // is called to avoid crashes during shutdown.
+ static boost::mutex* mutexDebugLog = NULL;
+ if (mutexDebugLog == NULL) mutexDebugLog = new boost::mutex();
+ boost::mutex::scoped_lock scoped_lock(*mutexDebugLog);
// Debug print useful for profiling
if (fLogTimestamps && fStartedNewLine)