Skip to content

Commit

Permalink
Fix qt wallet build
Browse files Browse the repository at this point in the history
  • Loading branch information
timemarkovqtum committed Aug 21, 2024
1 parent b308854 commit 2c97749
Show file tree
Hide file tree
Showing 11 changed files with 395 additions and 27 deletions.
383 changes: 377 additions & 6 deletions src/Makefile.qt.include

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ void BitcoinApplication::restartWallet()
path += restoreName.toStdString();
}
path /= "wallet.dat";
QString pathWallet = QString::fromStdString(path.u8string());
QString pathWallet = QString::fromStdString(path.utf8string());
bool ret = QFile::exists(restorePath) && QFile::exists(pathWallet);
if(ret && QFileInfo(restorePath) != QFileInfo(pathWallet))
{
Expand Down Expand Up @@ -695,9 +695,6 @@ int GuiMain(int argc, char* argv[])
}
}

// Now that the QApplication is setup and we have parsed our parameters, we can set the platform style
app.setupPlatformStyle();

/// 3. Application identification
// must be set before OptionsModel is initialized or translations are loaded,
// as it is used to locate QSettings
Expand Down
4 changes: 2 additions & 2 deletions src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ClientModel::ClientModel(interfaces::Node& node, OptionsModel *_optionsModel, QO
});
connect(m_thread, &QThread::finished, timer, &QObject::deleteLater);
connect(m_thread, &QThread::started, [timer] { timer->start(); });
connect(this, &ClientModel::tipChanged, this, &ClientModel::updateTip)
connect(this, &ClientModel::tipChanged, this, &ClientModel::updateTip);
// move timer to thread so that polling doesn't disturb main event loop
timer->moveToThread(m_thread);
m_thread->start();
Expand Down Expand Up @@ -318,4 +318,4 @@ void ClientModel::updateTip()
uint64_t nGasPrice = 0;
m_node.getGasInfo(blockGasLimit, minGasPrice, nGasPrice);
Q_EMIT gasInfoChanged(blockGasLimit, minGasPrice, nGasPrice);
}
}
6 changes: 3 additions & 3 deletions src/qt/clientmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class ClientModel : public QObject

Mutex m_cached_tip_mutex;
uint256 m_cached_tip_blocks GUARDED_BY(m_cached_tip_mutex){};
bool fBatchProcessingMode{true};
bool fBatchProcessingMode{true};

private:
interfaces::Node& m_node;
Expand All @@ -118,8 +118,8 @@ bool fBatchProcessingMode{true};
void networkActiveChanged(bool networkActive);
void alertsChanged(const QString &warnings);
void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut);
void tipChanged();
void gasInfoChanged(quint64 blockGasLimit, quint64 minGasPrice, quint64 nGasPrice);
void tipChanged();
void gasInfoChanged(quint64 blockGasLimit, quint64 minGasPrice, quint64 nGasPrice);

//! Fired when a message should be reported to the user
void message(const QString &title, const QString &message, unsigned int style);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/macnotificationhandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @implementation NSBundle(returnCorrectIdentifier)
- (NSString *)__bundleIdentifier
{
if (self == [NSBundle mainBundle]) {
return @"org.bitcoinfoundation.Bitcoin-Qt";
return @"org.qtum.Qtum-Qt";
} else {
return [self __bundleIdentifier];
}
Expand Down
2 changes: 1 addition & 1 deletion src/qt/macos_appnap.mm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void disableAppNap()
id processInfo = [NSProcessInfo processInfo];
if ([processInfo respondsToSelector:@selector(beginActivityWithOptions:reason:)])
{
activityId = [processInfo beginActivityWithOptions: activityOptions reason:@"Temporarily disable App Nap for bitcoin-qt."];
activityId = [processInfo beginActivityWithOptions: activityOptions reason:@"Temporarily disable App Nap for qtum-qt."];
[activityId retain];
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/qt/optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
/* hide launch at startup option on macOS */
ui->bitcoinAtStartup->setVisible(false);
ui->tabMain->layout()->removeWidget(ui->bitcoinAtStartup);
ui->verticalLayout_Main->removeItem(ui->horizontalSpacer_0_Main);
#endif

/* remove Wallet tab and 3rd party-URL textbox in case of -disablewallet */
Expand Down Expand Up @@ -608,4 +607,4 @@ void OptionsDialog::updateLogEvents(bool)
ui->logEvents->setChecked(checked);
}
ui->logEvents->setEnabled(!checked);
}
}
3 changes: 2 additions & 1 deletion src/qt/optionsmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class OptionsModel : public QAbstractListModel
LogEvents, // bool
SuperStaking, // bool
SpendZeroConfChange, // bool
ZeroBalanceAddressToken,// bool
ZeroBalanceAddressToken,// bool
Listen, // bool
Server, // bool
EnablePSBTControls, // bool
Expand Down Expand Up @@ -173,6 +173,7 @@ ZeroBalanceAddressToken,// bool
void showTrayIconChanged(bool);
void fontForMoneyChanged(const QFont&);
void zeroBalanceAddressTokenChanged(bool);
};

Q_DECLARE_METATYPE(OptionsModel::FontChoice)

Expand Down
8 changes: 4 additions & 4 deletions src/qt/res/bitcoin-qt-res.rc
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ BEGIN
BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
VALUE "FileDescription", PACKAGE_NAME " (GUI node for Bitcoin)"
VALUE "CompanyName", "Qtum"
VALUE "FileDescription", PACKAGE_NAME " (GUI node for Qtum)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-qt"
VALUE "InternalName", "qtum-qt"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoin-qt.exe"
VALUE "OriginalFilename", "qtum-qt.exe"
VALUE "ProductName", PACKAGE_NAME
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
Expand Down
4 changes: 2 additions & 2 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
if (platformStyle->getImagesOnButtons()) {
ui->openDebugLogfileButton->setIcon(platformStyle->MultiStatesIcon(":/icons/export", PlatformStyle::PushButton));
}
ui->clearButton->setIcon(platformStyle->MultiStatesIcon(":/icons/remove", PlatformStyle::PushButtonIcon));
ui->clearButton->setIcon(platformStyle->MultiStatesIcon(":/icons/remove", PlatformStyle::PushButtonIcon));

ui->fontBiggerButton->setIcon(platformStyle->MultiStatesIcon(":/icons/fontbigger", PlatformStyle::PushButtonIcon));
//: Main shortcut to increase the RPC console font size.
Expand Down Expand Up @@ -1423,4 +1423,4 @@ void RPCConsole::updateWindowTitle()
const QString chainType = QString::fromStdString(Params().GetChainTypeString());
const QString title = tr("Node window - [%1]").arg(chainType);
this->setWindowTitle(title);
}
}
2 changes: 1 addition & 1 deletion src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ void SendCoinsDialog::sendButtonClicked([[maybe_unused]] bool checked)
assert(err == TransactionError::OK);

// Serialize the PSBT
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
DataStream ssTx;
ssTx << psbtx;
QString psbt = EncodeBase64(ssTx.str()).c_str();

Expand Down

0 comments on commit 2c97749

Please sign in to comment.