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 useDebugChannel = false;
|
||||||
bool useQmlChannel = false;
|
bool useQmlChannel = false;
|
||||||
bool usePerfChannel = false;
|
bool usePerfChannel = false;
|
||||||
|
bool useWorkerChannel = false;
|
||||||
QUrl debugChannel;
|
QUrl debugChannel;
|
||||||
QUrl qmlChannel;
|
QUrl qmlChannel;
|
||||||
QUrl perfChannel;
|
QUrl perfChannel;
|
||||||
|
QUrl workerChannel;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RunControlPrivate : public QObject, public RunControlPrivateData
|
class RunControlPrivate : public QObject, public RunControlPrivateData
|
||||||
@@ -606,6 +608,8 @@ void RunControlPrivate::startPortsGathererIfNeededAndContinueStart()
|
|||||||
qmlChannel = getNextChannel();
|
qmlChannel = getNextChannel();
|
||||||
if (usePerfChannel)
|
if (usePerfChannel)
|
||||||
perfChannel = getNextChannel();
|
perfChannel = getNextChannel();
|
||||||
|
if (useWorkerChannel)
|
||||||
|
workerChannel = getNextChannel();
|
||||||
|
|
||||||
continueStart();
|
continueStart();
|
||||||
} else {
|
} else {
|
||||||
@@ -700,6 +704,17 @@ QUrl RunControl::perfChannel() const
|
|||||||
return d->perfChannel;
|
return d->perfChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RunControl::requestWorkerChannel()
|
||||||
|
{
|
||||||
|
d->enablePortsGatherer();
|
||||||
|
d->useWorkerChannel = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QUrl RunControl::workerChannel() const
|
||||||
|
{
|
||||||
|
return d->workerChannel;
|
||||||
|
}
|
||||||
|
|
||||||
void RunControlPrivate::continueStart()
|
void RunControlPrivate::continueStart()
|
||||||
{
|
{
|
||||||
checkState(RunControlState::Starting);
|
checkState(RunControlState::Starting);
|
||||||
|
@@ -258,6 +258,9 @@ public:
|
|||||||
bool usesPerfChannel() const;
|
bool usesPerfChannel() const;
|
||||||
QUrl perfChannel() const;
|
QUrl perfChannel() const;
|
||||||
|
|
||||||
|
void requestWorkerChannel();
|
||||||
|
QUrl workerChannel() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void appendMessage(const QString &msg, Utils::OutputFormat format);
|
void appendMessage(const QString &msg, Utils::OutputFormat format);
|
||||||
void aboutToStart();
|
void aboutToStart();
|
||||||
|
@@ -205,7 +205,7 @@ public:
|
|||||||
EmrunRunWorker(RunControl *runControl)
|
EmrunRunWorker(RunControl *runControl)
|
||||||
: SimpleTargetRunner(runControl)
|
: SimpleTargetRunner(runControl)
|
||||||
{
|
{
|
||||||
runControl->enablePortsGatherer();
|
runControl->requestWorkerChannel();
|
||||||
|
|
||||||
setStartModifier([this, runControl] {
|
setStartModifier([this, runControl] {
|
||||||
const QString browserId =
|
const QString browserId =
|
||||||
@@ -213,7 +213,7 @@ public:
|
|||||||
setCommandLine(emrunCommand(runControl->target(),
|
setCommandLine(emrunCommand(runControl->target(),
|
||||||
runControl->buildKey(),
|
runControl->buildKey(),
|
||||||
browserId,
|
browserId,
|
||||||
QString::number(runControl->findEndPoint().port())));
|
QString::number(runControl->workerChannel().port())));
|
||||||
setEnvironment(runControl->buildEnvironment());
|
setEnvironment(runControl->buildEnvironment());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user