Commit Graph

47 Commits

Author SHA1 Message Date
Ulf Hermann
b89d12c450 QmlProfiler: Include debug messages in trace
A separate model will show them in the timeline for better orientation.

Change-Id: I537bac82ddef6a8bcc64ae403731512f8edcc9db
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-17 13:06:33 +00:00
Ulf Hermann
35cedb2aee QmlProfiler: Allow string data in events
The restriction to put all strings in the type data is becoming a
burden to further enhancements. Also, introduce proper ctors for all
event structs.

Change-Id: I42d3bac96155ac1ac183a2b82785ce0396c5a932
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-17 13:06:29 +00:00
Ulf Hermann
185412cee7 QmlProfiler: Remove QtQuick1-specific hack
Change-Id: I541fde69fcd337b5cf637b25dc0b610a956e65b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-16 14:50:27 +00:00
Ulf Hermann
fdbed834fa QmlProfiler: Refactor complete() methods
The complete() methods do something more specific. We should call them
by what they do. Also, we don't need to signal the finishing of data
acquisition via a signal and most of the postprocessing can happen in
the worker thread.

Change-Id: Iae986aefb8e7e7d4327c481d7a85325bbff7fa48
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-11 12:26:45 +00:00
Ulf Hermann
6f8acae62d QmlProfiler: Remove QmlProfilerBaseModel
Now that the V8 model is gone we don't need a base model anymore.

Change-Id: I35aee0627f78f417ec9c971e1c7bbf70adfc7b27
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-11 09:13:43 +00:00
Ulf Hermann
7344c27622 QmlProfiler: Remove separator comments
It's not clear what they're supposed to tell us.

Change-Id: I62f4fb1265396b8d61df0ce6e3409f0eda677170
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-02 10:17:48 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Ulf Hermann
a42e07beba QmlProfiler: Rename some classes and files to follow the common pattern
The ones we'll refactor into the timeline library should be called
timeline* and the others should be called qmlprofiler*.

Change-Id: I6ecccbe4ef523681ca0baeef140368e2c1839964
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:53:53 +01:00
Ulf Hermann
70102410df QmlProfiler: Centralize trace/window/range times
Avoid keeping multiple, potentially diverging copies of the same time
information and make sure all the times are consistent with each other.

Stating the times as properties allows us to use bindings in more
places, too.

Change-Id: I9cdd4f561ac22ad795939594ba340b1fbc070e9a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:53:28 +01:00
Ulf Hermann
1d483cd352 QmlProfiler: Fix location for QtQuick1 events before using them
If this is not done multiple event types with empty locations are
regarded as equal which leads to confusion later. Also, it's not a
good idea to change the "location" member for already inserted event
types as that prevents us from looking them up in the eventTypeIds
map.

Finally, preprocessing the filename and stripping certain parts
from the URL prevents a proper lookup later on, so this is removed.

