Commit graph

222 commits

Author SHA1 Message Date
MarcoFalke fa488f131f
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-04-16 13:33:09 -04:00
Ben Woosley 7a810b1d7a
refactor: Convert ping wait time from double to int64_t 2020-03-04 13:45:29 -05:00
Ben Woosley b054c46977
refactor: Convert ping time from double to int64_t 2020-03-04 13:44:25 -05:00
Hennadii Stepanov a004673c54
qt: Add LogQtInfo() function 2020-01-05 23:40:01 +02:00
MarcoFalke 5948398b18
Merge #17474: Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStr
4341bffb6e GUI: Refactor formatServicesStr to warn when a ServicesFlag is missing (Luke Dashjr)
df77de8c21 Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStr (Luke Dashjr)

Pull request description:

  Currently, only the bottom 8 service bits are shown in the GUI peer details view.

  `NODE_NETWORK_LIMITED` is the 11th bit (2^10).

  The first commit expands the range to cover the full 64 bits, and properly label `"NETWORK_LIMITED"`.
  The second commit refactors the code so that any future omitted service bits will trigger a compile warning.

ACKs for top commit:
  jonasschnelli:
    utACK 4341bffb6e
  jonasschnelli:
    Tested ACK 4341bffb6e
  hebasto:
    Concept ACK 4341bffb6e

Tree-SHA512: 8338737d03fbcd92024159aabd7e632d46e13c72436d935b504d2bf7ee92b7d124e89a5917bf64d51c87f12a64de703270c2d7b4c6711fa8ed08ea7887d817c7
2019-12-11 17:00:27 -05:00
fanquake 27d82b63fb
gui: remove macOS start on login code
The macOS startup item code was disabled for builds targeting macOS >
10.11 in #15208. Now that we require macOS 10.12 as a minimum, #17550,
we can remove the startup item code entirely, as the API we were using
was removed in macOS 10.12.
2019-11-22 18:44:43 -05:00
Hennadii Stepanov 567cb44eb9
refactor: Nuke guiutil circular dependency
Co-authored-by: Gregory Sanders <gsanders87@gmail.com>
2019-11-19 17:07:18 +02:00
Hennadii Stepanov 73b5505cfe
refactor: Move SendCoinsRecipient in own header
Co-authored-by: Gregory Sanders <gsanders87@gmail.com>
2019-11-19 17:05:35 +02:00
Luke Dashjr 4341bffb6e GUI: Refactor formatServicesStr to warn when a ServicesFlag is missing 2019-11-14 05:02:16 +00:00
Luke Dashjr df77de8c21 Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStr 2019-11-14 05:01:50 +00:00
Jorge Timón 052c54ecb0
Testchains: Generic selection with -chain=<str> in addition of -testnet and -regtest 2019-09-06 22:05:33 +02:00
fanquake 7d6f63cc2c
Merge #16720: qt: Replace objc_msgSend() function calls with the native Objective-C syntax
0bb33b5348 qt: Replace objc_msgSend with native syntax (Hennadii Stepanov)

