diff options
Diffstat (limited to 'src/libs/installer')
-rw-r--r-- | src/libs/installer/environmentvariablesoperation.cpp | 6 | ||||
-rw-r--r-- | src/libs/installer/fsengineserver.cpp | 3 | ||||
-rw-r--r-- | src/libs/installer/installer.pro | 5 | ||||
-rw-r--r-- | src/libs/installer/link.cpp | 4 |
4 files changed, 5 insertions, 13 deletions
diff --git a/src/libs/installer/environmentvariablesoperation.cpp b/src/libs/installer/environmentvariablesoperation.cpp index 98915b5c6..68693d455 100644 --- a/src/libs/installer/environmentvariablesoperation.cpp +++ b/src/libs/installer/environmentvariablesoperation.cpp @@ -62,15 +62,9 @@ static bool broadcastChange() { // Use SendMessageTimeout to Broadcast a message to the whole system to update settings of all // running applications. This is needed to activate the changes done above without logout+login. // Note that cmd.exe does not respond to any WM_SETTINGCHANGE messages... -#ifdef __MINGW64__ - PDWORD_PTR aResult = 0; - LRESULT sendresult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, - 0, (LPARAM) "Environment", SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, aResult); -#else DWORD aResult = 0; LRESULT sendresult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, &aResult); -#endif if (sendresult == 0 || aResult != 0) { qWarning("Failed to broadcast a WM_SETTINGCHANGE message\n"); return false; diff --git a/src/libs/installer/fsengineserver.cpp b/src/libs/installer/fsengineserver.cpp index 9bcc4a920..2b2556c3d 100644 --- a/src/libs/installer/fsengineserver.cpp +++ b/src/libs/installer/fsengineserver.cpp @@ -60,8 +60,7 @@ bool startDetached(const QString &program, const QStringList &args, const QStrin }; const QString arguments = QInstaller::createCommandline(program, args); - // PQR for MinGW-w64: Parameter #2 was const_cast<wchar_t *>(static_cast<const wchar_t *>(arguments.utf16())). - const bool success = CreateProcess(0, (LPWSTR)arguments.utf16(), + const bool success = CreateProcess(0, const_cast<wchar_t *>(static_cast<const wchar_t *>(arguments.utf16())), 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0, (wchar_t*)workingDirectory.utf16(), &startupInfo, &pinfo); diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro index 5a74e5772..f21394ae2 100644 --- a/src/libs/installer/installer.pro +++ b/src/libs/installer/installer.pro @@ -178,9 +178,8 @@ unix:!macx:SOURCES += adminauthorization_x11.cpp win32 { SOURCES += adminauthorization_win.cpp - LIBS += -loleaut32 -lUser32 # 7zip - LIBS += -ladvapi32 -lpsapi # kdtools - PQR for MinGW-w64: Changed to standard link flags. - LIBS += -lmpr -luuid # PQR for MinGW-w64: libMPR is for WNetGetUniversalName, libUUID is for IID_IUnknown and friends. + LIBS += -loleaut32 -lUser32 # 7zip + LIBS += advapi32.lib psapi.lib # kdtools LIBS += -lole32 # createshortcutoperation CONFIG(shared, static|shared):LIBS += -lshell32 } diff --git a/src/libs/installer/link.cpp b/src/libs/installer/link.cpp index 08214232f..31f6270f4 100644 --- a/src/libs/installer/link.cpp +++ b/src/libs/installer/link.cpp @@ -81,7 +81,7 @@ public: : m_dirHandle(INVALID_HANDLE_VALUE) { QString normalizedPath = QString(path).replace(QLatin1Char('/'), QLatin1Char('\\')); - m_dirHandle = CreateFile(normalizedPath.toStdWString().c_str(), GENERIC_READ | GENERIC_WRITE, 0, 0, + m_dirHandle = CreateFile(normalizedPath.utf16(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, 0); if (m_dirHandle == INVALID_HANDLE_VALUE) { @@ -149,7 +149,7 @@ Link createJunction(const QString &linkPath, const QString &targetPath) QString normalizedTargetPath = QString(targetPath).replace(QLatin1Char('/'), QLatin1Char('\\')); //now we add the real absolute path - StringCchCat(szDestDir, 1024, normalizedTargetPath.toStdWString().c_str()); + StringCchCat(szDestDir, 1024, normalizedTargetPath.utf16()); // Allocates a block of memory for an array of num elements(1) and initializes all its bits to zero. _REPARSE_DATA_BUFFER* reparseStructData = (_REPARSE_DATA_BUFFER*)calloc(1, |