aboutsummaryrefslogtreecommitdiff
path: root/src/qt/intro.cpp
AgeCommit message (Collapse)Author
2021-05-10Merge bitcoin-core/gui#257: refactor: Use template function qOverload in ↵Hennadii Stepanov
signal-slot connections cdbc2bd1f1c171848c1fef7f217afe140e1afb06 qt: Use template function qOverload in signal-slot connections (Hennadii Stepanov) Pull request description: A nice template function [`qOverload`](https://doc.qt.io/qt-5/qtglobal.html#qOverload) is available for us now (https://github.com/bitcoin/bitcoin/pull/20413, https://github.com/bitcoin/bitcoin/pull/21286). Its usage makes code much more readable. This PR does not change behavior. ACKs for top commit: Talkless: utACK cdbc2bd1f1c171848c1fef7f217afe140e1afb06. promag: Code review ACK cdbc2bd1f1c171848c1fef7f217afe140e1afb06. Tree-SHA512: 72002aa646b1a79bab62d498825b3f245dc7ebdc189280f8bd3b4076e1bb50be8802c02bc872ff6f70c1ea81faec66d3bec36471119dd98c9e70d87b990396ae
2021-05-10Merge bitcoin-core/gui#296: Do not use QObject::tr plural syntax for numbers ↵Hennadii Stepanov
with a unit symbol 3adde72bc99215062c8dabd38f8c34ad093452b5 qt: Do not use QObject::tr plural syntax for numbers with a unit symbol (Hennadii Stepanov) Pull request description: Working on translation, I found this is useless and unnecessarily burdensome for translators. I guess, this statement is correct internationally wide :) ACKs for top commit: jarolrod: ACK 3adde72bc99215062c8dabd38f8c34ad093452b5 promag: Code review ACK 3adde72bc99215062c8dabd38f8c34ad093452b5. Agree with OP, looks reasonable to me. Tree-SHA512: bde65c122ca0feb7771d932cce63fd1aef1e7a9dda0188d19c577d57b279172204ac1bfcb6106a78b2c4d55d628e6dc0967051e064ec40d3c5aeafd4a48f0589
2021-04-30qt: Use template function qOverload in signal-slot connectionsHennadii Stepanov
This commit does not change behavior.
2021-04-29Merge bitcoin-core/gui#125: Enable changing the autoprune block space size ↵Hennadii Stepanov
in intro dialog 415fb2e1abac189fcbe8eccf2ea065724d17460f GUI/Intro: Move prune setting below explanation (Luke Dashjr) 2a84c6bcf61429ac507b506a39247b3a66edbcb4 GUI/Intro: Estimate max age of backups that can be restored with pruning (Luke Dashjr) e2dcd957fa206a28404ff824fb764b8889705fb2 GUI/Intro: Rework UI flow to let the user set prune size in GBs (Luke Dashjr) f2e5a6b54fa38b10d822609939b8108bd8fe041b GUI/Intro: Abstract GUI-to-option into Intro::getPrune (Luke Dashjr) 62932cc686dc46ce14c026993deea8e561654177 GUI/Intro: Return actual prune setting from showIfNeeded (Luke Dashjr) Pull request description: ![Screenshot_20200911_095102](https://user-images.githubusercontent.com/1095675/92933661-0c4cea00-f436-11ea-9853-2456091ffab3.png) Moved from https://github.com/bitcoin/bitcoin/pull/18728 ACKs for top commit: ryanofsky: Code review ACK 415fb2e1abac189fcbe8eccf2ea065724d17460f. Changes since last review: mb/gib suffixes, constexpr QOverload expected_backup_days tweaks, new moveonly layout commit jarolrod: Tested ACK 415fb2e. Talkless: tACK 415fb2e1abac189fcbe8eccf2ea065724d17460f, tested on Debian Sid with Qt 5.15.2. hebasto: ACK 415fb2e1abac189fcbe8eccf2ea065724d17460f, my unresolved comments are not blockers, and they could be resolved in follow ups. Tree-SHA512: bd4882a9c08e6a6eb14b7fb6366983db8581425b4949fea212785d34d8fad9e32fb81ca8c8cdbfb2c05ea394aaf5a746ba2cf16623795c7252c3bdb61d455f00
2021-04-25qt: Do not use QObject::tr plural syntax for numbers with a unit symbolHennadii Stepanov
This is useless and unnecessarily burdensome for translators.
2020-11-30GUI/Intro: Estimate max age of backups that can be restored with pruningLuke Dashjr
2020-11-19GUI/Intro: Rework UI flow to let the user set prune size in GBsLuke Dashjr
2020-11-19GUI/Intro: Abstract GUI-to-option into Intro::getPruneLuke Dashjr
2020-11-19GUI/Intro: Return actual prune setting from showIfNeededLuke Dashjr
2020-09-07scripted-diff: Remove unused "What's This" button in dialogs on WindowsHennadii Stepanov
-BEGIN VERIFY SCRIPT- git grep -l 'QDialog(parent)' -- src/qt | xargs sed -i -E 's/QDialog\(parent\)/QDialog\(parent, GUIUtil::dialog_flags\)/g' -END VERIFY SCRIPT-
2020-08-26gui: Remove unused interfaces::Node referencesRussell Yanofsky
Remove Node references no longer needed after previous commit
2020-08-26gui: Partially revert #10244 gArgs and Params changesRussell Yanofsky
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.
2020-01-27Merge #17453: gui: Fix intro dialog labels when the prune button is toggledJonas Schnelli
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
2020-01-15scripted-diff: Bump copyright of files changed in 2020MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-01-14gui: Make Intro consistent with prune checkboxHennadii Stepanov
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).
2020-01-14gui: Add Intro::UpdateFreeSpaceLabel()Hennadii Stepanov
If a new custom datadir has enough free space, the prune checkbox gets unchecked, unless -prune=NNN command-line option is provided.
2020-01-14refactor: Add Intro::UpdatePruneLabels()Hennadii Stepanov
This is a move-only commit and it does not change behavior.
2020-01-14refactor: Replace static variable with data memberHennadii Stepanov
2020-01-08util: Add PruneMiBtoGB() functionHennadii Stepanov
Now the text of prune QCheckBox shows the space in GB instead of thousands MiB, which is consistent with other parts of the GUI.
2020-01-08Merge #17696: qt: Force set nPruneSize in QSettings after the intro dialogfanquake
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
2019-12-30scripted-diff: Bump copyright of files changed in 2019MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2019-12-08util: Replace magics with DEFAULT_PRUNE_TARGET_GBHennadii Stepanov
This commit does not change behavior.
2019-09-26qt: Change default size of intro frameEmil Engler
2019-08-24[gui] intro: enable pruning by default unless disk is bigSjors Provoost
Color the text "GB needed for full chain" orange for nodes that barely have enough space.
2019-08-24[gui] intro: add prune preferenceSjors Provoost
Adds a checkbox to the introduction screen letting the user enable pruning from the start. Disable checkbox when launched with -prune
2019-08-24[gui] intro: inform caller if intro was shownSjors Provoost
2019-06-26scripted-diff: Avoid passing PACKAGE_NAME for translationMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/\<\w+(::\w+)?\(PACKAGE_NAME\)/PACKAGE_NAME/g' $(git grep -l --extended-regexp '\<\w+(::\w+)?\(PACKAGE_NAME\)' src) -END VERIFY SCRIPT-
2019-04-23Resolve the qt/guiutil <-> qt/optionsmodal CD251
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`.
2019-01-30Merge #15163: Correct units for "-dbcache" and "-prune"Wladimir J. van der Laan
6f6514a08090b37b5e8c086015ee4881813ef867 Correct units for "-dbcache" and "-prune" (Hennadii Stepanov) Pull request description: Actually, all `dbcache`-related values in the code are measured in MiB (not in megabytes, MB) or in bytes (e.g., `nTotalCache`). See: https://github.com/bitcoin/bitcoin/blob/master/src/txdb.h https://github.com/bitcoin/bitcoin/blob/ba8c8b22272ad40fe2de465d7e745532bab48d3b/src/init.cpp#L1405-L1424 Also, "-prune" is fixed: 1. The GUI values in GB are translated to the node values in MiB correctly. 2. The maximum of the "prune" `QSpinBox` is not limited by default value of 99 (GB). Fix: #15106 Tree-SHA512: 151ec43b31b1074db8b345fedb1dcc10bde225899a5296bfc183f57e1553d13ac27db8db100226646769ad03c9fcab29d88763065a471757c6c41ac51108459d
2019-01-30Correct units for "-dbcache" and "-prune"Hennadii Stepanov
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.
2019-01-17Merge #14250: qt: Remove redundant stopThread() and stopExecutor() signalsWladimir J. van der Laan
24313fbf7e3d69145bc18c089601ba7aea35d61c Remove redundant stopExecutor() signal (Hennadii Stepanov) 1c0e0a5e38102a67cb66cf6eef4098bdb64bb0f5 Remove redundant stopThread() signal (Hennadii Stepanov) Pull request description: The `QThread::finished` signal do this work. Tree-SHA512: 1afce23d30232276d50c3af5af79d83b88e390a2b71f7df585cc1079585d330447d179bbc34c0a89599beb2da035dfd5b9ce23238171490825cabc3a19ae6e67
2019-01-13Replace remaining 0 with nullptr in Qt codeBen Woosley
Also used type-appropriate enum values such as Qt::NoItemFlags in some cases. All cases identified via -Wzero-as-null-pointer-constant
2019-01-13Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)practicalswift
Qt-only changes.
2019-01-11Merge #13216: [Qt] implements concept for different disk sizes on introJonas Schnelli
9d0e52834 implements different disk sizes for different networks on intro (marcoagner) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/13213. Mostly, I layed out the concept to open the PR for refinement and getting feedback if the approach is okay. Changes are expected. Two points: - The values for both new consts `TESTNET_BLOCK_CHAIN_SIZE` and `TESTNET_CHAIN_STATE_SIZE` is certainly not optimal; I just checked the size of my testnet3 related dirs and set them to little bit higher values. Which values should be used? - Should we do something like this to regtest? Or these "niceties" do not matter when on regtest? Thanks! Tree-SHA512: 8ae87a29fa8356b899e7a823c76cde793d9126b4ee59554d7a2a8edb088fe42a19976b34c06c2fd4a98a727e1e4971dd983f42b6093ea6caa255b45004e22bb4
2019-01-10Remove redundant stopThread() signalHennadii Stepanov
2018-11-04scripted-diff: Move util files to separate directory.Jim Posen
-BEGIN VERIFY SCRIPT- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj -END VERIFY SCRIPT-
2018-10-07implements different disk sizes for different networks on intromarcoagner
- Creates m_assumed_blockchain_size and m_assumed_chain_state_size on CChainParams. - Implements access to CChainParams' m_assumed_blockchain_size and m_assumed_chain_state_size on node interface. - Implements m_assumed_blockchain_size and m_assumed_chain_state_size on qt/intro via node interface. - Updates release process document with the new CChainParam's values.
2018-08-21qt: Use new Qt5 connect syntaxJoão Barbosa
2018-07-27qt: Set BLOCK_CHAIN_SIZE = 220DrahtBot
2018-07-27Update copyright headers to 2018DrahtBot
2018-04-07scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky
Rename `interface` to `interfaces` Build failure reported by Chun Kuan Lee <ken2812221@gmail.com> 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-
2018-04-04Remove direct bitcoin calls from qt/intro.cppRussell Yanofsky
2018-01-24qt: Bump BLOCK_CHAIN_SIZE to 200GBWladimir J. van der Laan
Part of the release process for 0.16. Value is open for discussion, my blocks/ directory is 163GB but this leaves some slack.
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-11-18Create walletdir if datadir doesn't exist and fix testsMeshCollider
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-08-16Declare single-argument (non-converting) constructors "explicit"practicalswift
In order to avoid unintended implicit conversions.
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-05qt: Increase BLOCK_CHAIN_SIZE constantsWladimir J. van der Laan
- Increase `BLOCK_CHAIN_SIZE` from 120GB to 150GB - Increase `CHAIN_STATE_SIZE` from 2GB to 4GB I took the local sizes of the blocks and chainstate directory, and added a bit extra to accomodate the near future (15GB for the chain and 1GB for the chainstate).