aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* gui: Replace interface::Node references with pointersRussell Yanofsky2020-08-261-3/+3
| | | | | | No change in behavior. Replacing references with pointers allows Node interface creation to be delayed until later during gui startup next commit to support implementing -ipcconnect option
* gui: Partially revert #10244 gArgs and Params changesRussell Yanofsky2020-08-261-10/+10
| | | | | | | | | | | | | | | | | | Change gui code to use gArgs, Params() functions directly instead of going through interfaces::Node. Remotely accessing bitcoin-node ArgsManager from bitcoin-gui works fine in https://github.com/bitcoin/bitcoin/pull/10102, when bitcoin-gui spawns a new bitcoin-node process and controls its startup, but for bitcoin-gui to support -ipcconnect option in https://github.com/bitcoin/bitcoin/pull/19461 and connect to an existing bitcoin-node process, it needs ability to parse arguments itself before connecting out. This change also simplifies https://github.com/bitcoin/bitcoin/pull/10102 a bit, by making the bitcoin-gui -> bitcoin-node startup sequence more similar to the bitcoin-node -> bitcoin-wallet startup sequence where the parent process parses arguments and passes them to the child process instead of the parent process using the child process to parse arguments.
* Replace std::to_string with locale-independent alternativeBen Woosley2020-03-141-1/+2
|
* Merge #17453: gui: Fix intro dialog labels when the prune button is toggledJonas Schnelli2020-01-271-3/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 gui: Make Intro consistent with prune checkbox (Hennadii Stepanov) 4824a7d36cf47e766865e0fefe952ec860eb82dd gui: Add Intro::UpdateFreeSpaceLabel() (Hennadii Stepanov) daa3f3fa9071a229275dd6a1b8445237ddc3fa97 refactor: Add Intro::UpdatePruneLabels() (Hennadii Stepanov) e4caa82a03df5c6a6d5d29f34ab006d732c6dac1 refactor: Replace static variable with data member (Hennadii Stepanov) 2bede28cd9ec638d8bb32c187ccf12d89345218e util: Add PruneGBtoMiB() function (Hennadii Stepanov) e35e4b2ba052c9a533626286026dbe0a2d546c5b util: Add PruneMiBtoGB() function (Hennadii Stepanov) Pull request description: On master (a6f6333ba253cda83221ee529810cacf930e413f) and on 0.19.0.1 the intro dialog with prune enabled (checkbox "Discard blocks..." is checked) provides a user with wrong info about the required disk space: ![DeepinScreenshot_bitcoin-qt_20191208112228](https://user-images.githubusercontent.com/32963518/70387510-8daab400-19ae-11ea-9338-29add9c31118.png) Also the paragraph "If you have chosen to limit..." is missed. --- With this PR when prune checkbox is toggled, the related text labels and the amount of required space shown are updated (previously they were only updated when the data directory was updated): ![Screenshot from 2019-12-08 11-34-53](https://user-images.githubusercontent.com/32963518/70387542-eed28780-19ae-11ea-9565-49d8a64b2f33.png) --- This PR is an alternative to #17035. **ryanofsky**'s [suggestion](https://github.com/bitcoin/bitcoin/pull/17035#discussion_r337594268) also has been implemented. ACKs for top commit: emilengler: ACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 Sjors: tACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 ryanofsky: Code review ACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26. It seems like there are a few visible changes here: jonasschnelli: utACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 Tree-SHA512: fa0bbdcfafde97d7906cda066cbd4608b936a71cae1b4cda3ee3aa2eed3a9795f279f14c6b1b4997278e094db891c7d3bb695368ba0882347aa42165a86e5172
| * util: Add PruneGBtoMiB() functionHennadii Stepanov2020-01-081-3/+2
| | | | | | | | This commit does not change behavior.
* | scripted-diff: Bump copyright of files changed in 2020MarcoFalke2020-01-151-1/+1
|/ | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* Merge #17696: qt: Force set nPruneSize in QSettings after the intro dialogfanquake2020-01-081-3/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af112ab62895b145660f4cd7ff842e9cfea2a530 qt: Rename SetPrune() to InitializePruneSetting() (Hennadii Stepanov) b0bfbe50282877a1eee87118902901a280d6656d refactor: Drop `bool force' parameter (Hennadii Stepanov) 68c9bbe9bc91f882404556998666b1b5acea60e4 qt: Force set nPruneSize in QSettings after intro (Hennadii Stepanov) a82bd8fa5708c16d1db3edc4e82d70788eb5af19 util: Replace magics with DEFAULT_PRUNE_TARGET_GB (Hennadii Stepanov) Pull request description: On master (5622d8f3156a293e61d0964c33d4b21d8c9fd5e0), having `QSettings` set already ``` $ grep nPruneSize ~/.config/Bitcoin/Bitcoin-Qt-testnet.conf nPruneSize=6 ``` enabling prune option in the intro dialog ``` $ ./src/qt/bitcoin-qt -choosedatadir -testnet ``` ![DeepinScreenshot_select-area_20191208120425](https://user-images.githubusercontent.com/32963518/70388183-eed68580-19b6-11ea-9aa1-f9ad9aaa68a6.png) has no effect: ``` $ grep Prune ~/.bitcoin/testnet3/debug.log 2019-12-08T10:04:41Z Prune configured to target 5722 MiB on disk for block and undo files. ``` --- With this PR: ``` $ grep Prune ~/.bitcoin/testnet3/debug.log 2019-12-08T10:20:35Z Prune configured to target 1907 MiB on disk for block and undo files. ``` This PR has been split of #17453 (the first two commits) as it fixes an orthogonal bug. Refs: - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r345424240 - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r350960201 ACKs for top commit: Sjors: Code review re-ACK af112ab62895b145660f4cd7ff842e9cfea2a530 ryanofsky: Code review ACK af112ab62895b145660f4cd7ff842e9cfea2a530. Just suggested changes since last review (thanks!) promag: Tested ACK af112ab62895b145660f4cd7ff842e9cfea2a530. Latest suggestions and changes look good to me. Tree-SHA512: 8ddad34b30dcc2cdcad6678ba8a0b36fa176e4e3465862ef6eee9be0f98d8146705138c9c7995dd8c0990af41078ca743fef1a90ed9240081f052f32ddec72b9
| * qt: Force set nPruneSize in QSettings after introHennadii Stepanov2020-01-081-2/+12
| | | | | | | | | | If QSettings is set already, it is required to force set nPruneSize after the intro dialog.
| * util: Replace magics with DEFAULT_PRUNE_TARGET_GBHennadii Stepanov2019-12-081-1/+1
| | | | | | | | This commit does not change behavior.
* | scripted-diff: Bump copyright of files changed in 2019MarcoFalke2019-12-301-1/+1
|/ | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* Remove BIP70 Supportfanquake2019-10-241-19/+1
|
* [gui] add explicit prune setterSjors Provoost2019-08-241-5/+17
| | | | This makes it possible to enable pruning after the OptionsModel has been initialized and reset.
* Use qInfo() if no error occursHennadii Stepanov2019-06-211-1/+1
| | | | | | qWarning() is used to report warnings and recoverable errors in your application. qInfo() is used for informational messages (since Qt 5.5).
* Resolve the qt/guiutil <-> qt/optionsmodal CD2512019-04-231-3/+2
| | | | | | | | This pull request attempts to resolve the `qt/guiutil` <-> `qt/optionsmodel` circular dependency. The circular dependency is resolved by moving the `Intro::getDefaultDataDirectory` member function to `GUIUtil::getDefaultDataDirectory`.
* Correct units for "-dbcache" and "-prune"Hennadii Stepanov2019-01-301-4/+5
| | | | | | | | | All dbcache-related values in the code are measured in MiB (not in megabytes, MB) or in bytes. The GUI "-prune" values in GB are translated to the node values in MiB correctly. The maximum of the "-prune" QSpinBox is not limited by the default value of 99 (GB). Also, this improves log readability.
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* scripted-diff: Remove trailing whitespacesJoão Barbosa2018-07-241-1/+1
| | | | | | | | -BEGIN VERIFY SCRIPT- sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue') -END VERIFY SCRIPT-
* [qt] OptionsDialog: add prune settingSjors Provoost2018-05-151-0/+26
|
* Fix illegal default `addProxy` and `addrSeparateProxyTor` settings.2512018-04-101-2/+21
|
* scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky2018-04-071-2/+2
| | | | | | | | | | | | | | | | | | Rename `interface` to `interfaces` Build failure reported by Chun Kuan Lee <[email protected]> https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756 -BEGIN VERIFY SCRIPT- git mv src/interface src/interfaces ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; } ren interface/ interfaces/ ren interface:: interfaces:: ren BITCOIN_INTERFACE_ BITCOIN_INTERFACES_ ren "namespace interface" "namespace interfaces" -END VERIFY SCRIPT-
* Remove direct bitcoin calls from qt/optionsmodel.cppRussell Yanofsky2018-04-041-23/+13
|
* boost: drop boost threads for upnpCory Fields2018-02-081-1/+6
|
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* Merge #10574: Remove includes in .cpp files for things the corresponding .h ↵Wladimir J. van der Laan2017-12-121-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file already included a720b92 Remove includes in .cpp files for things the corresponding .h file already included (practicalswift) Pull request description: Remove includes in .cpp files for things the corresponding .h file already included. Example case: * `addrdb.cpp` includes `addrdb.h` and `fs.h` * `addrdb.h` includes `fs.h` Then remove the direct inclusion of `fs.h` in `addrman.cpp` and rely on the indirect inclusion of `fs.h` via the included `addrdb.h`. In line with the header include guideline (see #10575). Tree-SHA512: 8704b9de3011a4c234db336a39f7d2c139e741cf0f7aef08a5d3e05197e1e18286b863fdab25ae9638af4ff86b3d52e5cab9eed66bfa2476063aa5c79f9b0346
| * Remove includes in .cpp files for things the corresponding .h file already ↵practicalswift2017-11-161-1/+0
| | | | | | | | included
* | gui: Fix proxy setting options dialog crashWladimir J. van der Laan2017-12-071-52/+57
|/ | | | | | | | | | | | | | | | | | | This fixes a crash bug when opening the options dialog. - Check the return value of split() to avoid segmentation faults due to out of bounds when the user manages to enter invalid proxy settings. This is reported resonably often. - Move the default proxy/port to a constant instead of hardcoding magic values. - Factor out some common code. - Revert #11448 because this proves a more robust replacement, it is no longer necessary and didn't generally solve the issue. No attempt is made to do full sanity checking on the proxy, so it can still be rejected by the core with an InitError message.
* qt: refactor: Changes to make include paths absoluteWladimir J. van der Laan2017-11-161-1/+1
| | | | | | | 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.
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* [gui] reset addrProxy/addrSeparateProxyTor if colon char missingCristian Mircea Messel2017-10-041-2/+2
| | | | | | If addrProxy or addrSeparateProxyTor do not have a colon in the string somewhere in the QSettings storage, then attempting to open the options dialog will cause the entire program to crash.
* qt: Backup former GUI settings on `-resetguisettings`Wladimir J. van der Laan2017-09-231-0/+22
| | | | | | Writes the GUI settings to `guisettings.bak` in the data directory before wiping them. This can be used to retroactively troubleshoot issues (e.g. #11262) where `-resetguisettings` solves the problem.
* Merge #9964: Add const to methods that do not modify the object for which it ↵MarcoFalke2017-08-161-1/+1
|\ | | | | | | | | | | | | | | | | | | 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
| * Add const to methods that do not modify the object for which it is calledpracticalswift2017-07-251-1/+1
| |
* | scripted-diff: stop using the gArgs wrappersMarko Bencun2017-08-141-12/+12
|/ | | | | | | | 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-
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Un-expose mapArgs from utils.hMatt Corallo2016-12-241-2/+2
|
* Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo2016-12-021-1/+1
|
* Merge #8487: Persist the datadir after option resetJonas Schnelli2016-08-251-0/+14
|\ | | | | | | | | 57acb82 Load choose datadir dialog after options reset (Andrew Chow) 15df3c1 Persist the datadir after option reset (Andrew Chow)
| * Load choose datadir dialog after options resetAndrew Chow2016-08-241-0/+3
| |
| * Persist the datadir after option resetAndrew Chow2016-08-101-0/+11
| | | | | | | | After a reset is performed, the datadir setting is saved and readded to the settings so that it is persisted across option resets.
* | net: narrow include scope after moving to netaddressCory Fields2016-07-311-0/+1
|/ | | | | Net functionality is no longer needed for CAddress/CAddrman/etc. now that CNetAddr/CService/CSubNet are dumb storage classes.
* [Qt] Add dbcache migration pathJonas Schnelli2016-07-281-0/+21
|
* Qt: Add option to hide the system tray iconTyler Hardin2016-05-111-1/+13
| | | | | | | | | | | | | | My changes leave all tray icon and menu creation/initialization logic untouched. It only shows or hides the icon according to the setting. A new checkbox was added to the OptionsDialog under the Window tab. A bool option named "hideTrayIcon" was added to OptionsModel. This checkbox was mapped like other all options to the OptionsModel. A signal was added to the OptionsModel for broadcasting changes the the hideTrayIcon option. This signal was connected to a new slot added to BitcoinGUI named setTrayIconVisible(bool). The slot simply hides or shows the trayIcon in BitcoinGUI according to the parameter recieved.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* [Qt] add startup option to reset Qt settingsJonas Schnelli2015-11-131-3/+6
|
* Merge pull request #4587Wladimir J. van der Laan2015-08-071-0/+57
|\ | | | | | | ed166df [Qt] allow users to set -onion via GUI (Philip Kaufmann)
| * [Qt] allow users to set -onion via GUIPhilip Kaufmann2015-07-241-0/+57
| | | | | | | | | | - also allow users to see, if the default proxy (-proxy) is used for reaching peers via IPv6 or Tor
* | Includes: Cleanup around net main and walletJorge Timón2015-07-231-1/+1
|/ | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* qt: define QT_NO_KEYWORDSWladimir J. van der Laan2015-07-151-3/+3
| | | | | | | | 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.
* privacy: Stream isolation for TorWladimir J. van der Laan2015-04-171-2/+2
| | | | | | | | | | | | | According to Tor's extensions to the SOCKS protocol (https://gitweb.torproject.org/torspec.git/tree/socks-extensions.txt) it is possible to perform stream isolation by providing authentication to the proxy. Each set of credentials will create a new circuit, which makes it harder to correlate connections. This patch adds an option, `-proxyrandomize` (on by default) that randomizes credentials for every outgoing connection, thus creating a new circuit. 2015-03-16 15:29:59 SOCKS5 Sending proxy authentication 3842137544:3256031132
* [Move Only] Move wallet related things to src/wallet/Jonas Schnelli2015-03-121-2/+2
| | | | could once be renamed from /src/wallet to /src/legacywallet.