OSDN Git Service

Merge branch '2.1'
authorcon <qtc-committer@nokia.com>
Fri, 17 Dec 2010 16:00:53 +0000 (17:00 +0100)
committercon <qtc-committer@nokia.com>
Fri, 17 Dec 2010 16:00:53 +0000 (17:00 +0100)
Conflicts:
src/plugins/coreplugin/basemode.cpp
src/plugins/coreplugin/basemode.h
src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
src/plugins/debugger/debuggeragents.cpp
src/plugins/debugger/debuggeruiswitcher.cpp
src/plugins/debugger/debuggeruiswitcher.h
src/plugins/projectexplorer/buildconfigdialog.cpp
src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
src/plugins/qmldesigner/designercore/include/modelutilities.h
src/plugins/qmldesigner/designercore/include/nodeinstance.h
src/plugins/qmldesigner/designercore/include/propertymetainfo.h
src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
src/plugins/qmldesigner/designercore/model/modelutilities.cpp
src/plugins/snippets/inputwidget.cpp
src/plugins/snippets/snippetscompletion.cpp
src/plugins/snippets/snippetscompletion.h
src/plugins/snippets/snippetspec.cpp
src/plugins/snippets/snippetsplugin.cpp
src/plugins/snippets/snippetswindow.cpp
src/plugins/snippets/snippetswindow.h
src/plugins/texteditor/snippetsparser.cpp
src/tools/qml/qmldom/main.cpp
tests/manual/trk/runner.cpp
tests/manual/trk/trkolddevice.cpp
tests/manual/trk/trkolddevice.h
tests/manual/trk/trkserver.cpp

937 files changed:
1  2 
doc/qtcreator.qdoc
share/qtcreator/gdbmacros/gdbmacros.cpp
share/qtcreator/qml/qmljsdebugger/editor/abstractformeditortool.cpp
share/qtcreator/qml/qmljsdebugger/editor/abstractformeditortool.h
share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.cpp
share/qtcreator/qml/qmljsdebugger/editor/boundingrecthighlighter.h
share/qtcreator/qml/qmljsdebugger/editor/colorpickertool.cpp
share/qtcreator/qml/qmljsdebugger/editor/layeritem.cpp
share/qtcreator/qml/qmljsdebugger/editor/layeritem.h
share/qtcreator/qml/qmljsdebugger/editor/qmltoolbar.cpp
share/qtcreator/qml/qmljsdebugger/editor/rubberbandselectionmanipulator.cpp
share/qtcreator/qml/qmljsdebugger/editor/rubberbandselectionmanipulator.h
share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp
share/qtcreator/qml/qmljsdebugger/editor/selectionrectangle.cpp
share/qtcreator/qml/qmljsdebugger/editor/selectiontool.cpp
share/qtcreator/qml/qmljsdebugger/editor/selectiontool.h
share/qtcreator/qml/qmljsdebugger/editor/singleselectionmanipulator.cpp
share/qtcreator/qml/qmljsdebugger/editor/singleselectionmanipulator.h
share/qtcreator/qml/qmljsdebugger/editor/subcomponenteditortool.cpp
share/qtcreator/qml/qmljsdebugger/editor/subcomponentmasklayeritem.cpp
share/qtcreator/qml/qmljsdebugger/editor/subcomponentmasklayeritem.h
share/qtcreator/qml/qmljsdebugger/editor/toolbarcolorbox.cpp
share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp
share/qtcreator/qml/qmljsdebugger/editor/zoomtool.h
share/qtcreator/qml/qmljsdebugger/include/qdeclarativeviewobserver.h
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp
share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h
share/qtcreator/templates/wizards/qtcreatorplugin/wizard.xml
src/app/main.cpp
src/libs/cplusplus/CppDocument.cpp
src/libs/cplusplus/CppRewriter.cpp
src/libs/cplusplus/CppRewriter.h
src/libs/cplusplus/LookupContext.cpp
src/libs/cplusplus/ResolveExpression.cpp
src/libs/cplusplus/ResolveExpression.h
src/libs/cplusplus/TypeOfExpression.cpp
src/libs/cplusplus/TypeOfExpression.h
src/libs/extensionsystem/iplugin.cpp
src/libs/extensionsystem/pluginmanager.cpp
src/libs/extensionsystem/pluginmanager.h
src/libs/extensionsystem/pluginmanager_p.h
src/libs/extensionsystem/pluginview.cpp
src/libs/qmleditorwidgets/colorbox.h
src/libs/qmleditorwidgets/colorbutton.h
src/libs/qmleditorwidgets/colorwidgets.cpp
src/libs/qmleditorwidgets/contextpanewidget.cpp
src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
src/libs/qmleditorwidgets/gradientline.cpp
src/libs/qmleditorwidgets/gradientline.h
src/libs/qmleditorwidgets/huecontrol.h
src/libs/qmljs/qmljsbind.cpp
src/libs/qmljs/qmljsbind.h
src/libs/qmljs/qmljscheck.cpp
src/libs/qmljs/qmljscheck.h
src/libs/qmljs/qmljscodeformatter.cpp
src/libs/qmljs/qmljscodeformatter.h
src/libs/qmljs/qmljscompletioncontextfinder.cpp
src/libs/qmljs/qmljscompletioncontextfinder.h
src/libs/qmljs/qmljscomponentversion.cpp
src/libs/qmljs/qmljscomponentversion.h
src/libs/qmljs/qmljsdocument.cpp
src/libs/qmljs/qmljsdocument.h
src/libs/qmljs/qmljsevaluate.cpp
src/libs/qmljs/qmljsinterpreter.cpp
src/libs/qmljs/qmljsinterpreter.h
src/libs/qmljs/qmljslineinfo.cpp
src/libs/qmljs/qmljslink.cpp
src/libs/qmljs/qmljslink.h
src/libs/qmljs/qmljsmodelmanagerinterface.cpp
src/libs/qmljs/qmljsscanner.cpp
src/libs/qmljs/qmljsscanner.h
src/libs/qmljs/qmljsscopebuilder.cpp
src/libs/utils/abstractprocess.h
src/libs/utils/abstractprocess_win.cpp
src/libs/utils/buildablehelperlibrary.cpp
src/libs/utils/consoleprocess.h
src/libs/utils/consoleprocess_unix.cpp
src/libs/utils/consoleprocess_win.cpp
src/libs/utils/crumblepath.h
src/libs/utils/detailsbutton.cpp
src/libs/utils/detailsbutton.h
src/libs/utils/detailswidget.cpp
src/libs/utils/environment.cpp
src/libs/utils/environment.h
src/libs/utils/fileinprojectfinder.h
src/libs/utils/filesearch.cpp
src/libs/utils/filesearch.h
src/libs/utils/historycompleter.cpp
src/libs/utils/historycompleter.h
src/libs/utils/htmldocextractor.cpp
src/libs/utils/htmldocextractor.h
src/libs/utils/pathchooser.cpp
src/libs/utils/projectintropage.cpp
src/libs/utils/stringutils.cpp
src/libs/utils/stringutils.h
src/libs/utils/submiteditorwidget.cpp
src/libs/utils/submiteditorwidget.h
src/libs/utils/unixutils.h
src/libs/utils/winutils.cpp
src/libs/utils/winutils.h
src/libs/utils/wizard.cpp
src/libs/utils/wizard.h
src/plugins/bineditor/bineditor.cpp
src/plugins/bineditor/bineditor.h
src/plugins/bineditor/bineditorplugin.cpp
src/plugins/bookmarks/bookmarksplugin.cpp
src/plugins/classview/classviewmanager.cpp
src/plugins/classview/classviewparser.cpp
src/plugins/classview/classviewparsertreeitem.cpp
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
src/plugins/cmakeprojectmanager/cmakeeditor.cpp
src/plugins/cmakeprojectmanager/cmakehighlighter.cpp
src/plugins/cmakeprojectmanager/cmakehighlighter.h
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
src/plugins/cmakeprojectmanager/cmakeproject.cpp
src/plugins/cmakeprojectmanager/cmakeproject.h
src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp
src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
src/plugins/cmakeprojectmanager/cmaketarget.cpp
src/plugins/cmakeprojectmanager/cmaketarget.h
src/plugins/cmakeprojectmanager/makestep.cpp
src/plugins/cmakeprojectmanager/makestep.h
src/plugins/coreplugin/actionmanager/actioncontainer.cpp
src/plugins/coreplugin/actionmanager/actioncontainer.h
src/plugins/coreplugin/actionmanager/actioncontainer_p.h
src/plugins/coreplugin/actionmanager/actionmanager.cpp
src/plugins/coreplugin/actionmanager/actionmanager.h
src/plugins/coreplugin/actionmanager/actionmanager_p.h
src/plugins/coreplugin/actionmanager/command.cpp
src/plugins/coreplugin/actionmanager/command_p.h
src/plugins/coreplugin/actionmanager/commandmappings.cpp
src/plugins/coreplugin/actionmanager/commandmappings.h
src/plugins/coreplugin/basemode.cpp
src/plugins/coreplugin/basemode.h
src/plugins/coreplugin/coreconstants.h
src/plugins/coreplugin/coreimpl.cpp
src/plugins/coreplugin/coreimpl.h
src/plugins/coreplugin/designmode.cpp
src/plugins/coreplugin/dialogs/ioptionspage.cpp
src/plugins/coreplugin/dialogs/ioptionspage.h
src/plugins/coreplugin/dialogs/saveitemsdialog.cpp
src/plugins/coreplugin/dialogs/settingsdialog.cpp
src/plugins/coreplugin/dialogs/settingsdialog.h
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
src/plugins/coreplugin/dialogs/shortcutsettings.h
src/plugins/coreplugin/editmode.cpp
src/plugins/coreplugin/editormanager/editormanager.cpp
src/plugins/coreplugin/editormanager/editormanager.h
src/plugins/coreplugin/editormanager/editorview.cpp
src/plugins/coreplugin/editormanager/ieditor.h
src/plugins/coreplugin/editormanager/openeditorsmodel.cpp
src/plugins/coreplugin/editormanager/openeditorsview.cpp
src/plugins/coreplugin/editortoolbar.cpp
src/plugins/coreplugin/fancyactionbar.cpp
src/plugins/coreplugin/filemanager.cpp
src/plugins/coreplugin/filemanager.h
src/plugins/coreplugin/generalsettings.cpp
src/plugins/coreplugin/generalsettings.h
src/plugins/coreplugin/icontext.h
src/plugins/coreplugin/icore.cpp
src/plugins/coreplugin/icore.h
src/plugins/coreplugin/ifile.h
src/plugins/coreplugin/iversioncontrol.h
src/plugins/coreplugin/mainwindow.cpp
src/plugins/coreplugin/mainwindow.h
src/plugins/coreplugin/mimedatabase.cpp
src/plugins/coreplugin/mimedatabase.h
src/plugins/coreplugin/modemanager.cpp
src/plugins/coreplugin/navigationwidget.cpp
src/plugins/coreplugin/outputpane.cpp
src/plugins/coreplugin/rssfetcher.cpp
src/plugins/coreplugin/rssfetcher.h
src/plugins/coreplugin/scriptmanager/metatypedeclarations.h
src/plugins/coreplugin/scriptmanager/scriptmanager.cpp
src/plugins/coreplugin/ssh/sftpchannel.cpp
src/plugins/coreplugin/ssh/sftpchannel.h
src/plugins/coreplugin/ssh/sshchannel_p.h
src/plugins/coreplugin/ssh/sshpacket_p.h
src/plugins/coreplugin/variablemanager.cpp
src/plugins/coreplugin/variablemanager.h
src/plugins/coreplugin/vcsmanager.cpp
src/plugins/coreplugin/vcsmanager.h
src/plugins/cpaster/cpasterplugin.cpp
src/plugins/cpaster/fileshareprotocolsettingspage.cpp
src/plugins/cpaster/settingspage.cpp
src/plugins/cppeditor/cppeditor.cpp
src/plugins/cppeditor/cppeditor.h
src/plugins/cppeditor/cppeditorconstants.h
src/plugins/cppeditor/cppinsertdecldef.cpp
src/plugins/cppeditor/cppplugin.cpp
src/plugins/cppeditor/cppquickfix.cpp
src/plugins/cppeditor/cppquickfix.h
src/plugins/cppeditor/cppquickfixes.cpp
src/plugins/cppeditor/cpptypehierarchy.cpp
src/plugins/cppeditor/cpptypehierarchy.h
src/plugins/cpptools/completionsettingspage.cpp
src/plugins/cpptools/completionsettingspage.h
src/plugins/cpptools/cppcodecompletion.cpp
src/plugins/cpptools/cppcodecompletion.h
src/plugins/cpptools/cppcodeformatter.cpp
src/plugins/cpptools/cppcodeformatter.h
src/plugins/cpptools/cppfilesettingspage.cpp
src/plugins/cpptools/cpptoolsplugin.cpp
src/plugins/cpptools/insertionpointlocator.h
src/plugins/cvs/cvsplugin.cpp
src/plugins/cvs/settingspage.cpp
src/plugins/debugger/breakhandler.cpp
src/plugins/debugger/breakhandler.h
src/plugins/debugger/breakpoint.cpp
src/plugins/debugger/breakpoint.h
src/plugins/debugger/breakwindow.cpp
src/plugins/debugger/breakwindow.h
src/plugins/debugger/cdb/cdbassembler.cpp
src/plugins/debugger/cdb/cdbassembler.h
src/plugins/debugger/cdb/cdbbreakpoint.cpp
src/plugins/debugger/cdb/cdbbreakpoint.h
src/plugins/debugger/cdb/cdbdebugeventcallback.cpp
src/plugins/debugger/cdb/cdbengine.cpp
src/plugins/debugger/cdb/cdbengine.h
src/plugins/debugger/cdb/cdbengine_p.h
src/plugins/debugger/cdb/cdbexceptionutils.cpp
src/plugins/debugger/cdb/cdbexceptionutils.h
src/plugins/debugger/cdb/cdbmodules.cpp
src/plugins/debugger/cdb/cdbmodules.h
src/plugins/debugger/cdb/cdboptions.cpp
src/plugins/debugger/cdb/cdboptions.h
src/plugins/debugger/cdb/cdbstackframecontext.cpp
src/plugins/debugger/cdb/cdbstacktracecontext.cpp
src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp
src/plugins/debugger/cdb/corebreakpoint.cpp
src/plugins/debugger/cdb/coreengine.cpp
src/plugins/debugger/cdb/coreengine.h
src/plugins/debugger/consolewindow.cpp
src/plugins/debugger/debuggeractions.cpp
src/plugins/debugger/debuggeractions.h
src/plugins/debugger/debuggerconstants.h
src/plugins/debugger/debuggerdialogs.cpp
src/plugins/debugger/debuggerdialogs.h
src/plugins/debugger/debuggerengine.cpp
src/plugins/debugger/debuggerengine.h
src/plugins/debugger/debuggermainwindow.cpp
src/plugins/debugger/debuggermainwindow.h
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.h
src/plugins/debugger/debuggerrunner.cpp
src/plugins/debugger/debuggerrunner.h
src/plugins/debugger/debuggertooltip.cpp
src/plugins/debugger/debuggertooltip.h
src/plugins/debugger/gdb/abstractgdbadapter.cpp
src/plugins/debugger/gdb/abstractgdbadapter.h
src/plugins/debugger/gdb/abstractplaingdbadapter.cpp
src/plugins/debugger/gdb/attachgdbadapter.cpp
src/plugins/debugger/gdb/attachgdbadapter.h
src/plugins/debugger/gdb/classicgdbengine.cpp
src/plugins/debugger/gdb/coregdbadapter.cpp
src/plugins/debugger/gdb/coregdbadapter.h
src/plugins/debugger/gdb/gdbchooserwidget.cpp
src/plugins/debugger/gdb/gdbchooserwidget.h
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbmi.cpp
src/plugins/debugger/gdb/gdbmi.h
src/plugins/debugger/gdb/gdboptionspage.cpp
src/plugins/debugger/gdb/gdboptionspage.h
src/plugins/debugger/gdb/localplaingdbadapter.cpp
src/plugins/debugger/gdb/localplaingdbadapter.h
src/plugins/debugger/gdb/pythongdbengine.cpp
src/plugins/debugger/gdb/remotegdbprocess.cpp
src/plugins/debugger/gdb/remotegdbprocess.h
src/plugins/debugger/gdb/remotegdbserveradapter.cpp
src/plugins/debugger/gdb/remotegdbserveradapter.h
src/plugins/debugger/gdb/remoteplaingdbadapter.cpp
src/plugins/debugger/gdb/remoteplaingdbadapter.h
src/plugins/debugger/gdb/symbian.cpp
src/plugins/debugger/gdb/symbian.h
src/plugins/debugger/gdb/tcftrkgdbadapter.cpp
src/plugins/debugger/gdb/tcftrkgdbadapter.h
src/plugins/debugger/gdb/termgdbadapter.cpp
src/plugins/debugger/gdb/termgdbadapter.h
src/plugins/debugger/gdb/trkgdbadapter.cpp
src/plugins/debugger/gdb/trkgdbadapter.h
src/plugins/debugger/logwindow.cpp
src/plugins/debugger/logwindow.h
src/plugins/debugger/memoryagent.h
src/plugins/debugger/moduleshandler.cpp
src/plugins/debugger/moduleshandler.h
src/plugins/debugger/moduleswindow.cpp
src/plugins/debugger/moduleswindow.h
src/plugins/debugger/pdb/pdbengine.cpp
src/plugins/debugger/pdb/pdbengine.h
src/plugins/debugger/qml/qmladapter.cpp
src/plugins/debugger/qml/qmladapter.h
src/plugins/debugger/qml/qmlengine.cpp
src/plugins/debugger/qml/qmlengine.h
src/plugins/debugger/qml/scriptconsole.cpp
src/plugins/debugger/registerhandler.cpp
src/plugins/debugger/registerhandler.h
src/plugins/debugger/registerwindow.cpp
src/plugins/debugger/registerwindow.h
src/plugins/debugger/script/scriptengine.cpp
src/plugins/debugger/script/scriptengine.h
src/plugins/debugger/shared/dbgwinutils.cpp
src/plugins/debugger/shared/dbgwinutils.h
src/plugins/debugger/snapshothandler.cpp
src/plugins/debugger/snapshothandler.h
src/plugins/debugger/snapshotwindow.cpp
src/plugins/debugger/snapshotwindow.h
src/plugins/debugger/sourcefileshandler.cpp
src/plugins/debugger/sourcefileshandler.h
src/plugins/debugger/sourcefileswindow.cpp
src/plugins/debugger/sourcefileswindow.h
src/plugins/debugger/stackframe.cpp
src/plugins/debugger/stackframe.h
src/plugins/debugger/stackhandler.cpp
src/plugins/debugger/stackhandler.h
src/plugins/debugger/stackwindow.cpp
src/plugins/debugger/stackwindow.h
src/plugins/debugger/tcf/json.h
src/plugins/debugger/tcf/tcfengine.h
src/plugins/debugger/threadshandler.cpp
src/plugins/debugger/threadshandler.h
src/plugins/debugger/threadswindow.cpp
src/plugins/debugger/threadswindow.h
src/plugins/debugger/watchdata.h
src/plugins/debugger/watchhandler.cpp
src/plugins/debugger/watchhandler.h
src/plugins/debugger/watchutils.cpp
src/plugins/debugger/watchutils.h
src/plugins/debugger/watchwindow.cpp
src/plugins/debugger/watchwindow.h
src/plugins/designer/formeditorplugin.cpp
src/plugins/designer/formeditorplugin.h
src/plugins/designer/formeditorstack.h
src/plugins/designer/formeditorw.cpp
src/plugins/designer/formeditorw.h
src/plugins/designer/formwindoweditor.cpp
src/plugins/designer/qtcreatorintegration.cpp
src/plugins/designer/settingspage.cpp
src/plugins/designer/settingspage.h
src/plugins/fakevim/fakevimhandler.cpp
src/plugins/fakevim/fakevimhandler.h
src/plugins/fakevim/fakevimplugin.cpp
src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
src/plugins/genericprojectmanager/genericbuildconfiguration.h
src/plugins/genericprojectmanager/genericmakestep.cpp
src/plugins/genericprojectmanager/genericmakestep.h
src/plugins/genericprojectmanager/genericproject.cpp
src/plugins/genericprojectmanager/genericproject.h
src/plugins/genericprojectmanager/genericprojectmanager.h
src/plugins/genericprojectmanager/genericprojectplugin.cpp
src/plugins/genericprojectmanager/generictarget.cpp
src/plugins/genericprojectmanager/generictarget.h
src/plugins/git/changeselectiondialog.cpp
src/plugins/git/clonewizardpage.cpp
src/plugins/git/gitclient.cpp
src/plugins/git/gitclient.h
src/plugins/git/giteditor.cpp
src/plugins/git/giteditor.h
src/plugins/git/gitorious/gitorious.h
src/plugins/git/gitplugin.cpp
src/plugins/git/gitsettings.cpp
src/plugins/git/gitsettings.h
src/plugins/git/gitsubmiteditor.cpp
src/plugins/git/gitsubmiteditor.h
src/plugins/git/gitsubmiteditorwidget.cpp
src/plugins/git/gitsubmiteditorwidget.h
src/plugins/git/gitutils.cpp
src/plugins/git/gitutils.h
src/plugins/git/gitversioncontrol.cpp
src/plugins/git/settingspage.cpp
src/plugins/glsleditor/glslautocompleter.h
src/plugins/glsleditor/glslhighlighter.h
src/plugins/glsleditor/glslhoverhandler.cpp
src/plugins/glsleditor/glslindenter.h
src/plugins/helloworld/helloworldplugin.cpp
src/plugins/helloworld/helloworldplugin.h
src/plugins/helloworld/helloworldwindow.h
src/plugins/help/centralwidget.cpp
src/plugins/help/generalsettingspage.cpp
src/plugins/help/generalsettingspage.h
src/plugins/help/helpconstants.h
src/plugins/help/helpindexfilter.cpp
src/plugins/help/helpmode.cpp
src/plugins/help/helpmode.h
src/plugins/help/helpplugin.cpp
src/plugins/help/helpplugin.h
src/plugins/help/helpviewer.cpp
src/plugins/help/helpviewer_qtb.cpp
src/plugins/help/helpviewer_qwv.cpp
src/plugins/help/localhelpmanager.cpp
src/plugins/help/localhelpmanager.h
src/plugins/help/openpagesmanager.cpp
src/plugins/help/searchwidget.cpp
src/plugins/locator/locatorfiltersfilter.cpp
src/plugins/locator/locatorplugin.cpp
src/plugins/locator/locatorwidget.cpp
src/plugins/locator/locatorwidget.h
src/plugins/locator/opendocumentsfilter.cpp
src/plugins/mercurial/mercurialplugin.cpp
src/plugins/mercurial/optionspage.cpp
src/plugins/perforce/perforceplugin.cpp
src/plugins/perforce/perforcesettings.cpp
src/plugins/perforce/perforcesettings.h
src/plugins/perforce/perforceversioncontrol.cpp
src/plugins/perforce/settingspage.cpp
src/plugins/projectexplorer/abstractprocessstep.cpp
src/plugins/projectexplorer/abstractprocessstep.h
src/plugins/projectexplorer/allprojectsfilter.h
src/plugins/projectexplorer/allprojectsfind.cpp
src/plugins/projectexplorer/allprojectsfind.h
src/plugins/projectexplorer/applicationlauncher.h
src/plugins/projectexplorer/applicationlauncher_win.cpp
src/plugins/projectexplorer/applicationlauncher_x11.cpp
src/plugins/projectexplorer/applicationrunconfiguration.cpp
src/plugins/projectexplorer/applicationrunconfiguration.h
src/plugins/projectexplorer/baseprojectwizarddialog.cpp
src/plugins/projectexplorer/baseprojectwizarddialog.h
src/plugins/projectexplorer/buildconfiguration.cpp
src/plugins/projectexplorer/buildconfiguration.h
src/plugins/projectexplorer/buildsettingspropertiespage.cpp
src/plugins/projectexplorer/buildsettingspropertiespage.h
src/plugins/projectexplorer/buildsteplist.h
src/plugins/projectexplorer/buildstepspage.cpp
src/plugins/projectexplorer/buildstepspage.h
src/plugins/projectexplorer/copytaskhandler.cpp
src/plugins/projectexplorer/copytaskhandler.h
src/plugins/projectexplorer/currentprojectfilter.cpp
src/plugins/projectexplorer/currentprojectfilter.h
src/plugins/projectexplorer/currentprojectfind.cpp
src/plugins/projectexplorer/currentprojectfind.h
src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
src/plugins/projectexplorer/customexecutablerunconfiguration.h
src/plugins/projectexplorer/customwizard/customwizard.cpp
src/plugins/projectexplorer/customwizard/customwizard.h
src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.h
src/plugins/projectexplorer/debugginghelper.h
src/plugins/projectexplorer/deployconfiguration.h
src/plugins/projectexplorer/editorconfiguration.cpp
src/plugins/projectexplorer/environmenteditmodel.cpp
src/plugins/projectexplorer/filewatcher.h
src/plugins/projectexplorer/foldernavigationwidget.cpp
src/plugins/projectexplorer/gccparser.cpp
src/plugins/projectexplorer/gnumakeparser.cpp
src/plugins/projectexplorer/gnumakeparser.h
src/plugins/projectexplorer/ioutputparser.cpp
src/plugins/projectexplorer/ioutputparser.h
src/plugins/projectexplorer/iprojectmanager.h
src/plugins/projectexplorer/iprojectproperties.h
src/plugins/projectexplorer/ldparser.cpp
src/plugins/projectexplorer/linuxiccparser.cpp
src/plugins/projectexplorer/miniprojecttargetselector.cpp
src/plugins/projectexplorer/msvcparser.cpp
src/plugins/projectexplorer/outputformatter.cpp
src/plugins/projectexplorer/outputformatter.h
src/plugins/projectexplorer/outputwindow.cpp
src/plugins/projectexplorer/outputwindow.h
src/plugins/projectexplorer/pluginfilefactory.h
src/plugins/projectexplorer/processstep.cpp
src/plugins/projectexplorer/processstep.h
src/plugins/projectexplorer/project.cpp
src/plugins/projectexplorer/project.h
src/plugins/projectexplorer/projectconfiguration.cpp
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.h
src/plugins/projectexplorer/projectexplorerconstants.h
src/plugins/projectexplorer/projectexplorersettingspage.cpp
src/plugins/projectexplorer/projectexplorersettingspage.h
src/plugins/projectexplorer/projectmodels.cpp
src/plugins/projectexplorer/projectmodels.h
src/plugins/projectexplorer/projectnodes.cpp
src/plugins/projectexplorer/projectnodes.h
src/plugins/projectexplorer/projecttreewidget.cpp
src/plugins/projectexplorer/projecttreewidget.h
src/plugins/projectexplorer/projectwelcomepagewidget.cpp
src/plugins/projectexplorer/projectwindow.cpp
src/plugins/projectexplorer/projectwindow.h
src/plugins/projectexplorer/runconfiguration.h
src/plugins/projectexplorer/runsettingspropertiespage.cpp
src/plugins/projectexplorer/runsettingspropertiespage.h
src/plugins/projectexplorer/session.cpp
src/plugins/projectexplorer/session.h
src/plugins/projectexplorer/sessionnodeimpl.h
src/plugins/projectexplorer/showineditortaskhandler.cpp
src/plugins/projectexplorer/showineditortaskhandler.h
src/plugins/projectexplorer/showoutputtaskhandler.h
src/plugins/projectexplorer/target.cpp
src/plugins/projectexplorer/target.h
src/plugins/projectexplorer/targetsettingspanel.cpp
src/plugins/projectexplorer/targetsettingspanel.h
src/plugins/projectexplorer/taskwindow.cpp
src/plugins/projectexplorer/toolchain.cpp
src/plugins/projectexplorer/toolchain.h
src/plugins/projectexplorer/userfileaccessor.cpp
src/plugins/projectexplorer/vcsannotatetaskhandler.h
src/plugins/projectexplorer/winguiprocess.cpp
src/plugins/projectexplorer/winguiprocess.h
src/plugins/qmldesigner/components/formeditor/abstractformeditortool.h
src/plugins/qmldesigner/components/formeditor/anchortool.cpp
src/plugins/qmldesigner/components/formeditor/anchortool.h
src/plugins/qmldesigner/components/formeditor/dragtool.cpp
src/plugins/qmldesigner/components/formeditor/dragtool.h
src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp
src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
src/plugins/qmldesigner/components/formeditor/formeditorview.h
src/plugins/qmldesigner/components/formeditor/itemcreatortool.cpp
src/plugins/qmldesigner/components/formeditor/itemcreatortool.h
src/plugins/qmldesigner/components/formeditor/itemutilfunctions.cpp
src/plugins/qmldesigner/components/formeditor/movetool.cpp
src/plugins/qmldesigner/components/formeditor/movetool.h
src/plugins/qmldesigner/components/formeditor/resizetool.cpp
src/plugins/qmldesigner/components/formeditor/resizetool.h
src/plugins/qmldesigner/components/formeditor/scaleitem.h
src/plugins/qmldesigner/components/formeditor/selectiontool.cpp
src/plugins/qmldesigner/components/formeditor/selectiontool.h
src/plugins/qmldesigner/components/formeditor/zoomaction.cpp
src/plugins/qmldesigner/components/integration/componentview.cpp
src/plugins/qmldesigner/components/integration/componentview.h
src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
src/plugins/qmldesigner/components/integration/designdocumentcontroller.h
src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp
src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.h
src/plugins/qmldesigner/components/integration/integrationcore.cpp
src/plugins/qmldesigner/components/integration/integrationcore.h
src/plugins/qmldesigner/components/itemlibrary/itemlibrarycomponents.cpp
src/plugins/qmldesigner/components/itemlibrary/itemlibrarycomponents.h
src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp
src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h
src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp
src/plugins/qmldesigner/components/navigator/navigatorview.cpp
src/plugins/qmldesigner/components/navigator/navigatorview.h
src/plugins/qmldesigner/components/propertyeditor/basiclayouts.h
src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp
src/plugins/qmldesigner/components/propertyeditor/basicwidgets.h
src/plugins/qmldesigner/components/propertyeditor/behaviordialog.cpp
src/plugins/qmldesigner/components/propertyeditor/behaviordialog.h
src/plugins/qmldesigner/components/propertyeditor/fontwidget.h
src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h
src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h
src/plugins/qmldesigner/components/propertyeditor/qlayoutobject.h
src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.h
src/plugins/qmldesigner/components/propertyeditor/qproxylayoutitem.h
src/plugins/qmldesigner/components/propertyeditor/resetwidget.cpp
src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.cpp
src/plugins/qmldesigner/components/stateseditor/stateseditorimageprovider.h
src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
src/plugins/qmldesigner/components/stateseditor/stateseditormodel.h
src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
src/plugins/qmldesigner/components/stateseditor/stateseditorview.h
src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp
src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h
src/plugins/qmldesigner/designercore/include/abstractproperty.h
src/plugins/qmldesigner/designercore/include/abstractview.h
src/plugins/qmldesigner/designercore/include/import.h
src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h
src/plugins/qmldesigner/designercore/include/metainfo.h
src/plugins/qmldesigner/designercore/include/metainfoparser.h
src/plugins/qmldesigner/designercore/include/model.h
src/plugins/qmldesigner/designercore/include/modelnode.h
src/plugins/qmldesigner/designercore/include/nodeabstractproperty.h
src/plugins/qmldesigner/designercore/include/nodeinstance.h
src/plugins/qmldesigner/designercore/include/nodeinstanceview.h
src/plugins/qmldesigner/designercore/include/nodelistproperty.h
src/plugins/qmldesigner/designercore/include/nodemetainfo.h
src/plugins/qmldesigner/designercore/include/propertycontainer.h
src/plugins/qmldesigner/designercore/include/qmlitemnode.h
src/plugins/qmldesigner/designercore/include/qmlmodelview.h
src/plugins/qmldesigner/designercore/include/qmlobjectnode.h
src/plugins/qmldesigner/designercore/include/rewriterview.h
src/plugins/qmldesigner/designercore/instances/componentnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/componentnodeinstance.h
src/plugins/qmldesigner/designercore/instances/dummynodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/dummynodeinstance.h
src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.h
src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/objectnodeinstance.h
src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.h
src/plugins/qmldesigner/designercore/instances/qmlpropertychangesnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/qmlpropertychangesnodeinstance.h
src/plugins/qmldesigner/designercore/instances/qmlstatenodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/qmlstatenodeinstance.h
src/plugins/qmldesigner/designercore/instances/qmltransitionnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/qmltransitionnodeinstance.h
src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp
src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
src/plugins/qmldesigner/designercore/model/abstractproperty.cpp
src/plugins/qmldesigner/designercore/model/abstractview.cpp
src/plugins/qmldesigner/designercore/model/basetexteditmodifier.cpp
src/plugins/qmldesigner/designercore/model/bindingproperty.cpp
src/plugins/qmldesigner/designercore/model/import.cpp
src/plugins/qmldesigner/designercore/model/internalnode.cpp
src/plugins/qmldesigner/designercore/model/internalnode_p.h
src/plugins/qmldesigner/designercore/model/internalnodeabstractproperty.h
src/plugins/qmldesigner/designercore/model/internalnodelistproperty.cpp
src/plugins/qmldesigner/designercore/model/internalnodelistproperty.h
src/plugins/qmldesigner/designercore/model/internalnodeproperty.cpp
src/plugins/qmldesigner/designercore/model/internalnodeproperty.h
src/plugins/qmldesigner/designercore/model/internalproperty.cpp
src/plugins/qmldesigner/designercore/model/model.cpp
src/plugins/qmldesigner/designercore/model/model_p.h
src/plugins/qmldesigner/designercore/model/modelnode.cpp
src/plugins/qmldesigner/designercore/model/nodeabstractproperty.cpp
src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp
src/plugins/qmldesigner/designercore/model/propertyparser.cpp
src/plugins/qmldesigner/designercore/model/qmlanchors.cpp
src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp
src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp
src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
src/plugins/qmldesigner/designercore/model/rewriteaction.cpp
src/plugins/qmldesigner/designercore/model/rewriterview.cpp
src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
src/plugins/qmldesigner/designercore/model/texttomodelmerger.h
src/plugins/qmldesigner/designercore/model/viewlogger.cpp
src/plugins/qmldesigner/designercore/model/viewlogger.h
src/plugins/qmldesigner/designmodewidget.cpp
src/plugins/qmldesigner/designmodewidget.h
src/plugins/qmldesigner/qmldesignerplugin.cpp
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp
src/plugins/qmldesigner/settingspage.cpp
src/plugins/qmldesigner/symbianplugin/symbianplugin.h
src/plugins/qmljseditor/qmljsautocompleter.h
src/plugins/qmljseditor/qmljscodecompletion.cpp
src/plugins/qmljseditor/qmljscodecompletion.h
src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp
src/plugins/qmljseditor/qmljseditor.cpp
src/plugins/qmljseditor/qmljseditor.h
src/plugins/qmljseditor/qmljseditorconstants.h
src/plugins/qmljseditor/qmljseditorfactory.cpp
src/plugins/qmljseditor/qmljseditorplugin.cpp
src/plugins/qmljseditor/qmljseditorplugin.h
src/plugins/qmljseditor/qmljsfindreferences.cpp
src/plugins/qmljseditor/qmljshighlighter.cpp
src/plugins/qmljseditor/qmljshoverhandler.cpp
src/plugins/qmljseditor/qmljshoverhandler.h
src/plugins/qmljseditor/qmljspreviewrunner.cpp
src/plugins/qmljseditor/qmljsquickfix.cpp
src/plugins/qmljseditor/qmljsquickfix.h
src/plugins/qmljseditor/qmljsquickfixes.cpp
src/plugins/qmljseditor/quicktoolbarsettingspage.cpp
src/plugins/qmljsinspector/qmlinspectortoolbar.cpp
src/plugins/qmljsinspector/qmlinspectortoolbar.h
src/plugins/qmljsinspector/qmljsclientproxy.cpp
src/plugins/qmljsinspector/qmljsclientproxy.h
src/plugins/qmljsinspector/qmljsinspector.cpp
src/plugins/qmljsinspector/qmljsinspector.h
src/plugins/qmljsinspector/qmljsinspectorconstants.h
src/plugins/qmljsinspector/qmljsinspectorplugin.cpp
src/plugins/qmljsinspector/qmljsinspectorplugin.h
src/plugins/qmljsinspector/qmljsinspectorsettings.h
src/plugins/qmljsinspector/qmljslivetextpreview.cpp
src/plugins/qmljsinspector/qmljslivetextpreview.h
src/plugins/qmljsinspector/qmljstoolbarcolorbox.h
src/plugins/qmljstools/qmljsmodelmanager.cpp
src/plugins/qmljstools/qmljsmodelmanager.h
src/plugins/qmljstools/qmljsqtstylecodeformatter.cpp
src/plugins/qmljstools/qmljsqtstylecodeformatter.h
src/plugins/qmljstools/qmljsrefactoringchanges.cpp
src/plugins/qmljstools/qmljsrefactoringchanges.h
src/plugins/qmlprojectmanager/qmlproject.cpp
src/plugins/qmlprojectmanager/qmlproject.h
src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
src/plugins/qmlprojectmanager/qmlprojectmanager.h
src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h
src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.h
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
src/plugins/qmlprojectmanager/qmlprojectruncontrol.h
src/plugins/qmlprojectmanager/qmlprojecttarget.cpp
src/plugins/qmlprojectmanager/qmlprojecttarget.h
src/plugins/qt4projectmanager/externaleditors.cpp
src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp
src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.h
src/plugins/qt4projectmanager/makestep.cpp
src/plugins/qt4projectmanager/makestep.h
src/plugins/qt4projectmanager/profileeditor.cpp
src/plugins/qt4projectmanager/profileeditor.h
src/plugins/qt4projectmanager/profileeditorfactory.cpp
src/plugins/qt4projectmanager/profilehighlighter.cpp
src/plugins/qt4projectmanager/qmakeparser.cpp
src/plugins/qt4projectmanager/qmakeparser.h
src/plugins/qt4projectmanager/qmakestep.cpp
src/plugins/qt4projectmanager/qmakestep.h
src/plugins/qt4projectmanager/qmldumptool.cpp
src/plugins/qt4projectmanager/qmlobservertool.cpp
src/plugins/qt4projectmanager/qmlobservertool.h
src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.h
src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.h
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
src/plugins/qt4projectmanager/qt-maemo/maemomanager.cpp
src/plugins/qt4projectmanager/qt-maemo/maemomanager.h
src/plugins/qt4projectmanager/qt-maemo/maemopublishingresultpagefremantlefree.h
src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.h
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h
src/plugins/qt4projectmanager/qt-maemo/maemoremotemountsmodel.h
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
src/plugins/qt4projectmanager/qt-maemo/maemotemplatesmanager.cpp
src/plugins/qt4projectmanager/qt-maemo/maemotemplatesmanager.h
src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp
src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.h
src/plugins/qt4projectmanager/qt-s60/abldparser.cpp
src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h
src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp
src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.h
src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp
src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h
src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp
src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h
src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp
src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h
src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h
src/plugins/qt4projectmanager/qt-s60/s60devices.cpp
src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp
src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.h
src/plugins/qt4projectmanager/qt-s60/s60manager.cpp
src/plugins/qt4projectmanager/qt-s60/s60manager.h
src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp
src/plugins/qt4projectmanager/qt-s60/s60runconfigbluetoothstarter.cpp
src/plugins/qt4projectmanager/qt-s60/s60runconfigbluetoothstarter.h
src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp
src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.h
src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
src/plugins/qt4projectmanager/qt4buildconfiguration.h
src/plugins/qt4projectmanager/qt4nodes.cpp
src/plugins/qt4projectmanager/qt4nodes.h
src/plugins/qt4projectmanager/qt4project.cpp
src/plugins/qt4projectmanager/qt4project.h
src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
src/plugins/qt4projectmanager/qt4projectconfigwidget.h
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
src/plugins/qt4projectmanager/qt4runconfiguration.h
src/plugins/qt4projectmanager/qt4target.cpp
src/plugins/qt4projectmanager/qt4target.h
src/plugins/qt4projectmanager/qtmodulesinfo.cpp
src/plugins/qt4projectmanager/qtoptionspage.cpp
src/plugins/qt4projectmanager/qtoutputformatter.cpp
src/plugins/qt4projectmanager/qtoutputformatter.h
src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
src/plugins/qt4projectmanager/qtuicodemodelsupport.h
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.h
src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
src/plugins/qt4projectmanager/wizards/abstractmobileapp.h
src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
src/plugins/qt4projectmanager/wizards/mobileapp.cpp
src/plugins/qt4projectmanager/wizards/mobileapp.h
src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp
src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h
src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp
src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.h
src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp
src/plugins/qt4projectmanager/wizards/qtwizard.cpp
src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.h
src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp
src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
src/plugins/qt4projectmanager/wizards/targetsetuppage.h
src/plugins/resourceeditor/resourceeditorw.h
src/plugins/subversion/settingspage.cpp
src/plugins/subversion/subversionplugin.cpp
src/plugins/tasklist/tasklistplugin.cpp
src/plugins/texteditor/basefilefind.cpp
src/plugins/texteditor/basefilefind.h
src/plugins/texteditor/basetextdocument.cpp
src/plugins/texteditor/basetextdocument.h
src/plugins/texteditor/basetextdocumentlayout.h
src/plugins/texteditor/basetexteditor.cpp
src/plugins/texteditor/basetexteditor.h
src/plugins/texteditor/basetexteditor_p.h
src/plugins/texteditor/basetextmark.cpp
src/plugins/texteditor/basetextmark.h
src/plugins/texteditor/behaviorsettingspage.cpp
src/plugins/texteditor/behaviorsettingspage.h
src/plugins/texteditor/completionsupport.cpp
src/plugins/texteditor/completionsupport.h
src/plugins/texteditor/completionwidget.h
src/plugins/texteditor/displaysettingspage.cpp
src/plugins/texteditor/displaysettingspage.h
src/plugins/texteditor/findincurrentfile.cpp
src/plugins/texteditor/findincurrentfile.h
src/plugins/texteditor/findinfiles.cpp
src/plugins/texteditor/findinfiles.h
src/plugins/texteditor/fontsettingspage.cpp
src/plugins/texteditor/generichighlighter/highlightdefinition.cpp
src/plugins/texteditor/generichighlighter/highlightdefinition.h
src/plugins/texteditor/generichighlighter/highlightersettings.cpp
src/plugins/texteditor/generichighlighter/highlightersettingspage.cpp
src/plugins/texteditor/generichighlighter/highlightersettingspage.h
src/plugins/texteditor/generichighlighter/progressdata.cpp
src/plugins/texteditor/generichighlighter/progressdata.h
src/plugins/texteditor/generichighlighter/rule.cpp
src/plugins/texteditor/generichighlighter/rule.h
src/plugins/texteditor/generichighlighter/specificrules.cpp
src/plugins/texteditor/generichighlighter/specificrules.h
src/plugins/texteditor/helpitem.cpp
src/plugins/texteditor/helpitem.h
src/plugins/texteditor/indenter.cpp
src/plugins/texteditor/indenter.h
src/plugins/texteditor/itexteditor.cpp
src/plugins/texteditor/itexteditor.h
src/plugins/texteditor/linenumberfilter.cpp
src/plugins/texteditor/normalindenter.cpp
src/plugins/texteditor/normalindenter.h
src/plugins/texteditor/plaintexteditor.cpp
src/plugins/texteditor/plaintexteditor.h
src/plugins/texteditor/snippets/plaintextsnippetprovider.h
src/plugins/texteditor/snippets/snippetssettings.cpp
src/plugins/texteditor/snippets/snippetssettings.h
src/plugins/texteditor/snippets/snippetssettingspage.h
src/plugins/texteditor/texteditoractionhandler.cpp
src/plugins/texteditor/texteditoractionhandler.h
src/plugins/texteditor/texteditorconstants.h
src/plugins/texteditor/texteditoroverlay.cpp
src/plugins/texteditor/texteditoroverlay.h
src/plugins/texteditor/texteditorplugin.cpp
src/plugins/texteditor/texteditorsettings.cpp
src/plugins/texteditor/texteditorsettings.h
src/plugins/vcsbase/basecheckoutwizard.cpp
src/plugins/vcsbase/basecheckoutwizardpage.cpp
src/plugins/vcsbase/commonsettingspage.cpp
src/plugins/vcsbase/diffhighlighter.cpp
src/plugins/vcsbase/diffhighlighter.h
src/plugins/vcsbase/vcsbaseeditor.cpp
src/plugins/vcsbase/vcsbaseeditor.h
src/plugins/vcsbase/vcsbaseplugin.cpp
src/plugins/vcsbase/vcsbaseplugin.h
src/plugins/vcsbase/vcsbasesubmiteditor.cpp
src/plugins/vcsbase/vcsbasesubmiteditor.h
src/plugins/welcome/communitywelcomepagewidget.cpp
src/plugins/welcome/communitywelcomepagewidget.h
src/shared/cplusplus/AST.cpp
src/shared/cplusplus/AST.h
src/shared/cplusplus/ASTClone.cpp
src/shared/cplusplus/ASTMatcher.cpp
src/shared/cplusplus/Bind.cpp
src/shared/cplusplus/Control.cpp
src/shared/cplusplus/Control.h
src/shared/cplusplus/Parser.cpp
src/shared/cplusplus/Symbols.cpp
src/shared/cplusplus/Symbols.h
src/shared/help/bookmarkmanager.cpp
src/shared/help/contentwindow.cpp
src/shared/help/indexwindow.cpp
src/shared/proparser/ioutils.cpp
src/shared/proparser/profileevaluator.cpp
src/shared/proparser/profileevaluator.h
src/shared/symbianutils/json.cpp
src/shared/symbianutils/json.h
src/shared/symbianutils/launcher.cpp
src/shared/symbianutils/launcher.h
src/shared/symbianutils/tcftrkdevice.cpp
src/shared/symbianutils/tcftrkdevice.h
src/shared/symbianutils/tcftrkmessage.cpp
src/shared/symbianutils/tcftrkmessage.h
src/shared/symbianutils/trkdevice.cpp
src/shared/symbianutils/trkutils.h
tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.cpp
tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.h
tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.cpp
tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.h
tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.cpp
tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.h
tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.cpp
tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.h
tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.cpp
tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.h
tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.cpp
tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.h
tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp
tests/auto/extensionsystem/pluginspec/testplugin/testplugin.cpp
tests/auto/extensionsystem/pluginspec/testplugin/testplugin.h
tests/auto/extensionsystem/pluginspec/testplugin/testplugin_global.h
tests/auto/extensionsystem/pluginspec/tst_pluginspec.cpp
tests/auto/generichighlighter/highlighterengine/syntaxhighlighter.h
tests/auto/generichighlighter/specificrules/tst_specificrules.cpp
tests/auto/icheckbuild/parsemanager.h
tests/auto/ioutils/tst_ioutils.cpp
tests/auto/qml/qmldesigner/common/statichelpers.cpp
tests/auto/utils_stringutils/tst_stringutils.cpp
tests/manual/gdbdebugger/gui/mainwindow.cpp
tests/manual/gdbdebugger/gui/mainwindow.h
tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
tests/manual/qmlstandalone/main.cpp
tests/tools/ccdb/cdbapplication.cpp
tests/tools/ccdb/cdbapplication.h
tests/tools/ccdb/cdbpromptthread.cpp
tests/tools/ccdb/cdbpromptthread.h
tests/tools/ccdb/debugeventcallback.cpp
tests/tools/ccdb/debugeventcallback.h
tests/tools/codaclient/main.cpp
tests/tools/cplusplus-dump/dumpers.inc
tests/tools/cplusplus-dump/main.cpp
tests/tools/qml-ast2dot/main.cpp

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d4f9b05,0000000..27e7ee1
mode 100644,000000..100644
--- /dev/null
@@@ -1,47 -1,0 +1,51 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "colorwidgets.h"
 +#include <qdeclarative.h>
 +
 +#include "colorbox.h"
 +#include "colorbutton.h"
 +#include "huecontrol.h"
 +#include "gradientline.h"
 +
 +namespace QmlEditorWidgets {
 +
 +void ColorWidgets::registerDeclarativeTypes() {
 +    qmlRegisterType<QmlEditorWidgets::ColorButton>("Bauhaus",1,0,"ColorButton");
 +    qmlRegisterType<QmlEditorWidgets::HueControl>("Bauhaus",1,0,"HueControl");
 +    qmlRegisterType<QmlEditorWidgets::ColorBox>("Bauhaus",1,0,"ColorBox");
 +    qmlRegisterType<QmlEditorWidgets::GradientLine>("Bauhaus",1,0,"GradientLine");
 +}
 +
 +}
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index a02b289,0000000..552ae49
mode 100644,000000..100644
--- /dev/null
@@@ -1,57 -1,0 +1,61 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef FILEINPROJECTFINDER_H
 +#define FILEINPROJECTFINDER_H
 +
 +#include <utils/utils_global.h>
 +
 +#include <QtCore/QHash>
 +#include <QtCore/QString>
 +
 +namespace Utils {
 +
 +class QTCREATOR_UTILS_EXPORT FileInProjectFinder
 +{
 +public:
 +    FileInProjectFinder();
 +
 +    void setProjectDirectory(const QString &absoluteProjectPath);
 +    QString projectDirectory() const;
 +
 +    QString findFile(const QString &originalPath, bool *success = 0) const;
 +
 +private:
 +    QString m_projectDir;
 +    mutable QHash<QString,QString> m_cache;
 +};
 +
 +} // namespace Utils
 +
 +#endif // FILEINPROJECTFINDER_H
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc src/plugins/coreplugin/basemode.cpp
index e69de29,b46f682..0000000
deleted file mode 100644,100644
+++ /dev/null
diff --cc src/plugins/coreplugin/basemode.h
index e69de29,7e438e2..0000000
deleted file mode 100644,100644
+++ /dev/null
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 51b4117,0000000..050f991
mode 100644,000000..100644
--- /dev/null
@@@ -1,78 -1,0 +1,82 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef DEBUGGER_MEMORYAGENT_H
 +#define DEBUGGER_MEMORYAGENT_H
 +
 +#include <QtCore/QObject>
 +#include <QtCore/QPointer>
 +
 +namespace Core {
 +class IEditor;
 +}
 +
 +namespace Debugger {
 +
 +class DebuggerEngine;
 +
 +namespace Internal {
 +
 +class MemoryAgent : public QObject
 +{
 +    Q_OBJECT
 +
 +public:
 +    explicit MemoryAgent(DebuggerEngine *engine);
 +    ~MemoryAgent();
 +
 +    enum { BinBlockSize = 1024 };
 +    bool hasVisibleEditor() const;
 +
 +public slots:
 +    // Called by engine to create a new view.
 +    void createBinEditor(quint64 startAddr);
 +    // Called by engine to trigger update of contents.
 +    void updateContents();
 +    // Called by enine to pass updated contents.
 +    void addLazyData(QObject *editorToken, quint64 addr, const QByteArray &data);
 +
 +private:
 +    Q_SLOT void fetchLazyData(Core::IEditor *, quint64 block, bool sync);
 +    Q_SLOT void provideNewRange(Core::IEditor *editor, quint64 address);
 +    Q_SLOT void handleStartOfFileRequested(Core::IEditor *editor);
 +    Q_SLOT void handleEndOfFileRequested(Core::IEditor *editor);
 +
 +    QList<QPointer<Core::IEditor> > m_editors;
 +    QPointer<DebuggerEngine> m_engine;
 +};
 +
 +} // namespace Internal
 +} // namespace Debugger
 +
 +#endif // DEBUGGER_MEMORYAGENT_H
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 3976883,0000000..7ee2ce6
mode 100644,000000..100644
--- /dev/null
@@@ -1,58 -1,0 +1,62 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef GLSLAUTOCOMPLETER_H
 +#define GLSLAUTOCOMPLETER_H
 +
 +#include <texteditor/autocompleter.h>
 +
 +namespace GLSLEditor {
 +namespace Internal {
 +
 +class GLSLCompleter : public TextEditor::AutoCompleter
 +{
 +public:
 +    GLSLCompleter();
 +    virtual ~GLSLCompleter();
 +
 +    virtual bool contextAllowsAutoParentheses(const QTextCursor &cursor,
 +                                              const QString &textToInsert = QString()) const;
 +    virtual bool contextAllowsElectricCharacters(const QTextCursor &cursor) const;
 +    virtual bool isInComment(const QTextCursor &cursor) const;
 +    virtual QString insertMatchingBrace(const QTextCursor &cursor,
 +                                        const QString &text,
 +                                        QChar la,
 +                                        int *skippedChars) const;
 +    virtual QString insertParagraphSeparator(const QTextCursor &cursor) const;
 +};
 +
 +} // Internal
 +} // GLSLEditor
 +
 +#endif // GLSLAUTOCOMPLETER_H
index 1c75cc1,0000000..71d43b9
mode 100644,000000..100644
--- /dev/null
@@@ -1,78 -1,0 +1,82 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +#ifndef GLSLHIGHLIGHTER_H
 +#define GLSLHIGHLIGHTER_H
 +
 +#include <texteditor/syntaxhighlighter.h>
 +
 +namespace GLSLEditor {
 +class GLSLTextEditor;
 +
 +namespace Internal {
 +
 +class Highlighter : public TextEditor::SyntaxHighlighter
 +{
 +    Q_OBJECT
 +
 +public:
 +    enum Formats {
 +        GLSLNumberFormat,
 +        GLSLStringFormat,
 +        GLSLTypeFormat,
 +        GLSLKeywordFormat,
 +        GLSLOperatorFormat,
 +        GLSLPreprocessorFormat,
 +        GLSLLabelFormat,
 +        GLSLCommentFormat,
 +        GLSLDoxygenCommentFormat,
 +        GLSLDoxygenTagFormat,
 +        GLSLVisualWhitespace,
 +        GLSLReservedKeyword,
 +        NumGLSLFormats
 +    };
 +
 +    explicit Highlighter(GLSLTextEditor *editor, QTextDocument *parent);
 +    virtual ~Highlighter();
 +
 +    void setFormats(const QVector<QTextCharFormat> &formats);
 +
 +protected:
 +    void highlightBlock(const QString &text);
 +    void highlightLine(const QString &text, int position, int length, const QTextCharFormat &format);
 +    bool isPPKeyword(const QStringRef &text) const;
 +
 +private:
 +    QTextCharFormat m_formats[NumGLSLFormats];
 +    GLSLTextEditor *m_editor;
 +};
 +
 +} // namespace Internal
 +} // namespace GLSLEditor
 +
 +#endif // GLSLHIGHLIGHTER_H
index e2e9702,0000000..90a91db
mode 100644,000000..100644
--- /dev/null
@@@ -1,73 -1,0 +1,77 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "glslhoverhandler.h"
 +#include "glsleditor.h"
 +
 +#include <coreplugin/editormanager/ieditor.h>
 +#include <coreplugin/editormanager/editormanager.h>
 +#include <coreplugin/helpmanager.h>
 +#include <extensionsystem/pluginmanager.h>
 +#include <texteditor/itexteditor.h>
 +#include <texteditor/basetexteditor.h>
 +
 +#include <QtGui/QTextCursor>
 +#include <QtCore/QUrl>
 +
 +using namespace GLSLEditor;
 +using namespace GLSLEditor::Internal;
 +using namespace Core;
 +
 +GLSLHoverHandler::GLSLHoverHandler(QObject *parent) : BaseHoverHandler(parent)
 +{}
 +
 +GLSLHoverHandler::~GLSLHoverHandler()
 +{}
 +
 +bool GLSLHoverHandler::acceptEditor(IEditor *editor)
 +{
 +    if (qobject_cast<GLSLEditorEditable *>(editor) != 0)
 +        return true;
 +    return false;
 +}
 +
 +void GLSLHoverHandler::identifyMatch(TextEditor::ITextEditor *editor, int pos)
 +{
 +    if (GLSLTextEditor *glslEditor = qobject_cast<GLSLTextEditor *>(editor->widget())) {
 +        if (! glslEditor->extraSelectionTooltip(pos).isEmpty()) {
 +            setToolTip(glslEditor->extraSelectionTooltip(pos));
 +        }
 +    }
 +}
 +
 +void GLSLHoverHandler::decorateToolTip()
 +{
 +    if (Qt::mightBeRichText(toolTip()))
 +        setToolTip(Qt::escape(toolTip()));
 +}
