Browse Source

Merge pull request #3039 from Diapolo/Qt_misc

several small Qt-related fixes
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
75d31c84db
  1. 3
      src/qt/bitcoin.cpp
  2. 8
      src/qt/bitcoingui.cpp
  3. 2
      src/qt/bitcoingui.h
  4. 3
      src/qt/clientmodel.cpp

3
src/qt/bitcoin.cpp

@ -155,11 +155,14 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans @@ -155,11 +155,14 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
#if QT_VERSION < 0x050000
void DebugMessageHandler(QtMsgType type, const char * msg)
{
Q_UNUSED(type);
LogPrint("qt", "Bitcoin-Qt: %s\n", msg);
}
#else
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
{
Q_UNUSED(type);
Q_UNUSED(context);
LogPrint("qt", "Bitcoin-Qt: %s\n", qPrintable(msg));
}
#endif

8
src/qt/bitcoingui.cpp

@ -751,13 +751,9 @@ void BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient) @@ -751,13 +751,9 @@ void BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
walletFrame->handlePaymentRequest(recipient);
}
void BitcoinGUI::showPaymentACK(QString msg)
void BitcoinGUI::showPaymentACK(const QString& msg)
{
#if QT_VERSION < 0x050000
message(tr("Payment acknowledged"), Qt::escape(msg), CClientUIInterface::MODAL);
#else
message(tr("Payment acknowledged"), msg.toHtmlEscaped(), CClientUIInterface::MODAL);
#endif
message(tr("Payment acknowledged"), GUIUtil::HtmlEscape(msg), CClientUIInterface::MODAL);
}
void BitcoinGUI::setEncryptionStatus(int status)

2
src/qt/bitcoingui.h

@ -154,7 +154,7 @@ public slots: @@ -154,7 +154,7 @@ public slots:
void askFee(qint64 nFeeRequired, bool *payFee);
void handlePaymentRequest(const SendCoinsRecipient& recipient);
void showPaymentACK(QString msg);
void showPaymentACK(const QString& msg);
/** Show incoming transaction notification for new transactions. */
void incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address);

3
src/qt/clientmodel.cpp

@ -24,9 +24,8 @@ ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) : @@ -24,9 +24,8 @@ ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
numBlocksAtStartup(-1), pollTimer(0)
{
pollTimer = new QTimer(this);
pollTimer->setInterval(MODEL_UPDATE_DELAY);
pollTimer->start();
connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer()));
pollTimer->start(MODEL_UPDATE_DELAY);
subscribeToCoreSignals();
}

Loading…
Cancel
Save