aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorLuke Dashjr <[email protected]>2011-12-20 16:52:59 -0500
committerLuke Dashjr <[email protected]>2011-12-20 16:52:59 -0500
commit21d9f36781604e4ca9fc35dc65265593423b73e9 (patch)
tree223bf70418e43a0b9c8366c65db214780f77d61a /src/qt
parentMerge pull request #677 from luke-jr/minfee_modes (diff)
downloaddiscoin-21d9f36781604e4ca9fc35dc65265593423b73e9.tar.xz
discoin-21d9f36781604e4ca9fc35dc65265593423b73e9.zip
Use standard C99 (and Qt) types for 64-bit integers
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp3
-rw-r--r--src/qt/bitcoinamountfield.cpp1
-rw-r--r--src/qt/bitcoinamountfield.h1
-rw-r--r--src/qt/bitcoingui.cpp1
-rw-r--r--src/qt/bitcoingui.h1
-rw-r--r--src/qt/bitcoinstrings.cpp2
-rw-r--r--src/qt/bitcoinunits.cpp1
-rw-r--r--src/qt/bitcoinunits.h1
-rw-r--r--src/qt/guiutil.cpp1
-rw-r--r--src/qt/guiutil.h1
-rw-r--r--src/qt/notificator.cpp1
-rw-r--r--src/qt/optionsmodel.cpp2
-rw-r--r--src/qt/optionsmodel.h1
-rw-r--r--src/qt/overviewpage.cpp1
-rw-r--r--src/qt/overviewpage.h1
-rw-r--r--src/qt/sendcoinsdialog.cpp1
-rw-r--r--src/qt/sendcoinsdialog.h1
-rw-r--r--src/qt/transactiondesc.cpp17
-rw-r--r--src/qt/transactionfilterproxy.cpp1
-rw-r--r--src/qt/transactionfilterproxy.h1
-rw-r--r--src/qt/transactionrecord.cpp20
-rw-r--r--src/qt/transactionrecord.h17
-rw-r--r--src/qt/transactionview.cpp1
-rw-r--r--src/qt/walletmodel.cpp5
-rw-r--r--src/qt/walletmodel.h1
25 files changed, 55 insertions, 29 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index cba4e851b..f696ca0f8 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -9,6 +9,7 @@
#include "headers.h"
#include "init.h"
+#include <QtGlobal>
#include <QApplication>
#include <QMessageBox>
#include <QThread>
@@ -56,7 +57,7 @@ int ThreadSafeMessageBox(const std::string& message, const std::string& caption,
return 4;
}
-bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent)
+bool ThreadSafeAskFee(qint64 nFeeRequired, const std::string& strCaption, wxWindow* parent)
{
if(!guiref)
return false;
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 19cd5655c..f385bc55e 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -4,6 +4,7 @@
#include "guiconstants.h"
+#include <QtGlobal>
#include <QLabel>
#include <QLineEdit>
#include <QRegExpValidator>
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index ead8bdb84..954ed1ebd 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -1,6 +1,7 @@
#ifndef BITCOINFIELD_H
#define BITCOINFIELD_H
+#include <QtGlobal>
#include <QWidget>
QT_BEGIN_NAMESPACE
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 1c4968336..fa317a25e 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -27,6 +27,7 @@
#include "macdockiconhandler.h"
#endif
+#include <QtGlobal>
#include <QApplication>
#include <QMainWindow>
#include <QMenuBar>
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index a0905e44a..a0b3652fc 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -1,6 +1,7 @@
#ifndef BITCOINGUI_H
#define BITCOINGUI_H
+#include <QtGlobal>
#include <QMainWindow>
#include <QSystemTrayIcon>
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 624ff58ce..b4ebe9d72 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -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"),
-}; \ No newline at end of file
+};
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 9a9a4890d..0845d2104 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -1,5 +1,6 @@
#include "bitcoinunits.h"
+#include <QtGlobal>
#include <QStringList>
BitcoinUnits::BitcoinUnits(QObject *parent):
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index 18fa36a0b..35c0d8ea0 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -1,6 +1,7 @@
#ifndef BITCOINUNITS_H
#define BITCOINUNITS_H
+#include <QtGlobal>
#include <QString>
#include <QAbstractListModel>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 158b84a28..378660b04 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -5,6 +5,7 @@
#include "headers.h"
+#include <QtGlobal>
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 94e3314d1..4a4cc6234 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -1,6 +1,7 @@
#ifndef GUIUTIL_H
#define GUIUTIL_H
+#include <QtGlobal>
#include <QString>
QT_BEGIN_NAMESPACE
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index a2314caa4..5e9969bf9 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -1,5 +1,6 @@
#include "notificator.h"
+#include <QtGlobal>
#include <QMetaType>
#include <QVariant>
#include <QIcon>
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index a68c84c95..bc56bdea0 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -1,3 +1,5 @@
+#include <QtGlobal>
+
#include "optionsmodel.h"
#include "bitcoinunits.h"
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 775362d63..13d964b25 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -1,6 +1,7 @@
#ifndef OPTIONSMODEL_H
#define OPTIONSMODEL_H
+#include <QtGlobal>
#include <QAbstractListModel>
class CWallet;
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 5b5a8f527..1710519e0 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -9,6 +9,7 @@
#include "guiutil.h"
#include "guiconstants.h"
+#include <QtGlobal>
#include <QAbstractItemDelegate>
#include <QPainter>
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index 119922716..46317d9b9 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -1,6 +1,7 @@
#ifndef OVERVIEWPAGE_H
#define OVERVIEWPAGE_H
+#include <QtGlobal>
#include <QWidget>
QT_BEGIN_NAMESPACE
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 762f27dfa..e6b500cfd 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -8,6 +8,7 @@
#include "guiutil.h"
#include "askpassphrasedialog.h"
+#include <QtGlobal>
#include <QMessageBox>
#include <QLocale>
#include <QTextDocument>
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 82910257f..d879fbe97 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -1,6 +1,7 @@
#ifndef SENDCOINSDIALOG_H
#define SENDCOINSDIALOG_H
+#include <QtGlobal>
#include <QDialog>
namespace Ui {
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 6ca3ac8c4..a19ec875d 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -6,6 +6,7 @@
#include "headers.h"
#include "qtui.h"
+#include <QtGlobal>
#include <QString>
#include <QTextDocument> // For Qt::escape
@@ -55,10 +56,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
strHTML.reserve(4000);
strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
- int64 nTime = wtx.GetTxTime();
- int64 nCredit = wtx.GetCredit();
- int64 nDebit = wtx.GetDebit();
- int64 nNet = nCredit - nDebit;
+ qint64 nTime = wtx.GetTxTime();
+ qint64 nCredit = wtx.GetCredit();
+ qint64 nDebit = wtx.GetDebit();
+ qint64 nNet = nCredit - nDebit;
strHTML += tr("<b>Status:</b> ") + FormatTxStatus(wtx);
int nRequests = wtx.GetRequestCount();
@@ -141,7 +142,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
//
// Coinbase
//
- int64 nUnmatured = 0;
+ qint64 nUnmatured = 0;
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
nUnmatured += wallet->GetCredit(txout);
strHTML += tr("<b>Credit:</b> ");
@@ -200,13 +201,13 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
if (fAllToMe)
{
// Payment to self
- int64 nChange = wtx.GetChange();
- int64 nValue = nCredit - nChange;
+ qint64 nChange = wtx.GetChange();
+ qint64 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>";
}
- int64 nTxFee = nDebit - wtx.GetValueOut();
+ qint64 nTxFee = nDebit - wtx.GetValueOut();
if (nTxFee > 0)
strHTML += tr("<b>Transaction fee:</b> ") + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC,-nTxFee) + "<br>";
}
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
index 16fb4dab9..278186fe6 100644
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -1,6 +1,7 @@
#include "transactionfilterproxy.h"
#include "transactiontablemodel.h"
+#include <QtGlobal>
#include <QDateTime>
#include <cstdlib>
diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h
index 76cf46f15..e33b5e5fb 100644
--- a/src/qt/transactionfilterproxy.h
+++ b/src/qt/transactionfilterproxy.h
@@ -1,6 +1,7 @@
#ifndef TRANSACTIONFILTERPROXY_H
#define TRANSACTIONFILTERPROXY_H
+#include <QtGlobal>
#include <QSortFilterProxyModel>
#include <QDateTime>
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 53cd35b2d..8a1f1b677 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -1,3 +1,5 @@
+#include <QtGlobal>
+
#include "transactionrecord.h"
#include "headers.h"
@@ -33,10 +35,10 @@ bool TransactionRecord::showTransaction(const CWalletTx &wtx)
QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx)
{
QList<TransactionRecord> parts;
- int64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime();
- int64 nCredit = wtx.GetCredit(true);
- int64 nDebit = wtx.GetDebit();
- int64 nNet = nCredit - nDebit;
+ qint64 nTime = wtx.nTimeDisplayed = wtx.GetTxTime();
+ qint64 nCredit = wtx.GetCredit(true);
+ qint64 nDebit = wtx.GetDebit();
+ qint64 nNet = nCredit - nDebit;
uint256 hash = wtx.GetHash();
std::map<std::string, std::string> mapValue = wtx.mapValue;
@@ -58,7 +60,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
if (nCredit == 0)
{
- int64 nUnmatured = 0;
+ qint64 nUnmatured = 0;
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
nUnmatured += wallet->GetCredit(txout);
sub.credit = nUnmatured;
@@ -103,7 +105,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
if (fAllFromMe && fAllToMe)
{
// Payment to self
- int64 nChange = wtx.GetChange();
+ qint64 nChange = wtx.GetChange();
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
-(nDebit - nChange), nCredit - nChange));
@@ -113,7 +115,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
//
// Debit
//
- int64 nTxFee = nDebit - wtx.GetValueOut();
+ qint64 nTxFee = nDebit - wtx.GetValueOut();
for (int nOut = 0; nOut < wtx.vout.size(); nOut++)
{
@@ -144,7 +146,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
}
}
- int64 nValue = txout.nValue;
+ qint64 nValue = txout.nValue;
/* Add fee to first output */
if (nTxFee > 0)
{
@@ -227,7 +229,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
// For generated transactions, determine maturity
if(type == TransactionRecord::Generated)
{
- int64 nCredit = wtx.GetCredit(true);
+ qint64 nCredit = wtx.GetCredit(true);
if (nCredit == 0)
{
status.maturity = TransactionStatus::Immature;
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index 704cfe65b..db29b9457 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -3,6 +3,7 @@
#include "uint256.h"
+#include <QtGlobal>
#include <QList>
class CWallet;
@@ -46,8 +47,8 @@ public:
/** @name Reported status
@{*/
Status status;
- int64 depth;
- int64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number of blocks */
+ qint64 depth;
+ qint64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number of blocks */
/**@}*/
/** Current number of blocks (to know whether cached status is still valid) */
@@ -79,15 +80,15 @@ public:
{
}
- TransactionRecord(uint256 hash, int64 time):
+ TransactionRecord(uint256 hash, qint64 time):
hash(hash), time(time), type(Other), address(""), debit(0),
credit(0), idx(0)
{
}
- TransactionRecord(uint256 hash, int64 time,
+ TransactionRecord(uint256 hash, qint64 time,
Type type, const std::string &address,
- int64 debit, int64 credit):
+ qint64 debit, qint64 credit):
hash(hash), time(time), type(type), address(address), debit(debit), credit(credit),
idx(0)
{
@@ -101,11 +102,11 @@ public:
/** @name Immutable transaction attributes
@{*/
uint256 hash;
- int64 time;
+ qint64 time;
Type type;
std::string address;
- int64 debit;
- int64 credit;
+ qint64 debit;
+ qint64 credit;
/**@}*/
/** Subtransaction index, for sort key */
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 2dcbf1ea8..af9597117 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -11,6 +11,7 @@
#include "editaddressdialog.h"
#include "optionsmodel.h"
+#include <QtGlobal>
#include <QScrollBar>
#include <QComboBox>
#include <QDoubleValidator>
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index f028f10f6..b71256a23 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -6,6 +6,7 @@
#include "headers.h"
+#include <QtGlobal>
#include <QTimer>
#include <QSet>
@@ -120,7 +121,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
CRITICAL_BLOCK(wallet->cs_wallet)
{
// Sendmany
- std::vector<std::pair<CScript, int64> > vecSend;
+ std::vector<std::pair<CScript, qint64> > vecSend;
foreach(const SendCoinsRecipient &rcp, recipients)
{
CScript scriptPubKey;
@@ -130,7 +131,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
CWalletTx wtx;
CReserveKey keyChange(wallet);
- int64 nFeeRequired = 0;
+ qint64 nFeeRequired = 0;
bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired);
if(!fCreated)
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 89e8cdd2a..6c0d6d2af 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -1,6 +1,7 @@
#ifndef WALLETMODEL_H
#define WALLETMODEL_H
+#include <QtGlobal>
#include <QObject>
#include "util.h"