index 816044e,0000000..85ac0c7
mode 100644,000000..100644
--- /dev/null
@@@ -1,59 -1,0 +1,63 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef GLSLINDENTER_H
 +#define GLSLINDENTER_H
 +
 +#include <texteditor/indenter.h>
 +
 +namespace GLSLEditor {
 +namespace Internal {
 +
 +class GLSLIndenter : public TextEditor::Indenter
 +{
 +public:
 +    GLSLIndenter();
 +    virtual ~GLSLIndenter();
 +
 +    virtual bool isElectricCharacter(const QChar &ch) const;
 +    virtual void indentBlock(QTextDocument *doc,
 +                             const QTextBlock &block,
 +                             const QChar &typedChar,
 +                             TextEditor::BaseTextEditor *editor);
 +
 +    virtual void indent(QTextDocument *doc,
 +                        const QTextCursor &cursor,
 +                        const QChar &typedChar,
 +                        TextEditor::BaseTextEditor *editor);
 +};
 +
 +} // Internal
 +} // GLSLEditor
 +
 +#endif // GLSLINDENTER_H
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index b1eef36,0000000..c3d1549
mode 100644,000000..100644
--- /dev/null
@@@ -1,111 -1,0 +1,115 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "localhelpmanager.h"
 +#include "bookmarkmanager.h"
 +
 +#include <coreplugin/coreconstants.h>
 +#include <coreplugin/helpmanager.h>
 +
 +#include <QtCore/QMutexLocker>
 +
 +#include <QtHelp/QHelpEngine>
 +
 +using namespace Help::Internal;
 +
 +QMutex LocalHelpManager::m_guiMutex;
 +QHelpEngine* LocalHelpManager::m_guiEngine = 0;
 +
 +QMutex LocalHelpManager::m_bkmarkMutex;
 +BookmarkManager* LocalHelpManager::m_bookmarkManager = 0;
 +
 +LocalHelpManager::LocalHelpManager(QObject *parent)
 +    : QObject(parent)
 +    , m_guiNeedsSetup(true)
 +    , m_needsCollectionFile(true)
 +{
 +}
 +
 +LocalHelpManager::~LocalHelpManager()
 +{
 +    if (m_bookmarkManager) {
 +        m_bookmarkManager->saveBookmarks();
 +        delete m_bookmarkManager;
 +        m_bookmarkManager = 0;
 +    }
 +
 +    delete m_guiEngine;
 +    m_guiEngine = 0;
 +}
 +
 +void LocalHelpManager::setupGuiHelpEngine()
 +{
 +    if (m_needsCollectionFile) {
 +        m_needsCollectionFile = false;
 +        helpEngine().setCollectionFile(Core::HelpManager::collectionFilePath());
 +    }
 +
 +    if (m_guiNeedsSetup) {
 +        m_guiNeedsSetup = false;
 +        helpEngine().setupData();
 +    }
 +}
 +
 +void LocalHelpManager::setEngineNeedsUpdate()
 +{
 +    m_guiNeedsSetup = true;
 +}
 +
 +QHelpEngine &LocalHelpManager::helpEngine()
 +{
 +    if (!m_guiEngine) {
 +        QMutexLocker _(&m_guiMutex);
 +        if (!m_guiEngine) {
 +            m_guiEngine = new QHelpEngine("");
 +            m_guiEngine->setAutoSaveFilter(false);
 +        }
 +    }
 +    return *m_guiEngine;
 +}
 +
 +BookmarkManager& LocalHelpManager::bookmarkManager()
 +{
 +    if (!m_bookmarkManager) {
 +        QMutexLocker _(&m_bkmarkMutex);
 +        if (!m_bookmarkManager) {
 +            m_bookmarkManager = new BookmarkManager;
 +            m_bookmarkManager->setupBookmarkModels();
 +            const QString &url = QString::fromLatin1("qthelp://com.nokia.qtcreator."
 +                "%1%2%3/doc/index.html").arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR)
 +                .arg(IDE_VERSION_RELEASE);
 +            helpEngine().setCustomValue(QLatin1String("DefaultHomePage"), url);
 +        }
 +    }
 +    return *m_bookmarkManager;
 +}
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 24f1b67,0000000..2ec2631
mode 100644,000000..100644
--- /dev/null
@@@ -1,57 -1,0 +1,61 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef SESSIONNODEIMPL_H
 +#define SESSIONNODEIMPL_H
 +
 +#include "projectnodes.h"
 +
 +namespace ProjectExplorer {
 +class SessionManager;
 +
 +namespace Internal {
 +
 +// Must be in a header as otherwise moc has issues
 +// with ProjectExplorer::SessionNode on msvc2005
 +class SessionNodeImpl : public ProjectExplorer::SessionNode
 +{
 +    Q_OBJECT
 +public:
 +    explicit SessionNodeImpl(SessionManager *manager);
 +
 +    void addProjectNode(ProjectNode *projectNode);
 +    void removeProjectNode(ProjectNode *projectNode);
 +
 +    void setFileName(const QString &fileName);
 +};
 +
 +} // namespace Internal
 +} // namespace ProjectExplorer
 +
 +#endif // SESSIONNODEIMPL_H
Simple merge
index 100239f,0000000..2dc3260
mode 100644,000000..100644
--- /dev/null
@@@ -1,203 -1,0 +1,207 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "itemlibrarycomponents.h"
 +#include "customdraganddrop.h"
 +
 +#include <QtCore/QMimeData>
 +#include <QtCore/QDebug>
 +
 +#include <QtGui/QImage>
 +#include <QtGui/QPixmap>
 +#include <QtGui/QDrag>
 +#include <QPainter>
 +#include <QLabel>
 +#include <itemlibraryinfo.h>
 +#include <QDirModel>
 +#include <QProxyStyle>
 +
 +enum { debug = 0 };
 +
 +namespace QmlDesigner {
 +
 +namespace Internal {
 +
 +static void drawSelectionBackground(QPainter *painter, const QStyleOption &option)
 +{
 +    painter->save();
 +    QLinearGradient gradient;
 +    QColor highlight = option.palette.highlight().color();
 +    gradient.setColorAt(0, highlight.lighter(130));
 +    gradient.setColorAt(1, highlight.darker(130));
 +    gradient.setStart(option.rect.topLeft());
 +    gradient.setFinalStop(option.rect.bottomLeft());
 +    painter->fillRect(option.rect, gradient);
 +    painter->setPen(highlight.lighter());
 +    painter->drawLine(option.rect.topLeft(),option.rect.topRight());
 +    painter->setPen(highlight.darker());
 +    painter->drawLine(option.rect.bottomLeft(),option.rect.bottomRight());
 +    painter->restore();
 +}
 +
 +// This style basically allows us to span the entire row
 +// including the arrow indicators which would otherwise not be
 +// drawn by the delegate
 +class TreeViewStyle : public QProxyStyle
 +{
 +public:
 +    void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget * = 0) const
 +    {
 +        if (element == QStyle::PE_PanelItemViewRow) {
 +            if (option->state & QStyle::State_Selected)
 +                drawSelectionBackground(painter, *option);
 +        }
 +    }
 +    int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const {
 +        if (hint == SH_ItemView_ShowDecorationSelected)
 +            return 0;
 +        else
 +            return QProxyStyle::styleHint(hint, option, widget, returnData);
 +    }
 +};
 +
 +ItemLibraryTreeView::ItemLibraryTreeView(QWidget *parent) :
 +        QTreeView(parent)
 +{
 +    setDragEnabled(true);
 +    setDragDropMode(QAbstractItemView::DragOnly);
 +    setUniformRowHeights(true);
 +    connect(this, SIGNAL(clicked(const QModelIndex &)), this, SLOT(activateItem(const QModelIndex &)));
 +    setHeaderHidden(true);
 +    setIndentation(20);
 +    setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
 +    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
 +    setAttribute(Qt::WA_MacShowFocusRect, false);
 +
 +    TreeViewStyle *style = new TreeViewStyle;
 +    setStyle(style);
 +    style->setParent(this);
 +    m_delegate = new ResourceItemDelegate(this);
 +    setItemDelegateForColumn(0, m_delegate);
 +}
 +
 +// We need to implement startDrag ourselves since we cannot
 +// otherwise influence drag pixmap and hotspot in the standard
 +// implementation.
 +void ItemLibraryTreeView::startDrag(Qt::DropActions /* supportedActions */)
 +{
 +    if (debug)
 +        qDebug() << Q_FUNC_INFO;
 +    QMimeData *mimeData = model()->mimeData(selectedIndexes());
 +    if (!mimeData)
 +        return;
 +
 +    QDirModel *dirModel = qobject_cast<QDirModel*>(model());
 +    Q_ASSERT(dirModel);
 +    QFileInfo fileInfo = dirModel->fileInfo(selectedIndexes().front());
 +    QPixmap pixmap(fileInfo.absoluteFilePath());
 +    if (!pixmap.isNull()) {
 +        CustomItemLibraryDrag *drag = new CustomItemLibraryDrag(this);
 +        drag->setPreview(pixmap);
 +        drag->setPixmap(QIcon(pixmap).pixmap(128, 128));
 +        QMimeData *mimeData = new QMimeData;
 +        mimeData->setData("application/vnd.bauhaus.libraryresource", fileInfo.absoluteFilePath().toLatin1());
 +        drag->setMimeData(mimeData);
 +        drag->exec();
 +    }
 +}
 +
 +void ItemLibraryTreeView::setModel(QAbstractItemModel *model)
 +{
 +    QDirModel *dirModel = dynamic_cast<QDirModel *>(model);
 +    if (dirModel) {
 +        QTreeView::setModel(model);
 +        m_delegate->setModel(dirModel);
 +        setColumnHidden(1, true);
 +        setColumnHidden(2, true);
 +        setColumnHidden(3, true);
 +        setSortingEnabled(true);
 +    }
 +}
 +
 +void ItemLibraryTreeView::activateItem( const QModelIndex & /*index*/)
 +{
 +    QMimeData *mimeData = model()->mimeData(selectedIndexes());
 +    if (!mimeData)
 +        return;
 +
 +    QString name;
 +    QDirModel *dirModel = qobject_cast<QDirModel*>(model());
 +    Q_ASSERT(dirModel);
 +    QFileInfo fileInfo = dirModel->fileInfo(selectedIndexes().front());
 +    QPixmap pixmap(fileInfo.absoluteFilePath());
 +    if (!pixmap.isNull()) {
 +        name = "image^" + fileInfo.absoluteFilePath();
 +        emit itemActivated(name);
 +    }
 +}
 +
 +void ResourceItemDelegate::paint(QPainter *painter,
 +               const QStyleOptionViewItem &option, const QModelIndex &index) const
 +{
 +    if (option.state & QStyle::State_Selected)
 +        drawSelectionBackground(painter, option);
 +
 +    painter->save();
 +
 +    QIcon icon(m_model->fileIcon(index));
 +    QPixmap pixmap(icon.pixmap(icon.availableSizes().front()));
 +    painter->drawPixmap(option.rect.x(),option.rect.y()+2,pixmap);
 +    QString myString(m_model->fileName(index));
 +
 +    // Check text length does not exceed available space
 +    int extraSpace=12+pixmap.width();
 +    QFontMetrics fm(option.font);
 +    myString = fm.elidedText(myString,Qt::ElideMiddle,option.rect.width()-extraSpace);
 +
 +    painter->drawText(option.rect.bottomLeft()+QPoint(3+pixmap.width(),-8),myString);
 +
 +    painter->restore();
 +}
 +
 +QSize ResourceItemDelegate::sizeHint(const QStyleOptionViewItem &/*option*/,
 +                                     const QModelIndex &index) const
 +{
 +    QIcon icon(m_model->fileIcon(index));
 +    return icon.availableSizes().front() + QSize(25, 4);
 +}
 +
 +void ResourceItemDelegate::setModel(QDirModel *model)
 +{
 +    m_model = model;
 +}
 +
 +} // namespace Internal
 +
 +} // namespace QmlDesigner
 +
index e56ae27,0000000..d4a05c9
mode 100644,000000..100644
--- /dev/null
@@@ -1,483 -1,0 +1,487 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "itemlibrarywidget.h"
 +
 +#include <utils/filterlineedit.h>
 +#include <coreplugin/coreconstants.h>
 +#include "itemlibrarycomponents.h"
 +#include "itemlibrarymodel.h"
 +#include "itemlibraryimageprovider.h"
 +#include "customdraganddrop.h"
 +#include <model.h>
 +#include <metainfo.h>
 +
 +#include <QFileInfo>
 +#include <QFileIconProvider>
 +#include <QDirModel>
 +#include <QStackedWidget>
 +#include <QGridLayout>
 +#include <QTabBar>
 +#include <QImageReader>
 +#include <QMimeData>
 +#include <QWheelEvent>
 +#include <QMenu>
 +#include <QApplication>
 +
 +#include <QDeclarativeView>
 +#include <QDeclarativeItem>
 +#include <private/qdeclarativeengine_p.h>
 +
 +
 +namespace QmlDesigner {
 +
 +class MyFileIconProvider : public QFileIconProvider
 +{
 +public:
 +    MyFileIconProvider(const QSize &iconSize)
 +        : QFileIconProvider(),
 +          m_iconSize(iconSize)
 +    {}
 +
 +    virtual QIcon icon ( const QFileInfo & info ) const
 +    {
 +        QPixmap pixmap(info.absoluteFilePath());
 +        if (pixmap.isNull()) {
 +            QIcon defaultIcon(QFileIconProvider::icon(info));
 +            pixmap = defaultIcon.pixmap(defaultIcon.actualSize(m_iconSize));
 +        }
 +
 +        if (pixmap.width() == m_iconSize.width()
 +            && pixmap.height() == m_iconSize.height())
 +            return pixmap;
 +
 +        if ((pixmap.width() > m_iconSize.width())
 +            || (pixmap.height() > m_iconSize.height()))
 +            return pixmap.scaled(m_iconSize, Qt::KeepAspectRatio,
 +                                 Qt::SmoothTransformation);
 +
 +        QPoint offset((m_iconSize.width() - pixmap.width()) / 2,
 +                      (m_iconSize.height() - pixmap.height()) / 2);
 +        QImage newIcon(m_iconSize, QImage::Format_ARGB32_Premultiplied);
 +        newIcon.fill(Qt::transparent);
 +        QPainter painter(&newIcon);
 +        painter.drawPixmap(offset, pixmap);
 +        return QPixmap::fromImage(newIcon);
 +    }
 +
 +private:
 +    QSize m_iconSize;
 +};
 +
 +
 +// ---------- ItemLibraryPrivate
 +class ItemLibraryWidgetPrivate {
 +public:
 +    ItemLibraryWidgetPrivate(QObject *object);
 +
 +    Internal::ItemLibraryModel *m_itemLibraryModel;
 +    QDirModel *m_resourcesDirModel;
 +
 +    QStackedWidget *m_stackedWidget;
 +    Utils::FilterLineEdit *m_lineEdit;
 +    QDeclarativeView *m_itemsView;
 +    Internal::ItemLibraryTreeView *m_resourcesView;
 +    QWeakPointer<ItemLibraryInfo> m_itemLibraryInfo;
 +
 +    QSize m_itemIconSize, m_resIconSize;
 +    MyFileIconProvider m_iconProvider;
 +    Model *model;
 +};
 +
 +ItemLibraryWidgetPrivate::ItemLibraryWidgetPrivate(QObject *object) :
 +    m_itemLibraryModel(0),
 +    m_resourcesDirModel(0),
 +    m_stackedWidget(0),
 +    m_lineEdit(0),
 +    m_itemsView(0),
 +    m_resourcesView(0),
 +    m_itemIconSize(24, 24),
 +    m_resIconSize(24, 24),
 +    m_iconProvider(m_resIconSize),
 +    model(0)
 +{
 +    Q_UNUSED(object);
 +}
 +
 +ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
 +    QFrame(parent),
 +    m_d(new ItemLibraryWidgetPrivate(this)),
 +    m_filterFlag(QtBasic)
 +{
 +    setWindowTitle(tr("Library", "Title of library view"));
 +
 +    /* create Items view and its model */
 +    m_d->m_itemsView = new QDeclarativeView(this);
 +    m_d->m_itemsView->setAttribute(Qt::WA_OpaquePaintEvent);
 +    m_d->m_itemsView->setAttribute(Qt::WA_NoSystemBackground);
 +    m_d->m_itemsView->setAcceptDrops(false);
 +    m_d->m_itemsView->setFocusPolicy(Qt::ClickFocus);
 +    m_d->m_itemsView->setResizeMode(QDeclarativeView::SizeRootObjectToView);
 +    m_d->m_itemLibraryModel = new Internal::ItemLibraryModel(QDeclarativeEnginePrivate::getScriptEngine(m_d->m_itemsView->engine()), this);
 +    m_d->m_itemLibraryModel->setItemIconSize(m_d->m_itemIconSize);
 +
 +    QDeclarativeContext *rootContext = m_d->m_itemsView->rootContext();
 +    rootContext->setContextProperty(QLatin1String("itemLibraryModel"), m_d->m_itemLibraryModel);
 +    rootContext->setContextProperty(QLatin1String("itemLibraryIconWidth"), m_d->m_itemIconSize.width());
 +    rootContext->setContextProperty(QLatin1String("itemLibraryIconHeight"), m_d->m_itemIconSize.height());
 +
 +    QColor highlightColor = palette().highlight().color();
 +    if (0.5*highlightColor.saturationF()+0.75-highlightColor.valueF() < 0)
 +        highlightColor.setHsvF(highlightColor.hsvHueF(),0.1 + highlightColor.saturationF()*2.0, highlightColor.valueF());
 +    m_d->m_itemsView->rootContext()->setContextProperty(QLatin1String("highlightColor"), highlightColor);
 +
 +    // loading the qml has to come after all needed context properties are set
 +    m_d->m_itemsView->setSource(QUrl("qrc:/ItemLibrary/qml/ItemsView.qml"));
 +
 +    QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(m_d->m_itemsView->rootObject());
 +    connect(rootItem, SIGNAL(itemSelected(int)), this, SLOT(showItemInfo(int)));
 +    connect(rootItem, SIGNAL(itemDragged(int)), this, SLOT(startDragAndDrop(int)));
 +    connect(this, SIGNAL(scrollItemsView(QVariant)), rootItem, SLOT(scrollView(QVariant)));
 +    connect(this, SIGNAL(resetItemsView()), rootItem, SLOT(resetView()));
 +
 +    /* create Resources view and its model */
 +    m_d->m_resourcesDirModel = new QDirModel(this);
 +    m_d->m_resourcesDirModel->setIconProvider(&m_d->m_iconProvider);
 +    m_d->m_resourcesView = new Internal::ItemLibraryTreeView(this);
 +    m_d->m_resourcesView->setModel(m_d->m_resourcesDirModel);
 +    m_d->m_resourcesView->setIconSize(m_d->m_resIconSize);
 +
 +    /* create image provider for loading item icons */
 +    m_d->m_itemsView->engine()->addImageProvider(QLatin1String("qmldesigner_itemlibrary"), new Internal::ItemLibraryImageProvider);
 +
 +    /* other widgets */
 +    QTabBar *tabBar = new QTabBar(this);
 +    tabBar->addTab(tr("Items", "Title of library items view"));
 +    tabBar->addTab(tr("Resources", "Title of library resources view"));
 +    tabBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
 +
 +    m_d->m_lineEdit = new Utils::FilterLineEdit(this);
 +    m_d->m_lineEdit->setObjectName(QLatin1String("itemLibrarySearchInput"));
 +    m_d->m_lineEdit->setPlaceholderText(tr("<Filter>", "Library search input hint text"));
 +    m_d->m_lineEdit->setDragEnabled(false);
 +    m_d->m_lineEdit->setMinimumWidth(75);
 +    m_d->m_lineEdit->setTextMargins(0, 0, 20, 0);
 +    QWidget *lineEditFrame = new QWidget(this);
 +    lineEditFrame->setObjectName(QLatin1String("itemLibrarySearchInputFrame"));
 +    QGridLayout *lineEditLayout = new QGridLayout(lineEditFrame);
 +    lineEditLayout->setMargin(2);
 +    lineEditLayout->setSpacing(0);
 +    lineEditLayout->addItem(new QSpacerItem(5, 3, QSizePolicy::Fixed, QSizePolicy::Fixed), 0, 0, 1, 3);
 +    lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 0);
 +    lineEditLayout->addWidget(m_d->m_lineEdit, 1, 1, 1, 1);
 +    lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 2);
 +    connect(m_d->m_lineEdit, SIGNAL(filterChanged(QString)), this, SLOT(setSearchFilter(QString)));
 +
 +    m_d->m_stackedWidget = new QStackedWidget(this);
 +    m_d->m_stackedWidget->addWidget(m_d->m_itemsView);
 +    m_d->m_stackedWidget->addWidget(m_d->m_resourcesView);
 +    connect(tabBar, SIGNAL(currentChanged(int)),
 +            m_d->m_stackedWidget, SLOT(setCurrentIndex(int)));
 +    connect(tabBar, SIGNAL(currentChanged(int)),
 +            this, SLOT(updateSearch()));
 +
 +    QWidget *spacer = new QWidget(this);
 +    spacer->setObjectName(QLatin1String("itemLibrarySearchInputSpacer"));
 +    spacer->setFixedHeight(4);
 +
 +    QGridLayout *layout = new QGridLayout(this);
 +    layout->setContentsMargins(0, 0, 0, 0);
 +    layout->setSpacing(0);
 +    layout->addWidget(tabBar, 0, 0, 1, 1);
 +    layout->addWidget(spacer, 1, 0);
 +    layout->addWidget(lineEditFrame, 2, 0, 1, 1);
 +    layout->addWidget(m_d->m_stackedWidget, 3, 0, 1, 1);
 +
 +    setResourcePath(QDir::currentPath());
 +    setSearchFilter(QString());
 +
 +    /* style sheets */
 +    {
 +        QFile file(":/qmldesigner/stylesheet.css");
 +        file.open(QFile::ReadOnly);
 +        QString styleSheet = QLatin1String(file.readAll());
 +        setStyleSheet(styleSheet);
 +    }
 +
 +    {
 +        QFile file(":/qmldesigner/scrollbar.css");
 +        file.open(QFile::ReadOnly);
 +        QString styleSheet = QLatin1String(file.readAll());
 +        m_d->m_resourcesView->setStyleSheet(styleSheet);
 +    }
 +}
 +
 +ItemLibraryWidget::~ItemLibraryWidget()
 +{
 +    /* workaround: delete the items view before the model is deleted.
 +       This prevents qml warnings when the item library is destructed. */
 +    delete m_d->m_itemsView;
 +    delete m_d->m_resourcesView;
 +    delete m_d;
 +}
 +
 +void ItemLibraryWidget::setItemLibraryInfo(ItemLibraryInfo *itemLibraryInfo)
 +{
 +    if (m_d->m_itemLibraryInfo.data() == itemLibraryInfo)
 +        return;
 +
 +    if (m_d->m_itemLibraryInfo)
 +        disconnect(m_d->m_itemLibraryInfo.data(), SIGNAL(entriesChanged()),
 +                   this, SLOT(updateModel()));
 +    m_d->m_itemLibraryInfo = itemLibraryInfo;
 +    if (itemLibraryInfo)
 +        connect(m_d->m_itemLibraryInfo.data(), SIGNAL(entriesChanged()),
 +                this, SLOT(updateModel()));
 +
 +    updateModel();
 +    updateSearch();
 +}
 +
 +void ItemLibraryWidget::updateImports()
 +{
 +    FilterChangeFlag filter;
 +    filter = QtBasic;
 +    if (m_d->model) {
 +        QStringList imports;
 +        foreach (const Import &import, m_d->model->imports())
 +            if (import.isLibraryImport())
 +                imports << import.url();
 +        if (imports.contains("Qt.labs.Symbian", Qt::CaseInsensitive))
 +            filter = Symbian;
 +        if (imports.contains("com.Meego", Qt::CaseInsensitive))
 +            filter = Meego;
 +    }
 +
 +    setImportFilter(filter);
 +}
 +
 +QList<QToolButton *> ItemLibraryWidget::createToolBarWidgets()
 +{
 +    QList<QToolButton *> buttons;
 +    buttons << new QToolButton();
 +    buttons.first()->setText("I ");
 +    buttons.first()->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER)));
 +    buttons.first()->setToolTip("Manage imports for components");
 +    buttons.first()->setPopupMode(QToolButton::InstantPopup);
 +    QMenu * menu = new QMenu;
 +    QAction * basicQtAction = new QAction(menu);
 +    basicQtAction->setCheckable(true);
 +    basicQtAction->setText("Basic Qt Quick only");
 +    QAction * symbianAction = new QAction(menu);
 +    symbianAction->setCheckable(true);
 +    symbianAction->setText("Symbian Components");
 +    QAction * meegoAction= new QAction(menu);
 +    meegoAction->setCheckable(true);
 +    meegoAction->setText("Meego Components");
 +    menu->addAction(basicQtAction);
 +    menu->addAction(meegoAction);
 +    menu->addAction(symbianAction);
 +    buttons.first()->setMenu(menu);
 +
 +    connect(basicQtAction, SIGNAL(toggled(bool)), this, SLOT(onQtBasicOnlyChecked(bool)));
 +    connect(this, SIGNAL(qtBasicOnlyChecked(bool)), basicQtAction, SLOT(setChecked(bool)));
 +
 +    connect(symbianAction, SIGNAL(toggled(bool)), this, SLOT(onSymbianChecked(bool)));
 +    connect(this, SIGNAL(symbianChecked(bool)), symbianAction, SLOT(setChecked(bool)));
 +
 +    connect(meegoAction, SIGNAL(toggled(bool)), this, SLOT(onMeegoChecked(bool)));
 +    connect(this, SIGNAL(meegoChecked(bool)), meegoAction, SLOT(setChecked(bool)));
 +
 +    updateImports();
 +
 +    return buttons;
 +}
 +
 +void ItemLibraryWidget::setSearchFilter(const QString &searchFilter)
 +{
 +    if (m_d->m_stackedWidget->currentIndex() == 0) {
 +        m_d->m_itemLibraryModel->setSearchText(searchFilter);
 +        emit resetItemsView();
 +        m_d->m_itemsView->update();
 +    } else {
 +        QStringList nameFilterList;
 +        if (searchFilter.contains('.')) {
 +            nameFilterList.append(QString("*%1*").arg(searchFilter));
 +        } else {
 +            foreach (const QByteArray &extension, QImageReader::supportedImageFormats()) {
 +                nameFilterList.append(QString("*%1*.%2").arg(searchFilter, QString::fromAscii(extension)));
 +            }
 +        }
 +
 +        m_d->m_resourcesDirModel->setFilter(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
 +        m_d->m_resourcesDirModel->setNameFilters(nameFilterList);
 +        m_d->m_resourcesView->expandToDepth(1);
 +        m_d->m_resourcesView->scrollToTop();
 +    }
 +}
 +
 +void ItemLibraryWidget::setModel(Model *model)
 +{
 +    m_d->model = model;
 +    if (!model)
 +        return;
 +    setItemLibraryInfo(model->metaInfo().itemLibraryInfo());
 +    updateModel();
 +}
 +
 +
 +void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
 +{
 +
 +    static bool block = false;
 +    if (!m_d->model)
 +        return;
 +    if (flag == m_filterFlag)
 +        return;
 +
 +    if (block == true)
 +        return;
 +
 +    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 +
 +    block = true;
 +    if (flag == QtBasic) {
 +        removeImport(QLatin1String("com.meego"));
 +        removeImport(QLatin1String("Qt.labs.Symbian"));
 +        emit qtBasicOnlyChecked(true);
 +        emit meegoChecked(false);
 +        emit symbianChecked(false);
 +    } else  if (flag == Symbian) {
 +        removeImport(QLatin1String("com.meego"));
 +        addImport(QLatin1String("Qt.labs.Symbian"), QLatin1String("1.0"));
 +        emit qtBasicOnlyChecked(false);
 +        emit meegoChecked(false);
 +        emit symbianChecked(true);
 +    }  else  if (flag == Meego) {
 +        removeImport(QLatin1String("Qt.labs.Symbian"));
 +        addImport(QLatin1String("com.meego"), QLatin1String("1.0"));
 +        emit qtBasicOnlyChecked(false);
 +        emit meegoChecked(true);
 +        emit symbianChecked(false);
 +    }
 +    QApplication::restoreOverrideCursor();
 +    block = false;
 +    m_filterFlag = flag;
 +}
 +
 +void ItemLibraryWidget::onQtBasicOnlyChecked(bool b)
 +{
 +    if (b)
 +        setImportFilter(QtBasic);
 +
 +}
 +
 +void ItemLibraryWidget::onMeegoChecked(bool b)
 +{
 +    if (b)
 +        setImportFilter(Meego);
 +}
 +
 +void ItemLibraryWidget::onSymbianChecked(bool b)
 +{
 +    if (b)
 +        setImportFilter(Symbian);
 +}
 +
 +
 +
 +void ItemLibraryWidget::updateModel()
 +{
 +    m_d->m_itemLibraryModel->update(m_d->m_itemLibraryInfo.data(), m_d->model);
 +    updateImports();
 +    updateSearch();
 +}
 +
 +void ItemLibraryWidget::updateSearch()
 +{
 +    setSearchFilter(m_d->m_lineEdit->text());
 +}
 +
 +void ItemLibraryWidget::setResourcePath(const QString &resourcePath)
 +{
 +    if (m_d->m_resourcesView->model() == m_d->m_resourcesDirModel)
 +        m_d->m_resourcesView->setRootIndex(m_d->m_resourcesDirModel->index(resourcePath));
 +    updateSearch();
 +}
 +
 +void ItemLibraryWidget::startDragAndDrop(int itemLibId)
 +{
 +    QMimeData *mimeData = m_d->m_itemLibraryModel->getMimeData(itemLibId);
 +    CustomItemLibraryDrag *drag = new CustomItemLibraryDrag(this);
 +    const QImage image = qvariant_cast<QImage>(mimeData->imageData());
 +
 +    drag->setPixmap(m_d->m_itemLibraryModel->getIcon(itemLibId).pixmap(32, 32));
 +    drag->setPreview(QPixmap::fromImage(image));
 +    drag->setMimeData(mimeData);
 +
 +    QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(m_d->m_itemsView->rootObject());
 +    connect(rootItem, SIGNAL(stopDragAndDrop()), drag, SLOT(stopDrag()));
 +
 +    drag->exec();
 +}
 +
 +void ItemLibraryWidget::showItemInfo(int /*itemLibId*/)
 +{
 +//    qDebug() << "showing item info about id" << itemLibId;
 +}
 +
 +void ItemLibraryWidget::wheelEvent(QWheelEvent *event)
 +{
 +    if (m_d->m_stackedWidget->currentIndex() == 0 &&
 +        m_d->m_itemsView->rect().contains(event->pos())) {
 +        emit scrollItemsView(event->delta());
 +        event->accept();
 +    } else
 +        QFrame::wheelEvent(event);
 +}
 +
 + void ItemLibraryWidget::removeImport(const QString &name)
 + {
 +     if (!m_d->model)
 +         return;
 +     foreach (const Import &import, m_d->model->imports())
 +         if (import.isLibraryImport() && import.url().compare(name, Qt::CaseInsensitive) == 0)
 +             m_d->model->removeImport(import);
 + }
 +
 + void ItemLibraryWidget::addImport(const QString &name, const QString &version)
 + {
 +     if (!m_d->model)
 +         return;
 +
 +     m_d->model->addImport(Import::createLibraryImport(name, version));
 +
 + }
 +
 +}
