mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:50:38 +02:00
Const declarations to enforce singleton capability
This commit is contained in:
parent
3a5d550fa5
commit
77293150b7
2 changed files with 6 additions and 8 deletions
|
@ -22,7 +22,9 @@
|
||||||
#include <ui/TabletScriptingInterface.h>
|
#include <ui/TabletScriptingInterface.h>
|
||||||
#include "scripting/HMDScriptingInterface.h"
|
#include "scripting/HMDScriptingInterface.h"
|
||||||
|
|
||||||
QmlCommerce::QmlCommerce() {
|
QmlCommerce::QmlCommerce() :
|
||||||
|
_appsPath(PathUtils::getAppDataPath() + "Apps/")
|
||||||
|
{
|
||||||
auto ledger = DependencyManager::get<Ledger>();
|
auto ledger = DependencyManager::get<Ledger>();
|
||||||
auto wallet = DependencyManager::get<Wallet>();
|
auto wallet = DependencyManager::get<Wallet>();
|
||||||
connect(ledger.data(), &Ledger::buyResult, this, &QmlCommerce::buyResult);
|
connect(ledger.data(), &Ledger::buyResult, this, &QmlCommerce::buyResult);
|
||||||
|
@ -44,22 +46,18 @@ QmlCommerce::QmlCommerce() {
|
||||||
|
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
connect(accountManager.data(), &AccountManager::usernameChanged, this, [&]() { setPassphrase(""); });
|
connect(accountManager.data(), &AccountManager::usernameChanged, this, [&]() { setPassphrase(""); });
|
||||||
|
|
||||||
_appsPath = PathUtils::getAppDataPath() + "Apps/";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void QmlCommerce::openSystemApp(const QString& appName) {
|
void QmlCommerce::openSystemApp(const QString& appName) {
|
||||||
static QMap<QString, QString> systemApps {
|
static const QMap<QString, QString> systemApps {
|
||||||
{"GOTO", "hifi/tablet/TabletAddressDialog.qml"},
|
{"GOTO", "hifi/tablet/TabletAddressDialog.qml"},
|
||||||
{"PEOPLE", "hifi/Pal.qml"},
|
{"PEOPLE", "hifi/Pal.qml"},
|
||||||
{"WALLET", "hifi/commerce/wallet/Wallet.qml"},
|
{"WALLET", "hifi/commerce/wallet/Wallet.qml"},
|
||||||
{"MARKET", "/marketplace.html"}
|
{"MARKET", "/marketplace.html"}
|
||||||
};
|
};
|
||||||
|
|
||||||
static QMap<QString, QString> systemInject{
|
static const QMap<QString, QString> systemInject{
|
||||||
{"MARKET", "/scripts/system/html/js/marketplacesInject.js"}
|
{"MARKET", "/scripts/system/html/js/marketplacesInject.js"}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ protected:
|
||||||
Q_INVOKABLE void updateItem(const QString& certificateId);
|
Q_INVOKABLE void updateItem(const QString& certificateId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString _appsPath;
|
const QString _appsPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_QmlCommerce_h
|
#endif // hifi_QmlCommerce_h
|
||||||
|
|
Loading…
Reference in a new issue