Commit graph

216 commits

Author SHA1 Message Date
Luke Dashjr d5f46832de Unify package name to as few places as possible without major changes 2015-12-14 02:11:10 +00: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
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Wladimir J. van der Laan 111a7d45f1
Merge pull request #5470
78253fc Remove references to X11 licence (Michael Ford)
2014-12-19 19:23:23 +01:00
Philip Kaufmann 27df4123c4 make all catch() arguments const
- I saw this on http://en.cppreference.com/w/cpp/language/try_catch and
  thought it would be a good idea
- also unify used format to better be able to search for exception
  uses in our codebase
2014-12-17 09:39:24 +01:00
Michael Ford 78253fcbad Remove references to X11 licence 2014-12-16 15:56:50 +08:00
Philip Kaufmann b82695b89f [Qt] make PaymentServer::ipcParseCommandLine void
- the function only returned true, so make it void
- add a comment about payment request network detection
2014-12-08 16:08:57 +01:00
Wladimir J. van der Laan 6de50c3c9a qt: add network-specific style object
Mainly cleanups: Gets rid of isTestNet everywhere, by keeping track
of network-specific theming in a central place.

Also makes GUI no longer dependent on the network ID enumeration, which
alleviates concerns about #4802.
2014-10-10 11:00:59 +02:00
Wladimir J. van der Laan c122f5528c qt: Register CAmount metatype
This allows sending the type over queued connections.
Also normalize signal/slot names.
2014-10-01 11:06:41 +02:00
Wladimir J. van der Laan 565da68ed0
Merge pull request #4852
5e83bc4 [Qt] include and file header cleanup (Philip Kaufmann)
2014-09-22 12:20:36 +02:00
Wladimir J. van der Laan cfc5cfb0f0
qt: Make splash and shutdown window ignore close events
It's strange to be able to close these windows while there is work
in progress.

Also set Qt::WA_DeleteOnClose on both windows to make sure that they
are deleted eventually, no matter what happens.
2014-09-22 10:13:52 +02:00
Philip Kaufmann 5e83bc404c [Qt] include and file header cleanup
- alphabetical ordering
- correct ordering own headers before normal headers etc.
2014-09-18 14:11:44 +02:00
Wladimir J. van der Laan a49f11d9ed qt: Change splash screen to normal window
Makes it possible to move, minimize, unminimize the window while
Bitcoin Core is initializing.
2014-09-18 13:21:26 +02:00
Wladimir J. van der Laan b9bd6282c5
Merge pull request #4649
b197bf3 [Qt] disable tray interactions when client model set to 0 (Philip Kaufmann)
314fbd9 [Qt] use BitcoinGUI::DEFAULT_WALLET constant in bitcoin.cpp (Philip Kaufmann)
8ca6a16 [Qt] ensure all class attributes are init to 0 (Philip Kaufmann)
2014-08-26 17:39:16 +02:00
Wladimir J. van der Laan ad49c256c3 Split up util.cpp/h
Split up util.cpp/h into:

- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)

The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).

Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26 13:25:22 +02:00
Philip Kaufmann 314fbd9ac7 [Qt] use BitcoinGUI::DEFAULT_WALLET constant in bitcoin.cpp 2014-08-08 12:13:27 +02:00
Cory Fields 292cc072f3 qt: fix unicode character display on osx when building with 10.7 sdk 2014-08-07 12:34:53 -04:00
Philip Kaufmann a409467e14 more Bitcoin -> Bitcoin Core string changes 2014-08-04 21:09:38 +02:00
Wladimir J. van der Laan 0de61e7585
qt: Move SplashFinished to after ClientModel/WalletModel creation
With a large wallet there was a noticable gap between hiding of the
splash and showing the main window.
2014-07-20 13:50:42 +02:00
Cory Fields ab123ad4d6 build: allow linux and osx to build against static qt5
This is the first part of a huge effort to rework the handling of dependencies.
To start, this change allows all supported platforms to build against a static
Qt. 5.2.1 and 5.3 have been successfully tested against osx64, win32, win64,
linux32, and linux64.

