dash/src/qt
MarcoFalke bb976499bf Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15
705c1f0648c72aa97e0ee699ff9a3da23fc9bd61 qt, refactor: Fix 'buttonClicked is deprecated' warnings (Hennadii Stepanov)
c2f4e5ea1d6f01713ac69aaf6018884028aa55bd qt, refactor: Fix 'split is deprecated' warnings (Hennadii Stepanov)
8e12d6996116e786e928077b22d9f47cee27319e qt, refactor: Fix 'QFlags is deprecated' warnings (Hennadii Stepanov)
fa5749c805878304c107bcae0ae5ffa401dc7c4d qt, refactor: Fix 'pixmap is deprecated' warnings (Hennadii Stepanov)
b02264cb5dfcef50eec8a6346471cbaa25370e00 qt, refactor: Fix 'QDateTime is deprecated' warnings (Hennadii Stepanov)

Pull request description:

  [What's New in Qt 5.15](https://doc.qt.io/qt-5/whatsnew515.html#deprecated-modules):
  > To help preparing for the transition to Qt 6, numerous classes and member functions that will be removed from Qt 6.0 have been marked as deprecated in the Qt 5.15 release.

  Fixes #36

ACKs for top commit:
  jonasschnelli:
    utACK 705c1f0648c72aa97e0ee699ff9a3da23fc9bd61
  promag:
    Tested ACK 705c1f0648c72aa97e0ee699ff9a3da23fc9bd61 on macos with Apple clang version 11.0.3 (clang-1103.0.32.62) and brew qt 5.15.1.

Tree-SHA512: 29e00535b4583ceec0dfb29612e86ee29bdea13651b548c6d22167917a4a10464af49160a12b05151030699f690f437ebb9c4ae9f130f66a722415222165b44f
2023-11-07 07:44:05 -06:00
..
android
forms feat(qt): Expose -coinjoinsessions, -coinjoindenomsgoal and -coinjoindenomshardcap in CoinJoin Options (#5549) 2023-09-04 20:34:35 -05:00
locale chore: Translations 2023-02 (#5208) 2023-04-09 21:45:33 -05:00
res fix(qt): fix 3 gui issues (#5596) 2023-10-04 09:47:08 -05:00
test fix: replaced qrand() to QrandomGenerator due to deprecation 2023-11-06 09:15:29 -06:00
addressbookpage.cpp
addressbookpage.h
addresstablemodel.cpp Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
addresstablemodel.h
appearancewidget.cpp chore: run copyright_header.py update 2023-01-13 00:49:04 +03:00
appearancewidget.h chore: run copyright_header.py update 2023-01-13 00:49:04 +03:00
askpassphrasedialog.cpp chore: run copyright_header.py update 2023-01-13 00:49:04 +03:00
askpassphrasedialog.h
bantablemodel.cpp Merge bitcoin-core/gui#137: refactor: Replace deprecated Qt::SystemLocale{Short,Long}Date 2023-11-07 07:44:05 -06:00
bantablemodel.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
bitcoin.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
bitcoin.h Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex 2023-05-24 12:43:57 -05:00
bitcoinaddressvalidator.cpp chore: run copyright_header.py update 2023-01-13 00:49:04 +03:00
bitcoinaddressvalidator.h
bitcoinamountfield.cpp Merge #17195: gui: send amount placeholder value 2023-04-17 10:42:25 -05:00
bitcoinamountfield.h
bitcoingui.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
bitcoingui.h Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
bitcoinunits.cpp
bitcoinunits.h Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex 2023-05-24 12:43:57 -05:00
clientmodel.cpp fix: possible assert call if nHeight in CDeterministicMNList is higher then Tip (#5590) 2023-10-27 19:53:27 -05:00
clientmodel.h fix: possible assert call if nHeight in CDeterministicMNList is higher then Tip (#5590) 2023-10-27 19:53:27 -05:00
coincontroldialog.cpp partial bitcoin#17938: Disallow automatic conversion between disparate hash types 2023-04-15 12:12:30 -05:00
coincontroldialog.h
coincontroltreewidget.cpp
coincontroltreewidget.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
createwalletdialog.cpp
createwalletdialog.h
csvmodelwriter.cpp
csvmodelwriter.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
dash_locale.qrc
dash.qrc
dashstrings.cpp chore: Translations 2023-02 (#5208) 2023-04-09 21:45:33 -05:00
editaddressdialog.cpp chore: run copyright_header.py update 2023-01-13 00:49:04 +03:00
editaddressdialog.h
governancelist.cpp fix: possible assert call if nHeight in CDeterministicMNList is higher then Tip (#5590) 2023-10-27 19:53:27 -05:00
governancelist.h refactor: Spanify some governance APIs 2023-04-19 01:12:28 +03:00
guiconstants.h Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex 2023-05-24 12:43:57 -05:00
guiutil.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
guiutil.h Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
intro.cpp Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex 2023-05-24 12:43:57 -05:00
intro.h Merge #17453: gui: Fix intro dialog labels when the prune button is toggled 2023-04-25 23:41:20 -05:00
macdockiconhandler.h
macdockiconhandler.mm
macnotificationhandler.h
macnotificationhandler.mm Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
macos_appnap.h
macos_appnap.mm
main.cpp Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
masternodelist.cpp fix: possible assert call if nHeight in CDeterministicMNList is higher then Tip (#5590) 2023-10-27 19:53:27 -05:00
masternodelist.h Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex 2023-05-24 12:43:57 -05:00
modaloverlay.cpp Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
modaloverlay.h
networkstyle.cpp Merge #16680: Preparations for more testchains 2023-04-25 23:41:20 -05:00
networkstyle.h Merge #16680: Preparations for more testchains 2023-04-25 23:41:20 -05:00
notificator.cpp
notificator.h
openuridialog.cpp merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
openuridialog.h
optionsdialog.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
optionsdialog.h feat(qt): Expose -coinjoinsessions, -coinjoindenomsgoal and -coinjoindenomshardcap in CoinJoin Options (#5549) 2023-09-04 20:34:35 -05:00
optionsmodel.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
optionsmodel.h feat(qt): Expose -coinjoinsessions, -coinjoindenomsgoal and -coinjoindenomshardcap in CoinJoin Options (#5549) 2023-09-04 20:34:35 -05:00
overviewpage.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
overviewpage.h
paymentserver.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
paymentserver.h merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
peertablemodel.cpp Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
peertablemodel.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
qrdialog.cpp
qrdialog.h
qrimagewidget.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
qrimagewidget.h
qvalidatedlineedit.cpp
qvalidatedlineedit.h
qvaluecombobox.cpp
qvaluecombobox.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
README.md
receivecoinsdialog.cpp Merge #18278: interfaces: Describe and follow some code conventions 2023-05-31 12:01:04 -05:00
receivecoinsdialog.h
receiverequestdialog.cpp merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
receiverequestdialog.h merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
recentrequeststablemodel.cpp merge bitcoin#20464: Treat CDataStream bytes as uint8_t 2023-09-24 09:50:50 -05:00
recentrequeststablemodel.h merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
rpcconsole.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
rpcconsole.h Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
sendcoinsdialog.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
sendcoinsdialog.h Merge #17509: gui: save and load PSBT 2023-08-29 22:00:59 -05:00
sendcoinsentry.cpp merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
sendcoinsentry.h merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
sendcoinsrecipient.h merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
signverifymessagedialog.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
signverifymessagedialog.h
splashscreen.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
splashscreen.h Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
trafficgraphdata.cpp chore: add missing copyrights via copyright_header.py insert 2023-01-13 00:49:04 +03:00
trafficgraphdata.h chore: add missing copyrights via copyright_header.py insert 2023-01-13 00:49:04 +03:00
trafficgraphwidget.cpp fix: use GUIUtil::TextWidth() instead deprecated width() 2023-11-06 09:15:29 -06:00
trafficgraphwidget.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
transactiondesc.cpp merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
transactiondesc.h
transactiondescdialog.cpp
transactiondescdialog.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
transactionfilterproxy.cpp
transactionfilterproxy.h
transactionrecord.cpp merge bitcoin-gui#8: Fix regression in TransactionTableModel 2023-04-15 12:12:30 -05:00
transactionrecord.h merge bitcoin#17993: Balance/TxStatus polling update based on last block hash 2023-04-15 12:12:30 -05:00
transactiontablemodel.cpp feat(qt): refresh the whole wallet instead of processing individual updates for huge notification queues (#5453) 2023-06-28 19:00:18 +03:00
transactiontablemodel.h feat(qt): refresh the whole wallet instead of processing individual updates for huge notification queues (#5453) 2023-06-28 19:00:18 +03:00
transactionview.cpp Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 2023-11-07 07:44:05 -06:00
transactionview.h
utilitydialog.cpp Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
utilitydialog.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
walletcontroller.cpp refactor: subsume CoinJoin objects under CJContext, deglobalize coinJoin{ClientQueueManager,Server} (#5337) 2023-09-13 12:52:38 -05:00
walletcontroller.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
walletframe.cpp Merge #17509: gui: save and load PSBT 2023-08-29 22:00:59 -05:00
walletframe.h Merge #17509: gui: save and load PSBT 2023-08-29 22:00:59 -05:00
walletmodel.cpp Merge #18997: gui: Remove un-actionable TODO 2023-10-23 10:48:39 -05:00
walletmodel.h Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
walletmodeltransaction.cpp fix(qt): Ignore change output in reassignAmounts (#5182) 2023-02-09 03:19:49 +03:00
walletmodeltransaction.h merge bitcoin#17513: Nuke some circular dependencies 2023-04-15 12:12:30 -05:00
walletview.cpp Merge #17509: gui: save and load PSBT 2023-08-29 22:00:59 -05:00
walletview.h Merge #17509: gui: save and load PSBT 2023-08-29 22:00:59 -05:00
winshutdownmonitor.cpp
winshutdownmonitor.h

This directory contains the DashQT graphical user interface (GUI). It uses the cross-platform framework Qt.

The current precise version for Qt 5 is specified in qt.mk. Qt 4 is not supported.

Compile and run

See build instructions (macOS, Windows, Unix, etc).

To run:

./src/qt/dash-qt

Files and directories

forms

Contains Designer UI files. They are created with Qt Creator, but can be edited using any text editor.

locale

Contains translations. They are periodically updated. The process is described here.

res

Resources such as the icon.

test

Tests.

bitcoingui.(h/cpp)

Represents the main window of the Dash UI.

*model.(h/cpp)

The model. When it has a corresponding controller, it generally inherits from QAbstractTableModel. Models that are used by controllers as helpers inherit from other Qt classes like QValidator.

ClientModel is used by the main application bitcoingui and several models like peertablemodel.

*page.(h/cpp)

A controller. :NAMEpage.cpp generally includes :NAMEmodel.h and forms/:NAME.page.ui with a similar :NAME.

*dialog.(h/cpp)

Various dialogs, e.g. to open a URL. Inherit from QDialog.

paymentserver.(h/cpp)

Used to process BIP21 payment URI requests. Also handles URI based application switching (e.g. when following a dash:... link from a browser).

walletview.(h/cpp)

Represents the view to a single wallet.

Other .h/cpp files

  • UI elements like BitcoinAmountField, which inherit from QWidget.
  • bitcoinstrings.cpp: automatically generated
  • bitcoinunits.(h/cpp): BTC / mBTC / etc handling
  • callback.h
  • guiconstants.h: UI colors, app name, etc
  • guiutil.h: several helper functions
  • macdockiconhandler.(h/mm): macOS dock icon handler
  • macnotificationhandler.(h/mm): display notifications in macOS

Contribute

See CONTRIBUTING.md for general guidelines. Specifically for Qt:

Using Qt Creator as IDE

You can use Qt Creator as an IDE. This is especially useful if you want to change the UI layout.

Download and install the community edition of Qt Creator. Uncheck everything except Qt Creator during the installation process.

Instructions for macOS:

  1. Make sure you installed everything through Homebrew mentioned in the macOS build instructions
  2. Use ./configure with the --enable-debug flag
  3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
  4. Enter "dash-qt" as project name, enter src/qt as location
  5. Leave the file selection as it is
  6. Confirm the "summary page"
  7. In the "Projects" tab select "Manage Kits..."
  8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
  9. Select LLDB as debugger (you might need to set the path to your installation)
  10. Start debugging with Qt Creator (you might need to the executable to "dash-qt" under "Run", which is where you can also add command line arguments)