#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
Task-number: QTCREATORBUG-8022
The profiler would switch to state "AppKilled" if the connection was
cut before all the profiling data could be read. With Qt4.8, however,
the application dies before any data is sent at all, and such state
would never be reached. This patch fixes the flow of states and
properly detects when an application started profiling successfully
but dies before delivering the data. If the application doesn't run
at all (for example, launching a QtQuick1.1 app from Qt5), the
profiler fails gracefully without showing the error dialog.
Change-Id: I6fc53127b5dfe41de112e140b77895d430d3f79c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
In the case that the application did not generate any event
after running the profiler, still show an empty trace.
Otherwise the user will think that the profiler didn't work.
Change-Id: Idd15225270d55d834719f66387864433fcb9026d
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Don't keep a pointer to elements in QVector (which might get
relocated at any time). Instead, store the index.
Change-Id: If24a408b9f47f0f3a83909ff119867311d87d869
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Rename the QmlJSDebugClient lib to QmlDebug (shorter names, easier differentiation with the shared/qmljsdebug lib).
Also rename
- QDeclarativeDebug* classes to QmlDebug*
- QDeclarativeOutputParser class to QmlOutputParser
To clarify the features,
- Debugger::QmlDebuggerClient is now Debugger::BaseQmlDebuggerClient
- QmlEngineDebugClient is now BaseEngineDebugClient
- QmlDebuggerClient is now QmlEngineDebugClient
- QDeclarativeEngineDebugClient is now DeclarativeEngineDebugClient
Change-Id: Ie15713730a614c8ab4b637fad0924f95b54e633f
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
The cause of the crash was that animation events are a special case
inside the profile data model, and some parts of the statistics
computation were not taking that circumstance into account.
Change-Id: Ibec929abb18fcdd8af4ddb5ff40b125915746725
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
The code of the qmlprofiler client has become a bit too complex,
this patch reorganizes the modules in a more sensible way,
having the modules communicate with each other through a
state machine instead of the excess of signals and slots
from before.
Change-Id: I76f7313779888a1bd07a1cdb1acbf2e47aacf42a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>