From eaafc489fc625d71e4ce797cebb28056746896bc Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Thu, 9 Jul 2015 18:58:34 +0100 Subject: Reworking the Custom Executables list and the shortcut popup. Certainly fixes the issue where the 'toolbar' entry doesn't lose the cross. One of the 'find' methods ignored case but none of the others did, so I've made it not ignore case either. Also made the code to get the desktop/startmenu paths use a more up-to-date API --- src/main.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 295fb75a..973ae2a1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -248,11 +248,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 +409,6 @@ int main(int argc, char *argv[]) ::SetEnvironmentVariableW(L"PATH", newPath.c_str()); } - registerMetaTypes(); - QStringList arguments = application.arguments(); bool forcePrimary = false; -- cgit v1.3.1 From 3a39f9087099741dd6d2a5c811671e61dcd7174b Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Fri, 17 Jul 2015 22:12:46 +0100 Subject: small patch to show which obsolete files are being removed --- src/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 973ae2a1..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)); + } } } } -- cgit v1.3.1