Showing the changes to interface/src/Application.cpp (1 of 18 files). Show all
Unified · Split
| @@ -49,6 +49,7 @@ · 48 unmodified lines | ||
| 49 | 49 | |
| 50 | 50 | #include "Application.h" |
| 51 | 51 | #include "DataServerClient.h" |
| 52 | +#include "InterfaceVersion.h" | |
| 52 | 53 | #include "LogDisplay.h" |
| 53 | 54 | #include "Menu.h" |
| 54 | 55 | #include "Swatch.h" |
| @@ -144,6 +145,8 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 89 unmodified lines | ||
| 144 | 145 | _applicationStartupTime = startup_time; |
| 145 | 146 | _window->setWindowTitle("Interface"); |
| 146 | 147 | |
| 148 | + qDebug( "[VERSION] Build sequence: %i", BUILD_VERSION); | |
| 149 | + | |
| 147 | 150 | qInstallMessageHandler(messageHandler); |
| 148 | 151 | |
| 149 | 152 | unsigned int listenPort = 0; // bind to an ephemeral port by default |
| @@ -215,9 +218,11 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 65 unmodified lines | ||
| 215 | 218 | connect(silentNodeTimer, SIGNAL(timeout()), nodeList, SLOT(removeSilentNodes())); |
| 216 | 219 | silentNodeTimer->start(NODE_SILENCE_THRESHOLD_USECS / 1000); |
| 217 | 220 | |
| 221 | + QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation); | |
| 222 | + | |
| 218 | 223 | _networkAccessManager = new QNetworkAccessManager(this); |
| 219 | 224 | QNetworkDiskCache* cache = new QNetworkDiskCache(_networkAccessManager); |
| 220 | − cache->setCacheDirectory("interfaceCache"); | |
| 225 | + cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache"); | |
| 221 | 226 | _networkAccessManager->setCache(cache); |
| 222 | 227 | |
| 223 | 228 | _window->setCentralWidget(_glWidget); |
| @@ -240,6 +245,9 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 16 unmodified lines | ||
| 240 | 245 | // probably not the right long term solution. But for now, we're going to do this to |
| 241 | 246 | // allow you to move a particle around in your hand |
| 242 | 247 | _particleEditSender.setPacketsPerSecond(3000); // super high!! |
| 248 | + | |
| 249 | + // Set the sixense filtering | |
| 250 | + _sixenseManager.setFilter(Menu::getInstance()->isOptionChecked(MenuOption::FilterSixense)); | |
| 243 | 251 | } |
| 244 | 252 | |
| 245 | 253 | Application::~Application() { |
| @@ -4119,12 +4127,14 @@ void Application::attachNewHeadToNode(Node* newNode) { · 3873 unmodified lines | ||
| 4119 | 4127 | |
| 4120 | 4128 | void Application::updateWindowTitle(){ |
| 4121 | 4129 | QString title = ""; |
| 4130 | + QString buildVersion = " (build " + QString::number(BUILD_VERSION) + ")"; | |
| 4122 | 4131 | QString username = _profile.getUsername(); |
| 4123 | 4132 | if(!username.isEmpty()){ |
| 4124 | 4133 | title += _profile.getUsername(); |
| 4125 | 4134 | title += " @ "; |
| 4126 | 4135 | } |
| 4127 | 4136 | title += _profile.getLastDomain(); |
| 4137 | + title += buildVersion; | |
| 4128 | 4138 | |
| 4129 | 4139 | qDebug("Application title set to: %s.\n", title.toStdString().c_str()); |
| 4130 | 4140 | _window->setWindowTitle(title); |