Change-Id: Idbe87e0b16444291bb13ff604ae65e1d7e74c3a5
Task-number: QTCREATORBUG-13382
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-12 11:30:06 +01:00
Ulf Hermann
350615cc71 QmlProfiler: Add special model for notes
Change-Id: Ia0acbc5e0a02563cf497594b67a5f7a67488fb79
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-10-15 10:33:38 +02:00
Eike Ziller
ea27143239 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	src/libs/utils/ipaddresslineedit.cpp
	src/libs/utils/logging.h
	src/plugins/analyzerbase/AnalyzerBase.pluginspec.in
	src/plugins/android/Android.pluginspec.in
	src/plugins/android/androiddeploystep.cpp
	src/plugins/android/androiddeploystep.h
	src/plugins/android/androiddeploystepfactory.cpp
	src/plugins/android/androiddeploystepwidget.cpp
	src/plugins/android/androidpackagecreationfactory.cpp
	src/plugins/android/androidpackagecreationstep.cpp
	src/plugins/android/androidpackagecreationstep.h
	src/plugins/android/androidpackagecreationwidget.cpp
	src/plugins/android/androidpackagecreationwidget.h
	src/plugins/android/javafilewizard.cpp
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/baremetal/BareMetal.pluginspec.in
	src/plugins/bazaar/Bazaar.pluginspec.in
	src/plugins/beautifier/Beautifier.pluginspec.in
	src/plugins/bineditor/BinEditor.pluginspec.in
	src/plugins/bookmarks/Bookmarks.pluginspec.in
	src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in
	src/plugins/clangcodemodel/clanghighlightingsupport.cpp
	src/plugins/clangcodemodel/clangsymbolsearcher.cpp
	src/plugins/classview/ClassView.pluginspec.in
	src/plugins/clearcase/ClearCase.pluginspec.in
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in
	src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp
	src/plugins/cmakeprojectmanager/cmakehighlighter.cpp
	src/plugins/coreplugin/Core.pluginspec.in
	src/plugins/cpaster/CodePaster.pluginspec.in
	src/plugins/cppeditor/CppEditor.pluginspec.in
	src/plugins/cppeditor/cppfilewizard.cpp
	src/plugins/cpptools/CppTools.pluginspec.in
	src/plugins/cpptools/cpphighlightingsupportinternal.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.h
	src/plugins/cvs/CVS.pluginspec.in
	src/plugins/debugger/Debugger.pluginspec.in
	src/plugins/designer/Designer.pluginspec.in
	src/plugins/diffeditor/DiffEditor.pluginspec.in
	src/plugins/emacskeys/EmacsKeys.pluginspec.in
	src/plugins/fakevim/FakeVim.pluginspec.in
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in
	src/plugins/git/Git.pluginspec.in
	src/plugins/git/gitorious/gitorious.cpp
	src/plugins/git/gitorious/gitorious.h
	src/plugins/git/gitorious/gitoriousclonewizard.cpp
	src/plugins/git/gitorious/gitorioushostwidget.cpp
	src/plugins/git/gitorious/gitorioushostwidget.h
	src/plugins/git/gitorious/gitorioushostwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.h
	src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwizardpage.h
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.h
	src/plugins/glsleditor/GLSLEditor.pluginspec.in
	src/plugins/glsleditor/glsleditorfactory.cpp
	src/plugins/glsleditor/glslfilewizard.cpp
	src/plugins/helloworld/HelloWorld.pluginspec.in
	src/plugins/help/Help.pluginspec.in
	src/plugins/imageviewer/ImageViewer.pluginspec.in
	src/plugins/ios/Ios.pluginspec.in
	src/plugins/macros/Macros.pluginspec.in
	src/plugins/mercurial/Mercurial.pluginspec.in
	src/plugins/perforce/Perforce.pluginspec.in
	src/plugins/projectexplorer/ProjectExplorer.pluginspec.in
	src/plugins/pythoneditor/PythonEditor.pluginspec.in
	src/plugins/pythoneditor/pythoneditorwidget.cpp
	src/plugins/pythoneditor/wizard/pythonfilewizard.cpp
	src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in
	src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
	src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in
	src/plugins/qmakeprojectmanager/profileeditorfactory.cpp
	src/plugins/qmldesigner/QmlDesigner.pluginspec.in
	src/plugins/qmljseditor/QmlJSEditor.pluginspec.in
	src/plugins/qmljseditor/qmljseditorfactory.cpp
	src/plugins/qmljstools/QmlJSTools.pluginspec.in
	src/plugins/qmlprofiler/QmlProfiler.pluginspec.in
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in
	src/plugins/qnx/Qnx.pluginspec.in
	src/plugins/qtsupport/QtSupport.pluginspec.in
	src/plugins/remotelinux/RemoteLinux.pluginspec.in
	src/plugins/resourceeditor/ResourceEditor.pluginspec.in
	src/plugins/resourceeditor/resourcewizard.h
	src/plugins/subversion/Subversion.pluginspec.in
	src/plugins/tasklist/TaskList.pluginspec.in
	src/plugins/texteditor/TextEditor.pluginspec.in
	src/plugins/texteditor/basetexteditor_p.h
	src/plugins/texteditor/basetextmark.cpp
	src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h
	src/plugins/texteditor/codeassist/defaultassistinterface.h
	src/plugins/texteditor/codeassist/iassistproposalitem.cpp
	src/plugins/texteditor/itexteditor.cpp
	src/plugins/texteditor/itexteditor.h
	src/plugins/texteditor/itextmark.cpp
	src/plugins/texteditor/plaintexteditor.cpp
	src/plugins/texteditor/plaintexteditor.h
	src/plugins/texteditor/texteditoractionhandler.cpp
	src/plugins/todo/Todo.pluginspec.in
	src/plugins/updateinfo/UpdateInfo.pluginspec.in
	src/plugins/valgrind/Valgrind.pluginspec.in
	src/plugins/vcsbase/VcsBase.pluginspec.in
	src/plugins/welcome/Welcome.pluginspec.in
	src/plugins/winrt/WinRt.pluginspec.in
	tests/auto/debugger/temporarydir.h

Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
2014-10-14 15:36:16 +02:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Ulf Hermann
9ca42dacf3 QmlProfiler: Don't process all events twice when loading traces
At the end of QmlProfilerFileReader::load() we have a perfectly valid
set of types and events which we can just pass on to the model as-is.

