Code cleanup
[novacoin.git] / src / qt / transactiontablemodel.cpp
index 00a5884..8133f57 100644 (file)
@@ -536,13 +536,15 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         case Status:
             return QString::fromStdString(rec->status.sortKey);
         case Date:
-            return rec->time;
+            // We need cast here to prevent ambigious conversion error
+            return static_cast<qlonglong>(rec->time);
         case Type:
             return formatTxType(rec);
         case ToAddress:
             return formatTxToAddress(rec, true);
         case Amount:
-            return rec->credit + rec->debit;
+            // Same here
+            return static_cast<qlonglong>(rec->credit + rec->debit);
         }
         break;
     case Qt::ToolTipRole:
@@ -575,7 +577,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
     case LabelRole:
         return walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address));
     case AmountRole:
-        return rec->credit + rec->debit;
+        // And here
+        return static_cast<qlonglong>(rec->credit + rec->debit);
     case TxIDRole:
         return QString::fromStdString(rec->getTxID());
     case TxHashRole: