aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2019-01-30 12:29:00 +0100
committerMiguel Costa <miguel.costa@qt.io>2019-01-30 16:56:57 +0000
commit5f6642915d67ed67df8d375e67202e19194513ff (patch)
treee2990105936b07175b871bc013d96b6ea59da96b
parent0f31f8145f92f4b7b8575621c9fde5695c300ce8 (diff)
Fix QML debug not working for .js files
Fixed a bug where JavaScript resources listed in a project QRC were not considered alongside .qml files as sources of code debuggable by the QML debug engine. This meant that it was not possible to set breakpoints or step into code in .js files. Task-number: QTVSADDINBUG-615 Change-Id: I89076838491041223e3039b9cfbd5993bdaaf002 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/qtvstools/QML/Debugging/QmlFileSystem.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/qtvstools/QML/Debugging/QmlFileSystem.cs b/src/qtvstools/QML/Debugging/QmlFileSystem.cs
index 32d46532..9c627b8c 100644
--- a/src/qtvstools/QML/Debugging/QmlFileSystem.cs
+++ b/src/qtvstools/QML/Debugging/QmlFileSystem.cs
@@ -54,6 +54,8 @@ namespace QtVsTools.Qml.Debug
};
}
+ static readonly string[] KNOWN_EXTENSIONS = new string[] { ".qml", ".js" };
+
private FileSystem()
{ }
@@ -107,14 +109,10 @@ namespace QtVsTools.Qml.Debug
Path = ((string)y)
.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)
})
- );
+ .Where(z => KNOWN_EXTENSIONS.Contains(
+ Path.GetExtension(z.Path), StringComparer.InvariantCultureIgnoreCase)));
foreach (var file in files) {
- if (!Path.GetExtension(file.Path)
- .Equals(".qml", StringComparison.InvariantCultureIgnoreCase)) {
- continue;
- }
-
string qrcPath;
if (file.Alias != null)
qrcPath = (string)file.Alias;