WalletManager: instantiable QML type

This commit is contained in:
xiphon
2020-07-20 14:47:13 +00:00
parent 63e32c4a83
commit dcc040a119
4 changed files with 9 additions and 22 deletions

View File

@@ -358,6 +358,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
qmlRegisterType<clipboardAdapter>("moneroComponents.Clipboard", 1, 0, "Clipboard");
qmlRegisterType<Downloader>("moneroComponents.Downloader", 1, 0, "Downloader");
qmlRegisterType<WalletKeysFilesModel>("moneroComponents.WalletKeysFilesModel", 1, 0, "WalletKeysFilesModel");
qmlRegisterType<WalletManager>("moneroComponents.WalletManager", 1, 0, "WalletManager");
// Temporary Qt.labs.settings replacement
qmlRegisterType<MoneroSettings>("moneroComponents.Settings", 1, 0, "MoneroSettings");
@@ -371,9 +372,6 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
qmlRegisterUncreatableType<UnsignedTransaction>("moneroComponents.UnsignedTransaction", 1, 0, "UnsignedTransaction",
"UnsignedTransaction can't be instantiated directly");
qmlRegisterUncreatableType<WalletManager>("moneroComponents.WalletManager", 1, 0, "WalletManager",
"WalletManager can't be instantiated directly");
qmlRegisterUncreatableType<TranslationManager>("moneroComponents.TranslationManager", 1, 0, "TranslationManager",
"TranslationManager can't be instantiated directly");
@@ -435,10 +433,6 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
engine.rootContext()->setContextProperty("moneroAccountsDir", moneroAccountsDir);
WalletManager *walletManager = WalletManager::instance();
engine.rootContext()->setContextProperty("walletManager", walletManager);
engine.rootContext()->setContextProperty("translationManager", TranslationManager::instance());
engine.addImageProvider(QLatin1String("qrcode"), new QRCodeImageProvider());