mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 16:19:27 +02:00
PR Changes
This commit is contained in:
parent
ff6a9b2052
commit
99275dadd4
2 changed files with 14 additions and 17 deletions
|
@ -4421,28 +4421,26 @@ void Application::parseVersionXml(QNetworkReply *reply) {
|
|||
}
|
||||
}
|
||||
|
||||
QFile *Application::loadSkipFile() {
|
||||
bool Application::shouldSkipVersion(QString latestVersion) {
|
||||
QString fileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
fileName.append(QString("/hifi.skipversion"));
|
||||
QFile *file = new QFile(fileName);
|
||||
file->open(QIODevice::ReadWrite);
|
||||
return file;
|
||||
}
|
||||
|
||||
bool Application::shouldSkipVersion(QString latestVersion) {
|
||||
QFile *skipFile = loadSkipFile();
|
||||
QByteArray skipFileContents = skipFile->readAll();
|
||||
QString *skipVersion = new QString(skipFileContents);
|
||||
skipFile->close();
|
||||
if (*skipVersion == latestVersion || applicationVersion() == "dev") {
|
||||
QFile skipFile(fileName);
|
||||
skipFile.open(QIODevice::ReadWrite);
|
||||
QByteArray skipFileContents = skipFile.readAll();
|
||||
QString skipVersion(skipFileContents);
|
||||
skipFile.close();
|
||||
if (skipVersion == latestVersion /*|| applicationVersion() == "dev"*/) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Application::skipVersion(QString latestVersion) {
|
||||
QFile *skipFile = loadSkipFile();
|
||||
skipFile->seek(0);
|
||||
skipFile->write(latestVersion.toStdString().c_str());
|
||||
skipFile->close();
|
||||
QString fileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
fileName.append(QString("/hifi.skipversion"));
|
||||
QFile skipFile(fileName);
|
||||
skipFile.open(QIODevice::WriteOnly|QIODevice::Truncate);
|
||||
skipFile.seek(0);
|
||||
skipFile.write(latestVersion.toStdString().c_str());
|
||||
skipFile.close();
|
||||
}
|
||||
|
|
|
@ -499,7 +499,6 @@ private:
|
|||
QString getLocalVoxelCacheFileName();
|
||||
void updateLocalOctreeCache(bool firstTime = false);
|
||||
|
||||
QFile* loadSkipFile();
|
||||
void checkVersion();
|
||||
void displayUpdateDialog();
|
||||
bool shouldSkipVersion(QString latestVersion);
|
||||
|
|
Loading…
Reference in a new issue