diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index eab67818c4..8e700839c1 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -171,11 +170,6 @@ void Agent::run() { QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); QNetworkReply *reply = networkAccessManager.get(QNetworkRequest(scriptURL)); - QNetworkDiskCache* cache = new QNetworkDiskCache(); - QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation); - cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "agentCache"); - networkAccessManager.setCache(cache); - qDebug() << "Downloading script at" << scriptURL.toString(); QEventLoop loop; diff --git a/assignment-client/src/AssignmentClient.cpp b/assignment-client/src/AssignmentClient.cpp index 7a5ad26726..709f318d2c 100644 --- a/assignment-client/src/AssignmentClient.cpp +++ b/assignment-client/src/AssignmentClient.cpp @@ -9,10 +9,11 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 791c7e37b6..3686be0f00 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -13,21 +13,22 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include #include #include @@ -1920,10 +1921,8 @@ Headers DomainServer::setupCookieHeadersFromProfileReply(QNetworkReply* profileR _cookieSessionHash.insert(cookieUUID, sessionData); // persist the cookie to settings file so we can get it back on DS relaunch - QSettings localSettings; - localSettings.beginGroup(DS_SETTINGS_SESSIONS_GROUP); - QVariant sessionVariant = QVariant::fromValue(sessionData); - localSettings.setValue(cookieUUID.toString(), QVariant::fromValue(sessionData)); + QStringList path = QStringList() << DS_SETTINGS_SESSIONS_GROUP << cookieUUID.toString(); + SettingHandles::SettingHandle(path).set(QVariant::fromValue(sessionData)); // setup expiry for cookie to 1 month from today QDateTime cookieExpiry = QDateTime::currentDateTimeUtc().addMonths(1); @@ -1943,11 +1942,12 @@ Headers DomainServer::setupCookieHeadersFromProfileReply(QNetworkReply* profileR void DomainServer::loadExistingSessionsFromSettings() { // read data for existing web sessions into memory so existing sessions can be leveraged - QSettings domainServerSettings; + Settings domainServerSettings; domainServerSettings.beginGroup(DS_SETTINGS_SESSIONS_GROUP); foreach(const QString& uuidKey, domainServerSettings.childKeys()) { - _cookieSessionHash.insert(QUuid(uuidKey), domainServerSettings.value(uuidKey).value()); + _cookieSessionHash.insert(QUuid(uuidKey), + domainServerSettings.value(uuidKey).value()); qDebug() << "Pulled web session from settings - cookie UUID is" << uuidKey; } } diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 4537b3eb91..e5a68d9f8e 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -33,13 +33,12 @@ #include #include #include -#include #include #include #include #include -#include #include +#include #include #include #include @@ -73,13 +72,16 @@ #include #include #include +#include #include #include #include #include #include "Application.h" +#include "Audio.h" #include "InterfaceVersion.h" +#include "LODManager.h" #include "Menu.h" #include "ModelUploader.h" #include "Util.h" @@ -100,7 +102,6 @@ #include "gpu/Batch.h" #include "gpu/GLBackend.h" - #include "scripting/AccountScriptingInterface.h" #include "scripting/AudioDeviceScriptingInterface.h" #include "scripting/ClipboardScriptingInterface.h" @@ -112,9 +113,16 @@ #include "scripting/WindowScriptingInterface.h" #include "scripting/WebWindowClass.h" +#if defined(Q_OS_MAC) || defined(Q_OS_WIN) +#include "SpeechRecognizer.h" +#endif + #include "ui/DataWebDialog.h" +#include "ui/DialogsManager.h" #include "ui/InfoView.h" +#include "ui/LoginDialog.h" #include "ui/Snapshot.h" +#include "ui/StandAloneJSConsole.h" #include "ui/Stats.h" @@ -127,9 +135,6 @@ static unsigned STARFIELD_SEED = 1; static const int BANDWIDTH_METER_CLICK_MAX_DRAG_LENGTH = 6; // farther dragged clicks are ignored - -const qint64 MAXIMUM_CACHE_SIZE = 10737418240; // 10GB - static QTimer* idleTimer = NULL; const QString CHECK_VERSION_URL = "https://highfidelity.io/latestVersion.xml"; @@ -137,6 +142,12 @@ const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::D const QString DEFAULT_SCRIPTS_JS_URL = "http://s3.amazonaws.com/hifi-public/scripts/defaultScripts.js"; +namespace SettingHandles { + const SettingHandle firstRun("firstRun", true); + const SettingHandle lastScriptLocation("LastScriptLocation"); + const SettingHandle scriptsLocation("scriptsLocation"); +} + void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { QString logMessage = LogHandler::getInstance().printMessage((LogMsgType) type, context, message); @@ -183,6 +194,12 @@ bool setupEssentials(int& argc, char** argv) { auto ddeFaceTracker = DependencyManager::set(); auto modelBlender = DependencyManager::set(); auto audioToolBox = DependencyManager::set(); + auto lodManager = DependencyManager::set(); + auto jsConsole = DependencyManager::set(); + auto dialogsManager = DependencyManager::set(); +#if defined(Q_OS_MAC) || defined(Q_OS_WIN) + auto speechRecognizer = DependencyManager::set(); +#endif return true; } @@ -276,6 +293,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : auto audioIO = DependencyManager::get