Commit graph

3817 commits

Author SHA1 Message Date
Hennadii Stepanov
e2b55cd201
Merge bitcoin-core/gui#335: test: Use QSignalSpy instead of QEventLoop
7eea659fc9 qt, test: use qsignalspy instead of qeventloop (Jarol Rodriguez)

Pull request description:

  This PR refactors our GUI `apptests` to use [QSignalSpy](https://doc.qt.io/qt-5/qsignalspy.html) instead of [QEventLoop](https://doc.qt.io/qt-5/qeventloop.html).

  `QSignalSpy` is more appropriate for our GUI test's as it is purpose-built for testing emission of signals and sets up its own `QEventLoop` when the `wait` function is called.

ACKs for top commit:
  hebasto:
    ACK 7eea659fc9, tested on Linux Mint 20.1 (Qt 5.12.8).
  promag:
    Code review ACK 7eea659fc9.

Tree-SHA512: 3adddbcc5efd726302b606980c9923025c44bb8ee16cb8a183e633e423179c0822db66de9ccba20dc5124fff34af4151a379c9cd18130625c60789ce809ee6fd
2021-05-21 00:02:06 +03:00
Hennadii Stepanov
0f3d955a38
qt: Make RPC console welcome message translation-friendly 2021-05-20 23:43:53 +03:00
W. J. van der Laan
710c8ba829
Merge bitcoin-core/gui#281: set shortcuts for console's resize buttons
2a45134b56 qt: Add shortcuts for console font resize buttons (Hennadii Stepanov)
a2e122f0fe qt: Add GUIUtil::AddButtonShortcut (Hennadii Stepanov)
4ee9ee7236 qt: Use native presentation of shortcut (Hennadii Stepanov)

Pull request description:

  On `master` the only way to resize the console font is to manually move your mouse and click the resize buttons. This PR introduces convenient keyboard shortcuts to resize the console font.

  The common resize shortcuts for applications are `Ctrl+=`/`Ctrl++` and `Ctrl+-`/`Ctrl+_`. This means that the resize QPushButtons need two shortcuts each, but you cannot assign multiple shortcuts to a QPushButton. See: https://doc.qt.io/qt-5/qabstractbutton.html#shortcut-prop

  To get around this, we introduce a new function in `guiutil`, which connects a supplied `QKeySequence` shortcut to a `QAbstractButton`. This function can be reused in other situations where more than one shortcut is needed for a button.

  | PR on macOS      | PR on Linux |
  | ---------------- | ------------ |
  |  ![mac-resize-shortcuts](https://user-images.githubusercontent.com/23396902/114750132-a2752580-9d21-11eb-9542-15716f2c257d.gif) | ![linux-resize-shortcuts](https://user-images.githubusercontent.com/23396902/114750165-aacd6080-9d21-11eb-8abc-5388690dcf0b.gif) |

ACKs for top commit:
  hebasto:
    re-ACK 2a45134b56
  Talkless:
    tACK 2a45134b56, tested on Debian Sid with Qt 5.15.2, shortcuts still work.

Tree-SHA512: e894ccb7e5c695ba83998c21a474d6c587c9c849f12ced665c5e0034feb6b143e41b32ba135cab6cfab22cbf153d5a52b1083b2a278e6dfca3f5ad14c0f6c573
2021-05-20 22:09:15 +02:00
W. J. van der Laan
d4c409cf09
Merge bitcoin/bitcoin#20773: refactor: split CWallet::Create
489ebb7b34 wallet: make chain optional for CWallet::Create (Ivan Metlushko)
d73ae93964 CWallet::Create move chain init message up into calling code (Ivan Metlushko)
44c430ffac refactor: Add CWallet:::AttachChain method (Russell Yanofsky)
e2a47ce085 refactor: move first run detection to client code (Ivan Metlushko)

Pull request description:

  This is a followup for https://github.com/bitcoin/bitcoin/pull/20365#discussion_r522265003
  First part of a refactoring with overall goal to simplify `CWallet` and de-duplicate code with `wallettool`

  **Rationale**: split `CWallet::Create` and create `CWallet::AttachChain`.

  `CWallet::AttachChain` takes chain as first parameter on purpose. In future I suggest we can remove `chain` from `CWallet` constructor.

  The second commit is based on be164f9cf89b123f03b926aa980996919924ee64 from #15719 (thanks ryanofsky)

  cc ryanofsky achow101

ACKs for top commit:
  ryanofsky:
    Code review ACK 489ebb7b34. Only changes since last review were adding a const variable declaration, and implementing suggestion not to move feerate option checks to AttachChain. Thanks for updates and fast responses!

Tree-SHA512: 00235abfe1b00874c56c449adcab8a36582424abb9ba27440bf750af8f3f217b68c11ca74eb30f78a2109ad1d9009315480effc78345e16a3074a1b5d8128721
2021-05-19 16:11:29 +02:00
W. J. van der Laan
4da26fb85d
Merge bitcoin/bitcoin#21506: p2p, refactor: make NetPermissionFlags an enum class
7075f604e8 scripted-diff: update noban documentation in net_processing.cpp (Jon Atack)
a95540cf43 scripted-diff: rename NetPermissionFlags enumerators (Jon Atack)
810d0929c1 p2p, refactor: make NetPermissionFlags a uint32 enum class (Jon Atack)
7b55a94497 p2p: NetPermissions::HasFlag() pass flags param by value (Jon Atack)
91f6e6e6d1 scripted-diff: add NetPermissionFlags scopes where not already present (Jon Atack)

Pull request description:

  While reviewing #20196, I noticed the `NetPermissionFlags` enums are frequently called as if they were scoped, yet are still global. This patch upgrades `NetPermissionFlags` to a scoped class enum and updates the enumerator naming, similarly to #19771. See https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#enum-enumerations for more info.

  This change would eliminate the class of bugs like https://github.com/bitcoin/bitcoin/pull/20196#discussion_r610770148 and #21644, as only defined operations on the flags would compile.

ACKs for top commit:
  laanwj:
    Code review ACK 7075f604e8
  vasild:
    ACK 7075f604e8

Tree-SHA512: 7fcea66ee499f059efc78c934b5f729b3c8573fe304dee2c27c837c2f662b89324790568246d75b2a574cf9f059b42d3551d928996862f4358055eb43521e6f4
2021-05-19 11:57:24 +02:00
Ivan Metlushko
e2a47ce085 refactor: move first run detection to client code 2021-05-19 08:50:16 +02:00
Jarol Rodriguez
7eea659fc9 qt, test: use qsignalspy instead of qeventloop 2021-05-17 15:51:24 -04:00
Hennadii Stepanov
2a45134b56 qt: Add shortcuts for console font resize buttons
Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
2021-05-17 14:01:38 -04:00
Hennadii Stepanov
a2e122f0fe qt: Add GUIUtil::AddButtonShortcut
Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
2021-05-17 14:01:00 -04:00
W. J. van der Laan
c34a49f77f qt: English translations update
Update for Transifex. Needed after bitcoin/bitcoin#21836.
2021-05-17 13:26:29 +02:00
Hennadii Stepanov
8b77133651
qt: Replace disambiguation strings with translator comments
Translator comments is the right way to pass context to translators.
2021-05-16 01:06:22 +03:00
Hennadii Stepanov
a02c970eb0
qt, refactor: Revert explicit including QStringBuilder 2021-05-15 19:10:47 +03:00
Hennadii Stepanov
3fd3a0fc87
qt, build: Optimize string concatenation
The defined QT_USE_QSTRINGBUILDER macro means using the QStringBuilder
for efficient string concatenation in all Qt code by default.
2021-05-15 19:10:38 +03:00
Jarol Rodriguez
8b419b5163 qt: make console buttons look clickable
Change the type for the console's buttons to QToolButton which will make them look explicitly clickable, which in turn fixes the small hitbox issue for macOS.
With this change, we need to generalize the respective action connect logic from QPushButton to QAbstractButton.
While here, update width and height of icon for consistency with other tool buttons.
2021-05-15 10:01:02 -04:00
Hennadii Stepanov
4ee9ee7236 qt: Use native presentation of shortcut 2021-05-14 02:01:23 -04:00
Hennadii Stepanov
69b8b5d72c
qt: Align numbers in the "Peer Id" column to the right 2021-05-12 22:05:25 +03:00
Jon Atack
a95540cf43
scripted-diff: rename NetPermissionFlags enumerators
- drop redundant PF_ permission flags prefixes
- drop ALL_CAPS naming per https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps
- rename IsImplicit to Implicit

-BEGIN VERIFY SCRIPT-
s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; }

s 'PF_NONE'        'None'
s 'PF_BLOOMFILTER' 'BloomFilter'
s 'PF_RELAY'       'Relay'
s 'PF_FORCERELAY'  'ForceRelay'
s 'PF_DOWNLOAD'    'Download'
s 'PF_NOBAN'       'NoBan'
s 'PF_MEMPOOL'     'Mempool'
s 'PF_ADDR'        'Addr'
s 'PF_ISIMPLICIT'  'Implicit'
s 'PF_ALL'         'All'
-END VERIFY SCRIPT-
2021-05-12 16:13:30 +02:00
Jon Atack
91f6e6e6d1
scripted-diff: add NetPermissionFlags scopes where not already present
-BEGIN VERIFY SCRIPT-
s() { git grep -l "$1" -- 'src' ':!src/net_permissions.h' | xargs sed -i -E "s/([^:])$1/\1NetPermissionFlags::$1/"; }

s 'PF_NONE'
s 'PF_BLOOMFILTER'
s 'PF_RELAY'
s 'PF_FORCERELAY'
s 'PF_DOWNLOAD'
s 'PF_NOBAN'
s 'PF_MEMPOOL'
s 'PF_ADDR'
s 'PF_ISIMPLICIT'
s 'PF_ALL'
-END VERIFY SCRIPT-

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2021-05-12 10:50:58 +02:00
MarcoFalke
94f83534e4
Merge bitcoin/bitcoin#21752: doc: Clarify that feerates are per virtual size
fae196147b doc: Clarify that feerates are per virtual size (MarcoFalke)
fa83e95ac6 scripted-diff: Clarify that feerates are per virtual size (MarcoFalke)

Pull request description:

  By implementing segwit, it is already clear that all feerates in Bitcoin Core are denoted in (amount/virtual size). Though, there is  inconsistency, as some places use kvB, some use kB. Thus, replace all with "kvB".

  See also commit 6da3afbaee, which did the replacement for wallet RPCs.

ACKs for top commit:
  ryanofsky:
    Code review ACK fae196147b. Checked instances where units were being added in the second commit and they all looked right.

Tree-SHA512: ab70d13cde7d55c1ac931bddc2b45aa218fc75ef46cb6ea9e5a30b1d4dbf27889c2b6357299a6c5427912443a46ec3592a4809dae335e03162bd2120a0f7f8ad
2021-05-11 11:55:20 +02:00
W. J. van der Laan
39e306009b
Merge bitcoin-core/gui#271: Don't clear console prompt when font resizing
7962e0dde8 qt: Do not clear console prompt when font resizing (Hennadii Stepanov)
d2cc339005 qt, refactor: Drop redundant history cleaning in RPC console (Hennadii Stepanov)
4f0ae472e2 qt: Untie irrelevant signal-slot parameters (Hennadii Stepanov)

Pull request description:

  On master, a console resize event will clear the prompt. To fix this, we store the content of the prompt and re-set it upon a resize. This preserves the prompt text throughout resizes. The text will still clear when you click the clear button, as it should.

  **Master**

  | Before Resize      | After Resize |
  | ----------------- | ------------ |
  |  ![master-beforeresize](https://user-images.githubusercontent.com/23396902/113553721-2a428d80-95c6-11eb-971b-bb77151bc6d5.png)  |  ![master-afterresize](https://user-images.githubusercontent.com/23396902/113553769-3d555d80-95c6-11eb-9cdb-9ad1fd7208a9.png) |

  **PR**
  | Before Resize      | After Resize |
  | ----------------- | ------------ |
  | ![pr-beforeresize](https://user-images.githubusercontent.com/23396902/113553885-6f66bf80-95c6-11eb-8317-0975f1ebd444.png) | ![pr-afterresize](https://user-images.githubusercontent.com/23396902/113553906-75f53700-95c6-11eb-9a32-b64d8aba98e5.png) |

  Closes #269

ACKs for top commit:
  laanwj:
    Code review ACK 7962e0dde8
  hebasto:
    ACK 7962e0dde8
  Talkless:
    tACK 7962e0dde8, tested on Debian Sid with Qt 5.15.2

Tree-SHA512: a6f19d3f80e2e47725cff5d6e15862b6cb793a65dfcaded15f23bba051088cd3317f068f93290c9b09d0a90f5fcac1c5a4610cc417cc5961ba6d005fe5049ab0
2021-05-11 11:06:47 +02:00
Hennadii Stepanov
4bc3b16349
Merge bitcoin-core/gui#293: Enable wordWrap for Services
a0f7978674 qt: enable wordWrap for peers-tab detail services (randymcmillan)

Pull request description:

  Enable wordWrap for peers-tab detailView Services

ACKs for top commit:
  Talkless:
    tACK a0f7978674 on same environment as previously.
  hebasto:
    ACK a0f7978674, tested on Linux Mint 20.1 (Qt 5.12.8):
  kristapsk:
    re-ACK a0f7978674. Tested under Gentoo Linux with Xfce4 (Qt 5.15.2).

Tree-SHA512: 872e511d2ecfa72fea0fd3284a958b45ee8aee138469ce7f9cd853cd9098b9583917909934b0a5c96f9b81ea1567bcea6a037558829bb79f2a3f413a83df06e6
2021-05-11 00:45:15 +03:00
Hennadii Stepanov
b49fe0a75a
Merge bitcoin-core/gui#280: Remove user input from URI error message
3bad0b3fad Remove user input from URI error message (unknown)

Pull request description:

  Removes the user input from error message to avoid it being used in attacks.

  Its not really a vulnerability in Bitcoin Core because involves social engineering, dependency on user environment etc. But this PR improves security and by avoiding abuse of URI error in future.

  Example of an attack:

  1. User opens a link in firefox:

  ```
  bitcoin:tb1qag2e6yhl52hr53vdxzaxvnjtueupvuftan4yfu%0A%0AWARNING%3A%20DO%20NOT%20CLOSE%20THIS%20WINDOW%20OR%20TURN%20OFF%20YOUR%20PC!%20IF%20YOU%20ABORT%20THIS%20PROCESS%2C%20YOU%20COULD%20DESTROY%20ALL%20OF%20YOU%20DATA!%20PLEASE%20ENSURE%20THAT%20YOUR%20POWER%20CABLE%20IS%20PLUGGED%20IN!%0A%0AYou%20became%20victim%20of%20the%20XYZ%20RANSOMWARE!%0A%0AThe%20hard%20disks%20of%20your%20computer%20have%20been%20encrypted%20with%20a%20military%20grade%20encryption%20algorithm.%20There%20is%20no%20way%20to%20restore%20your%20data%20without%20a%20special%20key.%20You%20can%20purchase%20this%20key%20on%20the%20darknet%20page%20shown%20in%20step%202.%0ATo%20purchase%20your%20key%20and%20restore%20your%20data%2C%20please%20follow%20these%20three%20easy%20steps%3A%0A%0A1.%20Download%20the%20Tor%20browser%20at%20%E2%80%9Chttps%3A%2F%2Fwww.torproject.org%2F%E2%80%9C.%0A2.%20Visit%20one%20of%20the%20following%20pages%20with%20the%20Tor%20Browser%3A%0Ahttp%3A%2F%2Frandomchars.onion%2Fabc123%0A3.%20Send%20BTC%20by%20following%20the%20instructions%20on%20the%20page
  ```

  2. User selects Bitcoin Core to open the link:

  ![image](https://user-images.githubusercontent.com/13405205/114619801-8ee9a080-9cc8-11eb-9fad-23a2b831e8df.png)

  3. User is asked to send BTC with some message convincing enough which can be different depending on the victim:

  ![image](https://user-images.githubusercontent.com/13405205/114620061-d3753c00-9cc8-11eb-8314-e3362ebb90ac.png)

  **After this PR** (_No user input mentioned in the error_):

  ![image](https://user-images.githubusercontent.com/13405205/114624342-2b627180-9cce-11eb-93a8-0b2438d71571.png)

ACKs for top commit:
  hebasto:
    ACK 3bad0b3fad, tested on Linux Mint 20.1 (Qt 5.12.8).
  jarolrod:
    tACK 3bad0b3fad

Tree-SHA512: aac2fdfcaa7a9cd6582750c1960682554795640f5aacb78bdae121724e1151da3cbb62b8f8b1e0bc37347afe78b3e9a446277cab8e009d2a1050c0e971f001b3
2021-05-11 00:27:51 +03:00
Hennadii Stepanov
a2bdbdb358
Merge bitcoin-core/gui#194: Save/restore RPCConsole geometry only for window
01d9586ae8 qt: Save/restore RPCConsole geometry only for window (Hennadii Stepanov)

Pull request description:

  After using the GUI with `-disablewallet` the "Node window" inherits the geometry of the main window, that could be unexpected for users.

  This PR provides independent geometry settings for `RPCConsole` in both modes:
  - window sizes and `QSplitter` sizes when `-disablewallet=0`
  - only `QSplitter` sizes when `-disablewallet=1`

ACKs for top commit:
  Talkless:
    tACK 01d9586ae8, tested on Debian Sid with Qt 5.15.2. I've managed to reproduce issue using https://github.com/bitcoin-core/gui/pull/194#issuecomment-782822663 instructions, and I see that this PR does detach main window and information window sizes. Built with `--enable-wallet` and `--disable-wallet`.
  jarolrod:
    ACK 01d9586ae8, tested on macOS 11.2 Qt 5.15.2
  promag:
    Code review ACK 01d9586ae8.

Tree-SHA512: 9934cf04d4d5070dfc4671ea950e225cda9988858227e5481dad1baafa14af477bdbf4f91307ca687fde0cad6e4e605a3a99377e70d67eb115a19955ce2516f5
2021-05-10 23:56:14 +03:00
Hennadii Stepanov
8d7125f80e
Merge bitcoin-core/gui#257: refactor: Use template function qOverload in signal-slot connections
cdbc2bd1f1 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 cdbc2bd1f1.
  promag:
    Code review ACK cdbc2bd1f1.

Tree-SHA512: 72002aa646b1a79bab62d498825b3f245dc7ebdc189280f8bd3b4076e1bb50be8802c02bc872ff6f70c1ea81faec66d3bec36471119dd98c9e70d87b990396ae
2021-05-10 23:42:05 +03:00
Hennadii Stepanov
8bed1706ea
Merge bitcoin-core/gui#296: Do not use QObject::tr plural syntax for numbers with a unit symbol
3adde72bc9 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 3adde72bc9
  promag:
    Code review ACK 3adde72bc9. Agree with OP, looks reasonable to me.

Tree-SHA512: bde65c122ca0feb7771d932cce63fd1aef1e7a9dda0188d19c577d57b279172204ac1bfcb6106a78b2c4d55d628e6dc0967051e064ec40d3c5aeafd4a48f0589
2021-05-10 16:34:12 +03:00
W. J. van der Laan
f8176b768a
Merge bitcoin/bitcoin#21836: scripted-diff: Replace three dots with ellipsis in the UI strings
d66f283ac0 scripted-diff: Replace three dots with ellipsis in the UI strings (Hennadii Stepanov)

Pull request description:

  This PR is split from #21463.
  The change was suggested on [Transifex.com](https://www.transifex.com/bitcoin/bitcoin/), and it does not touch `LogPrint` and `LogPrintf` calls.

  The only comment on #21463 [was](9030e4b5a6 (r597220100)):
  > Mind that these messages also end up in the log. In principle the log is already UTF-8 (as are all strings and text in bitcoind). But, just noting, that it might make browsing the log a less pleasant experience on systems with misconfigured locale like some BSDs by default.

ACKs for top commit:
  laanwj:
    ACK d66f283ac0

Tree-SHA512: 5ab1cb3160f3f996f1ad7d7486662da3eb7f06a857f4a1874963ce10caed5b86b0ad6151b1b9ebeb2b8aa5f0c85efad3b768ea9cafe5db86f78f88912b756d1e
2021-05-10 14:02:46 +02:00
randymcmillan
a0f7978674
qt: enable wordWrap for peers-tab detail services 2021-05-09 18:00:38 -04:00
Hennadii Stepanov
d29ea72393
gui: Add access to the Peers tab from the network icon 2021-05-08 09:51:07 +03:00
Jon Atack
73a91c63ec gui: rename "Peer Id" to "Peer" in tab column and details area
to allow resizing the column more tightly
2021-05-05 00:32:12 -04:00
MarcoFalke
fac30eec42
refactor: Replace &foo[0] with foo.data() 2021-05-04 06:55:31 +02:00
MarcoFalke
fa2197c8b3
test: Use loop to register RPCs
The same loop is used by the server, so no need for
the tests to do this differently.
2021-05-03 11:50:05 +02:00
Hennadii Stepanov
d66f283ac0
scripted-diff: Replace three dots with ellipsis in the UI strings
-BEGIN VERIFY SCRIPT-
sed -i -E -e 's/\.\.\."\)(\.|,|\)| )/…"\)\1/' -- $(git ls-files -- 'src' ':(exclude)src/qt/bitcoinstrings.cpp')
sed -i -e 's/\.\.\.\\"/…\\"/' src/qt/sendcoinsdialog.cpp
sed -i -e 's|\.\.\.</string>|…</string>|' src/qt/forms/*.ui
sed -i -e 's|\.\.\.)</string>|…)</string>|' src/qt/forms/sendcoinsdialog.ui
-END VERIFY SCRIPT-
2021-05-02 22:17:16 +03:00
unknown
3bad0b3fad Remove user input from URI error message
+ Detailed error messages for invalid address
+ Used `IsValidDestination` instead of `IsValidDestinationString`
+ Referred to https://github.com/bitcoin/bitcoin/pull/20832 for solution
2021-05-02 07:47:19 +05:30
MarcoFalke
fae196147b
doc: Clarify that feerates are per virtual size 2021-05-01 18:21:05 +02:00
Hennadii Stepanov
c231254a65
qt: Make TransactionView aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:12 +03:00
Hennadii Stepanov
2b622d4ace
qt: Make CoinControlDialog aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:11 +03:00
Hennadii Stepanov
97a6b5e06a
qt: Make OverviewPage aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:11 +03:00
Hennadii Stepanov
d05f1b278d
qt: Make UnitDisplayStatusBarControl aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:11 +03:00
Hennadii Stepanov
6b2ce65392
qt: Replace base class of ClickableLabel with ThemedLabel
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:10 +03:00
Hennadii Stepanov
ff530a2093
qt: Use GUIUtil::ThemedLabel class
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:10 +03:00
Hennadii Stepanov
d99ef327a8
qt: Add GUIUtil::ThemedLabel class
The ThemedLabel class correctly handles appearance changes on macOS.
2021-05-01 15:07:10 +03:00
Hennadii Stepanov
c054720e08
qt: Make SignVerifyMessageDialog aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:09 +03:00
Hennadii Stepanov
0dcc3fac43
qt: Make SendCoinsEntry aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:09 +03:00
Hennadii Stepanov
fa18d28e12
qt: Make RPCConsole aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:09 +03:00
Hennadii Stepanov
f1083826e3
qt: Make BitcoinGUI aware of runtime palette change
This change fixes the GUI when changing appearance on macOS.
2021-05-01 15:07:08 +03:00
Hennadii Stepanov
ce17861dc4
qt: Make PlatformStyle aware of runtime palette change
This change is a prerequisite to support changeable appearance on macOS.
2021-05-01 15:07:02 +03:00
MarcoFalke
fa83e95ac6
scripted-diff: Clarify that feerates are per virtual size
-BEGIN VERIFY SCRIPT-
sed -i 's|/kB|/kvB|g' $( git grep -l '/kB' ./src )
-END VERIFY SCRIPT-
2021-05-01 09:42:50 +02:00
Hennadii Stepanov
13f24d135b
Merge bitcoin-core/gui#298: Peertableview alternating row colors
e94920a0bb qt: peertableview alternating row colors (randymcmillan)

Pull request description:

  peers-tab: enable alternating row colors for peer table and banned table

ACKs for top commit:
  Bosch-0:
    tACK e94920a0bb on Windows 10 - works as intended. Before / after below:
  jarolrod:
    tACK e94920a0bb

Tree-SHA512: 05ba18e1db9700bbd68644fe02292409f4e5c52e301b1b2977c335d1ff16456a93fb0b15c8c8385d1b15f648141341990706d530f6b08ecb33098fa941b9af1f
2021-04-30 23:17:01 +03:00
MarcoFalke
480bf01c29
Merge bitcoin-core/gui#300: Remove progress bar on modal overlay
61fd8fe9a1 Remove progress bar on modal overlay (bruno)

Pull request description:

  This PR removes the progress bar (keeping only the percentage) on modal overlay

  resolves #279

  Before:
  ![1](https://user-images.githubusercontent.com/19480819/116625265-bde65000-a91f-11eb-93ee-72474fc8dd67.PNG)

  After:
  ![2](https://user-images.githubusercontent.com/19480819/116625272-c2126d80-a91f-11eb-80b7-839703f03f87.PNG)

ACKs for top commit:
  Bosch-0:
    tACK 61fd8fe9a1 on Windows 10. Unnecessary Progress bar no longer there :)
  jarolrod:
    tACK 61fd8fe9a1

Tree-SHA512: 96d72f168b26e950ce37e9f489bcbcc608473c44bce3be127ccd47d17b7642fa234d314596186ee16b430d943575c312d84133425507a17ae7ac58ecae986639
2021-04-30 07:51:53 +02:00
Hennadii Stepanov
cdbc2bd1f1
qt: Use template function qOverload in signal-slot connections
This commit does not change behavior.
2021-04-30 00:00:44 +03:00
Hennadii Stepanov
e1e1e708fa
Merge bitcoin-core/gui#125: Enable changing the autoprune block space size in intro dialog
415fb2e1ab GUI/Intro: Move prune setting below explanation (Luke Dashjr)
2a84c6bcf6 GUI/Intro: Estimate max age of backups that can be restored with pruning (Luke Dashjr)
e2dcd957fa GUI/Intro: Rework UI flow to let the user set prune size in GBs (Luke Dashjr)
f2e5a6b54f GUI/Intro: Abstract GUI-to-option into Intro::getPrune (Luke Dashjr)
62932cc686 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 415fb2e1ab. Changes since last review: mb/gib suffixes, constexpr QOverload expected_backup_days tweaks, new moveonly layout commit
  jarolrod:
    Tested ACK 415fb2e.
  Talkless:
    tACK 415fb2e1ab, tested on Debian Sid with Qt 5.15.2.
  hebasto:
    ACK 415fb2e1ab, my unresolved comments are not blockers, and they could be resolved in follow ups.

Tree-SHA512: bd4882a9c08e6a6eb14b7fb6366983db8581425b4949fea212785d34d8fad9e32fb81ca8c8cdbfb2c05ea394aaf5a746ba2cf16623795c7252c3bdb61d455f00
2021-04-29 23:47:11 +03:00
João Barbosa
cafef080a2 qt: Refactor to remove unnecessary block in DispatchNotifications
Review with --ignore-all-space
2021-04-29 00:18:55 +01:00
João Barbosa
57785fb7f6 qt: Early subscribe core signals in transaction table model 2021-04-29 00:18:55 +01:00
João Barbosa
c6cbdf1a90 qt: Refactor ShowProgress to DispatchNotifications 2021-04-29 00:18:19 +01:00
João Barbosa
3bccd50ad2 qt: Set flag after inital load on transaction table model 2021-04-28 23:58:11 +01:00
Hennadii Stepanov
328da33557
Merge bitcoin-core/gui#18: Add peertablesortproxy module
5a4a15d2b4 qt, refactor: Drop no longer used PeerTableModel::getRowByNodeId func (Hennadii Stepanov)
9a9f180df0 qt, refactor: Drop no longer used PeerTableModel::sort function (Hennadii Stepanov)
778a64af20 qt: Use PeerTableSortProxy for sorting peer table (Hennadii Stepanov)
df2d165ba9 qt: Add peertablesortproxy module (Hennadii Stepanov)

Pull request description:

  The "Peers" table in the "Node" window does not hold multiple selection after sorting.

  This PR introduces a `QSortFilterProxyModel` subclass, that is a standard Qt [practice](https://doc.qt.io/qt-5/model-view-programming.html#custom-sorting-models) for such cases.

  Now the sorting code is encapsulated into the dedicated Qt class, and we do not need to maintain it.

  Fixes #283 (additionally).

  ---

  On **master** (7ae86b3c68):
  - rows are sorted by "Ping", and a selection is made
  ![Screenshot from 2020-11-28 22-53-11](https://user-images.githubusercontent.com/32963518/100525900-96eaed00-31cc-11eb-86e7-72ede3b8b33c.png)

  - rows are sorted by "NodeId", and the previous selection is _lost_
  ![Screenshot from 2020-11-28 22-53-21](https://user-images.githubusercontent.com/32963518/100525904-9c483780-31cc-11eb-957c-06f53d7d31ab.png)

  With **this PR**:
  - rows are sorted by "Ping", and a selection is made
  ![Screenshot from 2020-11-28 22-39-41](https://user-images.githubusercontent.com/32963518/100525776-06aca800-31cc-11eb-8c4e-9c6566fe80fe.png)

  - rows are sorted by "NodeId", and the row are still selected
  ![Screenshot from 2020-11-28 22-39-53](https://user-images.githubusercontent.com/32963518/100525791-2348e000-31cc-11eb-8b78-716a5551d7ec.png)

ACKs for top commit:
  jarolrod:
    re-ACK 5a4a15d2b4, tested on macOS 11.2 Qt 5.15.2 after rebase
  promag:
    Tested ACK 5a4a15d2b4.

Tree-SHA512: f81c1385892fbf1a46ffb98b42094ca1cc97da52114bbbc94fedb553899b1f18c26a349e186bba6e27922a89426bd61e8bc88b1f7832512dbe211b5f834e076e
2021-04-28 20:57:52 +03:00
randymcmillan
e94920a0bb
qt: peertableview alternating row colors 2021-04-26 19:16:15 -04:00
MarcoFalke
74a960a220
Merge bitcoin/bitcoin#21714: refactor: Drop CCoinControl::SetNull
c5a470eee1 refactor: Drop CCoinControl::SetNull (João Barbosa)

Pull request description:

  The only external call to `SetNull` is changed as follow

  ```diff
  - m_coin_control->SetNull();
  + m_coin_control = std::make_unique<CCoinControl>();
  ```

ACKs for top commit:
  theStack:
    Code-Review ACK c5a470eee1
  MarcoFalke:
    review ACK c5a470eee1 🍤

Tree-SHA512: 2588828720cdcf405fc4fb06f2aa17ad4eef2a645e12d820311006127e732258dd084993f17f23742f8e7f782e18289a6199dcec3690efc9b92458f90b816a8f
2021-04-26 09:20:44 +02:00
bruno
61fd8fe9a1 Remove progress bar on modal overlay 2021-04-25 21:22:35 -03:00
Hennadii Stepanov
19d51a2907
qt: Avoid unnecessary translations 2021-04-25 21:58:15 +03:00
Hennadii Stepanov
3adde72bc9
qt: Do not use QObject::tr plural syntax for numbers with a unit symbol
This is useless and unnecessarily burdensome for translators.
2021-04-25 21:41:24 +03:00
Hennadii Stepanov
c4571a0c39
Merge bitcoin-core/gui#284: refactor: Simplify SendCoinsDialog::updateCoinControlState
5f438d66c1 refactor, qt: Simplify SendCoinsDialog::updateCoinControlState (João Barbosa)

Pull request description:

  This PR doesn't change behaviour, removes the coin control argument from `updateCoinControlState` since it's a class member.

ACKs for top commit:
  hebasto:
    ACK 5f438d66c1, I have reviewed the code and it looks OK, I agree it can be merged.
  jonatack:
    Code review ACK 5f438d66c1
  kristapsk:
    utACK 5f438d66c1. Code looks correct.

Tree-SHA512: 14abaa3d561f8c8854fed989b6aca886dcca42135880bac76070043f61c0042ec8967f2b83e50bbbb82050ef0f074209e97fa300cb4dc51ee182316e0846506d
2021-04-25 17:06:56 +03:00
Hennadii Stepanov
7962e0dde8 qt: Do not clear console prompt when font resizing 2021-04-22 22:30:12 -04:00
Hennadii Stepanov
d2cc339005 qt, refactor: Drop redundant history cleaning in RPC console
The default clearHistory=true argument is passed in the RPCConsole ctor
only. This is needless, as the history and historyPtr members are
initialized properly.
2021-04-22 22:30:05 -04:00
Hennadii Stepanov
4f0ae472e2 qt: Untie irrelevant signal-slot parameters
QAbstractButton::clicked signal has the `checked` parameter that is
irrelevant to RPCConsole::clear slot parameter.
2021-04-22 22:29:57 -04:00
Hennadii Stepanov
f385ad7651
Merge bitcoin-core/gui#263: Revamp context menus
16c157de3c qt, refactor: Use better QMenu::addAction overloaded function (Hennadii Stepanov)
79311750b5 qt: Do not assign Alt+<KEY> shortcuts to context menu actions (Hennadii Stepanov)
963e12058f qt: Drop menu separator that separates nothing (Hennadii Stepanov)
1398a6536c qt, refactor: Make AddressBookPage::deleteAction a local variable (Hennadii Stepanov)

Pull request description:

  This PR:
  1. removes useless `Alt` + `<KEY>` shortcuts from context menu items
  2. replaces 3 lines of code with the only call of [`QMenu::addAction`](https://doc.qt.io/qt-5/qmenu.html#addAction-5) for each context menu item (it became possible since https://github.com/bitcoin/bitcoin/pull/21286 was merged)
  3. makes other minor cleanups

  No behavior change.

ACKs for top commit:
  kristapsk:
    ACK 16c157de3c
  promag:
    Code review ACK 16c157de3c. Nice code cleanup that takes advantage of more recent Qt API.
  jarolrod:
    ACK 16c157de3c

Tree-SHA512: e5555fe957058cc67b351aaf9f09fe3635edb2d07a2223d3093913a25607ae538f0a2fde84c0b0cd43e7475b248949548eb4a5d4b21d8f7391fa2fa8541c04ff
2021-04-20 23:18:54 +03:00
W. J. van der Laan
90e0faaa44
Merge #21694: build: Use XLIFF file to provide more context to Transifex translators
35d52397e7 Add bitcoin_en.xlf intermediate translation file to the repo (Hennadii Stepanov)
99686b6519 qt [experimental]: Add a translation comment and a disambiguation string (Hennadii Stepanov)
f959b75e8c build: Add Qt lconvert tool to depends (Hennadii Stepanov)
2045e4cdd2 build: Use XLIFF file to provide more context to Transifex translators (Hennadii Stepanov)

Pull request description:

  Currently, only a class name is provided to the Transifex translators as a context. Neither `disambiguation` parameter of the `tr()` function nor [translator comments](https://doc.qt.io/qt-5/i18n-source-translation.html#translator-comments), being included as XML elements to `*.ts` translation files, are not parsed by the Transifex due to its [limited support](https://docs.transifex.com/formats/qt-ts) of such files.

  This PR makes possible to provide all of the context details via an intermediate [XLIFF](https://docs.transifex.com/formats/xliff) translation file.

  With this PR `make -C src translate` produces the `src/qt/locale/bitcoin_en.xlf` file which must be provided to the Transifex as a translation source instead of `src/qt/locale/bitcoin_en.ts`.

  Closes #21465.

  An example translatable string with additional `<context>` and `<note>` XML elements: 35d52397e7/src/qt/locale/bitcoin_en.xlf (L126-L132)

ACKs for top commit:
  laanwj:
    ACK 35d52397e7

Tree-SHA512: cc19e3c09501d240153550d75d7697b5f824cb553f4223beaff66be4d3e6f98d7b5bb14f2d1e1d5ad014eaaa498a7f672e7ff0054ced53ace8c1e6f7e49f6d8a
2021-04-20 16:10:24 +02:00
Hennadii Stepanov
35d52397e7
Add bitcoin_en.xlf intermediate translation file to the repo
As the bitcoin_en.xlf file is created by the `make -C src translate`
command, other translation-related files are also updated.
2021-04-20 15:55:55 +03:00
Hennadii Stepanov
99686b6519
qt [experimental]: Add a translation comment and a disambiguation string
The goal is to see the way the Transifex presents the added items to
translators using an intermediate XLIFF translation file.
2021-04-20 15:49:46 +03:00
fanquake
a839303edc
Merge #21244: Move GetDataDir to ArgsManager
bb8d1c6e02 Change ClearDataDirPathCache() to ArgsManager.ClearPathCache(). (Kiminuo)
b4190eff72 Change GetBlocksDir() to ArgsManager.GetBlocksDirPath(). (Kiminuo)
83292e2a70 scripted-diff: Modify unit tests to use the ArgsManager in the BasicTestingSetup class instead of implicitly relying on gArgs. (Kiminuo)
55c68e6f01 scripted-diff: Replace m_args with m_local_args in getarg_tests.cpp (Kiminuo)
511ce3a26b BasicTestingSetup: Add ArgsManager. (Kiminuo)
1cb52ba065 Modify "util_datadir" unit test to not use gArgs. (Kiminuo)
1add318704 Move GetDataDir(fNetSpecific) implementation to ArgsManager. (Kiminuo)
70cdf679f8 Move StripRedundantLastElementsOfPath before ArgsManager class. (Kiminuo)

Pull request description:

  This PR attempts to contribute to "Remove gArgs" (#21005).

  Main changes:

  * `GetDataDir()` function is moved to `ArgsManager.GetDataDirPath()`.
  * `GetBlocksDir()` function is moved to `ArgsManager.GetBlocksDirPath()`.

ACKs for top commit:
  ryanofsky:
    Code review ACK bb8d1c6e02. Just minor const/naming changes and splitting/scripting commits since last review
  MarcoFalke:
    review ACK bb8d1c6e02 📓
  hebasto:
    re-ACK bb8d1c6e02, addressed comments, and two commits made scripted-diffs since my [previous](https://github.com/bitcoin/bitcoin/pull/21244#pullrequestreview-638270583) review.

Tree-SHA512: ba9408c22129d6572beaa103dca0324131766f06d562bb7d6b9e214a0a4d40b0216ce861384562bde24b744003b3fbe6fac239061c8fd798abd3981ebc1b9019
2021-04-20 08:42:56 +08:00
Hennadii Stepanov
13d27b452d
Merge bitcoin-core/gui#276: Elide long strings in their middle in the Peers tab
4e0613369f qt: Elide long strings in their middle in the Peers tab (Hennadii Stepanov)

Pull request description:

  The eliding of long addresses (Onion v3 etc) in the Peers tab in their middle was [discussed](https://github.com/bitcoin-core/gui/issues/262#issuecomment-810490396) in #262.

  On master (f0fa32450e):
  ![DeepinScreenshot_select-area_20210410141435](https://user-images.githubusercontent.com/32963518/114267903-24eea400-9a07-11eb-8c80-99f68d5cc522.png)

  With this PR:
  ![DeepinScreenshot_select-area_20210410140430](https://user-images.githubusercontent.com/32963518/114267796-83675280-9a06-11eb-921f-ca47c2075496.png)

  This PR suggests the minimal diff to achieve the goal. OTOH, this change in behavior is common for all columns in the Peers table, but it seems harmless.

ACKs for top commit:
  jarolrod:
    tACK 4e0613369f
  promag:
    Code review ACK 4e0613369f.

Tree-SHA512: 1d5a62afb1152029e69fccea2ae53dcb262a91724a5c03dfc4de8c409b280814d0c211c2f9a71f1a6e927f4ed571ba4ac311de9de8ebb797eaf1051674241bdb
2021-04-19 13:11:38 +03:00
João Barbosa
5f438d66c1 refactor, qt: Simplify SendCoinsDialog::updateCoinControlState 2021-04-18 21:12:57 +01:00
João Barbosa
c5a470eee1 refactor: Drop CCoinControl::SetNull 2021-04-18 21:10:47 +01:00
Kiminuo
b4190eff72 Change GetBlocksDir() to ArgsManager.GetBlocksDirPath(). 2021-04-18 11:59:28 +02:00
MarcoFalke
4a1751a929
Merge bitcoin-core/gui#277: Do not use QClipboard::Selection on Windows and macOS.
7f3a5980c1 qt: Do not use QClipboard::Selection on Windows and macOS. (Hennadii Stepanov)

Pull request description:

  Windows and macOS do [not support](https://doc.qt.io/qt-5/qclipboard.html#notes-for-windows-and-macos-users) the global mouse selection.

  Fixes #258.

ACKs for top commit:
  promag:
    Code review ACK 7f3a5980c1.
  jarolrod:
    ACK 7f3a5980c1

Tree-SHA512: be2beeef7d25af6f4d4a4548325d8d29f08e4342f499666bc4a670ed468a63195d514077c2cd0dba197e12bd43316fd3e2813cdc0954364b6aa4ae6b90c118bf
2021-04-17 13:28:25 +02:00
Hennadii Stepanov
16c157de3c
qt, refactor: Use better QMenu::addAction overloaded function
This overloaded function was introduced in Qt 5.6 and makes code more
concise.
2021-04-14 18:51:26 +03:00
Hennadii Stepanov
79311750b5
qt: Do not assign Alt+<KEY> shortcuts to context menu actions
Such shortcuts are useless as pressing the Alt key closes a context menu
widget immediately.
2021-04-14 18:47:40 +03:00
Hennadii Stepanov
963e12058f
qt: Drop menu separator that separates nothing 2021-04-14 18:47:39 +03:00
Hennadii Stepanov
1398a6536c
qt, refactor: Make AddressBookPage::deleteAction a local variable 2021-04-14 18:47:30 +03:00
W. J. van der Laan
03ecceedf6
Merge #260: Handle exceptions instead of crash
b8e5d0d3fe qt: Handle exceptions in SendCoinsDialog::sendButtonClicked slot (Hennadii Stepanov)
1ac2bc7ac0 qt: Handle exceptions in TransactionView::bumpFee slot (Hennadii Stepanov)
bc00e13bc8 qt: Handle exceptions in WalletModel::pollBalanceChanged slot (Hennadii Stepanov)
eb6156ba1b qt: Handle exceptions in BitcoinGUI::addWallet slot (Hennadii Stepanov)
f7e260a471 qt: Add GUIUtil::ExceptionSafeConnect function (Hennadii Stepanov)
64a8755af3 qt: Add BitcoinApplication::handleNonFatalException function (Hennadii Stepanov)
af7e365b15 qt: Make PACKAGE_BUGREPORT link clickable (Hennadii Stepanov)

Pull request description:

  This PR is an alternative to https://github.com/bitcoin/bitcoin/pull/18897, and is based on Russ' [idea](https://github.com/bitcoin/bitcoin/pull/18897#pullrequestreview-418703664):
  > IMO it would be nice to have a followup PR that eliminated the one-line forwarding methods ...

  Related issues
  - #91
  - https://github.com/bitcoin/bitcoin/issues/18643

  Qt docs: https://doc.qt.io/qt-5.12/exceptionsafety.html#exceptions-in-client-code

  With this PR the GUI handles the wallet-related exception, and:
  - display it to a user:

  ![Screenshot from 2021-04-01 02-55-59](https://user-images.githubusercontent.com/32963518/113226183-33ff8480-9298-11eb-8fe6-2168834ab09a.png)

  - prints a message to `stderr`:
  ```

  ************************
  EXCEPTION: 18NonFatalCheckError
  wallet/wallet.cpp:2677 (IsCurrentForAntiFeeSniping)
  Internal bug detected: '!chain.findBlock(block_hash, FoundBlock().time(block_time))'
  You may report this issue here: https://github.com/bitcoin/bitcoin/issues

  bitcoin in QPushButton->SendCoinsDialog

  ```

  - writes a message to the `debug.log`
  - and, if the exception is a non-fatal error, leaves the main window running.

ACKs for top commit:
  laanwj:
    Code review ACK b8e5d0d3fe
  ryanofsky:
    Code review ACK b8e5d0d3fe. This is great! I think more improvements are possible but implementation is very clean and I love how targeted each commit is. Changes since last review: adding more explanatory text, making links clickable, reorganizing.

Tree-SHA512: a9f2a2ee8e64b993b0dbc454edcbc39c68c8852abb5dc1feb58f601c0e0e8014dca81c72733aa3fb07b619c6f49b823ed20c7d79cc92088a3abe040ed2149727
2021-04-14 14:17:30 +02:00
Hennadii Stepanov
7f3a5980c1
qt: Do not use QClipboard::Selection on Windows and macOS.
Windows and macOS do not support the global mouse selection.
2021-04-10 21:34:38 +03:00
Hennadii Stepanov
4e0613369f
qt: Elide long strings in their middle in the Peers tab 2021-04-10 14:07:13 +03:00
MarcoFalke
7b4934e550
Merge #21557: test: small cleanup in RPCNestedTests tests
6526a1644c test: small cleanup in RPCNestedTests tests (fanquake)

Pull request description:

  Remove QtDir & QtGlobal (dea086f498)
  Add missing includes.
  Remove obsolete comment about Qt 5.3 (fd46c4c001)

Top commit has no ACKs.

Tree-SHA512: 097e603fc31a19be1817459ad4c5a9692708f8a39a0ae87e4a60eabc22bf4f6141b577ba68746044fd594f92e36848b7cd56d60dccd262f83f8ec7310ab7d1bc
2021-04-06 08:45:08 +02:00
Hennadii Stepanov
b8e5d0d3fe
qt: Handle exceptions in SendCoinsDialog::sendButtonClicked slot
Also, uic automatic connection replaced with an explicit one.
2021-04-05 16:47:31 +03:00
Hennadii Stepanov
1ac2bc7ac0
qt: Handle exceptions in TransactionView::bumpFee slot
Also the parameter list of the TransactionView::bumpFee slot is made
compatible with one of the QAction::triggered signal.
2021-04-05 16:47:31 +03:00
Hennadii Stepanov
bc00e13bc8
qt: Handle exceptions in WalletModel::pollBalanceChanged slot
Actually, the private QTimer::timeout signal has one
QTimer::QPrivateSignal parameter.
2021-04-05 16:47:08 +03:00
MarcoFalke
fa8192f42e
rpc: Fail to return undocumented return values 2021-04-01 12:16:28 +02:00
Hennadii Stepanov
eb6156ba1b
qt: Handle exceptions in BitcoinGUI::addWallet slot 2021-04-01 03:05:31 +03:00
Hennadii Stepanov
f7e260a471
qt: Add GUIUtil::ExceptionSafeConnect function
Throwing an exception from a slot invoked by Qt's signal-slot connection
mechanism is considered undefined behavior, unless it is handled within
the slot. The GUIUtil::ExceptionSafeConnect function should be used for
exception handling within slots.
2021-04-01 03:05:31 +03:00
Hennadii Stepanov
64a8755af3
qt: Add BitcoinApplication::handleNonFatalException function
This helper function will be used in the following commits.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2021-04-01 03:05:31 +03:00
Hennadii Stepanov
af7e365b15
qt: Make PACKAGE_BUGREPORT link clickable
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2021-04-01 03:05:00 +03:00
fanquake
6526a1644c
test: small cleanup in RPCNestedTests tests
Add missing includes.
Remove obsolete comment about Qt 5.3
(fd46c4c001)
2021-03-31 14:03:11 +08:00
MarcoFalke
cf11f9c22f
Merge #21531: test: remove qt byteswap compattests
9ac86bcc0d test: remove qt byteswap compattests (fanquake)

Pull request description:

  These were added as part of #9366 when with fixing issues with Protobuf.

  Now that we no-longer use Protobuf, there's no reason to maintain a duplicate set of byteswap tests in the qt tests. Our other set of byteswap tests are here: https://github.com/bitcoin/bitcoin/blob/master/src/test/bswap_tests.cpp.

ACKs for top commit:
  laanwj:
    Code review ACK 9ac86bcc0d

Tree-SHA512: 72ba131a5f8fbd9fdbbc4e1f95baa794496c960b12e0271700c632c6511b7e1b331e8db07a201838b4d56b2aeeb43d4de4e10265ea07ab14241307fa14d3342e
2021-03-29 11:52:58 +02:00
MarcoFalke
3bcd278aa6
Merge bitcoin-core/gui#154: qt: Support macOS Dark mode
dc4551c22c remove incompatibility release note for darkmode on macos (Sylvain Goumy)
303cfc6227 allow darkmode on macos build (Sylvain Goumy)
78f75a2d60 Allow icon colorization on mac os to better support dark mode (Uplab)

Pull request description:

  Allow icons to be colorized on macOS to support native Dark mode color scheme.

  Rendering on macOS Big Sur before PR:
  ![macos-darkmode-before-pr](https://user-images.githubusercontent.com/5577626/102502739-43f3af80-407f-11eb-9263-5bbc27b371c2.png)

  Rendering on macOS Big Sur after PR:
  ![macos-darkmode-after-pr](https://user-images.githubusercontent.com/5577626/102502678-350cfd00-407f-11eb-8b98-e271f2688c36.png)

  Light mode stay visually unchanged.

  <del>Note, that this currently only affect the build from source, as the macos dmg includes an attributes to force light color scheme on macos windows (see https://github.com/bitcoin/bitcoin/pull/14593). </del>
  <del>But once all glitches are fixed, we will be able to remove this temporary fix. </del>
  Edit: this PR is know including the removal of `NSRequiresAquaSystemAppearance` on Info.plist file so that the color fix is apply to every build.

  Linked issues: #68 #136

ACKs for top commit:
  hebasto:
    re-ACK dc4551c22c
  jarolrod:
    ACK dc4551c22c

Tree-SHA512: 1c3a4dec796063e61fcaf80112afc2b15c8669a1cd30ebd537cea96647c20215f8f80289719f905820bb0c490c8c1f94bfae4bb32f9c6d1fdd4e8f199ebb559f
2021-03-29 11:17:19 +02:00
MarcoFalke
ea3c9a92c6
Merge bitcoin-core/gui#251: Improve URI/file handling message
ef3e1d7272 qt: Improve URI/file handling message (Hennadii Stepanov)

Pull request description:

  This PR:
  - fixes missing spaces after full stops
  - makes the translation context much bigger

  The latter is the main motivation for this PR, as I became a translator 🐅

  Screenshots:
  - master (a9d1b40d53)

  ![DeepinScreenshot_select-area_20210317211750](https://user-images.githubusercontent.com/32963518/111527570-bd776880-8768-11eb-9035-96bb08067e74.png)

  - this PR:

  ![Screenshot from 2021-03-17 21-13-36](https://user-images.githubusercontent.com/32963518/111527727-e7308f80-8768-11eb-95c7-e8b802bfed5f.png)

ACKs for top commit:
  jarolrod:
    ACK ef3e1d7272

Tree-SHA512: 8fbd1e3731b75866356fae201b3129126001600ca0197e83c05825e8c5bbbcf0132d6a6b808d7a5cbfbdde75ed1865ecbb651c30017570abd7c5803eff2b9306
2021-03-29 07:39:42 +02:00
fanquake
9ac86bcc0d
test: remove qt byteswap compattests
These were added as part of #9366 to fix issues with Protobuf.

Now that we no-longer use Protobuf, there's no reason to maintain a
duplicate set of byteswap tests for qt.
2021-03-29 11:12:26 +08:00
MarcoFalke
c00852653f
Merge bitcoin-core/gui#254: refactor: Drop redundant setEditTriggers(NoEditTriggers) calls
257f55c119 qt, refactor: Drop redundant setEditTriggers(NoEditTriggers) calls (Hennadii Stepanov)

Pull request description:

  The models of the both views have no `Qt::ItemIsEditable` flag:
  3c87dbe95c/src/qt/peertablemodel.cpp (L218-L224)
  3c87dbe95c/src/qt/bantablemodel.cpp (L148-L154)

ACKs for top commit:
  Talkless:
    utACK 257f55c119, seems reasonable.
  jarolrod:
    ACK 257f55c119, looks correct.

Tree-SHA512: 4356e4d785055935fba452488a5d97ed95995def97b26ab18af43a545835f9e9d4c347e4cad7952aa725179cf6e775a2208c48730feebf40e3b1a7ba5f402af0
2021-03-28 19:21:24 +02:00
MarcoFalke
19e3e65429
Merge bitcoin-core/gui#243: fix issue when disabling the auto-enabled blank wallet checkbox
915e34112b qt: fix issue when disabling the auto-enabled blank wallet checkbox (Jarol Rodriguez)

Pull request description:

  As detailed by #151, On `master` a user can create the confusing scenario where you have a disabled `Encrypt Wallet` checkbox and a selected `Disable Private Keys` checkbox after unselecting the auto-enabled `Blank Wallet` checkbox.

  This commit makes it so that when the `Blank Wallet` checkbox is auto-selected after the user selects `Disable Private keys`, unselecting it will also unselect the `Disable Private Keys` checkbox, which in turn re-enables the `Encrypt Wallet` checkbox.

  Below are screenshots comparing the behavior of selecting `Disable Private Keys` then unselecting the `Blank Wallet` between `master` and this `PR`:

  **Master:**
  | Select `Disable Private Keys` | Unselect `Blank Wallet` |
  | ----------------------------- | ------------------------ |
  | ![Screen Shot 2021-03-09 at 7 57 14 PM](https://user-images.githubusercontent.com/23396902/110560141-77405a80-8113-11eb-9285-5acba6241dcf.png) |   ![Screen Shot 2021-03-09 at 7 57 31 PM](https://user-images.githubusercontent.com/23396902/110560159-81faef80-8113-11eb-9b37-086aa39ecb9f.png)    |

  **PR:**
  | Select `Disable Private Keys` | Unselect `Blank Wallet` |
  | ----------------------------- | ------------------------ |
  | ![Screen Shot 2021-03-09 at 7 34 12 PM](https://user-images.githubusercontent.com/23396902/110560379-e3bb5980-8113-11eb-899a-3a4c6a1bc115.png) | ![Screen Shot 2021-03-09 at 7 34 20 PM](https://user-images.githubusercontent.com/23396902/110560412-f170df00-8113-11eb-8bd0-f7fe6fc0d739.png) |

ACKs for top commit:
  hebasto:
    ACK 915e34112b
  Talkless:
    ACK 915e34112b

Tree-SHA512: ce6ecbc35b94a08cabf0b8a24dbdfc874d82cc8918cc8623dce8172c7fc9c75d63a13b036bae5f7ab2c090f8d020574a542285d1651600813faf5d91e2506a8d
2021-03-26 17:30:21 +01:00
Wladimir J. van der Laan
23b15601df
Merge #17227: Qt: Add Android packaging support
246774e264 depends: fix Qt precompiled headers bug (Igor Cota)
8e7ad4146d depends: disable Qt Vulkan support on Android (Igor Cota)
ba46adaa1a CI: add Android APK build to cirrus (Igor Cota)
7563720e30 CI: add Android APK build script (Igor Cota)
ebfb10cb75 Qt: add Android packaging support (Igor Cota)

Pull request description:

  ![bitcoin-qt](https://user-images.githubusercontent.com/762502/67396157-62f3d000-f5a7-11e9-8a6f-9425823fcd6c.gif)
  This PR is the third and final piece of the basic Android support puzzle - it depends on https://github.com/bitcoin/bitcoin/pull/16110 and is related to https://github.com/bitcoin/bitcoin/pull/16883. It introduces an `android` directory under `qt` and a simple way to build an Android package of `bitcoin-qt`:

  1. Build depends for Android as described in the [README](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md)
  2. Configure with one of the resulting prefixes
  3. Run `make && make apk` in `src/qt`

  The resulting APK files will be in `android/build/outputs/apk`. You can install them manually or with [adb](https://developer.android.com/studio/command-line/adb). One can also open the `android` directory in Android Studio for that integrated development and debugging experience. `BitcoinQtActivity` is your starting point.

  Under the hood makefile `apk` target:

  1. Renames the `bitcoin-qt` binary to `libbitcoin-qt.so` and copies it over to a folder under `android/libs` depending on which prefix and corresponding [ABI](https://developer.android.com/ndk/guides/abis.html#sa) `bitcoin-qt` was built for
  2. Takes `libc++_shared.so` from the Android NDK and puts in the same place. It [must be included](https://developer.android.com/ndk/guides/cpp-support) in the APK
  3. Extracts Qt for Android Java support files from the `qtbase` archive in `depends/sources` to `android/src`

  There is also just a tiny bit of `ifdef`'d code to make the Qt Widgets menus usable. It's not pretty but it works and is a stepping stone towards https://github.com/bitcoin/bitcoin/pull/16883.

ACKs for top commit:
  MarcoFalke:
    cr ACK 246774e264
  laanwj:
    Code review ACK 246774e264

Tree-SHA512: ba30a746576a167545223c35a51ae60bb0838818779fc152c210f5af1413961b2a6ab6af520ff92cbc8dcd5dcb663e81ca960f021218430c1f76397ed4cead6c
2021-03-24 19:02:01 +01:00
Jarol Rodriguez
915e34112b qt: fix issue when disabling the auto-enabled blank wallet checkbox
This commit makes it so that when the `Blank Wallet` checkbox is auto-selected after the user selects 'Disable Private' keys, unselecting it will also unselect the 'Disable Private Keys' checkbox, which in turn re-enables the 'Encrypt Wallet' checkbox.
2021-03-23 13:13:30 -04:00