Skip to content

Commit 974cc68

Browse files
committed
QT Build Fixes
1 parent 7f9bb2d commit 974cc68

16 files changed

Lines changed: 152 additions & 94 deletions

contrib/macdeploy/macdeployqtplus

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ class FrameworkInfo(object):
145145
class ApplicationBundleInfo(object):
146146
def __init__(self, path: str):
147147
self.path = path
148-
# for backwards compatibility reasons, this must remain as Bitcoin-Qt
149-
self.binaryPath = os.path.join(path, "Contents", "MacOS", "Bitcoin-Qt")
148+
# Use DigiByte-Qt for DigiByte builds
149+
self.binaryPath = os.path.join(path, "Contents", "MacOS", "DigiByte-Qt")
150150
if not os.path.exists(self.binaryPath):
151151
raise RuntimeError(f"Could not find bundle binary for {path}")
152152
self.resourcesPath = os.path.join(path, "Contents", "Resources")
@@ -421,7 +421,7 @@ if os.path.exists(appname + ".zip"):
421421

422422
# ------------------------------------------------
423423

424-
target = os.path.join("dist", "Bitcoin-Qt.app")
424+
target = os.path.join("dist", app_bundle)
425425

426426
print("+ Copying source bundle +")
427427
if verbose:
@@ -498,7 +498,7 @@ if platform.system() == "Darwin":
498498
# ------------------------------------------------
499499

500500
if config.zip is not None:
501-
shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir='Bitcoin-Qt.app')
501+
shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir=app_bundle)
502502

503503
# ------------------------------------------------
504504

