Changeset View
Changeset View
Standalone View
Standalone View
src/kdeinit/ktoolinvocation_win.cpp
Show All 27 Lines | |||||
28 | #include <QProcess> | 28 | #include <QProcess> | ||
29 | #include <QCoreApplication> | 29 | #include <QCoreApplication> | ||
30 | #include <QHash> | 30 | #include <QHash> | ||
31 | #include <QDBusConnection> | 31 | #include <QDBusConnection> | ||
32 | 32 | | |||
33 | #include "windows.h" | 33 | #include "windows.h" | ||
34 | #include "shellapi.h" | 34 | #include "shellapi.h" | ||
35 | 35 | | |||
36 | #if KSERVICE_BUILD_DEPRECATED_SINCE(5, 0) | ||||
36 | void KToolInvocation::invokeBrowser(const QString &url, const QByteArray &startup_id) | 37 | void KToolInvocation::invokeBrowser(const QString &url, const QByteArray &startup_id) | ||
37 | { | 38 | { | ||
38 | #ifndef _WIN32_WCE | 39 | #ifndef _WIN32_WCE | ||
39 | QString sOpen = QString::fromLatin1("open"); | 40 | QString sOpen = QString::fromLatin1("open"); | ||
40 | ShellExecuteW(0, (LPCWSTR)sOpen.utf16(), (LPCWSTR)url.utf16(), 0, 0, SW_NORMAL); | 41 | ShellExecuteW(0, (LPCWSTR)sOpen.utf16(), (LPCWSTR)url.utf16(), 0, 0, SW_NORMAL); | ||
41 | #else | 42 | #else | ||
42 | SHELLEXECUTEINFO cShellExecuteInfo = {0}; | 43 | SHELLEXECUTEINFO cShellExecuteInfo = {0}; | ||
43 | cShellExecuteInfo.cbSize = sizeof(SHELLEXECUTEINFO); | 44 | cShellExecuteInfo.cbSize = sizeof(SHELLEXECUTEINFO); | ||
44 | cShellExecuteInfo.fMask = SEE_MASK_NOCLOSEPROCESS; | 45 | cShellExecuteInfo.fMask = SEE_MASK_NOCLOSEPROCESS; | ||
45 | cShellExecuteInfo.hwnd = NULL; | 46 | cShellExecuteInfo.hwnd = NULL; | ||
46 | cShellExecuteInfo.lpVerb = L"Open"; | 47 | cShellExecuteInfo.lpVerb = L"Open"; | ||
47 | cShellExecuteInfo.lpFile = (LPCWSTR)url.utf16(); | 48 | cShellExecuteInfo.lpFile = (LPCWSTR)url.utf16(); | ||
48 | cShellExecuteInfo.nShow = SW_SHOWNORMAL; | 49 | cShellExecuteInfo.nShow = SW_SHOWNORMAL; | ||
49 | ShellExecuteEx(&cShellExecuteInfo); | 50 | ShellExecuteEx(&cShellExecuteInfo); | ||
50 | #endif | 51 | #endif | ||
51 | } | 52 | } | ||
53 | #endif | ||||
52 | 54 | | |||
53 | void KToolInvocation::invokeMailer(const QString &_to, const QString &_cc, const QString &_bcc, | 55 | void KToolInvocation::invokeMailer(const QString &_to, const QString &_cc, const QString &_bcc, | ||
54 | const QString &subject, const QString &body, | 56 | const QString &subject, const QString &body, | ||
55 | const QString & /*messageFile TODO*/, const QStringList &attachURLs, | 57 | const QString & /*messageFile TODO*/, const QStringList &attachURLs, | ||
56 | const QByteArray &startup_id) | 58 | const QByteArray &startup_id) | ||
57 | { | 59 | { | ||
58 | QUrl url(QLatin1String("mailto:") + _to); | 60 | QUrl url(QLatin1String("mailto:") + _to); | ||
59 | QUrlQuery query; | 61 | QUrlQuery query; | ||
Show All 28 Lines |