diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-04-15 11:39:15 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@exmulti.com> | 2012-04-15 11:39:15 -0700 |
commit | 5a701eb7ea16b87b56263996ee8e98ec89e2a3d8 (patch) | |
tree | fe8a60dc3eeb26e62cf4531a98b29ed99bee90e9 /src/qt | |
parent | fced2231f89fd86c2c4abe7426b0a493a94bd444 (diff) | |
parent | da7bbd9dfdb8914977fc254b0c9b1bb3025726c8 (diff) | |
download | bitcoin-5a701eb7ea16b87b56263996ee8e98ec89e2a3d8.tar.xz |
Merge pull request #1104 from laanwj/2012_04_clang
Enable and fix most compilation warnings
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/addresstablemodel.cpp | 3 | ||||
-rw-r--r-- | src/qt/bitcoinstrings.cpp | 7 | ||||
-rw-r--r-- | src/qt/editaddressdialog.cpp | 3 | ||||
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 2 | ||||
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 3 | ||||
-rw-r--r-- | src/qt/walletmodel.h | 3 |
6 files changed, 16 insertions, 5 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index 05f3a81698..0239a167d7 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -27,8 +27,9 @@ struct AddressTableEntry }; // Private implementation -struct AddressTablePriv +class AddressTablePriv { +public: CWallet *wallet; QList<AddressTableEntry> cachedAddressTable; diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 4fbd9874f5..b25af1a210 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -1,6 +1,11 @@ #include <QtGlobal> // Automatically generated by extract_strings.py -static const char *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "" +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "" "Unable to bind to port %d on this computer. Bitcoin is probably already " "running."), QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Disk space is low "), diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp index 8cc3c85d7a..cecb8aecd7 100644 --- a/src/qt/editaddressdialog.cpp +++ b/src/qt/editaddressdialog.cpp @@ -106,6 +106,9 @@ void EditAddressDialog::accept() tr("New key generation failed."), QMessageBox::Ok, QMessageBox::Ok); return; + case AddressTableModel::OK: + // Failed with unknown reason. Just reject. + break; } return; diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 592ae6f45a..b4029aa0d2 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -154,6 +154,8 @@ void SendCoinsDialog::on_sendButton_clicked() tr("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."), QMessageBox::Ok, QMessageBox::Ok); break; + case WalletModel::Aborted: // User aborted, nothing to do + break; case WalletModel::OK: accept(); break; diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index aa11df979f..41c9db1123 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -45,8 +45,9 @@ struct TxLessThan }; // Private implementation -struct TransactionTablePriv +class TransactionTablePriv { +public: TransactionTablePriv(CWallet *wallet, TransactionTableModel *parent): wallet(wallet), parent(parent) diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index c4468171a8..6c47f61bef 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -35,8 +35,7 @@ public: DuplicateAddress, TransactionCreationFailed, // Error returned when wallet is still locked TransactionCommitFailed, - Aborted, - MiscError + Aborted }; enum EncryptionStatus |