aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
AgeCommit message (Collapse)Author
2018-03-06Qt: Load all wallets into WalletModelsLuke Dashjr
2018-03-01[qt] navigate to transaction history page after sendSjors Provoost
The transaction will be selected. When sending to multiple destinations, all will be selected (thanks @promag).
2018-02-12Fix Windows build errors introduced in #10498practicalswift
Fixes #12386
2018-02-08Merge #12374: qt: Make sure splash screen is freed on AppInitMain failWladimir J. van der Laan
1e5d14b qt: Clarify some comments (Wladimir J. van der Laan) f5a4c3d qt: Make sure splash screen is freed on AppInitMain fail (Wladimir J. van der Laan) Pull request description: The `splashFinished` event was never sent if AppInitMain fails, causing the splash screen to stick around, causing problems later. This bug has existed for a while but is now trigging potential crashed because the splash screen subscribes to wallet events. Meant to fix #12372. Tree-SHA512: 192a7e3a528015e771d7860dd95fd7b772292fd8064abf2a3cf3a8ea0d375cd43a6e8ed37ca1a38962fe1410c934599e557adf6a8ef9d87ec7f61b6e5fd8db7e
2018-02-08Merge #12377: qt: Poll ShutdownTimer after init is doneWladimir J. van der Laan
2222bf0 qt: Poll ShutdownTimer after init is done (MarcoFalke) Pull request description: The shutdown process has started in `requestShutdown`, but initialize will happily continue with `initializeResult` and start threads late in the shutdown progess. Deleting this running thread will crash the application according to the qt docs: https://github.com/qt/qtbase/blob/e5033a5c9b769815112e922d0b224af860afd219/src/corelib/thread/qthread.cpp#L412-L415 Potential fix for https://github.com/bitcoin/bitcoin/issues/12372#issuecomment-363642332 This reverts #11831 for now and hopefully restores the previous behaviour. Tree-SHA512: 8e1706afe90ddf2d972aca12c12d4cb2a9a4f38646c59c5466fe5a1a67361896b93c43917d5ac283841ee2bcc62e6bb8dc2bc81dea9129c899b354e9a4ef241b
2018-02-07Merge #10498: Use static_cast instead of C-style casts for non-fundamental typesMarcoFalke
9ad6746ccd Use static_cast instead of C-style casts for non-fundamental types (practicalswift) Pull request description: A C-style cast is equivalent to try casting in the following order: 1. `const_cast(...)` 2. `static_cast(...)` 3. `const_cast(static_cast(...))` 4. `reinterpret_cast(...)` 5. `const_cast(reinterpret_cast(...))` By using `static_cast<T>(...)` explicitly we avoid the possibility of an unintentional and dangerous `reinterpret_cast`. Furthermore `static_cast<T>(...)` allows for easier grepping of casts. For a more thorough discussion, see ["ES.49: If you must use a cast, use a named cast"](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es49-if-you-must-use-a-cast-use-a-named-cast) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: bd6349b7ea157da93a47b8cf238932af5dff84731374ccfd69b9f732fabdad1f9b1cdfca67497040f14eaa85346391404f4c0495e22c467f26ca883cd2de4d3c
2018-02-07qt: Poll ShutdownTimer after init is doneMarcoFalke
2018-02-07qt: Clarify some commentsWladimir J. van der Laan
Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
2018-02-07qt: Make sure splash screen is freed on AppInitMain failWladimir J. van der Laan
The `splashFinished` event was never sent if AppInitMain fails, causing the splash screen to stick around, causing problems later. This bug has existed for a while but is now trigging potential crashed because the splash screen subscribes to wallet events. Meant to fix #12372. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
2018-01-25Move scheduler/threadGroup into common-init instead of per-appMatt Corallo
This resolves #12229 which pointed out a shutdown deadlock due to scheduler/checkqueue having been shut down while network message processing is still running.
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-11-16qt: refactor: Changes to make include paths absoluteWladimir J. van der Laan
This makes all include paths in the GUI absolute. Many changes are involved as every single source file in src/qt/ assumes to be able to use relative includes.
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
2017-09-22Use static_cast instead of C-style casts for non-fundamental typespracticalswift
A C-style cast is equivalent to try casting in the following order: 1. const_cast(...) 2. static_cast(...) 3. const_cast(static_cast(...)) 4. reinterpret_cast(...) 5. const_cast(reinterpret_cast(...)) By using static_cast<T>(...) explicitly we avoid the possibility of an unintentional and dangerous reinterpret_cast. Furthermore static_cast<T>(...) allows for easier grepping of casts.
2017-08-16Merge #9964: Add const to methods that do not modify the object for which it ↵MarcoFalke
is called 6e8c48dc5 Add const to methods that do not modify the object for which it is called (practicalswift) Pull request description: Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
2017-08-14scripted-diff: stop using the gArgs wrappersMarko Bencun
They were temporary additions to ease the transition. -BEGIN VERIFY SCRIPT- find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' -END VERIFY SCRIPT-
2017-08-07scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift
instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
2017-07-25Add const to methods that do not modify the object for which it is calledpracticalswift
2017-07-17init: Factor out AppInitLockDataDirectoryWladimir J. van der Laan
Alternative to #10818, alternative solution to #10815. After this change: All the AppInit steps before and inclusive AppInitLockDataDirectory must not have Shutdown() called in case of failure. Only when AppInitMain fails, Shutdown should be called. Changes the GUI and bitcoind code to consistently do this.
2017-06-29[Qt] allow to execute a callback during splashscreen progressJonas Schnelli
2017-06-06Wallet: Replace pwalletMain with a vector of wallet pointersLuke Dashjr
2017-04-03Replace uses of boost::filesystem with fsWladimir J. van der Laan
Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
2017-04-03Replace includes of boost/filesystem.h with fs.hWladimir J. van der Laan
This is step one in abstracting the use of boost::filesystem.
2017-04-01Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell
This changes the logging categories to boolean flags instead of strings. This simplifies the acceptance testing by avoiding accessing a scoped static thread local pointer to a thread local set of strings. It eliminates the only use of boost::thread_specific_ptr outside of lockorder debugging. This change allows log entries to be directed to multiple categories and makes it easy to change the logging flags at runtime (e.g. via an RPC, though that isn't done by this commit.) It also eliminates the fDebug global. Configuration of unknown logging categories now produces a warning.
2017-03-02Merge #9834: qt: clean up initialize/shutdown signalsJonas Schnelli
5b528d7 qt: clean up initialize/shutdown signals (Marko Bencun) Tree-SHA512: 4a8326ba05a1cc037203a7abe01d4e77b6ff83e62ec14f09834ada4b35a23ffb1f28b5587aa2e02601f0f6c7d62c5647a7f10320239b4bac132791be29930ddb
2017-02-24Trivial: fix comments referencing AppInit2Marko Bencun
It was refactored into multiple functions in 0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680.
2017-02-23qt: clean up initialize/shutdown signalsMarko Bencun
- Change initializeResult(int) to initializeResult(bool) to avoid implicit type conversion. - Use EXIT_FAILURE and EXIT_SUCCESS instead of magic numbers. - Remove the argument from shutdownResult(int); it was called with a constant argument.
2017-01-06Merge #9408: Allow shutdown during LoadMempool, dump only when necessaryPieter Wuille
325e400 [Qt] Do proper shutdown (Jonas Schnelli) 9479f8d Allow shutdown during LoadMempool, dump only when necessary (Jonas Schnelli)
2017-01-05[Qt] Do proper shutdownJonas Schnelli
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-24Un-expose mapArgs from utils.hMatt Corallo
2016-12-23Introduce (and use) an IsArgSet accessor methodMatt Corallo
2016-12-23Remove arguments to ParseConfigFileMatt Corallo
2016-12-03Move GetWarnings() into its own file.Gregory Maxwell
2016-12-03Make QT runawayException call GetWarnings instead of directly access ↵Gregory Maxwell
strMiscWarning. This is a first step in avoiding racy accesses to strMiscWarning. The change required moving GetWarnings and related globals to util.
2016-11-30Merge #9010: Split up AppInit2 into multiple phases, daemonize after datadir ↵Pieter Wuille
lock errors deec83f init: Get rid of fServer flag (Wladimir J. van der Laan) 16ca0bf init: Try to aquire datadir lock before and after daemonization (Wladimir J. van der Laan) 0cc8b6b init: Split up AppInit2 into multiple phases (Wladimir J. van der Laan)
2016-11-29init: Split up AppInit2 into multiple phasesWladimir J. van der Laan
This allows doing some of the steps before e.g. daemonization and some fater.
2016-11-23qt: Avoid shutdownwindow-related memory leakWladimir J. van der Laan
Store a reference to the shutdown window on BitcoinApplication, so that it will be deleted when exiting the main loop.
2016-11-23qt: Avoid splash-screen related memory leakWladimir J. van der Laan
Make splash screen queue its own deletion when it receives the finished command, instead of relying on WA_DeleteOnClose which doesn't work under these circumstances.
2016-11-23qt: Prevent thread/memory leak on exiting RPCConsoleWladimir J. van der Laan
Make ownership of the QThread object clear, so that the RPCConsole can wait for the executor thread to quit before shutdown is called. This increases overall thread safety, and prevents some objects from leaking on exit.
2016-11-07Every main()/exit() should return/use one of EXIT_ codes instead of magic ↵UdjinM6
numbers
2016-11-04Fix exit codes:UdjinM6
- `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error) - error reading config file should exit with `1` Slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1)
2016-10-01Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgsJorge Timón
2016-08-18qt: Fix random segfault when closing "Choose data directory" dialogWladimir J. van der Laan
The `pickDataDirectory()` function was calling `exit(0)` to quit the application when the user closes the dialog without choosing a data directory. This is a bad idea because a background thread is created (to check free space on the drive of the currently selected datadir). The thread is not stopped and unwound properly, resulting in a potential race condition somewhere deep in Qt. So replace the `exit()` by a boolean return value, and let the stack unwind normally.
2016-06-20Only pass -lQt5PlatformSupport if >=Qt5.6Jonas Schnelli
2016-05-12[Qt][OSX] Fix Cmd-Q / Menu Quit shutdown on OSXJonas Schnelli
2016-02-03Merge branch 'master' into single_prodnameLuke Dashjr
2016-01-21move rpc* to rpc/Daniel Cousens
2015-12-14Unify package name to as few places as possible without major changesLuke Dashjr
2015-12-13Bump copyright headers to 2015MarcoFalke