index cd5ee4c,0000000..3e9c5ae
mode 100644,000000..100644
--- /dev/null
@@@ -1,103 -1,0 +1,107 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef ITEMLIBRARYWIDGET_H
 +#define ITEMLIBRARYWIDGET_H
 +
 +#include "itemlibraryinfo.h"
 +#include <QtGui/QFrame>
 +#include <QtGui/QToolButton>
 +
 +namespace QmlDesigner {
 +
 +class ItemLibraryWidgetPrivate;
 +class MetaInfo;
 +class ItemLibraryEntry;
 +class Model;
 +
 +class ItemLibraryWidget : public QFrame
 +{
 +    Q_OBJECT
 +    Q_DISABLE_COPY(ItemLibraryWidget)
 +
 +    enum FilterChangeFlag {
 +      QtBasic = 0x0,
 +      Meego = 0x1,
 +      Symbian = 0x2
 +    };
 +
 +public:
 +    ItemLibraryWidget(QWidget *parent = 0);
 +    virtual ~ItemLibraryWidget();
 +
 +    void setItemLibraryInfo(ItemLibraryInfo *itemLibraryInfo);
 +    QList<QToolButton *> createToolBarWidgets();
 +
 +    void updateImports();
 +
 +public Q_SLOTS:
 +    void setSearchFilter(const QString &searchFilter);
 +    void updateModel();
 +    void updateSearch();
 +
 +    void setResourcePath(const QString &resourcePath);
 +
 +    void startDragAndDrop(int itemLibId);
 +    void showItemInfo(int itemLibId);
 +
 +    void setModel(Model *model);
 +
 +    void setImportFilter(FilterChangeFlag flag);
 +
 +    void onQtBasicOnlyChecked(bool b);
 +    void onMeegoChecked(bool b);
 +    void onSymbianChecked(bool b);
 +
 +protected:
 +    void wheelEvent(QWheelEvent *event);
 +    void removeImport(const QString &name);
 +    void addImport(const QString &name, const QString &version);
 +
 +signals:
 +    void itemActivated(const QString& itemName);
 +    void scrollItemsView(QVariant delta);
 +    void resetItemsView();
 +    void qtBasicOnlyChecked(bool b);
 +    void meegoChecked(bool b);
 +    void symbianChecked(bool b);
 +
 +private:
 +    ItemLibraryWidgetPrivate *m_d;
 +    FilterChangeFlag m_filterFlag;
 +};
 +
 +}
 +
 +#endif // ITEMLIBRARYWIDGET_H
 +
@@@ -1,13 -1,53 +1,46 @@@
 -#ifndef NODEINSTANCE_H
 -#define NODEINSTANCE_H
+ /**************************************************************************
+ **
+ ** This file is part of Qt Creator
+ **
+ ** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ **
+ ** Contact: Nokia Corporation (qt-info@nokia.com)
+ **
+ ** No Commercial Usage
+ **
+ ** This file contains pre-release code and may not be distributed.
+ ** You may use this file in accordance with the terms and conditions
+ ** contained in the Technology Preview License Agreement accompanying
+ ** this package.
+ **
+ ** GNU Lesser General Public License Usage
+ **
+ ** Alternatively, this file may be used under the terms of the GNU Lesser
+ ** General Public License version 2.1 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.LGPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU Lesser General Public License version 2.1 requirements
+ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain additional
+ ** rights.  These rights are described in the Nokia Qt LGPL Exception
+ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+ **
+ ** If you have questions regarding the use of this file, please contact
+ ** Nokia at qt-info@nokia.com.
+ **
+ **************************************************************************/
 +#ifndef PROXYNODEINSTANCE_H
 +#define PROXYNODEINSTANCE_H
  
 -#include "corelib_global.h"
  #include <QSharedPointer>
 -#include <QHash>
 -#include <QRectF>
 -#include <propertymetainfo.h>
 -#include <qmlanchors.h>
 +#include <QTransform>
 +#include <QPointF>
 +#include <QSizeF>
 +#include <QPair>
  
 -QT_BEGIN_NAMESPACE
 -class QPainter;
 -class QStyleOptionGraphicsItem;
 -class QDeclarativeContext;
 -class QGraphicsItem;
 -class QGraphicsTransform;
 -QT_END_NAMESPACE
 +#include "commondefines.h"
  
  namespace QmlDesigner {
  
@@@ -1,52 -1,86 +1,85 @@@
+ /**************************************************************************
+ **
+ ** This file is part of Qt Creator
+ **
+ ** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ **
+ ** Contact: Nokia Corporation (qt-info@nokia.com)
+ **
+ ** No Commercial Usage
+ **
+ ** This file contains pre-release code and may not be distributed.
+ ** You may use this file in accordance with the terms and conditions
+ ** contained in the Technology Preview License Agreement accompanying
+ ** this package.
+ **
+ ** GNU Lesser General Public License Usage
+ **
+ ** Alternatively, this file may be used under the terms of the GNU Lesser
+ ** General Public License version 2.1 as published by the Free Software
+ ** Foundation and appearing in the file LICENSE.LGPL included in the
+ ** packaging of this file.  Please review the following information to
+ ** ensure the GNU Lesser General Public License version 2.1 requirements
+ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain additional
+ ** rights.  These rights are described in the Nokia Qt LGPL Exception
+ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+ **
+ ** If you have questions regarding the use of this file, please contact
+ ** Nokia at qt-info@nokia.com.
+ **
+ **************************************************************************/
  #include "nodeinstance.h"
  
 -#include "objectnodeinstance.h"
 -#include "metainfo.h"
 -#include "graphicswidgetnodeinstance.h"
 -#include "widgetnodeinstance.h"
 -#include "qmlgraphicsitemnodeinstance.h"
 -#include "graphicsscenenodeinstance.h"
 -#include "graphicsviewnodeinstance.h"
 -#include "nodeinstanceview.h"
 -#include "qmlviewnodeinstance.h"
 -#include "dummynodeinstance.h"
 -#include "componentnodeinstance.h"
 -#include "qmltransitionnodeinstance.h"
 -#include "qmlpropertychangesnodeinstance.h"
 -#include "positionernodeinstance.h"
 -#include "behaviornodeinstance.h"
 -#include "qmlstatenodeinstance.h"
 -#include "nodeabstractproperty.h"
 -#include "variantproperty.h"
 -
 -#include <invalidnodeinstanceexception.h>
 -
 -#include <QHash>
 -#include <QSet>
 -
 -#include <QtDeclarative/QDeclarativeEngine>
 -
 -/*!
 -  \class QmlDesigner::NodeInstance
 -  \ingroup CoreInstance
 -  \brief NodeInstance is a common handle for the actual object representation of a ModelNode.
 -
 -   NodeInstance abstracts away the differences e.g. in terms of position and size
 -   for QWidget, QGraphicsView, QLayout etc objects. Multiple NodeInstance objects can share
 -   the pointer to the same instance object. The actual instance will be deleted when
 -   the last NodeInstance object referencing to it is deleted. This can be disabled by
 -   setDeleteHeldInstance().
 -
 -   \see QmlDesigner::NodeInstanceView
 -*/
 +#include <QPainter>
 +#include <modelnode.h>
 +#include "commondefines.h"
  
 -namespace QmlDesigner {
 +#include <QtDebug>
  
 -/*!
 -\brief Constructor - creates a invalid NodeInstance
 +namespace QmlDesigner {
  
 +class ProxyNodeInstanceData
 +{
 +public:
 +    ProxyNodeInstanceData()
 +        : parentInstanceId(-1),
 +          penWidth(1),
 +          isAnchoredBySibling(false),
 +          isAnchoredByChildren(false),
 +          hasContent(false),
 +          isMovable(false),
 +          isResizable(false),
 +          isInPositioner(false)
 +    {}
 +
 +    qint32 parentInstanceId;
 +    ModelNode modelNode;
 +    QRectF boundingRect;
 +    QPointF position;
 +    QSizeF size;
 +    QTransform transform;
 +    QTransform sceneTransform;
 +    int penWidth;
 +    bool isAnchoredBySibling;
 +    bool isAnchoredByChildren;
 +    bool hasContent;
 +    bool isMovable;
 +    bool isResizable;
 +    bool isInPositioner;
 +
 +
 +    QHash<QString, QVariant> propertyValues;
 +    QHash<QString, bool> hasBindingForProperty;
 +    QHash<QString, bool> hasAnchors;
 +    QHash<QString, QString> instanceTypes;
 +
 +    QImage renderImage;
 +    QHash<QString, QPair<QString, qint32> > anchors;
 +};
  
 -\see NodeInstanceView
 -*/
  NodeInstance::NodeInstance()
  {
  }
index 6750c03,0000000..2ce37d4
mode 100644,000000..100644
--- /dev/null
@@@ -1,58 -1,0 +1,62 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef SymbianPLUGIN_H
 +#define SymbianPLUGIN_H
 +
 +#include <iwidgetplugin.h>
 +#include <QtDeclarative/qdeclarative.h>
 +
 +QT_BEGIN_NAMESPACE
 +QT_END_NAMESPACE
 +
 +namespace QmlDesigner {
 +
 +class SymbianPlugin : public QObject, QmlDesigner::IWidgetPlugin
 +{
 +    Q_OBJECT
 +    Q_DISABLE_COPY(SymbianPlugin)
 +    Q_INTERFACES(QmlDesigner::IWidgetPlugin)
 +public:
 +    SymbianPlugin();
 +    ~SymbianPlugin() {}
 +
 +    QString metaInfo();
 +    QString pluginName();
 +
 +};
 +
 +} // namespace QmlDesigner
 +
 +
 +#endif // SymbianPLUGIN_H
index 003a019,0000000..6a26e52
mode 100644,000000..100644
--- /dev/null
@@@ -1,58 -1,0 +1,62 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef QMLJSAUTOCOMPLETER_H
 +#define QMLJSAUTOCOMPLETER_H
 +
 +#include <texteditor/autocompleter.h>
 +
 +namespace QmlJSEditor {
 +namespace Internal {
 +
 +class AutoCompleter : public TextEditor::AutoCompleter
 +{
 +public:
 +    AutoCompleter();
 +    virtual ~AutoCompleter();
 +
 +    virtual bool contextAllowsAutoParentheses(const QTextCursor &cursor,
 +                                              const QString &textToInsert = QString()) const;
 +    virtual bool contextAllowsElectricCharacters(const QTextCursor &cursor) const;
 +    virtual bool isInComment(const QTextCursor &cursor) const;
 +    virtual QString insertMatchingBrace(const QTextCursor &tc,
 +                                          const QString &text,
 +                                          QChar la,
 +                                          int *skippedChars) const;
 +    virtual QString insertParagraphSeparator(const QTextCursor &tc) const;
 +};
 +
 +} // Internal
 +} // QmlJSEditor
 +
 +#endif // QMLJSAUTOCOMPLETER_H
Simple merge
  ** ensure the GNU Lesser General Public License version 2.1 requirements
  ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  **
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
+ ** In addition, as a special exception, Nokia gives you certain additional
+ ** rights.  These rights are described in the Nokia Qt LGPL Exception
+ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+ **
+ ** If you have questions regarding the use of this file, please contact
+ ** Nokia at qt-info@nokia.com.
  **
  **************************************************************************/
 +
  #include "qmljsinspectorconstants.h"
  #include "qmljsinspector.h"
  #include "qmlinspectortoolbar.h"
index 8f9793c,0000000..69f43c5
mode 100644,000000..100644
--- /dev/null
@@@ -1,535 -1,0 +1,539 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "qmljsmodelmanager.h"
 +#include "qmljstoolsconstants.h"
 +#include "qmljsplugindumper.h"
 +
 +#include <coreplugin/icore.h>
 +#include <coreplugin/editormanager/editormanager.h>
 +#include <coreplugin/progressmanager/progressmanager.h>
 +#include <coreplugin/mimedatabase.h>
 +#include <qmljs/qmljsinterpreter.h>
 +#include <qmljs/qmljsbind.h>
 +#include <qmljs/parser/qmldirparser_p.h>
 +#include <texteditor/itexteditor.h>
 +#include <texteditor/basetexteditor.h>
 +#include <projectexplorer/project.h>
 +#include <projectexplorer/projectexplorer.h>
 +#include <projectexplorer/projectexplorerconstants.h>
 +
 +#include <QDir>
 +#include <QFile>
 +#include <QFileInfo>
 +#include <QLibraryInfo>
 +#include <QtConcurrentRun>
 +#include <qtconcurrent/runextensions.h>
 +#include <QTextStream>
 +#include <QCoreApplication>
 +
 +#include <QDebug>
 +
 +using namespace QmlJS;
 +using namespace QmlJSTools;
 +using namespace QmlJSTools::Internal;
 +
 +static QStringList environmentImportPaths();
 +
 +ModelManager::ModelManager(QObject *parent):
 +        ModelManagerInterface(parent),
 +        m_core(Core::ICore::instance()),
 +        m_pluginDumper(new PluginDumper(this))
 +{
 +    m_synchronizer.setCancelOnWait(true);
 +
 +    qRegisterMetaType<QmlJS::Document::Ptr>("QmlJS::Document::Ptr");
 +    qRegisterMetaType<QmlJS::LibraryInfo>("QmlJS::LibraryInfo");
 +
 +    loadQmlTypeDescriptions();
 +
 +    m_defaultImportPaths << environmentImportPaths();
 +    updateImportPaths();
 +}
 +
 +void ModelManager::loadQmlTypeDescriptions()
 +{
 +    if (Core::ICore::instance()) {
 +        loadQmlTypeDescriptions(Core::ICore::instance()->resourcePath());
 +        loadQmlTypeDescriptions(Core::ICore::instance()->userResourcePath());
 +    }
 +}
 +
 +void ModelManager::loadQmlTypeDescriptions(const QString &resourcePath)
 +{
 +    const QDir typeFileDir(resourcePath + QLatin1String("/qml-type-descriptions"));
 +    const QStringList xmlExtensions = QStringList() << QLatin1String("*.xml");
 +    const QFileInfoList xmlFiles = typeFileDir.entryInfoList(xmlExtensions,
 +                                                             QDir::Files,
 +                                                             QDir::Name);
 +
 +    const QStringList errors = Interpreter::CppQmlTypesLoader::load(xmlFiles);
 +    foreach (const QString &error, errors)
 +        qWarning() << qPrintable(error);
 +
 +    // disabled for now: Prefer the xml file until the type dumping functionality
 +    // has been moved into Qt.
 +    // loads the builtin types
 +    //loadQmlPluginTypes(QString());
 +}
 +
 +ModelManagerInterface::WorkingCopy ModelManager::workingCopy() const
 +{
 +    WorkingCopy workingCopy;
 +    if (!m_core)
 +        return workingCopy;
 +
 +    Core::EditorManager *editorManager = m_core->editorManager();
 +
 +    foreach (Core::IEditor *editor, editorManager->openedEditors()) {
 +        const QString key = editor->file()->fileName();
 +
 +        if (TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor)) {
 +            if (textEditor->context().contains(ProjectExplorer::Constants::LANG_QMLJS)) {
 +                if (TextEditor::BaseTextEditor *ed = qobject_cast<TextEditor::BaseTextEditor *>(textEditor->widget())) {
 +                    workingCopy.insert(key, ed->toPlainText(), ed->document()->revision());
 +                }
 +            }
 +        }
 +    }
 +
 +    return workingCopy;
 +}
 +
 +Snapshot ModelManager::snapshot() const
 +{
 +    QMutexLocker locker(&m_mutex);
 +
 +    return _snapshot;
 +}
 +
 +void ModelManager::updateSourceFiles(const QStringList &files,
 +                                     bool emitDocumentOnDiskChanged)
 +{
 +    refreshSourceFiles(files, emitDocumentOnDiskChanged);
 +}
 +
 +QFuture<void> ModelManager::refreshSourceFiles(const QStringList &sourceFiles,
 +                                               bool emitDocumentOnDiskChanged)
 +{
 +    if (sourceFiles.isEmpty()) {
 +        return QFuture<void>();
 +    }
 +
 +    QFuture<void> result = QtConcurrent::run(&ModelManager::parse,
 +                                              workingCopy(), sourceFiles,
 +                                              this,
 +                                              emitDocumentOnDiskChanged);
 +
 +    if (m_synchronizer.futures().size() > 10) {
 +        QList<QFuture<void> > futures = m_synchronizer.futures();
 +
 +        m_synchronizer.clearFutures();
 +
 +        foreach (QFuture<void> future, futures) {
 +            if (! (future.isFinished() || future.isCanceled()))
 +                m_synchronizer.addFuture(future);
 +        }
 +    }
 +
 +    m_synchronizer.addFuture(result);
 +
 +    if (sourceFiles.count() > 1) {
 +        m_core->progressManager()->addTask(result, tr("Indexing"),
 +                        Constants::TASK_INDEX);
 +    }
 +
 +    return result;
 +}
 +
 +void ModelManager::fileChangedOnDisk(const QString &path)
 +{
 +    QtConcurrent::run(&ModelManager::parse,
 +                      workingCopy(), QStringList() << path,
 +                      this, true);
 +}
 +
 +void ModelManager::removeFiles(const QStringList &files)
 +{
 +    emit aboutToRemoveFiles(files);
 +
 +    QMutexLocker locker(&m_mutex);
 +
 +    foreach (const QString &file, files)
 +        _snapshot.remove(file);
 +}
 +
 +QList<ModelManager::ProjectInfo> ModelManager::projectInfos() const
 +{
 +    QMutexLocker locker(&m_mutex);
 +
 +    return m_projects.values();
 +}
 +
 +ModelManager::ProjectInfo ModelManager::projectInfo(ProjectExplorer::Project *project) const
 +{
 +    QMutexLocker locker(&m_mutex);
 +
 +    return m_projects.value(project, ProjectInfo(project));
 +}
 +
 +void ModelManager::updateProjectInfo(const ProjectInfo &pinfo)
 +{
 +    if (! pinfo.isValid())
 +        return;
 +
 +    Snapshot snapshot;
 +    ProjectInfo oldInfo;
 +    {
 +        QMutexLocker locker(&m_mutex);
 +        oldInfo = m_projects.value(pinfo.project);
 +        m_projects.insert(pinfo.project, pinfo);
 +        snapshot = _snapshot;
 +
 +        if (oldInfo.qmlDumpPath != pinfo.qmlDumpPath)
 +            m_pluginDumper->scheduleCompleteRedump();
 +    }
 +
 +    updateImportPaths();
 +
 +    // remove files that are no longer in the project and have been deleted
 +    QStringList deletedFiles;
 +    foreach (const QString &oldFile, oldInfo.sourceFiles) {
 +        if (snapshot.document(oldFile)
 +                && !pinfo.sourceFiles.contains(oldFile)
 +                && !QFile::exists(oldFile)) {
 +            deletedFiles += oldFile;
 +        }
 +    }
 +    removeFiles(deletedFiles);
 +
 +    // parse any files not yet in the snapshot
 +    QStringList newFiles;
 +    foreach (const QString &file, pinfo.sourceFiles) {
 +        if (!snapshot.document(file))
 +            newFiles += file;
 +    }
 +    updateSourceFiles(newFiles, false);
 +}
 +
 +void ModelManager::emitDocumentChangedOnDisk(Document::Ptr doc)
 +{ emit documentChangedOnDisk(doc); }
 +
 +void ModelManager::updateDocument(Document::Ptr doc)
 +{
 +    {
 +        QMutexLocker locker(&m_mutex);
 +        _snapshot.insert(doc);
 +    }
 +    emit documentUpdated(doc);
 +}
 +
 +void ModelManager::updateLibraryInfo(const QString &path, const LibraryInfo &info)
 +{
 +    {
 +        QMutexLocker locker(&m_mutex);
 +        _snapshot.insertLibraryInfo(path, info);
 +    }
 +    emit libraryInfoUpdated(path, info);
 +}
 +
 +static QStringList qmlFilesInDirectory(const QString &path)
 +{
 +    QStringList pattern;
 +    if (Core::ICore::instance()) {
 +        // ### It would suffice to build pattern once. This function needs to be thread-safe.
 +        Core::MimeDatabase *db = Core::ICore::instance()->mimeDatabase();
 +        Core::MimeType jsSourceTy = db->findByType(Constants::JS_MIMETYPE);
 +        Core::MimeType qmlSourceTy = db->findByType(Constants::QML_MIMETYPE);
 +
 +        QStringList pattern;
 +        foreach (const Core::MimeGlobPattern &glob, jsSourceTy.globPatterns())
 +            pattern << glob.regExp().pattern();
 +        foreach (const Core::MimeGlobPattern &glob, qmlSourceTy.globPatterns())
 +            pattern << glob.regExp().pattern();
 +    } else {
 +        pattern << "*.qml" << "*.js";
 +    }
 +
 +    QStringList files;
 +
 +    const QDir dir(path);
 +    foreach (const QFileInfo &fi, dir.entryInfoList(pattern, QDir::Files))
 +        files += fi.absoluteFilePath();
 +
 +    return files;
 +}
 +
 +static void findNewImplicitImports(const Document::Ptr &doc, const Snapshot &snapshot,
 +                            QStringList *importedFiles, QSet<QString> *scannedPaths)
 +{
 +    // scan files that could be implicitly imported
 +    // it's important we also do this for JS files, otherwise the isEmpty check will fail
 +    if (snapshot.documentsInDirectory(doc->path()).isEmpty()) {
 +        if (! scannedPaths->contains(doc->path())) {
 +            *importedFiles += qmlFilesInDirectory(doc->path());
 +            scannedPaths->insert(doc->path());
 +        }
 +    }
 +}
 +
 +static void findNewFileImports(const Document::Ptr &doc, const Snapshot &snapshot,
 +                        QStringList *importedFiles, QSet<QString> *scannedPaths)
 +{
 +    // scan files and directories that are explicitly imported
 +    foreach (const Interpreter::ImportInfo &import, doc->bind()->imports()) {
 +        const QString &importName = import.name();
 +        if (import.type() == Interpreter::ImportInfo::FileImport) {
 +            if (! snapshot.document(importName))
 +                *importedFiles += importName;
 +        } else if (import.type() == Interpreter::ImportInfo::DirectoryImport) {
 +            if (snapshot.documentsInDirectory(importName).isEmpty()) {
 +                if (! scannedPaths->contains(importName)) {
 +                    *importedFiles += qmlFilesInDirectory(importName);
 +                    scannedPaths->insert(importName);
 +                }
 +            }
 +        }
 +    }
 +}
 +
 +static void findNewLibraryImports(const Document::Ptr &doc, const Snapshot &snapshot,
 +                           ModelManager *modelManager,
 +                           QStringList *importedFiles, QSet<QString> *scannedPaths)
 +{
 +    // scan library imports
 +    const QStringList importPaths = modelManager->importPaths();
 +    foreach (const Interpreter::ImportInfo &import, doc->bind()->imports()) {
 +        if (import.type() != Interpreter::ImportInfo::LibraryImport)
 +            continue;
 +        foreach (const QString &importPath, importPaths) {
 +            QDir dir(importPath);
 +            dir.cd(import.name());
 +            const QString targetPath = dir.absolutePath();
 +
 +            // if we know there is a library, done
 +            if (snapshot.libraryInfo(targetPath).isValid())
 +                break;
 +
 +            // if there is a qmldir file, we found a new library!
 +            if (dir.exists("qmldir")) {
 +                QFile qmldirFile(dir.filePath("qmldir"));
 +                qmldirFile.open(QFile::ReadOnly);
 +                QString qmldirData = QString::fromUtf8(qmldirFile.readAll());
 +
 +                QmlDirParser qmldirParser;
 +                qmldirParser.setSource(qmldirData);
 +                qmldirParser.parse();
 +
 +                modelManager->updateLibraryInfo(QFileInfo(qmldirFile).absolutePath(),
 +                                                     LibraryInfo(qmldirParser));
 +
 +                // scan the qml files in the library
 +                foreach (const QmlDirParser::Component &component, qmldirParser.components()) {
 +                    if (! component.fileName.isEmpty()) {
 +                        QFileInfo componentFileInfo(dir.filePath(component.fileName));
 +                        const QString path = componentFileInfo.absolutePath();
 +                        if (! scannedPaths->contains(path)) {
 +                            *importedFiles += qmlFilesInDirectory(path);
 +                            scannedPaths->insert(path);
 +                        }
 +                    }
 +                }
 +            }
 +        }
 +    }
 +}
 +
 +static bool suffixMatches(const QString &fileName, const Core::MimeType &mimeType)
 +{
 +    foreach (const QString &suffix, mimeType.suffixes()) {
 +        if (fileName.endsWith(suffix, Qt::CaseInsensitive))
 +            return true;
 +    }
 +    return false;
 +}
 +
 +void ModelManager::parse(QFutureInterface<void> &future,
 +                            WorkingCopy workingCopy,
 +                            QStringList files,
 +                            ModelManager *modelManager,
 +                            bool emitDocChangedOnDisk)
 +{
 +    Core::MimeDatabase *db = 0;
 +    Core::MimeType jsSourceTy;
 +    Core::MimeType qmlSourceTy;
 +    if (Core::ICore::instance()) {
 +        db = Core::ICore::instance()->mimeDatabase();
 +        jsSourceTy = db->findByType(QLatin1String("application/javascript"));
 +        qmlSourceTy = db->findByType(QLatin1String("application/x-qml"));
 +    }
 +
 +    int progressRange = files.size();
 +    future.setProgressRange(0, progressRange);
 +
 +    Snapshot snapshot = modelManager->_snapshot;
 +
 +    // paths we have scanned for files and added to the files list
 +    QSet<QString> scannedPaths;
 +
 +    for (int i = 0; i < files.size(); ++i) {
 +        future.setProgressValue(qreal(i) / files.size() * progressRange);
 +
 +        const QString fileName = files.at(i);
 +
 +        bool isQmlFile = true;
 +        if (db) {
 +            if (suffixMatches(fileName, jsSourceTy)) {
 +                isQmlFile = false;
 +            } else if (! suffixMatches(fileName, qmlSourceTy)) {
 +                continue; // skip it. it's not a QML or a JS file.
 +            }
 +        } else {
 +            if (fileName.contains(QLatin1String(".js"), Qt::CaseInsensitive))
 +                isQmlFile = false;
 +            else if (!fileName.contains(QLatin1String(".qml"), Qt::CaseInsensitive))
 +                continue;
 +        }
 +
 +        QString contents;
 +        int documentRevision = 0;
 +
 +        if (workingCopy.contains(fileName)) {
 +            QPair<QString, int> entry = workingCopy.get(fileName);
 +            contents = entry.first;
 +            documentRevision = entry.second;
 +        } else {
 +            QFile inFile(fileName);
 +
 +            if (inFile.open(QIODevice::ReadOnly)) {
 +                QTextStream ins(&inFile);
 +                contents = ins.readAll();
 +                inFile.close();
 +            }
 +        }
 +
 +        Document::Ptr doc = Document::create(fileName);
 +        doc->setEditorRevision(documentRevision);
 +        doc->setSource(contents);
 +        doc->parse();
 +
 +        // get list of referenced files not yet in snapshot or in directories already scanned
 +        QStringList importedFiles;
 +        findNewImplicitImports(doc, snapshot, &importedFiles, &scannedPaths);
 +        findNewFileImports(doc, snapshot, &importedFiles, &scannedPaths);
 +        findNewLibraryImports(doc, snapshot, modelManager, &importedFiles, &scannedPaths);
 +
 +        // add new files to parse list
 +        foreach (const QString &file, importedFiles) {
 +            if (! files.contains(file))
 +                files.append(file);
 +        }
 +
 +        modelManager->updateDocument(doc);
 +        if (emitDocChangedOnDisk)
 +            modelManager->emitDocumentChangedOnDisk(doc);
 +    }
 +
 +    future.setProgressValue(progressRange);
 +}
 +
 +// Check whether fileMimeType is the same or extends knownMimeType
 +bool ModelManager::matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType)
 +{
 +    Core::MimeDatabase *db = Core::ICore::instance()->mimeDatabase();
 +
 +    const QStringList knownTypeNames = QStringList(knownMimeType.type()) + knownMimeType.aliases();
 +
 +    foreach (const QString knownTypeName, knownTypeNames)
 +        if (fileMimeType.matchesType(knownTypeName))
 +            return true;
 +
 +    // recursion to parent types of fileMimeType
 +    foreach (const QString &parentMimeType, fileMimeType.subClassesOf()) {
 +        if (matchesMimeType(db->findByType(parentMimeType), knownMimeType))
 +            return true;
 +    }
 +
 +    return false;
 +}
 +
 +QStringList ModelManager::importPaths() const
 +{
 +    return m_allImportPaths;
 +}
 +
 +static QStringList environmentImportPaths()
 +{
 +    QStringList paths;
 +
 +    QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
 +
 +#if defined(Q_OS_WIN)
 +    QLatin1Char pathSep(';');
 +#else
 +    QLatin1Char pathSep(':');
 +#endif
 +    foreach (const QString &path, QString::fromLatin1(envImportPath).split(pathSep, QString::SkipEmptyParts)) {
 +        QString canonicalPath = QDir(path).canonicalPath();
 +        if (!canonicalPath.isEmpty() && !paths.contains(canonicalPath))
 +            paths.append(canonicalPath);
 +    }
 +
 +    return paths;
 +}
 +
 +void ModelManager::updateImportPaths()
 +{
 +    m_allImportPaths.clear();
 +    QMapIterator<ProjectExplorer::Project *, ProjectInfo> it(m_projects);
 +    while (it.hasNext()) {
 +        it.next();
 +        m_allImportPaths += it.value().importPaths;
 +    }
 +    m_allImportPaths += m_defaultImportPaths;
 +    m_allImportPaths.removeDuplicates();
 +
 +    // check if any file in the snapshot imports something new in the new paths
 +    Snapshot snapshot = _snapshot;
 +    QStringList importedFiles;
 +    QSet<QString> scannedPaths;
 +    foreach (const Document::Ptr &doc, snapshot)
 +        findNewLibraryImports(doc, snapshot, this, &importedFiles, &scannedPaths);
 +
 +    updateSourceFiles(importedFiles, true);
 +}
 +
 +void ModelManager::loadPluginTypes(const QString &libraryPath, const QString &importPath, const QString &importUri)
 +{
 +    m_pluginDumper->loadPluginTypes(libraryPath, importPath, importUri);
 +}