It also makes a small change to the windows config, to allow linking against
qt builds with or without built-in libjpeg/libpng/libpcre/libz.

The actual build processes to take advantage of these changes (for gitian and
pull-tester) are coming soon. Until then, this should be a no-op.
2014-07-17 22:13:40 -04:00
Wladimir J. van der Laan 33357b27a0
qt: Start core thread only when needed
Start the core thread only when needed for initialization
or shutdown.

Avoids a bit of overhead, and also avoids spamming two
log messages before logging is properly initialized.
2014-07-15 16:27:47 +02:00
Wladimir J. van der Laan c715ff52c7 ui: Replace some LogPrintfs with qDebug()
These are relatively unimportant messages, so don't need to be logged
without -debug=ui.
2014-07-15 10:26:50 +02:00
Wladimir J. van der Laan 2882d594fe
Fix the Qt5 build after d95ba75
Sorry, my own fault this time.
2014-07-02 08:15:09 +02:00
Wladimir J. van der Laan d95ba75825 qt: Log messages with type>QtDebugMsg as non-debug
More important messages should end up in the log no matter
if -debug=qt is set.
2014-07-01 14:58:02 +02:00
Wladimir J. van der Laan 84ce18ca93 Remove unnecessary dependencies for bitcoin-cli
This commit removes all the unnecessary dependencies (key, core,
netbase, sync, ...) from bitcoin-cli.

To do this it shards the chain parameters into BaseParams, which
contains just the RPC port and data directory (as used by utils and
bitcoin-cli) and Params, with the rest.
2014-06-25 10:31:35 +02:00
Cory Fields f3967bcc50 build: fix build weirdness after 54372482.
bitcoin-config.h moved, but the old file is likely to still exist when
reconfiguring or switching branches. This would've caused files to not rebuild
correctly, and other strange problems.

Make the path explicit so that the old one cannot be found.

Core libs use config/bitcoin-config.h.

Libs (like crypto) which don't want access to bitcoin's headers continue
to use -Iconfig and #include bitcoin-config.h.
2014-06-23 14:04:38 -04:00
Wladimir J. van der Laan 96b733e996 Add -version option to get just the version
Adds a `-version` or `--version` option to print just the version
of the program for bitcoind, bitcoin-cli and bitcoin-qt.

Also make it that `-help` can be used to display the help (as well as
existing `--help`). Up to now, `-help` was the only option that didn't
work with either one or two dashes.
2014-06-11 14:22:50 +02:00
Cory Fields 38e324af86 build: qt: split locale resources. Fixes non-deterministic distcheck
The rcc tool is quirky and only honors files in the same directory as the qrc.
When doing an out-of-tree build (as 'make distcheck' does), the generated
translation files end up in a different path, so rcc can't find them.

Split them up so that rcc is run twice: once for static source files and once
for generated files.
2014-06-10 15:53:21 -04:00
Stuart Cardall 5248ff4099 SetupEnvironment() - clean commit 2014-05-13 10:15:00 +00:00
Philip Kaufmann 4629f95b22
[Qt] fix ugly typo in bitcoin.cpp
Closes #4145.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 1e4b083
2014-05-07 15:48:17 +02:00
Philip Kaufmann d282c1fb64 [Qt] catch Windows shutdown events while client is running
- prevents unsafe shutdowns on Windows, which is known to be
  able to cause problems with wallet.dat
- if a users ends a Windows session, this will initiate a client shutdown
  and show a Windows dialog, that tells the user what is going on (for
  Windows Vista and higher it will even show a reason for blocking the
  Windows session end)
2014-04-15 11:57:55 +02:00
Wladimir J. van der Laan 4ae5e72128
Show error message if ReadConfigFile fails
A runaway exception was raised if ReadConfigFile fails (usually
due to a parse error in bitcoin.conf). Show an error message instead.

Fixes #4013.
2014-04-07 10:16:09 +02:00