src/init/digibyte-qt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
namespace init {
1616
namespace {
17-
class BitcoinQtInit : public interfaces::Init
17+
class DigiByteQtInit : public interfaces::Init
1818
{
1919
public:
20-
BitcoinQtInit()
20+
DigiByteQtInit()
2121
{
2222
m_node.args = &gArgs;
2323
m_node.init = this;

src/qt/digibyte_locale.qrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<file alias="de_CH">locale/digibyte_de_CH.qm</file>
2121
<file alias="el">locale/digibyte_el.qm</file>
2222
<file alias="en">locale/digibyte_en.qm</file>
23-
<file alias="en_GB">locale/digibyte_en_GB.qm</file>
2423
<file alias="eo">locale/digibyte_eo.qm</file>
2524
<file alias="es">locale/digibyte_es.qm</file>
2625
<file alias="es_CL">locale/digibyte_es_CL.qm</file>

src/qt/digibytegui.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,6 @@ public Q_SLOTS:
308308
void showDebugWindowActivateConsole();
309309
/** Show help message dialog */
310310
void showHelpMessageClicked();
311-
#ifndef Q_OS_MACOS
312-
/** Handle tray icon clicked */
313-
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
314-
#else
315-
/** Handle macOS Dock icon clicked */
316-
void macosDockIconActivated();
317-
#endif
318311

319312
/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */
320313
void showNormalIfMinimized() { showNormalIfMinimized(false); }

src/qt/guiutil.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -698,26 +698,6 @@ QString NetworkToQString(Network net)
698698
assert(false);
699699
}
700700

701-
QString NetworkToQString(Network net)
702-
{
703-
switch (net) {
704-
case NET_UNROUTABLE: return QObject::tr("Unroutable");
705-
//: Name of IPv4 network in peer info
706-
case NET_IPV4: return QObject::tr("IPv4", "network name");
707-
//: Name of IPv6 network in peer info
708-
case NET_IPV6: return QObject::tr("IPv6", "network name");
709-
//: Name of Tor network in peer info
710-
case NET_ONION: return QObject::tr("Onion", "network name");
711-
//: Name of I2P network in peer info
712-
case NET_I2P: return QObject::tr("I2P", "network name");
713-
//: Name of CJDNS network in peer info
714-
case NET_CJDNS: return QObject::tr("CJDNS", "network name");
715-
case NET_INTERNAL: return "Internal"; // should never actually happen
716-
case NET_MAX: assert(false);
717-
} // no default case, so the compiler can warn about missing cases
718-
assert(false);
719-
}
720-
721701
QString ConnectionTypeToQString(ConnectionType conn_type, bool prepend_direction)
722702
{
723703
QString prefix;

src/qt/optionsmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static ProxySetting ParseProxyString(const std::string& proxy);
119119
static std::string ProxyString(bool is_set, QString ip, QString port);
120120

121121
OptionsModel::OptionsModel(interfaces::Node& node, QObject *parent) :
122-
QAbstractListModel(parent), m_node{node}
122+
QAbstractListModel(parent), m_node{&node}
123123
{
124124
}
125125

src/qt/optionsmodel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class OptionsModel : public QAbstractListModel
7272
SpendZeroConfChange, // bool
7373
Listen, // bool
7474
Server, // bool
75-
EnablePSDGBontrols, // bool
75+
EnablePSBTControls, // bool
7676
MaskValues, // bool
7777
OptionIDRowCount,
7878
};
@@ -97,7 +97,7 @@ class OptionsModel : public QAbstractListModel
9797
bool getUseEmbeddedMonospacedFont() const { return m_use_embedded_monospaced_font; }
9898
bool getCoinControlFeatures() const { return fCoinControlFeatures; }
9999
bool getSubFeeFromAmount() const { return m_sub_fee_from_amount; }
100-
bool getEnablePSDGBontrols() const { return m_enable_psbt_controls; }
100+
bool getEnablePSBTControls() const { return m_enable_psbt_controls; }
101101
const QString& getOverriddenByCommandLine() { return strOverriddenByCommandLine; }
102102

103103
/** Whether -signer was set or not */

src/qt/overviewpage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class TxViewDelegate : public QAbstractItemDelegate
3535
Q_OBJECT
3636
public:
3737
explicit TxViewDelegate(const PlatformStyle* _platformStyle, QObject* parent = nullptr)
38-
: QAbstractItemDelegate(parent), unit(DigiByteUnits::DGB),
38+
: QAbstractItemDelegate(parent), unit(DigiByteUnits::Unit::DGB),
3939
platformStyle(_platformStyle)
4040
{
4141
connect(this, &TxViewDelegate::width_changed, this, &TxViewDelegate::sizeHintChanged);

src/qt/paymentserver.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <qt/optionsmodel.h>
1414

1515
#include <chainparams.h>
16+
#include <util/chaintype.h>
1617
#include <common/args.h>
1718
#include <interfaces/node.h>
1819
#include <key_io.h>
@@ -92,14 +93,14 @@ void PaymentServer::ipcParseCommandLine(int argc, char* argv[])
9293
SendCoinsRecipient r;
9394
if (GUIUtil::parseDigiByteURI(arg, &r) && !r.address.isEmpty())
9495
{
95-
auto tempChainParams = CreateChainParams(gArgs, CBaseChainParams::MAIN);
96+
auto tempChainParams = CreateChainParams(gArgs, ChainType::MAIN);
9697

9798
if (IsValidDestinationString(r.address.toStdString(), *tempChainParams)) {
98-
SelectParams(CBaseChainParams::MAIN);
99+
SelectParams(ChainType::MAIN);
99100
} else {
100-
tempChainParams = CreateChainParams(gArgs, CBaseChainParams::TESTNET);
101+
tempChainParams = CreateChainParams(gArgs, ChainType::TESTNET);
101102
if (IsValidDestinationString(r.address.toStdString(), *tempChainParams)) {
102-
SelectParams(CBaseChainParams::TESTNET);
103+
SelectParams(ChainType::TESTNET);
103104
}
104105
}
105106
}

src/qt/psbtoperationsdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac
179179
ExtractDestination(out.scriptPubKey, address);
180180
totalAmount += out.nValue;
181181
tx_description.append(tr(" * Sends %1 to %2")
182-
.arg(DigiByteUnits::formatWithUnit(DigiByteUnits::DGB, out.nValue))
182+
.arg(DigiByteUnits::formatWithUnit(DigiByteUnits::Unit::DGB, out.nValue))
183183
.arg(QString::fromStdString(EncodeDestination(address))));
184184
// Check if the address is one of ours
185185
if (m_wallet_model != nullptr && m_wallet_model->wallet().txoutIsMine(out)) tx_description.append(" (" + tr("own address") + ")");
@@ -193,7 +193,7 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac
193193
tx_description.append(tr("Unable to calculate transaction fee or total transaction amount."));
194194
} else {
195195
tx_description.append(tr("Pays transaction fee: "));
196-
tx_description.append(DigiByteUnits::formatWithUnit(DigiByteUnits::DGB, *analysis.fee));
196+
tx_description.append(DigiByteUnits::formatWithUnit(DigiByteUnits::Unit::DGB, *analysis.fee));
197197

198198
// add total amount in all subdivision units
199199
tx_description.append("<hr />");

0 commit comments

Comments
 (0)