Pull request description:

  Changes in Xcode 11 Objective-C Runtime cause an error (#16387) during building on MacOS 10.15 Catalina.

  This PR fixes this issue by replacing `objc_msgSend()` function calls with the native Objective-C syntax.

  Refs:
  - [changes in `objc_msgSend` function](https://developer.apple.com/documentation/objectivec/1456712-objc_msgsend?changes=latest_minor&language=objc)
  - [`OBJC_OLD_DISPATCH_PROTOTYPES` macro](https://developer.apple.com/documentation/objectivec/objc_old_dispatch_prototypes?language=objc)

ACKs for top commit:
  l2a5b1:
    ACK 0bb33b5 - Diff looks good. Sending messages via native Objective-C code feels more robust and is more readable than casting all the `objc_msgSend` function calls to the appropriate function signature (which would also have fixed the issue).
  jonasschnelli:
    utACK 0bb33b5348 - Confirmed that the called macOS framework function is available on our build targets.
  fanquake:
    ACK 0bb33b5348 - Still works as expected.

Tree-SHA512: c09cb684d06bd1da053a17c182b7bb1642e45bb347d26c76e1c5d835c320567caee366d85e34bb7f2be38e63ed041e0d06a56c2a9d89f7e5bece9b19cc5c6772
2019-09-01 16:20:26 +08:00
Hennadii Stepanov 0bb33b5348
qt: Replace objc_msgSend with native syntax 2019-08-31 12:25:34 +03:00
Hennadii Stepanov 8b6f5aabb9
qt: Replace QFontMetrics::width() with TextWidth() 2019-08-29 19:13:19 +03:00
Hennadii Stepanov c6dd32da69
qt: Replace obsolete functions of QDesktopWidget 2019-08-25 08:46:32 +03:00
Hennadii Stepanov 1260ecd812
qt: Add TextWidth() wrapper
In Qt 5.12 and before the QFontMetrics::width() is used and it is
deprecated since Qt 13.0.
In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced.
2019-08-23 21:27:50 +03:00
Wladimir J. van der Laan e5abb59a9a
Merge #16379: Fix autostart filenames on Linux for testnet/regtest
ae311bc036 Fix autostart filenames on Linux (Hennadii Stepanov)

Pull request description:

  Currently, on master the `bitcoin-test.lnk` and `bitcoin-regtest.lnk` files do not work as autostart application `.desktop` files.

  This PR fixes it.

  Refs:
  - #7045
  - [Autostart Of Applications During Startup](https://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html)

ACKs for top commit:
  promag:
    utACK ae311bc, weird why extension `.lnk` was used in #7045.
  laanwj:
    Code review ACK ae311bc036

Tree-SHA512: 210cc346600d52b0a262c81ed5f258365a3cea2e5522f4b5f4798fd3b54f45ed82aba68eefae59a6b6f1d8e4d00221476c23bdffc038f16f2f45c1acc837f522
2019-07-18 14:27:25 +02:00
MarcoFalke fa0d0ff6e1
Remove unused bits from the service flags enum 2019-07-12 14:14:54 -04:00
Hennadii Stepanov ae311bc036
Fix autostart filenames on Linux 2019-07-12 19:01:05 +03:00
shannon1916 6e6494b3fb qt: fix opening bitcoin.conf via Preferences on macOS; see #15409 2019-06-03 10:32:15 +08:00
Jonas Schnelli 3a0d6da098
Merge #15371: gui: Uppercase bech32 addresses in qr codes
3407b446c gui: Uppercase bech32 addresses in qr codes (Ben Carman)

Pull request description:

  Closes #12191

ACKs for commit 3407b4:
  meshcollider:
    utACK 3407b446cc
  jonasschnelli:
    Re utACK 3407b446cc

Tree-SHA512: d63ecf8e9805c46c9f554cc929661a37837bc3ba9b7b931331c2a5c2b81468742e1819c9add73966083011709cc15ae1870a454348af8591b3d75d3765dca568
2019-04-29 09:04:40 +02:00
251 fa1c8e2978 Resolve the qt/guiutil <-> qt/optionsmodal CD
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-04-23 13:26:06 +02:00
Ben Carman 3407b446cc
gui: Uppercase bech32 addresses in qr codes 2019-02-09 12:33:26 -06:00
Chun Kuan Lee 1bd9ffdd44 windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
Also remove all defines in many places and define it in configure stage to keep consistency.
2019-01-23 16:28:27 +08:00
Jonas Schnelli da6011826a
Fix macOS launch-at-startup memory issue 2019-01-21 22:43:03 -10:00
Jonas Schnelli 516437a1b7
Qt: remove macOS launch-at-startup option when compiled with > macOS 10.11 2019-01-21 22:42:51 -10:00
Hennadii Stepanov 7c572c488d
Add workaround for QProgressDialog bug on macOS
See: QTBUG-65750, QTBUG-70357.
2019-01-15 01:28:00 +02:00
Hennadii Stepanov 0b4a5786bb
Use window() instead of obsolete topLevelWidget() 2018-11-25 11:32:59 +02:00
Hennadii Stepanov 2bc3f114d0
Bump the minimum Qt version to 5.2 2018-11-14 01:32:51 +02:00
Wladimir J. van der Laan 48223256cf
Merge #14123: gui: Add GUIUtil::bringToFront
0a656f85a9 qt: All tray menu actions call showNormalIfMinimized (João Barbosa)
6fc21aca6d qt: Use GUIUtil::bringToFront where possible (João Barbosa)
5796671e1d qt: Add GUIUtil::bringToFront (João Barbosa)
6b1d2972bf Remove obj_c for macOS Dock icon menu (Hennadii Stepanov)
2464925e7b Use Qt signal for macOS Dock icon click event (Hennadii Stepanov)
53bb6be3f8 Remove obj_c for macOS Dock icon setting (Hennadii Stepanov)

Pull request description:

  The sequence `show -> raise -> activateWindow` is factored out to the new function `GUIUtil::bringToFront` where a macOS fix is added in order to fix #13829.

  Also included:
   - simplification of `BitcoinGUI::showNormalIfMinimized`
   - simplified some connections to `BitcoinGUI::showNormalIfMinimized`
   - added missing connections to `BitcoinGUI::showNormalIfMinimized`.

Tree-SHA512: a8e301aebc359aa353821e2af352ae356f44555724921b01da907e128653ef9dc55d8764a1bff72a579e5ff96df8a681f6804bfe83acba441da92fedff974a55
2018-11-12 14:52:35 +01:00
João Barbosa 5796671e1d qt: Add GUIUtil::bringToFront 2018-11-05 11:21:50 +00:00
Jim Posen 2068f089c8 scripted-diff: Move util files to separate directory.
-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-11-04 22:46:07 -08:00
Chun Kuan Lee a554cc901a Move boost/std fstream to fsbridge 2018-09-26 08:47:42 +08:00
Chun Kuan Lee 2c3eade704 Make fs::path::string() always return utf-8 string 2018-09-23 03:43:25 +08:00
Wladimir J. van der Laan 362518791a
Merge #13734: gui: Drop boost::scoped_array and use wchar_t API explicitly on Windows
bb6ca65f98 gui: get special folder in unicode (Chun Kuan Lee)
1c5d225853 Drop boost::scoped_array (Chun Kuan Lee)

Pull request description:

  Drop boost::scoped_array and simplify the code.

  `TCHAR` should be defined as `wchar_t` if `UNICODE` is defined. So we can use `.toStdWString().c_str()` to get wchar_t C-style string.

  Fix #13819

Tree-SHA512: 3fd4aa784129c9d1576b01e6ee27faa42d793e152d132f2dde504d917dad3a8e95e065fcbc54a3895d74fb6b2a9ed4f5ec67d893395552f585e225486a84a454
2018-09-11 10:58:10 +02:00
João Barbosa f78558f1e3 qt: Use new Qt5 connect syntax 2018-08-21 09:43:54 +01:00
fanquake 4b3b85c597
refactor: use fs:: over boost::filesystem:: 2018-08-15 21:05:21 +08:00
Wladimir J. van der Laan 78dae8cacc
Merge #13780: 0.17: Pre-branch maintenance
3fc20632a3 qt: Set BLOCK_CHAIN_SIZE = 220 (DrahtBot)
2b6a2f4a28 Regenerate manpages (DrahtBot)
eb7daf4d60 Update copyright headers to 2018 (DrahtBot)

Pull request description:

  Some trivial maintenance to avoid having to do it again after the 0.17 branch off.

  (The scripts to do this are in `./contrib/`)

Tree-SHA512: 16b2af45e0351b1c691c5311d48025dc6828079e98c2aa2e600dc5910ee8aa01858ca6c356538150dc46fe14c8819ed8ec8e4ec9a0f682b9950dd41bc50518fa
2018-08-08 13:55:27 +02:00
Chun Kuan Lee 1c5d225853 Drop boost::scoped_array 2018-08-04 01:11:42 +08:00
João Barbosa f7a553177d gui: Add GUIUtil::ItemDelegate with keyEscapePressed signal 2018-07-30 23:13:04 +01:00
DrahtBot eb7daf4d60 Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
MarcoFalke a140953907
Merge #13753: scripted-diff: Remove trailing whitespaces
12dd101345 scripted-diff: Remove trailing whitespaces (João Barbosa)

Pull request description:

  The script test/lint/lint-whitespace.sh should prevent new cases.

  This happens in some pulls where the code editor and the author 'git add's them, so this would fix it all.

Tree-SHA512: bcdd3472fcd01a2754e52212c7db1de2fdc422728b06785481954a27162fb72001cb73708329cc56e95bcc5e45c1348ebc4eacc2ccfa6aa12413c7ec450b6a33
2018-07-25 07:09:33 -04:00
fanquake 68c272527f
gui: remove SubstituteFonts 2018-07-25 07:30:28 +08:00
João Barbosa 12dd101345 scripted-diff: Remove trailing whitespaces
-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-
2018-07-24 20:46:23 +01:00
Wladimir J. van der Laan 907f73bbc5 gui: Remove QT_VERSION fallbacks for Qt < 5
There were surprisingly many `#ifdef` fallbacks for Qt 4.

Remiving them simplifies maintenance, as well as adding new GUI
functionality.
2018-06-18 12:22:11 +02:00
Jonas Schnelli 25c56cdbe7
Merge #12878: [refactor] Config handling refactoring in preparation for network-specific sections
77a733a99 [tests] Add additional unit tests for -nofoo edge cases (Anthony Towns)
af173c2be [tests] Check GetChainName works with config entries (Anthony Towns)
fa27f1c23 [tests] Add unit tests for ReadConfigStream (Anthony Towns)
087c5d204 ReadConfigStream: assume the stream is good (Anthony Towns)
6d5815aad Separate out ReadConfigStream from ReadConfigFile (Anthony Towns)
834d30341 [tests] Add unit tests for GetChainName (Anthony Towns)
11b6b5b86 Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName (Anthony Towns)

Pull request description:

  This does a bit of refactoring of the configuration handling code in order to add additional tests to make adding support for [test]/[regtest] sections in the config file in #11862 easier. Should not cause any behaviour changes.

Tree-SHA512: 8d2ce1449fc180de03414e7e569d1a21ba1e9f6564e13d3faf3961f710adc725fa0d4ab49b89ebd2baa11ea36ac5018377f693a84037d386a8b8697c9d6db3e9
2018-04-08 16:24:30 +02:00
Russell Yanofsky 17780d6f35 scripted-diff: Avoid interface keyword to fix windows gitian build
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-07 03:42:02 -04:00
Anthony Towns 11b6b5b86e Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName 2018-04-06 04:46:02 +10:00
Russell Yanofsky e872c93ee8 Remove direct bitcoin access from qt/guiutil.cpp 2018-04-04 16:52:40 -04:00
practicalswift 3a0f8d795a Qt: Remove unused method setupAmountWidget(...) 2018-03-25 21:15:08 +02:00