Fix windows build issues
- Add dummy args param to QProcess::startDetached - Remove logging category from inline snippet. This was removed due to being unused in non-windows builds.
This commit is contained in:
parent
ac3d439a2a
commit
f3998e4b5f
4 changed files with 6 additions and 5 deletions
|
@ -173,7 +173,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// make sure indicator shows up in the tray whenever daemon is spawned
|
// make sure indicator shows up in the tray whenever daemon is spawned
|
||||||
QProcess::startDetached(QStringLiteral("kdeconnect-indicator.exe"));
|
QProcess::startDetached(QStringLiteral("kdeconnect-indicator.exe"), QStringList());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// kdeconnectd is autostarted, so disable session management to speed up startup
|
// kdeconnectd is autostarted, so disable session management to speed up startup
|
||||||
|
|
|
@ -60,7 +60,7 @@ void IndicatorHelper::iconPathHook()
|
||||||
|
|
||||||
int IndicatorHelper::daemonHook(QProcess &kdeconnectd)
|
int IndicatorHelper::daemonHook(QProcess &kdeconnectd)
|
||||||
{
|
{
|
||||||
kdeconnectd.start(processes::kdeconnect_daemon);
|
kdeconnectd.start(processes::kdeconnect_daemon, QStringList());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <core/kdeconnectplugin.h>
|
#include <core/kdeconnectplugin.h>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
#include <QDebug>
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#define INFO_BUFFER_SIZE 32767
|
#define INFO_BUFFER_SIZE 32767
|
||||||
#else
|
#else
|
||||||
|
@ -42,7 +43,7 @@ inline QString defaultSound()
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
wchar_t infoBuf[INFO_BUFFER_SIZE];
|
wchar_t infoBuf[INFO_BUFFER_SIZE];
|
||||||
if (!GetWindowsDirectory(infoBuf, INFO_BUFFER_SIZE)) {
|
if (!GetWindowsDirectory(infoBuf, INFO_BUFFER_SIZE)) {
|
||||||
qCWarning(KDECONNECT_PLUGIN_FINDTHISDEVICE) << "Error with getting the Windows Directory.";
|
qWarning() << "Error with getting the Windows Directory.";
|
||||||
} else {
|
} else {
|
||||||
dirPath = QString::fromStdWString(infoBuf) + QStringLiteral("/media");
|
dirPath = QString::fromStdWString(infoBuf) + QStringLiteral("/media");
|
||||||
if (!dirPath.isEmpty()) {
|
if (!dirPath.isEmpty()) {
|
||||||
|
|
|
@ -55,9 +55,9 @@ bool RunCommandPlugin::receivePacket(const NetworkPacket &np)
|
||||||
const QJsonObject commandJson = value.toObject();
|
const QJsonObject commandJson = value.toObject();
|
||||||
qCInfo(KDECONNECT_PLUGIN_RUNCOMMAND) << "Running:" << COMMAND << ARGS << commandJson[QStringLiteral("command")].toString();
|
qCInfo(KDECONNECT_PLUGIN_RUNCOMMAND) << "Running:" << COMMAND << ARGS << commandJson[QStringLiteral("command")].toString();
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QProcess::startDetached(commandJson[QStringLiteral("command")].toString());
|
QProcess::startDetached(commandJson[QStringLiteral("command")].toString(), QStringList());
|
||||||
#else
|
#else
|
||||||
QProcess::startDetached(QStringLiteral(COMMAND), QStringList() << QStringLiteral(ARGS) << commandJson[QStringLiteral("command")].toString());
|
QProcess::startDetached(QStringLiteral(COMMAND), QStringList{QStringLiteral(ARGS), commandJson[QStringLiteral("command")].toString()});
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
} else if (np.has(QStringLiteral("setup"))) {
|
} else if (np.has(QStringLiteral("setup"))) {
|
||||||
|
|
Loading…
Reference in a new issue