Commit graph

246 commits

Author SHA1 Message Date
Patrick Lodder d2b1a61753
Give QApplication dummy arguments
Discards any Qt built-in command line arguments and replaces them
with dummy argv that only contains the binary name. Solves CVE-2021-3401.

Manually ported from bitcoin/bitcoin@a2714a5c
2021-11-03 12:05:46 -04:00
chromatic c2a0bd2890 qt: translate more user-exposed strings 2021-08-14 01:56:07 +02:00
Max K 2a0c66035d Re-add paperwallet printer (#1467)
* Add paper wallet generator to QT wallet

* Replace print icon with Typeicons equivalent

* Re-add printer support to Qt

* depends: fix fontconfig with newer glibc

See comment for more detail

* Set fixed size for paper wallet dialog
2019-03-25 05:36:12 +00:00
Ross Nicoll 4a87b53e55 Update QT client messages and translations to Doge equivalents (#1429)
Update QT client messages and translations to Doge equivalents.
2019-03-25 05:36:11 +00:00
Pieter Wuille 46b249e578
Merge #9408: Allow shutdown during LoadMempool, dump only when necessary
325e400 [Qt] Do proper shutdown (Jonas Schnelli)
9479f8d Allow shutdown during LoadMempool, dump only when necessary (Jonas Schnelli)
2017-01-06 09:37:43 -08:00
Jonas Schnelli 325e400f9b
[Qt] Do proper shutdown 2017-01-05 12:40:10 +01:00
isle2983 27765b6403 Increment MIT Licence copyright header year on files modified in 2016
Edited via:

$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Matt Corallo 4cd373aea8 Un-expose mapArgs from utils.h 2016-12-24 11:29:33 -05:00
Matt Corallo 0cf86a6678 Introduce (and use) an IsArgSet accessor method 2016-12-23 21:30:16 -05:00
Matt Corallo c8042a48f0 Remove arguments to ParseConfigFile 2016-12-23 21:30:15 -05:00
Gregory Maxwell 749be013f5 Move GetWarnings() into its own file. 2016-12-03 07:17:34 +00:00
Gregory Maxwell c63198f1c7 Make QT runawayException call GetWarnings instead of directly access strMiscWarning.
This is a first step in avoiding racy accesses to strMiscWarning.

The change required moving GetWarnings and related globals to util.
2016-12-03 07:17:28 +00:00
Pieter Wuille a143b88dbd
Merge #9010: Split up AppInit2 into multiple phases, daemonize after datadir 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-30 16:11:14 -08:00
Wladimir J. van der Laan 0cc8b6bc44 init: Split up AppInit2 into multiple phases
This allows doing some of the steps before e.g. daemonization and some
fater.
2016-11-29 12:47:13 +01:00
Wladimir J. van der Laan 5204598f8d qt: Avoid shutdownwindow-related memory leak
Store a reference to the shutdown window on BitcoinApplication,
so that it will be deleted when exiting the main loop.
2016-11-23 12:33:36 +01:00
Wladimir J. van der Laan e4f126a7ba qt: Avoid splash-screen related memory leak
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-23 12:33:36 +01:00
Wladimir J. van der Laan 693384eedb qt: Prevent thread/memory leak on exiting RPCConsole
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-23 12:33:36 +01:00
UdjinM6 4441018d08 Every main()/exit() should return/use one of EXIT_ codes instead of magic numbers 2016-11-07 21:31:38 +03:00
UdjinM6 bd0de1386e Fix exit codes:
- `--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-11-04 18:40:33 +03:00
Jorge Timón 3450c18a12
Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs 2016-10-01 08:12:19 +02:00
Wladimir J. van der Laan b4a9aa511c qt: Fix random segfault when closing "Choose data directory" dialog
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-08-18 16:58:25 +02:00
Jonas Schnelli 2759597bc8
Only pass -lQt5PlatformSupport if >=Qt5.6 2016-06-20 10:17:01 +02:00
Jonas Schnelli 34ebceb25a
[Qt][OSX] Fix Cmd-Q / Menu Quit shutdown on OSX 2016-05-12 11:42:31 +02:00
Luke Dashjr a68bb9f5e7 Merge branch 'master' into single_prodname 2016-02-03 05:41:13 +00:00
Daniel Cousens a0eaff8a1d move rpc* to rpc/ 2016-01-21 08:36:55 +11:00
Luke Dashjr d5f46832de Unify package name to as few places as possible without major changes 2015-12-14 02:11:10 +00:00
MarcoFalke fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
Luke Dashjr a6cbc02b6b Bugfix: Default -uiplatform is not actually the platform this build was compiled on 2015-11-28 21:48:17 +00:00
Luke Dashjr b966aa836a Constrain constant values to a single location in code 2015-11-28 18:47:29 +01:00
Jonas Schnelli a46f87f0c1
Initialize logging before we do parameter interaction 2015-11-27 13:26:28 +01:00
Jonas Schnelli 68354e75e9
[QT] Call inits parameter interaction before we create the options model 2015-11-27 13:26:01 +01:00
Jonas Schnelli ae98388b22
[Qt] add startup option to reset Qt settings 2015-11-13 16:27:42 +01:00
Wladimir J. van der Laan 2cd020d054
Merge pull request #6846
3cb56f3 *: alias -h for --help (Daniel Cousens)
2015-10-22 17:53:07 +02:00
Daniel Cousens 3cb56f3778 *: alias -h for --help 2015-10-22 00:07:30 +11:00
Wladimir J. van der Laan e26a3f6713
Merge pull request #6235
55a8975 Chainparams: Translations: DRY: options and error strings (Jorge Timón)
f3525e2 Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) (Jorge Timón)
2015-10-20 17:06:28 +02:00
Jorge Timón 55a89751fa Chainparams: Translations: DRY: options and error strings
Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
2015-10-20 14:28:43 +02:00
Wladimir J. van der Laan 40b556d374 evhttpd implementation
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*.
boost::asio is not part of C++11, so unlike other boost there is no
forwards-compatibility reason to stick with it. Together with #4738 (convert
json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with
regard to compile-time slowness.

- *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling
is handled by libevent, a work queue (with configurable depth and parallelism)
is used to handle application requests.

- *Wrap HTTP request in C++ class*; this makes the application code mostly
HTTP-server-neutral

- *Refactor RPC to move all http-specific code to a separate file*.
Theoreticaly this can allow building without HTTP server but with another RPC
backend, e.g. Qt's debug console (currently not implemented) or future RPC
mechanisms people may want to use.

- *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL
paths they want to handle.

By using a proven, high-performance asynchronous networking library (also used
by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided.

What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests
pass. The aim for now is everything but SSL support.

Configuration options:

- `-rpcthreads`: repurposed as "number of  work handler threads". Still
defaults to 4.

- `-rpcworkqueue`: maximum depth of work queue. When this is reached, new
requests will return a 500 Internal Error.

- `-rpctimeout`: inactivity time, in seconds, after which to disconnect a
client.

- `-debug=http`: low-level http activity logging
2015-09-03 10:59:18 +02:00
Wladimir J. van der Laan eec7757445 qt: Introduce PlatformStyle
Introduce a PlatformStyle to handle platform-specific customization of
the UI.

This replaces 'scicon', as well as #ifdefs to determine whether to place
icons on buttons.

The selected PlatformStyle defaults to the platform that the application
was compiled on, but can be overridden from the command line with
`-uiplatform=<x>`.

Also fixes the warning from #6328.
2015-07-31 09:35:18 +02:00
Wladimir J. van der Laan ca37e0f339
Merge pull request #5697
60c8bac Includes: Cleanup around net main and wallet (Jorge Timón)
9dd793f TRIVIAL: Missing includes (Jorge Timón)
2015-07-27 14:40:29 +02:00
Cory Fields fe997dfd12 build: fix building against qt5.4/5.5 2015-07-23 21:10:35 -04:00
Jorge Timón 60c8bac77c Includes: Cleanup around net main and wallet
-Move from .h to .cpp: in main, net and wallet
-Remove unnecessary #include "main.h"
-Cleanup some wallet files includes
2015-07-23 21:10:26 +02:00
Jorge Timón 9dd793f499 TRIVIAL: Missing includes 2015-07-23 21:10:22 +02:00
Wladimir J. van der Laan d29ec6c230 qt: define QT_NO_KEYWORDS
QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`,
`slots` and `emit` macros.

Avoid overlap between Qt macros and boost - for example #undef hackiness
in #6421.
2015-07-15 07:30:23 +02:00
Wladimir J. van der Laan 15e26a6a9a qt: Force TLS1.0+ for SSL connections 2015-07-06 20:06:16 +02:00
Gavin Andresen ddd0acd3db
Create a scheduler thread for lightweight tasks 2015-05-14 12:50:41 -04:00
Wladimir J. van der Laan 8a10000222
Merge pull request #6022
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-30 16:37:18 +02:00
Philip Kaufmann 60c146938e [Qt] header group cleanup
- seperate core from GUI headers where this was missing
- remove an unneeded new-line
2015-04-20 13:29:20 +02:00
Jorge Timón b74dcb3b4a Separate CTranslationInterface from CClientUIInterface 2015-04-16 19:58:48 +02:00
Jonas Schnelli 50c72f23ad [Move Only] Move wallet related things to src/wallet/
could once be renamed from /src/wallet to /src/legacywallet.
2015-03-12 14:13:02 +01:00
Cory Fields f5ad78b34a qt: fonts: allow SubstituteFonts to filter based on user's language
SubstituteFonts() has been moved to after app identification so that QSettings
are accessible.
2015-01-16 16:11:01 -05:00