Merge branch '0.5.x' into 0.6.0.x
authorLuke Dashjr <luke-jr+git@utopios.org>
Mon, 16 Apr 2012 01:15:48 +0000 (21:15 -0400)
committerLuke Dashjr <luke-jr+git@utopios.org>
Mon, 16 Apr 2012 01:15:48 +0000 (21:15 -0400)
Conflicts:
src/qt/bitcoin.cpp
src/qt/bitcoingui.cpp
src/qt/guiutil.cpp
src/qt/guiutil.h
src/qt/sendcoinsdialog.cpp
src/qt/sendcoinsdialog.h
src/util.cpp

1  2 
doc/assets-attribution.txt
src/bignum.h
src/bitcoinrpc.cpp
src/keystore.h
src/qt/bitcoin.cpp
src/qt/bitcoingui.cpp
src/qt/sendcoinsdialog.cpp
src/qt/walletmodel.h
src/uint256.h
src/util.cpp

Simple merge
diff --cc src/bignum.h
Simple merge
Simple merge
diff --cc src/keystore.h
Simple merge
@@@ -8,7 -8,7 +8,8 @@@
  
  #include "headers.h"
  #include "init.h"
 +#include "qtipcserver.h"
+ #include "util.h"
  
  #include <QApplication>
  #include <QMessageBox>
@@@ -130,33 -120,17 +131,42 @@@ std::string _(const char* psz
      return QCoreApplication::translate("bitcoin-core", psz).toStdString();
  }
  
+ /* Handle runaway exceptions. Shows a message box with the problem and quits the program.
+  */
+ static void handleRunawayException(std::exception *e)
+ {
+     PrintExceptionContinue(e, "Runaway exception");
+     QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occured. Bitcoin can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning));
+     exit(1);
+ }
 +#ifndef BITCOIN_QT_TEST
  int main(int argc, char *argv[])
  {
 +#if !defined(MAC_OSX) && !defined(WIN32)
 +// TODO: implement qtipcserver.cpp for Mac and Windows
 +
 +    // Do this early as we don't want to bother initializing if we are just calling IPC
 +    for (int i = 1; i < argc; i++)
 +    {
 +        if (strlen(argv[i]) > 7 && strncasecmp(argv[i], "bitcoin:", 8) == 0)
 +        {
 +            const char *strURI = argv[i];
 +            try {
 +                boost::interprocess::message_queue mq(boost::interprocess::open_only, BITCOINURI_QUEUE_NAME);
 +                if(mq.try_send(strURI, strlen(strURI), 0))
 +                    exit(0);
 +                else
 +                    break;
 +            }
 +            catch (boost::interprocess::interprocess_exception &ex) {
 +                break;
 +            }
 +        }
 +    }
 +#endif
 +
 +    // Internal string conversion is all UTF-8
      QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
      QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
  
@@@ -1,9 -1,12 +1,12 @@@
  /*
   * Qt4 bitcoin GUI.
   *
 - * W.J. van der Laan 2011
 - * The Bitcoin Developers 2011
 + * W.J. van der Laan 20011-2012
 + * The Bitcoin Developers 20011-2012
   */
+ #include "checkpoints.h"
  #include "bitcoingui.h"
  #include "transactiontablemodel.h"
  #include "addressbookpage.h"
Simple merge
Simple merge
diff --cc src/uint256.h
Simple merge
diff --cc src/util.cpp
@@@ -4,7 -4,17 +4,18 @@@
  // file license.txt or http://www.opensource.org/licenses/mit-license.php.
  #include "headers.h"
  #include "strlcpy.h"
 +#include <boost/algorithm/string/join.hpp>
+ // Work around clang compilation problem in Boost 1.46:
+ // /usr/include/boost/program_options/detail/config_file.hpp:163:17: error: call to function 'to_internal' that is neither visible in the template definition nor found by argument-dependent lookup
+ // See also: http://stackoverflow.com/questions/10020179/compilation-fail-in-boost-librairies-program-options
+ //           http://clang.debian.net/status.php?version=3.0&key=CANNOT_FIND_FUNCTION
+ namespace boost {
+     namespace program_options {
+         std::string to_internal(const std::string&);
+     }
+ }
  #include <boost/program_options/detail/config_file.hpp>
  #include <boost/program_options/parsers.hpp>
  #include <boost/filesystem.hpp>