diff options
| author | Tannin <devnull@localhost> | 2015-08-02 14:58:17 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-08-02 14:58:17 +0200 |
| commit | 9c17ecc87ee6e1af87b6ee7e1b970d15dd19fbe3 (patch) | |
| tree | 79801002b67a6cc47af2200ef4ca7a319bfc34f6 /src/main.cpp | |
| parent | 051589c38e4b40749e9f0f38d750f2de0c9954b4 (diff) | |
| parent | 48fae44566356eebbe222c7cc9592b8f2a1b3c8d (diff) | |
Merge
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/main.cpp b/src/main.cpp index 295fb75a..ae3bbb4c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -170,13 +170,14 @@ void cleanupDir() "proxy.dll"
};
- qDebug("removing obsolete files");
-
for (const QString &fileName : fileNames) {
QString fullPath = qApp->applicationDirPath() + "/" + fileName;
- if (QFile::exists(fullPath)
- && !shellDelete(QStringList(fullPath), true)) {
- qDebug("failed to remove obsolete %s", qPrintable(fullPath));
+ if (QFile::exists(fullPath)) {
+ if (shellDelete(QStringList(fullPath), true)) {
+ qDebug("removed obsolete file %s", qPrintable(fullPath));
+ } else {
+ qDebug("failed to remove obsolete %s", qPrintable(fullPath));
+ }
}
}
}
@@ -248,11 +249,6 @@ static LONG WINAPI MyUnhandledExceptionFilter(struct _EXCEPTION_POINTERS *except return result;
}
-static void registerMetaTypes()
-{
- registerExecutable();
-}
-
static bool HaveWriteAccess(const std::wstring &path)
{
bool writable = false;
@@ -414,8 +410,6 @@ int main(int argc, char *argv[]) ::SetEnvironmentVariableW(L"PATH", newPath.c_str());
}
- registerMetaTypes();
-
QStringList arguments = application.arguments();
bool forcePrimary = false;
|
