From: Wladimir J. van der Laan Date: Sun, 15 Apr 2012 10:42:52 +0000 (+0200) Subject: fix warnings: enumeration values 'XX' not handled in switch [-Wswitch-enum] X-Git-Tag: v0.4.0-unstable~129^2~72^2~4 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=76d8170ce8b4714657f8defd791bd30fef1a8de4 fix warnings: enumeration values 'XX' not handled in switch [-Wswitch-enum] --- diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp index 8cc3c85..cecb8ae 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 592ae6f..b4029aa 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/walletmodel.h b/src/qt/walletmodel.h index c446817..6c47f61 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