From 9b6b59cfc19dc61dd642706a24e1c5d3b6b39609 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 24 May 2016 13:22:00 +0300 Subject: Make Execute operation work without arguments in Windows Since Qt5.5, QProcess start() needs a program to start. When using native arguments the program is empty and QProcess will fail to start. Removed the use of native arguments until QProcess supports setting program through native arguments. Task-number: QTIFW-862 Change-Id: Ia56344e1bf82fbd76e4e8f2ae8b6817e4bb2fce1 Reviewed-by: Kai Koehne --- src/libs/installer/elevatedexecuteoperation.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp index 5de3c0203..cb1a8372c 100644 --- a/src/libs/installer/elevatedexecuteoperation.cpp +++ b/src/libs/installer/elevatedexecuteoperation.cpp @@ -172,16 +172,7 @@ bool ElevatedExecuteOperation::Private::run(const QStringList &arguments) } //readProcessOutput should only called from this current Thread -> Qt::DirectConnection QObject::connect(process, SIGNAL(readyRead()), q, SLOT(readProcessOutput()), Qt::DirectConnection); -#ifdef Q_OS_WIN - if (args.count() == 1) { - process->setNativeArguments(args.front()); - qDebug() << "ElevatedExecuteOperation setNativeArguments to start:" << args.front(); - process->start(QString(), QStringList()); - } else -#endif - { - process->start(args.front(), args.mid(1)); - } + process->start(args.front(), args.mid(1)); qDebug() << args.front() << "started, arguments:" << QStringList(args.mid(1)).join(QLatin1String(" ")); bool success = false; -- cgit v1.2.3