mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Merge pull request #1378 from murillodigital/master
Displaying build number in title and using proper cache path
This commit is contained in:
commit
4e618fc307
1 changed files with 5 additions and 1 deletions
|
@ -218,9 +218,11 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
|||
connect(silentNodeTimer, SIGNAL(timeout()), nodeList, SLOT(removeSilentNodes()));
|
||||
silentNodeTimer->start(NODE_SILENCE_THRESHOLD_USECS / 1000);
|
||||
|
||||
QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
|
||||
_networkAccessManager = new QNetworkAccessManager(this);
|
||||
QNetworkDiskCache* cache = new QNetworkDiskCache(_networkAccessManager);
|
||||
cache->setCacheDirectory("interfaceCache");
|
||||
cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache");
|
||||
_networkAccessManager->setCache(cache);
|
||||
|
||||
_window->setCentralWidget(_glWidget);
|
||||
|
@ -4106,12 +4108,14 @@ void Application::attachNewHeadToNode(Node* newNode) {
|
|||
|
||||
void Application::updateWindowTitle(){
|
||||
QString title = "";
|
||||
QString buildVersion = " (build " + QString::number(BUILD_VERSION) + ")";
|
||||
QString username = _profile.getUsername();
|
||||
if(!username.isEmpty()){
|
||||
title += _profile.getUsername();
|
||||
title += " @ ";
|
||||
}
|
||||
title += _profile.getLastDomain();
|
||||
title += buildVersion;
|
||||
|
||||
qDebug("Application title set to: %s.\n", title.toStdString().c_str());
|
||||
_window->setWindowTitle(title);
|
||||
|
|
Loading…
Reference in a new issue