mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 12:02:25 +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 "scripting/HMDScriptingInterface.h"
|
||||
|
||||
QmlCommerce::QmlCommerce() {
|
||||
QmlCommerce::QmlCommerce() :
|
||||
_appsPath(PathUtils::getAppDataPath() + "Apps/")
|
||||
{
|
||||
auto ledger = DependencyManager::get<Ledger>();
|
||||
auto wallet = DependencyManager::get<Wallet>();
|
||||
connect(ledger.data(), &Ledger::buyResult, this, &QmlCommerce::buyResult);
|
||||
|
@ -44,22 +46,18 @@ QmlCommerce::QmlCommerce() {
|
|||
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
connect(accountManager.data(), &AccountManager::usernameChanged, this, [&]() { setPassphrase(""); });
|
||||
|
||||
_appsPath = PathUtils::getAppDataPath() + "Apps/";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void QmlCommerce::openSystemApp(const QString& appName) {
|
||||
static QMap<QString, QString> systemApps {
|
||||
static const QMap<QString, QString> systemApps {
|
||||
{"GOTO", "hifi/tablet/TabletAddressDialog.qml"},
|
||||
{"PEOPLE", "hifi/Pal.qml"},
|
||||
{"WALLET", "hifi/commerce/wallet/Wallet.qml"},
|
||||
{"MARKET", "/marketplace.html"}
|
||||
};
|
||||
|
||||
static QMap<QString, QString> systemInject{
|
||||
static const QMap<QString, QString> systemInject{
|
||||
{"MARKET", "/scripts/system/html/js/marketplacesInject.js"}
|
||||
};
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ protected:
|
|||
Q_INVOKABLE void updateItem(const QString& certificateId);
|
||||
|
||||
private:
|
||||
QString _appsPath;
|
||||
const QString _appsPath;
|
||||
};
|
||||
|
||||
#endif // hifi_QmlCommerce_h
|
||||
|
|
Loading…
Reference in a new issue