Fix runtime wallet error on Windows

This commit is contained in:
cryptonotefoundation 2016-04-12 13:42:34 +00:00
parent d464be0bbb
commit a42d92ee69
2 changed files with 3 additions and 6 deletions

View file

@ -16,9 +16,6 @@ namespace WalletGui {
enum class TransactionType : quint8 {MINED, INPUT, OUTPUT, INOUT}; enum class TransactionType : quint8 {MINED, INPUT, OUTPUT, INOUT};
const int TRANSACTIONS_MODEL_COLUMN_COUNT =
TransactionsModel::staticMetaObject.enumerator(TransactionsModel::staticMetaObject.indexOfEnumerator("Columns")).keyCount();
namespace { namespace {
QPixmap getTransactionIcon(TransactionType _transactionType) { QPixmap getTransactionIcon(TransactionType _transactionType) {
@ -71,7 +68,7 @@ Qt::ItemFlags TransactionsModel::flags(const QModelIndex& _index) const {
} }
int TransactionsModel::columnCount(const QModelIndex& _parent) const { int TransactionsModel::columnCount(const QModelIndex& _parent) const {
return TRANSACTIONS_MODEL_COLUMN_COUNT; return TransactionsModel::staticMetaObject.enumerator(TransactionsModel::staticMetaObject.indexOfEnumerator("Columns")).keyCount();
} }
int TransactionsModel::rowCount(const QModelIndex& _parent) const { int TransactionsModel::rowCount(const QModelIndex& _parent) const {

View file

@ -41,10 +41,10 @@ int main(int argc, char* argv[]) {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if(!cmdLineParseResult) { if(!cmdLineParseResult) {
QMessageBox::critical(nullptr, QObject::tr("Error"), cmdLineParser.errorText()); QMessageBox::critical(nullptr, QObject::tr("Error"), cmdLineParser.getErrorText());
return app.exec(); return app.exec();
} else if (cmdLineParser.hasHelpOption()) { } else if (cmdLineParser.hasHelpOption()) {
QMessageBox::information(nullptr, QObject::tr("Help"), cmdLineParser.helpText()); QMessageBox::information(nullptr, QObject::tr("Help"), cmdLineParser.getHelpText());
return app.exec(); return app.exec();
} }
#endif #endif