Permit the use of the QML debugger on non JS/QML files

Change-Id: I1574f553c937bd4759b20ca5f0d22582087800cb
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Jean Gressmann
2015-09-23 13:14:30 +02:00
committed by hjk
parent 08b62bcfd9
commit 378cd56d75
2 changed files with 17 additions and 7 deletions

View File

@@ -240,9 +240,17 @@ bool BreakpointParameters::isCppBreakpoint() const
return false;
// Qml is currently only file.
if (type == BreakpointByFileAndLine)
return !fileName.endsWith(QLatin1String(".qml"), Qt::CaseInsensitive)
&& !fileName.endsWith(QLatin1String(".js"), Qt::CaseInsensitive);
if (type == BreakpointByFileAndLine) {
auto qmlExtensionString = QString::fromLocal8Bit(qgetenv("QTC_QMLDEBUGGER_FILEEXTENSIONS"));
if (qmlExtensionString.isEmpty())
qmlExtensionString = QLatin1Literal(".qml;.js");
auto qmlFileExtensions = qmlExtensionString.split(QLatin1Literal(";"), QString::SkipEmptyParts);
foreach (QString extension, qmlFileExtensions) {
if (fileName.endsWith(extension, Qt::CaseInsensitive))
return false;
}
}
return true;
}