index ed42f66,0000000..a80f18c
mode 100644,000000..100644
--- /dev/null
@@@ -1,118 -1,0 +1,122 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef QMLJSMODELMANAGER_H
 +#define QMLJSMODELMANAGER_H
 +
 +#include "qmljstools_global.h"
 +
 +#include <qmljs/qmljsmodelmanagerinterface.h>
 +#include <qmljs/qmljsdocument.h>
 +
 +#include <QFuture>
 +#include <QFutureSynchronizer>
 +#include <QMutex>
 +#include <QProcess>
 +
 +namespace Core {
 +class ICore;
 +class MimeType;
 +}
 +
 +namespace QmlJSTools {
 +namespace Internal {
 +
 +class PluginDumper;
 +
 +class QMLJSTOOLS_EXPORT ModelManager: public QmlJS::ModelManagerInterface
 +{
 +    Q_OBJECT
 +
 +public:
 +    ModelManager(QObject *parent = 0);
 +
 +    virtual WorkingCopy workingCopy() const;
 +    virtual QmlJS::Snapshot snapshot() const;
 +
 +    virtual void updateSourceFiles(const QStringList &files,
 +                                   bool emitDocumentOnDiskChanged);
 +    virtual void fileChangedOnDisk(const QString &path);
 +    virtual void removeFiles(const QStringList &files);
 +
 +    virtual QList<ProjectInfo> projectInfos() const;
 +    virtual ProjectInfo projectInfo(ProjectExplorer::Project *project) const;
 +    virtual void updateProjectInfo(const ProjectInfo &pinfo);
 +
 +    void updateDocument(QmlJS::Document::Ptr doc);
 +    void updateLibraryInfo(const QString &path, const QmlJS::LibraryInfo &info);
 +    void emitDocumentChangedOnDisk(QmlJS::Document::Ptr doc);
 +
 +    virtual QStringList importPaths() const;
 +
 +    virtual void loadPluginTypes(const QString &libraryPath, const QString &importPath, const QString &importUri);
 +
 +Q_SIGNALS:
 +    void projectPathChanged(const QString &projectPath);
 +
 +protected:
 +    QFuture<void> refreshSourceFiles(const QStringList &sourceFiles,
 +                                     bool emitDocumentOnDiskChanged);
 +
 +    static void parse(QFutureInterface<void> &future,
 +                      WorkingCopy workingCopy,
 +                      QStringList files,
 +                      ModelManager *modelManager,
 +                      bool emitDocChangedOnDisk);
 +
 +    void loadQmlTypeDescriptions();
 +    void loadQmlTypeDescriptions(const QString &path);
 +
 +    void updateImportPaths();
 +
 +private:
 +    static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);
 +
 +    mutable QMutex m_mutex;
 +    Core::ICore *m_core;
 +    QmlJS::Snapshot _snapshot;
 +    QStringList m_allImportPaths;
 +    QStringList m_defaultImportPaths;
 +
 +    QFutureSynchronizer<void> m_synchronizer;
 +
 +    // project integration
 +    QMap<ProjectExplorer::Project *, ProjectInfo> m_projects;
 +
 +    PluginDumper *m_pluginDumper;
 +};
 +
 +} // namespace Internal
 +} // namespace QmlJSTools
 +
 +#endif // QMLJSMODELMANAGER_H
index 3821844,0000000..c66ecd7
mode 100644,000000..100644
--- /dev/null
@@@ -1,359 -1,0 +1,363 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "qmljsqtstylecodeformatter.h"
 +
 +#include <texteditor/tabsettings.h>
 +
 +#include <QtCore/QDebug>
 +
 +using namespace QmlJS;
 +using namespace QmlJSTools;
 +using namespace TextEditor;
 +
 +QtStyleCodeFormatter::QtStyleCodeFormatter()
 +    : m_indentSize(4)
 +{
 +}
 +
 +QtStyleCodeFormatter::QtStyleCodeFormatter(const TextEditor::TabSettings &tabSettings)
 +    : m_indentSize(tabSettings.m_indentSize)
 +{
 +    setTabSize(tabSettings.m_tabSize);
 +}
 +
 +void QtStyleCodeFormatter::setIndentSize(int size)
 +{
 +    m_indentSize = size;
 +}
 +
 +void QtStyleCodeFormatter::saveBlockData(QTextBlock *block, const BlockData &data) const
 +{
 +    TextBlockUserData *userData = BaseTextDocumentLayout::userData(*block);
 +    QmlJSCodeFormatterData *cppData = static_cast<QmlJSCodeFormatterData *>(userData->codeFormatterData());
 +    if (!cppData) {
 +        cppData = new QmlJSCodeFormatterData;
 +        userData->setCodeFormatterData(cppData);
 +    }
 +    cppData->m_data = data;
 +}
 +
 +bool QtStyleCodeFormatter::loadBlockData(const QTextBlock &block, BlockData *data) const
 +{
 +    TextBlockUserData *userData = BaseTextDocumentLayout::testUserData(block);
 +    if (!userData)
 +        return false;
 +    QmlJSCodeFormatterData *cppData = static_cast<QmlJSCodeFormatterData *>(userData->codeFormatterData());
 +    if (!cppData)
 +        return false;
 +
 +    *data = cppData->m_data;
 +    return true;
 +}
 +
 +void QtStyleCodeFormatter::saveLexerState(QTextBlock *block, int state) const
 +{
 +    BaseTextDocumentLayout::setLexerState(*block, state);
 +}
 +
 +int QtStyleCodeFormatter::loadLexerState(const QTextBlock &block) const
 +{
 +    return BaseTextDocumentLayout::lexerState(block);
 +}
 +
 +void QtStyleCodeFormatter::onEnter(int newState, int *indentDepth, int *savedIndentDepth) const
 +{
 +    const State &parentState = state();
 +    const Token &tk = currentToken();
 +    const int tokenPosition = column(tk.begin());
 +    const bool firstToken = (tokenIndex() == 0);
 +    const bool lastToken = (tokenIndex() == tokenCount() - 1);
 +
 +    switch (newState) {
 +    case objectdefinition_open: {
 +        // special case for things like "gradient: Gradient {"
 +        if (parentState.type == binding_assignment)
 +            *savedIndentDepth = state(1).savedIndentDepth;
 +
 +        if (firstToken)
 +            *savedIndentDepth = tokenPosition;
 +
 +        *indentDepth = *savedIndentDepth + m_indentSize;
 +        break;
 +    }
 +
 +    case binding_or_objectdefinition:
 +        if (firstToken)
 +            *indentDepth = *savedIndentDepth = tokenPosition;
 +        break;
 +
 +    case binding_assignment:
 +        if (lastToken)
 +            *indentDepth = *savedIndentDepth + 4;
 +        else
 +            *indentDepth = column(tokenAt(tokenIndex() + 1).begin());
 +        break;
 +
 +    case expression_or_objectdefinition:
 +        *indentDepth = tokenPosition;
 +        break;
 +
 +    case expression:
 +        // expression_or_objectdefinition has already consumed the first token
 +        // ternary already adjusts indents nicely
 +        if (parentState.type != expression_or_objectdefinition
 +                && parentState.type != binding_assignment
 +                && parentState.type != ternary_op) {
 +            *indentDepth += 2 * m_indentSize;
 +        }
 +        if (!firstToken && parentState.type != expression_or_objectdefinition) {
 +            *indentDepth = tokenPosition;
 +        }
 +        break;
 +
 +    case expression_maybe_continuation:
 +        // set indent depth to indent we'd get if the expression ended here
 +        for (int i = 1; state(i).type != topmost_intro; ++i) {
 +            const int type = state(i).type;
 +            if (isExpressionEndState(type) && !isBracelessState(type)) {
 +                *indentDepth = state(i - 1).savedIndentDepth;
 +                break;
 +            }
 +        }
 +        break;
 +
 +    case bracket_open:
 +        if (parentState.type == expression && state(1).type == binding_assignment) {
 +            *savedIndentDepth = state(2).savedIndentDepth;
 +            *indentDepth = *savedIndentDepth + m_indentSize;
 +        } else if (!lastToken) {
 +            *indentDepth = tokenPosition + 1;
 +        } else {
 +            *indentDepth = *savedIndentDepth + m_indentSize;
 +        }
 +        break;
 +
 +    case function_start:
 +        if (parentState.type == expression) {
 +            // undo the continuation indent of the expression
 +            *indentDepth = parentState.savedIndentDepth;
 +            *savedIndentDepth = *indentDepth;
 +        }
 +        break;
 +
 +    case do_statement_while_paren_open:
 +    case statement_with_condition_paren_open:
 +    case signal_arglist_open:
 +    case function_arglist_open:
 +    case paren_open:
 +    case condition_paren_open:
 +        if (!lastToken)
 +            *indentDepth = tokenPosition + 1;
 +        else
 +            *indentDepth += m_indentSize;
 +        break;
 +
 +    case ternary_op:
 +        if (!lastToken)
 +            *indentDepth = tokenPosition + tk.length + 1;
 +        else
 +            *indentDepth += m_indentSize;
 +        break;
 +
 +    case jsblock_open:
 +        // closing brace should be aligned to case
 +        if (parentState.type == case_cont) {
 +            *savedIndentDepth = parentState.savedIndentDepth;
 +            break;
 +        }
 +        // fallthrough
 +    case substatement_open:
 +        // special case for foo: {
 +        if (parentState.type == binding_assignment && state(1).type == binding_or_objectdefinition)
 +            *savedIndentDepth = state(1).savedIndentDepth;
 +        *indentDepth = *savedIndentDepth + m_indentSize;
 +        break;
 +
 +    case statement_with_condition:
 +    case statement_with_block:
 +    case if_statement:
 +    case do_statement:
 +    case switch_statement:
 +        if (firstToken || parentState.type == binding_assignment)
 +            *savedIndentDepth = tokenPosition;
 +        // ### continuation
 +        *indentDepth = *savedIndentDepth; // + 2*m_indentSize;
 +        break;
 +
 +    case maybe_else: {
 +        // set indent to outermost braceless savedIndent
 +        int outermostBraceless = 0;
 +        while (isBracelessState(state(outermostBraceless + 1).type))
 +            ++outermostBraceless;
 +        *indentDepth = state(outermostBraceless).savedIndentDepth;
 +        // this is where the else should go, if one appears - aligned to if_statement
 +        *savedIndentDepth = state().savedIndentDepth;
 +        break;
 +    }
 +
 +    case condition_open:
 +        // fixed extra indent when continuing 'if (', but not for 'else if ('
 +        if (tokenPosition <= *indentDepth + m_indentSize)
 +            *indentDepth += 2*m_indentSize;
 +        else
 +            *indentDepth = tokenPosition + 1;
 +        break;
 +
 +    case case_start:
 +        *savedIndentDepth = tokenPosition;
 +        break;
 +
 +    case case_cont:
 +        *indentDepth += m_indentSize;
 +        break;
 +
 +    case multiline_comment_start:
 +        *indentDepth = tokenPosition + 2;
 +        break;
 +
 +    case multiline_comment_cont:
 +        *indentDepth = tokenPosition;
 +        break;
 +    }
 +}
 +
 +void QtStyleCodeFormatter::adjustIndent(const QList<Token> &tokens, int lexerState, int *indentDepth) const
 +{
 +    Q_UNUSED(lexerState)
 +
 +    State topState = state();
 +    State previousState = state(1);
 +
 +    // adjusting the indentDepth here instead of in enter() gives 'else if' the correct indentation
 +    // ### could be moved?
 +    if (topState.type == substatement)
 +        *indentDepth += m_indentSize;
 +
 +    // keep user-adjusted indent in multiline comments
 +    if (topState.type == multiline_comment_start
 +            || topState.type == multiline_comment_cont) {
 +        if (!tokens.isEmpty()) {
 +            *indentDepth = column(tokens.at(0).begin());
 +            return;
 +        }
 +    }
 +
 +    const int kind = extendedTokenKind(tokenAt(0));
 +    switch (kind) {
 +    case LeftBrace:
 +        if (topState.type == substatement
 +                || topState.type == binding_assignment
 +                || topState.type == case_cont) {
 +            *indentDepth = topState.savedIndentDepth;
 +        }
 +        break;
 +    case RightBrace: {
 +        if (topState.type == jsblock_open && previousState.type == case_cont) {
 +            *indentDepth = previousState.savedIndentDepth;
 +            break;
 +        }
 +        for (int i = 0; state(i).type != topmost_intro; ++i) {
 +            const int type = state(i).type;
 +            if (type == objectdefinition_open
 +                    || type == jsblock_open
 +                    || type == substatement_open) {
 +                *indentDepth = state(i).savedIndentDepth;
 +                break;
 +            }
 +        }
 +        break;
 +    }
 +    case RightBracket:
 +        for (int i = 0; state(i).type != topmost_intro; ++i) {
 +            const int type = state(i).type;
 +            if (type == bracket_open) {
 +                *indentDepth = state(i).savedIndentDepth;
 +                break;
 +            }
 +        }
 +        break;
 +
 +    case LeftBracket:
 +    case LeftParenthesis:
 +    case Delimiter:
 +        if (topState.type == expression_maybe_continuation)
 +            *indentDepth = topState.savedIndentDepth;
 +        break;
 +
 +    case Else:
 +        if (topState.type == maybe_else) {
 +            *indentDepth = topState.savedIndentDepth;
 +        } else if (topState.type == expression_maybe_continuation) {
 +            bool hasElse = false;
 +            for (int i = 1; state(i).type != topmost_intro; ++i) {
 +                const int type = state(i).type;
 +                if (type == else_clause)
 +                    hasElse = true;
 +                if (type == if_statement) {
 +                    if (hasElse) {
 +                        hasElse = false;
 +                    } else {
 +                        *indentDepth = state(i).savedIndentDepth;
 +                        break;
 +                    }
 +                }
 +            }
 +        }
 +        break;
 +
 +    case Colon:
 +        if (topState.type == ternary_op) {
 +            *indentDepth -= 2;
 +        }
 +        break;
 +
 +    case Question:
 +        if (topState.type == expression_maybe_continuation)
 +            *indentDepth = topState.savedIndentDepth;
 +        break;
 +
 +    case Default:
 +    case Case:
 +        for (int i = 0; state(i).type != topmost_intro; ++i) {
 +            const int type = state(i).type;
 +            if (type == switch_statement || type == case_cont) {
 +                *indentDepth = state(i).savedIndentDepth;
 +                break;
 +            } else if (type == topmost_intro) {
 +                break;
 +            }
 +        }
 +        break;
 +    }
 +}
index f016df7,0000000..640a93a
mode 100644,000000..100644
--- /dev/null
@@@ -1,74 -1,0 +1,78 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef QMLJSQTSTYLECODEFORMATTER_H
 +#define QMLJSQTSTYLECODEFORMATTER_H
 +
 +#include "qmljstools_global.h"
 +
 +#include <texteditor/basetextdocumentlayout.h>
 +#include <qmljs/qmljscodeformatter.h>
 +
 +namespace TextEditor {
 +    class TabSettings;
 +}
 +
 +namespace QmlJSTools {
 +
 +class QMLJSTOOLS_EXPORT QtStyleCodeFormatter : public QmlJS::CodeFormatter
 +{
 +public:
 +    QtStyleCodeFormatter();
 +    explicit QtStyleCodeFormatter(const TextEditor::TabSettings &tabSettings);
 +
 +    void setIndentSize(int size);
 +
 +protected:
 +    virtual void onEnter(int newState, int *indentDepth, int *savedIndentDepth) const;
 +    virtual void adjustIndent(const QList<QmlJS::Token> &tokens, int lexerState, int *indentDepth) const;
 +
 +    virtual void saveBlockData(QTextBlock *block, const BlockData &data) const;
 +    virtual bool loadBlockData(const QTextBlock &block, BlockData *data) const;
 +
 +    virtual void saveLexerState(QTextBlock *block, int state) const;
 +    virtual int loadLexerState(const QTextBlock &block) const;
 +
 +private:
 +    int m_indentSize;
 +
 +    class QmlJSCodeFormatterData: public TextEditor::CodeFormatterData
 +    {
 +    public:
 +        QmlJS::CodeFormatter::BlockData m_data;
 +    };
 +};
 +
 +} // namespace QmlJSTools
 +
 +#endif // QMLJSQTSTYLECODEFORMATTER_H
index 7bbacb5,0000000..f7eee45
mode 100644,000000..100644
--- /dev/null
@@@ -1,143 -1,0 +1,147 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "qmljsrefactoringchanges.h"
 +#include "qmljsqtstylecodeformatter.h"
 +
 +#include <qmljs/parser/qmljsast_p.h>
 +#include <qmljs/qmljsmodelmanagerinterface.h>
 +#include <texteditor/texteditorsettings.h>
 +#include <texteditor/tabsettings.h>
 +
 +using namespace QmlJS;
 +using namespace QmlJSTools;
 +
 +QmlJSRefactoringChanges::QmlJSRefactoringChanges(ModelManagerInterface *modelManager,
 +                                                 const Snapshot &snapshot)
 +    : m_modelManager(modelManager)
 +    , m_snapshot(snapshot)
 +{
 +    Q_ASSERT(modelManager);
 +}
 +
 +const Snapshot &QmlJSRefactoringChanges::snapshot() const
 +{
 +    return m_snapshot;
 +}
 +
 +QmlJSRefactoringFile QmlJSRefactoringChanges::file(const QString &fileName)
 +{
 +    return QmlJSRefactoringFile(fileName, this);
 +}
 +
 +void QmlJSRefactoringChanges::indentSelection(const QTextCursor &selection) const
 +{
 +    // ### shares code with QmlJSTextEditor::indent
 +    QTextDocument *doc = selection.document();
 +
 +    QTextBlock block = doc->findBlock(selection.selectionStart());
 +    const QTextBlock end = doc->findBlock(selection.selectionEnd()).next();
 +
 +    const TextEditor::TabSettings &tabSettings(TextEditor::TextEditorSettings::instance()->tabSettings());
 +    QtStyleCodeFormatter codeFormatter(tabSettings);
 +    codeFormatter.updateStateUntil(block);
 +
 +    do {
 +        tabSettings.indentLine(block, codeFormatter.indentFor(block));
 +        codeFormatter.updateLineStateChange(block);
 +        block = block.next();
 +    } while (block.isValid() && block != end);
 +}
 +
 +void QmlJSRefactoringChanges::fileChanged(const QString &fileName)
 +{
 +    m_modelManager->updateSourceFiles(QStringList(fileName), true);
 +}
 +
 +
 +QmlJSRefactoringFile::QmlJSRefactoringFile()
 +{ }
 +
 +QmlJSRefactoringFile::QmlJSRefactoringFile(const QString &fileName, QmlJSRefactoringChanges *refactoringChanges)
 +    : RefactoringFile(fileName, refactoringChanges)
 +{ }
 +
 +QmlJSRefactoringFile::QmlJSRefactoringFile(TextEditor::BaseTextEditor *editor, QmlJS::Document::Ptr document)
 +    : RefactoringFile()
 +    , m_qmljsDocument(document)
 +{
 +    m_fileName = document->fileName();
 +    m_editor = editor;
 +}
 +
 +Document::Ptr QmlJSRefactoringFile::qmljsDocument() const
 +{
 +    if (!m_qmljsDocument) {
 +        const QString source = document()->toPlainText();
 +        const QString name = fileName();
 +        const Snapshot &snapshot = refactoringChanges()->snapshot();
 +
 +        m_qmljsDocument = snapshot.documentFromSource(source, name);
 +        m_qmljsDocument->parse();
 +    }
 +
 +    return m_qmljsDocument;
 +}
 +
 +unsigned QmlJSRefactoringFile::startOf(const AST::SourceLocation &loc) const
 +{
 +    return position(loc.startLine, loc.startColumn);
 +}
 +
 +bool QmlJSRefactoringFile::isCursorOn(AST::UiObjectMember *ast) const
 +{
 +    const unsigned pos = cursor().position();
 +
 +    return ast->firstSourceLocation().begin() <= pos
 +            && pos <= ast->lastSourceLocation().end();
 +}
 +
 +bool QmlJSRefactoringFile::isCursorOn(AST::UiQualifiedId *ast) const
 +{
 +    const unsigned pos = cursor().position();
 +
 +    if (ast->identifierToken.begin() > pos)
 +        return false;
 +
 +    AST::UiQualifiedId *last = ast;
 +    while (last->next)
 +        last = last->next;
 +
 +    return pos <= ast->identifierToken.end();
 +}
 +
 +QmlJSRefactoringChanges *QmlJSRefactoringFile::refactoringChanges() const
 +{
 +    return static_cast<QmlJSRefactoringChanges *>(m_refactoringChanges);
 +}
index 9c5a5e6,0000000..11a64f1
mode 100644,000000..100644
--- /dev/null
@@@ -1,93 -1,0 +1,97 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef QMLREFACTORINGCHANGES_H
 +#define QMLREFACTORINGCHANGES_H
 +
 +#include "qmljstools_global.h"
 +
 +#include <qmljs/qmljsdocument.h>
 +
 +#include <texteditor/refactoringchanges.h>
 +
 +namespace QmlJS {
 +class ModelManagerInterface;
 +} // namespace QmlJS
 +
 +namespace QmlJSTools {
 +
 +class QmlJSRefactoringChanges;
 +
 +class QMLJSTOOLS_EXPORT QmlJSRefactoringFile: public TextEditor::RefactoringFile
 +{
 +public:
 +    QmlJSRefactoringFile();
 +    QmlJSRefactoringFile(const QString &fileName, QmlJSRefactoringChanges *refactoringChanges);
 +    QmlJSRefactoringFile(TextEditor::BaseTextEditor *editor, QmlJS::Document::Ptr document);
 +
 +    QmlJS::Document::Ptr qmljsDocument() const;
 +
 +    /*!
 +        \returns the offset in the document for the start position of the given
 +                 source location.
 +     */
 +    unsigned startOf(const QmlJS::AST::SourceLocation &loc) const;
 +
 +    bool isCursorOn(QmlJS::AST::UiObjectMember *ast) const;
 +    bool isCursorOn(QmlJS::AST::UiQualifiedId *ast) const;
 +
 +private:
 +    QmlJSRefactoringChanges *refactoringChanges() const;
 +
 +    mutable QmlJS::Document::Ptr m_qmljsDocument;
 +};
 +
 +
 +class QMLJSTOOLS_EXPORT QmlJSRefactoringChanges: public TextEditor::RefactoringChanges
 +{
 +public:
 +    QmlJSRefactoringChanges(QmlJS::ModelManagerInterface *modelManager,
 +                            const QmlJS::Snapshot &snapshot);
 +
 +    const QmlJS::Snapshot &snapshot() const;
 +
 +    QmlJSRefactoringFile file(const QString &fileName);
 +
 +private:
 +    virtual void indentSelection(const QTextCursor &selection) const;
 +    virtual void fileChanged(const QString &fileName);
 +
 +private:
 +    QmlJS::ModelManagerInterface *m_modelManager;
 +    QmlJS::Snapshot m_snapshot;
 +};
 +
 +} // namespace QmlJSTools
 +
 +#endif // QMLREFACTORINGCHANGES_H
