forked from qt-creator/qt-creator
WebAssembly: Use newer approach for channel setup
Change-Id: I3f7cfbbbe0734c651ad33fcb88850b9445be1df5 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -298,9 +298,11 @@ public:
|
||||
bool useDebugChannel = false;
|
||||
bool useQmlChannel = false;
|
||||
bool usePerfChannel = false;
|
||||
bool useWorkerChannel = false;
|
||||
QUrl debugChannel;
|
||||
QUrl qmlChannel;
|
||||
QUrl perfChannel;
|
||||
QUrl workerChannel;
|
||||
};
|
||||
|
||||
class RunControlPrivate : public QObject, public RunControlPrivateData
|
||||
@@ -606,6 +608,8 @@ void RunControlPrivate::startPortsGathererIfNeededAndContinueStart()
|
||||
qmlChannel = getNextChannel();
|
||||
if (usePerfChannel)
|
||||
perfChannel = getNextChannel();
|
||||
if (useWorkerChannel)
|
||||
workerChannel = getNextChannel();
|
||||
|
||||
continueStart();
|
||||
} else {
|
||||
@@ -700,6 +704,17 @@ QUrl RunControl::perfChannel() const
|
||||
return d->perfChannel;
|
||||
}
|
||||
|
||||
void RunControl::requestWorkerChannel()
|
||||
{
|
||||
d->enablePortsGatherer();
|
||||
d->useWorkerChannel = true;
|
||||
}
|
||||
|
||||
QUrl RunControl::workerChannel() const
|
||||
{
|
||||
return d->workerChannel;
|
||||
}
|
||||
|
||||
void RunControlPrivate::continueStart()
|
||||
{
|
||||
checkState(RunControlState::Starting);
|
||||
|
@@ -258,6 +258,9 @@ public:
|
||||
bool usesPerfChannel() const;
|
||||
QUrl perfChannel() const;
|
||||
|
||||
void requestWorkerChannel();
|
||||
QUrl workerChannel() const;
|
||||
|
||||
signals:
|
||||
void appendMessage(const QString &msg, Utils::OutputFormat format);
|
||||
void aboutToStart();
|
||||
|
@@ -205,7 +205,7 @@ public:
|
||||
EmrunRunWorker(RunControl *runControl)
|
||||
: SimpleTargetRunner(runControl)
|
||||
{
|
||||
runControl->enablePortsGatherer();
|
||||
runControl->requestWorkerChannel();
|
||||
|
||||
setStartModifier([this, runControl] {
|
||||
const QString browserId =
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
setCommandLine(emrunCommand(runControl->target(),
|
||||
runControl->buildKey(),
|
||||
browserId,
|
||||
QString::number(runControl->findEndPoint().port())));
|
||||
QString::number(runControl->workerChannel().port())));
|
||||
setEnvironment(runControl->buildEnvironment());
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user