mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into commerce_fixSortingAgain
This commit is contained in:
commit
f117dd33a8
17 changed files with 124 additions and 101 deletions
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// AdvancedPreferencesDialog.qml
|
||||
//
|
||||
// Created by Brad Hefta-Gaub on 20 Jan 2018
|
||||
// Copyright 2018 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "../../dialogs"
|
||||
|
||||
PreferencesDialog {
|
||||
id: root
|
||||
objectName: "AdvancedPreferencesDialog"
|
||||
title: "Advanced Settings"
|
||||
showCategories: ["Advanced UI" ]
|
||||
property var settings: Settings {
|
||||
category: root.objectName
|
||||
property alias x: root.x
|
||||
property alias y: root.y
|
||||
property alias width: root.width
|
||||
property alias height: root.height
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ PreferencesDialog {
|
|||
id: root
|
||||
objectName: "GeneralPreferencesDialog"
|
||||
title: "General Settings"
|
||||
showCategories: ["UI", "Snapshots", "Scripts", "Privacy", "Octree", "HMD", "Game Controller", "Sixense Controllers", "Perception Neuron", "Kinect", "Leap Motion"]
|
||||
showCategories: ["UI", "Snapshots", "Privacy", "HMD", "Game Controller", "Sixense Controllers", "Perception Neuron", "Kinect", "Leap Motion"]
|
||||
property var settings: Settings {
|
||||
category: root.objectName
|
||||
property alias x: root.x
|
||||
|
|
|
@ -41,14 +41,14 @@ QSpinBox, QDoubleSpinBox {
|
|||
|
||||
QDoubleSpinBox::up-arrow,
|
||||
QSpinBox::up-arrow {
|
||||
background-image: url(styles/up.svg);
|
||||
background-image: url(:/styles/up.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
QDoubleSpinBox::down-arrow,
|
||||
QSpinBox::down-arrow {
|
||||
background-image: url(styles/down.svg);
|
||||
background-image: url(:/styles/down.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ QSlider {
|
|||
|
||||
QSlider::groove:horizontal {
|
||||
border: none;
|
||||
background-image: url(styles/slider-bg.svg);
|
||||
background-image: url(:/styles/slider-bg.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ QSlider::groove:horizontal {
|
|||
QSlider::handle:horizontal {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url(styles/slider-handle.svg);
|
||||
background-image: url(:/styles/slider-handle.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ QPushButton#closeButton {
|
|||
border-width: 1px;
|
||||
border-radius: 0;
|
||||
background-color: #fff;
|
||||
background-image: url(styles/close.svg);
|
||||
background-image: url(:/styles/close.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
|
|
@ -63,17 +63,17 @@ QPushButton#cancelButton {
|
|||
}
|
||||
|
||||
#backButton {
|
||||
background-image: url(icons/backButton.svg);
|
||||
background-image: url(:/icons/backButton.svg);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#forwardButton {
|
||||
background-image: url(icons/forwardButton.svg);
|
||||
background-image: url(:/icons/forwardButton.svg);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#toParentButton {
|
||||
background-image: url(icons/toParentButton.svg);
|
||||
background-image: url(:/icons/toParentButton.svg);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ QLineEdit {
|
|||
}
|
||||
|
||||
QPushButton#searchButton {
|
||||
background: url(styles/search.svg);
|
||||
background: url(:/styles/search.svg);
|
||||
background-repeat: none;
|
||||
background-position: left center;
|
||||
background-origin: content;
|
||||
|
@ -55,7 +55,7 @@ QPushButton#searchPrevButton {
|
|||
|
||||
QPushButton#revealLogButton {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
background: url(styles/txt-file.svg);
|
||||
background: url(:/styles/txt-file.svg);
|
||||
background-repeat: none;
|
||||
background-position: left center;
|
||||
background-origin: content;
|
||||
|
@ -86,11 +86,11 @@ QCheckBox {
|
|||
}
|
||||
|
||||
QCheckBox::indicator:unchecked {
|
||||
image: url(styles/unchecked.svg);
|
||||
image: url(:/styles/unchecked.svg);
|
||||
}
|
||||
|
||||
QCheckBox::indicator:checked {
|
||||
image: url(styles/checked.svg);
|
||||
image: url(:/styles/checked.svg);
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
|
@ -110,6 +110,6 @@ QComboBox::drop-down {
|
|||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
image: url(styles/filter.png);
|
||||
image: url(:/styles/filter.png);
|
||||
border-width: 0px;
|
||||
}
|
|
@ -1436,8 +1436,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
userInputMapper->registerDevice(_touchscreenDevice->getInputDevice());
|
||||
}
|
||||
|
||||
// force the model the look at the correct directory (weird order of operations issue)
|
||||
scriptEngines->setScriptsLocation(scriptEngines->getScriptsLocation());
|
||||
// this will force the model the look at the correct directory (weird order of operations issue)
|
||||
scriptEngines->reloadLocalFiles();
|
||||
|
||||
// do this as late as possible so that all required subsystems are initialized
|
||||
// If we've overridden the default scripts location, just load default scripts
|
||||
// otherwise, load 'em all
|
||||
|
@ -2723,7 +2724,7 @@ void Application::showHelp() {
|
|||
queryString.addQueryItem("defaultTab", defaultTab);
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
|
||||
tablet->gotoWebScreen(PathUtils::resourcesPath() + INFO_HELP_PATH + "?" + queryString.toString());
|
||||
tablet->gotoWebScreen(PathUtils::resourcesUrl() + INFO_HELP_PATH + "?" + queryString.toString());
|
||||
DependencyManager::get<HMDScriptingInterface>()->openTablet();
|
||||
//InfoView::show(INFO_HELP_PATH, false, queryString.toString());
|
||||
}
|
||||
|
|
|
@ -756,6 +756,13 @@ Menu::Menu() {
|
|||
// Developer > Stats
|
||||
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats);
|
||||
|
||||
// Developer > Advanced Settings...
|
||||
action = addActionToQMenuAndActionHash(developerMenu, "Advanced Preferences...");
|
||||
connect(action, &QAction::triggered, [] {
|
||||
qApp->showDialog(QString("hifi/dialogs/AdvancedPreferencesDialog.qml"),
|
||||
QString("hifi/tablet/AdvancedPreferencesDialog.qml"), "AdvancedPreferencesDialog");
|
||||
});
|
||||
|
||||
// Developer > API Debugger
|
||||
action = addActionToQMenuAndActionHash(developerMenu, "API Debugger");
|
||||
connect(action, &QAction::triggered, [] {
|
||||
|
|
|
@ -39,7 +39,6 @@ BaseLogDialog::BaseLogDialog(QWidget* parent) : QDialog(parent, Qt::Window) {
|
|||
|
||||
QFile styleSheet(PathUtils::resourcesPath() + "styles/log_dialog.qss");
|
||||
if (styleSheet.open(QIODevice::ReadOnly)) {
|
||||
QDir::setCurrent(PathUtils::resourcesPath());
|
||||
setStyleSheet(styleSheet.readAll());
|
||||
}
|
||||
|
||||
|
|
|
@ -82,19 +82,42 @@ void setupPreferences() {
|
|||
preference->setMax(500);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
{
|
||||
auto getter = []()->float { return qApp->getDesktopTabletScale(); };
|
||||
auto setter = [](float value) { qApp->setDesktopTabletScale(value); };
|
||||
auto preference = new SpinnerPreference(UI_CATEGORY, "Desktop Tablet Scale %", getter, setter);
|
||||
preference->setMin(20);
|
||||
preference->setMax(500);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
auto getter = []()->bool { return qApp->getPreferStylusOverLaser(); };
|
||||
auto setter = [](bool value) { qApp->setPreferStylusOverLaser(value); };
|
||||
preferences->addPreference(new CheckPreference(UI_CATEGORY, "Prefer Stylus Over Laser", getter, setter));
|
||||
}
|
||||
|
||||
static const QString ADVANCED_UI_CATEGORY { "Advanced UI" };
|
||||
{
|
||||
auto getter = []()->float { return qApp->getDesktopTabletScale(); };
|
||||
auto setter = [](float value) { qApp->setDesktopTabletScale(value); };
|
||||
auto preference = new SpinnerPreference(ADVANCED_UI_CATEGORY, "Desktop Tablet Scale %", getter, setter);
|
||||
preference->setMin(20);
|
||||
preference->setMax(500);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
{
|
||||
auto getter = [=]()->float { return myAvatar->getRealWorldFieldOfView(); };
|
||||
auto setter = [=](float value) { myAvatar->setRealWorldFieldOfView(value); };
|
||||
auto preference = new SpinnerPreference(ADVANCED_UI_CATEGORY, "Real world vertical field of view (angular size of monitor)", getter, setter);
|
||||
preference->setMin(1);
|
||||
preference->setMax(180);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
{
|
||||
auto getter = []()->float { return qApp->getFieldOfView(); };
|
||||
auto setter = [](float value) { qApp->setFieldOfView(value); };
|
||||
auto preference = new SpinnerPreference(ADVANCED_UI_CATEGORY, "Vertical field of view", getter, setter);
|
||||
preference->setMin(1);
|
||||
preference->setMax(180);
|
||||
preference->setStep(1);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
|
||||
|
||||
// FIXME: Remove setting completely or make available through JavaScript API?
|
||||
/*
|
||||
{
|
||||
|
@ -128,21 +151,13 @@ void setupPreferences() {
|
|||
preferences->addPreference(preference);
|
||||
}
|
||||
|
||||
// Scripts
|
||||
{
|
||||
auto getter = []()->QString { return DependencyManager::get<ScriptEngines>()->getScriptsLocation(); };
|
||||
auto setter = [](const QString& value) { DependencyManager::get<ScriptEngines>()->setScriptsLocation(value); };
|
||||
preferences->addPreference(new BrowsePreference("Scripts", "Load scripts from this directory", getter, setter));
|
||||
}
|
||||
|
||||
preferences->addPreference(new ButtonPreference("Scripts", "Load Default Scripts", [] {
|
||||
DependencyManager::get<ScriptEngines>()->loadDefaultScripts();
|
||||
}));
|
||||
|
||||
{
|
||||
auto getter = []()->bool { return !Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger); };
|
||||
auto setter = [](bool value) { Menu::getInstance()->setIsOptionChecked(MenuOption::DisableActivityLogger, !value); };
|
||||
preferences->addPreference(new CheckPreference("Privacy", "Send data", getter, setter));
|
||||
preferences->addPreference(new CheckPreference("Privacy", "Send data - High Fidelity uses information provided by your "
|
||||
"client to improve the product through the logging of errors, tracking of usage patterns, "
|
||||
"installation and system details, and crash events. By allowing High Fidelity to collect "
|
||||
"this information you are helping to improve the product. ", getter, setter));
|
||||
}
|
||||
|
||||
static const QString LOD_TUNING("Level of Detail Tuning");
|
||||
|
@ -167,23 +182,6 @@ void setupPreferences() {
|
|||
}
|
||||
|
||||
static const QString AVATAR_TUNING { "Avatar Tuning" };
|
||||
{
|
||||
auto getter = [=]()->float { return myAvatar->getRealWorldFieldOfView(); };
|
||||
auto setter = [=](float value) { myAvatar->setRealWorldFieldOfView(value); };
|
||||
auto preference = new SpinnerPreference(AVATAR_TUNING, "Real world vertical field of view (angular size of monitor)", getter, setter);
|
||||
preference->setMin(1);
|
||||
preference->setMax(180);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
{
|
||||
auto getter = []()->float { return qApp->getFieldOfView(); };
|
||||
auto setter = [](float value) { qApp->setFieldOfView(value); };
|
||||
auto preference = new SpinnerPreference(AVATAR_TUNING, "Vertical field of view", getter, setter);
|
||||
preference->setMin(1);
|
||||
preference->setMax(180);
|
||||
preference->setStep(1);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
{
|
||||
auto getter = [=]()->QString { return myAvatar->getDominantHand(); };
|
||||
auto setter = [=](const QString& value) { myAvatar->setDominantHand(value); };
|
||||
|
@ -297,26 +295,6 @@ void setupPreferences() {
|
|||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
auto getter = []()->float { return qApp->getMaxOctreePacketsPerSecond(); };
|
||||
auto setter = [](float value) { qApp->setMaxOctreePacketsPerSecond(value); };
|
||||
auto preference = new SpinnerPreference("Octree", "Max packets sent each second", getter, setter);
|
||||
preference->setMin(60);
|
||||
preference->setMax(6000);
|
||||
preference->setStep(10);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
auto getter = []()->float { return qApp->getApplicationCompositor().getHmdUIAngularSize(); };
|
||||
auto setter = [](float value) { qApp->getApplicationCompositor().setHmdUIAngularSize(value); };
|
||||
auto preference = new SpinnerPreference("HMD", "UI horizontal angular size (degrees)", getter, setter);
|
||||
preference->setMin(30);
|
||||
preference->setMax(160);
|
||||
preference->setStep(1);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
|
||||
{
|
||||
static const QString RENDER("Graphics");
|
||||
|
@ -342,7 +320,7 @@ void setupPreferences() {
|
|||
}
|
||||
}
|
||||
{
|
||||
static const QString RENDER("Networking");
|
||||
static const QString NETWORKING("Networking");
|
||||
|
||||
auto nodelist = DependencyManager::get<NodeList>();
|
||||
{
|
||||
|
@ -350,10 +328,21 @@ void setupPreferences() {
|
|||
static const int MAX_PORT_NUMBER { 65535 };
|
||||
auto getter = [nodelist] { return static_cast<int>(nodelist->getSocketLocalPort()); };
|
||||
auto setter = [nodelist](int preset) { nodelist->setSocketLocalPort(static_cast<quint16>(preset)); };
|
||||
auto preference = new IntSpinnerPreference(RENDER, "Listening Port", getter, setter);
|
||||
auto preference = new IntSpinnerPreference(NETWORKING, "Listening Port", getter, setter);
|
||||
preference->setMin(MIN_PORT_NUMBER);
|
||||
preference->setMax(MAX_PORT_NUMBER);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
|
||||
{
|
||||
auto getter = []()->float { return qApp->getMaxOctreePacketsPerSecond(); };
|
||||
auto setter = [](float value) { qApp->setMaxOctreePacketsPerSecond(value); };
|
||||
auto preference = new SpinnerPreference(NETWORKING, "Max entities packets sent each second", getter, setter);
|
||||
preference->setMin(60);
|
||||
preference->setMax(6000);
|
||||
preference->setStep(10);
|
||||
preferences->addPreference(preference);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,8 +168,8 @@ bool ContextOverlayInterface::createOrDestroyContextOverlay(const EntityItemID&
|
|||
_contextOverlay->setColorPulse(CONTEXT_OVERLAY_UNHOVERED_COLORPULSE);
|
||||
_contextOverlay->setIgnoreRayIntersection(false);
|
||||
_contextOverlay->setDrawInFront(true);
|
||||
_contextOverlay->setIsFacingAvatar(true);
|
||||
_contextOverlay->setURL(PathUtils::resourcesUrl() + "images/inspect-icon.png");
|
||||
_contextOverlay->setIsFacingAvatar(true);
|
||||
_contextOverlayID = qApp->getOverlays().addOverlay(_contextOverlay);
|
||||
}
|
||||
_contextOverlay->setWorldPosition(contextOverlayPosition);
|
||||
|
|
|
@ -53,8 +53,6 @@ public:
|
|||
|
||||
bool calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction, glm::vec3& result) const;
|
||||
|
||||
float getHmdUIAngularSize() const { return _hmdUIAngularSize; }
|
||||
void setHmdUIAngularSize(float hmdUIAngularSize) { _hmdUIAngularSize = hmdUIAngularSize; }
|
||||
bool isHMD() const;
|
||||
bool fakeEventActive() const { return _fakeMouseEvent; }
|
||||
|
||||
|
@ -139,7 +137,6 @@ private:
|
|||
//quint64 _hoverItemEnterUsecs { 0 };
|
||||
|
||||
bool _isOverDesktop { true };
|
||||
float _hmdUIAngularSize { glm::degrees(VIRTUAL_UI_TARGET_FOV.y) };
|
||||
float _textureFov { VIRTUAL_UI_TARGET_FOV.y };
|
||||
float _textureAspectRatio { VIRTUAL_UI_ASPECT_RATIO };
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ void Engine::load() {
|
|||
auto config = getConfiguration();
|
||||
const QString configFile= "config/render.json";
|
||||
|
||||
QUrl path(PathUtils::resourcesPath() + configFile);
|
||||
QFile file(path.toString());
|
||||
QString path(PathUtils::resourcesPath() + configFile);
|
||||
QFile file(path);
|
||||
if (!file.exists()) {
|
||||
qWarning() << "Engine configuration file" << path << "does not exist";
|
||||
} else if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
|
|
|
@ -62,8 +62,7 @@ void ScriptEngines::onErrorLoadingScript(const QString& url) {
|
|||
}
|
||||
|
||||
ScriptEngines::ScriptEngines(ScriptEngine::Context context)
|
||||
: _context(context),
|
||||
_scriptsLocationHandle("scriptsLocation", DESKTOP_LOCATION)
|
||||
: _context(context)
|
||||
{
|
||||
_scriptsModelFilter.setSourceModel(&_scriptsModel);
|
||||
_scriptsModelFilter.sort(0, Qt::AscendingOrder);
|
||||
|
@ -429,13 +428,8 @@ bool ScriptEngines::stopScript(const QString& rawScriptURL, bool restart) {
|
|||
return stoppedScript;
|
||||
}
|
||||
|
||||
QString ScriptEngines::getScriptsLocation() const {
|
||||
return _scriptsLocationHandle.get();
|
||||
}
|
||||
|
||||
void ScriptEngines::setScriptsLocation(const QString& scriptsLocation) {
|
||||
_scriptsLocationHandle.set(scriptsLocation);
|
||||
_scriptsModel.updateScriptsLocation(scriptsLocation);
|
||||
void ScriptEngines::reloadLocalFiles() {
|
||||
_scriptsModel.reloadLocalFiles();
|
||||
}
|
||||
|
||||
void ScriptEngines::reloadAllScripts() {
|
||||
|
|
|
@ -45,9 +45,9 @@ public:
|
|||
QString getDebugScriptUrl() { return _debugScriptUrl; };
|
||||
void setDebugScriptUrl(const QString& url) { _debugScriptUrl = url; };
|
||||
|
||||
QString getScriptsLocation() const;
|
||||
void loadDefaultScripts();
|
||||
void setScriptsLocation(const QString& scriptsLocation);
|
||||
void reloadLocalFiles();
|
||||
|
||||
QStringList getRunningScripts();
|
||||
ScriptEnginePointer getScriptEngine(const QUrl& scriptHash);
|
||||
|
||||
|
@ -115,7 +115,6 @@ protected:
|
|||
QSet<ScriptEnginePointer> _allKnownScriptEngines;
|
||||
QMutex _allScriptsMutex;
|
||||
std::list<ScriptInitializer> _scriptInitializers;
|
||||
mutable Setting::Handle<QString> _scriptsLocationHandle;
|
||||
ScriptsModel _scriptsModel;
|
||||
ScriptsModelFilter _scriptsModelFilter;
|
||||
std::atomic<bool> _isStopped { false };
|
||||
|
|
|
@ -100,6 +100,7 @@ QVariant ScriptsModel::data(const QModelIndex& index, int role) const {
|
|||
return QVariant();
|
||||
}
|
||||
if (node->getType() == TREE_NODE_TYPE_SCRIPT) {
|
||||
|
||||
TreeNodeScript* script = static_cast<TreeNodeScript*>(node);
|
||||
if (role == Qt::DisplayRole) {
|
||||
return QVariant(script->getName() + (script->getOrigin() == SCRIPT_ORIGIN_LOCAL ? " (local)" : ""));
|
||||
|
@ -133,7 +134,6 @@ void ScriptsModel::updateScriptsLocation(const QString& newPath) {
|
|||
_fsWatcher.addPath(_localDirectory.absolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
reloadLocalFiles();
|
||||
}
|
||||
|
||||
|
@ -305,6 +305,7 @@ void ScriptsModel::rebuildTree() {
|
|||
_treeNodes.removeAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
QHash<QString, TreeNodeFolder*> folders;
|
||||
for (int i = 0; i < _treeNodes.size(); i++) {
|
||||
TreeNodeBase* node = _treeNodes.at(i);
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <mach-o/dyld.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "shared/GlobalAppProperties.h"
|
||||
#include "SharedUtil.h"
|
||||
|
||||
|
@ -41,8 +40,15 @@ QString TEMP_DIR_FORMAT { "%1-%2-%3" };
|
|||
#if defined(Q_OS_OSX)
|
||||
static bool USE_SOURCE_TREE_RESOURCES = true;
|
||||
#else
|
||||
static const QString USE_SOURCE_TREE_RESOURCES_FLAG("HIFI_USE_SOURCE_TREE_RESOURCES");
|
||||
static bool USE_SOURCE_TREE_RESOURCES = QProcessEnvironment::systemEnvironment().contains(USE_SOURCE_TREE_RESOURCES_FLAG);
|
||||
static bool USE_SOURCE_TREE_RESOURCES() {
|
||||
static bool result = false;
|
||||
static std::once_flag once;
|
||||
std::call_once(once, [&] {
|
||||
const QString USE_SOURCE_TREE_RESOURCES_FLAG("HIFI_USE_SOURCE_TREE_RESOURCES");
|
||||
result = QProcessEnvironment::systemEnvironment().contains(USE_SOURCE_TREE_RESOURCES_FLAG);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -77,7 +83,7 @@ const QString& PathUtils::resourcesPath() {
|
|||
#endif
|
||||
|
||||
#if !defined(Q_OS_ANDROID) && defined(DEV_BUILD)
|
||||
if (USE_SOURCE_TREE_RESOURCES) {
|
||||
if (USE_SOURCE_TREE_RESOURCES()) {
|
||||
// For dev builds, optionally load content from the Git source tree
|
||||
staticResourcePath = projectRootPath() + "/interface/resources/";
|
||||
}
|
||||
|
@ -100,7 +106,7 @@ const QString& PathUtils::resourcesUrl() {
|
|||
#endif
|
||||
|
||||
#if !defined(Q_OS_ANDROID) && defined(DEV_BUILD)
|
||||
if (USE_SOURCE_TREE_RESOURCES) {
|
||||
if (USE_SOURCE_TREE_RESOURCES()) {
|
||||
// For dev builds, optionally load content from the Git source tree
|
||||
staticResourcePath = QUrl::fromLocalFile(projectRootPath() + "/interface/resources/").toString();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
set(TARGET_NAME gl-test)
|
||||
# This is not a testcase -- just set it up as a regular hifi project
|
||||
setup_hifi_project(Quick Gui OpenGL)
|
||||
setup_memory_debugger()
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
|
||||
link_hifi_libraries(shared gl)
|
||||
package_libraries_for_deployment()
|
||||
|
|
Loading…
Reference in a new issue