Change-Id: I6981663f409c4647f4d5ae8a73b5d14cc701017b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-09-12 15:44:28 +02:00
Ulf Hermann
49cc0c9df1 QmlProfiler: Clean up assignment of initial details to events
- Build the displayname from the location only once per event
- Make sure Qt4 paint events show the "GUI Thread" label
- Remove useless "Animations" displayName. It isn't shown anywhere.

Task-number: QTCREATORBUG-12496
Change-Id: I823676499670fc019b5dbf225668f833d17076b8
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-09 12:58:07 +02:00
Ulf Hermann
ccf871aa20 QmlProfiler: Show placeholder labels in select locations
The "<bytecode>" and "Source code not available" labels should not be
added to the model as otherwise they end up in trace files. Instead the
view should show them instead of empty strings where it makes sense.

Change-Id: I37a0c8468ead0194771556d9276c24cb7f05c061
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-02 14:33:55 +02:00
Ulf Hermann
6c33c98a24 QmlProfiler: Actually do simplify the details string when loading
Change-Id: I86303991c9bb3858f9421edd7e12a54c1c9516da
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-18 12:59:29 +02:00
Ulf Hermann
f70f4e6f7c 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>
2014-06-17 16:26:31 +02:00
Ulf Hermann
fea6580c82 QmlProfiler: get rid of hash strings
Using strings to identify equal events is terribly inefficient. By
keeping a global list of event types we can assign each event a
numerical type index and use that to compare them.

We can also avoid excessive string copying and data duplication by
referring to the global type list where event type information is
needed.

Task-number: QTCREATORBUG-11823
Change-Id: I837bd5d0f5395b0003002ef8dd278fb27679c65d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-17 16:26:06 +02:00
Ulf Hermann
b0d79542b8 QmlProfiler: Replace QStringList with QString in event data
We never have multi-string event data and dragging around the list
everywhere just adds noise.

Change-Id: I4c73543464abea01d342e3f0a296ed1b05ee2a88
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-17 16:25:47 +02:00
Ulf Hermann
94722ec5e7 QmlProfiler: Unify event type definitions
Generally save both the Message and RangeType attributes so that we
avoid clashes between those types. Also keep all the types in one
place and make their names follow qtdeclarative's conventions.

Change-Id: I811bfcc4b72aaa2a0142babc92d96968ed2d4007
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-06 15:24:28 +02:00
Ulf Hermann
648989daf2 QmlProfiler: Try to make the compiler inline event start comparison
This function is by a large margin the most often called one when
loading a trace. Passing it as a pointer to qSort certainly doesn't
help. Also, qSort is deprecated.

