Revert "Use standard C99 (and Qt) types for 64-bit integers"
This reverts commit 21d9f36781.
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include "headers.h"
|
||||
#include "init.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QThread>
|
||||
@@ -57,7 +56,7 @@ int ThreadSafeMessageBox(const std::string& message, const std::string& caption,
|
||||
return 4;
|
||||
}
|
||||
|
||||
bool ThreadSafeAskFee(qint64 nFeeRequired, const std::string& strCaption, wxWindow* parent)
|
||||
bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent)
|
||||
{
|
||||
if(!guiref)
|
||||
return false;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "guiconstants.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QRegExpValidator>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef BITCOINFIELD_H
|
||||
#define BITCOINFIELD_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "macdockiconhandler.h"
|
||||
#endif
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QApplication>
|
||||
#include <QMainWindow>
|
||||
#include <QMenuBar>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef BITCOINGUI_H
|
||||
#define BITCOINGUI_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QMainWindow>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
|
||||
@@ -82,4 +82,4 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
|
||||
"Warning: Please check that your computer's date and time are correct. If "
|
||||
"your clock is wrong Bitcoin will not work properly."),
|
||||
QT_TRANSLATE_NOOP("bitcoin-core", "beta"),
|
||||
};
|
||||
};
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "bitcoinunits.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QStringList>
|
||||
|
||||
BitcoinUnits::BitcoinUnits(QObject *parent):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef BITCOINUNITS_H
|
||||
#define BITCOINUNITS_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QString>
|
||||
#include <QAbstractListModel>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "headers.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
#include <QDoubleValidator>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef GUIUTIL_H
|
||||
#define GUIUTIL_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QString>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "notificator.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QMetaType>
|
||||
#include <QVariant>
|
||||
#include <QIcon>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "optionsmodel.h"
|
||||
#include "bitcoinunits.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef OPTIONSMODEL_H
|
||||
#define OPTIONSMODEL_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QAbstractListModel>
|
||||
|
||||
class CWallet;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "guiutil.h"
|
||||
#include "guiconstants.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QAbstractItemDelegate>
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef OVERVIEWPAGE_H
|
||||
#define OVERVIEWPAGE_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "guiutil.h"
|
||||
#include "askpassphrasedialog.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QMessageBox>
|
||||
#include <QLocale>
|
||||
#include <QTextDocument>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef SENDCOINSDIALOG_H
|
||||
#define SENDCOINSDIALOG_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "headers.h"
|
||||
#include "qtui.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QString>
|
||||
#include <QTextDocument> // For Qt::escape
|
||||
|
||||
@@ -56,10 +55,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
|
||||
strHTML.reserve(4000);
|
||||
strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
|
||||
|
||||
qint64 nTime = wtx.GetTxTime();
|
||||
qint64 nCredit = wtx.GetCredit();
|
||||
qint64 nDebit = wtx.GetDebit();
|
||||
qint64 nNet = nCredit - nDebit;
|
||||
int64 nTime = wtx.GetTxTime();
|
||||
int64 nCredit = wtx.GetCredit();
|
||||
int64 nDebit = wtx.GetDebit();
|
||||
int64 nNet = nCredit - nDebit;
|
||||
|
||||
strHTML += tr("<b>Status:</b> ") + FormatTxStatus(wtx);
|
||||
int nRequests = wtx.GetRequestCount();
|
||||
@@ -142,7 +141,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
|
||||
//
|
||||
// Coinbase
|
||||
//
|
||||
qint64 nUnmatured = 0;
|
||||
int64 nUnmatured = 0;
|
||||
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
|
||||
nUnmatured += wallet->GetCredit(txout);
|
||||
strHTML += tr("<b>Credit:</b> ");
|
||||
@@ -201,13 +200,13 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
|
||||
if (fAllToMe)
|
||||
{
|
||||
// Payment to self
|
||||
qint64 nChange = wtx.GetChange();
|
||||
qint64 nValue = nCredit - nChange;
|
||||
int64 nChange = wtx.GetChange();
|
||||
int64 nValue = nCredit - nChange;
|
||||
strHTML += tr("<b>Debit:</b> ") + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, -nValue) + "<br>";
|
||||
strHTML += tr("<b>Credit:</b> ") + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nValue) + "<br>";
|
||||
}
|
||||
|
||||
qint64 nTxFee = nDebit - wtx.GetValueOut();
|
||||
int64 nTxFee = nDebit - wtx.GetValueOut();
|
||||
if (nTxFee > 0)
|
||||
strHTML += tr("<b>Transaction fee:</b> ") + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC,-nTxFee) + "<br>";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "transactionfilterproxy.h"
|
||||
#include "transactiontablemodel.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef TRANSACTIONFILTERPROXY_H
|
||||
#define TRANSACTIONFILTERPROXY_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QDateTime>
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "transactionrecord.h"
|
||||
|
||||
#include "headers.h"
|
||||
@@ -35,10 +33,10 @@ bool TransactionRecord::showTransaction(const CWalletTx &wtx)
|
||||
QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx)
|
||||
{
|
||||
QList<TransactionRecord> parts;
|
||||
qint64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime();
|
||||
qint64 nCredit = wtx.GetCredit(true);
|
||||
qint64 nDebit = wtx.GetDebit();
|
||||
qint64 nNet = nCredit - nDebit;
|
||||
int64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime();
|
||||
int64 nCredit = wtx.GetCredit(true);
|
||||
int64 nDebit = wtx.GetDebit();
|
||||
int64 nNet = nCredit - nDebit;
|
||||
uint256 hash = wtx.GetHash();
|
||||
std::map<std::string, std::string> mapValue = wtx.mapValue;
|
||||
|
||||
@@ -60,7 +58,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
|
||||
if (nCredit == 0)
|
||||
{
|
||||
qint64 nUnmatured = 0;
|
||||
int64 nUnmatured = 0;
|
||||
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
|
||||
nUnmatured += wallet->GetCredit(txout);
|
||||
sub.credit = nUnmatured;
|
||||
@@ -105,7 +103,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
if (fAllFromMe && fAllToMe)
|
||||
{
|
||||
// Payment to self
|
||||
qint64 nChange = wtx.GetChange();
|
||||
int64 nChange = wtx.GetChange();
|
||||
|
||||
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
|
||||
-(nDebit - nChange), nCredit - nChange));
|
||||
@@ -115,7 +113,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
//
|
||||
// Debit
|
||||
//
|
||||
qint64 nTxFee = nDebit - wtx.GetValueOut();
|
||||
int64 nTxFee = nDebit - wtx.GetValueOut();
|
||||
|
||||
for (int nOut = 0; nOut < wtx.vout.size(); nOut++)
|
||||
{
|
||||
@@ -146,7 +144,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
}
|
||||
}
|
||||
|
||||
qint64 nValue = txout.nValue;
|
||||
int64 nValue = txout.nValue;
|
||||
/* Add fee to first output */
|
||||
if (nTxFee > 0)
|
||||
{
|
||||
@@ -229,7 +227,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
|
||||
// For generated transactions, determine maturity
|
||||
if(type == TransactionRecord::Generated)
|
||||
{
|
||||
qint64 nCredit = wtx.GetCredit(true);
|
||||
int64 nCredit = wtx.GetCredit(true);
|
||||
if (nCredit == 0)
|
||||
{
|
||||
status.maturity = TransactionStatus::Immature;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "uint256.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QList>
|
||||
|
||||
class CWallet;
|
||||
@@ -47,8 +46,8 @@ public:
|
||||
/** @name Reported status
|
||||
@{*/
|
||||
Status status;
|
||||
qint64 depth;
|
||||
qint64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number of blocks */
|
||||
int64 depth;
|
||||
int64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number of blocks */
|
||||
/**@}*/
|
||||
|
||||
/** Current number of blocks (to know whether cached status is still valid) */
|
||||
@@ -80,15 +79,15 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
TransactionRecord(uint256 hash, qint64 time):
|
||||
TransactionRecord(uint256 hash, int64 time):
|
||||
hash(hash), time(time), type(Other), address(""), debit(0),
|
||||
credit(0), idx(0)
|
||||
{
|
||||
}
|
||||
|
||||
TransactionRecord(uint256 hash, qint64 time,
|
||||
TransactionRecord(uint256 hash, int64 time,
|
||||
Type type, const std::string &address,
|
||||
qint64 debit, qint64 credit):
|
||||
int64 debit, int64 credit):
|
||||
hash(hash), time(time), type(type), address(address), debit(debit), credit(credit),
|
||||
idx(0)
|
||||
{
|
||||
@@ -102,11 +101,11 @@ public:
|
||||
/** @name Immutable transaction attributes
|
||||
@{*/
|
||||
uint256 hash;
|
||||
qint64 time;
|
||||
int64 time;
|
||||
Type type;
|
||||
std::string address;
|
||||
qint64 debit;
|
||||
qint64 credit;
|
||||
int64 debit;
|
||||
int64 credit;
|
||||
/**@}*/
|
||||
|
||||
/** Subtransaction index, for sort key */
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "editaddressdialog.h"
|
||||
#include "optionsmodel.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QScrollBar>
|
||||
#include <QComboBox>
|
||||
#include <QDoubleValidator>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "headers.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QTimer>
|
||||
#include <QSet>
|
||||
|
||||
@@ -121,7 +120,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
|
||||
CRITICAL_BLOCK(wallet->cs_wallet)
|
||||
{
|
||||
// Sendmany
|
||||
std::vector<std::pair<CScript, qint64> > vecSend;
|
||||
std::vector<std::pair<CScript, int64> > vecSend;
|
||||
foreach(const SendCoinsRecipient &rcp, recipients)
|
||||
{
|
||||
CScript scriptPubKey;
|
||||
@@ -131,7 +130,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
|
||||
|
||||
CWalletTx wtx;
|
||||
CReserveKey keyChange(wallet);
|
||||
qint64 nFeeRequired = 0;
|
||||
int64 nFeeRequired = 0;
|
||||
bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired);
|
||||
|
||||
if(!fCreated)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef WALLETMODEL_H
|
||||
#define WALLETMODEL_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QObject>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
Reference in New Issue
Block a user