summaryrefslogtreecommitdiff
path: root/src/plugins/winrt/winrtrunnerhelper.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-09-12 12:20:33 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-09-14 05:15:31 +0000
commit29c07f48592eea1b61e09567d65b6add26c7caf0 (patch)
treed7bdbb52fcf371d6155d874ee7fd29f1cccc7f7b /src/plugins/winrt/winrtrunnerhelper.cpp
parent70fdbedbd8a8a4e00ef4e9ad282063115921a752 (diff)
downloadqt-creator-29c07f48592eea1b61e09567d65b6add26c7caf0.tar.gz
winrt: Add possibility to use loopbackExemption from Creator
In order to be able to communicate with loopback addresses, winrtrunner has to be passed loopbackExempt flags. Loopback exemption can only be used while developing/debugging and will not be added to final versions of the applications. Change-Id: Ia5e7ec9b106f86ba1971eac8514e652ccacb40c3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/winrt/winrtrunnerhelper.cpp')
-rw-r--r--src/plugins/winrt/winrtrunnerhelper.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/winrt/winrtrunnerhelper.cpp b/src/plugins/winrt/winrtrunnerhelper.cpp
index 161b4b8be4..1ae33601ef 100644
--- a/src/plugins/winrt/winrtrunnerhelper.cpp
+++ b/src/plugins/winrt/winrtrunnerhelper.cpp
@@ -81,10 +81,23 @@ WinRtRunnerHelper::WinRtRunnerHelper(ProjectExplorer::RunWorker *runWorker, QStr
if (!m_executableFilePath.endsWith(QLatin1String(".exe")))
m_executableFilePath += QStringLiteral(".exe");
+
+ bool loopbackExemptClient = false;
+ bool loopbackExemptServer = false;
if (auto aspect = runConfiguration->extraAspect<ArgumentsAspect>())
m_arguments = aspect->arguments(runConfiguration->macroExpander());
if (auto aspect = runConfiguration->extraAspect<UninstallAfterStopAspect>())
m_uninstallAfterStop = aspect->value();
+ if (auto aspect = runConfiguration->extraAspect<LoopbackExemptClientAspect>())
+ loopbackExemptClient = aspect->value();
+ if (auto aspect = runConfiguration->extraAspect<LoopbackExemptServerAspect>())
+ loopbackExemptServer = aspect->value();
+ if (loopbackExemptClient && loopbackExemptServer)
+ m_loopbackArguments = "--loopbackexempt clientserver";
+ else if (loopbackExemptClient)
+ m_loopbackArguments = "--loopbackexempt client";
+ else if (loopbackExemptServer)
+ m_loopbackArguments = "--loopbackexempt server";
if (ProjectExplorer::BuildConfiguration *bc = target->activeBuildConfiguration())
m_environment = bc->environment();
@@ -194,6 +207,7 @@ void WinRtRunnerHelper::startWinRtRunner(const RunConf &conf)
m_device->type() == Constants::WINRT_DEVICE_TYPE_EMULATOR)
QtcProcess::addArgs(&runnerArgs, QStringLiteral("--profile appxphone"));
+ QtcProcess::addArgs(&runnerArgs, m_loopbackArguments);
QtcProcess::addArg(&runnerArgs, m_executableFilePath);
if (!m_arguments.isEmpty())
QtcProcess::addArgs(&runnerArgs, m_arguments);