forked from qt-creator/qt-creator
WebAssembly: Fix launching of target.html with qmake-based projects
A recent fix for launching CMake-based projects (where target name
differs from project name) broke launching of any qmake-based project.
The reason for the failure is that the code uses to the buildKey in
order to determine the html file name. CMakeProjectManager holds a
buildKey that corresponts to the target name (which is the right base
name for the html file), but qmake holds the project file path as
buildKey.
This change causes the targetFilePath to be used to determine the html
filee name. It works with CMake and qmake.
Amends: b1db3d2506
Fixes: QTCREATORBUG-26849
Change-Id: Ifaa8a279317d7fdb54ceea8198a374a317d9c2d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -63,7 +63,8 @@ static CommandLine emrunCommand(const RunConfiguration *rc, const QString &brows
|
||||
const Environment env = bc->environment();
|
||||
const FilePath emrun = env.searchInPath("emrun");
|
||||
const FilePath emrunPy = emrun.absolutePath().pathAppended(emrun.baseName() + ".py");
|
||||
const FilePath html = bc->buildDirectory() / rc->buildKey() + ".html";
|
||||
const FilePath target = rc->buildTargetInfo().targetFilePath;
|
||||
const FilePath html = target.absolutePath() / target.baseName() + ".html";
|
||||
|
||||
return CommandLine(pythonInterpreter(env), {
|
||||
emrunPy.path(),
|
||||
|
||||
Reference in New Issue
Block a user