fix warnings: enumeration values 'XX' not handled in switch [-Wswitch-enum]
authorWladimir J. van der Laan <laanwj@gmail.com>
Sun, 15 Apr 2012 10:42:52 +0000 (12:42 +0200)
committerLuke Dashjr <luke-jr+git@utopios.org>
Sun, 15 Apr 2012 23:28:48 +0000 (19:28 -0400)
src/qt/editaddressdialog.cpp
src/qt/sendcoinsdialog.cpp
src/qt/walletmodel.h

index 8cc3c85..cecb8ae 100644 (file)
@@ -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;
index 6577615..4c58b38 100644 (file)
@@ -148,6 +148,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;
index 055ba18..e04ae87 100644 (file)
@@ -34,8 +34,7 @@ public:
         DuplicateAddress,
         TransactionCreationFailed, // Error returned when wallet is still locked
         TransactionCommitFailed,
-        Aborted,
-        MiscError
+        Aborted
     };
 
     enum EncryptionStatus