Implemented backend for About dialog

This commit is contained in:
vladest 2018-05-15 15:49:20 +02:00
parent 58f04121b7
commit fee3cc0aca
5 changed files with 19 additions and 24 deletions

View file

@ -73,6 +73,8 @@ macro(SET_PACKAGING_PARAMETERS)
add_definitions(-DDEV_BUILD)
endif ()
string(TIMESTAMP BUILD_TIME "%d/%m/%Y")
if (DEPLOY_PACKAGE)
# for deployed packages always grab the serverless content
set(DOWNLOAD_SERVERLESS_CONTENT ON)

View file

@ -26,4 +26,6 @@ namespace BuildInfo {
const QString VERSION = "@BUILD_VERSION@";
const QString BUILD_BRANCH = "@BUILD_BRANCH@";
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
const QString BUILD_TIME = "@BUILD_TIME@";
}

View file

@ -9,7 +9,6 @@
//
import QtQuick 2.5
import "../../styles-uit"
Rectangle {
@ -34,29 +33,15 @@ Rectangle {
id: buildColumm
anchors.left: parent.left
anchors.leftMargin: 70
Row {
RalewayRegular {
text: "Build"
size: 16
color: "white"
}
RalewayRegular {
id: build
size: 16
color: "white"
}
RalewayRegular {
text: "Build " + HiFiAbout.buildVersion
size: 16
color: "white"
}
Row {
RalewayRegular {
text: "Released"
size: 16
color: "white"
}
RalewayRegular {
id: released
size: 16
color: "white"
}
RalewayRegular {
text: "Released " + HiFiAbout.buildDate
size: 16
color: "white"
}
}
Item { height: 10; width: 1 }
@ -82,7 +67,7 @@ Rectangle {
}
RalewayRegular {
color: "white"
text: "Built using Qt 5.10.1"
text: "Built using Qt " + HiFiAbout.qtVersion
size: 12
anchors.verticalCenter: parent.verticalCenter
}

View file

@ -220,6 +220,8 @@
#include "webbrowser/WebBrowserSuggestionsEngine.h"
#include <DesktopPreviewProvider.h>
#include "AboutUtil.h"
#if defined(Q_OS_WIN)
#include <VersionHelpers.h>
@ -2968,6 +2970,7 @@ void Application::onDesktopRootContextCreated(QQmlContext* surfaceContext) {
surfaceContext->setContextProperty("Selection", DependencyManager::get<SelectionScriptingInterface>().data());
surfaceContext->setContextProperty("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());
surfaceContext->setContextProperty("Wallet", DependencyManager::get<WalletScriptingInterface>().data());
surfaceContext->setContextProperty("HiFiAbout", AboutUtil::getInstance());
if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) {
surfaceContext->setContextProperty("Steam", new SteamScriptingInterface(engine, steamClient.get()));
@ -6577,6 +6580,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe
scriptEngine->registerGlobalObject("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());
scriptEngine->registerGlobalObject("Wallet", DependencyManager::get<WalletScriptingInterface>().data());
scriptEngine->registerGlobalObject("AddressManager", DependencyManager::get<AddressManager>().data());
scriptEngine->registerGlobalObject("HifiAbout", AboutUtil::getInstance());
scriptEngine->registerGlobalObject("App", this);

View file

@ -57,6 +57,7 @@
#include "SoundCache.h"
#include "raypick/PointerScriptingInterface.h"
#include <display-plugins/CompositorHelper.h>
#include "AboutUtil.h"
static int MAX_WINDOW_SIZE = 4096;
static const float METERS_TO_INCHES = 39.3701f;
@ -259,6 +260,7 @@ void Web3DOverlay::setupQmlSurface() {
_webSurface->getSurfaceContext()->setContextProperty("Window", DependencyManager::get<WindowScriptingInterface>().data());
_webSurface->getSurfaceContext()->setContextProperty("Reticle", qApp->getApplicationCompositor().getReticleInterface());
_webSurface->getSurfaceContext()->setContextProperty("desktop", DependencyManager::get<OffscreenUi>()->getDesktop());
_webSurface->getSurfaceContext()->setContextProperty("HiFiAbout", AboutUtil::getInstance());
// Override min fps for tablet UI, for silky smooth scrolling
setMaxFPS(90);