Skip to content

Commit 5be1e52

Browse files
qml, refactoring: Separate guiconstants from QT
Separating guiconstants.h file from QT, copying it from src/qt to src/qml, removing all unused constants so far and updating QAPP_APP_NAME_* constants values so both QT and QML gui apps don't clash with each other trying to persist same or different settings (e.g. configuration file for QT on signet will be still named as Bitcoin-Qt-signet.conf, as of today, while QML will start using a separate file named BitcoinCore-App-signet.conf). This could be a temporary fix so instances from both QT and QML gui apps don't interfere between them during QML development. This change will be transparent for both QT app and users. Co-authored-by: Johnny <johnny9dev@pm.me>
1 parent b6bf91f commit 5be1e52

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

src/Makefile.qt.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ BITCOIN_QT_H = \
123123
qml/models/peerlistsortproxy.h \
124124
qml/appmode.h \
125125
qml/bitcoin.h \
126+
qml/guiconstants.h \
126127
qml/imageprovider.h \
127128
qml/util.h \
128129
qt/addressbookpage.h \
@@ -140,7 +141,6 @@ BITCOIN_QT_H = \
140141
qt/createwalletdialog.h \
141142
qt/csvmodelwriter.h \
142143
qt/editaddressdialog.h \
143-
qt/guiconstants.h \
144144
qt/guiutil.h \
145145
qt/initexecutor.h \
146146
qt/intro.h \

src/qml/bitcoin.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <qml/models/peerlistsortproxy.h>
2828
#include <qml/imageprovider.h>
2929
#include <qml/util.h>
30-
#include <qt/guiconstants.h>
30+
#include <qml/guiconstants.h>
3131
#include <qt/guiutil.h>
3232
#include <qt/initexecutor.h>
3333
#include <qt/networkstyle.h>
@@ -72,7 +72,6 @@ void SetupUIArgs(ArgsManager& argsman)
7272
argsman.AddArg("-lang=<lang>", "Set language, for example \"de_DE\" (default: system locale)", ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
7373
argsman.AddArg("-min", "Start minimized", ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
7474
argsman.AddArg("-resetguisettings", "Reset all settings changed in the GUI", ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
75-
argsman.AddArg("-splash", strprintf("Show splash screen on startup (default: %u)", DEFAULT_SPLASHSCREEN), ArgsManager::ALLOW_ANY, OptionsCategory::GUI);
7675
}
7776

7877
bool InitErrorMessageBox(

src/qml/guiconstants.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) 2011-2024 The Bitcoin Core developers
2+
// Distributed under the MIT software license, see the accompanying
3+
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+
5+
#ifndef BITCOIN_QML_GUICONSTANTS_H
6+
#define BITCOIN_QML_GUICONSTANTS_H
7+
8+
#define QAPP_ORG_NAME "BitcoinCore"
9+
#define QAPP_ORG_DOMAIN "bitcoincore.org"
10+
#define QAPP_APP_NAME_DEFAULT "BitcoinCore-App"
11+
#define QAPP_APP_NAME_TESTNET "BitcoinCore-App-testnet"
12+
#define QAPP_APP_NAME_SIGNET "BitcoinCore-App-signet"
13+
#define QAPP_APP_NAME_REGTEST "BitcoinCore-App-regtest"
14+
15+
#endif // BITCOIN_QML_GUICONSTANTS_H

0 commit comments

Comments
 (0)