index 1dacf7a,0000000..d9c413a
mode 100644,000000..100644
--- /dev/null
@@@ -1,89 -1,0 +1,93 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef QMLPROJECTRUNCONFIGURATIONWIDGET_H
 +#define QMLPROJECTRUNCONFIGURATIONWIDGET_H
 +
 +#include <QWidget>
 +
 +QT_FORWARD_DECLARE_CLASS(QComboBox)
 +QT_FORWARD_DECLARE_CLASS(QStandardItemModel)
 +
 +namespace ProjectExplorer {
 +
 +class EnvironmentWidget;
 +
 +} // namespace Qt4ProjectManager
 +
 +namespace QmlProjectManager {
 +
 +class QmlProjectRunConfiguration;
 +
 +namespace Internal {
 +
 +const char * const CURRENT_FILE  = QT_TRANSLATE_NOOP("QmlManager", "<Current File>");
 +
 +class QmlProjectRunConfigurationWidget : public QWidget
 +{
 +    Q_OBJECT
 +public:
 +    explicit QmlProjectRunConfigurationWidget(QmlProjectRunConfiguration *rc);
 +
 +public slots:
 +    void updateQtVersionComboBox();
 +    void userEnvironmentChangesChanged();
 +    void updateFileComboBox();
 +
 +private slots:
 +
 +    void setMainScript(int index);
 +    void onQtVersionSelectionChanged();
 +    void onViewerArgsChanged();
 +    void useCppDebuggerToggled(bool toggled);
 +    void useQmlDebuggerToggled(bool toggled);
 +    void qmlDebugServerPortChanged(uint port);
 +
 +    void userChangesChanged();
 +
 +    void manageQtVersions();
 +
 +private:
 +    QmlProjectRunConfiguration *m_runConfiguration;
 +
 +    QComboBox *m_qtVersionComboBox;
 +    QComboBox *m_fileListCombo;
 +    QStandardItemModel *m_fileListModel;
 +
 +    ProjectExplorer::EnvironmentWidget *m_environmentWidget;
 +};
 +
 +} // namespace Internal
 +} // namespace QmlProjectManager
 +
 +#endif // QMLPROJECTRUNCONFIGURATIONWIDGET_H
index eb732e3,0000000..cb0501c
mode 100644,000000..100644
--- /dev/null
@@@ -1,74 -1,0 +1,78 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +#ifndef MAEMOPUBLISHINGRESULTPAGEFREMANTLEFREE_H
 +#define MAEMOPUBLISHINGRESULTPAGEFREMANTLEFREE_H
 +
 +#include "maemopublisherfremantlefree.h"
 +#include <QtGui/QWizardPage>
 +
 +QT_BEGIN_NAMESPACE
 +namespace Ui {
 +    class MaemoPublishingResultPageFremantleFree;
 +}
 +QT_END_NAMESPACE
 +
 +namespace Qt4ProjectManager {
 +namespace Internal {
 +
 +class MaemoPublishingResultPageFremantleFree : public QWizardPage
 +{
 +    Q_OBJECT
 +
 +public:
 +    explicit MaemoPublishingResultPageFremantleFree(MaemoPublisherFremantleFree *publisher,
 +        QWidget *parent = 0);
 +    ~MaemoPublishingResultPageFremantleFree();
 +
 +private slots:
 +    void handleFinished();
 +    void handleProgress(const QString &text,
 +        MaemoPublisherFremantleFree::OutputType type);
 +    void handleCancelRequest();
 +
 +private:
 +    virtual bool isComplete() const { return m_isComplete; }
 +    virtual void initializePage();
 +
 +    QAbstractButton *cancelButton() const;
 +
 +    MaemoPublisherFremantleFree * const m_publisher;
 +    bool m_isComplete;
 +    MaemoPublisherFremantleFree::OutputType m_lastOutputType;
 +    Ui::MaemoPublishingResultPageFremantleFree *ui;
 +};
 +
 +} // namespace Internal
 +} // namespace Qt4ProjectManager
 +
 +#endif // MAEMOPUBLISHINGRESULTPAGEFREMANTLEFREE_H
index 74c3fda,0000000..14f0f77
mode 100644,000000..100644
--- /dev/null
@@@ -1,58 -1,0 +1,62 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef SUBDIRSPROJECTWIZARD_H
 +#define SUBDIRSPROJECTWIZARD_H
 +
 +#include "qtwizard.h"
 +
 +namespace Qt4ProjectManager {
 +namespace Internal {
 +
 +class SubdirsProjectWizard : public QtWizard
 +{
 +    Q_OBJECT
 +
 +public:
 +    SubdirsProjectWizard();
 +
 +protected:
 +    virtual QWizard *createWizardDialog(QWidget *parent,
 +                                        const QString &defaultPath,
 +                                        const WizardPageList &extensionPages) const;
 +
 +    virtual Core::GeneratedFiles generateFiles(const QWizard *w,
 +                                               QString *errorMessage) const;
 +    virtual bool postGenerateFiles(const QWizard *, const Core::GeneratedFiles &l, QString *errorMessage);
 +};
 +
 +} // namespace Internal
 +} // namespace Qt4ProjectManager
 +
 +#endif // SUBDIRSPROJECTWIZARD_H
index d11350c,0000000..06f88ef
mode 100644,000000..100644
--- /dev/null
@@@ -1,64 -1,0 +1,68 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "subdirsprojectwizarddialog.h"
 +#include "qtprojectparameters.h"
 +
 +namespace Qt4ProjectManager {
 +namespace Internal {
 +
 +SubdirsProjectWizardDialog::SubdirsProjectWizardDialog(const QString &templateName,
 +                                               const QIcon &icon,
 +                                               const QList<QWizardPage*> &extensionPages,
 +                                               QWidget *parent) :
 +    BaseQt4ProjectWizardDialog(parent)
 +{
 +    setWindowIcon(icon);
 +    setWindowTitle(templateName);
 +
 +    setIntroDescription(tr("This wizard generates Qt4 subdirs project. "
 +                           "Add subprojects to it later on by using the other wizards."));
 +
 +    addTargetSetupPage();
 +
 +    foreach (QWizardPage *p, extensionPages)
 +        Core::BaseFileWizard::applyExtensionPageShortTitle(this, addPage(p));
 +}
 +
 +QtProjectParameters SubdirsProjectWizardDialog::parameters() const
 +{
 +    QtProjectParameters rc;
 +    rc.type = QtProjectParameters::EmptyProject;
 +    rc.fileName = projectName();
 +    rc.path = path();
 +    return rc;
 +}
 +
 +} // namespace Internal
 +} // namespace Qt4ProjectManager
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 4d7a608,0000000..176490a
mode 100644,000000..100644
--- /dev/null
@@@ -1,53 -1,0 +1,57 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef PLAINTEXTSNIPPETPROVIDER_H
 +#define PLAINTEXTSNIPPETPROVIDER_H
 +
 +#include "isnippetprovider.h"
 +
 +namespace TextEditor {
 +namespace Internal {
 +
 +class PlainTextSnippetProvider : public ISnippetProvider
 +{
 +public:
 +    PlainTextSnippetProvider();
 +    virtual ~PlainTextSnippetProvider();
 +
 +public:
 +    virtual QString groupId() const;
 +    virtual QString displayName() const;
 +    virtual void decorateEditor(TextEditor::SnippetEditor *editor) const;
 +};
 +
 +} // Internal
 +} // TextEditor
 +
 +#endif // PLAINTEXTSNIPPETPROVIDER_H
index f6ea3a6,0000000..7a58ea8
mode 100644,000000..100644
--- /dev/null
@@@ -1,77 -1,0 +1,81 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "snippetssettings.h"
 +#include "reuse.h"
 +
 +#include <QtCore/QSettings>
 +
 +namespace {
 +
 +static const QLatin1String kGroupPostfix("SnippetsSettings");
 +static const QLatin1String kLastUsedSnippetGroup("LastUsedSnippetGroup");
 +
 +} // Anonymous
 +
 +using namespace TextEditor;
 +using namespace Internal;
 +
 +SnippetsSettings::SnippetsSettings()
 +{}
 +
 +void SnippetsSettings::toSettings(const QString &category, QSettings *s) const
 +{
 +    const QString &group = category + kGroupPostfix;
 +    s->beginGroup(group);
 +    s->setValue(kLastUsedSnippetGroup, m_lastUsedSnippetGroup);
 +    s->endGroup();
 +}
 +
 +void SnippetsSettings::fromSettings(const QString &category, QSettings *s)
 +{
 +    const QString &group = category + kGroupPostfix;
 +    s->beginGroup(group);
 +    m_lastUsedSnippetGroup = s->value(kLastUsedSnippetGroup, QString()).toString();
 +    s->endGroup();
 +}
 +
 +void SnippetsSettings::setLastUsedSnippetGroup(const QString &lastUsed)
 +{
 +    m_lastUsedSnippetGroup = lastUsed;
 +}
 +
 +const QString &SnippetsSettings::lastUsedSnippetGroup() const
 +{
 +    return m_lastUsedSnippetGroup;
 +}
 +
 +bool SnippetsSettings::equals(const SnippetsSettings &snippetsSettings) const
 +{
 +    return m_lastUsedSnippetGroup == snippetsSettings.m_lastUsedSnippetGroup;
 +}
index 9699d47,0000000..c7765e8
mode 100644,000000..100644
--- /dev/null
@@@ -1,66 -1,0 +1,70 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef SNIPPETSSETTINGS_H
 +#define SNIPPETSSETTINGS_H
 +
 +#include <QtCore/QString>
 +
 +QT_BEGIN_NAMESPACE
 +class QSettings;
 +QT_END_NAMESPACE
 +
 +namespace TextEditor {
 +
 +class SnippetsSettings
 +{
 +public:
 +    SnippetsSettings();
 +
 +    void toSettings(const QString &category, QSettings *s) const;
 +    void fromSettings(const QString &category, QSettings *s);
 +
 +    void setLastUsedSnippetGroup(const QString &lastUsed);
 +    const QString &lastUsedSnippetGroup() const;
 +
 +    bool equals(const SnippetsSettings &snippetsSettings) const;
 +
 +private:
 +    QString m_lastUsedSnippetGroup;
 +};
 +
 +inline bool operator==(const SnippetsSettings &a, const SnippetsSettings &b)
 +{ return a.equals(b); }
 +
 +inline bool operator!=(const SnippetsSettings &a, const SnippetsSettings &b)
 +{ return !a.equals(b); }
 +
 +} // TextEditor
 +
 +#endif // SNIPPETSSETTINGS_H
index 485d602,0000000..cf39c77
mode 100644,000000..100644
--- /dev/null
@@@ -1,61 -1,0 +1,65 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef SNIPPETSSETTINGSPAGE_H
 +#define SNIPPETSSETTINGSPAGE_H
 +
 +#include "texteditoroptionspage.h"
 +
 +namespace TextEditor {
 +namespace Internal {
 +
 +class SnippetsSettingsPagePrivate;
 +
 +class SnippetsSettingsPage : public TextEditorOptionsPage
 +{
 +    Q_OBJECT
 +public:
 +    SnippetsSettingsPage(const QString &id, QObject *parent);
 +    virtual ~SnippetsSettingsPage();
 +
 +    virtual QString id() const;
 +    virtual QString displayName() const;
 +    virtual bool matches(const QString &s) const;
 +    virtual QWidget *createPage(QWidget *parent);
 +    virtual void apply();
 +    virtual void finish();
 +
 +private:
 +    SnippetsSettingsPagePrivate *m_d;
 +};
 +
 +} // Internal
 +} // TextEditor
 +
 +#endif // SNIPPETSSETTINGSPAGE_H
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c2f4b7c,0000000..ca07c0c
mode 100644,000000..100644
--- /dev/null
@@@ -1,53 -1,0 +1,57 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "plugin1.h"
 +
 +#include <QtCore/qplugin.h>
 +#include <QStringList>
 +
 +using namespace Plugin1;
 +
 +MyPlugin1::MyPlugin1()
 +{
 +}
 +
 +bool MyPlugin1::initialize(const QStringList &arguments, QString *errorString)
 +{
 +    Q_UNUSED(arguments)
 +    Q_UNUSED(errorString)
 +    return true;
 +}
 +
 +void MyPlugin1::extensionsInitialized()
 +{
 +}
 +
 +Q_EXPORT_PLUGIN(MyPlugin1)
 +
index efff80a,0000000..c6f9843
mode 100644,000000..100644
--- /dev/null
@@@ -1,245 -1,0 +1,249 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include <extensionsystem/pluginmanager.h>
 +#include <extensionsystem/pluginspec.h>
 +#include <extensionsystem/iplugin.h>
 +
 +#include <QtTest/QtTest>
 +
 +#include <QtCore/QObject>
 +
 +using namespace ExtensionSystem;
 +
 +class SignalReceiver;
 +
 +class tst_PluginManager : public QObject
 +{
 +    Q_OBJECT
 +
 +private slots:
 +    void init();
 +    void cleanup();
 +    void addRemoveObjects();
 +    void getObject();
 +    void getObjects();
 +    void plugins();
 +    void circularPlugins();
 +    void correctPlugins1();
 +
 +private:
 +    PluginManager *m_pm;
 +    QSignalSpy *m_objectAdded;
 +    QSignalSpy *m_aboutToRemoveObject;
 +    QSignalSpy *m_pluginsChanged;
 +};
 +
 +class MyClass1 : public QObject
 +{
 +    Q_OBJECT
 +};
 +
 +class MyClass2 : public QObject
 +{
 +    Q_OBJECT
 +};
 +
 +class MyClass11 : public MyClass1
 +{
 +    Q_OBJECT
 +};
 +
 +void tst_PluginManager::init()
 +{
 +    m_pm = new PluginManager;
 +    m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*)));
 +    m_aboutToRemoveObject = new QSignalSpy(m_pm, SIGNAL(aboutToRemoveObject(QObject*)));
 +    m_pluginsChanged = new QSignalSpy(m_pm, SIGNAL(pluginsChanged()));
 +}
 +
 +void tst_PluginManager::cleanup()
 +{
 +    delete m_pm;
 +    delete m_objectAdded;
 +    delete m_aboutToRemoveObject;
 +    delete m_pluginsChanged;
 +}
 +
 +void tst_PluginManager::addRemoveObjects()
 +{
 +    QObject *object1 = new QObject;
 +    QObject *object2 = new QObject;
 +    QCOMPARE(m_pm->allObjects().size(), 0);
 +    m_pm->addObject(object1);
 +    QCOMPARE(m_objectAdded->count(), 1);
 +    QCOMPARE(m_objectAdded->at(0).first().value<QObject *>(), object1);
 +    QCOMPARE(m_aboutToRemoveObject->count(), 0);
 +    QVERIFY(m_pm->allObjects().contains(object1));
 +    QVERIFY(!m_pm->allObjects().contains(object2));
 +    QCOMPARE(m_pm->allObjects().size(), 1);
 +    m_pm->addObject(object2);
 +    QCOMPARE(m_objectAdded->count(), 2);
 +    QCOMPARE(m_objectAdded->at(1).first().value<QObject *>(), object2);
 +    QCOMPARE(m_aboutToRemoveObject->count(), 0);
 +    QVERIFY(m_pm->allObjects().contains(object1));
 +    QVERIFY(m_pm->allObjects().contains(object2));
 +    QCOMPARE(m_pm->allObjects().size(), 2);
 +    m_pm->removeObject(object1);
 +    QCOMPARE(m_objectAdded->count(), 2);
 +    QCOMPARE(m_aboutToRemoveObject->count(), 1);
 +    QCOMPARE(m_aboutToRemoveObject->at(0).first().value<QObject *>(), object1);
 +    QVERIFY(!m_pm->allObjects().contains(object1));
 +    QVERIFY(m_pm->allObjects().contains(object2));
 +    QCOMPARE(m_pm->allObjects().size(), 1);
 +    m_pm->removeObject(object2);
 +    QCOMPARE(m_objectAdded->count(), 2);
 +    QCOMPARE(m_aboutToRemoveObject->count(), 2);
 +    QCOMPARE(m_aboutToRemoveObject->at(1).first().value<QObject *>(), object2);
 +    QVERIFY(!m_pm->allObjects().contains(object1));
 +    QVERIFY(!m_pm->allObjects().contains(object2));
 +    QCOMPARE(m_pm->allObjects().size(), 0);
 +    delete object1;
 +    delete object2;
 +}
 +
 +void tst_PluginManager::getObject()
 +{
 +    MyClass2 *object2 = new MyClass2;
 +    MyClass11 *object11 = new MyClass11;
 +    m_pm->addObject(object2);
 +    QCOMPARE(m_pm->getObject<MyClass11>(), (MyClass11*)0);
 +    QCOMPARE(m_pm->getObject<MyClass1>(), (MyClass1*)0);
 +    QCOMPARE(m_pm->getObject<MyClass2>(), object2);
 +    m_pm->addObject(object11);
 +    QCOMPARE(m_pm->getObject<MyClass11>(), object11);
 +    QCOMPARE(m_pm->getObject<MyClass1>(), qobject_cast<MyClass1*>(object11));
 +    QCOMPARE(m_pm->getObject<MyClass2>(), object2);
 +    m_pm->removeObject(object2);
 +    m_pm->removeObject(object11);
 +    delete object2;
 +    delete object11;
 +}
 +
 +void tst_PluginManager::getObjects()
 +{
 +    MyClass1 *object1 = new MyClass1;
 +    MyClass2 *object2 = new MyClass2;
 +    MyClass11 *object11 = new MyClass11;
 +    m_pm->addObject(object2);
 +    QCOMPARE(m_pm->getObjects<MyClass11>(), QList<MyClass11*>());
 +    QCOMPARE(m_pm->getObjects<MyClass1>(), QList<MyClass1*>());
 +    QCOMPARE(m_pm->getObjects<MyClass2>(), QList<MyClass2*>() << object2);
 +    QCOMPARE(m_pm->allObjects(), QList<QObject*>() << object2);
 +    m_pm->addObject(object11);
 +    QCOMPARE(m_pm->getObjects<MyClass11>(), QList<MyClass11*>() << object11);
 +    QCOMPARE(m_pm->getObjects<MyClass1>(), QList<MyClass1*>() << object11);
 +    QCOMPARE(m_pm->getObjects<MyClass2>(), QList<MyClass2*>() << object2);
 +    QCOMPARE(m_pm->allObjects(), QList<QObject*>() << object2 << object11);
 +    m_pm->addObject(object1);
 +    QCOMPARE(m_pm->getObjects<MyClass11>(), QList<MyClass11*>() << object11);
 +    QCOMPARE(m_pm->getObjects<MyClass1>(), QList<MyClass1*>() << object11 << object1);
 +    QCOMPARE(m_pm->getObjects<MyClass2>(), QList<MyClass2*>() << object2);
 +    QCOMPARE(m_pm->allObjects(), QList<QObject*>() << object2 << object11 << object1);
 +    m_pm->removeObject(object2);
 +    m_pm->removeObject(object11);
 +    m_pm->removeObject(object1);
 +    delete object1;
 +    delete object2;
 +    delete object11;
 +}
 +
 +void tst_PluginManager::plugins()
 +{
 +    m_pm->setPluginPaths(QStringList() << "plugins");
 +    QCOMPARE(m_pluginsChanged->count(), 1);
 +    QList<PluginSpec *> plugins = m_pm->plugins();
 +    QCOMPARE(plugins.count(), 3);
 +    foreach (const QString &expected, QStringList() << "helloworld" << "MyPlugin" << "dummyPlugin") {
 +        bool found = false;
 +        foreach (PluginSpec *spec, plugins) {
 +            if (spec->name() == expected) {
 +                found = true;
 +                break;
 +            }
 +        }
 +        QVERIFY2(found, QString("plugin '%1' not found").arg(expected).toLocal8Bit().constData());
 +    }
 +}
 +
 +void tst_PluginManager::circularPlugins()
 +{
 +    m_pm->setPluginPaths(QStringList() << "circularplugins");
 +    m_pm->loadPlugins();
 +    foreach (PluginSpec *spec, m_pm->plugins()) {
 +        if (spec->name() == "plugin1") {
 +            QVERIFY(spec->hasError());
 +            QCOMPARE(spec->state(), PluginSpec::Resolved);
 +            QCOMPARE(spec->plugin(), (IPlugin*)0);
 +        } else if (spec->name() == "plugin2") {
 +            QVERIFY(!spec->hasError());
 +            QCOMPARE(spec->state(), PluginSpec::Running);
 +        } else if (spec->name() == "plugin3") {
 +            QVERIFY(spec->hasError());
 +            QCOMPARE(spec->state(), PluginSpec::Resolved);
 +            QCOMPARE(spec->plugin(), (IPlugin*)0);
 +        }
 +    }
 +}
 +
 +void tst_PluginManager::correctPlugins1()
 +{
 +    m_pm->setFileExtension("spec");
 +    m_pm->setPluginPaths(QStringList() << "correctplugins1");
 +    m_pm->loadPlugins();
 +    foreach (PluginSpec *spec, m_pm->plugins()) {
 +        if (spec->hasError())
 +            qDebug() << spec->errorString();
 +        QVERIFY(!spec->hasError());
 +        QCOMPARE(spec->state(), PluginSpec::Running);
 +    }
 +    bool plugin1running = false;
 +    bool plugin2running = false;
 +    bool plugin3running = false;
 +    foreach (QObject *obj, m_pm->allObjects()) {
 +        if (obj->objectName() == "MyPlugin1_running")
 +            plugin1running = true;
 +        else if (obj->objectName() == "MyPlugin2_running")
 +            plugin2running = true;
 +        else if (obj->objectName() == "MyPlugin3_running")
 +            plugin3running = true;
 +    }
 +    QVERIFY(plugin1running);
 +    QVERIFY(plugin2running);
 +    QVERIFY(plugin3running);
 +}
 +
 +QTEST_MAIN(tst_PluginManager)
 +
 +#include "tst_pluginmanager.moc"
 +
index 490eb8b,0000000..958bcb3
mode 100644,000000..100644
--- /dev/null
@@@ -1,61 -1,0 +1,65 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#ifndef TESTPLUGIN_H
 +#define TESTPLUGIN_H
 +
 +#include "testplugin_global.h"
 +#include <extensionsystem/iplugin.h>
 +
 +#include <QtCore/QObject>
 +
 +namespace MyPlugin {
 +
 +class MYPLUGIN_EXPORT MyPluginImpl : public ExtensionSystem::IPlugin
 +{
 +    Q_OBJECT
 +
 +public:
 +    MyPluginImpl();
 +
 +    bool initialize(const QStringList &arguments, QString *errorString);
 +    void extensionsInitialized();
 +
 +public slots:
 +    bool isInitialized() { return m_isInitialized; }
 +    bool isExtensionsInitialized() { return m_isExtensionsInitialized; }
 +
 +private:
 +    bool m_isInitialized;
 +    bool m_isExtensionsInitialized;
 +};
 +
 +} // namespace
 +
 +#endif // TESTPLUGIN_H
