aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* qt: Assert QMetaObject::invokeMethod resultJoão Barbosa2019-07-091-7/+14
| | | | | Github-Pull: #16348 Rebased-From: 64fee489448c62319e77941c30152084695b5a5d
* [wallet] Support creating a blank walletAndrew Chow2019-02-101-6/+1
| | | | | | | A blank wallet is a wallet that has no keys, script or watch only things. A new wallet flag indicating that it is blank will be set when the wallet is blank. Once it is no longer blank (a seed has been generated, keys or scripts imported, etc), the flag will be unset.
* Notify the GUI that the keypool has changed to set the receive buttonAndrew Chow2019-01-231-0/+12
| | | | | | Whenever the keypool changes (new keys generated, new seed set, keypool runs out, etc.), notify the GUI that the keypool has changed. The receive button can then be enabled and disabled as necessary.
* Check for more than private keys disabled to show receive buttonAndrew Chow2019-01-211-0/+5
|
* gui: Use AutoConnection for WalletModel::unload signalJoão Barbosa2019-01-181-1/+1
|
* Replace remaining 0 with nullptr in Qt codeBen Woosley2019-01-131-3/+3
| | | | | | | Also used type-appropriate enum values such as Qt::NoItemFlags in some cases. All cases identified via -Wzero-as-null-pointer-constant
* Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)practicalswift2019-01-131-3/+3
| | | | Qt-only changes.
* Merge #15109: refactor: Use C++11 default member initializersWladimir J. van der Laan2019-01-091-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fa2510d5c1cdf9c2cd5cc9887302ced4378c7202 Use C++11 default member initializers (MarcoFalke) Pull request description: Changes: * Remove unused constructors that leave some members uninitialized * Remove manual initialization in each constructor and prefer C++11 default member initializers This is not a stylistic change, but a change that avoids bugs such as: * fix uninitialized read when stringifying an addrLocal #14728 * qt: Initialize members in WalletModel #12426 * net: correctly initialize nMinPingUsecTime #6636 * ... Tree-SHA512: 0f896f3b9fcc464d5fc7525f7c86343ef9ce9fb13425fbc68e9a9728fd8710c2b4e2fd039ee08279ea41ff20fd92b7185cf5cca95a0bcb6a5340a1e6f03cae6b
| * Use C++11 default member initializersMarcoFalke2019-01-051-2/+0
| |
* | qt: Factor out WalletModel::getDisplayName()João Barbosa2019-01-041-1/+7
|/
* Merge #13743: refactor: Replace boost::bind with std::bindMarcoFalke2018-12-291-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | cb53b825c2 scripted-diff: Replace boost::bind with std::bind (Chun Kuan Lee) 2196c51821 refactor: Use boost::scoped_connection in signal/slot, also prefer range-based loop instead of std::transform (Chun Kuan Lee) Pull request description: Replace boost::bind with std::bind - In `src/rpc/server.cpp`, replace `std::transform` with simple loop. - In `src/validation.cpp`, store the `boost::signals2::connection` object and use it to disconnect. - In `src/validationinterface.cpp`, use 2 map to store the `boost::signals2::scoped_connection` object. Tree-SHA512: 6653cbe00036fecfc495340618efcba6d7be0227c752b37b81a27184433330f817e8de9257774e9b35828026cb55f11ee7f17d6c388aebe22c4a3df13b5092f0
| * scripted-diff: Replace boost::bind with std::bindChun Kuan Lee2018-10-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for j in $(seq 1 5) do sed -i "s/ _${j}/ std::placeholders::_${j}/g" $(git grep --name-only " _${j}" -- '*.cpp' '*.h') done sed -i "s/boost::bind/std::bind/g" $(git grep --name-only boost::bind -- '*.cpp' '*.h') sed -i "s/boost::ref/std::ref/g" $(git grep --name-only boost::ref -- '*.cpp' '*.h') sed -i '/boost\/bind/d' $(git grep --name-only boost/bind) -END VERIFY SCRIPT-
* | scripted-diff: Move util files to separate directory.Jim Posen2018-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* | build: Add --disable-bip70 configure optionWladimir J. van der Laan2018-10-091-1/+12
|/ | | | | | This patch adds a --disable-bip70 configure option that disables BIP70 payment request support. When disabled, this removes the dependency of the GUI on OpenSSL and Protobuf.
* [wallet] Kill accountsJohn Newbery2018-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does the following changes: - [wallet] Remove 'account' argument from GetLegacyBalance() - GetLegacyBalance() is never called with an account argument. Remove the argument and helper functions. - [wallet] Remove CWallet::ListAccountCreditDebit() - Function no longer used. - [wallet] Remove AccountMove() - Function no longer used. - [wallet] Remove AddAccountingEntry() - Function no longer used. - [wallet] Remove GetAccountCreditDebit() - Function no longer used. - [wallet] Don't rewrite accounting entries when reordering wallet transactions. - Accounting entries are deprecated. Don't rewrite them to the wallet database when re-ordering transactions. - [wallet] Remove WriteAccountingEntry() - Function no longer used. - [wallet] Don't read acentry key-values from wallet on load. - [wallet] Remove ListAccountCreditDebit() - Function no longer used. - [wallet] Remove CAccountingEntry class - No longer used - [wallet] Remove GetLabelDestination - Function no longer used. - [wallet] Delete unused account functions - ReadAccount - WriteAccount - EraseAccount - DeleteLabel - [wallet] Remove fromAccount argument from CommitTransaction() - [wallet] Remove strFromAccount. - No longer used. - [wallet] Remove strSentAccount from GetAmounts(). - No longer used. - [wallet] Update zapwallettxes comment to remove accounts. - [wallet] Remove CAccount - No longer used - [docs] fix typo in release notes for PR 14023
* qt: Use new Qt5 connect syntaxJoão Barbosa2018-08-211-1/+1
|
* Merge #12818: [qt] TransactionView: highlight replacement tx after fee bumpMarcoFalke2018-08-201-3/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d795c610d3 [qt] TransactionView: highlight replacement tx after fee bump (Sjors Provoost) Pull request description: Consistent with #12421 which highlights the transaction after send. <img width="747" alt="1" src="https://user-images.githubusercontent.com/10217/38036280-a7358ea4-32a6-11e8-8f92-417e9e1e3e8b.png"> <img width="685" alt="2" src="https://user-images.githubusercontent.com/10217/38036289-aac87040-32a6-11e8-9f94-81745ff6c592.png"> ~I'm not too proud of the `QTimer::singleShot(10` bit; any suggestions on how to properly wait for the transactions table to become aware of the new transaction?~ Although I could have called `focusTransaction()` directly from `TransactionView::bumpFee()` I'm using the same signal as the send screen. This should make it easier to move fee bump / transaction replacement functionality around later. Tree-SHA512: 242055b7c3d32c7b2cf871f5ceda2581221902fd53fa29e0b092713fc16d3191adbe8cbb28417d522dda9febec8cc05e07afe3489cd7caaecd33460c1dde6fbc
| * [qt] TransactionView: highlight replacement tx after fee bumpSjors Provoost2018-08-011-3/+2
| |
* | Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|/
* [Qt] Disable creating receive addresses when private keys are disabledJonas Schnelli2018-07-121-0/+5
|
* ui: Support wallets unloaded dynamicallyJoão Barbosa2018-06-181-0/+8
|
* Add purpose arg to Wallet::getAddressJames O'Beirne2018-04-251-1/+2
| | | | Also make all arguments to getAddress required and document args at call sites.
* wallet: Make fee settings non-static membersMarcoFalke2018-04-231-1/+1
|
* scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky2018-04-071-5/+5
| | | | | | | | | | | | | | | | | | 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-
* Use WalletBalances struct in QtRussell Yanofsky2018-04-041-1/+1
| | | | | Suggested by John Newbery <[email protected]> https://github.com/bitcoin/bitcoin/pull/10244#discussion_r177504284
* Remove direct bitcoin calls from qt transaction table filesRussell Yanofsky2018-04-041-15/+4
|
* Remove direct bitcoin calls from qt/paymentserver.cppRussell Yanofsky2018-04-041-1/+1
|
* Remove direct bitcoin calls from qt/addresstablemodel.cppRussell Yanofsky2018-04-041-1/+1
|
* Remove direct bitcoin calls from qt/coincontroldialog.cppRussell Yanofsky2018-04-041-32/+0
|
* Remove most direct bitcoin calls from qt/walletmodel.cppRussell Yanofsky2018-04-041-230/+76
|
* do not truncate .dat extension for wallets in guiGregory Sanders2018-03-261-5/+1
|
* Merge #12610: Multiwallet for the GUIJonas Schnelli2018-03-261-2/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 779c5f984 Qt: hide RPCConsole wallet selector when no wallets are present (Jonas Schnelli) dc6f150f3 Qt: show wallet name in request dlg in case of multiwallet (Jonas Schnelli) 4826ca4b8 Qt: show wallet name in send confirmation dlg in case of multiwallet (Jonas Schnelli) cfa4133ce GUI: RPCConsole: Log wallet changes (Luke Dashjr) b6d04fc7c Qt: Get wallet name from WalletModel rather than passing it around (Luke Dashjr) 12d8d2681 Qt: When multiple wallets are used, include in notifications the name (Jonas Schnelli) d1ec34a76 Qt: QComboBox::setVisible doesn't work in toolbars, so defer adding it at all until needed (Luke Dashjr) d49cc70e6 Qt: Add wallet selector to debug console (Jonas Schnelli) d558f44c5 Bugfix: RPC: Add missing UnregisterHTTPHandler for /wallet/ (Luke Dashjr) 85d531971 Qt: Ensure UI updates only come from the currently selected walletView (Luke Dashjr) e449f9a9e Qt: Add a combobox to toolbar to select from multiple wallets (Luke Dashjr) 3dba3c3ac Qt: Load all wallets into WalletModels (Luke Dashjr) Pull request description: This is an overhaul of #11383 (plus some additions). It avoids unnecessary coupling of httpserver/jsonrpc and the wallet as well as it avoids pointer pure passing (and pointer deletion) of `CWallet` (plus other minor design changes). Additionally it adds the wallet name to the sendconfirmation and request dialog (in case multiwallet is active) Tree-SHA512: 3d06e18badbc5d1821e488bf1dae463bb0be544cf11b2b618e025812bfdd13c5f39604bb93b4c705313930e7dc4e66f4848b9469ba14871bade58e7a027246a1
| * Qt: When multiple wallets are used, include in notifications the nameJonas Schnelli2018-03-261-0/+15
| |
| * Qt: Ensure UI updates only come from the currently selected walletViewLuke Dashjr2018-03-061-2/+3
| |
* | Merge #12716: Fix typos and cleanup in various filesMarcoFalke2018-03-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 4d9b4256d8 Fix typos (Dimitris Apostolou) Pull request description: Unfortunately I messed up my repo while trying to squash #12593 so I created a PR with just the correct fixes. Tree-SHA512: 295d77b51bd2a9381f1802c263de7ffb2edd670d9647391e32f9a414705b3c8b483bb0e469a9b85ab6a70919ea13397fa8dfda2aea7a398b64b187f178fe6a06
| * | Fix typosDimitris Apostolou2018-03-211-1/+1
| | |
* | | wallet: Change output type globals to membersMarcoFalke2018-03-171-1/+1
|/ /
* | [wallet] Construct CWalletTx objects in CommitTransactionRussell Yanofsky2018-03-071-8/+8
| | | | | | | | | | | | | | | | | | | | | | Construct CWalletTx objects in CWallet::CommitTransaction, instead of having callers do it. This ensures CWalletTx objects are constructed in a uniform way and all fields are set. This also makes it possible to avoid confusing and wasteful CWalletTx copies in https://github.com/bitcoin/bitcoin/pull/9381 There is no change in behavior.
* | Split key_io (address/key encodings) off from base58Pieter Wuille2018-02-191-1/+1
|/
* qt: Initialize members in WalletModelMarcoFalke2018-02-131-0/+1
|
* Merge #10498: Use static_cast instead of C-style casts for non-fundamental typesMarcoFalke2018-02-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Use static_cast instead of C-style casts for non-fundamental typespracticalswift2017-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | [qt] receive tab: bech32 address opt-in checkboxSjors Provoost2018-01-161-0/+5
| | | | | | | | When launched with -adresstype=legacy the checkbox will be hidden.
* | Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
| |
* | [Wallet] Use RBF by default in QT onlySjors Provoost2017-12-221-5/+0
| | | | | | | | | | | | | | GUI wallet uses RBF by default, regardless of -walletrbf. RPC and debug console in the GUI remain unchanged; they don't use RBF by default, unless launched with -walletrbf=1.
* | scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* | [wallet] Change feebumper from class to functionsRussell Yanofsky2017-11-101-30/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change feebumper from a stateful class into a namespace of stateless functions. Having the results of feebumper calls persist in an object makes process separation between Qt and wallet awkward, because it means the feebumper object either has to be serialized back and forth between Qt and wallet processes between fee bump calls, or that the feebumper object needs to stay alive in the wallet process with an object reference passed back to Qt. It's simpler just to have fee bumper calls return their results immediately instead of storing them in an object with an extended lifetime. In addition to making feebumper stateless, also: - Move LOCK calls from Qt code to feebumper - Move TransactionCanBeBumped implementation from Qt code to feebumper
* | [refactor] Make feebumper namespaceRussell Yanofsky2017-11-101-3/+3
| | | | | | | | | | | | Future commit will remove the FeeBumper class. This commit simply places everything into a feebumper namespace, and changes the enum class name from BumpeFeeResult to feebumper::Result.
* | [trivial] Rename feebumper variables according to project code styleRussell Yanofsky2017-11-101-2/+2
| | | | | | | | | | | | | | | | | | Future PRs will completely refactor this translation unit and touch all this code so we rename the variables to follow project stlye guidelines in this preparation commit. Don't use m_ prefixes for member variables since we're going to remove the class entirely in the next commits.
* | Fix qt build broken by 5a5e4e9Matt Corallo2017-11-091-1/+1
|/