diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-01 11:28:51 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-01 11:28:55 +0200 |
commit | 3fd192f8b4d6db386354dfe635a8a6a105b55de8 (patch) | |
tree | 39f8a9caf006a6fe38d89b98a57fb94c56f3cd28 /src/qt/bitcoin.cpp | |
parent | b25551101c7ceff8af862131c30c08527ff60160 (diff) | |
parent | c122f5528c882efc8aebe31fd4d84612175f66aa (diff) | |
download | bitcoin-3fd192f8b4d6db386354dfe635a8a6a105b55de8.tar.xz |
Merge pull request #4234
c122f55 qt: Register CAmount metatype (Wladimir J. van der Laan)
a372168 Use a typedef for monetary values (Mark Friedenbach)
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r-- | src/qt/bitcoin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index bd686041c1..5e2fdc6c30 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -73,6 +73,7 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin); // Declare meta types used for QMetaObject::invokeMethod Q_DECLARE_METATYPE(bool*) +Q_DECLARE_METATYPE(CAmount) static void InitMessage(const std::string &message) { @@ -509,6 +510,9 @@ int main(int argc, char *argv[]) // Register meta types used for QMetaObject::invokeMethod qRegisterMetaType< bool* >(); + // Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType) + // IMPORTANT if it is no longer a typedef use the normal variant above + qRegisterMetaType< CAmount >("CAmount"); /// 3. Application identification // must be set before OptionsModel is initialized or translations are loaded, |