From 93beaa81c0d0f50876c1344f5c8fad4803863623 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 1 Nov 2016 13:27:05 +1300 Subject: [PATCH] Code tidying --- interface/resources/qml/Marketplaces.qml | 5 ++--- interface/src/Application.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/resources/qml/Marketplaces.qml b/interface/resources/qml/Marketplaces.qml index c94fb0559e..5bee3a84d9 100644 --- a/interface/resources/qml/Marketplaces.qml +++ b/interface/resources/qml/Marketplaces.qml @@ -25,6 +25,7 @@ Rectangle { HifiConstants { id: hifi } id: marketplace anchors.fill: parent + property var marketplacesUrl: "../../scripts/system/html/marketplaces.html" property int statusBarHeight: 50 property int statusMargin: 50 @@ -85,7 +86,6 @@ Rectangle { statusIcon.text = hifi.glyphs.alert; runJavaScript(notFbxHandler, displayErrorStatus()); } - } onLoadingChanged: { @@ -138,7 +138,7 @@ Rectangle { width: 150 text: "See all markets" onClicked: { - webview.url = "../../scripts/system/html/marketplaces.html"; + webview.url = marketplacesUrl; statusLabel.text = standardMessage; } } @@ -163,5 +163,4 @@ Rectangle { } } - } diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 3b4b457e14..bc7820879c 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5336,8 +5336,9 @@ void Application::addAssetToWorld(QString filePath) { // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). if (!DependencyManager::get()->getThisNodeCanWriteAssets()) { - qCDebug(interfaceapp) << "Error downloading asset: Do not have permissions to write to asset server"; - OffscreenUi::warning("Error Downloading Asset", "Do not have permissions to write to asset server"); + QString errorInfo = "Do not have permissions to write to asset server."; + qCDebug(interfaceapp) << "Error downloading asset: " + errorInfo; + OffscreenUi::warning("Error Downloading Asset", errorInfo); return; } @@ -5376,7 +5377,7 @@ void Application::addAssetToWorldUpload(QString path, QString mapping) { auto upload = DependencyManager::get()->createUpload(path); QObject::connect(upload, &AssetUpload::finished, this, [=](AssetUpload* upload, const QString& hash) mutable { if (upload->getError() != AssetUpload::NoError) { - QString errorInfo = "Could not upload asset to asset server"; + QString errorInfo = "Could not upload asset to asset server."; qCDebug(interfaceapp) << "Error downloading asset: " + errorInfo; OffscreenUi::warning("Error Downloading Asset", errorInfo); } else { @@ -5401,7 +5402,7 @@ void Application::addAssetToWorldSetMapping(QString mapping, QString hash) { auto request = DependencyManager::get()->createSetMappingRequest(mapping, hash); connect(request, &SetMappingRequest::finished, this, [=](SetMappingRequest* request) mutable { if (request->getError() != SetMappingRequest::NoError) { - QString errorInfo = "Could not set asset mapping"; + QString errorInfo = "Could not set asset mapping."; qCDebug(interfaceapp) << "Error downloading asset: " + errorInfo; OffscreenUi::warning("Error Downloading Asset", errorInfo); } else { @@ -5425,7 +5426,7 @@ void Application::addAssetToWorldAddEntity(QString mapping) { auto result = DependencyManager::get()->addEntity(properties); if (result == QUuid()) { - QString errorInfo = "Could not add downloaded asset " + mapping + " to world"; + QString errorInfo = "Could not add downloaded asset " + mapping + " to world."; qCDebug(interfaceapp) << "Error downloading asset: " + errorInfo; OffscreenUi::warning("Error Downloading Asset", errorInfo); } else {