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