forked from qt-creator/qt-creator
QmlProfiler: remove "Source code not available."
This string crops up in far too many places where it's not supposed to be. If we really need it we should add it to the views in the exact places where we want it instead of writing it into the model. Change-Id: I5f17a2aead7f6c2d42f485bf629baaf759e90547 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -85,13 +85,12 @@ QString getInitialDetails(const QmlProfilerDataModel::QmlEventTypeData &event)
|
||||
{
|
||||
QString details;
|
||||
// generate details string
|
||||
if (event.data.isEmpty())
|
||||
details = QmlProfilerDataModel::tr("Source code not available.");
|
||||
else {
|
||||
if (!event.data.isEmpty()) {
|
||||
details = event.data;
|
||||
details.replace(QLatin1Char('\n'),QLatin1Char(' ')).simplified();
|
||||
if (details.isEmpty()) {
|
||||
details = QmlProfilerDataModel::tr("anonymous function");
|
||||
if (event.rangeType == QmlDebug::Javascript)
|
||||
details = QmlProfilerDataModel::tr("anonymous function");
|
||||
} else {
|
||||
QRegExp rewrite(QLatin1String("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
|
||||
bool match = rewrite.exactMatch(details);
|
||||
|
Reference in New Issue
Block a user