index bd9de64,0000000..d3dda2c
mode 100644,000000..100644
--- /dev/null
@@@ -1,291 -1,0 +1,295 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include <extensionsystem/pluginspec.h>
 +#include <extensionsystem/pluginspec_p.h>
 +#include <extensionsystem/pluginmanager_p.h>
 +#include <extensionsystem/pluginmanager.h>
 +
 +#include <QtCore/QObject>
 +#include <QtCore/QMetaObject>
 +#include <QtTest/QtTest>
 +
 +using namespace ExtensionSystem;
 +
 +class tst_PluginSpec : public QObject
 +{
 +    Q_OBJECT
 +
 +private slots:
 +    void read();
 +    void readError();
 +    void isValidVersion();
 +    void versionCompare();
 +    void provides();
 +    void experimental();
 +    void locationAndPath();
 +    void resolveDependencies();
 +    void loadLibrary();
 +    void initializePlugin();
 +    void initializeExtensions();
 +};
 +
 +void tst_PluginSpec::read()
 +{
 +    Internal::PluginSpecPrivate spec(0);
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(spec.read("testspecs/spec1.xml"));
 +    QCOMPARE(spec.state, PluginSpec::Read);
 +    QVERIFY(!spec.hasError);
 +    QVERIFY(spec.errorString.isEmpty());
 +    QCOMPARE(spec.name, QString("test"));
 +    QCOMPARE(spec.version, QString("1.0.1"));
 +    QCOMPARE(spec.compatVersion, QString("1.0.0"));
 +    QCOMPARE(spec.experimental, false);
 +    QCOMPARE(spec.enabled, true);
 +    QCOMPARE(spec.vendor, QString("Nokia Corporation"));
 +    QCOMPARE(spec.copyright, QString("(C) 2007 Nokia Corporation"));
 +    QCOMPARE(spec.license, QString("This is a default license bla\nblubbblubb\nend of terms"));
 +    QCOMPARE(spec.description, QString("This plugin is just a test.\n    it demonstrates the great use of the plugin spec."));
 +    QCOMPARE(spec.url, QString("http://qt.noki.com"));
 +    PluginDependency dep1;
 +    dep1.name = QString("SomeOtherPlugin");
 +    dep1.version = QString("2.3.0_2");
 +    PluginDependency dep2;
 +    dep2.name = QString("EvenOther");
 +    dep2.version = QString("1.0.0");
 +    QCOMPARE(spec.dependencies, QList<PluginDependency>() << dep1 << dep2);
 +
 +    // test missing compatVersion behavior
 +    QVERIFY(spec.read("testspecs/spec2.xml"));
 +    QCOMPARE(spec.version, QString("3.1.4_10"));
 +    QCOMPARE(spec.compatVersion, QString("3.1.4_10"));
 +}
 +
 +void tst_PluginSpec::readError()
 +{
 +    Internal::PluginSpecPrivate spec(0);
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(!spec.read("non-existing-file.xml"));
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(spec.hasError);
 +    QVERIFY(!spec.errorString.isEmpty());
 +    QVERIFY(!spec.read("testspecs/spec_wrong1.xml"));
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(spec.hasError);
 +    QVERIFY(!spec.errorString.isEmpty());
 +    QVERIFY(!spec.read("testspecs/spec_wrong2.xml"));
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(spec.hasError);
 +    QVERIFY(!spec.errorString.isEmpty());
 +    QVERIFY(!spec.read("testspecs/spec_wrong3.xml"));
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(spec.hasError);
 +    QVERIFY(!spec.errorString.isEmpty());
 +    QVERIFY(!spec.read("testspecs/spec_wrong4.xml"));
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(spec.hasError);
 +    QVERIFY(!spec.errorString.isEmpty());
 +    QVERIFY(!spec.read("testspecs/spec_wrong5.xml"));
 +    QCOMPARE(spec.state, PluginSpec::Invalid);
 +    QVERIFY(spec.hasError);
 +    QVERIFY(!spec.errorString.isEmpty());
 +}
 +
 +void tst_PluginSpec::isValidVersion()
 +{
 +    QVERIFY(Internal::PluginSpecPrivate::isValidVersion("2"));
 +    QVERIFY(Internal::PluginSpecPrivate::isValidVersion("53"));
 +    QVERIFY(Internal::PluginSpecPrivate::isValidVersion("52_1"));
 +    QVERIFY(Internal::PluginSpecPrivate::isValidVersion("3.12"));
 +    QVERIFY(Internal::PluginSpecPrivate::isValidVersion("31.1_12"));
 +    QVERIFY(Internal::PluginSpecPrivate::isValidVersion("31.1.0"));
 +    QVERIFY(Internal::PluginSpecPrivate::isValidVersion("1.0.2_1"));
 +
 +    QVERIFY(!Internal::PluginSpecPrivate::isValidVersion(""));
 +    QVERIFY(!Internal::PluginSpecPrivate::isValidVersion("1..0"));
 +    QVERIFY(!Internal::PluginSpecPrivate::isValidVersion("1.0_"));
 +    QVERIFY(!Internal::PluginSpecPrivate::isValidVersion("1.0.0.0"));
 +}
 +
 +void tst_PluginSpec::versionCompare()
 +{
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3", "3") == 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.0.0", "3") == 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.0", "3") == 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.0.0_1", "3_1") == 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.0_21", "3_21") == 0);
 +
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3", "1") > 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3", "1.0_12") > 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3_1", "3") > 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.1.0_23", "3.1") > 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.1_23", "3.1_12") > 0);
 +
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("1", "3") < 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("1.0_12", "3") < 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3", "3_1") < 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.1", "3.1.0_23") < 0);
 +    QVERIFY(Internal::PluginSpecPrivate::versionCompare("3.1_12", "3.1_23") < 0);
 +}
 +
 +void tst_PluginSpec::provides()
 +{
 +    Internal::PluginSpecPrivate spec(0);
 +    QVERIFY(spec.read("testspecs/simplespec.xml"));
 +    QVERIFY(!spec.provides("SomeOtherPlugin", "2.2.3_9"));
 +    QVERIFY(!spec.provides("MyPlugin", "2.2.3_10"));
 +    QVERIFY(!spec.provides("MyPlugin", "2.2.4"));
 +    QVERIFY(!spec.provides("MyPlugin", "2.3.11_1"));
 +    QVERIFY(!spec.provides("MyPlugin", "2.3"));
 +    QVERIFY(!spec.provides("MyPlugin", "3.0"));
 +    QVERIFY(!spec.provides("MyPlugin", "1.9.9_99"));
 +    QVERIFY(!spec.provides("MyPlugin", "1.9"));
 +    QVERIFY(!spec.provides("MyPlugin", "0.9"));
 +    QVERIFY(!spec.provides("MyPlugin", "1"));
 +
 +    QVERIFY(spec.provides("myplugin", "2.2.3_9"));
 +    QVERIFY(spec.provides("MyPlugin", "2.2.3_9"));
 +    QVERIFY(spec.provides("MyPlugin", "2.2.3_8"));
 +    QVERIFY(spec.provides("MyPlugin", "2.2.3"));
 +    QVERIFY(spec.provides("MyPlugin", "2.2.2"));
 +    QVERIFY(spec.provides("MyPlugin", "2.1.2_10"));
 +    QVERIFY(spec.provides("MyPlugin", "2.0_10"));
 +    QVERIFY(spec.provides("MyPlugin", "2"));
 +}
 +
 +void tst_PluginSpec::experimental()
 +{
 +    Internal::PluginSpecPrivate spec(0);
 +    QVERIFY(spec.read("testspecs/simplespec_experimental.xml"));
 +    QCOMPARE(spec.experimental, true);
 +    QCOMPARE(spec.enabled, false);
 +}
 +
 +void tst_PluginSpec::locationAndPath()
 +{
 +    Internal::PluginSpecPrivate spec(0);
 +    QVERIFY(spec.read("testspecs/simplespec.xml"));
 +    QCOMPARE(spec.location, QString(QDir::currentPath()+"/testspecs"));
 +    QCOMPARE(spec.filePath, QString(QDir::currentPath()+"/testspecs/simplespec.xml"));
 +    QVERIFY(spec.read("testdir/../testspecs/simplespec.xml"));
 +    QCOMPARE(spec.location, QString(QDir::currentPath()+"/testspecs"));
 +    QCOMPARE(spec.filePath, QString(QDir::currentPath()+"/testspecs/simplespec.xml"));
 +    QVERIFY(spec.read("testdir/spec.xml"));
 +    QCOMPARE(spec.location, QString(QDir::currentPath()+"/testdir"));
 +    QCOMPARE(spec.filePath, QString(QDir::currentPath()+"/testdir/spec.xml"));
 +}
 +
 +void tst_PluginSpec::resolveDependencies()
 +{
 +    QList<PluginSpec *> specs;
 +    PluginSpec *spec1 = Internal::PluginManagerPrivate::createSpec();
 +    specs.append(spec1);
 +    Internal::PluginSpecPrivate *spec1Priv = Internal::PluginManagerPrivate::privateSpec(spec1);
 +    spec1Priv->read("testdependencies/spec1.xml");
 +    PluginSpec *spec2 = Internal::PluginManagerPrivate::createSpec();
 +    specs.append(spec2);
 +    Internal::PluginManagerPrivate::privateSpec(spec2)->read("testdependencies/spec2.xml");
 +    PluginSpec *spec3 = Internal::PluginManagerPrivate::createSpec();
 +    specs.append(spec3);
 +    Internal::PluginManagerPrivate::privateSpec(spec3)->read("testdependencies/spec3.xml");
 +    PluginSpec *spec4 = Internal::PluginManagerPrivate::createSpec();
 +    specs.append(spec4);
 +    Internal::PluginSpecPrivate *spec4Priv = Internal::PluginManagerPrivate::privateSpec(spec4);
 +    spec4Priv->read("testdependencies/spec4.xml");
 +    PluginSpec *spec5 = Internal::PluginManagerPrivate::createSpec();
 +    specs.append(spec5);
 +    Internal::PluginManagerPrivate::privateSpec(spec5)->read("testdependencies/spec5.xml");
 +    QVERIFY(spec1Priv->resolveDependencies(specs));
 +    QCOMPARE(spec1Priv->dependencySpecs.size(), 2);
 +    QVERIFY(spec1Priv->dependencySpecs.contains(spec2));
 +    QVERIFY(spec1Priv->dependencySpecs.contains(spec3));
 +    QCOMPARE(spec1Priv->state, PluginSpec::Resolved);
 +    QVERIFY(!spec4Priv->resolveDependencies(specs));
 +    QVERIFY(spec4Priv->hasError);
 +    QCOMPARE(spec4Priv->state, PluginSpec::Read);
 +}
 +
 +void tst_PluginSpec::loadLibrary()
 +{
 +    PluginSpec *ps = Internal::PluginManagerPrivate::createSpec();
 +    Internal::PluginSpecPrivate *spec = Internal::PluginManagerPrivate::privateSpec(ps);
 +    PluginManager *manager = new PluginManager();
 +    QVERIFY(spec->read("testplugin/testplugin.xml"));
 +    QVERIFY(spec->resolveDependencies(QList<PluginSpec *>()));
 +    QVERIFY(spec->loadLibrary());
 +    QVERIFY(spec->plugin != 0);
 +    QVERIFY(QString::fromLocal8Bit(spec->plugin->metaObject()->className()) == QString::fromLocal8Bit("MyPlugin::MyPluginImpl"));
 +    QCOMPARE(spec->state, PluginSpec::Loaded);
 +    QVERIFY(!spec->hasError);
 +    QCOMPARE(spec->plugin->pluginSpec(), ps);
 +    delete manager;
 +    delete ps;
 +}
 +
 +void tst_PluginSpec::initializePlugin()
 +{
 +    Internal::PluginSpecPrivate spec(0);
 +    QVERIFY(spec.read("testplugin/testplugin.xml"));
 +    QVERIFY(spec.resolveDependencies(QList<PluginSpec *>()));
 +    QVERIFY(spec.loadLibrary());
 +    bool isInitialized;
 +    QMetaObject::invokeMethod(spec.plugin, "isInitialized",
 +                              Qt::DirectConnection, Q_RETURN_ARG(bool, isInitialized));
 +    QVERIFY(!isInitialized);
 +    QVERIFY(spec.initializePlugin());
 +    QCOMPARE(spec.state, PluginSpec::Initialized);
 +    QVERIFY(!spec.hasError);
 +    QMetaObject::invokeMethod(spec.plugin, "isInitialized",
 +                              Qt::DirectConnection, Q_RETURN_ARG(bool, isInitialized));
 +    QVERIFY(isInitialized);
 +}
 +
 +void tst_PluginSpec::initializeExtensions()
 +{
 +    Internal::PluginSpecPrivate spec(0);
 +    QVERIFY(spec.read("testplugin/testplugin.xml"));
 +    QVERIFY(spec.resolveDependencies(QList<PluginSpec *>()));
 +    QVERIFY(spec.loadLibrary());
 +    bool isExtensionsInitialized;
 +    QVERIFY(spec.initializePlugin());
 +    QMetaObject::invokeMethod(spec.plugin, "isExtensionsInitialized",
 +                              Qt::DirectConnection, Q_RETURN_ARG(bool, isExtensionsInitialized));
 +    QVERIFY(!isExtensionsInitialized);
 +    QVERIFY(spec.initializeExtensions());
 +    QCOMPARE(spec.state, PluginSpec::Running);
 +    QVERIFY(!spec.hasError);
 +    QMetaObject::invokeMethod(spec.plugin, "isExtensionsInitialized",
 +                              Qt::DirectConnection, Q_RETURN_ARG(bool, isExtensionsInitialized));
 +    QVERIFY(isExtensionsInitialized);
 +}
 +
 +QTEST_MAIN(tst_PluginSpec)
 +
 +#include "tst_pluginspec.moc"
Simple merge
index b625b23,0000000..50f9d05
mode 100644,000000..100644
--- /dev/null
@@@ -1,83 -1,0 +1,87 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "../../../src/shared/proparser/ioutils.cpp"
 +
 +#include <QtTest/QtTest>
 +
 +class tst_IoUtils : public QObject
 +{
 +    Q_OBJECT
 +
 +private slots:
 +    void quoteArg_data();
 +    void quoteArg();
 +};
 +
 +void tst_IoUtils::quoteArg_data()
 +{
 +    QTest::addColumn<QString>("in");
 +    QTest::addColumn<QString>("out");
 +
 +    static const struct {
 +        const char * const in;
 +        const char * const out;
 +    } vals[] = {
 +#ifdef Q_OS_WIN
 +        { "", "\"\"" },
 +        { "hallo", "hallo" },
 +        { "hallo du", "\"hallo du\"" },
 +        { "hallo\\", "hallo\\" },
 +        { "hallo du\\", "\"hallo du\"\\" },
 +        { "ha\"llo", "\"ha\"\\^\"\"llo\"" },
 +        { "ha\\\"llo", "\"ha\"\\\\\\^\"\"llo\"" },
 +#else
 +        { "", "\"\"" },
 +        { "hallo", "hallo" },
 +        { "hallo du", "'hallo du'" },
 +        { "ha'llo", "'ha'\\''llo'" },
 +#endif
 +    };
 +
 +    for (unsigned i = 0; i < sizeof(vals)/sizeof(vals[0]); i++)
 +        QTest::newRow(vals[i].in) << QString::fromLatin1(vals[i].in)
 +                                  << QString::fromLatin1(vals[i].out);
 +}
 +
 +void tst_IoUtils::quoteArg()
 +{
 +    QFETCH(QString, in);
 +    QFETCH(QString, out);
 +
 +    QCOMPARE(IoUtils::shellQuote(in), out);
 +}
 +
 +QTEST_MAIN(tst_IoUtils)
 +
 +#include "tst_ioutils.moc"
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 1b3bc83,0000000..f6a9821
mode 100644,000000..100644
--- /dev/null
@@@ -1,55 -1,0 +1,59 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include "codaclientapplication.h"
 +
 +#include <cstdio>
 +
 +int main(int argc, char *argv[])
 +{
 +    CodaClientApplication app(argc, argv);
 +
 +    QString errorMessage;
 +    const CodaClientApplication::ParseArgsResult ar = app.parseArguments(&errorMessage);
 +    if (!errorMessage.isEmpty())
 +        std::fprintf(stderr, "\nError: %s\n\n", qPrintable(errorMessage));
 +    switch (ar) {
 +    case CodaClientApplication::ParseArgsError:
 +        std::printf("%s", qPrintable(CodaClientApplication::usage()));
 +        return -1;
 +    case CodaClientApplication::ParseArgsHelp:
 +        std::printf("%s", qPrintable(CodaClientApplication::usage()));
 +        return 0;
 +    case CodaClientApplication::ParseInitError:
 +        return -1;
 +    case CodaClientApplication::ParseArgsOk:
 +        break;
 +    }
 +    return app.start() ? app.exec() : 0;
 +}
