aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/UpdateSQLiteStudio/main.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:54:15 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:54:15 -0400
commit6d3d39356473078c6b47e03b8a7616e4b34de928 (patch)
treefe5be2e6a08e4cfc73207746aba4c9fccfecfa10 /SQLiteStudio3/UpdateSQLiteStudio/main.cpp
parentf98e49169a40876bcf1df832de6e908d1b350193 (diff)
parentfeda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (diff)
Update upstream source from tag 'upstream/3.2.1+dfsg1'
Update to upstream version '3.2.1+dfsg1' with Debian dir 5ea0333565de4dc898c062cc0ff4ba1153e2c1e4
Diffstat (limited to 'SQLiteStudio3/UpdateSQLiteStudio/main.cpp')
-rw-r--r--SQLiteStudio3/UpdateSQLiteStudio/main.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/SQLiteStudio3/UpdateSQLiteStudio/main.cpp b/SQLiteStudio3/UpdateSQLiteStudio/main.cpp
deleted file mode 100644
index e5730d3..0000000
--- a/SQLiteStudio3/UpdateSQLiteStudio/main.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "services/updatemanager.h"
-#include <QCoreApplication>
-#include <QStringList>
-#include <QDebug>
-#include <QTimer>
-#include <QDir>
-#include <QTextStream>
-
-int main(int argc, char *argv[])
-{
- QCoreApplication app(argc, argv);
-
- QString path = app.applicationDirPath() + QLatin1Char('/') + UpdateManager::WIN_INSTALL_FILE;
- QFile installFile(path);
- if (QFileInfo(path).isReadable())
- {
- installFile.open(QIODevice::ReadOnly);
- QTextStream inStr(&installFile);
- QString option = inStr.readLine();
- QString backupDir = inStr.readLine();
- QString appDir = inStr.readLine();
- installFile.close();
- installFile.remove();
-
- QString tempDir = app.applicationDirPath();
- if (option == UpdateManager::UPDATE_OPTION_NAME)
- {
- bool res = UpdateManager::executeFinalStep(tempDir, backupDir, appDir);
- if (res)
- {
- QFile doneFile(appDir + QLatin1Char('/') + UpdateManager::WIN_UPDATE_DONE_FILE);
- doneFile.open(QIODevice::WriteOnly);
- doneFile.close();
- }
- else
- qCritical() << QString("Could not execute final step with root priviledges: %1").arg(UpdateManager::getStaticErrorMessage());
- }
- else
- {
- qCritical() << QString("Option passed to updater not matched: '%1' != '%2'").arg(option, UpdateManager::UPDATE_OPTION_NAME);
- }
- }
- else
- {
- qCritical() << QString("Updater installation file (%1) was not readable.").arg(path);
- }
-
- return 0;
-}