Task-number: QTCREATORBUG-11823
Change-Id: I98d744d1615733de93a8d35bccaa338643a2f6f4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-31 11:59:39 +02:00
Ulf Hermann
59ef288517 QmlProfiler: Accept qrc:/ as local files when setting initial details
If this is not done a lot of Creating and Compiling events look bad.

Task-number: QTCREATORBUG-11525
Change-Id: I2af584d3d0468cbc54960c4e16036e9bcf42511b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-21 12:32:33 +01:00
Ulf Hermann
461e677b89 QmlProfiler: Consistently apply the d-pointer pattern to all models
Change-Id: I338291ee94f0301039c2b2e04b6c37fff66a2995
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 17:10:08 +01:00
Ulf Hermann
58e3c9ed05 QmlProfiler: Unify QML and V8 data models
There is no real reason for the existence of a QmlProfilerSimpleModel.

Change-Id: I6419973cfad5564913bf92f17fdcf7e529af4b01
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:57:29 +01:00
Christiaan Janssen
0a3b20f5f9 QmlProfiler: reworked
Change-Id: I66a236a024d76e7bef6edfb91ae30b5dd098b76b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-08-09 17:19:32 +02:00
Orgad Shaneh
ad9e7ccab6 Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 11:11:25 +02:00
Friedemann Kleint
225c21a0f2 Fix Krazy warnings about values or keys iteration in QML code.
Change-Id: I78be5ec702d06ecc155842e9f092a13fc1cd6197
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
2013-03-15 11:14:34 +01:00
Christiaan Janssen
0d6676aabe QmlProfiler: ignore duplicated Complete in data container
The Complete message is sent when the profiled app is started if
recording is disabled, that can conflict with previous traces.
This patch tells the data container to ignore subsequent Complete
messages until a new trace is started.

Change-Id: Idfe4501ec93297fcd9c82c306cd93d70c67aec72
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-20 15:25:35 +01:00
Christiaan Janssen
0b7f80de21 QmlProfiler: avoid false positives in binding loops
It happens when anonymous bindings are involved.

Change-Id: Id0107040565351bf857bff7357a76bc82f0fd093
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-20 10:27:25 +01:00
Christiaan Janssen
dac19b42b4 QmlProfiler: dealing with missing location in Creation events
Change-Id: Ia1d74c3f0c1a002956b9f60146f5eafcc15465ea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-19 09:03:56 +01:00
Leena Miettinen
f88bda573c UI text: add punctuation to QML Profiler messages
Change-Id: I6571dc0b950f719b4ec0641254f2fa7bcd646f49
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
2013-02-12 16:02:55 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/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>
2013-01-08 10:48:18 +01:00
Orgad Shaneh
f739c85c72 QmlProfiler: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I99c96e723e80ec318acd9300b4f44e7c3ce37485
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
2012-11-27 10:40:47 +01:00
Orgad Shaneh
f8645bb6c7 Translate some strings
Change-Id: I5eab1edbca591cc36813cd862d6ad93875b51a3c
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-11-26 09:47:14 +01:00
Christiaan Janssen
342f684277 QmlProfiler: Detect interrupted execution
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>
2012-10-17 13:12:28 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Christiaan Janssen
af72e4bb3f QmlProfiler: show empty trace
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>
2012-05-11 17:16:12 +02:00
Christiaan Janssen
5506d0329f QmlProfiler: Fix crash when loading traces
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>
2012-05-04 16:24:30 +02:00
Christiaan Janssen
2afa559c2a QmlProfiler: show binding types
Change-Id: Iea469aa3e0fb7c4e5146163f049c930df6fc2b7d
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-05-04 15:09:18 +02:00
Kai Koehne
4d3395b990 QmlDebug: Rename library and (most) classes
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>
2012-04-18 14:31:36 +02:00
Christiaan Janssen
0009bf8e2b QmlProfiler: fix crash in binding loop detection
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>
2012-03-26 15:30:32 +02:00
Christiaan Janssen
b7304e2f2e QmlProfiler: Refactor
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>
2012-03-14 11:38:25 +01:00