index adedeb1,0000000..ec49d7a
mode 100644,000000..100644
--- /dev/null
@@@ -1,1617 -1,0 +1,1621 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +//
 +//  W A R N I N G
 +//  -------------
 +//
 +// This file is automatically generated.
 +// Changes will be lost.
 +//
 +
 +
 +virtual bool visit(ObjCSelectorArgumentAST *ast)
 +{
 +    if (ast->name_token)
 +        terminal(ast->name_token, ast);
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCSelectorAST *ast)
 +{
 +    for (ObjCSelectorArgumentListAST *iter = ast->selector_argument_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(SimpleSpecifierAST *ast)
 +{
 +    if (ast->specifier_token)
 +        terminal(ast->specifier_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(AttributeSpecifierAST *ast)
 +{
 +    if (ast->attribute_token)
 +        terminal(ast->attribute_token, ast);
 +    if (ast->first_lparen_token)
 +        terminal(ast->first_lparen_token, ast);
 +    if (ast->second_lparen_token)
 +        terminal(ast->second_lparen_token, ast);
 +    for (AttributeListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->first_rparen_token)
 +        terminal(ast->first_rparen_token, ast);
 +    if (ast->second_rparen_token)
 +        terminal(ast->second_rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(AttributeAST *ast)
 +{
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    if (ast->tag_token)
 +        terminal(ast->tag_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(TypeofSpecifierAST *ast)
 +{
 +    if (ast->typeof_token)
 +        terminal(ast->typeof_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(DeclaratorAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    for (PtrOperatorListAST *iter = ast->ptr_operator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->core_declarator);
 +    for (PostfixDeclaratorListAST *iter = ast->postfix_declarator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    for (SpecifierListAST *iter = ast->post_attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->equal_token)
 +        terminal(ast->equal_token, ast);
 +    nonterminal(ast->initializer);
 +    return false;
 +}
 +
 +virtual bool visit(SimpleDeclarationAST *ast)
 +{
 +    if (ast->qt_invokable_token)
 +        terminal(ast->qt_invokable_token, ast);
 +    for (SpecifierListAST *iter = ast->decl_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    for (DeclaratorListAST *iter = ast->declarator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(EmptyDeclarationAST *ast)
 +{
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(AccessDeclarationAST *ast)
 +{
 +    if (ast->access_specifier_token)
 +        terminal(ast->access_specifier_token, ast);
 +    if (ast->slots_token)
 +        terminal(ast->slots_token, ast);
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QtObjectTagAST *ast)
 +{
 +    if (ast->q_object_token)
 +        terminal(ast->q_object_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QtPrivateSlotAST *ast)
 +{
 +    if (ast->q_private_slot_token)
 +        terminal(ast->q_private_slot_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    if (ast->dptr_token)
 +        terminal(ast->dptr_token, ast);
 +    if (ast->dptr_lparen_token)
 +        terminal(ast->dptr_lparen_token, ast);
 +    if (ast->dptr_rparen_token)
 +        terminal(ast->dptr_rparen_token, ast);
 +    if (ast->comma_token)
 +        terminal(ast->comma_token, ast);
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QtPropertyDeclarationItemAST *ast)
 +{
 +    if (ast->item_name_token)
 +        terminal(ast->item_name_token, ast);
 +    nonterminal(ast->expression);
 +    return false;
 +}
 +
 +virtual bool visit(QtPropertyDeclarationAST *ast)
 +{
 +    if (ast->property_specifier_token)
 +        terminal(ast->property_specifier_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->type_id);
 +    nonterminal(ast->property_name);
 +    for (QtPropertyDeclarationItemListAST *iter = ast->property_declaration_item_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QtEnumDeclarationAST *ast)
 +{
 +    if (ast->enum_specifier_token)
 +        terminal(ast->enum_specifier_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (NameListAST *iter = ast->enumerator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QtFlagsDeclarationAST *ast)
 +{
 +    if (ast->flags_specifier_token)
 +        terminal(ast->flags_specifier_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (NameListAST *iter = ast->flag_enums_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QtInterfaceNameAST *ast)
 +{
 +    nonterminal(ast->interface_name);
 +    for (NameListAST *iter = ast->constraint_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(QtInterfacesDeclarationAST *ast)
 +{
 +    if (ast->interfaces_token)
 +        terminal(ast->interfaces_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (QtInterfaceNameListAST *iter = ast->interface_name_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(AsmDefinitionAST *ast)
 +{
 +    if (ast->asm_token)
 +        terminal(ast->asm_token, ast);
 +    if (ast->volatile_token)
 +        terminal(ast->volatile_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(BaseSpecifierAST *ast)
 +{
 +    if (ast->virtual_token)
 +        terminal(ast->virtual_token, ast);
 +    if (ast->access_specifier_token)
 +        terminal(ast->access_specifier_token, ast);
 +    nonterminal(ast->name);
 +    return false;
 +}
 +
 +virtual bool visit(IdExpressionAST *ast)
 +{
 +    nonterminal(ast->name);
 +    return false;
 +}
 +
 +virtual bool visit(CompoundExpressionAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->statement);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(CompoundLiteralAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->type_id);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->initializer);
 +    return false;
 +}
 +
 +virtual bool visit(QtMethodAST *ast)
 +{
 +    if (ast->method_token)
 +        terminal(ast->method_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->declarator);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QtMemberDeclarationAST *ast)
 +{
 +    if (ast->q_token)
 +        terminal(ast->q_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->type_id);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(BinaryExpressionAST *ast)
 +{
 +    nonterminal(ast->left_expression);
 +    if (ast->binary_op_token)
 +        terminal(ast->binary_op_token, ast);
 +    nonterminal(ast->right_expression);
 +    return false;
 +}
 +
 +virtual bool visit(CastExpressionAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->type_id);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->expression);
 +    return false;
 +}
 +
 +virtual bool visit(ClassSpecifierAST *ast)
 +{
 +    if (ast->classkey_token)
 +        terminal(ast->classkey_token, ast);
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->name);
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    for (BaseSpecifierListAST *iter = ast->base_clause_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    if (ast->lbrace_token)
 +        terminal(ast->lbrace_token, ast);
 +    for (DeclarationListAST *iter = ast->member_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rbrace_token)
 +        terminal(ast->rbrace_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(CaseStatementAST *ast)
 +{
 +    if (ast->case_token)
 +        terminal(ast->case_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(CompoundStatementAST *ast)
 +{
 +    if (ast->lbrace_token)
 +        terminal(ast->lbrace_token, ast);
 +    for (StatementListAST *iter = ast->statement_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rbrace_token)
 +        terminal(ast->rbrace_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ConditionAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    return false;
 +}
 +
 +virtual bool visit(ConditionalExpressionAST *ast)
 +{
 +    nonterminal(ast->condition);
 +    if (ast->question_token)
 +        terminal(ast->question_token, ast);
 +    nonterminal(ast->left_expression);
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    nonterminal(ast->right_expression);
 +    return false;
 +}
 +
 +virtual bool visit(CppCastExpressionAST *ast)
 +{
 +    if (ast->cast_token)
 +        terminal(ast->cast_token, ast);
 +    if (ast->less_token)
 +        terminal(ast->less_token, ast);
 +    nonterminal(ast->type_id);
 +    if (ast->greater_token)
 +        terminal(ast->greater_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(CtorInitializerAST *ast)
 +{
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    for (MemInitializerListAST *iter = ast->member_initializer_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(DeclarationStatementAST *ast)
 +{
 +    nonterminal(ast->declaration);
 +    return false;
 +}
 +
 +virtual bool visit(DeclaratorIdAST *ast)
 +{
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    nonterminal(ast->name);
 +    return false;
 +}
 +
 +virtual bool visit(NestedDeclaratorAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->declarator);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(FunctionDeclaratorAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->parameter_declaration_clause);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    for (SpecifierListAST *iter = ast->cv_qualifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->exception_specification);
 +    nonterminal(ast->trailing_return_type);
 +    nonterminal(ast->as_cpp_initializer);
 +    return false;
 +}
 +
 +virtual bool visit(ArrayDeclaratorAST *ast)
 +{
 +    if (ast->lbracket_token)
 +        terminal(ast->lbracket_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rbracket_token)
 +        terminal(ast->rbracket_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(DeleteExpressionAST *ast)
 +{
 +    if (ast->scope_token)
 +        terminal(ast->scope_token, ast);
 +    if (ast->delete_token)
 +        terminal(ast->delete_token, ast);
 +    if (ast->lbracket_token)
 +        terminal(ast->lbracket_token, ast);
 +    if (ast->rbracket_token)
 +        terminal(ast->rbracket_token, ast);
 +    nonterminal(ast->expression);
 +    return false;
 +}
 +
 +virtual bool visit(DoStatementAST *ast)
 +{
 +    if (ast->do_token)
 +        terminal(ast->do_token, ast);
 +    nonterminal(ast->statement);
 +    if (ast->while_token)
 +        terminal(ast->while_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NamedTypeSpecifierAST *ast)
 +{
 +    nonterminal(ast->name);
 +    return false;
 +}
 +
 +virtual bool visit(ElaboratedTypeSpecifierAST *ast)
 +{
 +    if (ast->classkey_token)
 +        terminal(ast->classkey_token, ast);
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->name);
 +    return false;
 +}
 +
 +virtual bool visit(EnumSpecifierAST *ast)
 +{
 +    if (ast->enum_token)
 +        terminal(ast->enum_token, ast);
 +    nonterminal(ast->name);
 +    if (ast->lbrace_token)
 +        terminal(ast->lbrace_token, ast);
 +    for (EnumeratorListAST *iter = ast->enumerator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->stray_comma_token)
 +        terminal(ast->stray_comma_token, ast);
 +    if (ast->rbrace_token)
 +        terminal(ast->rbrace_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(EnumeratorAST *ast)
 +{
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    if (ast->equal_token)
 +        terminal(ast->equal_token, ast);
 +    nonterminal(ast->expression);
 +    return false;
 +}
 +
 +virtual bool visit(ExceptionDeclarationAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ExceptionSpecificationAST *ast)
 +{
 +    if (ast->throw_token)
 +        terminal(ast->throw_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    for (ExpressionListAST *iter = ast->type_id_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ExpressionOrDeclarationStatementAST *ast)
 +{
 +    nonterminal(ast->expression);
 +    nonterminal(ast->declaration);
 +    return false;
 +}
 +
 +virtual bool visit(ExpressionStatementAST *ast)
 +{
 +    nonterminal(ast->expression);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(FunctionDefinitionAST *ast)
 +{
 +    if (ast->qt_invokable_token)
 +        terminal(ast->qt_invokable_token, ast);
 +    for (SpecifierListAST *iter = ast->decl_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    nonterminal(ast->ctor_initializer);
 +    nonterminal(ast->function_body);
 +    return false;
 +}
 +
 +virtual bool visit(ForeachStatementAST *ast)
 +{
 +    if (ast->foreach_token)
 +        terminal(ast->foreach_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    nonterminal(ast->initializer);
 +    if (ast->comma_token)
 +        terminal(ast->comma_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(ForStatementAST *ast)
 +{
 +    if (ast->for_token)
 +        terminal(ast->for_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->initializer);
 +    nonterminal(ast->condition);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(IfStatementAST *ast)
 +{
 +    if (ast->if_token)
 +        terminal(ast->if_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->condition);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    if (ast->else_token)
 +        terminal(ast->else_token, ast);
 +    nonterminal(ast->else_statement);
 +    return false;
 +}
 +
 +virtual bool visit(ArrayInitializerAST *ast)
 +{
 +    if (ast->lbrace_token)
 +        terminal(ast->lbrace_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rbrace_token)
 +        terminal(ast->rbrace_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(LabeledStatementAST *ast)
 +{
 +    if (ast->label_token)
 +        terminal(ast->label_token, ast);
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(LinkageBodyAST *ast)
 +{
 +    if (ast->lbrace_token)
 +        terminal(ast->lbrace_token, ast);
 +    for (DeclarationListAST *iter = ast->declaration_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rbrace_token)
 +        terminal(ast->rbrace_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(LinkageSpecificationAST *ast)
 +{
 +    if (ast->extern_token)
 +        terminal(ast->extern_token, ast);
 +    if (ast->extern_type_token)
 +        terminal(ast->extern_type_token, ast);
 +    nonterminal(ast->declaration);
 +    return false;
 +}
 +
 +virtual bool visit(MemInitializerAST *ast)
 +{
 +    nonterminal(ast->name);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NestedNameSpecifierAST *ast)
 +{
 +    nonterminal(ast->class_or_namespace_name);
 +    if (ast->scope_token)
 +        terminal(ast->scope_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(QualifiedNameAST *ast)
 +{
 +    if (ast->global_scope_token)
 +        terminal(ast->global_scope_token, ast);
 +    for (NestedNameSpecifierListAST *iter = ast->nested_name_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->unqualified_name);
 +    return false;
 +}
 +
 +virtual bool visit(OperatorFunctionIdAST *ast)
 +{
 +    if (ast->operator_token)
 +        terminal(ast->operator_token, ast);
 +    nonterminal(ast->op);
 +    return false;
 +}
 +
 +virtual bool visit(ConversionFunctionIdAST *ast)
 +{
 +    if (ast->operator_token)
 +        terminal(ast->operator_token, ast);
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    for (PtrOperatorListAST *iter = ast->ptr_operator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(SimpleNameAST *ast)
 +{
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(DestructorNameAST *ast)
 +{
 +    if (ast->tilde_token)
 +        terminal(ast->tilde_token, ast);
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(TemplateIdAST *ast)
 +{
 +    if (ast->template_token)
 +        terminal(ast->template_token, ast);
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    if (ast->less_token)
 +        terminal(ast->less_token, ast);
 +    for (ExpressionListAST *iter = ast->template_argument_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->greater_token)
 +        terminal(ast->greater_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NamespaceAST *ast)
 +{
 +    if (ast->namespace_token)
 +        terminal(ast->namespace_token, ast);
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->linkage_body);
 +    return false;
 +}
 +
 +virtual bool visit(NamespaceAliasDefinitionAST *ast)
 +{
 +    if (ast->namespace_token)
 +        terminal(ast->namespace_token, ast);
 +    if (ast->namespace_name_token)
 +        terminal(ast->namespace_name_token, ast);
 +    if (ast->equal_token)
 +        terminal(ast->equal_token, ast);
 +    nonterminal(ast->name);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NewPlacementAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NewArrayDeclaratorAST *ast)
 +{
 +    if (ast->lbracket_token)
 +        terminal(ast->lbracket_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rbracket_token)
 +        terminal(ast->rbracket_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NewExpressionAST *ast)
 +{
 +    if (ast->scope_token)
 +        terminal(ast->scope_token, ast);
 +    if (ast->new_token)
 +        terminal(ast->new_token, ast);
 +    nonterminal(ast->new_placement);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->type_id);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->new_type_id);
 +    nonterminal(ast->new_initializer);
 +    return false;
 +}
 +
 +virtual bool visit(NewInitializerAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NewTypeIdAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    for (PtrOperatorListAST *iter = ast->ptr_operator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    for (NewArrayDeclaratorListAST *iter = ast->new_array_declarator_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(OperatorAST *ast)
 +{
 +    if (ast->op_token)
 +        terminal(ast->op_token, ast);
 +    if (ast->open_token)
 +        terminal(ast->open_token, ast);
 +    if (ast->close_token)
 +        terminal(ast->close_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ParameterDeclarationAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    if (ast->equal_token)
 +        terminal(ast->equal_token, ast);
 +    nonterminal(ast->expression);
 +    return false;
 +}
 +
 +virtual bool visit(ParameterDeclarationClauseAST *ast)
 +{
 +    for (ParameterDeclarationListAST *iter = ast->parameter_declaration_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(CallAST *ast)
 +{
 +    nonterminal(ast->base_expression);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ArrayAccessAST *ast)
 +{
 +    nonterminal(ast->base_expression);
 +    if (ast->lbracket_token)
 +        terminal(ast->lbracket_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rbracket_token)
 +        terminal(ast->rbracket_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(PostIncrDecrAST *ast)
 +{
 +    nonterminal(ast->base_expression);
 +    if (ast->incr_decr_token)
 +        terminal(ast->incr_decr_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(MemberAccessAST *ast)
 +{
 +    nonterminal(ast->base_expression);
 +    if (ast->access_token)
 +        terminal(ast->access_token, ast);
 +    if (ast->template_token)
 +        terminal(ast->template_token, ast);
 +    nonterminal(ast->member_name);
 +    return false;
 +}
 +
 +virtual bool visit(TypeidExpressionAST *ast)
 +{
 +    if (ast->typeid_token)
 +        terminal(ast->typeid_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(TypenameCallExpressionAST *ast)
 +{
 +    if (ast->typename_token)
 +        terminal(ast->typename_token, ast);
 +    nonterminal(ast->name);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(TypeConstructorCallAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(PointerToMemberAST *ast)
 +{
 +    if (ast->global_scope_token)
 +        terminal(ast->global_scope_token, ast);
 +    for (NestedNameSpecifierListAST *iter = ast->nested_name_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->star_token)
 +        terminal(ast->star_token, ast);
 +    for (SpecifierListAST *iter = ast->cv_qualifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(PointerAST *ast)
 +{
 +    if (ast->star_token)
 +        terminal(ast->star_token, ast);
 +    for (SpecifierListAST *iter = ast->cv_qualifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(ReferenceAST *ast)
 +{
 +    if (ast->reference_token)
 +        terminal(ast->reference_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(BreakStatementAST *ast)
 +{
 +    if (ast->break_token)
 +        terminal(ast->break_token, ast);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ContinueStatementAST *ast)
 +{
 +    if (ast->continue_token)
 +        terminal(ast->continue_token, ast);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(GotoStatementAST *ast)
 +{
 +    if (ast->goto_token)
 +        terminal(ast->goto_token, ast);
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ReturnStatementAST *ast)
 +{
 +    if (ast->return_token)
 +        terminal(ast->return_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(SizeofExpressionAST *ast)
 +{
 +    if (ast->sizeof_token)
 +        terminal(ast->sizeof_token, ast);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NumericLiteralAST *ast)
 +{
 +    if (ast->literal_token)
 +        terminal(ast->literal_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(BoolLiteralAST *ast)
 +{
 +    if (ast->literal_token)
 +        terminal(ast->literal_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ThisExpressionAST *ast)
 +{
 +    if (ast->this_token)
 +        terminal(ast->this_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(NestedExpressionAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(StringLiteralAST *ast)
 +{
 +    if (ast->literal_token)
 +        terminal(ast->literal_token, ast);
 +    nonterminal(ast->next);
 +    return false;
 +}
 +
 +virtual bool visit(SwitchStatementAST *ast)
 +{
 +    if (ast->switch_token)
 +        terminal(ast->switch_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->condition);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(TemplateDeclarationAST *ast)
 +{
 +    if (ast->export_token)
 +        terminal(ast->export_token, ast);
 +    if (ast->template_token)
 +        terminal(ast->template_token, ast);
 +    if (ast->less_token)
 +        terminal(ast->less_token, ast);
 +    for (DeclarationListAST *iter = ast->template_parameter_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->greater_token)
 +        terminal(ast->greater_token, ast);
 +    nonterminal(ast->declaration);
 +    return false;
 +}
 +
 +virtual bool visit(ThrowExpressionAST *ast)
 +{
 +    if (ast->throw_token)
 +        terminal(ast->throw_token, ast);
 +    nonterminal(ast->expression);
 +    return false;
 +}
 +
 +virtual bool visit(TranslationUnitAST *ast)
 +{
 +    for (DeclarationListAST *iter = ast->declaration_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(TryBlockStatementAST *ast)
 +{
 +    if (ast->try_token)
 +        terminal(ast->try_token, ast);
 +    nonterminal(ast->statement);
 +    for (CatchClauseListAST *iter = ast->catch_clause_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(CatchClauseAST *ast)
 +{
 +    if (ast->catch_token)
 +        terminal(ast->catch_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->exception_declaration);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(TypeIdAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    return false;
 +}
 +
 +virtual bool visit(TypenameTypeParameterAST *ast)
 +{
 +    if (ast->classkey_token)
 +        terminal(ast->classkey_token, ast);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    nonterminal(ast->name);
 +    if (ast->equal_token)
 +        terminal(ast->equal_token, ast);
 +    nonterminal(ast->type_id);
 +    return false;
 +}
 +
 +virtual bool visit(TemplateTypeParameterAST *ast)
 +{
 +    if (ast->template_token)
 +        terminal(ast->template_token, ast);
 +    if (ast->less_token)
 +        terminal(ast->less_token, ast);
 +    for (DeclarationListAST *iter = ast->template_parameter_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->greater_token)
 +        terminal(ast->greater_token, ast);
 +    if (ast->class_token)
 +        terminal(ast->class_token, ast);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    nonterminal(ast->name);
 +    if (ast->equal_token)
 +        terminal(ast->equal_token, ast);
 +    nonterminal(ast->type_id);
 +    return false;
 +}
 +
 +virtual bool visit(UnaryExpressionAST *ast)
 +{
 +    if (ast->unary_op_token)
 +        terminal(ast->unary_op_token, ast);
 +    nonterminal(ast->expression);
 +    return false;
 +}
 +
 +virtual bool visit(UsingAST *ast)
 +{
 +    if (ast->using_token)
 +        terminal(ast->using_token, ast);
 +    if (ast->typename_token)
 +        terminal(ast->typename_token, ast);
 +    nonterminal(ast->name);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(UsingDirectiveAST *ast)
 +{
 +    if (ast->using_token)
 +        terminal(ast->using_token, ast);
 +    if (ast->namespace_token)
 +        terminal(ast->namespace_token, ast);
 +    nonterminal(ast->name);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(WhileStatementAST *ast)
 +{
 +    if (ast->while_token)
 +        terminal(ast->while_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->condition);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCClassForwardDeclarationAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->class_token)
 +        terminal(ast->class_token, ast);
 +    for (NameListAST *iter = ast->identifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCClassDeclarationAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->interface_token)
 +        terminal(ast->interface_token, ast);
 +    if (ast->implementation_token)
 +        terminal(ast->implementation_token, ast);
 +    nonterminal(ast->class_name);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->category_name);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    if (ast->colon_token)
 +        terminal(ast->colon_token, ast);
 +    nonterminal(ast->superclass);
 +    nonterminal(ast->protocol_refs);
 +    nonterminal(ast->inst_vars_decl);
 +    for (DeclarationListAST *iter = ast->member_declaration_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->end_token)
 +        terminal(ast->end_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCProtocolForwardDeclarationAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->protocol_token)
 +        terminal(ast->protocol_token, ast);
 +    for (NameListAST *iter = ast->identifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCProtocolDeclarationAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->protocol_token)
 +        terminal(ast->protocol_token, ast);
 +    nonterminal(ast->name);
 +    nonterminal(ast->protocol_refs);
 +    for (DeclarationListAST *iter = ast->member_declaration_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->end_token)
 +        terminal(ast->end_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCProtocolRefsAST *ast)
 +{
 +    if (ast->less_token)
 +        terminal(ast->less_token, ast);
 +    for (NameListAST *iter = ast->identifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->greater_token)
 +        terminal(ast->greater_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCMessageArgumentAST *ast)
 +{
 +    nonterminal(ast->parameter_value_expression);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCMessageExpressionAST *ast)
 +{
 +    if (ast->lbracket_token)
 +        terminal(ast->lbracket_token, ast);
 +    nonterminal(ast->receiver_expression);
 +    nonterminal(ast->selector);
 +    for (ObjCMessageArgumentListAST *iter = ast->argument_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rbracket_token)
 +        terminal(ast->rbracket_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCProtocolExpressionAST *ast)
 +{
 +    if (ast->protocol_token)
 +        terminal(ast->protocol_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    if (ast->identifier_token)
 +        terminal(ast->identifier_token, ast);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCTypeNameAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    if (ast->type_qualifier_token)
 +        terminal(ast->type_qualifier_token, ast);
 +    nonterminal(ast->type_id);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCEncodeExpressionAST *ast)
 +{
 +    if (ast->encode_token)
 +        terminal(ast->encode_token, ast);
 +    nonterminal(ast->type_name);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCSelectorExpressionAST *ast)
 +{
 +    if (ast->selector_token)
 +        terminal(ast->selector_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->selector);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCInstanceVariablesDeclarationAST *ast)
 +{
 +    if (ast->lbrace_token)
 +        terminal(ast->lbrace_token, ast);
 +    for (DeclarationListAST *iter = ast->instance_variable_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rbrace_token)
 +        terminal(ast->rbrace_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCVisibilityDeclarationAST *ast)
 +{
 +    if (ast->visibility_token)
 +        terminal(ast->visibility_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCPropertyAttributeAST *ast)
 +{
 +    if (ast->attribute_identifier_token)
 +        terminal(ast->attribute_identifier_token, ast);
 +    if (ast->equals_token)
 +        terminal(ast->equals_token, ast);
 +    nonterminal(ast->method_selector);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCPropertyDeclarationAST *ast)
 +{
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->property_token)
 +        terminal(ast->property_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (ObjCPropertyAttributeListAST *iter = ast->property_attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->simple_declaration);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCMessageArgumentDeclarationAST *ast)
 +{
 +    nonterminal(ast->type_name);
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->param_name);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCMethodPrototypeAST *ast)
 +{
 +    if (ast->method_type_token)
 +        terminal(ast->method_type_token, ast);
 +    nonterminal(ast->type_name);
 +    nonterminal(ast->selector);
 +    for (ObjCMessageArgumentDeclarationListAST *iter = ast->argument_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->dot_dot_dot_token)
 +        terminal(ast->dot_dot_dot_token, ast);
 +    for (SpecifierListAST *iter = ast->attribute_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCMethodDeclarationAST *ast)
 +{
 +    nonterminal(ast->method_prototype);
 +    nonterminal(ast->function_body);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCSynthesizedPropertyAST *ast)
 +{
 +    if (ast->property_identifier_token)
 +        terminal(ast->property_identifier_token, ast);
 +    if (ast->equals_token)
 +        terminal(ast->equals_token, ast);
 +    if (ast->alias_identifier_token)
 +        terminal(ast->alias_identifier_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCSynthesizedPropertiesDeclarationAST *ast)
 +{
 +    if (ast->synthesized_token)
 +        terminal(ast->synthesized_token, ast);
 +    for (ObjCSynthesizedPropertyListAST *iter = ast->property_identifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCDynamicPropertiesDeclarationAST *ast)
 +{
 +    if (ast->dynamic_token)
 +        terminal(ast->dynamic_token, ast);
 +    for (NameListAST *iter = ast->property_identifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->semicolon_token)
 +        terminal(ast->semicolon_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCFastEnumerationAST *ast)
 +{
 +    if (ast->for_token)
 +        terminal(ast->for_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    nonterminal(ast->initializer);
 +    if (ast->in_token)
 +        terminal(ast->in_token, ast);
 +    nonterminal(ast->fast_enumeratable_expression);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(ObjCSynchronizedStatementAST *ast)
 +{
 +    if (ast->synchronized_token)
 +        terminal(ast->synchronized_token, ast);
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->synchronized_object);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(LambdaExpressionAST *ast)
 +{
 +    nonterminal(ast->lambda_introducer);
 +    nonterminal(ast->lambda_declarator);
 +    nonterminal(ast->statement);
 +    return false;
 +}
 +
 +virtual bool visit(LambdaIntroducerAST *ast)
 +{
 +    if (ast->lbracket_token)
 +        terminal(ast->lbracket_token, ast);
 +    nonterminal(ast->lambda_capture);
 +    if (ast->rbracket_token)
 +        terminal(ast->rbracket_token, ast);
 +    return false;
 +}
 +
 +virtual bool visit(LambdaCaptureAST *ast)
 +{
 +    if (ast->default_capture_token)
 +        terminal(ast->default_capture_token, ast);
 +    for (CaptureListAST *iter = ast->capture_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    return false;
 +}
 +
 +virtual bool visit(CaptureAST *ast)
 +{
 +    return false;
 +}
 +
 +virtual bool visit(LambdaDeclaratorAST *ast)
 +{
 +    if (ast->lparen_token)
 +        terminal(ast->lparen_token, ast);
 +    nonterminal(ast->parameter_declaration_clause);
 +    if (ast->rparen_token)
 +        terminal(ast->rparen_token, ast);
 +    for (SpecifierListAST *iter = ast->attributes; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->mutable_token)
 +        terminal(ast->mutable_token, ast);
 +    nonterminal(ast->exception_specification);
 +    nonterminal(ast->trailing_return_type);
 +    return false;
 +}
 +
 +virtual bool visit(TrailingReturnTypeAST *ast)
 +{
 +    if (ast->arrow_token)
 +        terminal(ast->arrow_token, ast);
 +    for (SpecifierListAST *iter = ast->attributes; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    for (SpecifierListAST *iter = ast->type_specifier_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    nonterminal(ast->declarator);
 +    return false;
 +}
 +
 +virtual bool visit(BracedInitializerAST *ast)
 +{
 +    if (ast->lbrace_token)
 +        terminal(ast->lbrace_token, ast);
 +    for (ExpressionListAST *iter = ast->expression_list; iter; iter = iter->next)
 +        nonterminal(iter->value);
 +    if (ast->comma_token)
 +        terminal(ast->comma_token, ast);
 +    if (ast->rbrace_token)
 +        terminal(ast->rbrace_token, ast);
 +    return false;
 +}
 +
Simple merge
index cf3aa29,0000000..5d242d9
mode 100644,000000..100644
--- /dev/null
@@@ -1,363 -1,0 +1,367 @@@
- ** Commercial Usage
 +/**************************************************************************
 +**
 +** This file is part of Qt Creator
 +**
 +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 +**
 +** Contact: Nokia Corporation (qt-info@nokia.com)
 +**
- ** Licensees holding valid Qt Commercial licenses may use this file in
- ** accordance with the Qt Commercial License Agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Nokia.
++** No Commercial Usage
 +**
- ** If you are unsure which license is appropriate for your use, please
- ** contact the sales department at http://qt.nokia.com/contact.
++** This file contains pre-release code and may not be distributed.
++** You may use this file in accordance with the terms and conditions
++** contained in the Technology Preview License Agreement accompanying
++** this package.
 +**
 +** GNU Lesser General Public License Usage
 +**
 +** Alternatively, this file may be used under the terms of the GNU Lesser
 +** General Public License version 2.1 as published by the Free Software
 +** Foundation and appearing in the file LICENSE.LGPL included in the
 +** packaging of this file.  Please review the following information to
 +** ensure the GNU Lesser General Public License version 2.1 requirements
 +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 +**
++** In addition, as a special exception, Nokia gives you certain additional
++** rights.  These rights are described in the Nokia Qt LGPL Exception
++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
++**
++** If you have questions regarding the use of this file, please contact
++** Nokia at qt-info@nokia.com.
 +**
 +**************************************************************************/
 +
 +#include <qmljs/parser/qmljsast_p.h>
 +#include <qmljs/parser/qmljsastvisitor_p.h>
 +#include <qmljs/qmljsdocument.h>
 +
 +#include <QFile>
 +#include <QList>
 +#include <QCoreApplication>
 +#include <QStringList>
 +#include <QFileInfo>
 +#include <QTime>
 +#include <QtDebug>
 +
 +#include <cstdio>
 +#include <cstdlib>
 +#include <fstream>
 +#include <iostream>
 +#ifdef __GNUC__
 +#  include <cxxabi.h>
 +#endif
 +
 +using namespace QmlJS;
 +using namespace QmlJS::AST;
 +using namespace std;
 +
 +class ASTDump: protected Visitor
 +{
 +public:
 +    void operator()(const QString &fileName, const QByteArray &src, Node *ast) {
 +        _src = src;
 +        QString basename = fileName;
 +        int dotIdx = basename.lastIndexOf('.');
 +        if (dotIdx != -1)
 +            basename.truncate(dotIdx);
 +        basename.append(QLatin1String(".ast.dot"));
 +        out.open(basename.toUtf8().constData());
 +
 +        out << "digraph AST { ordering=out;" << endl;
 +        // cout << "rankdir = \"LR\";" << endl;
 +        Node::accept(ast, this);
 +
 +        typedef QPair<QByteArray, QByteArray> Pair;
 +
 +        foreach (const Pair &conn, _connections)
 +            out << conn.first.constData() << " -> " << conn.second.constData() << endl;
 +
 +        alignTerminals();
 +
 +        out << "}" << endl;
 +        out.close();
 +        cout << qPrintable(basename) << endl;
 +    }
 +
 +protected:
 +    void alignTerminals() {
 +        out<<"{ rank=same;" << endl;
 +        foreach (const QByteArray &terminalShape, _terminalShapes) {
 +            out << "  " << string(terminalShape) << ";" << endl;
 +        }
 +        out<<"}"<<endl;
 +    }
 +
 +    static QByteArray name(Node *ast) {
 +#ifdef __GNUC__
 +        QByteArray name = abi::__cxa_demangle(typeid(*ast).name(), 0, 0, 0) + 12;
 +#else
 +        QByteArray name = typeid(*ast).name();
 +#endif
 +        return name;
 +    }
 +
 +    QString spell(const SourceLocation &token) {
 +        return _src.mid(token.offset, token.length).replace('\'', "\\\\").replace('"', "\\\"");
 +    }
 +
 +    void terminal(const SourceLocation &token) {
 +        if (!token.isValid())
 +            return;
 +
 +        static int count = 1;
 +        QByteArray id = 't' + QByteArray::number(count++);
 +        Node *node = _stack.last();
 +        _connections.append(qMakePair(_id[node], id));
 +
 +        QByteArray t;
 +        t.append(id);
 +        t.append(" [label = \"");
 +        t.append(spell(token).toUtf8());
 +        t.append("\" shape=rect]");
 +        _terminalShapes.append(t);
 +    }
 +
 +    virtual void nonterminal(Node *ast) {
 +        Node::accept(ast, this);
 +    }
 +
 +    virtual void node(Node *ast) {
 +        out << _id[ast].constData() << " [label=\"" << name(ast).constData() << "\"];" << endl;
 +    }
 +
 +    virtual bool preVisit(Node *ast) {
 +        static int count = 1;
 +        const QByteArray id = 'n' + QByteArray::number(count++);
 +        _id[ast] = id;
 +
 +
 +        if (! _stack.isEmpty())
 +            _connections.append(qMakePair(_id[_stack.last()], id));
 +
 +        _stack.append(ast);
 +
 +        node(ast);
 +
 +        return true;
 +    }
 +
 +    virtual void postVisit(Node *) {
 +        _stack.removeLast();
 +    }
 +
 +protected: // visiting methods:
 +    virtual bool visit(UiImport *ast) {
 +        terminal(ast->importToken);
 +
 +        if (ast->importUri)
 +            nonterminal(ast->importUri);
 +        else
 +            terminal(ast->fileNameToken);
 +
 +        terminal(ast->versionToken);
 +        terminal(ast->asToken);
 +        terminal(ast->importIdToken);
 +        terminal(ast->semicolonToken);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiObjectBinding *ast) {
 +        if (ast->hasOnToken) {
 +            nonterminal(ast->qualifiedTypeNameId);
 +            terminal(ast->colonToken);
 +            nonterminal(ast->qualifiedId);
 +        } else {
 +            nonterminal(ast->qualifiedId);
 +            terminal(ast->colonToken);
 +            nonterminal(ast->qualifiedTypeNameId);
 +        }
 +        nonterminal(ast->initializer);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiObjectDefinition *ast) {
 +        nonterminal(ast->qualifiedTypeNameId);
 +        nonterminal(ast->initializer);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiObjectInitializer *ast) {
 +        terminal(ast->lbraceToken);
 +        nonterminal(ast->members);
 +        terminal(ast->rbraceToken);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiScriptBinding *ast) {
 +        nonterminal(ast->qualifiedId);
 +        terminal(ast->colonToken);
 +        nonterminal(ast->statement);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiArrayBinding *ast) {
 +        nonterminal(ast->qualifiedId);
 +        terminal(ast->colonToken);
 +        terminal(ast->lbracketToken);
 +        nonterminal(ast->members);
 +        terminal(ast->rbracketToken);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiArrayMemberList *ast) {
 +        terminal(ast->commaToken);
 +        nonterminal(ast->member);
 +        nonterminal(ast->next);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiQualifiedId *ast) {
 +        terminal(ast->identifierToken);
 +        nonterminal(ast->next);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiPublicMember *ast) {
 +        // TODO: place the parameters...
 +//        UiParameterList *parameters;
 +
 +        terminal(ast->defaultToken);
 +        terminal(ast->readonlyToken);
 +        terminal(ast->propertyToken);
 +        terminal(ast->typeModifierToken);
 +        terminal(ast->typeToken);
 +        terminal(ast->identifierToken);
 +        terminal(ast->colonToken);
 +        nonterminal(ast->expression);
 +        nonterminal(ast->binding);
 +        terminal(ast->semicolonToken);
 +        return false;
 +    }
 +
 +    virtual bool visit(UiFormal *ast) { terminal(ast->identifierToken); terminal(ast->asToken); terminal(ast->aliasToken); return false; }
 +    virtual bool visit(UiSignature *ast) { terminal(ast->lparenToken); nonterminal(ast->formals); terminal(ast->rparenToken); return false; }
 +
 +    virtual bool visit(StringLiteral *ast) { terminal(ast->literalToken); return false; }
 +    virtual bool visit(NumericLiteral *ast) { terminal(ast->literalToken); return false; }
 +    virtual bool visit(TrueLiteral *ast) { terminal(ast->trueToken); return false; }
 +    virtual bool visit(FalseLiteral *ast) { terminal(ast->falseToken); return false; }
 +    virtual bool visit(IdentifierExpression *ast) { terminal(ast->identifierToken); return false; }
 +    virtual bool visit(FieldMemberExpression *ast) { nonterminal(ast->base); terminal(ast->dotToken); terminal(ast->identifierToken); return false; }
 +    virtual bool visit(BinaryExpression *ast) { nonterminal(ast->left); terminal(ast->operatorToken); nonterminal(ast->right); return false; }
 +    virtual bool visit(UnaryPlusExpression *ast) { terminal(ast->plusToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(UnaryMinusExpression *ast) { terminal(ast->minusToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(NestedExpression *ast) { terminal(ast->lparenToken); nonterminal(ast->expression); terminal(ast->rparenToken); return false; }
 +    virtual bool visit(ThisExpression *ast) { terminal(ast->thisToken); return false; }
 +    virtual bool visit(NullExpression *ast) { terminal(ast->nullToken); return false; }
 +    virtual bool visit(RegExpLiteral *ast) { terminal(ast->literalToken); return false; }
 +    virtual bool visit(ArrayLiteral *ast) { terminal(ast->lbracketToken); nonterminal(ast->elements); terminal(ast->commaToken); nonterminal(ast->elision); terminal(ast->rbracketToken); return false; }
 +    virtual bool visit(ObjectLiteral *ast) { terminal(ast->lbraceToken); nonterminal(ast->properties); terminal(ast->rbraceToken); return false; }
 +    virtual bool visit(ElementList *ast) { nonterminal(ast->next); terminal(ast->commaToken); nonterminal(ast->elision); nonterminal(ast->expression); return false; }
 +    virtual bool visit(Elision *ast) { nonterminal(ast->next); terminal(ast->commaToken); return false; }
 +    virtual bool visit(PropertyNameAndValueList *ast) { nonterminal(ast->name); terminal(ast->colonToken); nonterminal(ast->value); terminal(ast->commaToken); nonterminal(ast->next); return false; }
 +    virtual bool visit(IdentifierPropertyName *ast) { terminal(ast->propertyNameToken); return false; }
 +    virtual bool visit(StringLiteralPropertyName *ast) { terminal(ast->propertyNameToken); return false; }
 +    virtual bool visit(NumericLiteralPropertyName *ast) { terminal(ast->propertyNameToken); return false; }
 +    virtual bool visit(ArrayMemberExpression *ast) { nonterminal(ast->base); terminal(ast->lbracketToken); nonterminal(ast->expression); terminal(ast->rbracketToken); return false; }
 +    virtual bool visit(NewMemberExpression *ast) { terminal(ast->newToken); nonterminal(ast->base); terminal(ast->lparenToken); nonterminal(ast->arguments); terminal(ast->rparenToken); return false; }
 +    virtual bool visit(NewExpression *ast) { terminal(ast->newToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(CallExpression *ast) { nonterminal(ast->base); terminal(ast->lparenToken); nonterminal(ast->arguments); terminal(ast->rparenToken); return false; }
 +    virtual bool visit(ArgumentList *ast) { nonterminal(ast->expression); terminal(ast->commaToken); nonterminal(ast->next); return false; }
 +    virtual bool visit(PostIncrementExpression *ast) { nonterminal(ast->base); terminal(ast->incrementToken); return false; }
 +    virtual bool visit(PostDecrementExpression *ast) { nonterminal(ast->base); terminal(ast->decrementToken); return false; }
 +    virtual bool visit(DeleteExpression *ast) { terminal(ast->deleteToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(VoidExpression *ast) { terminal(ast->voidToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(TypeOfExpression *ast) { terminal(ast->typeofToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(PreIncrementExpression *ast) { terminal(ast->incrementToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(PreDecrementExpression *ast) { terminal(ast->decrementToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(TildeExpression *ast) { terminal(ast->tildeToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(NotExpression *ast) { terminal(ast->notToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(ConditionalExpression *ast) { nonterminal(ast->expression); terminal(ast->questionToken); nonterminal(ast->ok); terminal(ast->colonToken); nonterminal(ast->ko); return false; }
 +    virtual bool visit(Expression *ast) { nonterminal(ast->left); terminal(ast->commaToken); nonterminal(ast->right); return false; }
 +    virtual bool visit(Block *ast) { terminal(ast->lbraceToken); nonterminal(ast->statements); terminal(ast->rbraceToken); return false; }
 +    virtual bool visit(VariableStatement *ast) { terminal(ast->declarationKindToken); nonterminal(ast->declarations); terminal(ast->semicolonToken); return false; }
 +    virtual bool visit(VariableDeclaration *ast) { terminal(ast->identifierToken); nonterminal(ast->expression); return false; }
 +    virtual bool visit(VariableDeclarationList *ast) { nonterminal(ast->declaration); terminal(ast->commaToken); nonterminal(ast->next); return false; }
 +    virtual bool visit(EmptyStatement* ast) { terminal(ast->semicolonToken); return false; }
 +    virtual bool visit(ExpressionStatement *ast) { nonterminal(ast->expression); terminal(ast->semicolonToken); return false; }
 +    virtual bool visit(IfStatement *ast) { terminal(ast->ifToken); terminal(ast->lparenToken); nonterminal(ast->expression); terminal(ast->rparenToken); nonterminal(ast->ok); terminal(ast->elseToken); nonterminal(ast->ko); return false; }
 +    virtual bool visit(DoWhileStatement *ast) { terminal(ast->doToken); nonterminal(ast->statement); terminal(ast->whileToken); terminal(ast->lparenToken); nonterminal(ast->expression); terminal(ast->rparenToken); terminal(ast->semicolonToken); return false; }
 +
 +// TODO: visitors for:
 +//    WhileStatement
 +//    ForStatement
 +//    LocalForStatement
 +//    ForEachStatement
 +//    LocalForEachStatement
 +//    ContinueStatement
 +//    BreakStatement
 +//    ReturnStatement
 +//    WithStatement
 +//    CaseBlock
 +//    SwitchStatement
 +//    CaseClause
 +//    DefaultClause
 +//    LabelledStatement
 +//    ThrowStatement
 +//    Catch
 +//    Finally
 +//    TryStatement
 +//    FunctionExpression
 +//    FunctionDeclaration
 +//    DebuggerStatement
 +//    UiParameterList
 +
 +private:
 +    QHash<Node *, QByteArray> _id;
 +    QList<QPair<QByteArray, QByteArray> > _connections;
 +    QList<Node *> _stack;
 +    QList<QByteArray> _terminalShapes;
 +    ofstream out;
 +    QByteArray _src;
 +};
 +
 +int main(int argc, char *argv[])
 +{
 +    QCoreApplication app(argc, argv);
 +
 +    QStringList files = app.arguments();
 +    files.removeFirst();
 +
 +    foreach (const QString &fileName, files) {
 +        QFile file(fileName);
 +        if (! file.open(QFile::ReadOnly)) {
 +            cerr << "Cannot open \"" << qPrintable(fileName)
 +                      << "\", skipping it." << endl;
 +            continue;
 +        }
 +
 +        const QByteArray source = file.readAll();
 +        file.close();
 +
 +        Document::Ptr doc = Document::create(fileName);
 +        doc->setSource(source);
 +        doc->parseQml();
 +
 +        foreach (const DiagnosticMessage &m, doc->diagnosticMessages()) {
 +            ostream *os;
 +            if (m.isError()) {
 +                os = &cerr;
 +                *os << "Error:";
 +            } else {
 +                os = &cout;
 +                *os << "Warning:";
 +            }
 +
 +            if (m.loc.isValid())
 +                *os << m.loc.startLine << ':' << m.loc.startColumn << ':';
 +            *os << ' ';
 +            *os << qPrintable(m.message) << endl;
 +        }
 +
 +        ASTDump dump;
 +        dump(fileName, source, doc->qmlProgram());
 +    }
 +
 +    return EXIT_SUCCESS;
 +}