summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-03-18 14:46:29 +0100
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-03-18 14:46:29 +0100
commit868428cc634f0e2c6d5ace84555675cb80363d3f (patch)
tree98d321520f31107067ca45e5b5806d92551b2f3d
parent0d303db8c2e79c772cd216bfc07b42637c37e1bd (diff)
parent93184f7959bd18ba6f77e8d8b312f0e3be95d70c (diff)
downloadqt-creator-868428cc634f0e2c6d5ace84555675cb80363d3f.tar.gz
Merge remote-tracking branch 'origin/3.1'
Conflicts: qbs/imports/QtcTool.qbs src/plugins/git/giteditor.cpp src/plugins/qmldesigner/qmldesignerplugin.cpp Change-Id: Icafd32f713effb1479480a0d1f61a01e429fbec0
-rw-r--r--doc/config/macros.qdocconf3
-rw-r--r--doc/src/analyze/creator-analyze.qdoc2
-rw-r--r--doc/src/analyze/creator-valgrind-overview.qdoc2
-rw-r--r--doc/src/analyze/creator-valgrind.qdoc6
-rw-r--r--doc/src/analyze/qtquick-profiler.qdoc2
-rw-r--r--doc/src/android/androiddev.qdoc2
-rw-r--r--doc/src/android/creator-android-app-tutorial.qdoc2
-rw-r--r--doc/src/android/deploying-android.qdoc2
-rw-r--r--doc/src/baremetal/creator-baremetal-dev.qdoc2
-rw-r--r--doc/src/debugger/creator-debugger-example.qdoc2
-rw-r--r--doc/src/debugger/creator-debugger-setup.qdoc2
-rw-r--r--doc/src/debugger/creator-debugger.qdoc10
-rw-r--r--doc/src/debugger/qtquick-debugger-example.qdoc2
-rw-r--r--doc/src/debugger/qtquick-debugging.qdoc2
-rw-r--r--doc/src/editors/creator-beautifier.qdoc2
-rw-r--r--doc/src/editors/creator-clang-codemodel.qdoc2
-rw-r--r--doc/src/editors/creator-coding-edit-mode.qdoc2
-rw-r--r--doc/src/editors/creator-coding.qdoc2
-rw-r--r--doc/src/editors/creator-diff-editor.qdoc2
-rw-r--r--doc/src/editors/creator-editors-options-text.qdoc2
-rw-r--r--doc/src/editors/creator-editors-options.qdoc2
-rw-r--r--doc/src/editors/creator-editors-writing-code.qdoc2
-rw-r--r--doc/src/editors/creator-editors.qdoc20
-rw-r--r--doc/src/editors/creator-finding.qdoc2
-rw-r--r--doc/src/editors/creator-mime-types.qdoc2
-rw-r--r--doc/src/howto/creator-cli.qdoc2
-rw-r--r--doc/src/howto/creator-external-tools.qdoc2
-rw-r--r--doc/src/howto/creator-help.qdoc2
-rw-r--r--doc/src/howto/creator-keyboard-shortcuts.qdoc2
-rw-r--r--doc/src/howto/creator-sessions.qdoc2
-rw-r--r--doc/src/howto/creator-task-lists.qdoc2
-rw-r--r--doc/src/howto/creator-tips.qdoc2
-rw-r--r--doc/src/howto/creator-ui.qdoc2
-rw-r--r--doc/src/howto/creator-vcs.qdoc2
-rw-r--r--doc/src/howto/qtcreator-faq.qdoc17
-rw-r--r--doc/src/ios/creator-ios-dev.qdoc2
-rw-r--r--doc/src/linux-mobile/creator-deployment-madde.qdoc2
-rw-r--r--doc/src/linux-mobile/linuxdev.qdoc2
-rw-r--r--doc/src/overview/creator-acknowledgements.qdoc2
-rw-r--r--doc/src/overview/creator-advanced.qdoc2
-rw-r--r--doc/src/overview/creator-configuring.qdoc2
-rw-r--r--doc/src/overview/creator-deployment-overview.qdoc2
-rw-r--r--doc/src/overview/creator-design-overview.qdoc2
-rw-r--r--doc/src/overview/creator-getting-started.qdoc4
-rw-r--r--doc/src/overview/creator-glossary.qdoc2
-rw-r--r--doc/src/overview/creator-help-overview.qdoc2
-rw-r--r--doc/src/overview/creator-issues.qdoc2
-rw-r--r--doc/src/overview/creator-mobile-targets.qdoc13
-rw-r--r--doc/src/overview/creator-overview.qdoc2
-rw-r--r--doc/src/overview/creator-supported-platforms.qdoc2
-rw-r--r--doc/src/overview/creator-target-platforms.qdocinc6
-rw-r--r--doc/src/overview/creator-tech-support.qdoc2
-rw-r--r--doc/src/overview/creator-testing.qdoc2
-rw-r--r--doc/src/overview/creator-tutorials.qdoc2
-rw-r--r--doc/src/overview/mobile-app-design.qdoc2
-rw-r--r--doc/src/projects/creator-projects-autotools.qdoc2
-rw-r--r--doc/src/projects/creator-projects-build-run-tutorial.qdoc2
-rw-r--r--doc/src/projects/creator-projects-building-running.qdoc4
-rw-r--r--doc/src/projects/creator-projects-building.qdoc2
-rw-r--r--doc/src/projects/creator-projects-builds-customizing.qdoc2
-rw-r--r--doc/src/projects/creator-projects-cmake.qdoc2
-rw-r--r--doc/src/projects/creator-projects-compilers.qdoc6
-rw-r--r--doc/src/projects/creator-projects-creating.qdoc6
-rw-r--r--doc/src/projects/creator-projects-custom-wizards.qdoc2
-rw-r--r--doc/src/projects/creator-projects-debuggers.qdoc2
-rw-r--r--doc/src/projects/creator-projects-generic.qdoc2
-rw-r--r--doc/src/projects/creator-projects-libraries.qdoc2
-rw-r--r--doc/src/projects/creator-projects-opening.qdoc2
-rw-r--r--doc/src/projects/creator-projects-other.qdoc2
-rw-r--r--doc/src/projects/creator-projects-overview.qdoc2
-rw-r--r--doc/src/projects/creator-projects-qbs.qdoc2
-rw-r--r--doc/src/projects/creator-projects-qt-versions.qdoc8
-rw-r--r--doc/src/projects/creator-projects-running.qdoc2
-rw-r--r--doc/src/projects/creator-projects-settings-build.qdoc2
-rw-r--r--doc/src/projects/creator-projects-settings-code-style.qdoc2
-rw-r--r--doc/src/projects/creator-projects-settings-dependencies.qdoc2
-rw-r--r--doc/src/projects/creator-projects-settings-editor.qdoc2
-rw-r--r--doc/src/projects/creator-projects-settings-overview.qdoc8
-rw-r--r--doc/src/projects/creator-projects-settings-run.qdoc2
-rw-r--r--doc/src/projects/creator-projects-settings-sharing.qdoc2
-rw-r--r--doc/src/projects/creator-projects-targets.qdoc2
-rw-r--r--doc/src/qnx/creator-deployment-bb10.qdoc2
-rw-r--r--doc/src/qnx/creator-deployment-qnx.qdoc2
-rw-r--r--doc/src/qnx/creator-developing-bb10.qdoc2
-rw-r--r--doc/src/qnx/creator-developing-qnx.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-app-development.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-app-tutorial.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-buttons.qdoc4
-rw-r--r--doc/src/qtquick/qtquick-components.qdoc6
-rw-r--r--doc/src/qtquick/qtquick-creating.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-designer.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-exporting-qml.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-modules-with-plugins.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-screens.qdoc7
-rw-r--r--doc/src/qtquick/qtquick-toolbars.qdoc2
-rw-r--r--doc/src/widgets/qtdesigner-app-tutorial.qdoc2
-rw-r--r--doc/src/widgets/qtdesigner-overview.qdoc2
-rw-r--r--doc/src/widgets/qtdesigner-plugins.qdoc8
-rw-r--r--doc/src/winrt/creator-winrt.qdoc2
-rw-r--r--qbs/imports/QtcLibrary.qbs2
-rw-r--r--qbs/imports/QtcPlugin.qbs2
-rw-r--r--qbs/imports/QtcTool.qbs2
-rw-r--r--qbs/modules/pluginspec/pluginspec.qbs2
-rw-r--r--qtcreator.qbs2
-rw-r--r--share/qtcreator/debugger/boosttypes.py15
-rw-r--r--share/qtcreator/debugger/dumper.py43
-rw-r--r--share/qtcreator/debugger/gdbbridge.py168
-rw-r--r--share/qtcreator/debugger/lldbbridge.py106
-rw-r--r--share/qtcreator/debugger/qttypes.py36
-rw-r--r--share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp3
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp39
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml6
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml6
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml5
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml7
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir1
-rw-r--r--share/qtcreator/translations/translations.qbs2
-rw-r--r--share/qtcreator/welcomescreen/examples_fallback.xml860
-rw-r--r--share/qtcreator/welcomescreen/widgets/IconAndLink.qml54
-rw-r--r--share/qtcreator/welcomescreen/widgets/Sessions.qml1
-rw-r--r--share/qtcreator/welcomescreen/widgets/SideBar.qml61
-rw-r--r--share/qtcreator/welcomescreen/widgets/images/icons/qt_account.pngbin0 -> 540 bytes
-rw-r--r--share/qtcreator/welcomescreen/widgets/images/icons/qt_cloud.pngbin0 -> 527 bytes
-rw-r--r--share/share.qbs2
-rw-r--r--src/libs/3rdparty/cplusplus/Parser.cpp2
-rw-r--r--src/libs/aggregation/aggregation.qbs2
-rw-r--r--src/libs/cplusplus/LookupContext.cpp15
-rw-r--r--src/libs/cplusplus/LookupContext.h4
-rw-r--r--src/libs/cplusplus/cplusplus.qbs2
-rw-r--r--src/libs/extensionsystem/extensionsystem.qbs2
-rw-r--r--src/libs/extensionsystem/pluginerrorview.cpp16
-rw-r--r--src/libs/glsl/glsl.qbs2
-rw-r--r--src/libs/languageutils/languageutils.qbs2
-rw-r--r--src/libs/qmldebug/qmldebug.qbs2
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetimage.cpp4
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetimage.ui12
-rw-r--r--src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui14
-rw-r--r--src/libs/qmleditorwidgets/qmleditorwidgets.qbs2
-rw-r--r--src/libs/qmljs/qmljs.qbs2
-rw-r--r--src/libs/qmljs/qmljsdocument.cpp3
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.cpp2
-rw-r--r--src/libs/ssh/ssh.qbs2
-rw-r--r--src/libs/utils/logging.h14
-rw-r--r--src/libs/utils/process_ctrlc_stub.qbs2
-rw-r--r--src/libs/utils/process_stub.qbs2
-rw-r--r--src/libs/utils/synchronousprocess.cpp19
-rw-r--r--src/libs/utils/utils.qbs2
-rw-r--r--src/libs/zeroconf/zeroconf.qbs2
-rw-r--r--src/plugins/analyzerbase/analyzerbase.qbs2
-rw-r--r--src/plugins/android/android.qbs2
-rw-r--r--src/plugins/android/androidanalyzesupport.cpp4
-rw-r--r--src/plugins/android/androidconfigurations.cpp33
-rw-r--r--src/plugins/android/androidconfigurations.h1
-rw-r--r--src/plugins/android/androiddeployqtwidget.ui4
-rw-r--r--src/plugins/android/androiddeploystepwidget.ui4
-rw-r--r--src/plugins/android/androiddevicedialog.cpp24
-rw-r--r--src/plugins/android/androiddevicedialog.h1
-rw-r--r--src/plugins/android/androiddevicedialog.ui81
-rw-r--r--src/plugins/android/androidmanager.cpp3
-rw-r--r--src/plugins/android/androidmanifesteditorwidget.cpp472
-rw-r--r--src/plugins/android/androidmanifesteditorwidget.h15
-rw-r--r--src/plugins/android/androidpackagecreationwidget.ui2
-rw-r--r--src/plugins/android/androidrunner.cpp31
-rw-r--r--src/plugins/android/androidrunner.h4
-rw-r--r--src/plugins/android/androidsettingspage.cpp25
-rw-r--r--src/plugins/android/androidsettingswidget.cpp2
-rw-r--r--src/plugins/android/createandroidmanifestwizard.cpp44
-rw-r--r--src/plugins/android/createandroidmanifestwizard.h8
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs2
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp2
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h2
-rw-r--r--src/plugins/bazaar/bazaar.qbs2
-rw-r--r--src/plugins/bazaar/bazaarcommitpanel.ui2
-rw-r--r--src/plugins/bazaar/cloneoptionspanel.ui10
-rw-r--r--src/plugins/bazaar/pullorpushdialog.ui10
-rw-r--r--src/plugins/beautifier/artisticstyle/artisticstyle.cpp5
-rw-r--r--src/plugins/beautifier/beautifier.qbs2
-rw-r--r--src/plugins/bineditor/bineditor.qbs2
-rw-r--r--src/plugins/bookmarks/bookmarks.qbs2
-rw-r--r--src/plugins/clangcodemodel/clangutils.cpp5
-rw-r--r--src/plugins/clangcodemodel/cppcreatemarkers.cpp15
-rw-r--r--src/plugins/classview/classview.qbs2
-rw-r--r--src/plugins/clearcase/clearcase.qbs2
-rw-r--r--src/plugins/clearcase/clearcaseplugin.cpp5
-rw-r--r--src/plugins/clearcase/settingspage.ui4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectmanager.qbs2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectnodes.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp2
-rw-r--r--src/plugins/coreplugin/coreplugin.qbs2
-rw-r--r--src/plugins/coreplugin/dialogs/externaltoolconfig.ui14
-rw-r--r--src/plugins/coreplugin/find/searchresultwidget.cpp11
-rw-r--r--src/plugins/coreplugin/find/searchresultwidget.h2
-rw-r--r--src/plugins/coreplugin/find/searchresultwindow.cpp2
-rw-r--r--src/plugins/coreplugin/find/searchresultwindow.h6
-rw-r--r--src/plugins/coreplugin/generalsettings.ui6
-rw-r--r--src/plugins/coreplugin/images/logo/logo.qbs2
-rw-r--r--src/plugins/coreplugin/infobar.cpp2
-rw-r--r--src/plugins/coreplugin/locator/executefilter.cpp2
-rw-r--r--src/plugins/coreplugin/vcsmanager.cpp2
-rw-r--r--src/plugins/cpaster/cpaster.qbs2
-rw-r--r--src/plugins/cpaster/frontend/frontend.qbs2
-rw-r--r--src/plugins/cppeditor/cppeditor.cpp15
-rw-r--r--src/plugins/cppeditor/cppeditor.qbs2
-rw-r--r--src/plugins/cpptools/builtinindexingsupport.cpp7
-rw-r--r--src/plugins/cpptools/completionsettingspage.ui4
-rw-r--r--src/plugins/cpptools/cppcompletion_test.cpp63
-rw-r--r--src/plugins/cpptools/cppcompletionassist.cpp51
-rw-r--r--src/plugins/cpptools/cppcompletionassist.h1
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp2
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp1
-rw-r--r--src/plugins/cpptools/cppsemanticinfo.cpp2
-rw-r--r--src/plugins/cpptools/cppsemanticinfo.h3
-rw-r--r--src/plugins/cpptools/cpptools.qbs2
-rw-r--r--src/plugins/cpptools/cpptoolseditorsupport.cpp52
-rw-r--r--src/plugins/cpptools/cpptoolseditorsupport.h35
-rw-r--r--src/plugins/cvs/cvs.qbs2
-rw-r--r--src/plugins/cvs/cvsplugin.cpp7
-rw-r--r--src/plugins/debugger/cdb/cdboptionspagewidget.ui4
-rw-r--r--src/plugins/debugger/commonoptionspage.cpp12
-rw-r--r--src/plugins/debugger/debugger.qbs2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp2
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp24
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.cpp2
-rw-r--r--src/plugins/debugger/lldb/lldbengine.cpp20
-rw-r--r--src/plugins/debugger/lldb/lldbengine.h3
-rw-r--r--src/plugins/debugger/ptracepreload.qbs2
-rw-r--r--src/plugins/designer/designer.qbs2
-rw-r--r--src/plugins/designer/formeditorfactory.cpp2
-rw-r--r--src/plugins/diffeditor/diffeditor.qbs2
-rw-r--r--src/plugins/diffeditor/diffeditorplugin.cpp11
-rw-r--r--src/plugins/diffeditor/diffeditorplugin.h4
-rw-r--r--src/plugins/diffeditor/diffutils.cpp149
-rw-r--r--src/plugins/diffeditor/diffutils.h13
-rw-r--r--src/plugins/diffeditor/sidebysidediffeditorwidget.cpp165
-rw-r--r--src/plugins/diffeditor/sidebysidediffeditorwidget.h4
-rw-r--r--src/plugins/fakevim/fakevim.qbs2
-rw-r--r--src/plugins/fakevim/fakevimoptions.ui2
-rw-r--r--src/plugins/find/find.qbs2
-rw-r--r--src/plugins/genericprojectmanager/genericprojectmanager.qbs2
-rw-r--r--src/plugins/genericprojectmanager/genericprojectnodes.cpp2
-rw-r--r--src/plugins/genericprojectmanager/genericprojectnodes.h2
-rw-r--r--src/plugins/git/branchdialog.ui2
-rw-r--r--src/plugins/git/commitdata.cpp1
-rw-r--r--src/plugins/git/commitdata.h2
-rw-r--r--src/plugins/git/gerrit/gerritplugin.cpp2
-rw-r--r--src/plugins/git/git.qbs2
-rw-r--r--src/plugins/git/gitclient.cpp65
-rw-r--r--src/plugins/git/gitclient.h3
-rw-r--r--src/plugins/git/giteditor.cpp9
-rw-r--r--src/plugins/git/gitsubmiteditor.cpp16
-rw-r--r--src/plugins/git/gitsubmiteditor.h2
-rw-r--r--src/plugins/git/mergetool.cpp8
-rw-r--r--src/plugins/glsleditor/glsleditor.qbs2
-rw-r--r--src/plugins/helloworld/helloworld.qbs2
-rw-r--r--src/plugins/help/generalsettingspage.ui4
-rw-r--r--src/plugins/help/help.qbs2
-rw-r--r--src/plugins/imageviewer/imageviewer.qbs2
-rw-r--r--src/plugins/ios/ios.qbs2
-rw-r--r--src/plugins/ios/iosconstants.h8
-rw-r--r--src/plugins/ios/iosdevice.cpp38
-rw-r--r--src/plugins/ios/iosdevice.h3
-rw-r--r--src/plugins/ios/iosdevicefactory.cpp8
-rw-r--r--src/plugins/ios/iosrunconfiguration.cpp2
-rw-r--r--src/plugins/ios/iossimulator.cpp38
-rw-r--r--src/plugins/ios/iossimulator.h3
-rw-r--r--src/plugins/ios/iostoolhandler.cpp6
-rw-r--r--src/plugins/locator/locator.qbs2
-rw-r--r--src/plugins/macros/macros.qbs2
-rw-r--r--src/plugins/mercurial/mercurial.qbs2
-rw-r--r--src/plugins/mercurial/srcdestdialog.ui4
-rw-r--r--src/plugins/perforce/perforce.qbs2
-rw-r--r--src/plugins/perforce/perforceplugin.cpp4
-rw-r--r--src/plugins/projectexplorer/customtoolchain.cpp2
-rw-r--r--src/plugins/projectexplorer/dependenciespanel.cpp3
-rw-r--r--src/plugins/projectexplorer/kit.cpp10
-rw-r--r--src/plugins/projectexplorer/kitinformationconfigwidget.cpp2
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp2
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp6
-rw-r--r--src/plugins/projectexplorer/projectexplorer.qbs2
-rw-r--r--src/plugins/projectexplorer/projectexplorersettingspage.ui2
-rw-r--r--src/plugins/projectexplorer/projectmodels.cpp21
-rw-r--r--src/plugins/projectexplorer/projectmodels.h4
-rw-r--r--src/plugins/projectexplorer/projectnodes.cpp34
-rw-r--r--src/plugins/projectexplorer/projectnodes.h18
-rw-r--r--src/plugins/projectexplorer/removetaskhandler.cpp2
-rw-r--r--src/plugins/projectexplorer/session.cpp4
-rw-r--r--src/plugins/projectexplorer/sessiondialog.ui2
-rw-r--r--src/plugins/projectexplorer/toolchainoptionspage.cpp5
-rw-r--r--src/plugins/projectexplorer/vcsannotatetaskhandler.cpp2
-rw-r--r--src/plugins/pythoneditor/pythoneditor.qbs2
-rw-r--r--src/plugins/qbsprojectmanager/qbsnodes.cpp9
-rw-r--r--src/plugins/qbsprojectmanager/qbsnodes.h5
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectmanager.qbs2
-rw-r--r--src/plugins/qmakeprojectmanager/qmakenodes.cpp16
-rw-r--r--src/plugins/qmakeprojectmanager/qmakenodes.h6
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeproject.cpp3
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs2
-rw-r--r--src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp21
-rw-r--r--src/plugins/qmldesigner/components/formeditor/dragtool.cpp3
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp50
-rw-r--r--src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp6
-rw-r--r--src/plugins/qmldesigner/components/integration/componentaction.cpp2
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocument.cpp3
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp2
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp16
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp8
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.cpp4
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h2
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp11
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp4
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp8
-rw-r--r--src/plugins/qmldesigner/componentsplugin/Controls/RadioButtonSpecifics.qml2
-rw-r--r--src/plugins/qmldesigner/designercore/exceptions/exception.cpp14
-rw-r--r--src/plugins/qmldesigner/designercore/include/exception.h1
-rw-r--r--src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp97
-rw-r--r--src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h2
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp2
-rw-r--r--src/plugins/qmldesigner/designercore/model/abstractview.cpp7
-rw-r--r--src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp3
-rw-r--r--src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp2
-rw-r--r--src/plugins/qmldesigner/qmldesigner.qbs2
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.cpp49
-rw-r--r--src/plugins/qmljseditor/qmljseditor.qbs2
-rw-r--r--src/plugins/qmljseditor/qmljsfindreferences.cpp3
-rw-r--r--src/plugins/qmljseditor/qmljspreviewrunner.cpp4
-rw-r--r--src/plugins/qmljstools/qmljstools.qbs2
-rw-r--r--src/plugins/qmlprofiler/qml/CategoryLabel.qml2
-rw-r--r--src/plugins/qmlprofiler/qml/MainView.qml43
-rw-r--r--src/plugins/qmlprofiler/qmlprofiler.qbs2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp9
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerengine.cpp4
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertracefile.cpp3
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertraceview.cpp10
-rw-r--r--src/plugins/qmlprofiler/timelinerenderer.cpp15
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectmanager.qbs2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectnodes.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectnodes.h2
-rw-r--r--src/plugins/qnx/blackberryapilevelconfiguration.cpp12
-rw-r--r--src/plugins/qnx/blackberryapplicationrunner.cpp135
-rw-r--r--src/plugins/qnx/blackberryapplicationrunner.h24
-rw-r--r--src/plugins/qnx/blackberryconfigurationmanager.cpp5
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestep.cpp75
-rw-r--r--src/plugins/qnx/blackberrydebugsupport.cpp8
-rw-r--r--src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp2
-rw-r--r--src/plugins/qnx/blackberryruncontrol.cpp2
-rw-r--r--src/plugins/qnx/blackberryruncontrolfactory.cpp54
-rw-r--r--src/plugins/qnx/qnx.qbs2
-rw-r--r--src/plugins/qnx/qnxtoolchain.cpp1
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.cpp283
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.h33
-rw-r--r--src/plugins/qtsupport/gettingstartedwelcomepage.cpp5
-rw-r--r--src/plugins/qtsupport/qtsupport.qbs2
-rw-r--r--src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui2
-rw-r--r--src/plugins/remotelinux/remotelinux.qbs2
-rw-r--r--src/plugins/resourceeditor/resourceeditor.qbs2
-rw-r--r--src/plugins/resourceeditor/resourcenode.cpp13
-rw-r--r--src/plugins/resourceeditor/resourcenode.h1
-rw-r--r--src/plugins/subversion/subversion.qbs2
-rw-r--r--src/plugins/subversion/subversionplugin.cpp9
-rw-r--r--src/plugins/tasklist/tasklist.qbs2
-rw-r--r--src/plugins/texteditor/basefilefind.cpp3
-rw-r--r--src/plugins/texteditor/behaviorsettingswidget.cpp4
-rw-r--r--src/plugins/texteditor/behaviorsettingswidget.ui2
-rw-r--r--src/plugins/texteditor/codeassist/genericproposalwidget.cpp21
-rw-r--r--src/plugins/texteditor/colorschemeedit.ui4
-rw-r--r--src/plugins/texteditor/displaysettingspage.ui2
-rw-r--r--src/plugins/texteditor/plaintexteditorfactory.cpp2
-rw-r--r--src/plugins/texteditor/texteditor.qbs2
-rw-r--r--src/plugins/texteditor/texteditorsettings.cpp4
-rw-r--r--src/plugins/todo/todo.qbs2
-rw-r--r--src/plugins/updateinfo/updateinfo.qbs2
-rw-r--r--src/plugins/valgrind/valgrind.qbs2
-rw-r--r--src/plugins/valgrind/valgrindconfigwidget.ui17
-rw-r--r--src/plugins/vcsbase/basecheckoutwizardpage.cpp12
-rw-r--r--src/plugins/vcsbase/checkoutprogresswizardpage.cpp29
-rw-r--r--src/plugins/vcsbase/checkoutprogresswizardpage.h3
-rw-r--r--src/plugins/vcsbase/cleandialog.cpp2
-rw-r--r--src/plugins/vcsbase/commonsettingspage.cpp2
-rw-r--r--src/plugins/vcsbase/commonsettingspage.ui2
-rw-r--r--src/plugins/vcsbase/vcsbase.qbs2
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.cpp2
-rw-r--r--src/plugins/welcome/welcome.qbs2
-rw-r--r--src/plugins/winrt/winrt.pro3
-rw-r--r--src/plugins/winrt/winrt.qbs5
-rw-r--r--src/plugins/winrt/winrtconstants.h1
-rw-r--r--src/plugins/winrt/winrtdeployconfiguration.cpp4
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstep.cpp65
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstep.h10
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp73
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstepwidget.h64
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstepwidget.ui47
-rw-r--r--src/plugins/winrt/winrtqtversionfactory.cpp9
m---------src/shared/qbs0
-rw-r--r--src/tools/3rdparty/3rdparty.pro4
-rw-r--r--src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h290
-rw-r--r--src/tools/3rdparty/iossim/iossim.pro8
-rw-r--r--src/tools/3rdparty/iossim/iossim.qbs4
-rw-r--r--src/tools/3rdparty/iossim/iphonesimulator.h8
-rw-r--r--src/tools/3rdparty/iossim/iphonesimulator.mm296
-rw-r--r--src/tools/3rdparty/iossim/main.mm57
-rw-r--r--src/tools/3rdparty/iossim/nsprintf.mm4
-rw-r--r--src/tools/3rdparty/iossim/nsstringexpandpath.mm2
-rw-r--r--src/tools/3rdparty/iossim/version.h2
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE31
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/Info.plist16
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/iossim.qbs30
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro55
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h41
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm566
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h (renamed from src/tools/3rdparty/iossim/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h)0
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/main.mm77
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/nsprintf.h6
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/nsprintf.mm44
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h11
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm18
-rw-r--r--src/tools/3rdparty/iossim_1_8_2/version.h1
-rw-r--r--src/tools/iostool/iostool.qbs2
-rw-r--r--src/tools/qtcdebugger/qtcdebugger.qbs2
-rw-r--r--src/tools/qtcreatorcrashhandler/qtcreatorcrashhandler.qbs2
-rw-r--r--src/tools/qtpromaker/qtpromaker.qbs2
-rw-r--r--src/tools/sdktool/getoperation.cpp7
-rw-r--r--src/tools/sdktool/sdktool.qbs2
-rw-r--r--tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp2
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp18
-rw-r--r--tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs2
-rw-r--r--tests/system/shared/editor_utils.py5
-rw-r--r--tests/system/shared/utils.py9
-rwxr-xr-xtests/system/suite_HELP/tst_HELP02/test.py11
-rw-r--r--tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48.tsv6
-rw-r--r--tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48_nonOptimized.tsv10
-rw-r--r--tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50.tsv6
-rw-r--r--tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50_nonOptimized.tsv10
-rw-r--r--tests/system/suite_general/tst_default_settings/test.py2
-rw-r--r--tests/system/suite_general/tst_rename_file/test.py10
-rw-r--r--tests/system/suite_tools/tst_git_clone/test.py39
-rw-r--r--tests/system/suite_tools/tst_git_local/test.py7
439 files changed, 4342 insertions, 2746 deletions
diff --git a/doc/config/macros.qdocconf b/doc/config/macros.qdocconf
index 21b61a87f7..00dd6a5953 100644
--- a/doc/config/macros.qdocconf
+++ b/doc/config/macros.qdocconf
@@ -21,8 +21,7 @@ macro.QD = "Qt Designer"
macro.QL = "Qt Linguist"
macro.QMLD = "Qt Quick Designer"
macro.QQV = "Qt QML Viewer"
-macro.QS = "Qt Simulator"
-macro.QSDK = "Qt SDK"
+macro.QSDK = "Qt"
macro.qtcversion = $QTC_VERSION
macro.param = "\\e"
macro.raisedaster.HTML = "<sup>*</sup>"
diff --git a/doc/src/analyze/creator-analyze.qdoc b/doc/src/analyze/creator-analyze.qdoc
index c5f97e68ed..a3663c87c4 100644
--- a/doc/src/analyze/creator-analyze.qdoc
+++ b/doc/src/analyze/creator-analyze.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-troubleshooting-debugging.html
\page creator-analyze-mode.html
\nextpage creator-qml-performance-monitor.html
diff --git a/doc/src/analyze/creator-valgrind-overview.qdoc b/doc/src/analyze/creator-valgrind-overview.qdoc
index 1fb1b4e29a..561a1c0219 100644
--- a/doc/src/analyze/creator-valgrind-overview.qdoc
+++ b/doc/src/analyze/creator-valgrind-overview.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-qml-performance-monitor.html
\page creator-valgrind-overview.html
\nextpage creator-analyzer.html
diff --git a/doc/src/analyze/creator-valgrind.qdoc b/doc/src/analyze/creator-valgrind.qdoc
index 98b70d1c46..6f65d377d3 100644
--- a/doc/src/analyze/creator-valgrind.qdoc
+++ b/doc/src/analyze/creator-valgrind.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-valgrind-overview.html
\page creator-analyzer.html
\nextpage creator-cache-profiler.html
@@ -133,7 +133,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-analyzer.html
\page creator-cache-profiler.html
\nextpage creator-running-valgrind-remotely.html
@@ -255,7 +255,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-cache-profiler.html
\page creator-running-valgrind-remotely.html
\nextpage creator-advanced.html
diff --git a/doc/src/analyze/qtquick-profiler.qdoc b/doc/src/analyze/qtquick-profiler.qdoc
index 777ca4b923..4a58f0496c 100644
--- a/doc/src/analyze/qtquick-profiler.qdoc
+++ b/doc/src/analyze/qtquick-profiler.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-analyze-mode.html
\page creator-qml-performance-monitor.html
\nextpage creator-valgrind-overview.html
diff --git a/doc/src/android/androiddev.qdoc b/doc/src/android/androiddev.qdoc
index 70d923cb93..8efeae6266 100644
--- a/doc/src/android/androiddev.qdoc
+++ b/doc/src/android/androiddev.qdoc
@@ -18,7 +18,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-connecting-mobile.html
\page creator-developing-android.html
\nextpage creator-developing-baremetal.html
diff --git a/doc/src/android/creator-android-app-tutorial.qdoc b/doc/src/android/creator-android-app-tutorial.qdoc
index 03b2a0cee0..79ca7f474e 100644
--- a/doc/src/android/creator-android-app-tutorial.qdoc
+++ b/doc/src/android/creator-android-app-tutorial.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-writing-program.html
\page creator-android-app-tutorial.html
\nextpage creator-project-managing.html
diff --git a/doc/src/android/deploying-android.qdoc b/doc/src/android/deploying-android.qdoc
index 6046175c8d..6d3ea1333b 100644
--- a/doc/src/android/deploying-android.qdoc
+++ b/doc/src/android/deploying-android.qdoc
@@ -18,7 +18,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-deployment.html
\page creator-deploying-android.html
\nextpage creator-deployment-bb10.html
diff --git a/doc/src/baremetal/creator-baremetal-dev.qdoc b/doc/src/baremetal/creator-baremetal-dev.qdoc
index 9d3ee77005..5d9df8b32c 100644
--- a/doc/src/baremetal/creator-baremetal-dev.qdoc
+++ b/doc/src/baremetal/creator-baremetal-dev.qdoc
@@ -18,7 +18,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-developing-android.html
\page creator-developing-baremetal.html
\nextpage creator-developing-bb10.html
diff --git a/doc/src/debugger/creator-debugger-example.qdoc b/doc/src/debugger/creator-debugger-example.qdoc
index 6bed94be5b..d944057824 100644
--- a/doc/src/debugger/creator-debugger-example.qdoc
+++ b/doc/src/debugger/creator-debugger-example.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debugging-qml.html
\page creator-debugging-example.html
\nextpage creator-qml-debugging-example.html
diff --git a/doc/src/debugger/creator-debugger-setup.qdoc b/doc/src/debugger/creator-debugger-setup.qdoc
index 8361be90a6..a6c709ef2a 100644
--- a/doc/src/debugger/creator-debugger-setup.qdoc
+++ b/doc/src/debugger/creator-debugger-setup.qdoc
@@ -24,7 +24,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debugging.html
\page creator-debugger-engines.html
\nextpage creator-debugger-operating-modes.html
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc
index 45f01ed53a..1a78a06006 100644
--- a/doc/src/debugger/creator-debugger.qdoc
+++ b/doc/src/debugger/creator-debugger.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-testing.html
\page creator-debugging.html
\nextpage creator-debugger-engines.html
@@ -91,7 +91,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debugger-engines.html
\page creator-debugger-operating-modes.html
\nextpage creator-debug-mode.html
@@ -352,7 +352,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debugger-operating-modes.html
\page creator-debug-mode.html
\nextpage creator-debugging-helpers.html
@@ -814,7 +814,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debug-mode.html
\page creator-debugging-helpers.html
\nextpage creator-debugging-qml.html
@@ -1130,7 +1130,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-qml-debugging-example.html
\page creator-troubleshooting-debugging.html
\nextpage creator-analyze-mode.html
diff --git a/doc/src/debugger/qtquick-debugger-example.qdoc b/doc/src/debugger/qtquick-debugger-example.qdoc
index 98fbbf332f..8f30974234 100644
--- a/doc/src/debugger/qtquick-debugger-example.qdoc
+++ b/doc/src/debugger/qtquick-debugger-example.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debugging-example.html
\page creator-qml-debugging-example.html
\nextpage creator-troubleshooting-debugging.html
diff --git a/doc/src/debugger/qtquick-debugging.qdoc b/doc/src/debugger/qtquick-debugging.qdoc
index 3bf174776f..7bb43fb065 100644
--- a/doc/src/debugger/qtquick-debugging.qdoc
+++ b/doc/src/debugger/qtquick-debugging.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debugging-helpers.html
\page creator-debugging-qml.html
\nextpage creator-debugging-example.html
diff --git a/doc/src/editors/creator-beautifier.qdoc b/doc/src/editors/creator-beautifier.qdoc
index 448b3c578c..c738748847 100644
--- a/doc/src/editors/creator-beautifier.qdoc
+++ b/doc/src/editors/creator-beautifier.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-refactoring.html
\page creator-beautifier.html
\nextpage creator-editor-options.html
diff --git a/doc/src/editors/creator-clang-codemodel.qdoc b/doc/src/editors/creator-clang-codemodel.qdoc
index 68543293ea..6b35d0b55a 100644
--- a/doc/src/editors/creator-clang-codemodel.qdoc
+++ b/doc/src/editors/creator-clang-codemodel.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-diff-editor.html
\page creator-clang-codemodel.html
\nextpage creator-finding-overview.html
diff --git a/doc/src/editors/creator-coding-edit-mode.qdoc b/doc/src/editors/creator-coding-edit-mode.qdoc
index 428a659f0f..4d7458abcd 100644
--- a/doc/src/editors/creator-coding-edit-mode.qdoc
+++ b/doc/src/editors/creator-coding-edit-mode.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-functions.html
\page creator-coding-navigating.html
\nextpage creator-highlighting.html
diff --git a/doc/src/editors/creator-coding.qdoc b/doc/src/editors/creator-coding.qdoc
index f5cb4224a9..fe2373125c 100644
--- a/doc/src/editors/creator-coding.qdoc
+++ b/doc/src/editors/creator-coding.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-usability.html
\page creator-coding.html
\nextpage creator-editor-functions.html
diff --git a/doc/src/editors/creator-diff-editor.qdoc b/doc/src/editors/creator-diff-editor.qdoc
index 7e3169ca64..b7b85510ed 100644
--- a/doc/src/editors/creator-diff-editor.qdoc
+++ b/doc/src/editors/creator-diff-editor.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-macros.html
\page creator-diff-editor.html
\nextpage creator-clang-codemodel.html
diff --git a/doc/src/editors/creator-editors-options-text.qdoc b/doc/src/editors/creator-editors-options-text.qdoc
index 042f655787..a4b51f5919 100644
--- a/doc/src/editors/creator-editors-options-text.qdoc
+++ b/doc/src/editors/creator-editors-options-text.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-options.html
\page creator-editor-options-text.html
\nextpage creator-editor-fakevim.html
diff --git a/doc/src/editors/creator-editors-options.qdoc b/doc/src/editors/creator-editors-options.qdoc
index ae08313a77..cf77040f6b 100644
--- a/doc/src/editors/creator-editors-options.qdoc
+++ b/doc/src/editors/creator-editors-options.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-beautifier.html
\page creator-editor-options.html
\nextpage creator-editor-options-text.html
diff --git a/doc/src/editors/creator-editors-writing-code.qdoc b/doc/src/editors/creator-editors-writing-code.qdoc
index 7043d44197..e46fa3e5ca 100644
--- a/doc/src/editors/creator-editors-writing-code.qdoc
+++ b/doc/src/editors/creator-editors-writing-code.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-coding.html
\page creator-editor-functions.html
\nextpage creator-coding-navigating.html
diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc
index da5a4e94af..23653eb061 100644
--- a/doc/src/editors/creator-editors.qdoc
+++ b/doc/src/editors/creator-editors.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-coding-navigating.html
\page creator-highlighting.html
\nextpage creator-checking-code-syntax.html
@@ -139,7 +139,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-highlighting.html
\page creator-checking-code-syntax.html
\nextpage creator-completing-code.html
@@ -677,7 +677,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-checking-code-syntax.html
\page creator-completing-code.html
\nextpage creator-indenting-code.html
@@ -886,7 +886,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage qt-quick-toolbars.html
\page creator-editor-codepasting.html
\nextpage creator-macros.html
@@ -971,7 +971,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-codepasting.html
\page creator-macros.html
\nextpage creator-diff-editor.html
@@ -1003,7 +1003,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-options-text.html
\page creator-editor-fakevim.html
\nextpage creator-mime-types.html
@@ -1052,7 +1052,7 @@
*/
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-completing-code.html
\page creator-indenting-code.html
\nextpage qt-quick-toolbars.html
@@ -1275,7 +1275,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-finding-overview.html
\page creator-editor-finding.html
\nextpage creator-editor-locator.html
@@ -1427,7 +1427,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-locator.html
\page creator-editor-refactoring.html
\nextpage creator-beautifier.html
@@ -2125,7 +2125,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-finding.html
\page creator-editor-locator.html
\nextpage creator-editor-refactoring.html
diff --git a/doc/src/editors/creator-finding.qdoc b/doc/src/editors/creator-finding.qdoc
index cd1e07fb55..6462e70dd1 100644
--- a/doc/src/editors/creator-finding.qdoc
+++ b/doc/src/editors/creator-finding.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-clang-codemodel.html
\page creator-finding-overview.html
\nextpage creator-editor-finding.html
diff --git a/doc/src/editors/creator-mime-types.qdoc b/doc/src/editors/creator-mime-types.qdoc
index ae7c203ef2..9280fa8128 100644
--- a/doc/src/editors/creator-mime-types.qdoc
+++ b/doc/src/editors/creator-mime-types.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-fakevim.html
\page creator-mime-types.html
\nextpage creator-building-running.html
diff --git a/doc/src/howto/creator-cli.qdoc b/doc/src/howto/creator-cli.qdoc
index 6f138e24bf..0f4b0f26a6 100644
--- a/doc/src/howto/creator-cli.qdoc
+++ b/doc/src/howto/creator-cli.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-generic.html
\page creator-cli.html
\nextpage creator-keyboard-shortcuts.html
diff --git a/doc/src/howto/creator-external-tools.qdoc b/doc/src/howto/creator-external-tools.qdoc
index 72a37ced8e..eac406061b 100644
--- a/doc/src/howto/creator-external-tools.qdoc
+++ b/doc/src/howto/creator-external-tools.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-keyboard-shortcuts.html
\page creator-editor-external.html
\nextpage creator-task-lists.html
diff --git a/doc/src/howto/creator-help.qdoc b/doc/src/howto/creator-help.qdoc
index faf0de9a19..2f0cf81205 100644
--- a/doc/src/howto/creator-help.qdoc
+++ b/doc/src/howto/creator-help.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-help-overview.html
\page creator-help.html
\nextpage creator-faq.html
diff --git a/doc/src/howto/creator-keyboard-shortcuts.qdoc b/doc/src/howto/creator-keyboard-shortcuts.qdoc
index b3021f2529..df4624de5c 100644
--- a/doc/src/howto/creator-keyboard-shortcuts.qdoc
+++ b/doc/src/howto/creator-keyboard-shortcuts.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-cli.html
\page creator-keyboard-shortcuts.html
\nextpage creator-editor-external.html
diff --git a/doc/src/howto/creator-sessions.qdoc b/doc/src/howto/creator-sessions.qdoc
index 67a1e5c317..34235b9c07 100644
--- a/doc/src/howto/creator-sessions.qdoc
+++ b/doc/src/howto/creator-sessions.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-sharing-project-settings.html
\page creator-project-managing-sessions.html
\nextpage creator-design-mode.html
diff --git a/doc/src/howto/creator-task-lists.qdoc b/doc/src/howto/creator-task-lists.qdoc
index 92764c557a..ec6b05d1aa 100644
--- a/doc/src/howto/creator-task-lists.qdoc
+++ b/doc/src/howto/creator-task-lists.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-external.html
\page creator-task-lists.html
\nextpage creator-help-overview.html
diff --git a/doc/src/howto/creator-tips.qdoc b/doc/src/howto/creator-tips.qdoc
index 6a6e6ec85b..5d9fe7fb31 100644
--- a/doc/src/howto/creator-tips.qdoc
+++ b/doc/src/howto/creator-tips.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-faq.html
\page creator-tips.html
\nextpage creator-known-issues.html
diff --git a/doc/src/howto/creator-ui.qdoc b/doc/src/howto/creator-ui.qdoc
index f4aa2f002e..3e2bdfec8c 100644
--- a/doc/src/howto/creator-ui.qdoc
+++ b/doc/src/howto/creator-ui.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-overview.html
\page creator-quick-tour.html
\nextpage creator-configuring.html
diff --git a/doc/src/howto/creator-vcs.qdoc b/doc/src/howto/creator-vcs.qdoc
index faec850b9f..50f9fb54ad 100644
--- a/doc/src/howto/creator-vcs.qdoc
+++ b/doc/src/howto/creator-vcs.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-wizards.html
\page creator-version-control.html
\nextpage creator-configuring-projects.html
diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc
index c2e2fb6ef2..8dc656d871 100644
--- a/doc/src/howto/qtcreator-faq.qdoc
+++ b/doc/src/howto/qtcreator-faq.qdoc
@@ -17,7 +17,7 @@
****************************************************************************/
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-help.html
\page creator-faq.html
\nextpage creator-tips.html
@@ -105,7 +105,7 @@
\QC comes fully integrated with Qt documentation and examples using
the Qt Help plugin. The integrated Qt Reference Documentation is available
- for Qt 4.4 and later. \QC, \QSDK, and other Qt deliverables contain
+ for Qt 4.4 and later. \QC and other Qt deliverables contain
documentation as .qch files. All the documentation is accessible in the
\gui Help mode.
@@ -121,9 +121,9 @@
\b {If I have a choice of GDB versions, which should I use?}
On Linux and Windows, use the Python-enabled GDB versions that are
- installed when you install \QC and Qt SDK. On Mac OS X, use the GDB
- provided with Xcode. For a custom target, you can build your own
- Python-enabled GDB. Follow the instructions in
+ installed when you install \QC and \QSDK. On Mac OS X, GDB is no longer
+ officially supported. To build your own Python-enabled GDB, follow the
+ instructions in
\l{http://qt-project.org/wiki/QtCreatorBuildGdb}{Building GDB}.
You must use Python version 2.6 or 2.7.
@@ -161,11 +161,12 @@
many parallel processes as your CPU has cores. You can override this
behavior by using the \c{-j} parameter as described above.
- \section1 Qt SDK Questions
+ \section1 Qt Installation Questions
- \b {I cannot use QSslSocket with the SDK. What should I do?}
+ \b {I cannot use QSslSocket with the Qt I installed from binary packages.
+ What should I do?}
- The Qt build in the SDK is built with QT_NO_OPENSSL defined. Rebuilding it
+ The Qt in the binary packages is built with QT_NO_OPENSSL defined. Rebuilding it
is possible. For more information, see
\l{http://www.qtcentre.org/threads/19222-Qssl}.
diff --git a/doc/src/ios/creator-ios-dev.qdoc b/doc/src/ios/creator-ios-dev.qdoc
index 6cd6cbc948..218c48ac44 100644
--- a/doc/src/ios/creator-ios-dev.qdoc
+++ b/doc/src/ios/creator-ios-dev.qdoc
@@ -18,7 +18,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-developing-generic-linux.html
\page creator-developing-ios.html
\nextpage creator-developing-qnx.html
diff --git a/doc/src/linux-mobile/creator-deployment-madde.qdoc b/doc/src/linux-mobile/creator-deployment-madde.qdoc
index 52e6464450..ec6df11604 100644
--- a/doc/src/linux-mobile/creator-deployment-madde.qdoc
+++ b/doc/src/linux-mobile/creator-deployment-madde.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-deployment-bb10.html
\page creator-deployment-maemo.html
\nextpage creator-deployment-qnx.html
diff --git a/doc/src/linux-mobile/linuxdev.qdoc b/doc/src/linux-mobile/linuxdev.qdoc
index 7aeb8ce6c8..74367cd249 100644
--- a/doc/src/linux-mobile/linuxdev.qdoc
+++ b/doc/src/linux-mobile/linuxdev.qdoc
@@ -18,7 +18,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-developing-bb10.html
\page creator-developing-generic-linux.html
\nextpage creator-developing-ios.html
diff --git a/doc/src/overview/creator-acknowledgements.qdoc b/doc/src/overview/creator-acknowledgements.qdoc
index 855f213cf3..00fc60109f 100644
--- a/doc/src/overview/creator-acknowledgements.qdoc
+++ b/doc/src/overview/creator-acknowledgements.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage technical-support.html
\page creator-acknowledgements.html
diff --git a/doc/src/overview/creator-advanced.qdoc b/doc/src/overview/creator-advanced.qdoc
index 6ce8b4ff29..8c5a5e6e45 100644
--- a/doc/src/overview/creator-advanced.qdoc
+++ b/doc/src/overview/creator-advanced.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-running-valgrind-remotely.html
\page creator-advanced.html
\nextpage creator-os-supported-platforms.html
diff --git a/doc/src/overview/creator-configuring.qdoc b/doc/src/overview/creator-configuring.qdoc
index 54e3b270d1..e3d882581b 100644
--- a/doc/src/overview/creator-configuring.qdoc
+++ b/doc/src/overview/creator-configuring.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-quick-tour.html
\page creator-configuring.html
\nextpage creator-build-example-application.html
diff --git a/doc/src/overview/creator-deployment-overview.qdoc b/doc/src/overview/creator-deployment-overview.qdoc
index f41f35932c..d2d0f9654d 100644
--- a/doc/src/overview/creator-deployment-overview.qdoc
+++ b/doc/src/overview/creator-deployment-overview.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-running-targets.html
\page creator-deployment.html
\nextpage creator-deploying-android.html
diff --git a/doc/src/overview/creator-design-overview.qdoc b/doc/src/overview/creator-design-overview.qdoc
index 0f713757b0..26ad72a219 100644
--- a/doc/src/overview/creator-design-overview.qdoc
+++ b/doc/src/overview/creator-design-overview.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-managing-sessions.html
\page creator-design-mode.html
\nextpage creator-visual-editor.html
diff --git a/doc/src/overview/creator-getting-started.qdoc b/doc/src/overview/creator-getting-started.qdoc
index 8007866199..240212bf65 100644
--- a/doc/src/overview/creator-getting-started.qdoc
+++ b/doc/src/overview/creator-getting-started.qdoc
@@ -23,8 +23,8 @@
// **********************************************************************
/*!
- \contentspage index.html
- \previouspage index.html
+ \contentspage {Qt Creator Manual}
+ \previouspage {Qt Creator Manual}
\page creator-getting-started.html
\nextpage creator-overview.html
diff --git a/doc/src/overview/creator-glossary.qdoc b/doc/src/overview/creator-glossary.qdoc
index 57f5b20b65..b7aaba3732 100644
--- a/doc/src/overview/creator-glossary.qdoc
+++ b/doc/src/overview/creator-glossary.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-known-issues.html
\page creator-glossary.html
\nextpage technical-support.html
diff --git a/doc/src/overview/creator-help-overview.qdoc b/doc/src/overview/creator-help-overview.qdoc
index 1d33e57e59..e1001a0104 100644
--- a/doc/src/overview/creator-help-overview.qdoc
+++ b/doc/src/overview/creator-help-overview.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-task-lists.html
\page creator-help-overview.html
\nextpage creator-help.html
diff --git a/doc/src/overview/creator-issues.qdoc b/doc/src/overview/creator-issues.qdoc
index 0816b1fd9b..69a30c571f 100644
--- a/doc/src/overview/creator-issues.qdoc
+++ b/doc/src/overview/creator-issues.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-tips.html
\page creator-known-issues.html
\nextpage creator-glossary.html
diff --git a/doc/src/overview/creator-mobile-targets.qdoc b/doc/src/overview/creator-mobile-targets.qdoc
index 88bbe70df4..7cfb47883c 100644
--- a/doc/src/overview/creator-mobile-targets.qdoc
+++ b/doc/src/overview/creator-mobile-targets.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-deployment-qnx.html
\page creator-connecting-mobile.html
\nextpage creator-developing-android.html
@@ -31,10 +31,9 @@
\title Connecting Mobile Devices
You can connect mobile devices to the development PC to build, run, debug,
- and analyze applications on them from \QC. When you install an SDK for a
+ and analyze applications on them from \QC. When you install Qt for a
target platform, such as Android or QNX, the build and run settings for the
- development targets delivered with the SDK might be set up automatically in
- \QC.
+ development targets might be set up automatically in \QC.
You can connect the device to the development PC using a USB connection.
Additionally, you can connect Linux-based devices by using a WLAN
@@ -45,12 +44,12 @@
\li \l{Connecting Android Devices}
Qt applications for Android are compiled as \c {shared objects} that
- are loaded by a Java launcher generated by the Qt for Android SDK.
+ are loaded by a Java launcher that is part of Qt.
This is totally transparent to users. As Qt is composed of libraries
referencing each other, Qt 4 applications are only supported on
Android version 1.6, or later, and Qt 5 applications on version
- 2.3.3, or later. You must install the Qt for Android SDK to develop
- for Android devices.
+ 2.3.3, or later. You must install a Qt version targeting Android and
+ the Android SDK and NDK to develop for Android devices.
\li \l{Connecting Bare Metal Devices}
diff --git a/doc/src/overview/creator-overview.qdoc b/doc/src/overview/creator-overview.qdoc
index b92186ee5e..7e5cebd690 100644
--- a/doc/src/overview/creator-overview.qdoc
+++ b/doc/src/overview/creator-overview.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-getting-started.html
\page creator-overview.html
\nextpage creator-quick-tour.html
diff --git a/doc/src/overview/creator-supported-platforms.qdoc b/doc/src/overview/creator-supported-platforms.qdoc
index e7980e5649..7f95700d87 100644
--- a/doc/src/overview/creator-supported-platforms.qdoc
+++ b/doc/src/overview/creator-supported-platforms.qdoc
@@ -24,7 +24,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-advanced.html
\page creator-os-supported-platforms.html
\nextpage creator-project-other.html
diff --git a/doc/src/overview/creator-target-platforms.qdocinc b/doc/src/overview/creator-target-platforms.qdocinc
index afbadea5ef..f14522c320 100644
--- a/doc/src/overview/creator-target-platforms.qdocinc
+++ b/doc/src/overview/creator-target-platforms.qdocinc
@@ -64,10 +64,6 @@
\li Yes
\endtable
- \note Symbian support has been removed from \QC 2.6. To develop for Symbian,
- install \QSDK 1.2.1 or \QSDK 1.1.2 (that contains the Qt 4.6.3 for Symbian
- and Qt 4.7.3 for Symbian^3 and Symbian Anna targets) and use \QC 2.4.
-
\note Madde support has been removed from \QC 3.0. To develop for Maemo or Harmattan,
- install \QSDK 1.2.1 or \QSDK 1.1.2 and use \QC 2.8.
+ use \QC 2.8.
diff --git a/doc/src/overview/creator-tech-support.qdoc b/doc/src/overview/creator-tech-support.qdoc
index ebd7f5f576..787944c47b 100644
--- a/doc/src/overview/creator-tech-support.qdoc
+++ b/doc/src/overview/creator-tech-support.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-glossary.html
\page technical-support.html
\nextpage creator-acknowledgements.html
diff --git a/doc/src/overview/creator-testing.qdoc b/doc/src/overview/creator-testing.qdoc
index d25fbecbe1..97b133727c 100644
--- a/doc/src/overview/creator-testing.qdoc
+++ b/doc/src/overview/creator-testing.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-build-process-customizing.html
\page creator-testing.html
\nextpage creator-debugging.html
diff --git a/doc/src/overview/creator-tutorials.qdoc b/doc/src/overview/creator-tutorials.qdoc
index 7c38ce8a3b..c4797e8a09 100644
--- a/doc/src/overview/creator-tutorials.qdoc
+++ b/doc/src/overview/creator-tutorials.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-build-example-application.html
\page creator-tutorials.html
\nextpage creator-qml-application.html
diff --git a/doc/src/overview/mobile-app-design.qdoc b/doc/src/overview/mobile-app-design.qdoc
index 9e6a479fe8..2dc6767b28 100644
--- a/doc/src/overview/mobile-app-design.qdoc
+++ b/doc/src/overview/mobile-app-design.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage adding-plugins.html
\page creator-usability.html
\nextpage creator-coding.html
diff --git a/doc/src/projects/creator-projects-autotools.qdoc b/doc/src/projects/creator-projects-autotools.qdoc
index d5720b71c5..454ef4120f 100644
--- a/doc/src/projects/creator-projects-autotools.qdoc
+++ b/doc/src/projects/creator-projects-autotools.qdoc
@@ -31,7 +31,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-qbs.html
\page creator-projects-autotools.html
\nextpage creator-project-generic.html
diff --git a/doc/src/projects/creator-projects-build-run-tutorial.qdoc b/doc/src/projects/creator-projects-build-run-tutorial.qdoc
index 451dd48190..0babbea672 100644
--- a/doc/src/projects/creator-projects-build-run-tutorial.qdoc
+++ b/doc/src/projects/creator-projects-build-run-tutorial.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-configuring.html
\page creator-build-example-application.html
\nextpage creator-tutorials.html
diff --git a/doc/src/projects/creator-projects-building-running.qdoc b/doc/src/projects/creator-projects-building-running.qdoc
index bc937093d9..aded8507b4 100644
--- a/doc/src/projects/creator-projects-building-running.qdoc
+++ b/doc/src/projects/creator-projects-building-running.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-mime-types.html
\page creator-building-running.html
\nextpage creator-building-targets.html
@@ -63,7 +63,7 @@
\li \l{Connecting Mobile Devices}
- When you install tool chains for device types as part of an SDK,
+ When you install tool chains for device types as part of a Qt distribution,
the build and run settings for mobile device types might be set up
automatically. However, you might need to install and configure some
additional software on the devices to be able to connect to them
diff --git a/doc/src/projects/creator-projects-building.qdoc b/doc/src/projects/creator-projects-building.qdoc
index 0c11a88656..ccbedf5770 100644
--- a/doc/src/projects/creator-projects-building.qdoc
+++ b/doc/src/projects/creator-projects-building.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-building-running.html
\page creator-building-targets.html
\nextpage creator-running-targets.html
diff --git a/doc/src/projects/creator-projects-builds-customizing.qdoc b/doc/src/projects/creator-projects-builds-customizing.qdoc
index 2b31513098..ef05e84a45 100644
--- a/doc/src/projects/creator-projects-builds-customizing.qdoc
+++ b/doc/src/projects/creator-projects-builds-customizing.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-developing-winrt.html
\page creator-build-process-customizing.html
\nextpage creator-testing.html
diff --git a/doc/src/projects/creator-projects-cmake.qdoc b/doc/src/projects/creator-projects-cmake.qdoc
index 54d903e6de..274d497975 100644
--- a/doc/src/projects/creator-projects-cmake.qdoc
+++ b/doc/src/projects/creator-projects-cmake.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-other.html
\page creator-project-cmake.html
\nextpage creator-project-qbs.html
diff --git a/doc/src/projects/creator-projects-compilers.qdoc b/doc/src/projects/creator-projects-compilers.qdoc
index 261e788a93..345ef9565d 100644
--- a/doc/src/projects/creator-projects-compilers.qdoc
+++ b/doc/src/projects/creator-projects-compilers.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-qmake.html
\page creator-tool-chains.html
\nextpage creator-debuggers.html
@@ -37,7 +37,7 @@
application on a particular platform.
\QC automatically detects the compilers that are registered by your system
- or by an SDK. You can add compilers to build applications by using other
+ or by an installer. You can add compilers to build applications by using other
compilers or by using additional versions of the automatically detected
compilers:
@@ -49,7 +49,7 @@
\li MinGW (Minimalist GNU for Windows) is a native software port of GCC
and GNU Binutils for use in the development of native Microsoft
Windows applications on Windows. MinGW is
- distributed together with \QC and Qt SDK for Windows.
+ distributed together with \QC and Qt installers for Windows.
\li Linux ICC (Intel C++ Compiler) is a group of C and C++ compilers
for Linux.
diff --git a/doc/src/projects/creator-projects-creating.qdoc b/doc/src/projects/creator-projects-creating.qdoc
index dbf3584a45..6eed341797 100644
--- a/doc/src/projects/creator-projects-creating.qdoc
+++ b/doc/src/projects/creator-projects-creating.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-managing.html
\page creator-project-creating.html
\nextpage creator-project-opening.html
@@ -65,8 +65,8 @@
use \QC as a code editor and to fully control the steps and commands used to
build the project.
- You can install tools for mobile devices
- as part of an SDK. The \l{glossary-buildandrun-kit}{kits} and build and run settings for the
+ You can install tools for mobile devices as part of Qt distributions.
+ The \l{glossary-buildandrun-kit}{kits} and build and run settings for the
installed device types are set up automatically. However, you might need to
install and configure some additional software on the devices to be able to
connect to them from the development PC.
diff --git a/doc/src/projects/creator-projects-custom-wizards.qdoc b/doc/src/projects/creator-projects-custom-wizards.qdoc
index cc3fd89e74..d9c0a72bef 100644
--- a/doc/src/projects/creator-projects-custom-wizards.qdoc
+++ b/doc/src/projects/creator-projects-custom-wizards.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-qmake-libraries.html
\page creator-project-wizards.html
\nextpage creator-version-control.html
diff --git a/doc/src/projects/creator-projects-debuggers.qdoc b/doc/src/projects/creator-projects-debuggers.qdoc
index 9fbd3769d1..20ca18740b 100644
--- a/doc/src/projects/creator-projects-debuggers.qdoc
+++ b/doc/src/projects/creator-projects-debuggers.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-tool-chains.html
\page creator-debuggers.html
\nextpage creator-build-settings.html
diff --git a/doc/src/projects/creator-projects-generic.qdoc b/doc/src/projects/creator-projects-generic.qdoc
index 43275d63d1..51af31f7eb 100644
--- a/doc/src/projects/creator-projects-generic.qdoc
+++ b/doc/src/projects/creator-projects-generic.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-projects-autotools.html
\page creator-project-generic.html
\nextpage creator-cli.html
diff --git a/doc/src/projects/creator-projects-libraries.qdoc b/doc/src/projects/creator-projects-libraries.qdoc
index 79bfac1ca9..950686e9e2 100644
--- a/doc/src/projects/creator-projects-libraries.qdoc
+++ b/doc/src/projects/creator-projects-libraries.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-opening.html
\page creator-project-qmake-libraries.html
\nextpage creator-project-wizards.html
diff --git a/doc/src/projects/creator-projects-opening.qdoc b/doc/src/projects/creator-projects-opening.qdoc
index 22bbebfe56..924b8488e7 100644
--- a/doc/src/projects/creator-projects-opening.qdoc
+++ b/doc/src/projects/creator-projects-opening.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-creating.html
\page creator-project-opening.html
\nextpage creator-project-qmake-libraries.html
diff --git a/doc/src/projects/creator-projects-other.qdoc b/doc/src/projects/creator-projects-other.qdoc
index 7e3cf586da..558a441593 100644
--- a/doc/src/projects/creator-projects-other.qdoc
+++ b/doc/src/projects/creator-projects-other.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-os-supported-platforms.html
\page creator-project-other.html
\nextpage creator-project-cmake.html
diff --git a/doc/src/projects/creator-projects-overview.qdoc b/doc/src/projects/creator-projects-overview.qdoc
index 5ab60cb88e..b8f8b55c96 100644
--- a/doc/src/projects/creator-projects-overview.qdoc
+++ b/doc/src/projects/creator-projects-overview.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-android-app-tutorial.html
\page creator-project-managing.html
\nextpage creator-project-creating.html
diff --git a/doc/src/projects/creator-projects-qbs.qdoc b/doc/src/projects/creator-projects-qbs.qdoc
index 0c39b11baf..a04763e50d 100644
--- a/doc/src/projects/creator-projects-qbs.qdoc
+++ b/doc/src/projects/creator-projects-qbs.qdoc
@@ -17,7 +17,7 @@
****************************************************************************/
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-project-cmake.html
\page creator-project-qbs.html
\nextpage creator-projects-autotools.html
diff --git a/doc/src/projects/creator-projects-qt-versions.qdoc b/doc/src/projects/creator-projects-qt-versions.qdoc
index 8d5bfdc4e5..8f86f9af80 100644
--- a/doc/src/projects/creator-projects-qt-versions.qdoc
+++ b/doc/src/projects/creator-projects-qt-versions.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-targets.html
\page creator-project-qmake.html
\nextpage creator-tool-chains.html
@@ -32,11 +32,11 @@
\QC allows you to have multiple versions of Qt installed on your development
PC and use different versions to build your projects.
- For example, Qt 4 SDK contains special Qt versions for developing applications
- for mobile devices.
+ For example, device manufacturers provide special Qt versions for developing
+ applications for their devices.
\QC automatically detects the Qt versions that are registered by
- your system or by \QSDK. To view detailed information for each Qt
+ your system or by installers. To view detailed information for each Qt
version, select it in the list and select \gui Details in the
\gui {Qt version for} section. To add Qt versions, select
\gui {Tools > Options > Build & Run > Qt Versions}.
diff --git a/doc/src/projects/creator-projects-running.qdoc b/doc/src/projects/creator-projects-running.qdoc
index d1e59b2eb8..534bec7690 100644
--- a/doc/src/projects/creator-projects-running.qdoc
+++ b/doc/src/projects/creator-projects-running.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-building-targets.html
\page creator-running-targets.html
\nextpage creator-deployment.html
diff --git a/doc/src/projects/creator-projects-settings-build.qdoc b/doc/src/projects/creator-projects-settings-build.qdoc
index 37061695c9..67fc627391 100644
--- a/doc/src/projects/creator-projects-settings-build.qdoc
+++ b/doc/src/projects/creator-projects-settings-build.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-debuggers.html
\page creator-build-settings.html
\nextpage creator-run-settings.html
diff --git a/doc/src/projects/creator-projects-settings-code-style.qdoc b/doc/src/projects/creator-projects-settings-code-style.qdoc
index 9f2a266c97..379df033b6 100644
--- a/doc/src/projects/creator-projects-settings-code-style.qdoc
+++ b/doc/src/projects/creator-projects-settings-code-style.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-editor-settings.html
\page creator-code-style-settings.html
\nextpage creator-build-dependencies.html
diff --git a/doc/src/projects/creator-projects-settings-dependencies.qdoc b/doc/src/projects/creator-projects-settings-dependencies.qdoc
index 8d3c19e391..d0f2b410e6 100644
--- a/doc/src/projects/creator-projects-settings-dependencies.qdoc
+++ b/doc/src/projects/creator-projects-settings-dependencies.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-code-style-settings.html
\page creator-build-dependencies.html
\nextpage creator-sharing-project-settings.html
diff --git a/doc/src/projects/creator-projects-settings-editor.qdoc b/doc/src/projects/creator-projects-settings-editor.qdoc
index 9e4d2a7418..fad668df10 100644
--- a/doc/src/projects/creator-projects-settings-editor.qdoc
+++ b/doc/src/projects/creator-projects-settings-editor.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-run-settings.html
\page creator-editor-settings.html
\nextpage creator-code-style-settings.html
diff --git a/doc/src/projects/creator-projects-settings-overview.qdoc b/doc/src/projects/creator-projects-settings-overview.qdoc
index f883910353..d91dcea4d7 100644
--- a/doc/src/projects/creator-projects-settings-overview.qdoc
+++ b/doc/src/projects/creator-projects-settings-overview.qdoc
@@ -23,16 +23,16 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-version-control.html
\page creator-configuring-projects.html
\nextpage creator-targets.html
\title Configuring Projects
- When you install an SDK for a target platform, such as Android or QNX, the
- build and run settings for the development
- targets delivered with the SDK might be set up automatically in \QC.
+ When you install Qt for a target platform, such as Android or QNX, the
+ build and run settings for the development targets might be set up
+ automatically in \QC.
To view and modify the settings for currently open projects, switch to the
\gui Projects mode by pressing \key Ctrl+5.
diff --git a/doc/src/projects/creator-projects-settings-run.qdoc b/doc/src/projects/creator-projects-settings-run.qdoc
index 1c6016a151..7ff6f03cdd 100644
--- a/doc/src/projects/creator-projects-settings-run.qdoc
+++ b/doc/src/projects/creator-projects-settings-run.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-build-settings.html
\page creator-run-settings.html
\nextpage creator-editor-settings.html
diff --git a/doc/src/projects/creator-projects-settings-sharing.qdoc b/doc/src/projects/creator-projects-settings-sharing.qdoc
index 78d6a8d419..ba85e27e46 100644
--- a/doc/src/projects/creator-projects-settings-sharing.qdoc
+++ b/doc/src/projects/creator-projects-settings-sharing.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-build-dependencies.html
\page creator-sharing-project-settings.html
\nextpage creator-project-managing-sessions.html
diff --git a/doc/src/projects/creator-projects-targets.qdoc b/doc/src/projects/creator-projects-targets.qdoc
index b7ea7cfeb8..03f8b121a7 100644
--- a/doc/src/projects/creator-projects-targets.qdoc
+++ b/doc/src/projects/creator-projects-targets.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-configuring-projects.html
\page creator-targets.html
\nextpage creator-project-qmake.html
diff --git a/doc/src/qnx/creator-deployment-bb10.qdoc b/doc/src/qnx/creator-deployment-bb10.qdoc
index 527729876c..f2ec258608 100644
--- a/doc/src/qnx/creator-deployment-bb10.qdoc
+++ b/doc/src/qnx/creator-deployment-bb10.qdoc
@@ -25,7 +25,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-deploying-android.html
\page creator-deployment-bb10.html
\nextpage creator-deployment-maemo.html
diff --git a/doc/src/qnx/creator-deployment-qnx.qdoc b/doc/src/qnx/creator-deployment-qnx.qdoc
index 4d39165125..1c94d4ee4e 100644
--- a/doc/src/qnx/creator-deployment-qnx.qdoc
+++ b/doc/src/qnx/creator-deployment-qnx.qdoc
@@ -25,7 +25,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-deployment-maemo.html
\page creator-deployment-qnx.html
\nextpage creator-connecting-mobile.html
diff --git a/doc/src/qnx/creator-developing-bb10.qdoc b/doc/src/qnx/creator-developing-bb10.qdoc
index 6d90b2169d..4a4a5975b3 100644
--- a/doc/src/qnx/creator-developing-bb10.qdoc
+++ b/doc/src/qnx/creator-developing-bb10.qdoc
@@ -19,7 +19,7 @@
****************************************************************************/
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-developing-baremetal.html
\page creator-developing-bb10.html
\nextpage creator-developing-generic-linux.html
diff --git a/doc/src/qnx/creator-developing-qnx.qdoc b/doc/src/qnx/creator-developing-qnx.qdoc
index b05c929e00..a44dd6d93b 100644
--- a/doc/src/qnx/creator-developing-qnx.qdoc
+++ b/doc/src/qnx/creator-developing-qnx.qdoc
@@ -19,7 +19,7 @@
****************************************************************************/
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-developing-ios.html
\page creator-developing-qnx.html
\nextpage creator-developing-winrt.html
diff --git a/doc/src/qtquick/qtquick-app-development.qdoc b/doc/src/qtquick/qtquick-app-development.qdoc
index 212ed1cfaf..307d22c29e 100644
--- a/doc/src/qtquick/qtquick-app-development.qdoc
+++ b/doc/src/qtquick/qtquick-app-development.qdoc
@@ -24,7 +24,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-design-mode.html
\page creator-visual-editor.html
\nextpage quick-projects.html
diff --git a/doc/src/qtquick/qtquick-app-tutorial.qdoc b/doc/src/qtquick/qtquick-app-tutorial.qdoc
index 936a1786a4..3675b9a8d3 100644
--- a/doc/src/qtquick/qtquick-app-tutorial.qdoc
+++ b/doc/src/qtquick/qtquick-app-tutorial.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-tutorials.html
\page creator-qml-application.html
\nextpage creator-writing-program.html
diff --git a/doc/src/qtquick/qtquick-buttons.qdoc b/doc/src/qtquick/qtquick-buttons.qdoc
index 617c60fb5c..3fc8a4d7ac 100644
--- a/doc/src/qtquick/qtquick-buttons.qdoc
+++ b/doc/src/qtquick/qtquick-buttons.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage quick-components.html
\page quick-buttons.html
\nextpage quick-scalable-image.html
@@ -99,7 +99,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage quick-buttons.html
\page quick-scalable-image.html
\nextpage quick-screens.html
diff --git a/doc/src/qtquick/qtquick-components.qdoc b/doc/src/qtquick/qtquick-components.qdoc
index bf6a598778..4980510261 100644
--- a/doc/src/qtquick/qtquick-components.qdoc
+++ b/doc/src/qtquick/qtquick-components.qdoc
@@ -24,7 +24,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-using-qt-quick-designer.html
\page quick-components.html
\nextpage quick-buttons.html
@@ -77,8 +77,8 @@
Since Qt 5.1, a set of Qt Quick Controls is available for creating classic
desktop-style user interfaces using Qt Quick 2.1.
- You can install Qt Quick 1 Components as part of the Qt 4 SDK and the Qt
- Quick Controls as part of Qt 5.1, or later.
+ Qt Quick 1 Components are a part of Qt 4, whereas Qt Quick Controls were
+ added to Qt 5.1.
The \QC project wizards create Qt Quick applications that use Qt Quick
Components or Controls.
diff --git a/doc/src/qtquick/qtquick-creating.qdoc b/doc/src/qtquick/qtquick-creating.qdoc
index fc03315dbe..73cadde517 100644
--- a/doc/src/qtquick/qtquick-creating.qdoc
+++ b/doc/src/qtquick/qtquick-creating.qdoc
@@ -24,7 +24,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-visual-editor.html
\page quick-projects.html
\nextpage creator-using-qt-quick-designer.html
diff --git a/doc/src/qtquick/qtquick-designer.qdoc b/doc/src/qtquick/qtquick-designer.qdoc
index e041148b3e..c6b22bb80a 100644
--- a/doc/src/qtquick/qtquick-designer.qdoc
+++ b/doc/src/qtquick/qtquick-designer.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage quick-projects.html
\page creator-using-qt-quick-designer.html
\nextpage quick-components.html
diff --git a/doc/src/qtquick/qtquick-exporting-qml.qdoc b/doc/src/qtquick/qtquick-exporting-qml.qdoc
index 746bbc0770..e584be2d75 100644
--- a/doc/src/qtquick/qtquick-exporting-qml.qdoc
+++ b/doc/src/qtquick/qtquick-exporting-qml.qdoc
@@ -24,7 +24,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage quick-screens.html
\page quick-export-to-qml.html
\nextpage creator-qml-modules-with-plugins.html
diff --git a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc
index 0ff4f1ffef..cc374bb065 100644
--- a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc
+++ b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage quick-export-to-qml.html
\page creator-qml-modules-with-plugins.html
\nextpage creator-using-qt-designer.html
diff --git a/doc/src/qtquick/qtquick-screens.qdoc b/doc/src/qtquick/qtquick-screens.qdoc
index da940fd7ea..bdf655f7f8 100644
--- a/doc/src/qtquick/qtquick-screens.qdoc
+++ b/doc/src/qtquick/qtquick-screens.qdoc
@@ -24,7 +24,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage quick-scalable-image.html
\page quick-screens.html
\nextpage quick-export-to-qml.html
@@ -41,9 +41,8 @@
You can also use ready-made Qt Quick 1 Components (for Qt 4) to create
screens with a native look and feel for a particular target platform.
Since Qt 5.1, a set of Qt Quick Controls is available for creating classic
- desktop-style user interfaces using Qt Quick 2.1. You
- can install Qt Quick 1 Components as part of the Qt 4 SDK and the Qt Quick
- Controls as part of Qt 5.1, or later.
+ desktop-style user interfaces using Qt Quick 2.1. Qt Quick 1 Components are
+ a part of Qt 4, whereas Qt Quick Controls were added to Qt 5.1.
\section1 Adding Components to Screens
diff --git a/doc/src/qtquick/qtquick-toolbars.qdoc b/doc/src/qtquick/qtquick-toolbars.qdoc
index 16fcf42296..74cb9eab6c 100644
--- a/doc/src/qtquick/qtquick-toolbars.qdoc
+++ b/doc/src/qtquick/qtquick-toolbars.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-indenting-code.html
\page qt-quick-toolbars.html
\nextpage creator-editor-codepasting.html
diff --git a/doc/src/widgets/qtdesigner-app-tutorial.qdoc b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
index 852efc9c9d..1ab5c66497 100644
--- a/doc/src/widgets/qtdesigner-app-tutorial.qdoc
+++ b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-qml-application.html
\page creator-writing-program.html
\nextpage creator-android-app-tutorial.html
diff --git a/doc/src/widgets/qtdesigner-overview.qdoc b/doc/src/widgets/qtdesigner-overview.qdoc
index 4be1ded78d..989e65a1a3 100644
--- a/doc/src/widgets/qtdesigner-overview.qdoc
+++ b/doc/src/widgets/qtdesigner-overview.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-qml-modules-with-plugins.html
\page creator-using-qt-designer.html
\nextpage adding-plugins.html
diff --git a/doc/src/widgets/qtdesigner-plugins.qdoc b/doc/src/widgets/qtdesigner-plugins.qdoc
index 2c8eac05aa..0b18eaaeb3 100644
--- a/doc/src/widgets/qtdesigner-plugins.qdoc
+++ b/doc/src/widgets/qtdesigner-plugins.qdoc
@@ -23,7 +23,7 @@
// **********************************************************************
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-using-qt-designer.html
\page adding-plugins.html
\nextpage creator-usability.html
@@ -47,8 +47,8 @@
\QD fetches plugins from the standard locations and loads the plugins
that match its build key. \QD is delivered both as a standalone application
- and as part of the SDK, where it is integrated into \QC. The correct folder
- to place the plugins depends on which one you use.
+ and integrated into \QC. The correct folder to place the plugins depends on
+ whether you use the standalone \QD or the integrated \QD.
The integrated \QD fetches plugins from the \c {%SDK%\bin\designer} folder
on Windows and Linux. For information about how to configure plugins on
@@ -128,7 +128,7 @@
\section1 Matching Build Keys
- The \QC that is included in pre-built SDK packages on Windows is built with
+ The \QC that is included in pre-built Qt packages on Windows is built with
the Microsoft Visual Studio compiler, whereas the version of Qt shipped for
building applications is configured and built to use the MinGW/g++ compiler.
Plugins built by using this version of Qt cannot be loaded by \QC because
diff --git a/doc/src/winrt/creator-winrt.qdoc b/doc/src/winrt/creator-winrt.qdoc
index 08b223ded6..ba6b744010 100644
--- a/doc/src/winrt/creator-winrt.qdoc
+++ b/doc/src/winrt/creator-winrt.qdoc
@@ -18,7 +18,7 @@
/*!
- \contentspage index.html
+ \contentspage {Qt Creator Manual}
\previouspage creator-developing-qnx.html
\page creator-developing-winrt.html
\nextpage creator-build-process-customizing.html
diff --git a/qbs/imports/QtcLibrary.qbs b/qbs/imports/QtcLibrary.qbs
index aa27733aa6..806e796017 100644
--- a/qbs/imports/QtcLibrary.qbs
+++ b/qbs/imports/QtcLibrary.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcFunctions
DynamicLibrary {
diff --git a/qbs/imports/QtcPlugin.qbs b/qbs/imports/QtcPlugin.qbs
index 7527003539..88681b4b19 100644
--- a/qbs/imports/QtcPlugin.qbs
+++ b/qbs/imports/QtcPlugin.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.FileInfo
import QtcFunctions
diff --git a/qbs/imports/QtcTool.qbs b/qbs/imports/QtcTool.qbs
index 181cf67451..2a30cfe8f9 100644
--- a/qbs/imports/QtcTool.qbs
+++ b/qbs/imports/QtcTool.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcFunctions
Application {
diff --git a/qbs/modules/pluginspec/pluginspec.qbs b/qbs/modules/pluginspec/pluginspec.qbs
index e3ac50d099..f7e9127306 100644
--- a/qbs/modules/pluginspec/pluginspec.qbs
+++ b/qbs/modules/pluginspec/pluginspec.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.TextFile
import qbs.FileInfo
diff --git a/qtcreator.qbs b/qtcreator.qbs
index 490fafb2b5..6374b3f6a8 100644
--- a/qtcreator.qbs
+++ b/qtcreator.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
Project {
property bool withAutotests: qbs.buildVariant === "debug"
diff --git a/share/qtcreator/debugger/boosttypes.py b/share/qtcreator/debugger/boosttypes.py
index fb725c4f22..d69164b874 100644
--- a/share/qtcreator/debugger/boosttypes.py
+++ b/share/qtcreator/debugger/boosttypes.py
@@ -95,6 +95,21 @@ def qdump__boost__shared_ptr(d, value):
d.putIntItem("usecount", usecount)
+def qdump__boost__container__list(d, value):
+ r = value["members_"]["m_icont"]["data_"]["root_plus_size_"]
+ n = toInteger(r["size_"])
+ d.putItemCount(n)
+ d.putNumChild(n)
+ if d.isExpanded():
+ innerType = d.templateArgument(value.type, 0)
+ offset = 2 * d.ptrSize()
+ with Children(d, n):
+ p = r["root_"]["next_"]
+ for i in xrange(n):
+ d.putSubItem("%s" % i, d.createValue(d.pointerValue(p) + offset, innerType))
+ p = p["next_"]
+
+
def qdump__boost__gregorian__date(d, value):
d.putValue(int(value["days_"]), JulianDate)
d.putNumChild(0)
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 31703a474e..d5607e97c5 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -360,6 +360,9 @@ class DumperBase:
def is32bit(self):
return self.ptrSize() == 4
+ def is64bit(self):
+ return self.ptrSize() == 8
+
def isQt3Support(self):
# assume no Qt 3 support by default
return False
@@ -922,6 +925,46 @@ class DumperBase:
pass
+ def extractStaticMetaObjectHelper(self, typeName):
+ """
+ Checks whether type has a Q_OBJECT macro.
+ Returns the staticMetaObject, or 0.
+ """
+ # No templates for now.
+ if typeName.find('<') >= 0:
+ return 0
+
+ staticMetaObjectName = typeName + "::staticMetaObject"
+ result = self.findSymbol(staticMetaObjectName)
+
+ # We need to distinguish Q_OBJECT from Q_GADGET:
+ # a Q_OBJECT SMO has a non-null superdata (unless it's QObject itself),
+ # a Q_GADGET SMO has a null superdata (hopefully)
+ if result and typeName != self.qtNamespace() + "QObject":
+ if not self.extractPointer(result):
+ # This looks like a Q_GADGET
+ result = 0
+
+ return result
+
+ def extractStaticMetaObject(self, typeobj):
+ """
+ Checks recursively whether a type derives from QObject.
+ """
+ typeName = str(typeobj)
+ result = self.knownStaticMetaObjects.get(typeName, None)
+ if result is not None: # Is 0 or the static metaobject.
+ return result
+
+ result = self.extractStaticMetaObjectHelper(typeName)
+ if not result:
+ base = self.directBaseClass(typeobj, 0)
+ if base:
+ result = self.extractStaticMetaObject(base)
+
+ self.knownStaticMetaObjects[typeName] = result
+ return result
+
def staticQObjectPropertyNames(self, metaobject):
properties = []
dd = metaobject["d"]
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index 8526edc2c7..c3cd3dea29 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -657,8 +657,20 @@ class Dumper(DumperBase):
return str(value)
def directBaseClass(self, typeobj, index = 0):
- # FIXME: Check it's really a base.
- return typeobj.fields()[index]
+ for f in typeobj.fields():
+ if f.is_base_class:
+ if index == 0:
+ return f.type
+ index -= 1;
+ return None
+
+ def directBaseObject(self, value, index = 0):
+ for f in value.type.fields():
+ if f.is_base_class:
+ if index == 0:
+ return value.cast(f.type)
+ index -= 1;
+ return None
def checkPointer(self, p, align = 1):
if not self.isNull(p):
@@ -861,47 +873,6 @@ class Dumper(DumperBase):
except:
return 0
- def extractStaticMetaObjectHelper(self, typeName):
- """
- Checks whether type has a Q_OBJECT macro.
- Returns the staticMetaObject, or 0.
- """
- # No templates for now.
- if typeName.find('<') >= 0:
- return 0
-
- staticMetaObjectName = typeName + "::staticMetaObject"
- result = self.findSymbol(staticMetaObjectName)
-
- # We need to distinguish Q_OBJECT from Q_GADGET:
- # a Q_OBJECT SMO has a non-null superdata (unless it's QObject itself),
- # a Q_GADGET SMO has a null superdata (hopefully)
- if result and typeName != self.qtNamespace() + "QObject":
- if not self.extractPointer(result):
- # This looks like a Q_GADGET
- result = 0
-
- return result
-
- def extractStaticMetaObject(self, typeobj):
- """
- Checks recursively whether a type derives from QObject.
- """
- typeName = str(typeobj)
- result = self.knownStaticMetaObjects.get(typeName, None)
- if result is not None: # Is 0 or the static metaobject.
- return result
-
- result = self.extractStaticMetaObjectHelper(typeName)
- if not result:
- fields = typeobj.fields()
- if len(fields) and fields[0].is_base_class:
- result = self.extractStaticMetaObject(fields[0].type)
-
- self.knownStaticMetaObjects[typeName] = result
- return result
-
-
def put(self, value):
self.output.append(value)
@@ -1146,6 +1117,9 @@ class Dumper(DumperBase):
self.putType(typeName)
if value.is_optimized_out:
self.putValue("<optimized out>")
+ elif type.sizeof == 1:
+ # Force unadorned value transport for char and Co.
+ self.putValue(int(value) & 0xff)
else:
self.putValue(value)
self.putNumChild(0)
@@ -1488,64 +1462,64 @@ class Dumper(DumperBase):
result += ']'
return result
- def threadname(self, maximalStackDepth, objectPrivateType):
- e = gdb.selected_frame()
- out = ""
- ns = self.qtNamespace()
- while True:
- maximalStackDepth -= 1
- if maximalStackDepth < 0:
- break
- e = e.older()
- if e == None or e.name() == None:
- break
- if e.name() == ns + "QThreadPrivate::start" \
- or e.name() == "_ZN14QThreadPrivate5startEPv@4":
- try:
- thrptr = e.read_var("thr").dereference()
- d_ptr = thrptr["d_ptr"]["d"].cast(objectPrivateType).dereference()
- try:
- objectName = d_ptr["objectName"]
- except: # Qt 5
- p = d_ptr["extraData"]
- if not self.isNull(p):
- objectName = p.dereference()["objectName"]
- if not objectName is None:
- data, size, alloc = self.stringData(objectName)
- if size > 0:
- s = self.readMemory(data, 2 * size)
-
- thread = gdb.selected_thread()
- inner = '{valueencoded="';
- inner += str(Hex4EncodedLittleEndianWithoutQuotes)+'",id="'
- inner += str(thread.num) + '",value="'
- inner += s
- #inner += self.encodeString(objectName)
- inner += '"},'
-
- out += inner
- except:
- pass
- return out
+ #def threadname(self, maximalStackDepth, objectPrivateType):
+ # e = gdb.selected_frame()
+ # out = ""
+ # ns = self.qtNamespace()
+ # while True:
+ # maximalStackDepth -= 1
+ # if maximalStackDepth < 0:
+ # break
+ # e = e.older()
+ # if e == None or e.name() == None:
+ # break
+ # if e.name() == ns + "QThreadPrivate::start" \
+ # or e.name() == "_ZN14QThreadPrivate5startEPv@4":
+ # try:
+ # thrptr = e.read_var("thr").dereference()
+ # d_ptr = thrptr["d_ptr"]["d"].cast(objectPrivateType).dereference()
+ # try:
+ # objectName = d_ptr["objectName"]
+ # except: # Qt 5
+ # p = d_ptr["extraData"]
+ # if not self.isNull(p):
+ # objectName = p.dereference()["objectName"]
+ # if not objectName is None:
+ # data, size, alloc = self.stringData(objectName)
+ # if size > 0:
+ # s = self.readMemory(data, 2 * size)
+ #
+ # thread = gdb.selected_thread()
+ # inner = '{valueencoded="';
+ # inner += str(Hex4EncodedLittleEndianWithoutQuotes)+'",id="'
+ # inner += str(thread.num) + '",value="'
+ # inner += s
+ # #inner += self.encodeString(objectName)
+ # inner += '"},'
+ #
+ # out += inner
+ # except:
+ # pass
+ # return out
def threadnames(self, maximalStackDepth):
# FIXME: This needs a proper implementation for MinGW, and only there.
- # Linux, Mac and QNX mirror the objectName()to the underlying threads,
+ # Linux, Mac and QNX mirror the objectName() to the underlying threads,
# so we get the names already as part of the -thread-info output.
return '[]'
- out = '['
- oldthread = gdb.selected_thread()
- if oldthread:
- try:
- objectPrivateType = gdb.lookup_type(ns + "QObjectPrivate").pointer()
- inferior = self.selectedInferior()
- for thread in inferior.threads():
- thread.switch()
- out += self.threadname(maximalStackDepth, objectPrivateType)
- except:
- pass
- oldthread.switch()
- return out + ']'
+ #out = '['
+ #oldthread = gdb.selected_thread()
+ #if oldthread:
+ # try:
+ # objectPrivateType = gdb.lookup_type(ns + "QObjectPrivate").pointer()
+ # inferior = self.selectedInferior()
+ # for thread in inferior.threads():
+ # thread.switch()
+ # out += self.threadname(maximalStackDepth, objectPrivateType)
+ # except:
+ # pass
+ # oldthread.switch()
+ #return out + ']'
def importPlainDumper(self, printer):
@@ -1819,7 +1793,7 @@ registerCommand("threadnames", threadnames)
def qmlb(args):
# executeCommand(command, to_string=True).split("\n")
- warm("RUNNING: break -f QScript::FunctionWrapper::proxyCall")
+ warn("RUNNING: break -f QScript::FunctionWrapper::proxyCall")
output = gdb.execute("rbreak -f QScript::FunctionWrapper::proxyCall", to_string=True).split("\n")
warn("OUTPUT: %s " % output)
bp = output[0]
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py
index 7ae50e9a37..6a6723d132 100644
--- a/share/qtcreator/debugger/lldbbridge.py
+++ b/share/qtcreator/debugger/lldbbridge.py
@@ -408,7 +408,8 @@ class Dumper(DumperBase):
return p.GetValueAsUnsigned() == 0
def directBaseClass(self, typeobj, index = 0):
- return typeobj.GetDirectBaseClassAtIndex(index)
+ result = typeobj.GetDirectBaseClassAtIndex(index).GetType()
+ return result if result.IsValid() else None
def templateArgument(self, typeobj, index):
type = typeobj.GetTemplateArgumentType(index)
@@ -428,55 +429,35 @@ class Dumper(DumperBase):
return typeobj.GetTypeClass() in (lldb.eTypeClassStruct, lldb.eTypeClassClass)
def qtVersionAndNamespace(self):
- self.cachedQtNamespace = ""
- self.cachedQtVersion = 0x0
-
- coreExpression = re.compile(r"(lib)?Qt5?Core")
- for n in range(0, self.target.GetNumModules()):
- module = self.target.GetModuleAtIndex(n)
- fileName = module.GetFileSpec().GetFilename()
- if coreExpression.match(fileName):
- # Extract version.
- reverseVersion = module.GetVersion()
- if len(reverseVersion):
- # Mac, Clang?
- reverseVersion.reverse()
- shift = 0
- for v in reverseVersion:
- self.cachedQtVersion += v << shift
- shift += 8
- else:
- # Linux, gcc?
- if fileName.endswith(".5"):
- self.cachedQtVersion = 0x50000
- elif fileName.endswith(".4"):
- self.cachedQtVersion = 0x40800
- else:
- warn("CANNOT GUESS QT VERSION")
-
-
- # Look for some Qt symbol to extract namespace.
- for symbol in module.symbols:
- name = symbol.GetName()
- pos = name.find("QString")
- if pos >= 0:
- name = name[:pos]
- if name.endswith("::"):
- self.cachedQtNamespace = re.sub('^.*[^\w]([\w]+)::$', '\\1', name) + '::'
- break
- break
+ for func in self.target.FindFunctions('qVersion'):
+ name = func.GetSymbol().GetName()
+ if name.count(':') > 2:
+ continue
+
+ version = str(self.parseAndEvaluate('((const char*())%s)()' % name))
+ version.replace("'", '"') # Both seem possible
+ version = version[version.find('"')+1:version.rfind('"')]
+
+ if version.count('.') != 2:
+ continue
+
+ qtNamespace = name[:name.find('qVersion')]
+ self.qtNamespace = lambda: qtNamespace
+
+ (major, minor, patch) = version.split('.')
+ qtVersion = 0x10000 * int(major) + 0x100 * int(minor) + int(patch)
+ self.qtVersion = lambda: qtVersion
+
+ return (qtNamespace, qtVersion)
- # Memoize good results.
- self.qtNamespace = lambda: self.cachedQtNamespace
- self.qtVersion = lambda: self.cachedQtVersion
+ return ('', 0x50200)
def qtNamespace(self):
- self.qtVersionAndNamespace()
- return self.cachedQtNamespace
+ return self.qtVersionAndNamespace()[0]
def qtVersion(self):
self.qtVersionAndNamespace()
- return self.cachedQtVersion
+ return self.qtVersionAndNamespace()[1]
def intSize(self):
return 4
@@ -883,31 +864,8 @@ class Dumper(DumperBase):
buf[i] = data.GetUnsignedInt8(error, i)
return Blob(bytes(buf))
- def extractStaticMetaObjectHelper(self, typeobj):
- if typeobj.GetTypeClass() in (lldb.eTypeClassStruct, lldb.eTypeClassClass):
- needle = typeobj.GetUnqualifiedType().GetName() + "::staticMetaObject"
- options = lldb.SBExpressionOptions()
- result = self.target.EvaluateExpression(needle, options)
- # Surprising results include:
- # (lldb) script print lldb.target.FindFirstGlobalVariable(
- # '::QSharedDataPointer<QDirPrivate>::staticMetaObject')
- # (const QMetaObject) QAbstractAnimation::staticMetaObject = { d = { ... } }
- #if result.GetName() != needle:
- if result is None or not result.IsValid():
- result = 0
- else:
- result = 0
- self.knownStaticMetaObjects[typeobj.GetName()] = result
- return result
-
- def extractStaticMetaObject(self, typeobj):
- if not self.isGoodLldb:
- return 0
- result = self.extractStaticMetaObjectHelper(typeobj)
- if result:
- return result
- base = typeobj.GetDirectBaseClassAtIndex(0).GetType()
- return self.extractStaticMetaObjectHelper(base)
+ def findSymbol(self, symbolName):
+ return self.target.FindFirstGlobalVariable(symbolName)
def stripNamespaceFromType(self, typeName):
#type = stripClassTag(typeName)
@@ -1281,8 +1239,6 @@ class Dumper(DumperBase):
self.reportStackTop()
self.reportThreads()
self.reportLocation()
- self.reportVariables()
- self.reportRegisters()
self.reportChangedBreakpoints()
elif type == lldb.SBProcess.eBroadcastBitInterrupt:
pass
@@ -1556,7 +1512,6 @@ class Dumper(DumperBase):
state = self.process.GetState()
if state == lldb.eStateStopped:
self.reportStackPosition()
- self.reportVariables()
def selectThread(self, args):
self.process.SetSelectedThreadByID(args['id'])
@@ -1565,6 +1520,12 @@ class Dumper(DumperBase):
def requestModuleSymbols(self, frame):
self.handleCommand("target module list " + frame)
+ def createFullBacktrace(self, _ = None):
+ command = "thread backtrace all"
+ result = lldb.SBCommandReturnObject()
+ self.debugger.GetCommandInterpreter().HandleCommand(command, result)
+ self.report('full-backtrace="%s"' % self.hexencode(result.GetOutput()))
+
def executeDebuggerCommand(self, args):
result = lldb.SBCommandReturnObject()
command = args['command']
@@ -1755,6 +1716,7 @@ def testit():
db.report("@NS@%s@" % ns)
#db.report("ENV=%s" % os.environ.items())
#db.report("DUMPER=%s" % db.qqDumpers)
+ lldb.SBDebugger.Destroy(db.debugger)
if __name__ == "__main__":
if len(sys.argv) > 2:
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py
index 9961a8d1e1..e5f495d07f 100644
--- a/share/qtcreator/debugger/qttypes.py
+++ b/share/qtcreator/debugger/qttypes.py
@@ -1776,7 +1776,7 @@ def qdump__QStringRef(d, value):
def qdump__QStringList(d, value):
- listType = d.directBaseClass(value.type).type
+ listType = d.directBaseClass(value.type)
qdump__QList(d, value.cast(listType))
d.putBetterType(value.type)
@@ -2230,6 +2230,40 @@ def qdump__QxXmlAttributes(d, value):
#######################################################################
#
+# V4
+#
+#######################################################################
+
+def qdump__QV4__String(d, value):
+ d.putStringValue(value["identifier"]["string"])
+ d.putNumChild(0)
+
+def qdump__QV4__TypedValue(d, value):
+ qdump__QV4__Value(d, d.directBaseObject(value))
+ d.putBetterType(value.type)
+
+def qdump__QV4__Value(d, value):
+ try:
+ if d.is64bit():
+ vtable = value["m"]["internalClass"]["vtable"]
+ if toInteger(vtable["isString"]):
+ d.putBetterType(d.qtNamespace() + "QV4::Value (String)")
+ d.putStringValue(value["s"]["identifier"]["string"])
+ d.putNumChild(0)
+ return
+ except:
+ pass
+
+ # Fall back for cases that we do not handle specifically.
+ d.putEmptyValue()
+ d.putNumChild(1)
+ if d.isExpanded():
+ with Children(d):
+ d.putFields(value)
+
+
+#######################################################################
+#
# Webkit
#
#######################################################################
diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp
index 137e3af21d..1e56b9b2d6 100644
--- a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp
+++ b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp
@@ -28,6 +28,7 @@
****************************************************************************/
#include "propertyvaluecontainer.h"
+#include <enumeration.h>
#include <QtDebug>
@@ -44,6 +45,8 @@ PropertyValueContainer::PropertyValueContainer(qint32 instanceId, const Property
m_value(value),
m_dynamicTypeName(dynamicTypeName)
{
+ if (m_value.canConvert<Enumeration>())
+ m_value = QVariant::fromValue(value.value<Enumeration>().nameToString());
}
qint32 PropertyValueContainer::instanceId() const
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
index f40414700f..1e13e0688b 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
@@ -1044,6 +1044,39 @@ static QQmlType *getQmlType(const QString &typeName, int majorNumber, int minorN
return QQmlMetaType::qmlType(typeName.toUtf8(), majorNumber, minorNumber);
}
+static bool isWindowMetaObject(const QMetaObject *metaObject)
+{
+ if (metaObject) {
+ if (metaObject->className() == QByteArrayLiteral("QWindow"))
+ return true;
+
+ return isWindowMetaObject(metaObject->superClass());
+ }
+
+ return false;
+}
+
+static QObject *createDummyWindow(QQmlContext *context, const QUrl &sourceUrl)
+{
+ QQmlComponent component(context->engine());
+ QByteArray dummyWindow;
+ dummyWindow.append("import QtQuick 2.0\n");
+ dummyWindow.append("Item {\n");
+ dummyWindow.append("property string title\n");
+ dummyWindow.append("}\n");
+
+ component.setData(dummyWindow, sourceUrl);
+
+ return component.create();
+}
+
+static bool isWindow(QObject *object) {
+ if (object)
+ return isWindowMetaObject(object->metaObject());
+
+ return false;
+}
+
QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorNumber, int minorNumber, QQmlContext *context)
{
ComponentCompleteDisabler disableComponentComplete;
@@ -1066,6 +1099,12 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
object = type->create();
}
}
+
+ if (isWindow(object)) {
+ delete object;
+ object = createDummyWindow(context, type->sourceUrl());
+ }
+
} else {
qWarning() << "QuickDesigner: Cannot create an object of type"
<< QString("%1 %2,%3").arg(typeName).arg(majorNumber).arg(minorNumber)
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri
index 4ce25e1e59..2d43e66ccf 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri
@@ -8,7 +8,7 @@ QT += core gui widgets qml quick network
QT += v8
}
-QT += core-private qml-private quick-private gui-private script-private
+QT += core-private qml-private quick-private gui-private
!isEmpty(QT.v8.name) {
QT += v8-private
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml
index 5ef6c25a53..6a7f731a74 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml
@@ -110,21 +110,21 @@ Row {
iconSource: blueHighlight ? "images/alignmentleft-h-icon.png" : "images/alignmentleft-icon.png"
onClicked: {
if (checked)
- backendValue.value = "AlignLeft"
+ backendValue.setEnumeration("Text", "AlignLeft")
}
}
ButtonRowButton {
iconSource: blueHighlight ? "images/alignmentcenterh-h-icon.png" : "images/alignmentcenterh-icon.png"
onClicked: {
if (checked)
- backendValue.value = "AlignHCenter"
+ backendValue.setEnumeration("Text", "AlignHCenter")
}
}
ButtonRowButton {
iconSource: blueHighlight ? "images/alignmentright-h-icon.png" : "images/alignmentright-icon.png"
onClicked: {
if (checked)
- backendValue.value = "AlignRight"
+ backendValue.setEnumeration("Text", "AlignRight")
}
}
}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml
index 27578fe566..b01bff4104 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml
@@ -111,21 +111,21 @@ Row {
iconSource: blueHighlight ? "images/alignmenttop-h-icon.png" : "images/alignmenttop-icon.png"
onClicked: {
if (checked)
- backendValue.value = "AlignTop"
+ backendValue.setEnumeration("Text", "AlignTop")
}
}
ButtonRowButton {
iconSource: blueHighlight ? "images/alignmentmiddle-h-icon.png" : "images/alignmentmiddle-icon.png"
onClicked: {
if (checked)
- backendValue.value = "AlignVCenter"
+ backendValue.setEnumeration("Text", "AlignVCenter")
}
}
ButtonRowButton {
iconSource: blueHighlight ? "images/alignmentbottom-h-icon.png" : "images/alignmentbottom-icon.png"
onClicked: {
if (checked)
- backendValue.value = "AlignBottom"
+ backendValue.setEnumeration("Text", "AlignBottom")
}
}
}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml
index 9dababf709..6a8d697133 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml
@@ -43,7 +43,10 @@ Controls.ComboBox {
id: colorLogic
backendValue: comboBox.backendValue
onValueFromBackendChanged: {
- comboBox.currentIndex = comboBox.find(comboBox.backendValue.enumeration);
+ var enumString = comboBox.backendValue.enumeration;
+ if (enumString === "")
+ enumString = comboBox.backendValue.value
+ comboBox.currentIndex = comboBox.find(enumString);
}
}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml
index 5a427b70d8..6e078c6a83 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml
@@ -51,7 +51,10 @@ Item {
id: colorLogic
backendValue: originControl.backendValue
onValueFromBackendChanged: {
- grid.select(valueFromBackend);
+ var enumString = originControl.backendValue.enumeration;
+ if (enumString === "")
+ enumString = originControl.backendValue.value
+ grid.select(enumString);
}
}
@@ -63,7 +66,7 @@ Item {
id: grid
function setValue(myValue) {
- originControl.backendValue.value = myValue
+ originControl.backendValue.setEnumeration("Item", myValue)
}
function select(myValue) {
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir
index 92e2fc0f09..7f22ccec86 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir
@@ -37,3 +37,4 @@ OriginControl 2.0 OriginControl.qml
CustomComboBoxStyle 2.0 CustomComboBoxStyle.qml
CustomSpinBoxStyle 2.0 CustomSpinBoxStyle.qml
CustomCheckBoxStyle 2.0 CustomCheckBoxStyle.qml
+ColorLogic 2.0 ColorLogic.qml
diff --git a/share/qtcreator/translations/translations.qbs b/share/qtcreator/translations/translations.qbs
index c6cd066083..867ff20da4 100644
--- a/share/qtcreator/translations/translations.qbs
+++ b/share/qtcreator/translations/translations.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
Product {
name: "Translations"
diff --git a/share/qtcreator/welcomescreen/examples_fallback.xml b/share/qtcreator/welcomescreen/examples_fallback.xml
deleted file mode 100644
index 8c23b56892..0000000000
--- a/share/qtcreator/welcomescreen/examples_fallback.xml
+++ /dev/null
@@ -1,860 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<instructionals module="Qt">
- <demos>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-samegame-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-declarative-samegame.html" projectPath="./declarative/samegame/samegame.qmlproject" name="SameGame">
- <description><![CDATA[This demo shows how to write a 'Same Game' game in QML, using Javascript for all the game logic.]]></description>
- <tags>demo,declarative,samegame,qml,qt quick</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-flickr-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-declarative-flickr.html" projectPath="./declarative/flickr/flickr.qmlproject" name="Flickr Client">
- <description><![CDATA[This demo shows how to write a mobile Flickr browser application in QML.]]></description>
- <tags>demo,declarative,flickr,qml,qt quick</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/affine-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-affine.html" projectPath="./affine/affine.pro" name="Affine Transformations">
- <description><![CDATA[In this demo we show Qt's ability to perform affine transformations on painting operations.]]></description>
- <tags>demo,affine</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/composition-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-composition.html" projectPath="./composition/composition.pro" name="Composition Modes">
- <description><![CDATA[This demo shows some of the more advanced composition modes supported by Qt.]]></description>
- <tags>demo,composition</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/gradients-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-gradients.html" projectPath="./gradients/gradients.pro" name="Gradients">
- <description><![CDATA[In this demo we show the various types of gradients that can be used in Qt.]]></description>
- <tags>demo,gradients</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/pathstroke-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-pathstroke.html" projectPath="./pathstroke/pathstroke.pro" name="Path Stroking">
- <description><![CDATA[In this demo we show some of the various types of pens that can be used in Qt.]]></description>
- <tags>demo,pathstroke</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/textedit-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-textedit.html" projectPath="./textedit/textedit.pro" name="Text Edit">
- <description><![CDATA[The Text Edit demonstration shows Qt's rich text editing facilities in action, providing an example document for you to experiment with.]]></description>
- <tags>demo,textedit</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/chip-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-chip.html" projectPath="./chip/chip.pro" name="40000 Chips">
- <description><![CDATA[This demo shows how to visualize a huge scene with 40000 chip items using Graphics View. It also shows Graphics View's powerful navigation and interaction features, allowing you to zoom and rotate each of four views independently, and you can select and move items around the scene.]]></description>
- <tags>demo,chip</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/embeddeddialogs-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-embeddeddialogs.html" projectPath="./embeddeddialogs/embeddeddialogs.pro" name="Embedded Dialogs">
- <description><![CDATA[This example shows how to embed standard dialogs into Graphics View. It also shows how you can customize the proxy class and add window shadows.]]></description>
- <tags>demo,embeddeddialogs</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/interview-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-interview.html" projectPath="./interview/interview.pro" name="Interview">
- <description><![CDATA[The Interview demonstration explores the flexibility and scalability of the model/view framework by presenting an infinitely deep data structure using a model and three different types of view.]]></description>
- <tags>demo,interview</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-rssnews-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-declarative-rssnews.html" projectPath="./declarative/rssnews/rssnews.qmlproject" name="Rss Client">
- <description><![CDATA[This demo shows how to write a RSS news reader in QML.]]></description>
- <tags>demo,declarative,rssnews,qml,qt quick</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-twitter-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-declarative-twitter.html" projectPath="./declarative/twitter/twitter.qmlproject" name="Twitter Client">
- <description><![CDATA[This demo shows how to write a mobile Twitter search client in QML. Use it to see what people think about Qt Quick!]]></description>
- <tags>demo,declarative,twitter,qml,qt quick</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/browser-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-browser.html" projectPath="./browser/browser.pro" name="Browser">
- <description><![CDATA[The Web Browser demonstration shows Qt's WebKit module in action, providing a little Web browser application.]]></description>
- <tags>demo,browser</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/qmediaplayer-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-qmediaplayer.html" projectPath="./qmediaplayer/qmediaplayer.pro" name="Media Player">
- <description><![CDATA[The Media Player demonstration shows how <tt>Phonon</tt> can be used in Qt applications to handle audio and video playback.]]></description>
- <tags>demo,qmediaplayer,phonon</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/boxes-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-boxes.html" projectPath="./boxes/boxes.pro" name="Boxes">
- <description><![CDATA[This demo shows Qt's ability to combine advanced OpenGL rendering with the the <tt>Graphics View Framework</tt>.]]></description>
- <tags>demo,boxes,graphics view framework</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/sub-attaq-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-sub-attaq.html" projectPath="./sub-attaq/sub-attaq.pro" name="Sub-attaq">
- <description><![CDATA[This demo shows Qt's ability to combine <tt>the animation framework</tt> and <tt>the state machine framework</tt> to create a game.]]></description>
- <tags>demo,sub-attaq,the animation framework,the state machine framework</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/spectrum-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-spectrum.html" projectPath="./spectrum/spectrum.pro" name="Spectrum Analyzer">
- <description><![CDATA[The Spectrum Analyzer demo shows how the <tt>QtMultimedia Module</tt> can be used in Qt applications to capture and then play back an audio stream.]]></description>
- <tags>demo,spectrum,qtmultimedia module</tags>
- </demo>
- <demo imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-declarative-minehunt.html" projectPath="./declarative/minehunt/minehunt.pro" name="Minehunt">
- <description><![CDATA[This demo shows how to create a simple Minehunt game, using QML for the UI and C++ for the game logic.]]></description>
- <tags>demo,declarative,minehunt</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/deform-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-deform.html" projectPath="./deform/deform.pro" name="Vector Deformation">
- <description><![CDATA[This demo shows how to use advanced vector techniques to draw text using a <tt>QPainterPath</tt>.]]></description>
- <tags>demo,deform,qpainterpath</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/books-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-books.html" projectPath="./books/books.pro" name="Books">
- <description><![CDATA[The Books demonstration shows how Qt's SQL classes can be used with the model/view framework to create rich user interfaces for information stored in a database.]]></description>
- <tags>demo,books</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/mainwindow-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-mainwindow.html" projectPath="./mainwindow/mainwindow.pro" name="Main Window">
- <description><![CDATA[The Main Window demonstration shows Qt's extensive support for tool bars, dock windows, menus, and other standard application features.]]></description>
- <tags>demo,mainwindow</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/spreadsheet-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-spreadsheet.html" projectPath="./spreadsheet/spreadsheet.pro" name="Spreadsheet">
- <description><![CDATA[The Spreadsheet demonstration shows how a table view can be used to create a simple spreadsheet application. Custom delegates are used to render different types of data in distinctive colors.]]></description>
- <tags>demo,spreadsheet</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/sqlbrowser-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-sqlbrowser.html" projectPath="./sqlbrowser/sqlbrowser.pro" name="SQL Browser">
- <description><![CDATA[The SQL Browser demonstration shows how a data browser can be used to visualize the results of SQL statements on a live database.]]></description>
- <tags>demo,sqlbrowser</tags>
- </demo>
- <demo imageUrl="qthelp://com.trolltech.qt/qdoc/images/arthurplugin-demo.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/demos-arthurplugin.html" projectPath="./arthurplugin/arthurplugin.pro" name="Arthur Plugin">
- <description><![CDATA[In this demo we demonstrate the abilities of Qt's painting system in combination with <i>Qt Designer</i>'s custom widget plugin facilities.]]></description>
- <tags>demo,arthurplugin</tags>
- </demo>
- </demos>
- <examples>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/animatedtiles-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/animation-animatedtiles.html" projectPath="animation/animatedtiles/animatedtiles.pro" name="Animated Tiles">
- <description><![CDATA[The Animated Tiles example animates items in a graphics scene.]]></description>
- <tags>example,animatedtiles,animation</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/appchooser-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/animation-appchooser.html" projectPath="animation/appchooser/appchooser.pro" name="Appchooser">
- <description><![CDATA[The Application Chooser example shows how to use the Qt state machine and the animation framework to select between applications.]]></description>
- <tags>example,appchooser,animation</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/easing-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/animation-easing.html" projectPath="animation/easing/easing.pro" name="Easing Curves">
- <description><![CDATA[The Easing Curves example shows how to use easing curves to control the speed of an animation.]]></description>
- <tags>example,easing,animation</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/moveblocks-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/animation-moveblocks.html" projectPath="animation/moveblocks/moveblocks.pro" name="Moving Blocks">
- <description><![CDATA[The Move Blocks example shows how to animate items in a <tt>QGraphicsScene</tt> using a <tt>QStateMachine</tt> with a custom transition.]]></description>
- <tags>example,moveblocks,animation,qgraphicsscene,qstatemachine</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/states-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/animation-states.html" projectPath="animation/states/states.pro" name="States">
- <description><![CDATA[The States example shows how to use the Qt state machine to play animations.]]></description>
- <tags>example,states,animation</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/stickman-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/animation-stickman.html" projectPath="animation/stickman/stickman.pro" name="Stickman">
- <description><![CDATA[The Stickman example shows how to animate transitions in a state machine to implement key frame animations.]]></description>
- <tags>example,stickman,animation</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/qtconcurrent-map.html" projectPath="qtconcurrent/map/map.pro" name="Map">
- <description><![CDATA[The <tt>QtConcurrent</tt> Map example shows how to use the synchronous (blocking) <tt>QtConcurrent</tt> API to scale a collection of images.]]></description>
- <tags>example,map,qtconcurrent,qtconcurrent,qtconcurrent</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/qtconcurrent-progressdialog.html" projectPath="qtconcurrent/progressdialog/progressdialog.pro" name="Progress Dialog">
- <description><![CDATA[The <tt>QtConcurrent</tt> Progress Dialog example shows how to use the <tt>QFutureWatcher</tt> class to monitor the progress of a long-running operation.]]></description>
- <tags>example,progressdialog,qtconcurrent,qtconcurrent,qfuturewatcher</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/qtconcurrent-runfunction.html" projectPath="qtconcurrent/runfunction/runfunction.pro" name="Run Function">
- <description><![CDATA[The <tt>QtConcurrent</tt> Run Function example shows how to apply concurrency to a standard function, using <tt>QFuture</tt> instances to retrieve return values at a later time.]]></description>
- <tags>example,runfunction,qtconcurrent,qtconcurrent,qfuture</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/qtconcurrent-wordcount.html" projectPath="qtconcurrent/wordcount/wordcount.pro" name="Word Count">
- <description><![CDATA[The <tt>QtConcurrent</tt> Word Count example demonstrates the use of the map-reduce algorithm when applied to the problem of counting words in a collection of files.]]></description>
- <tags>example,wordcount,qtconcurrent,qtconcurrent</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-dynamicscene-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-toys-dynamicscene.html" projectPath="declarative/toys/dynamicscene/dynamicscene.qmlproject" name="Dynamic Scene">
- <description><![CDATA[This example presents an interactive drag-and-drop scene. It demonstrates how to use QML's <tt>Dynamic Object Creation</tt> support to dynamically create and destroy objects.]]></description>
- <tags>example,dynamicscene,declarative,toys,qml,qt quick,dynamic object creation</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-tic-tac-toe-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-toys-tic-tac-toe.html" projectPath="declarative/toys/tic-tac-toe/tic-tac-toe.qmlproject" name="Tic Tac Toe">
- <description><![CDATA[This example presents a simple implementation of Tic Tac Toe.]]></description>
- <tags>example,tic-tac-toe,declarative,toys,qml,qt quick</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-clocks-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-toys-clocks.html" projectPath="declarative/toys/clocks/clocks.qmlproject" name="Clocks">
- <description><![CDATA[This example displays a set of clocks with different times for different cities. Each clock is created by combining <tt>Image</tt> elements with <tt>Rotation</tt> transforms and <tt>SpringAnimation</tt> behaviors.]]></description>
- <tags>example,clocks,declarative,toys,qml,qt quick,image,rotation,springanimation</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-corkboards-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-toys-corkboards.html" projectPath="declarative/toys/corkboards/corkboards.qmlproject" name="Corkboards">
- <description><![CDATA[This example presents a flickable set of interactive corkboards. It is created through a combination of elements like <tt>ListModel</tt>, <tt>Repeater</tt> and <tt>TextEdit</tt> together with rotation and scaling transforms, animation and mouse interaction.]]></description>
- <tags>example,corkboards,declarative,toys,qml,qt quick,listmodel,repeater,textedit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-tvtennis-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-toys-tvtennis.html" projectPath="declarative/toys/tvtennis/tvtennis.qmlproject" name="TV Tennis">
- <description><![CDATA[This example shows how to use animation components such as <tt>SpringAnimation</tt>, <tt>SequentialAnimation</tt> and <tt>PropertyAction</tt> to create a game of TV tennis.]]></description>
- <tags>example,tvtennis,declarative,toys,qml,qt quick,springanimation,sequentialanimation,propertyaction</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/calculatorbuilder-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/designer-calculatorbuilder.html" projectPath="designer/calculatorbuilder/calculatorbuilder.pro" name="Calculator Builder">
- <description><![CDATA[The Calculator Builder example shows how to create a user interface from a <i>Qt Designer</i> form at run-time, using the <tt>QUiLoader</tt> class.]]></description>
- <tags>example,calculatorbuilder,designer,quiloader</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/calculatorform-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/designer-calculatorform.html" projectPath="designer/calculatorform/calculatorform.pro" name="Calculator Form">
- <description><![CDATA[The Calculator Form Example shows how to use a form created with <i>Qt Designer</i> in an application by using the user interface information from a <tt>QWidget</tt> subclass. We use <tt>uic's auto-connection</tt> feature to automatically connect signals from widgets on the form to slots in our code.]]></description>
- <tags>example,calculatorform,designer,qwidget,uic's auto-connection</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/containerextension-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/designer-containerextension.html" projectPath="designer/containerextension/containerextension.pro" name="Container Extension">
- <description><![CDATA[The Container Extension example shows how to create a custom multi-page plugin for Qt Designer using the <tt>QDesignerContainerExtension</tt> class.]]></description>
- <tags>example,containerextension,designer,qdesignercontainerextension</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/customwidgetplugin-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/designer-customwidgetplugin.html" projectPath="designer/customwidgetplugin/customwidgetplugin.pro" name="Custom Widget Plugin">
- <description><![CDATA[The Custom Widget example shows how to create a custom widget plugin for <i>Qt Designer</i>.]]></description>
- <tags>example,customwidgetplugin,designer</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/designer-taskmenuextension.html" projectPath="designer/taskmenuextension/taskmenuextension.pro" name="Task Menu Extension">
- <description><![CDATA[The Task Menu Extension example shows how to create a custom widget plugin for <tt><i>Qt Designer</i></tt>, and how to to use the <tt>QDesignerTaskMenuExtension</tt> class to provide custom task menu entries associated with the plugin.]]></description>
- <tags>example,taskmenuextension,designer,&lt;i>qt designer&lt;/i>,qdesignertaskmenuextension</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/worldtimeclockbuilder-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/designer-worldtimeclockbuilder.html" projectPath="designer/worldtimeclockbuilder/worldtimeclockbuilder.pro" name="World Time Clock Builder">
- <description><![CDATA[The World Time Clock Builder example shows how forms created with Qt Designer that contain custom widgets can be dynamically generated at run-time.]]></description>
- <tags>example,worldtimeclockbuilder,designer</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/worldtimeclockplugin-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/designer-worldtimeclockplugin.html" projectPath="designer/worldtimeclockplugin/worldtimeclockplugin.pro" name="World Time Clock Plugin">
- <description><![CDATA[The World Time Clock Plugin example shows how to create a custom widget plugin for <i>Qt Designer</i> that uses signals and slots.]]></description>
- <tags>example,worldtimeclockplugin,designer</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/systemtray-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/desktop-systray.html" projectPath="desktop/systray/systray.pro" name="System Tray">
- <description><![CDATA[The System Tray Icon example shows how to add an icon with a menu and popup messages to a desktop environment's system tray.]]></description>
- <tags>example,systray,desktop</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/screenshot-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/desktop-screenshot.html" projectPath="desktop/screenshot/screenshot.pro" name="Screenshot">
- <description><![CDATA[The Screenshot example shows how to take a screenshot of the desktop using <tt>QApplication</tt> and <tt>QDesktopWidget</tt>. It also shows how to use <tt>QTimer</tt> to provide a single-shot timer, and how to reimplement the <tt>QWidget::resizeEvent</tt>() event handler to make sure that an application resizes smoothly and without data loss.]]></description>
- <tags>example,screenshot,desktop,qapplication,qdesktopwidget,qtimer,qwidget::resizeevent</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/configdialog-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-configdialog.html" projectPath="dialogs/configdialog/configdialog.pro" name="Configuration Dialog">
- <description><![CDATA[The Config Dialog examples shows how a configuration dialog can be created by using an icon view with a stacked widget.]]></description>
- <tags>example,configdialog,dialogs</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/extension-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-extension.html" projectPath="dialogs/extension/extension.pro" name="Extension Dialog">
- <description><![CDATA[The Extension example shows how to add an extension to a <tt>QDialog</tt> using the <tt>QAbstractButton::toggled</tt>() signal and the <tt>QWidget::setVisible</tt>() slot.]]></description>
- <tags>example,extension,dialogs,qdialog,qabstractbutton::toggled,qwidget::setvisible</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/findfiles-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-findfiles.html" projectPath="dialogs/findfiles/findfiles.pro" name="Find Files Dialog">
- <description><![CDATA[The Find Files example shows how to use <tt>QProgressDialog</tt> to provide feedback on the progress of a slow operation. The example also shows how to use <tt>QFileDialog</tt> to facilitate browsing, how to use <tt>QTextStream</tt>'s streaming operators to read a file, and how to use <tt>QTableWidget</tt> to provide standard table display facilities for applications. In addition, files can be opened using the <tt>QDesktopServices</tt> class.]]></description>
- <tags>example,findfiles,dialogs,qprogressdialog,qfiledialog,qtextstream,qtablewidget,qdesktopservices</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/standarddialogs-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-standarddialogs.html" projectPath="dialogs/standarddialogs/standarddialogs.pro" name="Standard Dialogs">
- <description><![CDATA[The Standard Dialogs example shows the standard dialogs that are provided by Qt.]]></description>
- <tags>example,standarddialogs,dialogs</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/tabdialog-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-tabdialog.html" projectPath="dialogs/tabdialog/tabdialog.pro" name="Tab Dialog">
- <description><![CDATA[The Tab Dialog example shows how to construct a tab dialog using the <tt>QTabWidget</tt> class.]]></description>
- <tags>example,tabdialog,dialogs,qtabwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/trivialwizard-example-introduction.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-trivialwizard.html" projectPath="dialogs/trivialwizard/trivialwizard.pro" name="Trivial Wizard">
- <description><![CDATA[The Trivial Wizard example illustrates how to create a linear three-page registration wizard using three instances of <tt>QWizardPage</tt> and one instance of <tt>QWizard</tt>.]]></description>
- <tags>example,trivialwizard,dialogs,qwizardpage,qwizard</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/licensewizard-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-licensewizard.html" projectPath="dialogs/licensewizard/licensewizard.pro" name="License Wizard">
- <description><![CDATA[The License Wizard example shows how to implement complex wizards in Qt.]]></description>
- <tags>example,licensewizard,dialogs</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/classwizard.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/dialogs-classwizard.html" projectPath="dialogs/classwizard/classwizard.pro" name="Class Wizard">
- <description><![CDATA[The License Wizard example shows how to implement linear wizards using <tt>QWizard</tt>.]]></description>
- <tags>example,classwizard,dialogs,qwizard</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/draggableicons-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/draganddrop-draggableicons.html" projectPath="draganddrop/draggableicons/draggableicons.pro" name="Draggable Icons">
- <description><![CDATA[The Draggable Icons example shows how to drag and drop image data between widgets in the same application, and between different applications.]]></description>
- <tags>example,draggableicons,draganddrop</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/draggabletext-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/draganddrop-draggabletext.html" projectPath="draganddrop/draggabletext/draggabletext.pro" name="Draggable Text">
- <description><![CDATA[The Draggable Text example shows how to drag and drop textual data between widgets in the same application, and between different applications.]]></description>
- <tags>example,draggabletext,draganddrop</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/dropsite-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/draganddrop-dropsite.html" projectPath="draganddrop/dropsite/dropsite.pro" name="Drop Site">
- <description><![CDATA[The example shows how to distinguish the various MIME formats available in a drag and drop operation.]]></description>
- <tags>example,dropsite,draganddrop</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/fridgemagnets-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/draganddrop-fridgemagnets.html" projectPath="draganddrop/fridgemagnets/fridgemagnets.pro" name="Fridge Magnets">
- <description><![CDATA[The Fridge Magnets example shows how to supply more than one type of MIME-encoded data with a drag and drop operation.]]></description>
- <tags>example,fridgemagnets,draganddrop</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/draganddroppuzzle-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/draganddrop-puzzle.html" projectPath="draganddrop/puzzle/puzzle.pro" name="Puzzle">
- <description><![CDATA[The Drag and Drop Puzzle example demonstrates a way of using the drag and drop system with item view widgets.]]></description>
- <tags>example,puzzle,draganddrop</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/elasticnodes-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/graphicsview-elasticnodes.html" projectPath="graphicsview/elasticnodes/elasticnodes.pro" name="Elastic Nodes">
- <description><![CDATA[This <tt>GraphicsView</tt> example shows how to implement edges between nodes in a graph, with basic interaction. You can click to drag a node around, and zoom in and out using the mouse wheel or the keyboard. Hitting the space bar will randomize the nodes. The example is also resolution independent; as you zoom in, the graphics remain crisp.]]></description>
- <tags>example,elasticnodes,graphicsview,graphicsview</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/collidingmice-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/graphicsview-collidingmice.html" projectPath="graphicsview/collidingmice/collidingmice.pro" name="Colliding Mice">
- <description><![CDATA[The Colliding Mice example shows how to use the Graphics View framework to implement animated items and detect collision between items.]]></description>
- <tags>example,collidingmice,graphicsview</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/diagramscene.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/graphicsview-diagramscene.html" projectPath="graphicsview/diagramscene/diagramscene.pro" name="Diagram Scene">
- <description><![CDATA[This example shows use of Qt's graphics framework.]]></description>
- <tags>example,diagramscene,graphicsview</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/dragdroprobot-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/graphicsview-dragdroprobot.html" projectPath="graphicsview/dragdroprobot/dragdroprobot.pro" name="Drag and Drop Robot">
- <description><![CDATA[This <tt>GraphicsView</tt> example shows how to implement Drag and Drop in a <tt>QGraphicsItem</tt> subclass, as well as how to animate items using Qt's <tt>Animation Framework</tt>.]]></description>
- <tags>example,dragdroprobot,graphicsview,graphicsview,qgraphicsitem,animation framework</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/portedcanvas-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/graphicsview-portedcanvas.html" projectPath="graphicsview/portedcanvas/portedcanvas.pro" name="Ported Canvas">
- <description><![CDATA[This <tt>GraphicsView</tt> example is a port of the old <tt>QCanvas</tt> example from Qt 3.]]></description>
- <tags>example,portedcanvas,graphicsview,graphicsview,qcanvas</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/portedasteroids-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/graphicsview-portedasteroids.html" projectPath="graphicsview/portedasteroids/portedasteroids.pro" name="Ported Asteroids">
- <description><![CDATA[This <tt>GraphicsView</tt> example is a port of the Asteroids game, which was based on <tt>QCanvas</tt>.]]></description>
- <tags>example,portedasteroids,graphicsview,graphicsview,qcanvas</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/padnavigator-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/graphicsview-padnavigator.html" projectPath="graphicsview/padnavigator/padnavigator.pro" name="Pad Navigator Example">
- <description><![CDATA[The Pad Navigator Example shows how you can use Graphics View together with embedded widgets and Qt's <tt>State Machine Framework</tt> to create a simple but useful, dynamic, animated user interface.]]></description>
- <tags>example,padnavigator,graphicsview,state machine framework</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/sharedmemory-example_1.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/ipc-sharedmemory.html" projectPath="ipc/sharedmemory/sharedmemory.pro" name="Shared Memory">
- <description><![CDATA[The Shared Memory example shows how to use the <tt>QSharedMemory</tt> class to implement inter-process communication using shared memory. To build the example, run make. To run the example, start two instances of the executable. The main() function creates an <tt>application</tt> and an instance of our example's Dialog class. The dialog is displayed and then control is passed to the application in the standard way.]]></description>
- <tags>example,sharedmemory,ipc,qsharedmemory,application</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/localfortuneclient-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/ipc-localfortuneclient.html" projectPath="ipc/localfortuneclient/localfortuneclient.pro" name="Local Fortune Client">
- <description><![CDATA[The Local Fortune Client example shows how to create a client for a simple local service using <tt>QLocalSocket</tt>. It is intended to be run alongside the <tt>Local Fortune Server</tt> example.]]></description>
- <tags>example,localfortuneclient,ipc,qlocalsocket,local fortune server</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/localfortuneserver-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/ipc-localfortuneserver.html" projectPath="ipc/localfortuneserver/localfortuneserver.pro" name="Local Fortune Server">
- <description><![CDATA[The Local Fortune Server example shows how to create a server for a simple local service. It is intended to be run alongside the <tt>Local Fortune Client</tt> example]]></description>
- <tags>example,localfortuneserver,ipc,local fortune client</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-addressbook.html" projectPath="itemviews/addressbook/addressbook.pro" name="Address Book">
- <description><![CDATA[The address book example shows how to use proxy models to display different views onto data from a single model.]]></description>
- <tags>example,addressbook,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/basicsortfiltermodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-basicsortfiltermodel.html" projectPath="itemviews/basicsortfiltermodel/basicsortfiltermodel.pro" name="Basic Sort/Filter Model">
- <description><![CDATA[The Basic Sort/Filter Model example illustrates how to use <tt>QSortFilterProxyModel</tt> to perform basic sorting and filtering.]]></description>
- <tags>example,basicsortfiltermodel,itemviews,qsortfilterproxymodel</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/chart-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-chart.html" projectPath="itemviews/chart/chart.pro" name="Chart">
- <description><![CDATA[The Chart example shows how to create a custom view for the model/view framework.]]></description>
- <tags>example,chart,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/customsortfiltermodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-customsortfiltermodel.html" projectPath="itemviews/customsortfiltermodel/customsortfiltermodel.pro" name="Custom Sort/Filter Model">
- <description><![CDATA[The Custom Sort/Filter Model example illustrates how to subclass <tt>QSortFilterProxyModel</tt> to perform advanced sorting and filtering.]]></description>
- <tags>example,customsortfiltermodel,itemviews,qsortfilterproxymodel</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/coloreditorfactoryimage.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-coloreditorfactory.html" projectPath="itemviews/coloreditorfactory/coloreditorfactory.pro" name="Color Editor Factory">
- <description><![CDATA[This example shows how to create an editor that can be used by a <tt>QItemDelegate</tt>.]]></description>
- <tags>example,coloreditorfactory,itemviews,qitemdelegate</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/combowidgetmapper-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-combowidgetmapper.html" projectPath="itemviews/combowidgetmapper/combowidgetmapper.pro" name="Combo Widget Mapper">
- <description><![CDATA[The Delegate Widget Mapper example shows how to use a custom delegate to map information from a model to specific widgets on a form.]]></description>
- <tags>example,combowidgetmapper,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/dirview-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-dirview.html" projectPath="itemviews/dirview/dirview.pro" name="Directory View">
- <description><![CDATA[The Dir View example shows a tree view onto the local filing system. It uses the <tt>QDirModel(obsolete)</tt> class to provide supply file and directory information.]]></description>
- <tags>example,dirview,itemviews,qdirmodel(obsolete)</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/fetchmore-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-fetchmore.html" projectPath="itemviews/fetchmore/fetchmore.pro" name="Fetch More">
- <description><![CDATA[The Fetch More example shows how two add items to an item view model on demand.]]></description>
- <tags>example,fetchmore,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/frozencolumn-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-frozencolumn.html" projectPath="itemviews/frozencolumn/frozencolumn.pro" name="Frozen Column">
- <description><![CDATA[This example demonstrates how to freeze a column within a <tt>QTableView</tt>.]]></description>
- <tags>example,frozencolumn,itemviews,qtableview</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/pixelator-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-pixelator.html" projectPath="itemviews/pixelator/pixelator.pro" name="Pixelator">
- <description><![CDATA[The Pixelator example shows how delegates can be used to customize the way that items are rendered in standard item views.]]></description>
- <tags>example,pixelator,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/itemviewspuzzle-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-puzzle.html" projectPath="itemviews/puzzle/puzzle.pro" name="Puzzle ">
- <description><![CDATA[The Puzzle example shows how to enable drag and drop with a custom model to allow items to be transferred between a view and another widget.]]></description>
- <tags>example,puzzle,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/simpledommodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-simpledommodel.html" projectPath="itemviews/simpledommodel/simpledommodel.pro" name="Simple DOM Model">
- <description><![CDATA[The Simple DOM Model example shows how an existing class can be adapted for use with the model/view framework.]]></description>
- <tags>example,simpledommodel,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/simpletreemodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-simpletreemodel.html" projectPath="itemviews/simpletreemodel/simpletreemodel.pro" name="Simple Tree Model">
- <description><![CDATA[The Simple Tree Model example shows how to create a basic, read-only hierarchical model to use with Qt's standard view classes. For a description of simple non-hierarchical list and table models, see the <tt>Model/View Programming</tt> overview.]]></description>
- <tags>example,simpletreemodel,itemviews,model/view programming</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/simplewidgetmapper-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-simplewidgetmapper.html" projectPath="itemviews/simplewidgetmapper/simplewidgetmapper.pro" name="Simple Widget Mapper">
- <description><![CDATA[The Simple Widget Mapper example shows how to use a widget mapper to display data from a model in a collection of widgets.]]></description>
- <tags>example,simplewidgetmapper,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/spinboxdelegate-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-spinboxdelegate.html" projectPath="itemviews/spinboxdelegate/spinboxdelegate.pro" name="Spin Box Delegate">
- <description><![CDATA[The Spin Box Delegate example shows how to create an editor for a custom delegate in the model/view framework by reusing a standard Qt editor widget.]]></description>
- <tags>example,spinboxdelegate,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/stardelegate.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/itemviews-stardelegate.html" projectPath="itemviews/stardelegate/stardelegate.pro" name="Star Delegate">
- <description><![CDATA[The Star Delegate example shows how to create a delegate that can paint itself and that supports editing.]]></description>
- <tags>example,stardelegate,itemviews</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/basiclayouts-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/layouts-basiclayouts.html" projectPath="layouts/basiclayouts/basiclayouts.pro" name="Basic Layouts">
- <description><![CDATA[The Basic Layouts example shows how to use the standard layout managers that are available in Qt: <tt>QBoxLayout</tt>, <tt>QGridLayout</tt> and <tt>QFormLayout</tt>.]]></description>
- <tags>example,basiclayouts,layouts,qboxlayout,qgridlayout,qformlayout</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/borderlayout-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/layouts-borderlayout.html" projectPath="layouts/borderlayout/borderlayout.pro" name="Border Layout">
- <description><![CDATA[The Border Layout example shows how to create a custom layout that arranges child widgets according to a simple set of rules.]]></description>
- <tags>example,borderlayout,layouts</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/layouts-dynamiclayouts.html" projectPath="layouts/dynamiclayouts/dynamiclayouts.pro" name="Dynamic Layouts">
- <description><![CDATA[The Dynamic Layouts example shows how to move widgets around in existing layouts.]]></description>
- <tags>example,dynamiclayouts,layouts</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/flowlayout-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/layouts-flowlayout.html" projectPath="layouts/flowlayout/flowlayout.pro" name="Flow Layout">
- <description><![CDATA[The Flow Layout example demonstrates a custom layout that arranges child widgets from left to right and top to bottom in a top-level widget.]]></description>
- <tags>example,flowlayout,layouts</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/linguist-arrowpad_en.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/linguist-arrowpad.html" projectPath="linguist/arrowpad/arrowpad.pro" name="Arrow Pad">
- <description><![CDATA[This example is a slightly more involved and introduces a key <i>Qt Linguist</i> concept: "contexts". It also shows how to use two or more languages.]]></description>
- <tags>example,arrowpad,linguist</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/linguist-hellotr_en.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/linguist-hellotr.html" projectPath="linguist/hellotr/hellotr.pro" name="Hello World">
- <description><![CDATA[This example is a small Hello World program with a Latin translation. The screenshot below shows the English version.]]></description>
- <tags>example,hellotr,linguist</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/linguist-trollprint_10_en.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/linguist-trollprint.html" projectPath="linguist/trollprint/trollprint.pro" name="Troll Print">
- <description><![CDATA[Troll Print is an example application that lets the user choose printer settings. It comes in two versions: English and Portuguese.]]></description>
- <tags>example,trollprint,linguist</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/application.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/mainwindows-application.html" projectPath="mainwindows/application/application.pro" name="Application">
- <description><![CDATA[The Application example shows how to implement a standard GUI application with menus, toolbars, and a status bar. The example itself is a simple text editor program built around <tt>QPlainTextEdit</tt>.]]></description>
- <tags>example,application,mainwindows,qplaintextedit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/dockwidgets-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/mainwindows-dockwidgets.html" projectPath="mainwindows/dockwidgets/dockwidgets.pro" name="Dock Widgets">
- <description><![CDATA[The Dock Widgets example shows how to add dock windows to an application. It also shows how to use Qt's rich text engine.]]></description>
- <tags>example,dockwidgets,mainwindows</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/mdi-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/mainwindows-mdi.html" projectPath="mainwindows/mdi/mdi.pro" name="MDI">
- <description><![CDATA[The MDI example shows how to implement a Multiple Document Interface using Qt's <tt>QMdiArea</tt> class.]]></description>
- <tags>example,mdi,mainwindows,qmdiarea</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/sdi-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/mainwindows-sdi.html" projectPath="mainwindows/sdi/sdi.pro" name="SDI">
- <description><![CDATA[The SDI example shows how to create a Single Document Interface. It uses a number of top-level windows to display the contents of different text files.]]></description>
- <tags>example,sdi,mainwindows</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/menus-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/mainwindows-menus.html" projectPath="mainwindows/menus/menus.pro" name="Menus">
- <description><![CDATA[The Menus example demonstrates how menus can be used in a main window application.]]></description>
- <tags>example,menus,mainwindows</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/recentfiles-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/mainwindows-recentfiles.html" projectPath="mainwindows/recentfiles/recentfiles.pro" name="Recent Files">
- <description><![CDATA[The Recent Files example shows how a standard File menu can be extended to show the most recent files loaded by a main window application.]]></description>
- <tags>example,recentfiles,mainwindows</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-dialcontrol-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-dialcontrol.html" projectPath="declarative/ui-components/dialcontrol/dialcontrol.qmlproject" name="Dial">
- <fileToOpen>declarative/ui-components/dialcontrol/dialcontrol.qml</fileToOpen>
- <description><![CDATA[This example shows how to create a dial-type control. It combines <tt>Image</tt> elements with <tt>Rotation</tt> transforms and <tt>SpringAnimation</tt> behaviors to produce an interactive speedometer-type dial.]]></description>
- <tags>example,dialcontrol,declarative,ui-components,qml,qt quick,image,rotation,springanimation</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-flipable-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-flipable.html" projectPath="declarative/ui-components/flipable/flipable.qmlproject" name="Flipable">
- <fileToOpen>declarative/ui-components/flipable/flipable.qml</fileToOpen>
- <description><![CDATA[This example shows how to use the <tt>Flipable</tt> element.]]></description>
- <tags>example,flipable,declarative,ui-components,qml,qt quick,flipable</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-progressbar-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-progressbar.html" projectPath="declarative/ui-components/progressbar/progressbar.qmlproject" name="Progress bar">
- <description><![CDATA[This example shows how to create a progress bar.]]></description>
- <tags>example,progressbar,declarative,ui-components,qml,qt quick</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-scrollbar-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-scrollbar.html" projectPath="declarative/ui-components/scrollbar/scrollbar.qmlproject" name="Scroll bar">
- <description><![CDATA[This example shows how to create scroll bars for a <tt>Flickable</tt> element using the <tt>Flickable::visibleArea</tt> properties.]]></description>
- <tags>example,scrollbar,declarative,ui-components,qml,qt quick,flickable,flickable::visiblearea</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-searchbox-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-searchbox.html" projectPath="declarative/ui-components/searchbox/searchbox.qmlproject" name="Search box">
- <description><![CDATA[This example shows how to combine <tt>TextInput</tt>, <tt>FocusScope</tt> and <tt>BorderImage</tt> elements to display multiple text input fields.]]></description>
- <tags>example,searchbox,declarative,ui-components,qml,qt quick,textinput,focusscope,borderimage</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-slideswitch-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-slideswitch.html" projectPath="declarative/ui-components/slideswitch/slideswitch.qmlproject" name="Slide switch">
- <description><![CDATA[This example shows how to create a slide switch control.]]></description>
- <tags>example,slideswitch,declarative,ui-components,qml,qt quick</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-spinner-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-spinner.html" projectPath="declarative/ui-components/spinner/spinner.qmlproject" name="Spinner">
- <description><![CDATA[This example shows how to create a spinner-type component using the <tt>PathView</tt> element.]]></description>
- <tags>example,spinner,declarative,ui-components,qml,qt quick,pathview</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qml-tabwidget-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/declarative-ui-components-tabwidget.html" projectPath="declarative/ui-components/tabwidget/tabwidget.qmlproject" name="Tab widget">
- <description><![CDATA[This example shows how to create a tab widget. It also demonstrates how <tt>property aliases</tt> and <tt>default properties</tt> can be used to collect and assemble the child items declared within an <tt>Item</tt>.]]></description>
- <tags>example,tabwidget,declarative,ui-components,qml,qt quick,property aliases,default properties,item</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/blockingfortuneclient-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-blockingfortuneclient.html" projectPath="network/blockingfortuneclient/blockingfortuneclient.pro" name="Blocking Fortune Client">
- <description><![CDATA[The Blocking Fortune Client example shows how to create a client for a network service using <tt>QTcpSocket</tt>'s synchronous API in a non-GUI thread.]]></description>
- <tags>example,blockingfortuneclient,network,qtcpsocket</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/broadcastreceiver-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-broadcastreceiver.html" projectPath="network/broadcastreceiver/broadcastreceiver.pro" name="Broadcast Receiver">
- <description><![CDATA[The Broadcast Receiever example shows how to receive information that is broadcasted over a local network.]]></description>
- <tags>example,broadcastreceiver,network</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/broadcastsender-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-broadcastsender.html" projectPath="network/broadcastsender/broadcastsender.pro" name="Broadcast Sender">
- <description><![CDATA[The Broadcast Sender example shows how to broadcast information to multiple clients on a local network.]]></description>
- <tags>example,broadcastsender,network</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/network-chat-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-network-chat.html" projectPath="network/network-chat/network-chat.pro" name="Network Chat Client">
- <description><![CDATA[The Network Chat example demonstrates a stateful peer-to-peer Chat client that uses broadcasting with <tt>QUdpSocket</tt> and <tt>QNetworkInterface</tt> to discover its peers.]]></description>
- <tags>example,network-chat,network,qudpsocket,qnetworkinterface</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/fortuneclient-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-fortuneclient.html" projectPath="network/fortuneclient/fortuneclient.pro" name="Fortune Client">
- <description><![CDATA[The Fortune Client example shows how to create a client for a simple network service using <tt>QTcpSocket</tt>. It is intended to be run alongside the <tt>Fortune Server</tt> example or the <tt>Threaded Fortune Server</tt> example.]]></description>
- <tags>example,fortuneclient,network,qtcpsocket,fortune server,threaded fortune server</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/fortuneserver-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-fortuneserver.html" projectPath="network/fortuneserver/fortuneserver.pro" name="Fortune Server">
- <description><![CDATA[The Fortune Server example shows how to create a server for a simple network service. It is intended to be run alongside the <tt>Fortune Client</tt> example or the <tt>Blocking Fortune Client</tt> example.]]></description>
- <tags>example,fortuneserver,network,fortune client,blocking fortune client</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-qftp.html" projectPath="network/qftp/qftp.pro" name="FTP Client">
- <description><![CDATA[The FTP example demonstrates a simple FTP client that can be used to list the available files on an FTP server and download them.]]></description>
- <tags>example,qftp,network</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/http-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-http.html" projectPath="network/http/http.pro" name="HTTP Client">
- <description><![CDATA[The HTTP example demonstrates a simple HTTP client that shows how to fetch files specified by URLs from remote hosts.]]></description>
- <tags>example,http,network</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/loopback-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-loopback.html" projectPath="network/loopback/loopback.pro" name="Loopback">
- <description><![CDATA[The Loopback example shows how to communicate between simple clients and servers on a local host.]]></description>
- <tags>example,loopback,network</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/threadedfortuneserver-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-threadedfortuneserver.html" projectPath="network/threadedfortuneserver/threadedfortuneserver.pro" name="Threaded Fort. Server">
- <description><![CDATA[The Threaded Fortune Server example shows how to create a server for a simple network service that uses threads to handle requests from different clients. It is intended to be run alongside the Fortune Client example.]]></description>
- <tags>example,threadedfortuneserver,network</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/torrent-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-torrent.html" projectPath="network/torrent/torrent.pro" name="Torrent Client">
- <description><![CDATA[The Torrent example is a functional BitTorrent client that illustrates how to write a complex TCP/IP application using Qt.]]></description>
- <tags>example,torrent,network</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/securesocketclient.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-securesocketclient.html" projectPath="network/securesocketclient/securesocketclient.pro" name="Secure Socket Client">
- <description><![CDATA[The Secure Socket Client example shows how to use <tt>QSslSocket</tt> to communicate over an encrypted (SSL) connection. It also demonstrates how to deal with authenticity problems, and how to display security and certificate information.]]></description>
- <tags>example,securesocketclient,network,qsslsocket</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/googlesuggest-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/network-googlesuggest.html" projectPath="network/googlesuggest/googlesuggest.pro" name="Google Suggest">
- <description><![CDATA[The Google Suggest example demonstrates how to use the <tt>QNetworkAccessManager</tt> class to obtain a list of suggestions from the Google search engine as the user types into a <tt>QLineEdit</tt>.]]></description>
- <tags>example,googlesuggest,network,qnetworkaccessmanager,qlineedit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/2dpainting-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-2dpainting.html" projectPath="opengl/2dpainting/2dpainting.pro" name="2D Painting">
- <description><![CDATA[The 2D Painting example shows how <tt>QPainter</tt> and <tt>QGLWidget</tt> can be used together to display accelerated 2D graphics on supported hardware.]]></description>
- <tags>example,2dpainting,opengl,qpainter,qglwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/framebufferobject-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-framebufferobject.html" projectPath="opengl/framebufferobject/framebufferobject.pro" name="Framebuffer Object">
- <description><![CDATA[The Framebuffer Object example demonstrates how to use the <tt>QGLFramebufferObject</tt> class to render into an off-screen buffer and use the contents as a texture in a <tt>QGLWidget</tt>.]]></description>
- <tags>example,framebufferobject,opengl,qglframebufferobject,qglwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/framebufferobject2-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-framebufferobject2.html" projectPath="opengl/framebufferobject2/framebufferobject2.pro" name="Framebuffer Object 2">
- <description><![CDATA[The Framebuffer Object 2 example demonstrates how to use the <tt>QGLFramebufferObject</tt> class to render into an off-screen buffer and use the contents as a texture in a <tt>QGLWidget</tt>.]]></description>
- <tags>example,framebufferobject2,opengl,qglframebufferobject,qglwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/grabber-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-grabber.html" projectPath="opengl/grabber/grabber.pro" name="Grabber">
- <description><![CDATA[The Grabber examples shows how to retrieve the contents of an OpenGL framebuffer.]]></description>
- <tags>example,grabber,opengl</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/hellogl-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-hellogl.html" projectPath="opengl/hellogl/hellogl.pro" name="Hello GL">
- <description><![CDATA[The Hello GL example demonstrates the basic use of the OpenGL-related classes provided with Qt.]]></description>
- <tags>example,hellogl,opengl</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/overpainting-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-overpainting.html" projectPath="opengl/overpainting/overpainting.pro" name="Overpainting">
- <description><![CDATA[The Overpainting example shows how <tt>QPainter</tt> can be used to overpaint a scene rendered using OpenGL in a <tt>QGLWidget</tt>.]]></description>
- <tags>example,overpainting,opengl,qpainter,qglwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/pbuffers-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-pbuffers.html" projectPath="opengl/pbuffers/pbuffers.pro" name="Pixel Buffers">
- <description><![CDATA[The Pixel Buffers example demonstrates how to use the <tt>QGLPixelBuffer</tt> class to render into an off-screen buffer and use the contents as a dynamic texture in a <tt>QGLWidget</tt>.]]></description>
- <tags>example,pbuffers,opengl,qglpixelbuffer,qglwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/pbuffers2-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-pbuffers2.html" projectPath="opengl/pbuffers2/pbuffers2.pro" name="Pixel Buffers 2">
- <description><![CDATA[The Pixel Buffers 2 example demonstrates how to use the <tt>QGLPixelBuffer</tt> class to render into an off-screen buffer and use the contents as a dynamic texture in a <tt>QGLWidget</tt>.]]></description>
- <tags>example,pbuffers2,opengl,qglpixelbuffer,qglwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/samplebuffers-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-samplebuffers.html" projectPath="opengl/samplebuffers/samplebuffers.pro" name="Sample Buffers">
- <description><![CDATA[The Sample Buffers example demonstrates how to use and enable sample buffers in a <tt>QGLWidget</tt>.]]></description>
- <tags>example,samplebuffers,opengl,qglwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/textures-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/opengl-textures.html" projectPath="opengl/textures/textures.pro" name="Textures">
- <description><![CDATA[The Textures example demonstrates the use of Qt's image classes as textures in applications that use both OpenGL and Qt to display graphics.]]></description>
- <tags>example,textures,opengl</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/basicdrawing-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-basicdrawing.html" projectPath="painting/basicdrawing/basicdrawing.pro" name="Basic Drawing">
- <description><![CDATA[The Basic Drawing example shows how to display basic graphics primitives in a variety of styles using the <tt>QPainter</tt> class.]]></description>
- <tags>example,basicdrawing,painting,qpainter</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/concentriccircles-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-concentriccircles.html" projectPath="painting/concentriccircles/concentriccircles.pro" name="Concentric Circles">
- <description><![CDATA[The Concentric Circles example shows the improved rendering quality that can be obtained using floating point precision and anti-aliasing when drawing custom widgets. The example also shows how to do simple animations.]]></description>
- <tags>example,concentriccircles,painting</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/fontsampler-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-fontsampler.html" projectPath="painting/fontsampler/fontsampler.pro" name="Font Sampler">
- <description><![CDATA[The Font Sampler example shows how to preview and print multi-page documents.]]></description>
- <tags>example,fontsampler,painting</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/imagecomposition-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-imagecomposition.html" projectPath="painting/imagecomposition/imagecomposition.pro" name="Image Composition">
- <description><![CDATA[The Image Composition example lets the user combine images together using any composition mode supported by <tt>QPainter</tt>, described in detail in <tt>Composition Modes</tt>.]]></description>
- <tags>example,imagecomposition,painting,qpainter,composition modes</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/painterpaths-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-painterpaths.html" projectPath="painting/painterpaths/painterpaths.pro" name="Painter Paths">
- <description><![CDATA[The Painter Paths example shows how painter paths can be used to build complex shapes for rendering.]]></description>
- <tags>example,painterpaths,painting</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/svggenerator-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-svggenerator.html" projectPath="painting/svggenerator/svggenerator.pro" name="SVG Generator">
- <description><![CDATA[The SVG Generator example shows how to add SVG file export to applications.]]></description>
- <tags>example,svggenerator,painting</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/svgviewer-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-svgviewer.html" projectPath="painting/svgviewer/svgviewer.pro" name="SVG Viewer">
- <description><![CDATA[The SVG Viewer example shows how to add SVG viewing support to applications.]]></description>
- <tags>example,svgviewer,painting</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/transformations-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/painting-transformations.html" projectPath="painting/transformations/transformations.pro" name="Transformations">
- <description><![CDATA[The Transformations example shows how transformations influence the way that <tt>QPainter</tt> renders graphics primitives. In particular it shows how the order of transformations affect the result.]]></description>
- <tags>example,transformations,painting,qpainter</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/phonon-qmusicplayer.html" projectPath="phonon/qmusicplayer/qmusicplayer.pro" name="Music Player">
- <description><![CDATA[The Music Player Example shows how to use Phonon - the multimedia framework that comes with Qt - to create a simple music player. The player can play music files, and provides simple playback control, such as pausing, stopping, and resuming the music.]]></description>
- <tags>example,qmusicplayer,phonon</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/audiodevices-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/multimedia-audiodevices.html" projectPath="multimedia/audiodevices/audiodevices.pro" name="Audio Devices">
- <description><![CDATA[The Audio Devices example demonstrates the basic use of <tt>QAudioDeviceInfo</tt> class provided with Qt.]]></description>
- <tags>example,audiodevices,multimedia,qaudiodeviceinfo</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/audiooutput-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/multimedia-audiooutput.html" projectPath="multimedia/audiooutput/audiooutput.pro" name="Audio Output">
- <description><![CDATA[The Audio Output example demonstrates the basic use of the <tt>QAudioOutput</tt> class provided with Qt.]]></description>
- <tags>example,audiooutput,multimedia,qaudiooutput</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/audioinput-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/multimedia-audioinput.html" projectPath="multimedia/audioinput/audioinput.pro" name="Audio Input">
- <description><![CDATA[The Audio Input example demonstrates the basic use of <tt>QAudioInput</tt> class provided with Qt.]]></description>
- <tags>example,audioinput,multimedia,qaudioinput</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/calendar-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/richtext-calendar.html" projectPath="richtext/calendar/calendar.pro" name="Calendar">
- <description><![CDATA[The Calendar example shows how to create rich text content and display it using a rich text editor.]]></description>
- <tags>example,calendar,richtext</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/orderform-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/richtext-orderform.html" projectPath="richtext/orderform/orderform.pro" name="Order Form">
- <description><![CDATA[The Order Form example shows how to generate rich text documents by combining a simple template with data input by the user in a dialog. Data is extracted from a <tt>DetailsDialog</tt> object and displayed on a <tt>QTextEdit</tt> with a <tt>QTextCursor</tt>, using various formats. Each form generated is added to a <tt>QTabWidget</tt> for easy access.]]></description>
- <tags>example,orderform,richtext,detailsdialog,qtextedit,qtextcursor,qtabwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/syntaxhighlighter-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/richtext-syntaxhighlighter.html" projectPath="richtext/syntaxhighlighter/syntaxhighlighter.pro" name="Syntax Highlighter">
- <description><![CDATA[The Syntax Highlighter example shows how to perform simple syntax highlighting by subclassing the <tt>QSyntaxHighlighter</tt> class.]]></description>
- <tags>example,syntaxhighlighter,richtext,qsyntaxhighlighter</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/textobject-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/richtext-textobject.html" projectPath="richtext/textobject/textobject.pro" name="Text Object">
- <description><![CDATA[The Text Object example shows how to insert an SVG file into a <tt>QTextDocument</tt>.]]></description>
- <tags>example,textobject,richtext,qtextdocument</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/calculator-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/script-calculator.html" projectPath="script/calculator/calculator.pro" name="Calculator">
- <description><![CDATA[In this simple <tt>QtScript</tt> example, we show how to implement the functionality of a calculator widget.]]></description>
- <tags>example,calculator,script,qtscript</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/context2d-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/script-context2d.html" projectPath="script/context2d/context2d.pro" name="Context2D">
- <description><![CDATA[This Qt Script example is an implementation of the Context2D API.]]></description>
- <tags>example,context2d,script</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/defaultprototypes-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/script-defaultprototypes.html" projectPath="script/defaultprototypes/defaultprototypes.pro" name="Default Prototypes">
- <description><![CDATA[This Qt Script example shows how to use default prototypes to make a non-<tt>QObject</tt>-based type scriptable.]]></description>
- <tags>example,defaultprototypes,script,qobject</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/t1.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/script-helloscript.html" projectPath="script/helloscript/helloscript.pro" name="Hello Script">
- <description><![CDATA[The Hello Script example shows the basic use of Qt Script: How to embed a script engine into the application, how to evaluate a script, and how to process the result of the evaluation. The example also shows how to apply internationalization to scripts.]]></description>
- <tags>example,helloscript,script</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/tetrix-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/script-qstetrix.html" projectPath="script/qstetrix/qstetrix.pro" name="QSTetrix">
- <description><![CDATA[The QSTetrix example is a Qt Script version of the classic Tetrix game.]]></description>
- <tags>example,qstetrix,script</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/cachedtable-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/sql-cachedtable.html" projectPath="sql/cachedtable/cachedtable.pro" name="Cached Table">
- <description><![CDATA[The Cached Table example shows how a table view can be used to access a database, caching any changes to the data until the user explicitly submits them using a push button.]]></description>
- <tags>example,cachedtable,sql</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/drilldown-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/sql-drilldown.html" projectPath="sql/drilldown/drilldown.pro" name="Drill Down">
- <description><![CDATA[The Drill Down example shows how to read data from a database as well as submit changes, using the <tt>QSqlRelationalTableModel</tt> and <tt>QDataWidgetMapper</tt> classes.]]></description>
- <tags>example,drilldown,sql,qsqlrelationaltablemodel,qdatawidgetmapper</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/querymodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/sql-querymodel.html" projectPath="sql/querymodel/querymodel.pro" name="Query Model">
- <description><![CDATA[The Query Model example shows how to make customized versions of data obtained from a SQL query, using a model that encapsulates the query and table views to display the results.]]></description>
- <tags>example,querymodel,sql</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/relationaltablemodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/sql-relationaltablemodel.html" projectPath="sql/relationaltablemodel/relationaltablemodel.pro" name="Relational Table Model">
- <description><![CDATA[The Relational Table Model example shows how to use table views with a relational model to visualize the relations between items in a database.]]></description>
- <tags>example,relationaltablemodel,sql</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/tablemodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/sql-tablemodel.html" projectPath="sql/tablemodel/tablemodel.pro" name="Table Model">
- <description><![CDATA[The Table Model example shows how to use a specialized SQL table model with table views to edit information in a database.]]></description>
- <tags>example,tablemodel,sql</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/masterdetail-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/sql-masterdetail.html" projectPath="sql/masterdetail/masterdetail.pro" name="Music Archive">
- <description><![CDATA[The Master Detail Example shows how to present data from different data sources in the same application. The album titles, and the corresponding artists and release dates, are kept in a database, while each album's tracks are stored in an XML file.]]></description>
- <tags>example,masterdetail,sql</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/sql-sqlwidgetmapper.html" projectPath="sql/sqlwidgetmapper/sqlwidgetmapper.pro" name="SQL Widget Mapper">
- <description><![CDATA[The SQL Widget Mapper example shows how to use a map information from a database to widgets on a form.]]></description>
- <tags>example,sqlwidgetmapper,sql</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/statemachine-eventtransitions.html" projectPath="statemachine/eventtransitions/eventtransitions.pro" name="Event Transitions">
- <description><![CDATA[The Event Transitions example shows how to use event transitions, a feature of <tt>The State Machine Framework</tt>.]]></description>
- <tags>example,eventtransitions,statemachine,the state machine framework</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/rogue-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/statemachine-rogue.html" projectPath="statemachine/rogue/rogue.pro" name="Rogue">
- <description><![CDATA[The Rogue example shows how to use the Qt state machine for event handling.]]></description>
- <tags>example,rogue,statemachine</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/trafficlight-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/statemachine-trafficlight.html" projectPath="statemachine/trafficlight/trafficlight.pro" name="Traffic Light">
- <description><![CDATA[The Traffic Light example shows how to use <tt>The State Machine Framework</tt> to implement the control flow of a traffic light.]]></description>
- <tags>example,trafficlight,statemachine,the state machine framework</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/statemachine-twowaybutton.html" projectPath="statemachine/twowaybutton/twowaybutton.pro" name="Two-way Button">
- <description><![CDATA[The Two-way button example shows how to use <tt>The State Machine Framework</tt> to implement a simple state machine that toggles the current state when a button is clicked.]]></description>
- <tags>example,twowaybutton,statemachine,the state machine framework</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/mandelbrot-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/threads-mandelbrot.html" projectPath="threads/mandelbrot/mandelbrot.pro" name="Mandelbrot">
- <description><![CDATA[The Mandelbrot example shows how to use a worker thread to perform heavy computations without blocking the main thread's event loop.]]></description>
- <tags>example,mandelbrot,threads</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/codecs-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-codecs.html" projectPath="tools/codecs/codecs.pro" name="Codecs">
- <description><![CDATA[The Codecs example demonstrates the principles behind importing and exporting text using codecs to ensure that characters are encoded properly, avoiding loss of data and retaining the correct symbols used in various scripts.]]></description>
- <tags>example,codecs,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/completer-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-completer.html" projectPath="tools/completer/completer.pro" name="Completer">
- <description><![CDATA[The Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model.]]></description>
- <tags>example,completer,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/customcompleter-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-customcompleter.html" projectPath="tools/customcompleter/customcompleter.pro" name="Custom Completer">
- <description><![CDATA[The Custom Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model. The completer pops up suggestions for possible words based on the first three characters input by the user and the user's choice of word is inserted into the <tt>TextEdit</tt> using <tt>QTextCursor</tt>.]]></description>
- <tags>example,customcompleter,tools,textedit,qtextcursor</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/i18n-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-i18n.html" projectPath="tools/i18n/i18n.pro" name="Internationalization">
- <description><![CDATA[The Internationalization (I18N) example demonstrates Qt's support for translated text. Developers can write the initial application text in one language, and translations can be provided later without any modifications to the code.]]></description>
- <tags>example,i18n,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/inputpanel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-inputpanel.html" projectPath="tools/inputpanel/inputpanel.pro" name="Input Panel">
- <description><![CDATA[The Input Panel example shows how to create an input panel that can be used to input text into widgets using only the pointer and no keyboard.]]></description>
- <tags>example,inputpanel,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/plugandpaint.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-plugandpaint.html" projectPath="tools/plugandpaint/plugandpaint.pro" name="Plug and Paint">
- <description><![CDATA[The Plug & Paint example demonstrates how to write Qt applications that can be extended through plugins.]]></description>
- <tags>example,plugandpaint,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/regexp-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-regexp.html" projectPath="tools/regexp/regexp.pro" name="Regular Expressions">
- <description><![CDATA[The Regular Expressions (RegExp) example shows how regular expressions in Qt are applied to text by providing an environment in which new regular expressions can be created and tested on custom text strings.]]></description>
- <tags>example,regexp,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/settingseditor-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-settingseditor.html" projectPath="tools/settingseditor/settingseditor.pro" name="Settings Editor">
- <description><![CDATA[The Settings Editor example shows how Qt's standard settings support is used in an application by providing an editor that enables the user to view the settings for installed applications, and modify those that can be edited.]]></description>
- <tags>example,settingseditor,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/treemodelcompleter-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-treemodelcompleter.html" projectPath="tools/treemodelcompleter/treemodelcompleter.pro" name="Tree Model Completer">
- <description><![CDATA[The Tree Model Completer example shows how to provide completion facilities for a hierarchical model, using a period as the separator to access Child, GrandChild and GrandGrandChild level objects.]]></description>
- <tags>example,treemodelcompleter,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/undoframeworkexample.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tools-undoframework.html" projectPath="tools/undoframework/undoframework.pro" name="Undo Framework">
- <description><![CDATA[This example shows how to implement undo/redo functionality with the Qt undo framework.]]></description>
- <tags>example,undoframework,tools</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/analogclock-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-analogclock.html" projectPath="widgets/analogclock/analogclock.pro" name="Analog Clock">
- <description><![CDATA[The Analog Clock example shows how to draw the contents of a custom widget.]]></description>
- <tags>example,analogclock,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/calculator-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-calculator.html" projectPath="widgets/calculator/calculator.pro" name="Calculator ">
- <description><![CDATA[The example shows how to use signals and slots to implement the functionality of a calculator widget, and how to use <tt>QGridLayout</tt> to place child widgets in a grid.]]></description>
- <tags>example,calculator,widgets,qgridlayout</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/calendarwidgetexample.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-calendarwidget.html" projectPath="widgets/calendarwidget/calendarwidget.pro" name="Calendar Widget">
- <description><![CDATA[The Calendar Widget example shows use of <tt>QCalendarWidget</tt>.]]></description>
- <tags>example,calendarwidget,widgets,qcalendarwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/charactermap-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-charactermap.html" projectPath="widgets/charactermap/charactermap.pro" name="Character Map">
- <description><![CDATA[The Character Map example shows how to create a custom widget that can both display its own content and respond to user input.]]></description>
- <tags>example,charactermap,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/codeeditor-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-codeeditor.html" projectPath="widgets/codeeditor/codeeditor.pro" name="Code Editor">
- <description><![CDATA[The Code Editor example shows how to create a simple editor that has line numbers and that highlights the current line.]]></description>
- <tags>example,codeeditor,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/digitalclock-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-digitalclock.html" projectPath="widgets/digitalclock/digitalclock.pro" name="Digital Clock">
- <description><![CDATA[The Digital Clock example shows how to use <tt>QLCDNumber</tt> to display a number with LCD-like digits.]]></description>
- <tags>example,digitalclock,widgets,qlcdnumber</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/groupbox-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-groupbox.html" projectPath="widgets/groupbox/groupbox.pro" name="Group Box">
- <description><![CDATA[The Group Box example shows how to use the different kinds of group boxes in Qt.]]></description>
- <tags>example,groupbox,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/icons-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-icons.html" projectPath="widgets/icons/icons.pro" name="Icons">
- <description><![CDATA[The Icons example shows how <tt>QIcon</tt> can generate pixmaps reflecting an icon's state, mode and size. These pixmaps are generated from the set of pixmaps made available to the icon, and are used by Qt widgets to show an icon representing a particular action.]]></description>
- <tags>example,icons,widgets,qicon</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/imageviewer-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-imageviewer.html" projectPath="widgets/imageviewer/imageviewer.pro" name="Image Viewer">
- <description><![CDATA[The example shows how to combine <tt>QLabel</tt> and <tt>QScrollArea</tt> to display an image. <tt>QLabel</tt> is typically used for displaying text, but it can also display an image. <tt>QScrollArea</tt> provides a scrolling view around another widget. If the child widget exceeds the size of the frame, <tt>QScrollArea</tt> automatically provides scroll bars.]]></description>
- <tags>example,imageviewer,widgets,qlabel,qscrollarea,qlabel,qscrollarea,qscrollarea</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/lineedits-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-lineedits.html" projectPath="widgets/lineedits/lineedits.pro" name="Line Edits">
- <description><![CDATA[The Line Edits example demonstrates the many ways that <tt>QLineEdit</tt> can be used, and shows the effects of various properties and validators on the input and output supplied by the user.]]></description>
- <tags>example,lineedits,widgets,qlineedit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/movie-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-movie.html" projectPath="widgets/movie/movie.pro" name="Movie Player">
- <description><![CDATA[The Movie example demonstrates how to use <tt>QMovie</tt> and <tt>QLabel</tt> to display animations. Now that Qt comes with the <tt>Phonon multimedia framework</tt>, <tt>QMovie</tt> is mostly useful if one wants to play a simple animation without the added complexity of a multimedia framework to install and deploy.]]></description>
- <tags>example,movie,widgets,qmovie,qlabel,phonon multimedia framework,qmovie</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/scribble-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-scribble.html" projectPath="widgets/scribble/scribble.pro" name="Scribble">
- <description><![CDATA[The Scribble example shows how to reimplement some of <tt>QWidget</tt>'s event handlers to receive the events generated for the application's widgets.]]></description>
- <tags>example,scribble,widgets,qwidget</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/shapedclock-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-shapedclock.html" projectPath="widgets/shapedclock/shapedclock.pro" name="Shaped Clock">
- <description><![CDATA[The Shaped Clock example shows how to apply a widget mask to a top-level widget to produce a shaped window.]]></description>
- <tags>example,shapedclock,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/sliders-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-sliders.html" projectPath="widgets/sliders/sliders.pro" name="Sliders">
- <description><![CDATA[Qt provides three types of slider-like widgets: <tt>QSlider</tt>, <tt>QScrollBar</tt> and <tt>QDial</tt>. They all inherit most of their functionality from <tt>QAbstractSlider</tt>, and can in theory replace each other in an application since the differences only concern their look and feel. This example shows what they look like, how they work and how their behavior and appearance can be manipulated through their properties.]]></description>
- <tags>example,sliders,widgets,qslider,qscrollbar,qdial,qabstractslider</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/spinboxes-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-spinboxes.html" projectPath="widgets/spinboxes/spinboxes.pro" name="Spin Boxes">
- <description><![CDATA[The Spin Boxes example shows how to use the many different types of spin boxes available in Qt, from a simple <tt>QSpinBox</tt> widget to more complex editors like the <tt>QDateTimeEdit</tt> widget.]]></description>
- <tags>example,spinboxes,widgets,qspinbox,qdatetimeedit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/styles-enabledwood.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-styles.html" projectPath="widgets/styles/styles.pro" name="Styles">
- <description><![CDATA[The Styles example illustrates how to create custom widget drawing styles using Qt, and demonstrates Qt's predefined styles.]]></description>
- <tags>example,styles,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/stylesheet-coffee-plastique.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-stylesheet.html" projectPath="widgets/stylesheet/stylesheet.pro" name="Style Sheet">
- <description><![CDATA[The Style Sheet Example shows how to use style sheets.]]></description>
- <tags>example,stylesheet,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/tabletexample.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-tablet.html" projectPath="widgets/tablet/tablet.pro" name="Tablet">
- <description><![CDATA[This example shows how to use a Wacom tablet in Qt applications.]]></description>
- <tags>example,tablet,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/tetrix-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-tetrix.html" projectPath="widgets/tetrix/tetrix.pro" name="Tetrix ">
- <description><![CDATA[The Tetrix example is a Qt version of the classic Tetrix game.]]></description>
- <tags>example,tetrix,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/tooltips-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-tooltips.html" projectPath="widgets/tooltips/tooltips.pro" name="Tool Tips">
- <description><![CDATA[The Tool Tips example shows how to provide static and dynamic tool tips for an application's widgets.]]></description>
- <tags>example,tooltips,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/wiggly-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-wiggly.html" projectPath="widgets/wiggly/wiggly.pro" name="Wiggly">
- <description><![CDATA[The Wiggly example shows how to animate a widget using <tt>QBasicTimer</tt> and <tt>timerEvent()</tt>. In addition, the example demonstrates how to use <tt>QFontMetrics</tt> to determine the size of text on screen.]]></description>
- <tags>example,wiggly,widgets,qbasictimer,timerevent(),qfontmetrics</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/windowflags-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/widgets-windowflags.html" projectPath="widgets/windowflags/windowflags.pro" name="Window Flags">
- <description><![CDATA[The Window Flags example shows how to use the window flags available in Qt.]]></description>
- <tags>example,windowflags,widgets</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/formextractor-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/webkit-formextractor.html" projectPath="webkit/formextractor/formextractor.pro" name="Form Extractor">
- <description><![CDATA[The Form Extractor example shows how to use <tt>QWebFrame</tt> with JavaScript to extract form data.]]></description>
- <tags>example,formextractor,webkit,qwebframe</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/previewer-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/webkit-previewer.html" projectPath="webkit/previewer/previewer.pro" name="HTML Previewer">
- <description><![CDATA[The Previewer example shows how to use <tt>QtWebKit</tt>'s <tt>QWebView</tt> to preview HTML data written in a <tt>QPlainTextEdit</tt>.]]></description>
- <tags>example,previewer,webkit,qtwebkit,qwebview,qplaintextedit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/fancybrowser-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/webkit-fancybrowser.html" projectPath="webkit/fancybrowser/fancybrowser.pro" name="Fancy Browser">
- <description><![CDATA[The Fancy Browser example shows how to use jQuery with <tt>QtWebKit</tt> to create a web browser with special effects and content manipulation.]]></description>
- <tags>example,fancybrowser,webkit,qtwebkit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/googlechat-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/webkit-googlechat.html" projectPath="webkit/googlechat/googlechat.pro" name="Google Chat">
- <description><![CDATA[The Google Chat example shows how to use implement a simple Google Chat client with <tt>QtWebKit</tt>.]]></description>
- <tags>example,googlechat,webkit,qtwebkit</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/saxbookmarks-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xml-saxbookmarks.html" projectPath="xml/saxbookmarks/saxbookmarks.pro" name="SAX Bookmarks">
- <description><![CDATA[The SAX Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) files that uses Qt's SAX-based API to read and parse the files. The DOM Bookmarks example provides an alternative way to read this type of file.]]></description>
- <tags>example,saxbookmarks,xml</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/dombookmarks-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xml-dombookmarks.html" projectPath="xml/dombookmarks/dombookmarks.pro" name="DOM Bookmarks">
- <description><![CDATA[The DOM Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) files that uses Qt's DOM-based XML API to read and parse the files. The SAX Bookmarks example provides an alternative way to read this type of file.]]></description>
- <tags>example,dombookmarks,xml</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/rsslistingexample.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xml-rsslisting.html" projectPath="xml/rsslisting/rsslisting.pro" name="RSS-Listing">
- <description><![CDATA[This example shows how to create a widget that displays news items from RDF news sources.]]></description>
- <tags>example,rsslisting,xml</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/xmlstreamexample-screenshot.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xml-streambookmarks.html" projectPath="xml/streambookmarks/streambookmarks.pro" name="QXmlStream Bookmarks">
- <description><![CDATA[The QXmlStream Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) files using Qt's <tt>QXmlStreamReader</tt> class for reading, and <tt>QXmlStreamWriter</tt> class for writing the files.]]></description>
- <tags>example,streambookmarks,xml,qxmlstreamreader,qxmlstreamwriter</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/recipes-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xmlpatterns-recipes.html" projectPath="xmlpatterns/recipes/recipes.pro" name="Recipes">
- <description><![CDATA[The recipes example shows how to use <tt>QtXmlPatterns</tt> to query XML data loaded from a file.]]></description>
- <tags>example,recipes,xmlpatterns,qtxmlpatterns</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/qobjectxmlmodel-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xmlpatterns-qobjectxmlmodel.html" projectPath="xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro" name="QObjectXmlModel">
- <description><![CDATA[This example shows how to use <tt>QtXmlPatterns</tt> to query <tt>QObject</tt> trees by modeling the non-XML data structure of a <tt>QObject</tt> tree to look like XML.]]></description>
- <tags>example,qobjectxmlmodel,xmlpatterns,qtxmlpatterns,qobject,qobject</tags>
- </example>
- <example imageUrl="" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xmlpatterns-filetree.html" projectPath="xmlpatterns/filetree/filetree.pro" name="File Tree">
- <description><![CDATA[This example shows how to use <tt>QtXmlPatterns</tt> for querying non-XML data that is modeled to look like XML.]]></description>
- <tags>example,filetree,xmlpatterns,qtxmlpatterns</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/trafficinfo-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xmlpatterns-trafficinfo.html" projectPath="xmlpatterns/trafficinfo/trafficinfo.pro" name="Traffic Info">
- <description><![CDATA[The WAP service used in this example is <tt>wap.trafikanten.no</tt> that is run by the Norwegian governmental agency for public transport in Oslo. The service provides real time information about the departure of busses, trams and undergrounds for every station in the city area.]]></description>
- <tags>example,trafficinfo,xmlpatterns</tags>
- </example>
- <example imageUrl="qthelp://com.trolltech.qt/qdoc/images/schema-example.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/xmlpatterns-schema.html" projectPath="xmlpatterns/schema/schema.pro" name="XML Schema Validation">
- <description><![CDATA[This example shows how to use <tt>QtXmlPatterns</tt> to validate XML with a W3C XML Schema.]]></description>
- <tags>example,schema,xmlpatterns,qtxmlpatterns</tags>
- </example>
- </examples>
- <tutorials>
- <tutorial imageUrl="images/icons/adressbook.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part1.html" projectPath="tutorials/addressbook/part1/part1.pro" name="Address Book Tutorial">
- <steps>
- <step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part1-screenshot.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part1.html" projectPath="tutorials/addressbook/part1/part1.pro"/>
- <step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part2-add-contact.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part2.html" projectPath="tutorials/addressbook/part2/part2.pro"/>
- <step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part3-screenshot.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part3.html" projectPath="tutorials/addressbook/part3/part3.pro"/>
- <step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-screenshot.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part4.html" projectPath="tutorials/addressbook/part4/part4.pro"/>
- <step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part5-screenshot.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part5.html" projectPath="tutorials/addressbook/part5/part5.pro"/>
- <step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part6-screenshot.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part6.html" projectPath="tutorials/addressbook/part6/part6.pro"/>
- <step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part7-screenshot.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part7.html" projectPath="tutorials/addressbook/part7/part7.pro"/>
- </steps>
- <description><![CDATA[This first part covers the design of the basic graphical user interface (GUI) for our address book application.]]></description>
- <tags>tutorial,part1,tutorials,addressbook</tags>
- </tutorial>
- </tutorials>
-</instructionals>
diff --git a/share/qtcreator/welcomescreen/widgets/IconAndLink.qml b/share/qtcreator/welcomescreen/widgets/IconAndLink.qml
new file mode 100644
index 0000000000..0277d97711
--- /dev/null
+++ b/share/qtcreator/welcomescreen/widgets/IconAndLink.qml
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+import QtQuick 2.1
+
+Row {
+ property string iconSource
+ property string title: "title"
+ property string openUrl
+ property string openHelpUrl
+ spacing: 7
+ Image {
+ width: 16
+ height: 16
+ source: iconSource
+ }
+ LinkedText {
+ text: title
+ font.pixelSize: 11
+ color: "black"
+ onClicked: {
+ if (openUrl)
+ gettingStarted.openUrl(openUrl);
+ if (openHelpUrl)
+ gettingStarted.openHelp(openUrl);
+ }
+ }
+}
diff --git a/share/qtcreator/welcomescreen/widgets/Sessions.qml b/share/qtcreator/welcomescreen/widgets/Sessions.qml
index ae451bde22..9cd5815831 100644
--- a/share/qtcreator/welcomescreen/widgets/Sessions.qml
+++ b/share/qtcreator/welcomescreen/widgets/Sessions.qml
@@ -45,6 +45,7 @@ Item {
snapMode: ListView.SnapToItem
spacing: 4
clip: true
+ interactive: false
delegate: SessionItem {
function fullSessionName()
diff --git a/share/qtcreator/welcomescreen/widgets/SideBar.qml b/share/qtcreator/welcomescreen/widgets/SideBar.qml
index 521bf45c5d..a3abe54fe7 100644
--- a/share/qtcreator/welcomescreen/widgets/SideBar.qml
+++ b/share/qtcreator/welcomescreen/widgets/SideBar.qml
@@ -132,47 +132,30 @@ ColumnLayout {
Column {
x: 14
spacing: 16
- Row {
- spacing: 7
- Image {
- width: 16
- height: 15
- source: "images/icons/onlineCommunity.png"
- }
- LinkedText {
- text: qsTr("Online Community")
- font.pixelSize: 11
- color: "black"
- onClicked: gettingStarted.openUrl("http://qt-project.org/forums")
- }
+ IconAndLink {
+ iconSource: "images/icons/qt_account.png"
+ title: qsTr("Qt Account")
+ openUrl: "https://login.qt.digia.com/qtaccount?utm_source=qtcreator31"
}
- Row {
- spacing: 7
- Image {
- height: 15
- width: 15
- source: "images/icons/blogs.png"
- }
- LinkedText {
- text: qsTr("Blogs")
- font.pixelSize: 11
- color: "black"
- onClicked: gettingStarted.openUrl("http://planet.qt-project.org")
- }
+ IconAndLink {
+ iconSource: "images/icons/qt_cloud.png"
+ title: qsTr("Qt Cloud Services")
+ openUrl: "https://developer.qtc.io?utm_source=qtcreator31"
}
- Row {
- spacing: 7
- Image {
- width: 16
- height: 15
- source: "images/icons/userGuide.png"
- }
- LinkedText {
- text: qsTr("User Guide")
- font.pixelSize: 11
- color: "black"
- onClicked: gettingStarted.openHelp("qthelp://org.qt-project.qtcreator/doc/index.html")
- }
+ IconAndLink {
+ iconSource: "images/icons/onlineCommunity.png"
+ title: qsTr("Online Community")
+ openUrl: "http://qt-project.org/forums"
+ }
+ IconAndLink {
+ iconSource: "images/icons/blogs.png"
+ title: qsTr("Blogs")
+ openUrl: "http://planet.qt-project.org"
+ }
+ IconAndLink {
+ iconSource: "images/icons/userGuide.png"
+ title: qsTr("User Guide")
+ openHelpUrl: "qthelp://org.qt-project.qtcreator/doc/index.html"
}
}
}
diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_account.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_account.png
new file mode 100644
index 0000000000..cbf592fcd6
--- /dev/null
+++ b/share/qtcreator/welcomescreen/widgets/images/icons/qt_account.png
Binary files differ
diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_cloud.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_cloud.png
new file mode 100644
index 0000000000..ba3f283935
--- /dev/null
+++ b/share/qtcreator/welcomescreen/widgets/images/icons/qt_cloud.png
Binary files differ
diff --git a/share/share.qbs b/share/share.qbs
index 4c95563b9c..f048f5d98d 100644
--- a/share/share.qbs
+++ b/share/share.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
Product {
name: "SharedContent"
diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp
index 2f0bb6e477..bf19628fd2 100644
--- a/src/libs/3rdparty/cplusplus/Parser.cpp
+++ b/src/libs/3rdparty/cplusplus/Parser.cpp
@@ -541,7 +541,7 @@ bool Parser::parseTranslationUnit(TranslationUnitAST *&node)
if (TopLevelDeclarationProcessor *processor = _control->topLevelDeclarationProcessor()) {
- if (processor->processDeclaration(declaration))
+ if (!processor->processDeclaration(declaration))
break;
}
diff --git a/src/libs/aggregation/aggregation.qbs b/src/libs/aggregation/aggregation.qbs
index 6c0e6e8d6b..4225adf64e 100644
--- a/src/libs/aggregation/aggregation.qbs
+++ b/src/libs/aggregation/aggregation.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 87ed0b3f26..75c71170b5 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -669,6 +669,15 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding
foreach (ClassOrNamespace *u, binding->usings())
lookup_helper(name, u, result, processed, binding->_templateId);
+
+ Anonymouses::const_iterator cit = binding->_anonymouses.begin();
+ Anonymouses::const_iterator citEnd = binding->_anonymouses.end();
+ for (; cit != citEnd; ++cit) {
+ const AnonymousNameId *anonymousNameId = cit.key();
+ ClassOrNamespace *a = cit.value();
+ if (!binding->_declaredAnonymouses.contains(anonymousNameId))
+ lookup_helper(name, a, result, processed, binding->_templateId);
+ }
}
}
@@ -1567,8 +1576,12 @@ bool CreateBindings::visit(Declaration *decl)
}
}
}
+ } else if (Class *clazz = decl->type()->asClassType()) {
+ if (const Name *name = clazz->name()) {
+ if (const AnonymousNameId *anonymousNameId = name->asAnonymousNameId())
+ _currentClassOrNamespace->_declaredAnonymouses.insert(anonymousNameId);
+ }
}
-
return false;
}
diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h
index 4b11ad4caf..b1a1ba2c82 100644
--- a/src/libs/cplusplus/LookupContext.h
+++ b/src/libs/cplusplus/LookupContext.h
@@ -96,6 +96,7 @@ public:
private:
typedef std::map<const Name *, ClassOrNamespace *, Name::Compare> Table;
typedef std::map<const TemplateNameId *, ClassOrNamespace *, TemplateNameId::Compare> TemplateNameIdTable;
+ typedef QHash<const AnonymousNameId *, ClassOrNamespace *> Anonymouses;
/// \internal
void flush();
@@ -141,7 +142,8 @@ private:
QSharedPointer<Control> _control;
TemplateNameIdTable _specializations;
QMap<const TemplateNameId *, ClassOrNamespace *> _instantiations;
- QHash<const AnonymousNameId *, ClassOrNamespace *> _anonymouses;
+ Anonymouses _anonymouses;
+ QSet<const AnonymousNameId *> _declaredAnonymouses;
QHash<Internal::FullyQualifiedName, Symbol *> *_scopeLookupCache;
diff --git a/src/libs/cplusplus/cplusplus.qbs b/src/libs/cplusplus/cplusplus.qbs
index 09dfe63cec..3ea4a34b90 100644
--- a/src/libs/cplusplus/cplusplus.qbs
+++ b/src/libs/cplusplus/cplusplus.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/extensionsystem/extensionsystem.qbs b/src/libs/extensionsystem/extensionsystem.qbs
index 2a5b12a6c7..a3e4bce8d4 100644
--- a/src/libs/extensionsystem/extensionsystem.qbs
+++ b/src/libs/extensionsystem/extensionsystem.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/extensionsystem/pluginerrorview.cpp b/src/libs/extensionsystem/pluginerrorview.cpp
index 3c3170e0d2..cfb3b18f0f 100644
--- a/src/libs/extensionsystem/pluginerrorview.cpp
+++ b/src/libs/extensionsystem/pluginerrorview.cpp
@@ -75,35 +75,35 @@ void PluginErrorView::update(PluginSpec *spec)
switch (spec->state()) {
case PluginSpec::Invalid:
text = tr("Invalid");
- tooltip = tr("Description file found, but error on read");
+ tooltip = tr("Description file found, but error on read.");
break;
case PluginSpec::Read:
text = tr("Read");
- tooltip = tr("Description successfully read");
+ tooltip = tr("Description successfully read.");
break;
case PluginSpec::Resolved:
text = tr("Resolved");
- tooltip = tr("Dependencies are successfully resolved");
+ tooltip = tr("Dependencies are successfully resolved.");
break;
case PluginSpec::Loaded:
text = tr("Loaded");
- tooltip = tr("Library is loaded");
+ tooltip = tr("Library is loaded.");
break;
case PluginSpec::Initialized:
text = tr("Initialized");
- tooltip = tr("Plugin's initialization function succeeded");
+ tooltip = tr("Plugin's initialization function succeeded.");
break;
case PluginSpec::Running:
text = tr("Running");
- tooltip = tr("Plugin successfully loaded and running");
+ tooltip = tr("Plugin successfully loaded and running.");
break;
case PluginSpec::Stopped:
text = tr("Stopped");
- tooltip = tr("Plugin was shut down");
+ tooltip = tr("Plugin was shut down.");
break;
case PluginSpec::Deleted:
text = tr("Deleted");
- tooltip = tr("Plugin ended its life cycle and was deleted");
+ tooltip = tr("Plugin ended its life cycle and was deleted.");
break;
}
diff --git a/src/libs/glsl/glsl.qbs b/src/libs/glsl/glsl.qbs
index 4a9d6e4165..ade3e6d86b 100644
--- a/src/libs/glsl/glsl.qbs
+++ b/src/libs/glsl/glsl.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/languageutils/languageutils.qbs b/src/libs/languageutils/languageutils.qbs
index 12326d2df8..eef6bf3c3d 100644
--- a/src/libs/languageutils/languageutils.qbs
+++ b/src/libs/languageutils/languageutils.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/qmldebug/qmldebug.qbs b/src/libs/qmldebug/qmldebug.qbs
index 7181013a80..80fe8b2995 100644
--- a/src/libs/qmldebug/qmldebug.qbs
+++ b/src/libs/qmldebug/qmldebug.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
index 3206499752..6047e7b826 100644
--- a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
+++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
@@ -84,7 +84,7 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage
uiBorderImage->setupUi(this);
m_fileWidget = uiBorderImage->fileWidget;
m_sizeLabel = uiBorderImage->sizeLabel;
- uiBorderImage->label->setToolTip(tr("double click for preview"));
+ uiBorderImage->label->setToolTip(tr("Double click for preview."));
uiBorderImage->label->installEventFilter(labelFilter);
@@ -103,7 +103,7 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage
} else {
ui = new Ui::ContextPaneWidgetImage;
ui->setupUi(this);
- ui->label->setToolTip(tr("double click for preview"));
+ ui->label->setToolTip(tr("Double click for preview."));
ui->label->installEventFilter(labelFilter);
m_fileWidget = ui->fileWidget;
m_sizeLabel = ui->sizeLabel;
diff --git a/src/libs/qmleditorwidgets/contextpanewidgetimage.ui b/src/libs/qmleditorwidgets/contextpanewidgetimage.ui
index ed25fbf0fd..1f7fe1299e 100644
--- a/src/libs/qmleditorwidgets/contextpanewidgetimage.ui
+++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.ui
@@ -57,7 +57,7 @@
<item row="1" column="1">
<widget class="QRadioButton" name="stretchRadioButton">
<property name="toolTip">
- <string>The image is scaled to fit</string>
+ <string>The image is scaled to fit.</string>
</property>
<property name="text">
<string/>
@@ -77,7 +77,7 @@
<item row="1" column="2">
<widget class="QRadioButton" name="horizontalStretchRadioButton">
<property name="toolTip">
- <string>The image is stretched horizontally and tiled vertically</string>
+ <string>The image is stretched horizontally and tiled vertically.</string>
</property>
<property name="text">
<string/>
@@ -97,7 +97,7 @@
<item row="1" column="3">
<widget class="QRadioButton" name="verticalStretchRadioButton">
<property name="toolTip">
- <string>The image is stretched vertically and tiled horizontally</string>
+ <string>The image is stretched vertically and tiled horizontally.</string>
</property>
<property name="text">
<string/>
@@ -117,7 +117,7 @@
<item row="2" column="1">
<widget class="QRadioButton" name="tileRadioButton">
<property name="toolTip">
- <string>The image is duplicated horizontally and vertically</string>
+ <string>The image is duplicated horizontally and vertically.</string>
</property>
<property name="text">
<string/>
@@ -137,7 +137,7 @@
<item row="2" column="2">
<widget class="QRadioButton" name="preserveAspectFitRadioButton">
<property name="toolTip">
- <string>The image is scaled uniformly to fit without cropping</string>
+ <string>The image is scaled uniformly to fit without cropping.</string>
</property>
<property name="text">
<string/>
@@ -157,7 +157,7 @@
<item row="2" column="3">
<widget class="QRadioButton" name="cropAspectFitRadioButton">
<property name="toolTip">
- <string>The image is scaled uniformly to fill, cropping if necessary</string>
+ <string>The image is scaled uniformly to fill, cropping if necessary.</string>
</property>
<property name="text">
<string/>
diff --git a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui
index f883e743fc..aa351e986f 100644
--- a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui
+++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.ui
@@ -54,7 +54,7 @@
</size>
</property>
<property name="toolTip">
- <string>Play simulation</string>
+ <string>Play simulation.</string>
</property>
</widget>
</item>
@@ -83,7 +83,7 @@
</size>
</property>
<property name="toolTip">
- <string>Type of easing curve</string>
+ <string>Type of easing curve.</string>
</property>
<item>
<property name="text">
@@ -164,7 +164,7 @@
</sizepolicy>
</property>
<property name="toolTip">
- <string>Acceleration or deceleration of easing curve</string>
+ <string>Acceleration or deceleration of easing curve.</string>
</property>
<item>
<property name="text">
@@ -207,7 +207,7 @@
</size>
</property>
<property name="toolTip">
- <string>Duration of animation</string>
+ <string>Duration of animation.</string>
</property>
<property name="specialValueText">
<string>INVALID</string>
@@ -251,7 +251,7 @@
</size>
</property>
<property name="toolTip">
- <string>Amplitude of elastic and bounce easing curves</string>
+ <string>Amplitude of elastic and bounce easing curves.</string>
</property>
<property name="specialValueText">
<string>INVALID</string>
@@ -292,7 +292,7 @@
</size>
</property>
<property name="toolTip">
- <string>Easing period of an elastic curve</string>
+ <string>Easing period of an elastic curve.</string>
</property>
<property name="specialValueText">
<string>INVALID</string>
@@ -333,7 +333,7 @@
</size>
</property>
<property name="toolTip">
- <string>Easing overshoot for a back curve</string>
+ <string>Easing overshoot for a back curve.</string>
</property>
<property name="specialValueText">
<string>INVALID</string>
diff --git a/src/libs/qmleditorwidgets/qmleditorwidgets.qbs b/src/libs/qmleditorwidgets/qmleditorwidgets.qbs
index 9c60cfb182..80ce26a55a 100644
--- a/src/libs/qmleditorwidgets/qmleditorwidgets.qbs
+++ b/src/libs/qmleditorwidgets/qmleditorwidgets.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/qmljs/qmljs.qbs b/src/libs/qmljs/qmljs.qbs
index 6e52fda608..d29d40d18c 100644
--- a/src/libs/qmljs/qmljs.qbs
+++ b/src/libs/qmljs/qmljs.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp
index d347e76a71..fa580cce13 100644
--- a/src/libs/qmljs/qmljsdocument.cpp
+++ b/src/libs/qmljs/qmljsdocument.cpp
@@ -159,7 +159,8 @@ QList<Language::Enum> Document::companionLanguages(Language::Enum language)
break;
case Language::Unknown:
langs << Language::JavaScript << Language::Json << Language::QmlProject << Language:: QmlQbs
- << Language::QmlTypeInfo << Language::QmlQtQuick1 << Language::QmlQtQuick2 ;
+ << Language::QmlTypeInfo << Language::QmlQtQuick1 << Language::QmlQtQuick2
+ << Language::Qml;
break;
}
return langs;
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
index 92b1dcf2d4..c7acf47495 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
@@ -777,7 +777,7 @@ void ModelManagerInterface::parseLoop(QSet<QString> &scannedPaths,
continue;
}
if (language == Language::Qml
- && (mainLanguage == Language::QmlQtQuick1 || Language::QmlQtQuick2))
+ && (mainLanguage == Language::QmlQtQuick1 || mainLanguage == Language::QmlQtQuick2))
language = mainLanguage;
QString contents;
int documentRevision = 0;
diff --git a/src/libs/ssh/ssh.qbs b/src/libs/ssh/ssh.qbs
index c8a0c5ef91..e044ba16b6 100644
--- a/src/libs/ssh/ssh.qbs
+++ b/src/libs/ssh/ssh.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/utils/logging.h b/src/libs/utils/logging.h
index 825abff590..3252287627 100644
--- a/src/libs/utils/logging.h
+++ b/src/libs/utils/logging.h
@@ -31,7 +31,7 @@
#include <qglobal.h>
-#if QT_VERSION < 0x052000
+#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
//
// Qt < 5.2 didn't feature categorized logging:
@@ -67,7 +67,7 @@ private:
return category; \
}
-#if QT_VERSION > 0x050000
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
//
// Qt 5.0, 5.1 do have already support for categories in QMessageLogger
@@ -100,13 +100,13 @@ private:
qCritical(__VA_ARGS__)
-# endif // QT_VERSION > 0x050000
+# endif // QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
-#else // QT_VERSION >= 0x052000
+#else // QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
#include <QLoggingCategory>
-#if QT_VERSION < 0x053000
+#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
// printf style for qCDebug was only added in Qt 5.3
@@ -124,6 +124,6 @@ private:
for (bool q_category_enabled = category().isCriticalEnabled(); q_category_enabled; q_category_enabled = false) \
QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, category().categoryName()).critical(__VA_ARGS__)
-#endif // QT_VERSION < 0x053000
-#endif // QT_VERSION < 0x052000
+#endif // QT_VERSION < QT_VERSION_CHECK(5, 3, 0)
+#endif // QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
#endif // LOGGING_H
diff --git a/src/libs/utils/process_ctrlc_stub.qbs b/src/libs/utils/process_ctrlc_stub.qbs
index 8f0a3f763c..aec4ffbf7e 100644
--- a/src/libs/utils/process_ctrlc_stub.qbs
+++ b/src/libs/utils/process_ctrlc_stub.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/src/libs/utils/process_stub.qbs b/src/libs/utils/process_stub.qbs
index 6f1a06310c..8ef2dd51fb 100644
--- a/src/libs/utils/process_stub.qbs
+++ b/src/libs/utils/process_stub.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp
index bb31af4f06..5ede9bcc6b 100644
--- a/src/libs/utils/synchronousprocess.cpp
+++ b/src/libs/utils/synchronousprocess.cpp
@@ -188,7 +188,8 @@ void ChannelBuffer::clearForRun()
QString ChannelBuffer::linesRead()
{
// Any new lines?
- const int lastLineIndex = data.lastIndexOf(QLatin1Char('\n'));
+ const int lastLineIndex = qMax(data.lastIndexOf(QLatin1Char('\n')),
+ data.lastIndexOf(QLatin1Char('\r')));
if (lastLineIndex == -1 || lastLineIndex <= bufferPos)
return QString();
const int nextBufferPos = lastLineIndex + 1;
@@ -719,20 +720,8 @@ QString SynchronousProcess::locateBinary(const QString &path, const QString &bin
QString SynchronousProcess::normalizeNewlines(const QString &text)
{
- const QChar cr(QLatin1Char('\r'));
- const QChar lf(QLatin1Char('\n'));
- QString res;
- res.reserve(text.size());
- for (int i = 0, count = text.size(); i < count; ++i) {
- const QChar c = text.at(i);
- if (c == cr) {
- res += lf;
- if (i + 1 < count && text.at(i + 1) == lf)
- ++i;
- } else {
- res += c;
- }
- }
+ QString res = text;
+ res.replace(QLatin1String("\r\n"), QLatin1String("\n"));
return res;
}
diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs
index 987adc0db7..0714e853d2 100644
--- a/src/libs/utils/utils.qbs
+++ b/src/libs/utils/utils.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/libs/zeroconf/zeroconf.qbs b/src/libs/zeroconf/zeroconf.qbs
index d16f576b1b..935f63b406 100644
--- a/src/libs/zeroconf/zeroconf.qbs
+++ b/src/libs/zeroconf/zeroconf.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/plugins/analyzerbase/analyzerbase.qbs b/src/plugins/analyzerbase/analyzerbase.qbs
index 4249cec137..6506ed43cd 100644
--- a/src/plugins/analyzerbase/analyzerbase.qbs
+++ b/src/plugins/analyzerbase/analyzerbase.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/android/android.qbs b/src/plugins/android/android.qbs
index c79434734e..4e59499c94 100644
--- a/src/plugins/android/android.qbs
+++ b/src/plugins/android/android.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/android/androidanalyzesupport.cpp b/src/plugins/android/androidanalyzesupport.cpp
index 858920512f..7c24ecfa6f 100644
--- a/src/plugins/android/androidanalyzesupport.cpp
+++ b/src/plugins/android/androidanalyzesupport.cpp
@@ -114,10 +114,12 @@ void AndroidAnalyzeSupport::handleRemoteOutput(const QByteArray &output)
void AndroidAnalyzeSupport::handleRemoteErrorOutput(const QByteArray &output)
{
+ const QString msg = QString::fromUtf8(output);
if (m_runControl)
- m_runControl->logApplicationMessage(QString::fromUtf8(output), Utils::StdErrFormatSameLine);
+ m_runControl->logApplicationMessage(msg, Utils::StdErrFormatSameLine);
else
AndroidRunSupport::handleRemoteErrorOutput(output);
+ m_outputParser.processOutput(msg);
}
void AndroidAnalyzeSupport::remoteIsRunning()
diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp
index bc0a939e39..609e5e13e0 100644
--- a/src/plugins/android/androidconfigurations.cpp
+++ b/src/plugins/android/androidconfigurations.cpp
@@ -574,7 +574,9 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevices() const
break;
if (line.contains(QLatin1String("Target:")))
dev.sdk = line.mid(line.lastIndexOf(QLatin1Char(' '))).remove(QLatin1Char(')')).toInt();
- if (line.contains(QLatin1String("ABI:")))
+ if (line.contains(QLatin1String("Tag/ABI:")))
+ dev.cpuAbi = QStringList() << line.mid(line.lastIndexOf(QLatin1Char('/')) +1);
+ else if (line.contains(QLatin1String("ABI:")))
dev.cpuAbi = QStringList() << line.mid(line.lastIndexOf(QLatin1Char(' '))).trimmed();
}
// armeabi-v7a devices can also run armeabi code
@@ -884,8 +886,9 @@ void AndroidConfigurations::setConfig(const AndroidConfig &devConfigs)
m_instance->m_config = devConfigs;
m_instance->save();
- m_instance->updateAutomaticKitList();
m_instance->updateAndroidDevice();
+ m_instance->updateToolChainList();
+ m_instance->updateAutomaticKitList();
emit m_instance->updated();
}
@@ -944,6 +947,32 @@ static bool equalKits(Kit *a, Kit *b)
&& QtSupport::QtKitInformation::qtVersion(a) == QtSupport::QtKitInformation::qtVersion(b);
}
+void AndroidConfigurations::updateToolChainList()
+{
+ QList<ToolChain *> existingToolChains = ToolChainManager::toolChains();
+ QList<ToolChain *> toolchains = AndroidToolChainFactory::createToolChainsForNdk(AndroidConfigurations::currentConfig().ndkLocation());
+ foreach (ToolChain *tc, toolchains) {
+ bool found = false;
+ for (int i = 0; i < existingToolChains.count(); ++i) {
+ if (*(existingToolChains.at(i)) == *tc) {
+ found = true;
+ break;
+ }
+ }
+ if (found)
+ delete tc;
+ else
+ ToolChainManager::registerToolChain(tc);
+ }
+
+ foreach (ToolChain *tc, existingToolChains) {
+ if (tc->type() == QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) {
+ if (!tc->isValid())
+ ToolChainManager::deregisterToolChain(tc);
+ }
+ }
+}
+
void AndroidConfigurations::updateAutomaticKitList()
{
QList<AndroidToolChain *> toolchains;
diff --git a/src/plugins/android/androidconfigurations.h b/src/plugins/android/androidconfigurations.h
index 9d2fcc630a..1f2be2a0c4 100644
--- a/src/plugins/android/androidconfigurations.h
+++ b/src/plugins/android/androidconfigurations.h
@@ -185,6 +185,7 @@ public:
static QString defaultDevice(ProjectExplorer::Project *project, const QString &abi); // serial number or avd name
public slots:
static void clearDefaultDevices(ProjectExplorer::Project *project);
+ static void updateToolChainList();
static void updateAutomaticKitList();
signals:
diff --git a/src/plugins/android/androiddeployqtwidget.ui b/src/plugins/android/androiddeployqtwidget.ui
index d1fa06ddbf..dff8cad50a 100644
--- a/src/plugins/android/androiddeployqtwidget.ui
+++ b/src/plugins/android/androiddeployqtwidget.ui
@@ -248,7 +248,7 @@
<item>
<widget class="QRadioButton" name="ministroOption">
<property name="toolTip">
- <string>Use the external Ministro application to download and maintain Qt libraries.</string>
+ <string>Uses the external Ministro application to download and maintain Qt libraries.</string>
</property>
<property name="text">
<string>Use Ministro service to install Qt</string>
@@ -261,7 +261,7 @@
<item>
<widget class="QRadioButton" name="temporaryQtOption">
<property name="toolTip">
- <string>Push local Qt libraries to device. You must have Qt libraries compiled for that platform.
+ <string>Pushes local Qt libraries to device. You must have Qt libraries compiled for that platform.
The APK will not be usable on any other device.</string>
</property>
<property name="text">
diff --git a/src/plugins/android/androiddeploystepwidget.ui b/src/plugins/android/androiddeploystepwidget.ui
index 9db955796d..5973527807 100644
--- a/src/plugins/android/androiddeploystepwidget.ui
+++ b/src/plugins/android/androiddeploystepwidget.ui
@@ -29,7 +29,7 @@
<item>
<widget class="QRadioButton" name="ministroOption">
<property name="toolTip">
- <string>Use the external Ministro application to download and maintain Qt libraries.</string>
+ <string>Uses the external Ministro application to download and maintain Qt libraries.</string>
</property>
<property name="text">
<string>Use Ministro service to install Qt</string>
@@ -42,7 +42,7 @@
<item>
<widget class="QRadioButton" name="temporaryQtOption">
<property name="toolTip">
- <string>Push local Qt libraries to device. You must have Qt libraries compiled for that platform.
+ <string>Pushes local Qt libraries to device. You must have Qt libraries compiled for that platform.
The APK will not be usable on any other device.</string>
</property>
<property name="text">
diff --git a/src/plugins/android/androiddevicedialog.cpp b/src/plugins/android/androiddevicedialog.cpp
index ff243188f6..ff6b422757 100644
--- a/src/plugins/android/androiddevicedialog.cpp
+++ b/src/plugins/android/androiddevicedialog.cpp
@@ -33,6 +33,7 @@
#include <QPainter>
#include <QStyledItemDelegate>
+#include <QToolTip>
using namespace Android;
using namespace Android::Internal;
@@ -386,6 +387,17 @@ AndroidDeviceDialog::AndroidDeviceDialog(int apiLevel, const QString &abi, QWidg
m_ui->defaultDeviceCheckBox->setText(tr("Always use this device for architecture %1").arg(abi));
+ m_ui->noDeviceFoundLabel->setText(tr("<p align=\"center\"><span style=\" font-size:16pt;\">"
+ "No Device Found</span></p>"
+ "<br/>"
+ "<p>Connect an Android device via USB and activate developer mode on it. "
+ "Some devices require the installation of a USB driver.</p>"
+ "<br/>"
+ "<p>The adb tool in the Android SDK lists all connected devices if run via &quot;adb devices&quot;.</p>"
+ ));
+ connect(m_ui->missingLabel, SIGNAL(linkActivated(QString)),
+ this, SLOT(showHelp()));
+
connect(m_ui->refreshDevicesButton, SIGNAL(clicked()),
this, SLOT(refreshDeviceList()));
@@ -445,6 +457,8 @@ void AndroidDeviceDialog::refreshDeviceList()
newIndex = m_model->indexFor(devices.first().serialNumber);
m_ui->deviceView->setCurrentIndex(newIndex);
+
+ m_ui->stackedWidget->setCurrentIndex(devices.isEmpty() ? 1 : 0);
}
void AndroidDeviceDialog::createAvd()
@@ -470,3 +484,13 @@ void AndroidDeviceDialog::clickedOnView(const QModelIndex &idx)
}
}
}
+
+void AndroidDeviceDialog::showHelp()
+{
+ QPoint pos = m_ui->missingLabel->pos();
+ pos = m_ui->missingLabel->parentWidget()->mapToGlobal(pos);
+ QToolTip::showText(pos, tr("<p>Connect an Android device via USB and activate developer mode on it. "
+ "Some devices require the installation of a USB driver.</p>"
+ "<p>The adb tool in the Android SDK lists all connected devices if run via &quot;adb devices&quot;.</p>"),
+ this);
+}
diff --git a/src/plugins/android/androiddevicedialog.h b/src/plugins/android/androiddevicedialog.h
index 0c5c5ed964..6cb4202ab7 100644
--- a/src/plugins/android/androiddevicedialog.h
+++ b/src/plugins/android/androiddevicedialog.h
@@ -62,6 +62,7 @@ private slots:
void refreshDeviceList();
void createAvd();
void clickedOnView(const QModelIndex &idx);
+ void showHelp();
private:
AndroidDeviceModel *m_model;
Ui::AndroidDeviceDialog *m_ui;
diff --git a/src/plugins/android/androiddevicedialog.ui b/src/plugins/android/androiddevicedialog.ui
index c64465e143..ef02aa4391 100644
--- a/src/plugins/android/androiddevicedialog.ui
+++ b/src/plugins/android/androiddevicedialog.ui
@@ -6,36 +6,29 @@
<rect>
<x>0</x>
<y>0</y>
- <width>618</width>
- <height>400</height>
+ <width>636</width>
+ <height>438</height>
</rect>
</property>
<property name="windowTitle">
<string>Select Android Device</string>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="1" column="0">
- <widget class="QPushButton" name="refreshDevicesButton">
+ <item row="3" column="0" colspan="2">
+ <widget class="QCheckBox" name="defaultDeviceCheckBox">
<property name="text">
- <string>Refresh Device List</string>
+ <string>Always use this device for architecture %1</string>
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="2" column="1">
<widget class="QPushButton" name="createAVDButton">
<property name="text">
<string>Create Android Virtual Device</string>
</property>
</widget>
</item>
- <item row="2" column="0" colspan="2">
- <widget class="QCheckBox" name="defaultDeviceCheckBox">
- <property name="text">
- <string>Always use this device for architecture %1</string>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
+ <item row="4" column="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -45,14 +38,62 @@
</property>
</widget>
</item>
+ <item row="2" column="0">
+ <widget class="QPushButton" name="refreshDevicesButton">
+ <property name="text">
+ <string>Refresh Device List</string>
+ </property>
+ </widget>
+ </item>
<item row="0" column="0" colspan="3">
- <widget class="QTreeView" name="deviceView">
- <property name="minimumSize">
- <size>
- <width>600</width>
- <height>300</height>
- </size>
+ <widget class="QStackedWidget" name="stackedWidget">
+ <property name="currentIndex">
+ <number>0</number>
</property>
+ <widget class="QWidget" name="devicesPage">
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="1" column="0">
+ <widget class="QTreeView" name="deviceView">
+ <property name="minimumSize">
+ <size>
+ <width>600</width>
+ <height>300</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="missingLabel">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;aaa&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;My device is missing&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="noDevicesPage">
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="noDeviceFoundLabel">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
</layout>
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index 35a2c6b8d2..3c5e1397db 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -39,6 +39,7 @@
#include <coreplugin/documentmanager.h>
#include <coreplugin/messagemanager.h>
+#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
@@ -631,7 +632,7 @@ bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *
}
if (forceUpdate)
- QMessageBox::warning(0, tr("Warning"), tr("Android files have been updated automatically."));
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Warning"), tr("Android files have been updated automatically."));
return true;
}
diff --git a/src/plugins/android/androidmanifesteditorwidget.cpp b/src/plugins/android/androidmanifesteditorwidget.cpp
index 4edea40f16..4dbf918573 100644
--- a/src/plugins/android/androidmanifesteditorwidget.cpp
+++ b/src/plugins/android/androidmanifesteditorwidget.cpp
@@ -66,6 +66,7 @@
#include <QPushButton>
#include <QFileDialog>
#include <QTimer>
+#include <QCheckBox>
using namespace ProjectExplorer;
using namespace Android;
@@ -278,16 +279,21 @@ void AndroidManifestEditorWidget::initializePage()
{
QGridLayout *layout = new QGridLayout(permissionsGroupBox);
+ m_defaultPermissonsCheckBox = new QCheckBox(this);
+ m_defaultPermissonsCheckBox->setText(tr("Include default permissions and features for Qt modules."));
+ m_defaultPermissonsCheckBox->setTristate(true);
+ layout->addWidget(m_defaultPermissonsCheckBox, 0, 0);
+
m_permissionsModel = new PermissionsModel(this);
m_permissionsListView = new QListView(permissionsGroupBox);
m_permissionsListView->setModel(m_permissionsModel);
m_permissionsListView->setMinimumSize(QSize(0, 200));
- layout->addWidget(m_permissionsListView, 0, 0, 3, 1);
+ layout->addWidget(m_permissionsListView, 1, 0, 3, 1);
m_removePermissionButton = new QPushButton(permissionsGroupBox);
m_removePermissionButton->setText(tr("Remove"));
- layout->addWidget(m_removePermissionButton, 0, 1);
+ layout->addWidget(m_removePermissionButton, 1, 1);
m_permissionsComboBox = new QComboBox(permissionsGroupBox);
m_permissionsComboBox->insertItems(0, QStringList()
@@ -423,14 +429,17 @@ void AndroidManifestEditorWidget::initializePage()
<< QLatin1String("android.permission.WRITE_USER_DICTIONARY")
);
m_permissionsComboBox->setEditable(true);
- layout->addWidget(m_permissionsComboBox, 4, 0);
+ layout->addWidget(m_permissionsComboBox, 5, 0);
m_addPermissionButton = new QPushButton(permissionsGroupBox);
m_addPermissionButton->setText(tr("Add"));
- layout->addWidget(m_addPermissionButton, 4, 1);
+ layout->addWidget(m_addPermissionButton, 5, 1);
permissionsGroupBox->setLayout(layout);
+ connect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
+ this, SLOT(defaultPermissionCheckBoxClicked()));
+
connect(m_addPermissionButton, SIGNAL(clicked()),
this, SLOT(addPermission()));
connect(m_removePermissionButton, SIGNAL(clicked()),
@@ -791,6 +800,29 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
m_mIconPath.clear();
m_hIconPath.clear();
+ disconnect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
+ this, SLOT(defaultPermissionCheckBoxClicked()));
+
+ m_defaultPermissonsCheckBox->setChecked(false);
+ QDomNodeList manifestChilds = manifest.childNodes();
+ bool foundPermissionComment = false;
+ bool foundFeatureComment = false;
+ for (int i = 0; i < manifestChilds.size(); ++i) {
+ const QDomNode &child = manifestChilds.at(i);
+ if (child.isComment()) {
+ QDomComment comment = child.toComment();
+ if (comment.data().trimmed() == QLatin1String("%%INSERT_PERMISSIONS"))
+ foundPermissionComment = true;
+ else if (comment.data().trimmed() == QLatin1String("%%INSERT_FEATURES"))
+ foundFeatureComment = true;
+ }
+ }
+
+ m_defaultPermissonsCheckBox->setCheckState(Qt::CheckState(foundFeatureComment + foundPermissionComment));
+
+ connect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
+ this, SLOT(defaultPermissionCheckBoxClicked()));
+
QStringList permissions;
QDomElement permissionElem = manifest.firstChildElement(QLatin1String("uses-permission"));
while (!permissionElem.isNull()) {
@@ -805,53 +837,6 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
m_dirty = false;
}
-void setUsesSdk(QDomDocument &doc, QDomElement &manifest, int minimumSdk, int targetSdk)
-{
- QDomElement usesSdk = manifest.firstChildElement(QLatin1String("uses-sdk"));
- if (usesSdk.isNull()) { // doesn't exist yet
- if (minimumSdk == 0 && targetSdk == 0) {
- // and doesn't need to exist
- } else {
- usesSdk = doc.createElement(QLatin1String("uses-sdk"));
- if (minimumSdk != 0)
- usesSdk.setAttribute(QLatin1String("android:minSdkVersion"), minimumSdk);
- if (targetSdk != 0)
- usesSdk.setAttribute(QLatin1String("android:targetSdkVersion"), targetSdk);
- manifest.appendChild(usesSdk);
- }
- } else {
- if (minimumSdk == 0 && targetSdk == 0) {
- // We might be able to remove the whole element
- // check if there are other attributes
- QDomNamedNodeMap usesSdkAttributes = usesSdk.attributes();
- bool keepNode = false;
- for (int i = 0; i < usesSdkAttributes.size(); ++i) {
- if (usesSdkAttributes.item(i).nodeName() != QLatin1String("android:minSdkVersion")
- && usesSdkAttributes.item(i).nodeName() != QLatin1String("android:targetSdkVersion")) {
- keepNode = true;
- break;
- }
- }
- if (keepNode) {
- usesSdk.removeAttribute(QLatin1String("android:minSdkVersion"));
- usesSdk.removeAttribute(QLatin1String("android:targetSdkVersion"));
- } else {
- manifest.removeChild(usesSdk);
- }
- } else {
- if (minimumSdk == 0)
- usesSdk.removeAttribute(QLatin1String("android:minSdkVersion"));
- else
- usesSdk.setAttribute(QLatin1String("android:minSdkVersion"), minimumSdk);
-
- if (targetSdk == 0)
- usesSdk.removeAttribute(QLatin1String("android:targetSdkVersion"));
- else
- usesSdk.setAttribute(QLatin1String("android:targetSdkVersion"), targetSdk);
- }
- }
-}
-
int extractVersion(const QString &string)
{
if (!string.startsWith(QLatin1String("API")))
@@ -868,78 +853,360 @@ int extractVersion(const QString &string)
void AndroidManifestEditorWidget::syncToEditor()
{
- QDomDocument doc;
- if (!doc.setContent(m_textEditorWidget->toPlainText())) {
- // This should not happen
- updateInfoBar();
- return;
+ QString result;
+ QXmlStreamReader reader(m_textEditorWidget->toPlainText());
+ reader.setNamespaceProcessing(false);
+ QXmlStreamWriter writer(&result);
+ writer.setAutoFormatting(true);
+ writer.setAutoFormattingIndent(4);
+ while (!reader.atEnd()) {
+ reader.readNext();
+ if (reader.hasError()) {
+ // This should not happen
+ updateInfoBar();
+ return;
+ } else {
+ if (reader.name() == QLatin1String("manifest"))
+ parseManifest(reader, writer);
+ else if (reader.isStartElement())
+ parseUnknownElement(reader, writer);
+ else
+ writer.writeCurrentToken(reader);
+ }
}
- QDomElement manifest = doc.documentElement();
- manifest.setAttribute(QLatin1String("package"), m_packageNameLineEdit->text());
- manifest.setAttribute(QLatin1String("android:versionCode"), m_versionCode->value());
- manifest.setAttribute(QLatin1String("android:versionName"), m_versionNameLinedit->text());
+ if (result == m_textEditorWidget->toPlainText())
+ return;
- if (!m_appNameInStringsXml) {
- QDomElement application = manifest.firstChildElement(QLatin1String("application"));
- application.setAttribute(QLatin1String("android:label"), m_appNameLineEdit->text());
- }
+ m_textEditorWidget->setPlainText(result);
+ m_textEditorWidget->document()->setModified(true);
- setUsesSdk(doc, manifest, extractVersion(m_androidMinSdkVersion->currentText()),
- extractVersion(m_androidTargetSdkVersion->currentText()));
+ m_dirty = false;
+}
- setAndroidAppLibName(doc, manifest.firstChildElement(QLatin1String("application"))
- .firstChildElement(QLatin1String("activity")),
- m_targetLineEdit->currentText());
+namespace {
+QXmlStreamAttributes modifyXmlStreamAttributes(const QXmlStreamAttributes &input, const QStringList &keys,
+ const QStringList values, const QStringList &remove = QStringList())
+{
+ Q_ASSERT(keys.size() == values.size());
+ QXmlStreamAttributes result;
+ result.reserve(input.size());
+ foreach (const QXmlStreamAttribute &attribute, input) {
+ const QString &name = attribute.qualifiedName().toString();
+ if (remove.contains(name))
+ continue;
+ int index = keys.indexOf(name);
+ if (index == -1)
+ result.push_back(attribute);
+ else
+ result.push_back(QXmlStreamAttribute(name,
+ values.at(index)));
+ }
- // permissions
- QDomElement permissionElem = manifest.firstChildElement(QLatin1String("uses-permission"));
- while (!permissionElem.isNull()) {
- manifest.removeChild(permissionElem);
- permissionElem = manifest.firstChildElement(QLatin1String("uses-permission"));
+ for (int i = 0; i < keys.size(); ++i) {
+ if (!result.hasAttribute(keys.at(i)))
+ result.push_back(QXmlStreamAttribute(keys.at(i), values.at(i)));
}
+ return result;
+}
+} // end namespace
+
+void AndroidManifestEditorWidget::parseManifest(QXmlStreamReader &reader, QXmlStreamWriter &writer)
+{
+ Q_ASSERT(reader.isStartElement());
+ writer.writeStartElement(reader.name().toString());
+
+ QXmlStreamAttributes attributes = reader.attributes();
+ QStringList keys = QStringList()
+ << QLatin1String("package")
+ << QLatin1String("android:versionCode")
+ << QLatin1String("android:versionName");
+ QStringList values = QStringList()
+ << m_packageNameLineEdit->text()
+ << QString::number(m_versionCode->value())
+ << m_versionNameLinedit->text();
+
+ QXmlStreamAttributes result = modifyXmlStreamAttributes(attributes, keys, values);
+ writer.writeAttributes(result);
+
+ QSet<QString> permissions = m_permissionsModel->permissions().toSet();
+
+ bool foundUsesSdk = false;
+ bool foundPermissionComment = false;
+ bool foundFeatureComment = false;
+ reader.readNext();
+ while (!reader.atEnd()) {
+ if (reader.name() == QLatin1String("application")) {
+ parseApplication(reader, writer);
+ } else if (reader.name() == QLatin1String("uses-sdk")) {
+ parseUsesSdk(reader, writer);
+ foundUsesSdk = true;
+ } else if (reader.name() == QLatin1String("uses-permission")) {
+ permissions.remove(parseUsesPermission(reader, writer, permissions));
+ } else if (reader.isEndElement()) {
+ if (!foundUsesSdk) {
+ int minimumSdk = extractVersion(m_androidMinSdkVersion->currentText());
+ int targetSdk = extractVersion(m_androidTargetSdkVersion->currentText());
+ if (minimumSdk == 0 && targetSdk == 0) {
+ // and doesn't need to exist
+ } else {
+ writer.writeEmptyElement(QLatin1String("uses-sdk"));
+ if (minimumSdk != 0)
+ writer.writeAttribute(QLatin1String("android:minSdkVersion"),
+ QString::number(minimumSdk));
+ if (targetSdk != 0)
+ writer.writeAttribute(QLatin1String("android:targetSdkVersion"),
+ QString::number(targetSdk));
+ }
+ }
+
+ if (!foundPermissionComment && m_defaultPermissonsCheckBox->checkState() == Qt::Checked)
+ writer.writeComment(QLatin1String(" %%INSERT_PERMISSIONS "));
+
+ if (!foundFeatureComment && m_defaultPermissonsCheckBox->checkState() == Qt::Checked)
+ writer.writeComment(QLatin1String(" %%INSERT_FEATURES "));
- foreach (const QString &permission, m_permissionsModel->permissions()) {
- permissionElem = doc.createElement(QLatin1String("uses-permission"));
- permissionElem.setAttribute(QLatin1String("android:name"), permission);
- manifest.appendChild(permissionElem);
+ if (!permissions.isEmpty()) {
+ foreach (const QString &permission, permissions) {
+ writer.writeEmptyElement(QLatin1String("uses-permission"));
+ writer.writeAttribute(QLatin1String("android:name"), permission);
+ }
+ }
+
+ writer.writeCurrentToken(reader);
+ return;
+ } else if (reader.isComment()) {
+ QString commentText = parseComment(reader, writer);
+ if (commentText == QLatin1String("%%INSERT_PERMISSIONS"))
+ foundPermissionComment = true;
+ else if (commentText == QLatin1String("%%INSERT_FEATURES"))
+ foundFeatureComment = true;
+ } else if (reader.isStartElement()) {
+ parseUnknownElement(reader, writer);
+ } else {
+ writer.writeCurrentToken(reader);
+ }
+ reader.readNext();
}
+}
+
+void AndroidManifestEditorWidget::parseApplication(QXmlStreamReader &reader, QXmlStreamWriter &writer)
+{
+ Q_ASSERT(reader.isStartElement());
+ writer.writeStartElement(reader.name().toString());
+ QXmlStreamAttributes attributes = reader.attributes();
+ QStringList keys;
+ QStringList values;
+ if (!m_appNameInStringsXml) {
+ keys << QLatin1String("android:label");
+ values << m_appNameLineEdit->text();
+ }
bool ensureIconAttribute = !m_lIconPath.isEmpty()
|| !m_mIconPath.isEmpty()
|| !m_hIconPath.isEmpty();
-
if (ensureIconAttribute) {
- QDomElement applicationElem = manifest.firstChildElement(QLatin1String("application"));
- applicationElem.setAttribute(QLatin1String("android:icon"), QLatin1String("@drawable/icon"));
+ keys << QLatin1String("android:icon");
+ values << QLatin1String("@drawable/icon");
}
+ QXmlStreamAttributes result = modifyXmlStreamAttributes(attributes, keys, values);
+ writer.writeAttributes(result);
- QString newText = doc.toString(4);
- if (newText == m_textEditorWidget->toPlainText())
- return;
+ reader.readNext();
- m_textEditorWidget->setPlainText(newText);
- m_textEditorWidget->document()->setModified(true);
+ while (!reader.atEnd()) {
+ if (reader.isEndElement()) {
+ writer.writeCurrentToken(reader);
+ return;
+ } else if (reader.isStartElement()) {
+ if (reader.name() == QLatin1String("activity"))
+ parseActivity(reader, writer);
+ else
+ parseUnknownElement(reader, writer);
+ } else {
+ writer.writeCurrentToken(reader);
+ }
- m_dirty = false;
+ reader.readNext();
+ }
}
-bool AndroidManifestEditorWidget::setAndroidAppLibName(QDomDocument document, QDomElement activity, const QString &name)
+void AndroidManifestEditorWidget::parseActivity(QXmlStreamReader &reader, QXmlStreamWriter &writer)
{
- QDomElement metadataElem = activity.firstChildElement(QLatin1String("meta-data"));
- while (!metadataElem.isNull()) {
- if (metadataElem.attribute(QLatin1String("android:name")) == QLatin1String("android.app.lib_name")) {
- metadataElem.setAttribute(QLatin1String("android:value"), name);
- return true;
+ Q_ASSERT(reader.isStartElement());
+ writer.writeCurrentToken(reader);
+ reader.readNext();
+
+ bool found = false;
+
+ while (!reader.atEnd()) {
+ if (reader.isEndElement()) {
+ if (!found) {
+ writer.writeEmptyElement(QLatin1String("meta-data"));
+ writer.writeAttribute(QLatin1String("android:name"),
+ QLatin1String("android.app.lib_name"));
+ writer.writeAttribute(QLatin1String("android:value"),
+ m_targetLineEdit->currentText());
+ }
+ writer.writeCurrentToken(reader);
+ return;
+ } else if (reader.isStartElement()) {
+ if (reader.name() == QLatin1String("meta-data"))
+ found = parseMetaData(reader, writer) || found; // ORDER MATTERS
+ else
+ parseUnknownElement(reader, writer);
+ } else {
+ writer.writeCurrentToken(reader);
}
- metadataElem = metadataElem.nextSiblingElement(QLatin1String("meta-data"));
+ reader.readNext();
+ }
+}
+
+bool AndroidManifestEditorWidget::parseMetaData(QXmlStreamReader &reader, QXmlStreamWriter &writer)
+{
+ Q_ASSERT(reader.isStartElement());
+
+ bool found = false;
+ QXmlStreamAttributes attributes = reader.attributes();
+ QXmlStreamAttributes result;
+
+ if (attributes.value(QLatin1String("android:name")) == QLatin1String("android.app.lib_name")) {
+ QStringList keys = QStringList() << QLatin1String("android:value");
+ QStringList values = QStringList() << m_targetLineEdit->currentText();
+ result = modifyXmlStreamAttributes(attributes, keys, values);
+ found = true;
+ } else {
+ result = attributes;
+ }
+
+ writer.writeStartElement(QLatin1String("meta-data"));
+ writer.writeAttributes(result);
+
+ reader.readNext();
+
+ while (!reader.atEnd()) {
+ if (reader.isEndElement()) {
+ writer.writeCurrentToken(reader);
+ return found;
+ } else if (reader.isStartElement()) {
+ parseUnknownElement(reader, writer);
+ } else {
+ writer.writeCurrentToken(reader);
+ }
+ reader.readNext();
+ }
+ return found; // should never be reached
+}
+
+void AndroidManifestEditorWidget::parseUsesSdk(QXmlStreamReader &reader, QXmlStreamWriter & writer)
+{
+ int minimumSdk = extractVersion(m_androidMinSdkVersion->currentText());
+ int targetSdk = extractVersion(m_androidTargetSdkVersion->currentText());
+
+ QStringList keys;
+ QStringList values;
+ QStringList remove;
+ if (minimumSdk == 0) {
+ remove << QLatin1String("android:minSdkVersion");
+ } else {
+ keys << QLatin1String("android:minSdkVersion");
+ values << QString::number(minimumSdk);
+ }
+ if (targetSdk == 0) {
+ remove << QLatin1String("android:targetSdkVersion");
+ } else {
+ keys << QLatin1String("android:targetSdkVersion");
+ values << QString::number(targetSdk);
+ }
+
+ QXmlStreamAttributes result = modifyXmlStreamAttributes(reader.attributes(),
+ keys, values, remove);
+ bool removeUseSdk = result.isEmpty();
+ if (!removeUseSdk) {
+ writer.writeStartElement(reader.name().toString());
+ writer.writeAttributes(result);
+ }
+
+ reader.readNext();
+ while (!reader.atEnd()) {
+ if (reader.isEndElement()) {
+ if (!removeUseSdk)
+ writer.writeCurrentToken(reader);
+ return;
+ } else {
+ if (removeUseSdk) {
+ removeUseSdk = false;
+ writer.writeStartElement(QLatin1String("uses-sdk"));
+ }
+
+ if (reader.isStartElement())
+ parseUnknownElement(reader, writer);
+ else
+ writer.writeCurrentToken(reader);
+ }
+ reader.readNext();
+ }
+}
+
+QString AndroidManifestEditorWidget::parseUsesPermission(QXmlStreamReader &reader, QXmlStreamWriter &writer, const QSet<QString> permissions)
+{
+ Q_ASSERT(reader.isStartElement());
+
+
+ QString permissionName = reader.attributes().value(QLatin1String("android:name")).toString();
+ bool writePermission = permissions.contains(permissionName);
+ if (writePermission)
+ writer.writeCurrentToken(reader);
+ reader.readNext();
+
+ while (!reader.atEnd()) {
+ if (reader.isEndElement()) {
+ if (writePermission)
+ writer.writeCurrentToken(reader);
+ return permissionName;
+ } else if (reader.isStartElement()) {
+ parseUnknownElement(reader, writer);
+ } else {
+ writer.writeCurrentToken(reader);
+ }
+ reader.readNext();
+ }
+ return permissionName; // should not be reached
+}
+
+QString AndroidManifestEditorWidget::parseComment(QXmlStreamReader &reader, QXmlStreamWriter &writer)
+{
+ QString commentText = reader.text().toString().trimmed();
+ if (commentText == QLatin1String("%%INSERT_PERMISSIONS")
+ || commentText == QLatin1String("%%INSERT_FEATURES")) {
+ if (m_defaultPermissonsCheckBox->checkState() == Qt::Unchecked)
+ return commentText;
+
+ writer.writeCurrentToken(reader);
+ return commentText;
+ }
+ writer.writeCurrentToken(reader);
+ return QString();
+}
+
+void AndroidManifestEditorWidget::parseUnknownElement(QXmlStreamReader &reader, QXmlStreamWriter &writer)
+{
+ Q_ASSERT(reader.isStartElement());
+ writer.writeCurrentToken(reader);
+ reader.readNext();
+
+ while (!reader.atEnd()) {
+ if (reader.isEndElement()) {
+ writer.writeCurrentToken(reader);
+ return;
+ } else if (reader.isStartElement()) {
+ parseUnknownElement(reader, writer);
+ } else {
+ writer.writeCurrentToken(reader);
+ }
+ reader.readNext();
}
- QDomElement elem = document.createElement(QLatin1String("meta-data"));
- elem.setAttribute(QLatin1String("android:name"), QLatin1String("android.app.lib_name"));
- elem.setAttribute(QLatin1String("android:value"), name);
- activity.appendChild(elem);
- return true;
}
QString AndroidManifestEditorWidget::iconPath(const QString &baseDir, IconDPI dpi)
@@ -1021,6 +1288,13 @@ void AndroidManifestEditorWidget::setHDPIIcon()
setDirty(true);
}
+void AndroidManifestEditorWidget::defaultPermissionCheckBoxClicked()
+{
+ if (m_defaultPermissonsCheckBox->checkState() == Qt::PartiallyChecked)
+ m_defaultPermissonsCheckBox->setChecked(Qt::Checked);
+ setDirty(true);
+}
+
void AndroidManifestEditorWidget::updateAddRemovePermissionButtons()
{
QStringList permissions = m_permissionsModel->permissions();
diff --git a/src/plugins/android/androidmanifesteditorwidget.h b/src/plugins/android/androidmanifesteditorwidget.h
index ab19800e2f..bfc016cac2 100644
--- a/src/plugins/android/androidmanifesteditorwidget.h
+++ b/src/plugins/android/androidmanifesteditorwidget.h
@@ -39,6 +39,7 @@
#include <QTimer>
QT_BEGIN_NAMESPACE
+class QCheckBox;
class QDomDocument;
class QDomElement;
class QComboBox;
@@ -48,6 +49,8 @@ class QLineEdit;
class QListView;
class QSpinBox;
class QToolButton;
+class QXmlStreamReader;
+class QXmlStreamWriter;
QT_END_NAMESPACE
namespace Core { class IEditor; }
@@ -120,6 +123,7 @@ private slots:
void setLDPIIcon();
void setMDPIIcon();
void setHDPIIcon();
+ void defaultPermissionCheckBoxClicked();
void addPermission();
void removePermission();
void updateAddRemovePermissionButtons();
@@ -137,7 +141,6 @@ private:
void syncToEditor();
bool checkDocument(QDomDocument doc, QString *errorMessage, int *errorLine, int *errorColumn);
- bool setAndroidAppLibName(QDomDocument document, QDomElement activity, const QString &name);
enum IconDPI { LowDPI, MediumDPI, HighDPI };
QIcon icon(const QString &baseDir, IconDPI dpi);
QString iconPath(const QString &baseDir, IconDPI dpi);
@@ -147,6 +150,15 @@ private:
void hideInfoBar();
Q_SLOT void updateTargetComboBox();
+ void parseManifest(QXmlStreamReader &reader, QXmlStreamWriter &writer);
+ void parseApplication(QXmlStreamReader &reader, QXmlStreamWriter &writer);
+ void parseActivity(QXmlStreamReader &reader, QXmlStreamWriter &writer);
+ bool parseMetaData(QXmlStreamReader &reader, QXmlStreamWriter &writer);
+ void parseUsesSdk(QXmlStreamReader &reader, QXmlStreamWriter &writer);
+ QString parseUsesPermission(QXmlStreamReader &reader, QXmlStreamWriter &writer, const QSet<QString> permissions);
+ QString parseComment(QXmlStreamReader &reader, QXmlStreamWriter &writer);
+ void parseUnknownElement(QXmlStreamReader &reader, QXmlStreamWriter &writer);
+
bool m_dirty; // indicates that we need to call syncToEditor()
bool m_stayClean;
bool m_setAppName;
@@ -173,6 +185,7 @@ private:
QString m_hIconPath;
// Permissions
+ QCheckBox *m_defaultPermissonsCheckBox;
PermissionsModel *m_permissionsModel;
QListView *m_permissionsListView;
QPushButton *m_addPermissionButton;
diff --git a/src/plugins/android/androidpackagecreationwidget.ui b/src/plugins/android/androidpackagecreationwidget.ui
index 5f27b1d6e9..13b96df747 100644
--- a/src/plugins/android/androidpackagecreationwidget.ui
+++ b/src/plugins/android/androidpackagecreationwidget.ui
@@ -45,7 +45,7 @@
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="readInfoPushButton">
<property name="toolTip">
- <string>Automatically check required Qt libraries from compiled application</string>
+ <string>Automatically check required Qt libraries from compiled application.</string>
</property>
<property name="text">
<string>Read information from application (must be compiled)</string>
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp
index 7647876824..093958c85f 100644
--- a/src/plugins/android/androidrunner.cpp
+++ b/src/plugins/android/androidrunner.cpp
@@ -183,6 +183,7 @@ void AndroidRunner::checkPID()
emit remoteProcessStarted(-1, -1);
}
m_wasStarted = true;
+ logcatReadStandardOutput();
}
}
@@ -350,22 +351,17 @@ void AndroidRunner::stop()
m_adbLogcatProcess.waitForFinished();
}
-void AndroidRunner::logcatReadStandardError()
+void AndroidRunner::logcatProcess(const QByteArray &text, QByteArray &buffer, bool onlyError)
{
- emit remoteErrorOutput(m_adbLogcatProcess.readAllStandardError());
-}
-
-void AndroidRunner::logcatReadStandardOutput()
-{
- QList<QByteArray> lines = m_adbLogcatProcess.readAllStandardOutput().split('\n');
+ QList<QByteArray> lines = text.split('\n');
// lines always contains at least one item
- lines[0].prepend(m_logcat);
+ lines[0].prepend(buffer);
if (!lines.last().endsWith('\n')) {
// incomplete line
- m_logcat = lines.last();
+ buffer = lines.last();
lines.removeLast();
} else {
- m_logcat.clear();
+ buffer.clear();
}
QByteArray pid(QString::fromLatin1("%1):").arg(m_processPID).toLatin1());
@@ -375,7 +371,8 @@ void AndroidRunner::logcatReadStandardOutput()
if (line.endsWith('\r'))
line.chop(1);
line.append('\n');
- if (line.startsWith("E/")
+ if (onlyError || line.startsWith("F/")
+ || line.startsWith("E/")
|| line.startsWith("D/Qt")
|| line.startsWith("W/"))
emit remoteErrorOutput(line);
@@ -385,6 +382,18 @@ void AndroidRunner::logcatReadStandardOutput()
}
}
+void AndroidRunner::logcatReadStandardError()
+{
+ if (m_processPID != -1)
+ logcatProcess(m_adbLogcatProcess.readAllStandardError(), m_stderrBuffer, true);
+}
+
+void AndroidRunner::logcatReadStandardOutput()
+{
+ if (m_processPID != -1)
+ logcatProcess(m_adbLogcatProcess.readAllStandardOutput(), m_stdoutBuffer, false);
+}
+
void AndroidRunner::adbKill(qint64 pid)
{
{
diff --git a/src/plugins/android/androidrunner.h b/src/plugins/android/androidrunner.h
index b18aee29d2..a42034b557 100644
--- a/src/plugins/android/androidrunner.h
+++ b/src/plugins/android/androidrunner.h
@@ -82,6 +82,7 @@ private:
void forceStop();
QByteArray runPs();
void findPs();
+ void logcatProcess(const QByteArray &text, QByteArray &buffer, bool onlyError);
private:
QProcess m_adbLogcatProcess;
@@ -89,7 +90,8 @@ private:
bool m_wasStarted;
int m_tries;
- QByteArray m_logcat;
+ QByteArray m_stdoutBuffer;
+ QByteArray m_stderrBuffer;
QString m_intentName;
QString m_packageName;
QString m_deviceSerialNumber;
diff --git a/src/plugins/android/androidsettingspage.cpp b/src/plugins/android/androidsettingspage.cpp
index 3e51deb4f3..307cace4e4 100644
--- a/src/plugins/android/androidsettingspage.cpp
+++ b/src/plugins/android/androidsettingspage.cpp
@@ -62,31 +62,6 @@ QWidget *AndroidSettingsPage::widget()
void AndroidSettingsPage::apply()
{
m_widget->saveSettings();
-
- QList<ToolChain *> existingToolChains = ToolChainManager::toolChains();
- QList<ToolChain *> toolchains = AndroidToolChainFactory::createToolChainsForNdk(AndroidConfigurations::currentConfig().ndkLocation());
- foreach (ToolChain *tc, toolchains) {
- bool found = false;
- for (int i = 0; i < existingToolChains.count(); ++i) {
- if (*(existingToolChains.at(i)) == *tc) {
- found = true;
- break;
- }
- }
- if (found)
- delete tc;
- else
- ToolChainManager::registerToolChain(tc);
- }
-
- foreach (ToolChain *tc, existingToolChains) {
- if (tc->type() == QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) {
- if (!tc->isValid())
- ToolChainManager::deregisterToolChain(tc);
- }
- }
-
- AndroidConfigurations::updateAutomaticKitList();
}
void AndroidSettingsPage::finish()
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp
index 085a3bb412..b6bfdca48b 100644
--- a/src/plugins/android/androidsettingswidget.cpp
+++ b/src/plugins/android/androidsettingswidget.cpp
@@ -216,7 +216,7 @@ void AndroidSettingsWidget::check(AndroidSettingsWidget::Mode mode)
m_javaState = NotSet;
} else {
Utils::FileName bin = m_androidConfig.openJDKLocation();
- bin.appendPath(QLatin1String("bin"));
+ bin.appendPath(QLatin1String("bin/javac" QTC_HOST_EXE_SUFFIX));
if (!m_androidConfig.openJDKLocation().toFileInfo().exists()
|| !bin.toFileInfo().exists())
m_javaState = Error;
diff --git a/src/plugins/android/createandroidmanifestwizard.cpp b/src/plugins/android/createandroidmanifestwizard.cpp
index 5176b78930..bd8e0fbc52 100644
--- a/src/plugins/android/createandroidmanifestwizard.cpp
+++ b/src/plugins/android/createandroidmanifestwizard.cpp
@@ -95,7 +95,7 @@ void ChooseProFilePage::nodeSelected(int index)
// ChooseDirectoryPage
//
ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
- : m_wizard(wizard), m_androidPackageSourceDir(0)
+ : m_wizard(wizard), m_androidPackageSourceDir(0), m_complete(true)
{
QString androidPackageDir = m_wizard->node()->singleVariableValue(QmakeProjectManager::AndroidPackageSourceDir);
@@ -104,28 +104,68 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
label->setWordWrap(true);
fl->addRow(label);
+ m_sourceDirectoryWarning = new QLabel(this);
+ m_sourceDirectoryWarning->setVisible(false);
+ m_sourceDirectoryWarning->setText(tr("The Android package source directory can not be the same as the project directory."));
+ m_sourceDirectoryWarning->setWordWrap(true);
+ m_warningIcon = new QLabel(this);
+ m_warningIcon->setVisible(false);
+ m_warningIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_error.png")));
+ m_warningIcon->setWordWrap(true);
+ m_warningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+
+ QHBoxLayout *hbox = new QHBoxLayout;
+ hbox->addWidget(m_warningIcon);
+ hbox->addWidget(m_sourceDirectoryWarning);
+ hbox->setAlignment(m_warningIcon, Qt::AlignTop);
+
+ fl->addRow(hbox);
+
m_androidPackageSourceDir = new Utils::PathChooser(this);
m_androidPackageSourceDir->setExpectedKind(Utils::PathChooser::Directory);
fl->addRow(tr("Android package source directory:"), m_androidPackageSourceDir);
if (androidPackageDir.isEmpty()) {
- label->setText(tr("Select the Android package source directory. "
+ label->setText(tr("Select the Android package source directory.\n\n"
"The files in the Android package source directory are copied to the build directory's "
"Android directory and the default files are overwritten."));
m_androidPackageSourceDir->setPath(QFileInfo(m_wizard->node()->path()).absolutePath().append(QLatin1String("/android")));
+ connect(m_androidPackageSourceDir, SIGNAL(changed(QString)),
+ this, SLOT(checkPackageSourceDir()));
} else {
label->setText(tr("The Android manifest file will be created in the ANDROID_PACKAGE_SOURCE_DIR set in the .pro file."));
m_androidPackageSourceDir->setPath(androidPackageDir);
m_androidPackageSourceDir->setReadOnly(true);
}
+
m_wizard->setDirectory(m_androidPackageSourceDir->path());
connect(m_androidPackageSourceDir, SIGNAL(pathChanged(QString)),
m_wizard, SLOT(setDirectory(QString)));
}
+void ChooseDirectoryPage::checkPackageSourceDir()
+{
+ QString projectDir = QFileInfo(m_wizard->node()->path()).absolutePath();
+ QString newDir = m_androidPackageSourceDir->path();
+ bool isComplete = QFileInfo(projectDir) != QFileInfo(newDir);
+
+ m_sourceDirectoryWarning->setVisible(!isComplete);
+ m_warningIcon->setVisible(!isComplete);
+
+ if (isComplete != m_complete) {
+ m_complete = isComplete;
+ emit completeChanged();
+ }
+}
+
+bool ChooseDirectoryPage::isComplete() const
+{
+ return m_complete;
+}
+
//
// CreateAndroidManifestWizard
//
diff --git a/src/plugins/android/createandroidmanifestwizard.h b/src/plugins/android/createandroidmanifestwizard.h
index a92c610e6f..8cb8c95b7f 100644
--- a/src/plugins/android/createandroidmanifestwizard.h
+++ b/src/plugins/android/createandroidmanifestwizard.h
@@ -34,6 +34,7 @@
QT_BEGIN_NAMESPACE
class QComboBox;
+class QLabel;
QT_END_NAMESPACE
namespace ProjectExplorer { class Target; }
@@ -70,9 +71,16 @@ class ChooseDirectoryPage : public QWizardPage
Q_OBJECT
public:
ChooseDirectoryPage(CreateAndroidManifestWizard *wizard);
+protected:
+ bool isComplete() const;
+private slots:
+ void checkPackageSourceDir();
private:
CreateAndroidManifestWizard *m_wizard;
Utils::PathChooser *m_androidPackageSourceDir;
+ QLabel *m_sourceDirectoryWarning;
+ QLabel *m_warningIcon;
+ bool m_complete;
};
class CreateAndroidManifestWizard : public Utils::Wizard
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs b/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs
index cb64585b63..0d377593c4 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs
+++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp
index 355720d169..f7bee79cbd 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp
@@ -45,7 +45,7 @@ AutotoolsProjectNode::AutotoolsProjectNode(AutotoolsProject *project, Core::IDoc
{
}
-bool AutotoolsProjectNode::hasBuildTargets() const
+bool AutotoolsProjectNode::showInSimpleTree() const
{
return true;
}
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h
index a96e1485a2..8c96d0977a 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h
+++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h
@@ -57,7 +57,7 @@ class AutotoolsProjectNode : public ProjectExplorer::ProjectNode
public:
AutotoolsProjectNode(AutotoolsProject *project, Core::IDocument *projectFile);
- bool hasBuildTargets() const;
+ bool showInSimpleTree() const;
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
bool canAddSubProject(const QString &proFilePath) const;
bool addSubProjects(const QStringList &proFilePaths);
diff --git a/src/plugins/bazaar/bazaar.qbs b/src/plugins/bazaar/bazaar.qbs
index 92dfa3adff..cf7d7f3363 100644
--- a/src/plugins/bazaar/bazaar.qbs
+++ b/src/plugins/bazaar/bazaar.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/bazaar/bazaarcommitpanel.ui b/src/plugins/bazaar/bazaarcommitpanel.ui
index 1a57ceffa7..b0bb2d9410 100644
--- a/src/plugins/bazaar/bazaarcommitpanel.ui
+++ b/src/plugins/bazaar/bazaarcommitpanel.ui
@@ -37,7 +37,7 @@
<item row="2" column="1">
<widget class="QCheckBox" name="isLocalCheckBox">
<property name="toolTip">
- <string>Perform a local commit in a bound branch.
+ <string>Performs a local commit in a bound branch.
Local commits are not pushed to the master branch until a normal commit is performed.</string>
</property>
<property name="text">
diff --git a/src/plugins/bazaar/cloneoptionspanel.ui b/src/plugins/bazaar/cloneoptionspanel.ui
index 2d08db91e6..4a9e6ea712 100644
--- a/src/plugins/bazaar/cloneoptionspanel.ui
+++ b/src/plugins/bazaar/cloneoptionspanel.ui
@@ -49,7 +49,7 @@ This flag will allow branch to proceed.</string>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="stackedCheckBox">
<property name="toolTip">
- <string>Create a stacked branch referring to the source branch.
+ <string>Creates a stacked branch referring to the source branch.
The new branch will depend on the availability of the source branch for all operations.</string>
</property>
<property name="text">
@@ -60,7 +60,7 @@ The new branch will depend on the availability of the source branch for all oper
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="standAloneCheckBox">
<property name="toolTip">
- <string>Do not use a shared repository, even if available.</string>
+ <string>Does not use a shared repository, even if available.</string>
</property>
<property name="text">
<string>Standalone</string>
@@ -77,7 +77,7 @@ The new branch will depend on the availability of the source branch for all oper
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="switchCheckBox">
<property name="toolTip">
- <string>Switch the checkout in the current directory to the new branch.</string>
+ <string>Switches the checkout in the current directory to the new branch.</string>
</property>
<property name="text">
<string>Switch checkout</string>
@@ -87,7 +87,7 @@ The new branch will depend on the availability of the source branch for all oper
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="hardlinkCheckBox">
<property name="toolTip">
- <string>Hard-link working tree files where possible.</string>
+ <string>Hard-links working tree files where possible.</string>
</property>
<property name="text">
<string>Hardlink</string>
@@ -97,7 +97,7 @@ The new branch will depend on the availability of the source branch for all oper
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="noTreeCheckBox">
<property name="toolTip">
- <string>Create a branch without a working-tree.</string>
+ <string>Creates a branch without a working-tree.</string>
</property>
<property name="text">
<string>No working-tree</string>
diff --git a/src/plugins/bazaar/pullorpushdialog.ui b/src/plugins/bazaar/pullorpushdialog.ui
index 624265764e..d5584af946 100644
--- a/src/plugins/bazaar/pullorpushdialog.ui
+++ b/src/plugins/bazaar/pullorpushdialog.ui
@@ -47,7 +47,7 @@
<item row="2" column="0">
<widget class="QRadioButton" name="urlButton">
<property name="toolTip">
- <string>For example: https://[user[:pass]@]host[:port]/[path]</string>
+ <string>For example: 'https://[user[:pass]@]host[:port]/[path]'.</string>
</property>
<property name="text">
<string>Specify URL:</string>
@@ -60,7 +60,7 @@
<bool>false</bool>
</property>
<property name="toolTip">
- <string>For example: https://[user[:pass]@]host[:port]/[path]</string>
+ <string>For example: 'https://[user[:pass]@]host[:port]/[path]'.</string>
</property>
</widget>
</item>
@@ -86,7 +86,7 @@
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="overwriteCheckBox">
<property name="toolTip">
- <string>Ignore differences between branches and overwrite
+ <string>Ignores differences between branches and overwrites
unconditionally.</string>
</property>
<property name="text">
@@ -108,7 +108,7 @@ This flag will allow push to proceed.</string>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="createPrefixCheckBox">
<property name="toolTip">
- <string>Create the path leading up to the branch if it does not already exist.</string>
+ <string>Creates the path leading up to the branch if it does not already exist.</string>
</property>
<property name="text">
<string>Create prefix</string>
@@ -128,7 +128,7 @@ This flag will allow push to proceed.</string>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="localCheckBox">
<property name="toolTip">
- <string>Perform a local pull in a bound branch.
+ <string>Performs a local pull in a bound branch.
Local pulls are not applied to the master branch.</string>
</property>
<property name="text">
diff --git a/src/plugins/beautifier/artisticstyle/artisticstyle.cpp b/src/plugins/beautifier/artisticstyle/artisticstyle.cpp
index f9beea916f..b9b4d0bb4f 100644
--- a/src/plugins/beautifier/artisticstyle/artisticstyle.cpp
+++ b/src/plugins/beautifier/artisticstyle/artisticstyle.cpp
@@ -118,11 +118,12 @@ void ArtisticStyle::formatFile()
}
if (cfgFileName.isEmpty() && m_settings->useHomeFile()) {
- QString file = QDir::home().filePath(QLatin1String(".astylerc"));
+ const QDir homeDirectory = QDir::home();
+ QString file = homeDirectory.filePath(QLatin1String(".astylerc"));
if (QFile::exists(file)) {
cfgFileName = file;
} else {
- file = QDir::home().filePath(QLatin1String("astylerc"));
+ file = homeDirectory.filePath(QLatin1String("astylerc"));
if (QFile::exists(file))
cfgFileName = file;
}
diff --git a/src/plugins/beautifier/beautifier.qbs b/src/plugins/beautifier/beautifier.qbs
index 78ef3327ee..685f996e95 100644
--- a/src/plugins/beautifier/beautifier.qbs
+++ b/src/plugins/beautifier/beautifier.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/bineditor/bineditor.qbs b/src/plugins/bineditor/bineditor.qbs
index 2e3109aa85..7951c1180e 100644
--- a/src/plugins/bineditor/bineditor.qbs
+++ b/src/plugins/bineditor/bineditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/bookmarks/bookmarks.qbs b/src/plugins/bookmarks/bookmarks.qbs
index b7c3549f61..693357ebe1 100644
--- a/src/plugins/bookmarks/bookmarks.qbs
+++ b/src/plugins/bookmarks/bookmarks.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp
index dae5f1a835..79348e44bd 100644
--- a/src/plugins/clangcodemodel/clangutils.cpp
+++ b/src/plugins/clangcodemodel/clangutils.cpp
@@ -113,6 +113,11 @@ static QStringList buildDefines(const QByteArray &defines, bool toolchainDefines
if (def.isEmpty())
continue;
+ // This is a quick fix for QTCREATORBUG-11501.
+ // TODO: do a proper fix, see QTCREATORBUG-11709.
+ if (def.startsWith("#define __cplusplus"))
+ continue;
+
// TODO: verify if we can pass compiler-defined macros when also passing -undef.
if (toolchainDefines) {
//### FIXME: the next 3 check shouldn't be needed: we probably don't want to get the compiler-defined defines in.
diff --git a/src/plugins/clangcodemodel/cppcreatemarkers.cpp b/src/plugins/clangcodemodel/cppcreatemarkers.cpp
index aadf3b6b7e..5cbac36dda 100644
--- a/src/plugins/clangcodemodel/cppcreatemarkers.cpp
+++ b/src/plugins/clangcodemodel/cppcreatemarkers.cpp
@@ -32,6 +32,7 @@
#include <cplusplus/CppDocument.h>
#include <cpptools/cppmodelmanagerinterface.h>
+#include <utils/hostosinfo.h>
#include <utils/runextensions.h>
#include <QCoreApplication>
@@ -84,6 +85,17 @@ CreateMarkers::CreateMarkers(SemanticMarker::Ptr semanticMarker,
CreateMarkers::~CreateMarkers()
{ }
+static QString commandLine(const QStringList &options, const QString &fileName)
+{
+ const QStringList allOptions = QStringList(options)
+ << QLatin1String("-fsyntax-only") << fileName;
+ QStringList allOptionsQuoted;
+ foreach (const QString &option, allOptions)
+ allOptionsQuoted.append(QLatin1Char('\'') + option + QLatin1Char('\''));
+ return ::Utils::HostOsInfo::withExecutableSuffix(QLatin1String("clang"))
+ + QLatin1Char(' ') + allOptionsQuoted.join(QLatin1String(" "));
+}
+
void CreateMarkers::run()
{
QMutexLocker lock(m_marker->mutex());
@@ -95,7 +107,8 @@ void CreateMarkers::run()
QTime t;
if (DebugTiming) {
qDebug() << "*** Highlighting from" << m_firstLine << "to" << m_lastLine << "of" << m_fileName;
- qDebug() << "***** Options: " << m_options.join(QLatin1String(" "));
+ qDebug("***** Options (cmd line equivalent): %s",
+ commandLine(m_options, m_fileName).toUtf8().constData());
t.start();
}
diff --git a/src/plugins/classview/classview.qbs b/src/plugins/classview/classview.qbs
index 757ba232c4..6e1d594241 100644
--- a/src/plugins/classview/classview.qbs
+++ b/src/plugins/classview/classview.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/clearcase/clearcase.qbs b/src/plugins/clearcase/clearcase.qbs
index 3533c93629..8321bbb53b 100644
--- a/src/plugins/clearcase/clearcase.qbs
+++ b/src/plugins/clearcase/clearcase.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp
index 0177f740f8..170821b28d 100644
--- a/src/plugins/clearcase/clearcaseplugin.cpp
+++ b/src/plugins/clearcase/clearcaseplugin.cpp
@@ -1658,7 +1658,8 @@ bool ClearCasePlugin::vcsSetActivity(const QString &workingDir, const QString &t
const ClearCaseResponse actResponse =
runCleartool(workingDir, args, m_settings.timeOutMS(), ShowStdOutInLogWindow);
if (actResponse.error) {
- QMessageBox::warning(0, title, tr("Set current activity failed: %1").arg(actResponse.message), QMessageBox::Ok);
+ QMessageBox::warning(ICore::dialogParent(), title,
+ tr("Set current activity failed: %1").arg(actResponse.message), QMessageBox::Ok);
return false;
}
m_activity = activity;
@@ -1821,7 +1822,7 @@ bool ClearCasePlugin::vcsAdd(const QString &workingDir, const QString &fileName)
bool ClearCasePlugin::vcsDelete(const QString &workingDir, const QString &fileName)
{
const QString title(tr("ClearCase Remove Element %1").arg(baseName(fileName)));
- if (QMessageBox::warning(0, title, tr("This operation is irreversible. Are you sure?"),
+ if (QMessageBox::warning(ICore::dialogParent(), title, tr("This operation is irreversible. Are you sure?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
return true;
diff --git a/src/plugins/clearcase/settingspage.ui b/src/plugins/clearcase/settingspage.ui
index 9d80e2b4ef..47c89abfa5 100644
--- a/src/plugins/clearcase/settingspage.ui
+++ b/src/plugins/clearcase/settingspage.ui
@@ -193,7 +193,7 @@
<item row="5" column="0">
<widget class="QCheckBox" name="autoAssignActivityCheckBox">
<property name="toolTip">
- <string>Check this if you have a trigger that renames the activity automatically. You will not be prompted for activity name</string>
+ <string>Check this if you have a trigger that renames the activity automatically. You will not be prompted for activity name.</string>
</property>
<property name="text">
<string>Aut&amp;o assign activity names</string>
@@ -227,7 +227,7 @@
<item row="9" column="1">
<widget class="QLineEdit" name="indexOnlyVOBsEdit">
<property name="toolTip">
- <string>VOBs list, separated by comma. Indexer will only traverse the specified VOBs. If left blank, all active VOBs will be indexed</string>
+ <string>VOBs list, separated by comma. Indexer will only traverse the specified VOBs. If left blank, all active VOBs will be indexed.</string>
</property>
</widget>
</item>
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
index f76881dcaa..5b72f4237d 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
@@ -65,7 +65,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent
CMakeBuildConfiguration *source) :
BuildConfiguration(parent, source),
m_msvcVersion(source->m_msvcVersion),
- m_useNinja(false)
+ m_useNinja(source->m_useNinja)
{
Q_ASSERT(parent);
cloneSteps(source);
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.qbs b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.qbs
index 18ccd17481..aaa7e9c65b 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.qbs
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp
index 405b598990..ec7abf0d90 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp
@@ -37,7 +37,7 @@ CMakeProjectNode::CMakeProjectNode(const QString &fileName)
{
}
-bool CMakeProjectNode::hasBuildTargets() const
+bool CMakeProjectNode::showInSimpleTree() const
{
// TODO
return true;
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h
index d34989ef22..f2bfe1c869 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h
@@ -41,7 +41,7 @@ class CMakeProjectNode : public ProjectExplorer::ProjectNode
friend class CMakeProject;
public:
CMakeProjectNode(const QString &fileName);
- virtual bool hasBuildTargets() const;
+ virtual bool showInSimpleTree() const;
virtual QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
virtual bool canAddSubProject(const QString &proFilePath) const;
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index e8b4fee8a6..5c9df61af8 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -260,7 +260,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select Working Directory"));
QToolButton *resetButton = new QToolButton();
- resetButton->setToolTip(tr("Reset to default"));
+ resetButton->setToolTip(tr("Reset to default."));
resetButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
QHBoxLayout *boxlayout = new QHBoxLayout();
diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs
index 23c10f9c2d..5220e3464e 100644
--- a/src/plugins/coreplugin/coreplugin.qbs
+++ b/src/plugins/coreplugin/coreplugin.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.FileInfo
import QtcPlugin
diff --git a/src/plugins/coreplugin/dialogs/externaltoolconfig.ui b/src/plugins/coreplugin/dialogs/externaltoolconfig.ui
index fa952c92bc..c330213978 100644
--- a/src/plugins/coreplugin/dialogs/externaltoolconfig.ui
+++ b/src/plugins/coreplugin/dialogs/externaltoolconfig.ui
@@ -37,7 +37,7 @@
<item>
<widget class="QPushButton" name="addButton">
<property name="toolTip">
- <string>Add tool</string>
+ <string>Add tool.</string>
</property>
<property name="text">
<string>Add</string>
@@ -47,7 +47,7 @@
<item>
<widget class="QPushButton" name="removeButton">
<property name="toolTip">
- <string>Remove tool</string>
+ <string>Remove tool.</string>
</property>
<property name="text">
<string>Remove</string>
@@ -70,7 +70,7 @@
<item>
<widget class="QPushButton" name="revertButton">
<property name="toolTip">
- <string>Revert tool to default</string>
+ <string>Revert tool to default.</string>
</property>
<property name="text">
<string>Reset</string>
@@ -149,7 +149,7 @@
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;What to do with the executable's standard output.
-&lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it&lt;/li&gt;&lt;li&gt;Show in pane: Show it in the general output pane&lt;/li&gt;&lt;li&gt;Replace selection: Replace the current selection in the current document with it&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+&lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it.&lt;/li&gt;&lt;li&gt;Show in pane: Show it in the general output pane.&lt;/li&gt;&lt;li&gt;Replace selection: Replace the current selection in the current document with it.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
</string>
</property>
<property name="text">
@@ -181,9 +181,9 @@
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;body&gt;
&lt;p &gt;What to do with the executable's standard error output.&lt;/p&gt;
-&lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it&lt;/li&gt;
-&lt;li&gt;Show in pane: Show it in the general output pane&lt;/li&gt;
-&lt;li&gt;Replace selection: Replace the current selection in the current document with it&lt;/li&gt;
+&lt;ul&gt;&lt;li&gt;Ignore: Do nothing with it.&lt;/li&gt;
+&lt;li&gt;Show in pane: Show it in the general output pane.&lt;/li&gt;
+&lt;li&gt;Replace selection: Replace the current selection in the current document with it.&lt;/li&gt;
&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
diff --git a/src/plugins/coreplugin/find/searchresultwidget.cpp b/src/plugins/coreplugin/find/searchresultwidget.cpp
index b59994c974..b604909b66 100644
--- a/src/plugins/coreplugin/find/searchresultwidget.cpp
+++ b/src/plugins/coreplugin/find/searchresultwidget.cpp
@@ -81,6 +81,7 @@ using namespace Core::Internal;
SearchResultWidget::SearchResultWidget(QWidget *parent) :
QWidget(parent),
m_count(0),
+ m_preserveCaseSupported(true),
m_isShowingReplaceUI(false),
m_searchAgainSupported(false)
{
@@ -294,13 +295,18 @@ QString SearchResultWidget::textToReplace() const
return m_replaceTextEdit->text();
}
+void SearchResultWidget::setSupportPreserveCase(bool enabled)
+{
+ m_preserveCaseSupported = enabled;
+}
+
void SearchResultWidget::setShowReplaceUI(bool visible)
{
m_searchResultTreeView->model()->setShowReplaceUI(visible);
m_replaceLabel->setVisible(visible);
m_replaceTextEdit->setVisible(visible);
m_replaceButton->setVisible(visible);
- m_preserveCaseCheck->setVisible(visible);
+ m_preserveCaseCheck->setVisible(visible && m_preserveCaseSupported);
m_isShowingReplaceUI = visible;
}
@@ -446,7 +452,8 @@ void SearchResultWidget::handleReplaceButton()
// by pressing return in replace line edit
if (m_replaceButton->isEnabled()) {
m_infoBar.clear();
- emit replaceButtonClicked(m_replaceTextEdit->text(), checkedItems(), m_preserveCaseCheck->isChecked());
+ emit replaceButtonClicked(m_replaceTextEdit->text(), checkedItems(),
+ m_preserveCaseSupported && m_preserveCaseCheck->isChecked());
}
}
diff --git a/src/plugins/coreplugin/find/searchresultwidget.h b/src/plugins/coreplugin/find/searchresultwidget.h
index e9f64b4164..88bdbaef26 100644
--- a/src/plugins/coreplugin/find/searchresultwidget.h
+++ b/src/plugins/coreplugin/find/searchresultwidget.h
@@ -70,6 +70,7 @@ public:
void setTextToReplace(const QString &textToReplace);
QString textToReplace() const;
+ void setSupportPreserveCase(bool enabled);
void setShowReplaceUI(bool visible);
bool hasFocusInternally() const;
@@ -123,6 +124,7 @@ private:
SearchResultTreeView *m_searchResultTreeView;
int m_count;
QString m_dontAskAgainGroup;
+ bool m_preserveCaseSupported;
QFrame *m_messageWidget;
Core::InfoBar m_infoBar;
Core::InfoBarDisplay m_infoBarDisplay;
diff --git a/src/plugins/coreplugin/find/searchresultwindow.cpp b/src/plugins/coreplugin/find/searchresultwindow.cpp
index dd4f87475f..4b9b3ae7a3 100644
--- a/src/plugins/coreplugin/find/searchresultwindow.cpp
+++ b/src/plugins/coreplugin/find/searchresultwindow.cpp
@@ -375,6 +375,7 @@ SearchResult *SearchResultWindow::startNewSearch(const QString &label,
const QString &toolTip,
const QString &searchTerm,
SearchMode searchOrSearchAndReplace,
+ PreserveCaseMode preserveCaseMode,
const QString &cfgGroup)
{
if (d->m_searchResults.size() >= MAX_SEARCH_HISTORY) {
@@ -395,6 +396,7 @@ SearchResult *SearchResultWindow::startNewSearch(const QString &label,
connect(widget, SIGNAL(restarted()), d, SLOT(moveWidgetToTop()));
connect(widget, SIGNAL(requestPopup(bool)), d, SLOT(popupRequested(bool)));
widget->setTextEditorFont(d->m_font, d->m_color);
+ widget->setSupportPreserveCase(preserveCaseMode == PreserveCaseEnabled);
widget->setShowReplaceUI(searchOrSearchAndReplace != SearchOnly);
widget->setAutoExpandResults(d->m_expandCollapseAction->isChecked());
widget->setInfo(label, toolTip, searchTerm);
diff --git a/src/plugins/coreplugin/find/searchresultwindow.h b/src/plugins/coreplugin/find/searchresultwindow.h
index c13b9ce32f..53febb5fb3 100644
--- a/src/plugins/coreplugin/find/searchresultwindow.h
+++ b/src/plugins/coreplugin/find/searchresultwindow.h
@@ -137,6 +137,11 @@ public:
SearchAndReplace
};
+ enum PreserveCaseMode {
+ PreserveCaseEnabled,
+ PreserveCaseDisabled
+ };
+
SearchResultWindow(QWidget *newSearchPanel);
virtual ~SearchResultWindow();
@@ -173,6 +178,7 @@ public:
const QString &toolTip,
const QString &searchTerm,
SearchMode searchOrSearchAndReplace = SearchOnly,
+ PreserveCaseMode preserveCaseMode = PreserveCaseEnabled,
const QString &cfgGroup = QString());
public slots:
diff --git a/src/plugins/coreplugin/generalsettings.ui b/src/plugins/coreplugin/generalsettings.ui
index 088111ab4d..562fa3d784 100644
--- a/src/plugins/coreplugin/generalsettings.ui
+++ b/src/plugins/coreplugin/generalsettings.ui
@@ -110,10 +110,10 @@
<item row="3" column="0">
<widget class="QPushButton" name="resetWarningsButton">
<property name="toolTip">
- <string>Re-enable all warnings which were suppressed using &quot;Don't show again&quot; button (e.g. missing highlighter).</string>
+ <string>Re-enable warnings that were suppressed by selecting &quot;Do Not Show Again&quot; (for example, missing highlighter).</string>
</property>
<property name="text">
- <string comment="Button text">Reset warnings</string>
+ <string comment="Button text">Reset Warnings</string>
</property>
</widget>
</item>
@@ -232,7 +232,7 @@
<item>
<widget class="QCheckBox" name="autoSaveCheckBox">
<property name="toolTip">
- <string>Automatically create temporary copies of modified files. If Qt Creator is restarted after a crash or power failure, it asks whether to recover the auto-saved content.</string>
+ <string>Automatically creates temporary copies of modified files. If Qt Creator is restarted after a crash or power failure, it asks whether to recover the auto-saved content.</string>
</property>
<property name="text">
<string>Auto-save modified files</string>
diff --git a/src/plugins/coreplugin/images/logo/logo.qbs b/src/plugins/coreplugin/images/logo/logo.qbs
index 47472d9bd0..09780ee514 100644
--- a/src/plugins/coreplugin/images/logo/logo.qbs
+++ b/src/plugins/coreplugin/images/logo/logo.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
Product {
condition: qbs.targetOS.contains("linux")
diff --git a/src/plugins/coreplugin/infobar.cpp b/src/plugins/coreplugin/infobar.cpp
index 20a3bb2789..cfcadaf728 100644
--- a/src/plugins/coreplugin/infobar.cpp
+++ b/src/plugins/coreplugin/infobar.cpp
@@ -235,7 +235,7 @@ void InfoBarDisplay::update()
if (info.globalSuppression == InfoBarEntry::GlobalSuppressionEnabled) {
infoWidgetSuppressButton = new QToolButton;
infoWidgetSuppressButton->setProperty("infoId", info.id.uniqueIdentifier());
- infoWidgetSuppressButton->setText(tr("Do not show again"));
+ infoWidgetSuppressButton->setText(tr("Do Not Show Again"));
connect(infoWidgetSuppressButton, SIGNAL(clicked()), SLOT(suppressButtonClicked()));
}
diff --git a/src/plugins/coreplugin/locator/executefilter.cpp b/src/plugins/coreplugin/locator/executefilter.cpp
index 5c2dc3223b..795335c806 100644
--- a/src/plugins/coreplugin/locator/executefilter.cpp
+++ b/src/plugins/coreplugin/locator/executefilter.cpp
@@ -108,7 +108,7 @@ void ExecuteFilter::accept(LocatorFilterEntry selection) const
if (m_process->state() != QProcess::NotRunning) {
const QString info(tr("Previous command is still running ('%1').\nDo you want to kill it?")
.arg(p->headCommand()));
- int r = QMessageBox::question(0, tr("Kill Previous Process?"), info,
+ int r = QMessageBox::question(ICore::dialogParent(), tr("Kill Previous Process?"), info,
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
QMessageBox::Yes);
if (r == QMessageBox::Yes)
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp
index ca0376a22d..18455010da 100644
--- a/src/plugins/coreplugin/vcsmanager.cpp
+++ b/src/plugins/coreplugin/vcsmanager.cpp
@@ -382,7 +382,7 @@ bool VcsManager::promptToDelete(IVersionControl *vc, const QString &fileName)
const QString msg = tr("Would you like to remove this file from the version control system (%1)?\n"
"Note: This might remove the local file.").arg(vc->displayName());
const QMessageBox::StandardButton button =
- QMessageBox::question(0, title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
+ QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
if (button != QMessageBox::Yes)
return true;
return vc->vcsDelete(fileName);
diff --git a/src/plugins/cpaster/cpaster.qbs b/src/plugins/cpaster/cpaster.qbs
index 21a3f2c91c..433153b007 100644
--- a/src/plugins/cpaster/cpaster.qbs
+++ b/src/plugins/cpaster/cpaster.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/cpaster/frontend/frontend.qbs b/src/plugins/cpaster/frontend/frontend.qbs
index e425a88560..d8619be380 100644
--- a/src/plugins/cpaster/frontend/frontend.qbs
+++ b/src/plugins/cpaster/frontend/frontend.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index 66b90a4f91..a82a95bcaf 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -963,7 +963,7 @@ void CPPEditorWidget::renameSymbolUnderCursor()
return;
CppEditorSupport *edSup = m_modelManager->cppEditorSupport(editor());
- updateSemanticInfo(edSup->recalculateSemanticInfo(/* emitSignalWhenFinished = */ false));
+ updateSemanticInfo(edSup->recalculateSemanticInfo());
abortRename();
QTextCursor c = textCursor();
@@ -1157,11 +1157,6 @@ void CPPEditorWidget::updateOutlineToolTip()
void CPPEditorWidget::updateUses()
{
- if (m_highlightWatcher) {
- m_highlightWatcher->cancel();
- m_highlightWatcher.reset();
- }
-
// Block premature semantic info calculation when editor is created.
if (m_modelManager && m_modelManager->cppEditorSupport(editor())->initialized())
m_updateUsesTimer->start();
@@ -1595,8 +1590,12 @@ bool CPPEditorWidget::openCppEditorAt(const Link &link, bool inNextSplit)
void CPPEditorWidget::semanticRehighlight(bool force)
{
- if (m_modelManager)
- m_modelManager->cppEditorSupport(editor())->recalculateSemanticInfoDetached(force);
+ if (m_modelManager) {
+ const CppEditorSupport::ForceReason forceReason = force
+ ? CppEditorSupport::ForceDueEditorRequest
+ : CppEditorSupport::NoForce;
+ m_modelManager->cppEditorSupport(editor())->recalculateSemanticInfoDetached(forceReason);
+ }
}
void CPPEditorWidget::highlighterStarted(QFuture<TextEditor::HighlightingResult> *highlighter,
diff --git a/src/plugins/cppeditor/cppeditor.qbs b/src/plugins/cppeditor/cppeditor.qbs
index 2319e75be4..b877922511 100644
--- a/src/plugins/cppeditor/cppeditor.qbs
+++ b/src/plugins/cppeditor/cppeditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.FileInfo
import QtcPlugin
diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp
index 0e7542a2d7..51c3bde556 100644
--- a/src/plugins/cpptools/builtinindexingsupport.cpp
+++ b/src/plugins/cpptools/builtinindexingsupport.cpp
@@ -47,6 +47,8 @@ static void parse(QFutureInterface<void> &future,
const QString conf = CppModelManagerInterface::configurationFileName();
bool processingHeaders = false;
+ CppModelManager *cmm = CppModelManager::instance();
+ const QStringList fallbackIncludePaths = cmm->includePaths();
for (int i = 0; i < files.size(); ++i) {
if (future.isPaused())
future.waitForResume();
@@ -65,6 +67,11 @@ static void parse(QFutureInterface<void> &future,
processingHeaders = true;
}
+ QList<ProjectPart::Ptr> parts = cmm->projectPart(fileName);
+ QStringList includePaths = parts.isEmpty()
+ ? fallbackIncludePaths
+ : parts.first()->includePaths;
+ preproc->setIncludePaths(includePaths);
preproc->run(fileName);
future.setProgressValue(files.size() - preproc->todo().size());
diff --git a/src/plugins/cpptools/completionsettingspage.ui b/src/plugins/cpptools/completionsettingspage.ui
index 653ac42fc0..570cdfe88b 100644
--- a/src/plugins/cpptools/completionsettingspage.ui
+++ b/src/plugins/cpptools/completionsettingspage.ui
@@ -205,7 +205,7 @@
<item>
<widget class="QCheckBox" name="enableDoxygenCheckBox">
<property name="toolTip">
- <string>Automatically creates a Doxygen comment upon pressing enter after a /**, /*!, //! or ///</string>
+ <string>Automatically creates a Doxygen comment upon pressing enter after a '/**', '/*!', '//!' or '///'.</string>
</property>
<property name="text">
<string>Enable Doxygen blocks</string>
@@ -245,7 +245,7 @@
<item>
<widget class="QCheckBox" name="leadingAsterisksCheckBox">
<property name="toolTip">
- <string>Adds leading asterisks when continuing Qt (/*!) and Java (/**) style comments on new lines.</string>
+ <string>Adds leading asterisks when continuing Qt '/*!' and Java '/**' style comments on new lines.</string>
</property>
<property name="text">
<string>Add leading asterisks</string>
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp
index 7b78ac901a..eb657f783b 100644
--- a/src/plugins/cpptools/cppcompletion_test.cpp
+++ b/src/plugins/cpptools/cppcompletion_test.cpp
@@ -1425,7 +1425,9 @@ void CppToolsPlugin::test_completion_data()
" @\n"
"}\n"
) << _("s.") << (QStringList()
- << QLatin1String("S"));
+ << QLatin1String("S")
+ << QLatin1String("i")
+ << QLatin1String("c"));
QTest::newRow("instantiate_template_function") << _(
"template <typename T>\n"
@@ -1439,6 +1441,65 @@ void CppToolsPlugin::test_completion_data()
<< QLatin1String("A")
<< QLatin1String("a"));
+ QTest::newRow("nested_anonymous_class_QTCREATORBUG10876_1") << _(
+ "struct EnclosingStruct\n"
+ "{\n"
+ " int memberOfEnclosingStruct;\n"
+ " struct\n"
+ " {\n"
+ " int memberNestedAnonymousClass;\n"
+ " };\n"
+ " void fun()\n"
+ " {\n"
+ " @\n"
+ " }\n"
+ "};\n"
+ ) << _("member") << (QStringList()
+ << QLatin1String("memberNestedAnonymousClass")
+ << QLatin1String("memberOfEnclosingStruct"));
+
+ QTest::newRow("nested_anonymous_class_QTCREATORBUG10876_2") << _(
+ "struct EnclosingStruct\n"
+ "{\n"
+ " int memberOfEnclosingStruct;\n"
+ " struct\n"
+ " {\n"
+ " int memberOfNestedAnonymousClass;\n"
+ " struct\n"
+ " {\n"
+ " int memberOfNestedOfNestedAnonymousClass;\n"
+ " };\n"
+ " };\n"
+ " void fun()\n"
+ " {\n"
+ " @\n"
+ " }\n"
+ "};\n"
+ ) << _("member") << (QStringList()
+ << QLatin1String("memberOfNestedAnonymousClass")
+ << QLatin1String("memberOfNestedOfNestedAnonymousClass")
+ << QLatin1String("memberOfEnclosingStruct"));
+
+ QTest::newRow("nested_anonymous_class_QTCREATORBUG10876_3") << _(
+ "struct EnclosingStruct\n"
+ "{\n"
+ " int memberOfEnclosingStruct;\n"
+ " struct\n"
+ " {\n"
+ " int memberOfNestedAnonymousClass;\n"
+ " struct\n"
+ " {\n"
+ " int memberOfNestedOfNestedAnonymousClass;\n"
+ " } nestedOfNestedAnonymousClass;\n"
+ " };\n"
+ " void fun()\n"
+ " {\n"
+ " @\n"
+ " }\n"
+ "};\n"
+ ) << _("nestedOfNestedAnonymousClass.") << (QStringList()
+ << QLatin1String("memberOfNestedOfNestedAnonymousClass"));
+
QTest::newRow("crash_cloning_template_class_QTCREATORBUG9329") << _(
"struct A {};\n"
"template <typename T>\n"
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp
index c65c0f22ef..d0eb4af103 100644
--- a/src/plugins/cpptools/cppcompletionassist.cpp
+++ b/src/plugins/cpptools/cppcompletionassist.cpp
@@ -1554,25 +1554,44 @@ void CppCompletionAssistProcessor::completeClass(CPlusPlus::ClassOrNamespace *b,
if (staticLookup)
addCompletionItem(scope, InjectedClassNameOrder); // add a completion item for the injected class name.
- for (Scope::iterator it = scope->firstMember(); it != scope->lastMember(); ++it) {
- Symbol *member = *it;
- if (member->isFriend()
- || member->isQtPropertyDeclaration()
- || member->isQtEnum()) {
- continue;
- } else if (!staticLookup && (member->isTypedef() ||
- member->isEnum() ||
- member->isClass())) {
- continue;
- }
+ addClassMembersToCompletion(scope, staticLookup);
+ }
+ }
+}
- if (member->isPublic())
- addCompletionItem(member, PublicClassMemberOrder);
- else
- addCompletionItem(member);
- }
+void CppCompletionAssistProcessor::addClassMembersToCompletion(Scope *scope, bool staticLookup)
+{
+ if (!scope)
+ return;
+
+ std::set<Class *> nestedAnonymouses;
+
+ for (Scope::iterator it = scope->firstMember(); it != scope->lastMember(); ++it) {
+ Symbol *member = *it;
+ if (member->isFriend()
+ || member->isQtPropertyDeclaration()
+ || member->isQtEnum()) {
+ continue;
+ } else if (!staticLookup && (member->isTypedef() ||
+ member->isEnum() ||
+ member->isClass())) {
+ continue;
+ } else if (member->isClass() && member->name()->isAnonymousNameId()) {
+ nestedAnonymouses.insert(member->asClass());
+ } else if (member->isDeclaration()) {
+ Class *declTypeAsClass = member->asDeclaration()->type()->asClassType();
+ if (declTypeAsClass && declTypeAsClass->name()->isAnonymousNameId())
+ nestedAnonymouses.erase(declTypeAsClass);
}
+
+ if (member->isPublic())
+ addCompletionItem(member, PublicClassMemberOrder);
+ else
+ addCompletionItem(member);
}
+ std::set<Class *>::const_iterator citEnd = nestedAnonymouses.end();
+ for (std::set<Class *>::const_iterator cit = nestedAnonymouses.begin(); cit != citEnd; ++cit)
+ addClassMembersToCompletion(*cit, staticLookup);
}
bool CppCompletionAssistProcessor::completeQtMethod(const QList<CPlusPlus::LookupItem> &results, bool wantSignals)
diff --git a/src/plugins/cpptools/cppcompletionassist.h b/src/plugins/cpptools/cppcompletionassist.h
index 0e0268b74b..ae2e45a23e 100644
--- a/src/plugins/cpptools/cppcompletionassist.h
+++ b/src/plugins/cpptools/cppcompletionassist.h
@@ -136,6 +136,7 @@ private:
bool completeScope(const QList<CPlusPlus::LookupItem> &results);
void completeNamespace(CPlusPlus::ClassOrNamespace *binding);
void completeClass(CPlusPlus::ClassOrNamespace *b, bool staticLookup = true);
+ void addClassMembersToCompletion(CPlusPlus::Scope *scope, bool staticLookup);
bool completeQtMethod(const QList<CPlusPlus::LookupItem> &results, bool wantSignals);
bool completeSignal(const QList<CPlusPlus::LookupItem> &results)
{ return completeQtMethod(results, true); }
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 8f846a90c2..e7cbfceccb 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -330,6 +330,7 @@ void CppFindReferences::findUsages(CPlusPlus::Symbol *symbol,
overview.prettyName(context.fullyQualifiedName(symbol)),
replace ? Core::SearchResultWindow::SearchAndReplace
: Core::SearchResultWindow::SearchOnly,
+ Core::SearchResultWindow::PreserveCaseDisabled,
QLatin1String("CppEditor"));
search->setTextToReplace(replacement);
connect(search, SIGNAL(replaceButtonClicked(QString,QList<Core::SearchResultItem>,bool)),
@@ -640,6 +641,7 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace
QString::fromUtf8(macro.name()),
replace ? Core::SearchResultWindow::SearchAndReplace
: Core::SearchResultWindow::SearchOnly,
+ Core::SearchResultWindow::PreserveCaseDisabled,
QLatin1String("CppEditor"));
search->setTextToReplace(replacement);
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index cec5b6772c..640e8bfa07 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -802,6 +802,7 @@ ProjectPart::Ptr CppModelManager::projectPartForProjectFile(const QString &proje
QList<ProjectPart::Ptr> CppModelManager::projectPart(const QString &fileName) const
{
+ QMutexLocker locker(&m_projectMutex);
return m_fileToProjectParts.value(fileName);
}
diff --git a/src/plugins/cpptools/cppsemanticinfo.cpp b/src/plugins/cpptools/cppsemanticinfo.cpp
index 1607251074..09407681c3 100644
--- a/src/plugins/cpptools/cppsemanticinfo.cpp
+++ b/src/plugins/cpptools/cppsemanticinfo.cpp
@@ -32,6 +32,6 @@
using namespace CppTools;
SemanticInfo::SemanticInfo()
- : revision(0), forced(false)
+ : revision(0), forced(false), complete(true)
{
}
diff --git a/src/plugins/cpptools/cppsemanticinfo.h b/src/plugins/cpptools/cppsemanticinfo.h
index cbb1734496..c0968edb3a 100644
--- a/src/plugins/cpptools/cppsemanticinfo.h
+++ b/src/plugins/cpptools/cppsemanticinfo.h
@@ -78,7 +78,8 @@ public:
SemanticInfo();
unsigned revision;
- bool forced: 1;
+ bool forced;
+ bool complete;
CPlusPlus::Snapshot snapshot;
CPlusPlus::Document::Ptr doc;
LocalUseMap localUses;
diff --git a/src/plugins/cpptools/cpptools.qbs b/src/plugins/cpptools/cpptools.qbs
index f305a77f4d..311945755d 100644
--- a/src/plugins/cpptools/cpptools.qbs
+++ b/src/plugins/cpptools/cpptools.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.FileInfo
import QtcPlugin
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp
index 5af358eadf..4932b21e9a 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.cpp
+++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp
@@ -120,6 +120,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
, m_fileIsBeingReloaded(false)
, m_initialized(false)
, m_lastHighlightRevision(0)
+ , m_lastHighlightOnCompleteSemanticInfo(true)
, m_highlightingSupport(modelManager->highlightingSupport(textEditor))
, m_completionAssistProvider(m_modelManager->completionAssistProvider(textEditor))
{
@@ -220,12 +221,12 @@ bool CppEditorSupport::initialized()
return m_initialized;
}
-SemanticInfo CppEditorSupport::recalculateSemanticInfo(bool emitSignalWhenFinished)
+SemanticInfo CppEditorSupport::recalculateSemanticInfo()
{
m_futureSemanticInfo.cancel();
SemanticInfo::Source source = currentSource(false);
- recalculateSemanticInfoNow(source, emitSignalWhenFinished);
+ recalculateSemanticInfoNow(source, /*emitSignalWhenFinished=*/ false);
return m_lastSemanticInfo;
}
@@ -236,7 +237,7 @@ Document::Ptr CppEditorSupport::lastSemanticInfoDocument() const
return m_lastSemanticInfo.doc;
}
-void CppEditorSupport::recalculateSemanticInfoDetached(bool force)
+void CppEditorSupport::recalculateSemanticInfoDetached(ForceReason forceReason)
{
// Block premature calculation caused by CppEditorPlugin::currentEditorChanged
// when the editor is created.
@@ -244,12 +245,13 @@ void CppEditorSupport::recalculateSemanticInfoDetached(bool force)
return;
m_futureSemanticInfo.cancel();
+ const bool force = forceReason != NoForce;
SemanticInfo::Source source = currentSource(force);
m_futureSemanticInfo = QtConcurrent::run<CppEditorSupport, void>(
&CppEditorSupport::recalculateSemanticInfoDetached_helper, this, source);
if (force && m_highlightingSupport && !m_highlightingSupport->requiresSemanticInfo())
- startHighlighting();
+ startHighlighting(forceReason);
}
CppCompletionAssistProvider *CppEditorSupport::completionAssistProvider() const
@@ -351,14 +353,14 @@ void CppEditorSupport::onDocumentUpdated(Document::Ptr doc)
|| m_lastSemanticInfo.doc->translationUnit()->ast() == 0
|| m_lastSemanticInfo.doc->fileName() != fileName()))) {
m_initialized = true;
- recalculateSemanticInfoDetached(/* force = */ true);
+ recalculateSemanticInfoDetached(ForceDueToMissingSemanticInfo);
}
// notify the editor that the document is updated
emit documentUpdated();
}
-void CppEditorSupport::startHighlighting()
+void CppEditorSupport::startHighlighting(ForceReason forceReason)
{
if (!m_highlightingSupport)
return;
@@ -368,6 +370,7 @@ void CppEditorSupport::startHighlighting()
Document::Ptr doc;
unsigned revision;
bool forced;
+ bool complete;
{
QMutexLocker locker(&m_lastSemanticInfoLock);
@@ -375,26 +378,33 @@ void CppEditorSupport::startHighlighting()
doc = m_lastSemanticInfo.doc;
revision = m_lastSemanticInfo.revision;
forced = m_lastSemanticInfo.forced;
+ complete = m_lastSemanticInfo.complete;
}
if (doc.isNull())
return;
+
+ if (!m_lastHighlightOnCompleteSemanticInfo)
+ forced = true;
+
if (!forced && m_lastHighlightRevision == revision)
return;
- m_highlighter.cancel();
+ m_highlighter.cancel();
m_highlighter = m_highlightingSupport->highlightingFuture(doc, snapshot);
m_lastHighlightRevision = revision;
+ m_lastHighlightOnCompleteSemanticInfo = complete;
emit highlighterStarted(&m_highlighter, m_lastHighlightRevision);
} else {
- const unsigned revision = currentSource(false).revision;
- if (m_lastHighlightRevision == revision)
+ const unsigned revision = editorRevision();
+ if (forceReason != ForceDueEditorRequest && m_lastHighlightRevision == revision)
return;
- m_lastHighlightRevision = revision;
+ m_highlighter.cancel();
static const Document::Ptr dummyDoc;
static const Snapshot dummySnapshot;
m_highlighter = m_highlightingSupport->highlightingFuture(dummyDoc, dummySnapshot);
+ m_lastHighlightRevision = revision;
emit highlighterStarted(&m_highlighter, m_lastHighlightRevision);
}
}
@@ -500,6 +510,7 @@ void CppEditorSupport::releaseResources()
snapshotUpdater()->releaseSnapshot();
QMutexLocker semanticLocker(&m_lastSemanticInfoLock);
m_lastSemanticInfo = SemanticInfo();
+ m_lastHighlightOnCompleteSemanticInfo = true;
}
SemanticInfo::Source CppEditorSupport::currentSource(bool force)
@@ -520,7 +531,7 @@ SemanticInfo::Source CppEditorSupport::currentSource(bool force)
void CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::Source &source,
bool emitSignalWhenFinished,
- TopLevelDeclarationProcessor *processor)
+ FuturizedTopLevelDeclarationProcessor *processor)
{
SemanticInfo semanticInfo;
@@ -546,6 +557,8 @@ void CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::Source &so
if (processor)
doc->control()->setTopLevelDeclarationProcessor(processor);
doc->check();
+ if (processor && processor->isCanceled())
+ semanticInfo.complete = false;
semanticInfo.doc = doc;
} else {
return;
@@ -575,21 +588,8 @@ void CppEditorSupport::recalculateSemanticInfoNow(const SemanticInfo::Source &so
void CppEditorSupport::recalculateSemanticInfoDetached_helper(QFutureInterface<void> &future, SemanticInfo::Source source)
{
- class TLDProc: public TopLevelDeclarationProcessor
- {
- QFutureInterface<void> m_theFuture;
-
- public:
- TLDProc(QFutureInterface<void> &aFuture): m_theFuture(aFuture) {}
- virtual ~TLDProc() {}
- virtual bool processDeclaration(DeclarationAST *ast) {
- Q_UNUSED(ast);
- return m_theFuture.isCanceled();
- }
- };
-
- TLDProc tldProc(future);
- recalculateSemanticInfoNow(source, true, &tldProc);
+ FuturizedTopLevelDeclarationProcessor processor(future);
+ recalculateSemanticInfoNow(source, true, &processor);
}
void CppEditorSupport::onMimeTypeChanged()
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h
index f9ba876256..29cfb508e0 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.h
+++ b/src/plugins/cpptools/cpptoolseditorsupport.h
@@ -35,6 +35,7 @@
#include "cppsemanticinfo.h"
#include "cppsnapshotupdater.h"
+#include <cplusplus/Control.h>
#include <cplusplus/CppDocument.h>
#include <QFuture>
@@ -43,7 +44,10 @@
#include <QSharedPointer>
#include <QTimer>
-namespace CPlusPlus { class AST; }
+namespace CPlusPlus {
+class AST;
+class DeclarationAST;
+} // namespace CPlusPlus
namespace TextEditor {
class BaseTextEditor;
@@ -110,16 +114,22 @@ public:
bool initialized();
/// Retrieve the semantic info, which will get recalculated on the current
- /// thread if it is outdate.
- SemanticInfo recalculateSemanticInfo(bool emitSignalWhenFinished = true);
+ /// thread if it is outdate. Will not emit the semanticInfoUpdated() signal.
+ SemanticInfo recalculateSemanticInfo();
CPlusPlus::Document::Ptr lastSemanticInfoDocument() const;
+ enum ForceReason {
+ NoForce,
+ ForceDueToMissingSemanticInfo,
+ ForceDueEditorRequest
+ };
+
/// Recalculates the semantic info in a future, and will emit the
/// semanticInfoUpdated() signal when finished.
/// Requires that initialized() is true.
- /// \param force do not check if the old semantic info is still valid
- void recalculateSemanticInfoDetached(bool force = false);
+ /// \param forceReason the reason to force, if any
+ void recalculateSemanticInfoDetached(ForceReason forceReason);
CppCompletionAssistProvider *completionAssistProvider() const;
@@ -144,7 +154,7 @@ private slots:
void updateDocumentNow();
void onDocumentUpdated(CPlusPlus::Document::Ptr doc);
- void startHighlighting();
+ void startHighlighting(ForceReason forceReason = NoForce);
void onDiagnosticsChanged();
@@ -171,9 +181,19 @@ private:
};
private:
+ class FuturizedTopLevelDeclarationProcessor: public CPlusPlus::TopLevelDeclarationProcessor
+ {
+ public:
+ FuturizedTopLevelDeclarationProcessor(QFutureInterface<void> &future): m_future(future) {}
+ bool processDeclaration(CPlusPlus::DeclarationAST *) { return !isCanceled(); }
+ bool isCanceled() { return m_future.isCanceled(); }
+ private:
+ QFutureInterface<void> m_future;
+ };
+
SemanticInfo::Source currentSource(bool force);
void recalculateSemanticInfoNow(const SemanticInfo::Source &source, bool emitSignalWhenFinished,
- CPlusPlus::TopLevelDeclarationProcessor *processor = 0);
+ FuturizedTopLevelDeclarationProcessor *processor = 0);
void recalculateSemanticInfoDetached_helper(QFutureInterface<void> &future,
SemanticInfo::Source source);
@@ -209,6 +229,7 @@ private:
// Highlighting:
unsigned m_lastHighlightRevision;
+ bool m_lastHighlightOnCompleteSemanticInfo;
QFuture<TextEditor::HighlightingResult> m_highlighter;
QScopedPointer<CppTools::CppHighlightingSupport> m_highlightingSupport;
diff --git a/src/plugins/cvs/cvs.qbs b/src/plugins/cvs/cvs.qbs
index 90b0e46951..8d4dfc564d 100644
--- a/src/plugins/cvs/cvs.qbs
+++ b/src/plugins/cvs/cvs.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp
index 7dacfd0631..af1d5d2728 100644
--- a/src/plugins/cvs/cvsplugin.cpp
+++ b/src/plugins/cvs/cvsplugin.cpp
@@ -151,9 +151,9 @@ static inline QString debugCodec(const QTextCodec *c)
return c ? QString::fromLatin1(c->name()) : QString::fromLatin1("Null codec");
}
-static inline bool messageBoxQuestion(const QString &title, const QString &question, QWidget *parent = 0)
+static inline bool messageBoxQuestion(const QString &title, const QString &question)
{
- return QMessageBox::question(parent, title, question, QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes;
+ return QMessageBox::question(ICore::dialogParent(), title, question, QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes;
}
// ------------- CVSPlugin
@@ -579,7 +579,8 @@ void CvsPlugin::revertAll()
if (revertResponse.result == CvsResponse::Ok)
cvsVersionControl()->emitRepositoryChanged(state.topLevel());
else
- QMessageBox::warning(0, title, tr("Revert failed: %1").arg(revertResponse.message), QMessageBox::Ok);
+ QMessageBox::warning(ICore::dialogParent(), title,
+ tr("Revert failed: %1").arg(revertResponse.message), QMessageBox::Ok);
}
void CvsPlugin::revertCurrentFile()
diff --git a/src/plugins/debugger/cdb/cdboptionspagewidget.ui b/src/plugins/debugger/cdb/cdboptionspagewidget.ui
index 7221f342e4..457123277f 100644
--- a/src/plugins/debugger/cdb/cdboptionspagewidget.ui
+++ b/src/plugins/debugger/cdb/cdboptionspagewidget.ui
@@ -44,7 +44,7 @@
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="consoleCheckBox">
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use CDB's native console instead of Qt Creator's console for console applications. The native console does not prompt on application exit. It is suitable for diagnosing cases in which the application does not start up properly in Qt Creator's console and the subsequent attach fails.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Uses CDB's native console instead of Qt Creator's console for console applications. The native console does not prompt on application exit. It is suitable for diagnosing cases in which the application does not start up properly in Qt Creator's console and the subsequent attach fails.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use CDB &amp;console</string>
@@ -82,7 +82,7 @@
<item>
<widget class="QCheckBox" name="breakpointCorrectionCheckBox">
<property name="toolTip">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Attempt to correct the location of a breakpoint based on file and line number should it be in a comment or in a line for which no code is generated. The correction is based on the code model.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Attempts to correct the location of a breakpoint based on file and line number should it be in a comment or in a line for which no code is generated. The correction is based on the code model.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Correct breakpoint location</string>
diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp
index bd4fe189e3..93e7586bf2 100644
--- a/src/plugins/debugger/commonoptionspage.cpp
+++ b/src/plugins/debugger/commonoptionspage.cpp
@@ -58,14 +58,14 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
checkBoxUseAlternatingRowColors->setText(tr("Use alternating row colors in debug views"));
checkBoxFontSizeFollowsEditor = new QCheckBox(behaviorBox);
- checkBoxFontSizeFollowsEditor->setToolTip(tr("Change the font size in the debugger views when the font size in the main editor changes."));
+ checkBoxFontSizeFollowsEditor->setToolTip(tr("Changes the font size in the debugger views when the font size in the main editor changes."));
checkBoxFontSizeFollowsEditor->setText(tr("Debugger font size follows main editor"));
checkBoxUseToolTipsInMainEditor = new QCheckBox(behaviorBox);
checkBoxUseToolTipsInMainEditor->setText(tr("Use tooltips in main editor while debugging"));
checkBoxListSourceFiles = new QCheckBox(behaviorBox);
- checkBoxListSourceFiles->setToolTip(tr("Populate the source file view automatically. This might slow down debugger startup considerably."));
+ checkBoxListSourceFiles->setToolTip(tr("Populates the source file view automatically. This might slow down debugger startup considerably."));
checkBoxListSourceFiles->setText(tr("Populate source file view automatically"));
checkBoxCloseBuffersOnExit = new QCheckBox(behaviorBox);
@@ -82,20 +82,20 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
checkBoxBringToForegroundOnInterrrupt->setText(tr("Bring Qt Creator to foreground when application interrupts"));
checkBoxShowQmlObjectTree = new QCheckBox(behaviorBox);
- checkBoxShowQmlObjectTree->setToolTip(tr("Show QML object tree in Locals & Expressions when connected and not stepping."));
+ checkBoxShowQmlObjectTree->setToolTip(tr("Shows QML object tree in Locals & Expressions when connected and not stepping."));
checkBoxShowQmlObjectTree->setText(tr("Show QML object tree"));
checkBoxBreakpointsFullPath = new QCheckBox(behaviorBox);
- checkBoxBreakpointsFullPath->setToolTip(tr("Enable a full file path in breakpoints by default also for GDB."));
+ checkBoxBreakpointsFullPath->setToolTip(tr("Enables a full file path in breakpoints by default also for GDB."));
checkBoxBreakpointsFullPath->setText(tr("Set breakpoints using a full absolute path"));
checkBoxRegisterForPostMortem = new QCheckBox(behaviorBox);
- checkBoxRegisterForPostMortem->setToolTip(tr("Register Qt Creator for debugging crashed applications."));
+ checkBoxRegisterForPostMortem->setToolTip(tr("Registers Qt Creator for debugging crashed applications."));
checkBoxRegisterForPostMortem->setText(tr("Use Qt Creator for post-mortem debugging"));
checkBoxWarnOnReleaseBuilds = new QCheckBox(behaviorBox);
checkBoxWarnOnReleaseBuilds->setText(tr("Warn when debugging \"Release\" builds"));
- checkBoxWarnOnReleaseBuilds->setToolTip(tr("Show a warning when starting the debugger "
+ checkBoxWarnOnReleaseBuilds->setToolTip(tr("Shows a warning when starting the debugger "
"on a binary with insufficient debug information."));
labelMaximalStackDepth = new QLabel(tr("Maximum stack depth:"), behaviorBox);
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
index d8b66490a7..4cd091e42b 100644
--- a/src/plugins/debugger/debugger.qbs
+++ b/src/plugins/debugger/debugger.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index b4160c8375..2b381184b4 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1739,7 +1739,7 @@ DebuggerRunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
if (device->type() != PE::DESKTOP_DEVICE_TYPE) {
QMessageBox::warning(ICore::mainWindow(), tr("Not a Desktop Device Type"),
- tr("It is only possible to attach to local running process."));
+ tr("It is only possible to attach to a locally running process."));
return 0;
}
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 91bd58cc1c..781602ddf0 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -193,26 +193,28 @@ void DebuggerRunControl::start()
}
if (d->m_engine->startParameters().startMode == StartInternal) {
+ QStringList unhandledIds;
foreach (const BreakpointModelId &id, debuggerCore()->breakHandler()->allBreakpointIds()) {
if (d->m_engine->breakHandler()->breakpointData(id).enabled
- && !d->m_engine->acceptsBreakpoint(id)) {
-
- QString warningMessage =
- DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger "
- "languages currently active, and will be ignored.");
+ && !d->m_engine->acceptsBreakpoint(id))
+ unhandledIds.append(id.toString());
+ }
+ if (!unhandledIds.isEmpty()) {
+ QString warningMessage =
+ DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger "
+ "languages currently active, and will be ignored.\n"
+ "Affected are breakpoints %1")
+ .arg(unhandledIds.join(QLatin1String(", ")));
- debuggerCore()->showMessage(warningMessage, LogWarning);
+ debuggerCore()->showMessage(warningMessage, LogWarning);
- static bool checked = true;
- if (!checked)
- break;
+ static bool checked = true;
+ if (checked)
CheckableMessageBox::information(Core::ICore::mainWindow(),
tr("Debugger"),
warningMessage,
tr("&Show this message again."),
&checked, QDialogButtonBox::Ok);
- break;
- }
}
}
diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
index 719778a743..5836ecf302 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.cpp
+++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
@@ -152,7 +152,7 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent)
checkBoxLoadGdbDumpers->setText(GdbOptionsPage::tr("Load system GDB pretty printers"));
checkBoxLoadGdbDumpers->setToolTip(GdbOptionsPage::tr(
"Uses the default GDB pretty printers installed in your "
- "system or linked to the libraries your application uses.\n"));
+ "system or linked to the libraries your application uses."));
checkBoxIntelFlavor = new QCheckBox(groupBoxGeneral);
checkBoxIntelFlavor->setText(GdbOptionsPage::tr("Use Intel style disassembly"));
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index d2bad378b1..ad61ccacf8 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -108,7 +108,7 @@ LldbEngine::LldbEngine(const DebuggerStartParameters &startParameters)
connect(debuggerCore()->action(AutoDerefPointers), SIGNAL(valueChanged(QVariant)),
SLOT(updateLocals()));
connect(debuggerCore()->action(CreateFullBacktrace), SIGNAL(triggered()),
- SLOT(updateAll()));
+ SLOT(createFullBacktrace()));
connect(debuggerCore()->action(UseDebuggingHelpers), SIGNAL(valueChanged(QVariant)),
SLOT(updateLocals()));
connect(debuggerCore()->action(UseDynamicType), SIGNAL(valueChanged(QVariant)),
@@ -320,7 +320,6 @@ void LldbEngine::setupInferior()
}
runCommand(cmd);
- updateLocals(); // update display options
}
void LldbEngine::runEngine()
@@ -433,6 +432,8 @@ void LldbEngine::handleResponse(const QByteArray &response)
refreshMemory(item);
else if (name == "continuation")
runContinuation(item);
+ else if (name == "full-backtrace")
+ showFullBacktrace(item);
else if (name == "statusmessage") {
QString msg = QString::fromUtf8(item.data());
if (msg.size())
@@ -442,6 +443,12 @@ void LldbEngine::handleResponse(const QByteArray &response)
}
}
+void LldbEngine::showFullBacktrace(const GdbMi &data)
+{
+ debuggerCore()->openTextEditor(_("Backtrace $"),
+ QString::fromUtf8(QByteArray::fromHex(data.data())));
+}
+
void LldbEngine::runContinuation(const GdbMi &data)
{
const QByteArray target = data.data();
@@ -493,6 +500,8 @@ void LldbEngine::activateFrame(int frameIndex)
cmd.arg("thread", threadsHandler()->currentThread().raw());
cmd.arg("stacklimit", limit);
runCommand(cmd);
+
+ updateAll();
}
void LldbEngine::selectThread(ThreadId threadId)
@@ -872,6 +881,7 @@ bool LldbEngine::setToolTipExpression(const QPoint &mousePos,
void LldbEngine::updateAll()
{
+ reloadRegisters();
updateLocals();
}
@@ -1181,6 +1191,8 @@ void LldbEngine::refreshState(const GdbMi &reportedState)
if (m_continueAtNextSpontaneousStop) {
m_continueAtNextSpontaneousStop = false;
continueInferior();
+ } else {
+ updateAll();
}
} else if (newState == "inferiorstopok")
notifyInferiorStopOk();
@@ -1248,6 +1260,10 @@ void LldbEngine::fetchDisassembler(DisassemblerAgent *agent)
runCommand(cmd);
}
+void LldbEngine::createFullBacktrace()
+{
+ runCommand("createFullBacktrace");
+}
void LldbEngine::fetchMemory(MemoryAgent *agent, QObject *editorToken,
quint64 addr, quint64 length)
diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h
index df6c132ed1..f8ba142094 100644
--- a/src/plugins/debugger/lldb/lldbengine.h
+++ b/src/plugins/debugger/lldb/lldbengine.h
@@ -162,6 +162,7 @@ private:
Q_SLOT void runEngine2();
Q_SLOT void updateAll();
Q_SLOT void updateLocals();
+ Q_SLOT void createFullBacktrace();
void doUpdateLocals(UpdateParameters params);
void refreshAll(const GdbMi &all);
void refreshThreads(const GdbMi &threads);
@@ -181,10 +182,10 @@ private:
void refreshChangedBreakpoint(const GdbMi &bkpts);
void refreshRemovedBreakpoint(const GdbMi &bkpts);
void runContinuation(const GdbMi &data);
+ void showFullBacktrace(const GdbMi &data);
typedef void (LldbEngine::*LldbCommandContinuation)();
- void handleStop(const QByteArray &response);
void handleListLocals(const QByteArray &response);
void handleListModules(const QByteArray &response);
void handleListSymbols(const QByteArray &response);
diff --git a/src/plugins/debugger/ptracepreload.qbs b/src/plugins/debugger/ptracepreload.qbs
index 0f31a6c55d..90a323d4d5 100644
--- a/src/plugins/debugger/ptracepreload.qbs
+++ b/src/plugins/debugger/ptracepreload.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcLibrary
QtcLibrary {
diff --git a/src/plugins/designer/designer.qbs b/src/plugins/designer/designer.qbs
index af9c273c7b..7e1460b7d7 100644
--- a/src/plugins/designer/designer.qbs
+++ b/src/plugins/designer/designer.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.FileInfo
import QtcPlugin
diff --git a/src/plugins/designer/formeditorfactory.cpp b/src/plugins/designer/formeditorfactory.cpp
index a005946fe3..cc43bfaf02 100644
--- a/src/plugins/designer/formeditorfactory.cpp
+++ b/src/plugins/designer/formeditorfactory.cpp
@@ -63,7 +63,7 @@ Core::IEditor *FormEditorFactory::createEditor()
if (data.formWindowEditor) {
Core::InfoBarEntry info(Core::Id(Constants::INFO_READ_ONLY),
tr("This file can only be edited in <b>Design</b> mode."));
- info.setCustomButtonInfo(tr("Switch mode"), this, SLOT(designerModeClicked()));
+ info.setCustomButtonInfo(tr("Switch Mode"), this, SLOT(designerModeClicked()));
data.formWindowEditor->document()->infoBar()->addInfo(info);
}
return data.formWindowEditor;
diff --git a/src/plugins/diffeditor/diffeditor.qbs b/src/plugins/diffeditor/diffeditor.qbs
index 3ea42e4b79..e561e1cd9c 100644
--- a/src/plugins/diffeditor/diffeditor.qbs
+++ b/src/plugins/diffeditor/diffeditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp
index 7cd49c5680..1a9f5c2bc7 100644
--- a/src/plugins/diffeditor/diffeditorplugin.cpp
+++ b/src/plugins/diffeditor/diffeditorplugin.cpp
@@ -133,15 +133,4 @@ QString DiffEditorPlugin::getFileContents(const QString &fileName) const
} // namespace Internal
} // namespace DiffEditor
-#ifdef WITH_TESTS
-
-#include "sidebysidediffeditorwidget.h"
-
-void DiffEditor::Internal::DiffEditorPlugin::testFixPositions()
-{
- SideBySideDiffEditorWidget::testFixPositions();
-}
-
-#endif // WITH_TESTS
-
Q_EXPORT_PLUGIN(DiffEditor::Internal::DiffEditorPlugin)
diff --git a/src/plugins/diffeditor/diffeditorplugin.h b/src/plugins/diffeditor/diffeditorplugin.h
index 703c97496f..ba347213af 100644
--- a/src/plugins/diffeditor/diffeditorplugin.h
+++ b/src/plugins/diffeditor/diffeditorplugin.h
@@ -53,10 +53,6 @@ public:
private slots:
void diff();
-#ifdef WITH_TESTS
- void testFixPositions();
-#endif // WITH_TESTS
-
private:
QString getFileContents(const QString &fileName) const;
diff --git a/src/plugins/diffeditor/diffutils.cpp b/src/plugins/diffeditor/diffutils.cpp
index a967fb9e86..ed15a283d3 100644
--- a/src/plugins/diffeditor/diffutils.cpp
+++ b/src/plugins/diffeditor/diffutils.cpp
@@ -35,7 +35,7 @@
namespace DiffEditor {
namespace Internal {
-static QList<TextLineData> assemblyRows(const QStringList &lines,
+static QList<TextLineData> assemblyRows(const QList<TextLineData> &lines,
const QMap<int, int> &lineSpans)
{
QList<TextLineData> data;
@@ -50,49 +50,51 @@ static QList<TextLineData> assemblyRows(const QStringList &lines,
return data;
}
-static bool lastLinesEqual(const QStringList &leftLines,
- const QStringList &rightLines)
+static bool lastLinesEqual(const QList<TextLineData> &leftLines,
+ const QList<TextLineData> &rightLines)
{
const bool leftLineEqual = leftLines.count()
- ? leftLines.last().isEmpty()
+ ? leftLines.last().text.isEmpty()
: true;
const bool rightLineEqual = rightLines.count()
- ? rightLines.last().isEmpty()
+ ? rightLines.last().text.isEmpty()
: true;
return leftLineEqual && rightLineEqual;
}
static void handleLine(const QStringList &newLines,
int line,
- QStringList *lines,
- int *lineNumber,
- int *charNumber)
+ QList<TextLineData> *lines,
+ int *lineNumber)
{
if (line < newLines.count()) {
const QString text = newLines.at(line);
if (lines->isEmpty() || line > 0) {
if (line > 0)
++*lineNumber;
- lines->append(text);
+ lines->append(TextLineData(text));
} else {
- lines->last() += text;
+ lines->last().text += text;
}
- *charNumber += text.count();
}
}
static void handleDifference(const QString &text,
- QStringList *lines,
- QMap<int, int> *changedPositions,
- int *lineNumber,
- int *charNumber)
+ QList<TextLineData> *lines,
+ int *lineNumber)
{
- const int oldPosition = *lineNumber + *charNumber;
- const QStringList newLeftLines = text.split(QLatin1Char('\n'));
- for (int line = 0; line < newLeftLines.count(); ++line)
- handleLine(newLeftLines, line, lines, lineNumber, charNumber);
- const int newPosition = *lineNumber + *charNumber;
- changedPositions->insert(oldPosition, newPosition);
+ const QStringList newLines = text.split(QLatin1Char('\n'));
+ for (int line = 0; line < newLines.count(); ++line) {
+ const int startPos = line > 0
+ ? -1
+ : lines->isEmpty() ? 0 : lines->last().text.count();
+ handleLine(newLines, line, lines, lineNumber);
+ const int endPos = line < newLines.count() - 1
+ ? -1
+ : lines->isEmpty() ? 0 : lines->last().text.count();
+ if (!lines->isEmpty())
+ lines->last().changedPositions.insert(startPos, endPos);
+ }
}
/*
@@ -108,8 +110,8 @@ ChunkData calculateOriginalData(const QList<Diff> &leftDiffList,
int i = 0;
int j = 0;
- QStringList leftLines;
- QStringList rightLines;
+ QList<TextLineData> leftLines;
+ QList<TextLineData> rightLines;
// <line number, span count>
QMap<int, int> leftSpans;
@@ -119,8 +121,6 @@ ChunkData calculateOriginalData(const QList<Diff> &leftDiffList,
int leftLineNumber = 0;
int rightLineNumber = 0;
- int leftCharNumber = 0;
- int rightCharNumber = 0;
int leftLineAligned = -1;
int rightLineAligned = -1;
bool lastLineEqual = true;
@@ -135,13 +135,13 @@ ChunkData calculateOriginalData(const QList<Diff> &leftDiffList,
if (leftDiff.command == Diff::Delete) {
// process delete
- handleDifference(leftDiff.text, &leftLines, &chunkData.changedLeftPositions, &leftLineNumber, &leftCharNumber);
+ handleDifference(leftDiff.text, &leftLines, &leftLineNumber);
lastLineEqual = lastLinesEqual(leftLines, rightLines);
i++;
}
if (rightDiff.command == Diff::Insert) {
// process insert
- handleDifference(rightDiff.text, &rightLines, &chunkData.changedRightPositions, &rightLineNumber, &rightCharNumber);
+ handleDifference(rightDiff.text, &rightLines, &rightLineNumber);
lastLineEqual = lastLinesEqual(leftLines, rightLines);
j++;
}
@@ -153,8 +153,8 @@ ChunkData calculateOriginalData(const QList<Diff> &leftDiffList,
int line = 0;
while (line < qMax(newLeftLines.count(), newRightLines.count())) {
- handleLine(newLeftLines, line, &leftLines, &leftLineNumber, &leftCharNumber);
- handleLine(newRightLines, line, &rightLines, &rightLineNumber, &rightCharNumber);
+ handleLine(newLeftLines, line, &leftLines, &leftLineNumber);
+ handleLine(newRightLines, line, &rightLines, &rightLineNumber);
const int commonLineCount = qMin(newLeftLines.count(), newRightLines.count());
if (line < commonLineCount) {
@@ -172,7 +172,7 @@ ChunkData calculateOriginalData(const QList<Diff> &leftDiffList,
if (line == commonLineCount - 1) {
// omit alignment when last lines of equalities are empty
- if (leftLines.last().isEmpty() || rightLines.last().isEmpty())
+ if (leftLines.last().text.isEmpty() || rightLines.last().text.isEmpty())
doAlign = false;
// unless it's the last dummy line (don't omit in that case)
@@ -283,72 +283,41 @@ FileData calculateContextData(const ChunkData &originalData, int contextLinesNum
}
}
i = 0;
- int leftCharCounter = 0;
- int rightCharCounter = 0;
- QMap<int, int>::ConstIterator leftChangedIt = originalData.changedLeftPositions.constBegin();
- QMap<int, int>::ConstIterator rightChangedIt = originalData.changedRightPositions.constBegin();
- const QMap<int, int>::ConstIterator leftChangedItEnd = originalData.changedLeftPositions.constEnd();
- const QMap<int, int>::ConstIterator rightChangedItEnd = originalData.changedRightPositions.constEnd();
while (i < originalData.rows.count()) {
- if (!hiddenRows.contains(i)) {
- ChunkData chunkData;
- int leftOffset = leftCharCounter;
- int rightOffset = rightCharCounter;
- chunkData.contextChunk = false;
- while (i < originalData.rows.count()) {
- if (hiddenRows.contains(i))
- break;
- RowData rowData = originalData.rows.at(i);
- chunkData.rows.append(rowData);
-
- if (rowData.leftLine.textLineType == TextLineData::TextLine)
- leftCharCounter += rowData.leftLine.text.count() + 1; // +1 for '\n'
- if (rowData.rightLine.textLineType == TextLineData::TextLine)
- rightCharCounter += rowData.rightLine.text.count() + 1; // +1 for '\n'
- i++;
- }
- while (leftChangedIt != leftChangedItEnd) {
- if (leftChangedIt.key() < leftOffset
- || leftChangedIt.key() > leftCharCounter)
- break;
-
- const int startPos = leftChangedIt.key();
- const int endPos = leftChangedIt.value();
- chunkData.changedLeftPositions.insert(startPos - leftOffset, endPos - leftOffset);
- leftChangedIt++;
- }
- while (rightChangedIt != rightChangedItEnd) {
- if (rightChangedIt.key() < rightOffset
- || rightChangedIt.key() > rightCharCounter)
- break;
-
- const int startPos = rightChangedIt.key();
- const int endPos = rightChangedIt.value();
- chunkData.changedRightPositions.insert(startPos - rightOffset, endPos - rightOffset);
- rightChangedIt++;
- }
- fileData.chunks.append(chunkData);
- } else {
- ChunkData chunkData;
- chunkData.contextChunk = true;
- while (i < originalData.rows.count()) {
- if (!hiddenRows.contains(i))
- break;
- RowData rowData = originalData.rows.at(i);
- chunkData.rows.append(rowData);
-
- if (rowData.leftLine.textLineType == TextLineData::TextLine)
- leftCharCounter += rowData.leftLine.text.count() + 1; // +1 for '\n'
- if (rowData.rightLine.textLineType == TextLineData::TextLine)
- rightCharCounter += rowData.rightLine.text.count() + 1; // +1 for '\n'
- i++;
- }
- fileData.chunks.append(chunkData);
+ const bool contextChunk = hiddenRows.contains(i);
+ ChunkData chunkData;
+ chunkData.contextChunk = contextChunk;
+ while (i < originalData.rows.count()) {
+ if (contextChunk != hiddenRows.contains(i))
+ break;
+ RowData rowData = originalData.rows.at(i);
+ chunkData.rows.append(rowData);
+ ++i;
}
+ fileData.chunks.append(chunkData);
}
+
return fileData;
}
+void addChangedPositions(int positionOffset, const QMap<int, int> &originalChangedPositions, QMap<int, int> *changedPositions)
+{
+ QMapIterator<int, int> it(originalChangedPositions);
+ while (it.hasNext()) {
+ it.next();
+ const int startPos = it.key();
+ const int endPos = it.value();
+ const int newStartPos = startPos < 0 ? -1 : startPos + positionOffset;
+ const int newEndPos = endPos < 0 ? -1 : endPos + positionOffset;
+ if (startPos < 0 && !changedPositions->isEmpty()) {
+ QMap<int, int>::iterator last = changedPositions->end();
+ --last;
+ last.value() = newEndPos;
+ } else
+ changedPositions->insert(newStartPos, newEndPos);
+ }
+}
+
QList<QTextEdit::ExtraSelection> colorPositions(
const QTextCharFormat &format,
QTextCursor &cursor,
diff --git a/src/plugins/diffeditor/diffutils.h b/src/plugins/diffeditor/diffutils.h
index aedcd891fd..75102c7406 100644
--- a/src/plugins/diffeditor/diffutils.h
+++ b/src/plugins/diffeditor/diffutils.h
@@ -57,6 +57,13 @@ public:
TextLineData(TextLineType t) : textLineType(t) {}
TextLineType textLineType;
QString text;
+ /*
+ * <start position, end position>
+ * <-1, n> means this is a continuation from the previous line
+ * <n, -1> means this will be continued in the next line
+ * <-1, -1> the whole line is a continuation (from the previous line to the next line)
+ */
+ QMap<int, int> changedPositions; // counting from the beginning of the line
};
class RowData {
@@ -76,9 +83,6 @@ public:
ChunkData() : contextChunk(false) {}
QList<RowData> rows;
bool contextChunk;
- // start position, end position, TextLineData::Separator lines not taken into account
- QMap<int, int> changedLeftPositions; // counting from the beginning of the chunk
- QMap<int, int> changedRightPositions; // counting from the beginning of the chunk
};
class FileData {
@@ -94,6 +98,9 @@ ChunkData calculateOriginalData(const QList<Diff> &leftDiffList,
const QList<Diff> &rightDiffList);
FileData calculateContextData(const ChunkData &originalData,
int contextLinesNumber);
+void addChangedPositions(int positionOffset,
+ const QMap<int, int> &originalChangedPositions,
+ QMap<int, int> *changedPositions);
QList<QTextEdit::ExtraSelection> colorPositions(const QTextCharFormat &format,
QTextCursor &cursor,
const QMap<int, int> &positions);
diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp
index e8b00191f1..7e4e8ddf34 100644
--- a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp
+++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp
@@ -1037,86 +1037,6 @@ void SideBySideDiffEditorWidget::showDiff()
m_rightEditor->updateFoldingHighlight(QPoint(-1, -1));
}
-static void fixPositions(QMap<int, int>::ConstIterator *it,
- const QMap<int, int>::ConstIterator &itEnd,
- int fileOffset,
- int charCounter,
- int spanCounter,
- int *lastSpanCounter,
- QMap<int, int> *changedPositions)
-{
- while (*it != itEnd) {
- if (it->key() >= charCounter)
- break;
-
- if (it->value() >= charCounter) {
- if (*lastSpanCounter != -1)
- break;
-
- *lastSpanCounter = spanCounter;
- break;
- }
-
- const int startSpanOffset = *lastSpanCounter != -1
- ? *lastSpanCounter : spanCounter;
- *lastSpanCounter = -1;
-
- const int startPos = it->key() + startSpanOffset + fileOffset;
- const int endPos = it->value() + spanCounter + fileOffset;
- changedPositions->insert(startPos, endPos);
- ++(*it);
- }
-}
-
-static void fixPositions(const ChunkData &chunkData,
- const int leftFileOffset,
- const int rightFileOffset,
- QMap<int, int> *leftCharPos,
- QMap<int, int> *rightCharPos)
-{
- QMap<int, int>::ConstIterator leftIt = chunkData.changedLeftPositions.constBegin();
- const QMap<int, int>::ConstIterator leftItEnd = chunkData.changedLeftPositions.constEnd();
- QMap<int, int>::ConstIterator rightIt = chunkData.changedRightPositions.constBegin();
- const QMap<int, int>::ConstIterator rightItEnd = chunkData.changedRightPositions.constEnd();
- if (leftIt == leftItEnd && rightIt == rightItEnd)
- return;
-
- int leftCharCounter = 0;
- int rightCharCounter = 0;
- int leftSpanCounter = 0;
- int rightSpanCounter = 0;
- int leftLastSpanCounter = -1;
- int rightLastSpanCounter = -1;
- for (int i = 0; i < chunkData.rows.count(); i++) {
- const RowData &row = chunkData.rows.at(i);
-
- if (row.leftLine.textLineType == TextLineData::TextLine)
- leftCharCounter += row.leftLine.text.count() + 1; // +1 for '\n'
- else
- ++leftSpanCounter;
-
- if (row.rightLine.textLineType == TextLineData::TextLine)
- rightCharCounter += row.rightLine.text.count() + 1; // +1 for '\n'
- else
- ++rightSpanCounter;
-
- fixPositions(&leftIt,
- leftItEnd,
- leftFileOffset,
- leftCharCounter,
- leftSpanCounter,
- &leftLastSpanCounter,
- leftCharPos);
- fixPositions(&rightIt,
- rightItEnd,
- rightFileOffset,
- rightCharCounter,
- rightSpanCounter,
- &rightLastSpanCounter,
- rightCharPos);
- }
-}
-
void SideBySideDiffEditorWidget::colorDiff(const QList<FileData> &fileDataList)
{
QPalette pal = m_leftEditor->extraArea()->palette();
@@ -1144,31 +1064,30 @@ void SideBySideDiffEditorWidget::colorDiff(const QList<FileData> &fileDataList)
int rightLastSkippedBlockStartPos = 0;
for (int i = 0; i < fileDataList.count(); i++) {
+ const FileData &fileData = fileDataList.at(i);
leftFilePos[leftPos] = leftPos + 1;
rightFilePos[rightPos] = rightPos + 1;
leftPos++; // for file line
rightPos++; // for file line
- const FileData &fileData = fileDataList.at(i);
for (int j = 0; j < fileData.chunks.count(); j++) {
- ChunkData chunkData = fileData.chunks.at(j);
+ const ChunkData &chunkData = fileData.chunks.at(j);
if (chunkData.contextChunk) {
leftChunkPos[leftPos] = leftPos + 1;
rightChunkPos[rightPos] = rightPos + 1;
leftPos++; // for chunk line
rightPos++; // for chunk line
}
- const int leftFileOffset = leftPos;
- const int rightFileOffset = rightPos;
leftLastDiffBlockStartPos = leftPos;
rightLastDiffBlockStartPos = rightPos;
leftLastSkippedBlockStartPos = leftPos;
rightLastSkippedBlockStartPos = rightPos;
- fixPositions(chunkData, leftFileOffset, rightFileOffset, &leftCharPos, &rightCharPos);
-
for (int k = 0; k < chunkData.rows.count(); k++) {
- RowData rowData = chunkData.rows.at(k);
+ const RowData &rowData = chunkData.rows.at(k);
+
+ addChangedPositions(leftPos, rowData.leftLine.changedPositions, &leftCharPos);
+ addChangedPositions(rightPos, rowData.rightLine.changedPositions, &rightCharPos);
leftPos += rowData.leftLine.text.count() + 1; // +1 for '\n'
rightPos += rowData.rightLine.text.count() + 1; // +1 for '\n'
@@ -1201,27 +1120,19 @@ void SideBySideDiffEditorWidget::colorDiff(const QList<FileData> &fileDataList)
QTextCursor leftCursor = m_leftEditor->textCursor();
QTextCursor rightCursor = m_rightEditor->textCursor();
- QList<QTextEdit::ExtraSelection> leftSelections
- = colorPositions(m_leftLineFormat, leftCursor, leftLinePos);
- leftSelections
- += colorPositions(spanLineFormat, leftCursor, leftSkippedPos);
- leftSelections
- += colorPositions(m_chunkLineFormat, leftCursor, leftChunkPos);
- leftSelections
- += colorPositions(m_fileLineFormat, leftCursor, leftFilePos);
- leftSelections
- += colorPositions(m_leftCharFormat, leftCursor, leftCharPos);
-
- QList<QTextEdit::ExtraSelection> rightSelections
- = colorPositions(m_rightLineFormat, rightCursor, rightLinePos);
- rightSelections
- += colorPositions(spanLineFormat, rightCursor, rightSkippedPos);
- rightSelections
- += colorPositions(m_chunkLineFormat, rightCursor, rightChunkPos);
- rightSelections
- += colorPositions(m_fileLineFormat, rightCursor, rightFilePos);
- rightSelections
- += colorPositions(m_rightCharFormat, rightCursor, rightCharPos);
+ QList<QTextEdit::ExtraSelection> leftSelections;
+ leftSelections += colorPositions(m_leftLineFormat, leftCursor, leftLinePos);
+ leftSelections += colorPositions(m_leftCharFormat, leftCursor, leftCharPos);
+ leftSelections += colorPositions(spanLineFormat, leftCursor, leftSkippedPos);
+ leftSelections += colorPositions(m_chunkLineFormat, leftCursor, leftChunkPos);
+ leftSelections += colorPositions(m_fileLineFormat, leftCursor, leftFilePos);
+
+ QList<QTextEdit::ExtraSelection> rightSelections;
+ rightSelections += colorPositions(m_rightLineFormat, rightCursor, rightLinePos);
+ rightSelections += colorPositions(m_rightCharFormat, rightCursor, rightCharPos);
+ rightSelections += colorPositions(spanLineFormat, rightCursor, rightSkippedPos);
+ rightSelections += colorPositions(m_chunkLineFormat, rightCursor, rightChunkPos);
+ rightSelections += colorPositions(m_fileLineFormat, rightCursor, rightFilePos);
m_leftEditor->setExtraSelections(BaseTextEditorWidget::OtherSelection, leftSelections);
m_rightEditor->setExtraSelections(BaseTextEditorWidget::OtherSelection, rightSelections);
@@ -1485,44 +1396,6 @@ void SideBySideDiffEditorWidget::synchronizeFoldings(SideDiffEditorWidget *sourc
m_foldingBlocker = false;
}
-
} // namespace DiffEditor
-#ifdef WITH_TESTS
-#include <QTest>
-
-void DiffEditor::SideBySideDiffEditorWidget::testFixPositions()
-{
- ChunkData chunkData;
- chunkData.rows.append(RowData(TextLineData(QLatin1String("abcd efgh")), TextLineData(QLatin1String("abcd "))));
- chunkData.rows.append(RowData(TextLineData(TextLineData::Separator), TextLineData(QLatin1String(""))));
- chunkData.rows.append(RowData(TextLineData(TextLineData::Separator), TextLineData(QLatin1String(""))));
- chunkData.rows.append(RowData(TextLineData(TextLineData::Separator), TextLineData(QLatin1String(""))));
- chunkData.rows.append(RowData(TextLineData(TextLineData::Separator), TextLineData(QLatin1String(""))));
- chunkData.rows.append(RowData(TextLineData(TextLineData::Separator), TextLineData(QLatin1String(""))));
- chunkData.rows.append(RowData(TextLineData(TextLineData::Separator), TextLineData(QLatin1String(""))));
- chunkData.rows.append(RowData(TextLineData(QLatin1String("ijkl mnop")), TextLineData(QLatin1String(" mnop"))));
-
- chunkData.changedLeftPositions.insert(5, 14); // changed text from position 5 to position 14, occupy 9 characters: "efgh\nijkl"
-
- QMap<int, int> expectedLeftChangedPositions;
- expectedLeftChangedPositions[5] = 20; // "efgh\n[\n\n\n\n\n\n]ijkl" - [\n] means inserted span
-
- QMap<int, int> outputLeftChangedPositions;
- QMap<int, int> outputRightChangedPositions;
-
- fixPositions(chunkData, 0, 0, &outputLeftChangedPositions, &outputRightChangedPositions);
- QVERIFY(outputLeftChangedPositions == expectedLeftChangedPositions);
-
- QMap<int, int> expectedLeftMovedPositions;
- expectedLeftMovedPositions[15] = 30; // moved by 10
- outputLeftChangedPositions.clear();
- outputRightChangedPositions.clear();
-
- fixPositions(chunkData, 10, 0, &outputLeftChangedPositions, &outputRightChangedPositions);
- QVERIFY(outputLeftChangedPositions == expectedLeftMovedPositions);
-}
-
-#endif // WITH_TESTS
-
#include "sidebysidediffeditorwidget.moc"
diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.h b/src/plugins/diffeditor/sidebysidediffeditorwidget.h
index 17b5756ee3..a25809e475 100644
--- a/src/plugins/diffeditor/sidebysidediffeditorwidget.h
+++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.h
@@ -62,10 +62,6 @@ public:
void setDiffEditorGuiController(DiffEditorGuiController *controller);
DiffEditorGuiController *diffEditorGuiController() const;
-#ifdef WITH_TESTS
- static void testFixPositions();
-#endif // WITH_TESTS
-
private slots:
void clear(const QString &message = QString());
void setDiff(const QList<DiffEditorController::DiffFilesContents> &diffFileList, const QString &workingDirectory);
diff --git a/src/plugins/fakevim/fakevim.qbs b/src/plugins/fakevim/fakevim.qbs
index 6b2f675366..e1eb89c4a8 100644
--- a/src/plugins/fakevim/fakevim.qbs
+++ b/src/plugins/fakevim/fakevim.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/fakevim/fakevimoptions.ui b/src/plugins/fakevim/fakevimoptions.ui
index 8aa972b88a..8db93d585f 100644
--- a/src/plugins/fakevim/fakevimoptions.ui
+++ b/src/plugins/fakevim/fakevimoptions.ui
@@ -187,7 +187,7 @@
<item>
<widget class="QLabel" name="labelTabulator">
<property name="toolTip">
- <string>Vim tabstop option</string>
+ <string>Vim tabstop option.</string>
</property>
<property name="text">
<string>Tabulator size:</string>
diff --git a/src/plugins/find/find.qbs b/src/plugins/find/find.qbs
index e0acdc006f..8e28788ff2 100644
--- a/src/plugins/find/find.qbs
+++ b/src/plugins/find/find.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/genericprojectmanager/genericprojectmanager.qbs b/src/plugins/genericprojectmanager/genericprojectmanager.qbs
index 359215d54f..5e345dd8f8 100644
--- a/src/plugins/genericprojectmanager/genericprojectmanager.qbs
+++ b/src/plugins/genericprojectmanager/genericprojectmanager.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/genericprojectmanager/genericprojectnodes.cpp b/src/plugins/genericprojectmanager/genericprojectnodes.cpp
index e3ecda4434..294505a981 100644
--- a/src/plugins/genericprojectmanager/genericprojectnodes.cpp
+++ b/src/plugins/genericprojectmanager/genericprojectnodes.cpp
@@ -225,7 +225,7 @@ FolderNode *GenericProjectNode::findFolderByName(const QStringList &components,
return 0;
}
-bool GenericProjectNode::hasBuildTargets() const
+bool GenericProjectNode::showInSimpleTree() const
{
return true;
}
diff --git a/src/plugins/genericprojectmanager/genericprojectnodes.h b/src/plugins/genericprojectmanager/genericprojectnodes.h
index a7c25c0b30..c8763e049f 100644
--- a/src/plugins/genericprojectmanager/genericprojectnodes.h
+++ b/src/plugins/genericprojectmanager/genericprojectnodes.h
@@ -51,7 +51,7 @@ public:
Core::IDocument *projectFile() const;
QString projectFilePath() const;
- bool hasBuildTargets() const;
+ bool showInSimpleTree() const;
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
diff --git a/src/plugins/git/branchdialog.ui b/src/plugins/git/branchdialog.ui
index 320c78bbd6..36d07c7dfc 100644
--- a/src/plugins/git/branchdialog.ui
+++ b/src/plugins/git/branchdialog.ui
@@ -173,7 +173,7 @@
<item>
<widget class="QPushButton" name="trackButton">
<property name="toolTip">
- <string>Sets current branch to track the selected one.</string>
+ <string>Set current branch to track the selected one.</string>
</property>
<property name="text">
<string>&amp;Track</string>
diff --git a/src/plugins/git/commitdata.cpp b/src/plugins/git/commitdata.cpp
index 9a1fefcbaf..0ac0c5d1de 100644
--- a/src/plugins/git/commitdata.cpp
+++ b/src/plugins/git/commitdata.cpp
@@ -80,6 +80,7 @@ QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &data)
CommitData::CommitData(CommitType type)
: commitType(type)
+ , commitEncoding(0)
, enablePush(false)
{
}
diff --git a/src/plugins/git/commitdata.h b/src/plugins/git/commitdata.h
index 8fbee2b5d9..d921eb726d 100644
--- a/src/plugins/git/commitdata.h
+++ b/src/plugins/git/commitdata.h
@@ -111,7 +111,7 @@ public:
CommitType commitType;
QString amendSHA1;
- QString commitEncoding;
+ QTextCodec *commitEncoding;
GitSubmitEditorPanelInfo panelInfo;
GitSubmitEditorPanelData panelData;
bool enablePush;
diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp
index f51adbb511..45ccb65de3 100644
--- a/src/plugins/git/gerrit/gerritplugin.cpp
+++ b/src/plugins/git/gerrit/gerritplugin.cpp
@@ -356,7 +356,7 @@ void GerritPlugin::openView()
{
if (m_dialog.isNull()) {
while (!m_parameters->isValid()) {
- QMessageBox::warning(0, tr("Error"),
+ QMessageBox::warning(ICore::dialogParent(), tr("Error"),
tr("Invalid Gerrit configuration. Host, user and ssh binary are mandatory."));
const Id group = VcsBase::Constants::VCS_SETTINGS_CATEGORY;
if (!ICore::showOptionsDialog(group, "Gerrit"))
diff --git a/src/plugins/git/git.qbs b/src/plugins/git/git.qbs
index eacdf24f83..75a3357c1d 100644
--- a/src/plugins/git/git.qbs
+++ b/src/plugins/git/git.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 2860cc5da2..76d2edd144 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -424,7 +424,8 @@ void GitDiffHandler::collectShowDescription(const QString &id)
m_editorController->clear(m_waitMessage);
VcsBase::Command *command = new VcsBase::Command(m_gitPath, m_workingDirectory, m_processEnvironment);
- command->setCodec(Core::EditorManager::defaultTextCodec());
+ command->setCodec(GitPlugin::instance()->gitClient()->encoding(m_workingDirectory,
+ "i18n.commitEncoding"));
connect(command, SIGNAL(output(QString)), this, SLOT(slotShowDescriptionReceived(QString)));
QStringList arguments;
arguments << QLatin1String("show") << QLatin1String("-s")
@@ -1132,14 +1133,10 @@ VcsBase::VcsBaseEditorWidget *GitClient::createVcsEditor(
this, SLOT(slotBlameRevisionRequested(QString,QString,QString,int)));
QTC_ASSERT(rc, return 0);
rc->setSource(source);
- if (codecType == CodecSource) {
+ if (codecType == CodecSource)
rc->setCodec(getSourceCodec(source));
- } else if (codecType == CodecLogOutput) {
- QString encodingName = readConfigValue(source, QLatin1String("i18n.logOutputEncoding"));
- if (encodingName.isEmpty())
- encodingName = QLatin1String("utf-8");
- rc->setCodec(QTextCodec::codecForName(encodingName.toLocal8Bit()));
- }
+ else if (codecType == CodecLogOutput)
+ rc->setCodec(encoding(source, "i18n.logOutputEncoding"));
rc->setForceReadOnly(true);
@@ -1556,12 +1553,8 @@ void GitClient::slotBlameRevisionRequested(const QString &workingDirectory, cons
QTextCodec *GitClient::getSourceCodec(const QString &file) const
{
- if (QFileInfo(file).isFile())
- return VcsBase::VcsBaseEditorWidget::getCodec(file);
- QString encodingName = readConfigValue(file, QLatin1String("gui.encoding"));
- if (encodingName.isEmpty())
- encodingName = QLatin1String("utf-8");
- return QTextCodec::codecForName(encodingName.toLocal8Bit());
+ return QFileInfo(file).isFile() ? VcsBase::VcsBaseEditorWidget::getCodec(file)
+ : encoding(file, "gui.encoding");
}
void GitClient::blame(const QString &workingDirectory,
@@ -1625,7 +1618,7 @@ QStringList GitClient::setupCheckoutArguments(const QString &workingDirectory,
return arguments;
if (QMessageBox::question(Core::ICore::mainWindow(), tr("Create Local Branch"),
- tr("Would you like to create local branch?"),
+ tr("Would you like to create a local branch?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
return arguments;
}
@@ -1705,11 +1698,7 @@ bool GitClient::synchronousLog(const QString &workingDirectory, const QStringLis
const bool rc = fullySynchronousGit(workingDirectory, allArguments, &outputText, &errorText,
flags);
if (rc) {
- QString encodingName = readConfigValue(workingDirectory, QLatin1String("i18n.logOutputEncoding"));
- if (encodingName.isEmpty())
- encodingName = QLatin1String("utf-8");
- QTextCodec *codec = QTextCodec::codecForName(encodingName.toLocal8Bit());
- if (codec)
+ if (QTextCodec *codec = encoding(workingDirectory, "i18n.logOutputEncoding"))
*output = codec->toUnicode(outputText);
else
*output = commandOutputFromLocal8Bit(outputText);
@@ -2411,9 +2400,10 @@ SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory)
if (cachedSubmoduleData.contains(workingDirectory))
return cachedSubmoduleData.value(workingDirectory);
- QStringList args(QLatin1String("-l"));
- QStringList allConfigs = readConfig(workingDirectory, args).split(QLatin1Char('\n'));
+ QStringList allConfigs =
+ commandOutputFromLocal8Bit(readConfig(workingDirectory, QLatin1String("-l")))
+ .split(QLatin1Char('\n'));
const QString submoduleLineStart = QLatin1String("submodule.");
foreach (const QString &configLine, allConfigs) {
if (!configLine.startsWith(submoduleLineStart))
@@ -3027,6 +3017,16 @@ QString GitClient::gitBinaryPath(bool *ok, QString *errorMessage) const
return settings()->gitBinaryPath(ok, errorMessage);
}
+QTextCodec *GitClient::encoding(const QString &workingDirectory, const QByteArray &configVar) const
+{
+ QByteArray codecName = readConfig(workingDirectory, QLatin1String(configVar)).trimmed();
+ // Set default commit encoding to 'UTF-8', when it's not set,
+ // to solve displaying error of commit log with non-latin characters.
+ if (codecName.isEmpty())
+ codecName = "UTF-8";
+ return QTextCodec::codecForName(codecName);
+}
+
bool GitClient::getCommitData(const QString &workingDirectory,
QString *commitTemplate,
CommitData &commitData,
@@ -3106,12 +3106,7 @@ bool GitClient::getCommitData(const QString &workingDirectory,
}
}
- commitData.commitEncoding = readConfigValue(workingDirectory, QLatin1String("i18n.commitEncoding"));
-
- // Set default commit encoding to 'UTF-8', when it's not set,
- // to solve displaying error of commit log with non-latin characters.
- if (commitData.commitEncoding.isEmpty())
- commitData.commitEncoding = QLatin1String("UTF-8");
+ commitData.commitEncoding = encoding(workingDirectory, "i18n.commitEncoding");
// Get the commit template or the last commit message
switch (commitData.commitType) {
@@ -3119,8 +3114,8 @@ bool GitClient::getCommitData(const QString &workingDirectory,
// Amend: get last commit data as "SHA1<tab>author<tab>email<tab>message".
QStringList args(QLatin1String("log"));
args << QLatin1String("--max-count=1") << QLatin1String("--pretty=format:%h\t%an\t%ae\t%B");
- QTextCodec *codec = QTextCodec::codecForName(commitData.commitEncoding.toLocal8Bit());
- const Utils::SynchronousProcessResponse sp = synchronousGit(repoDirectory, args, 0, codec);
+ const Utils::SynchronousProcessResponse sp = synchronousGit(repoDirectory, args, 0,
+ commitData.commitEncoding);
if (sp.result != Utils::SynchronousProcessResponse::Finished) {
*errorMessage = tr("Cannot retrieve last commit data of repository \"%1\".").arg(repoDirectory);
return false;
@@ -3748,7 +3743,7 @@ bool GitClient::synchronousStashList(const QString &workingDirectory,
return true;
}
-QString GitClient::readConfig(const QString &workingDirectory, const QStringList &configVar) const
+QByteArray GitClient::readConfig(const QString &workingDirectory, const QString &configVar) const
{
QStringList arguments;
arguments << QLatin1String("config") << configVar;
@@ -3757,16 +3752,16 @@ QString GitClient::readConfig(const QString &workingDirectory, const QStringList
QByteArray errorText;
if (!fullySynchronousGit(workingDirectory, arguments, &outputText, &errorText,
VcsBasePlugin::SuppressCommandLogging))
- return QString();
+ return QByteArray();
if (Utils::HostOsInfo::isWindowsHost())
- return Utils::SynchronousProcess::normalizeNewlines(QString::fromUtf8(outputText));
- return commandOutputFromLocal8Bit(outputText);
+ outputText.replace("\r\n", "\n");
+ return outputText;
}
// Read a single-line config value, return trimmed
QString GitClient::readConfigValue(const QString &workingDirectory, const QString &configVar) const
{
- return readConfig(workingDirectory, QStringList(configVar)).remove(QLatin1Char('\n'));
+ return commandOutputFromLocal8Bit(readConfig(workingDirectory, configVar).trimmed());
}
bool GitClient::cloneRepository(const QString &directory,const QByteArray &url)
diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h
index 5ca5424225..b5dd5fd474 100644
--- a/src/plugins/git/gitclient.h
+++ b/src/plugins/git/gitclient.h
@@ -281,10 +281,11 @@ public:
const QString &messge, QString *name,
QString *errorMessage = 0);
- QString readConfig(const QString &workingDirectory, const QStringList &configVar) const;
+ QByteArray readConfig(const QString &workingDirectory, const QString &configVar) const;
QString readConfigValue(const QString &workingDirectory, const QString &configVar) const;
+ QTextCodec *encoding(const QString &workingDirectory, const QByteArray &configVar) const;
bool getCommitData(const QString &workingDirectory, QString *commitTemplate,
CommitData &commitData, QString *errorMessage);
diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp
index 07328f34a7..d281ad9e48 100644
--- a/src/plugins/git/giteditor.cpp
+++ b/src/plugins/git/giteditor.cpp
@@ -46,6 +46,7 @@
#include <QRegExp>
#include <QSet>
#include <QTemporaryFile>
+#include <QTextCodec>
#include <QDir>
#include <QTextCursor>
@@ -325,14 +326,16 @@ void GitEditor::addDiffActions(QMenu *menu, const VcsBase::DiffChunk &chunk)
bool GitEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
{
- bool res = VcsBaseEditorWidget::open(errorString, fileName, realFileName);
Core::Id editorId = editor()->document()->id();
if (editorId == Git::Constants::GIT_COMMIT_TEXT_EDITOR_ID
|| editorId == Git::Constants::GIT_REBASE_EDITOR_ID) {
QFileInfo fi(fileName);
- setSource(fi.absolutePath());
+ const QString gitPath = fi.absolutePath();
+ setSource(gitPath);
+ baseTextDocument()->setCodec(
+ GitPlugin::instance()->gitClient()->encoding(gitPath, "i18n.commitEncoding"));
}
- return res;
+ return VcsBaseEditorWidget::open(errorString, fileName, realFileName);
}
QString GitEditor::decorateVersion(const QString &revision) const
diff --git a/src/plugins/git/gitsubmiteditor.cpp b/src/plugins/git/gitsubmiteditor.cpp
index 0c785fcfb5..7857171768 100644
--- a/src/plugins/git/gitsubmiteditor.cpp
+++ b/src/plugins/git/gitsubmiteditor.cpp
@@ -88,6 +88,7 @@ private:
GitSubmitEditor::GitSubmitEditor(const VcsBase::VcsBaseSubmitEditorParameters *parameters, QWidget *parent) :
VcsBaseSubmitEditor(parameters, new GitSubmitEditorWidget(parent)),
m_model(0),
+ m_commitEncoding(0),
m_commitType(SimpleCommit),
m_forceClose(false)
{
@@ -153,7 +154,9 @@ void GitSubmitEditor::slotDiffSelected(const QList<int> &rows)
unmergedFiles.push_back(fileName);
else if (state & StagedFile)
stagedFiles.push_back(fileName);
- else if (state != UntrackedFile)
+ else if (state == UntrackedFile)
+ Core::EditorManager::openEditor(m_workingDirectory + QLatin1Char('/') + fileName);
+ else
unstagedFiles.push_back(fileName);
}
if (!unstagedFiles.empty() || !stagedFiles.empty())
@@ -200,13 +203,10 @@ QByteArray GitSubmitEditor::fileContents() const
{
const QString &text = submitEditorWidget()->descriptionText();
- if (!m_commitEncoding.isEmpty()) {
- // Do the encoding convert, When use user-defined encoding
- // e.g. git config --global i18n.commitencoding utf-8
- QTextCodec *codec = QTextCodec::codecForName(m_commitEncoding.toLocal8Bit());
- if (codec)
- return codec->fromUnicode(text);
- }
+ // Do the encoding convert, When use user-defined encoding
+ // e.g. git config --global i18n.commitencoding utf-8
+ if (m_commitEncoding)
+ return m_commitEncoding->fromUnicode(text);
// Using utf-8 as the default encoding
return text.toUtf8();
diff --git a/src/plugins/git/gitsubmiteditor.h b/src/plugins/git/gitsubmiteditor.h
index 629ae4fcbc..e2e093cfe2 100644
--- a/src/plugins/git/gitsubmiteditor.h
+++ b/src/plugins/git/gitsubmiteditor.h
@@ -75,7 +75,7 @@ private:
inline const GitSubmitEditorWidget *submitEditorWidget() const;
VcsBase::SubmitFileModel *m_model;
- QString m_commitEncoding;
+ QTextCodec *m_commitEncoding;
CommitType m_commitType;
QString m_amendSHA1;
bool m_forceClose;
diff --git a/src/plugins/git/mergetool.cpp b/src/plugins/git/mergetool.cpp
index 44190b7981..a3263b0440 100644
--- a/src/plugins/git/mergetool.cpp
+++ b/src/plugins/git/mergetool.cpp
@@ -33,6 +33,7 @@
#include "gitversioncontrol.h"
#include <coreplugin/documentmanager.h>
+#include <coreplugin/icore.h>
#include <vcsbase/vcsbaseoutputwindow.h>
#include <QMessageBox>
@@ -89,7 +90,8 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
arguments << QLatin1String("mergetool") << QLatin1String("-y");
if (!files.isEmpty()) {
if (m_gitClient->gitVersion() < 0x010708) {
- QMessageBox::warning(0, tr("Error"), tr("File input for the merge tool requires Git 1.7.8, or later."));
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Error"),
+ tr("File input for the merge tool requires Git 1.7.8, or later."));
return false;
}
arguments << files;
@@ -244,7 +246,7 @@ void MergeTool::readData()
m_remoteState = waitAndReadStatus(m_remoteInfo);
chooseAction();
} else if (m_merging && line.startsWith("Continue merging")) {
- if (QMessageBox::question(0, tr("Continue Merging"),
+ if (QMessageBox::question(Core::ICore::dialogParent(), tr("Continue Merging"),
tr("Continue merging other unresolved paths?"),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No) == QMessageBox::Yes) {
@@ -262,7 +264,7 @@ void MergeTool::done()
const QString workingDirectory = m_process->workingDirectory();
int exitCode = m_process->exitCode();
if (!exitCode) {
- outputWindow->appendMessage(tr("Merge tool process finished successully."));
+ outputWindow->appendMessage(tr("Merge tool process finished successfully."));
m_gitClient->continueCommandIfNeeded(workingDirectory);
} else {
outputWindow->appendError(tr("Merge tool process terminated with exit code %1")
diff --git a/src/plugins/glsleditor/glsleditor.qbs b/src/plugins/glsleditor/glsleditor.qbs
index 4bce00cfaa..7bdb706924 100644
--- a/src/plugins/glsleditor/glsleditor.qbs
+++ b/src/plugins/glsleditor/glsleditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/helloworld/helloworld.qbs b/src/plugins/helloworld/helloworld.qbs
index a2c677c8be..ee28546281 100644
--- a/src/plugins/helloworld/helloworld.qbs
+++ b/src/plugins/helloworld/helloworld.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/help/generalsettingspage.ui b/src/plugins/help/generalsettingspage.ui
index fff9fad77e..ae3b4a361f 100644
--- a/src/plugins/help/generalsettingspage.ui
+++ b/src/plugins/help/generalsettingspage.ui
@@ -268,7 +268,7 @@
<item>
<widget class="QPushButton" name="defaultPageButton">
<property name="toolTip">
- <string>Reset to default</string>
+ <string>Reset to default.</string>
</property>
<property name="text">
<string>Reset</string>
@@ -291,7 +291,7 @@
<item>
<widget class="QCheckBox" name="m_returnOnClose">
<property name="toolTip">
- <string>Switch to editor context after last help page is closed.</string>
+ <string>Switches to editor context after last help page is closed.</string>
</property>
<property name="text">
<string>Return to editor on closing the last page</string>
diff --git a/src/plugins/help/help.qbs b/src/plugins/help/help.qbs
index bedbc11a50..5786458f95 100644
--- a/src/plugins/help/help.qbs
+++ b/src/plugins/help/help.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/imageviewer/imageviewer.qbs b/src/plugins/imageviewer/imageviewer.qbs
index 3fb6057e17..d12d2b5345 100644
--- a/src/plugins/imageviewer/imageviewer.qbs
+++ b/src/plugins/imageviewer/imageviewer.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/ios/ios.qbs b/src/plugins/ios/ios.qbs
index 9dab73cc78..1f351427cd 100644
--- a/src/plugins/ios/ios.qbs
+++ b/src/plugins/ios/ios.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/ios/iosconstants.h b/src/plugins/ios/iosconstants.h
index 3bdab989eb..cd76cc12e8 100644
--- a/src/plugins/ios/iosconstants.h
+++ b/src/plugins/ios/iosconstants.h
@@ -55,6 +55,14 @@ const char IOS_DEVICE_TYPE[] = "Ios.Device.Type";
const char IOS_SIMULATOR_TYPE[] = "Ios.Simulator.Type";
const char IOS_DEVICE_ID[] = "iOS Device ";
const char IOS_SIMULATOR_DEVICE_ID[] = "iOS Simulator Device ";
+
+const quint16 IOS_DEVICE_PORT_START = 30000;
+const quint16 IOS_DEVICE_PORT_END = 31000;
+const quint16 IOS_SIMULATOR_PORT_START = 30000;
+const quint16 IOS_SIMULATOR_PORT_END = 31000;
+
+const char EXTRA_INFO_KEY[] = "extraInfo";
+
} // namespace Constants;
} // namespace Ios
diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp
index 9dda6e05d2..ce54715970 100644
--- a/src/plugins/ios/iosdevice.cpp
+++ b/src/plugins/ios/iosdevice.cpp
@@ -34,6 +34,7 @@
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/kitinformation.h>
#include <coreplugin/helpmanager.h>
+#include <utils/portlist.h>
#include <QCoreApplication>
#include <QVariant>
@@ -78,27 +79,32 @@ static QString CFStringRef2QString(CFStringRef s)
namespace Ios {
namespace Internal {
-const char extraInfoKey[] = "extraInfo";
-
IosDevice::IosDevice()
: IDevice(Core::Id(Constants::IOS_DEVICE_TYPE),
IDevice::AutoDetected,
IDevice::Hardware,
- Constants::IOS_DEVICE_ID)
+ Constants::IOS_DEVICE_ID),
+ m_lastPort(Constants::IOS_DEVICE_PORT_START)
{
setDisplayName(IosDevice::name());
setDeviceState(DeviceDisconnected);
+ Utils::PortList ports;
+ ports.addRange(Constants::IOS_DEVICE_PORT_START,
+ Constants::IOS_DEVICE_PORT_END);
+ setFreePorts(ports);
}
IosDevice::IosDevice(const IosDevice &other)
- : IDevice(other), m_extraInfo(other.m_extraInfo), m_ignoreDevice(other.m_ignoreDevice)
+ : IDevice(other), m_extraInfo(other.m_extraInfo), m_ignoreDevice(other.m_ignoreDevice),
+ m_lastPort(other.m_lastPort)
{ }
IosDevice::IosDevice(const QString &uid)
: IDevice(Core::Id(Constants::IOS_DEVICE_TYPE),
IDevice::AutoDetected,
IDevice::Hardware,
- Core::Id(Constants::IOS_DEVICE_ID).withSuffix(uid))
+ Core::Id(Constants::IOS_DEVICE_ID).withSuffix(uid)),
+ m_lastPort(Constants::IOS_DEVICE_PORT_START)
{
setDisplayName(IosDevice::name());
setDeviceState(DeviceDisconnected);
@@ -158,7 +164,7 @@ IDevice::Ptr IosDevice::clone() const
void IosDevice::fromMap(const QVariantMap &map)
{
IDevice::fromMap(map);
- QVariantMap vMap = map.value(QLatin1String(extraInfoKey)).toMap();
+ QVariantMap vMap = map.value(QLatin1String(Constants::EXTRA_INFO_KEY)).toMap();
QMapIterator<QString, QVariant> i(vMap);
m_extraInfo.clear();
while (i.hasNext()) {
@@ -176,7 +182,7 @@ QVariantMap IosDevice::toMap() const
i.next();
vMap.insert(i.key(), i.value());
}
- res.insert(QLatin1String(extraInfoKey), vMap);
+ res.insert(QLatin1String(Constants::EXTRA_INFO_KEY), vMap);
return res;
}
@@ -195,6 +201,19 @@ QString IosDevice::osVersion() const
return m_extraInfo.value(QLatin1String("osVersion"));
}
+quint16 IosDevice::nextPort() const
+{
+ // use qrand instead?
+ if (++m_lastPort >= Constants::IOS_DEVICE_PORT_END)
+ m_lastPort = Constants::IOS_DEVICE_PORT_START;
+ return m_lastPort;
+}
+
+bool IosDevice::canAutoDetectPorts() const
+{
+ return true;
+}
+
// IosDeviceManager
@@ -260,7 +279,10 @@ void IosDeviceManager::deviceDisconnected(const QString &uid)
qDebug() << "ignoring disconnection of ios device " << uid; // should neve happen
} else {
const IosDevice *iosDev = static_cast<const IosDevice *>(dev.data());
- if (iosDev->deviceState() != IDevice::DeviceDisconnected) {
+ if (iosDev->m_extraInfo.isEmpty()
+ || iosDev->m_extraInfo.value(QLatin1String("deviceName")) == QLatin1String("*unknown*")) {
+ devManager->removeDevice(iosDev->id());
+ } else if (iosDev->deviceState() != IDevice::DeviceDisconnected) {
if (debugDeviceDetection)
qDebug() << "disconnecting device " << iosDev->uniqueDeviceID();
devManager->setDeviceState(iosDev->id(), IDevice::DeviceDisconnected);
diff --git a/src/plugins/ios/iosdevice.h b/src/plugins/ios/iosdevice.h
index 12d11b0c37..10ff7cc97f 100644
--- a/src/plugins/ios/iosdevice.h
+++ b/src/plugins/ios/iosdevice.h
@@ -71,6 +71,8 @@ public:
QString uniqueDeviceID() const;
IosDevice(const QString &uid);
QString osVersion() const;
+ quint16 nextPort() const;
+ bool canAutoDetectPorts() const QTC_OVERRIDE;
static QString name();
@@ -81,6 +83,7 @@ protected:
IosDevice(const IosDevice &other);
Dict m_extraInfo;
bool m_ignoreDevice;
+ mutable quint16 m_lastPort;
};
class IosDeviceManager : public QObject {
diff --git a/src/plugins/ios/iosdevicefactory.cpp b/src/plugins/ios/iosdevicefactory.cpp
index a78a74adb6..c9fcf3ecfb 100644
--- a/src/plugins/ios/iosdevicefactory.cpp
+++ b/src/plugins/ios/iosdevicefactory.cpp
@@ -63,7 +63,13 @@ ProjectExplorer::IDevice::Ptr IosDeviceFactory::create(Core::Id id) const
bool IosDeviceFactory::canRestore(const QVariantMap &map) const
{
- return ProjectExplorer::IDevice::typeFromMap(map) == Constants::IOS_DEVICE_TYPE;
+ if (ProjectExplorer::IDevice::typeFromMap(map) != Constants::IOS_DEVICE_TYPE)
+ return false;
+ QVariantMap vMap = map.value(QLatin1String(Constants::EXTRA_INFO_KEY)).toMap();
+ if (vMap.isEmpty()
+ || vMap.value(QLatin1String("deviceName")).toString() == QLatin1String("*unknown*"))
+ return false; // transient device (probably generated during an activation)
+ return true;
}
ProjectExplorer::IDevice::Ptr IosDeviceFactory::restore(const QVariantMap &map) const
diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp
index 8b8fea5882..f2f8db6703 100644
--- a/src/plugins/ios/iosrunconfiguration.cpp
+++ b/src/plugins/ios/iosrunconfiguration.cpp
@@ -227,7 +227,7 @@ Utils::FileName IosRunConfiguration::bundleDir() const
if (isDevice)
res.appendPath(QLatin1String("Release-iphoneos"));
else
- res.appendPath(QLatin1String("/Release-iphonesimulator"));
+ res.appendPath(QLatin1String("Release-iphonesimulator"));
break;
default:
qDebug() << "IosBuildStep had an unknown buildType "
diff --git a/src/plugins/ios/iossimulator.cpp b/src/plugins/ios/iossimulator.cpp
index 792acc871d..f647438d67 100644
--- a/src/plugins/ios/iossimulator.cpp
+++ b/src/plugins/ios/iossimulator.cpp
@@ -33,6 +33,7 @@
#include <projectexplorer/kitinformation.h>
#include <QCoreApplication>
+#include <QProcess>
using namespace ProjectExplorer;
@@ -46,7 +47,8 @@ IosSimulator::IosSimulator(Core::Id id, Utils::FileName simulatorPath)
IDevice::AutoDetected,
IDevice::Emulator,
id),
- m_simulatorPath(simulatorPath)
+ m_simulatorPath(simulatorPath),
+ m_lastPort(Constants::IOS_SIMULATOR_PORT_START)
{
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
setDeviceState(DeviceReadyToUse);
@@ -56,14 +58,15 @@ IosSimulator::IosSimulator()
: IDevice(Core::Id(Constants::IOS_SIMULATOR_TYPE),
IDevice::AutoDetected,
IDevice::Emulator,
- Core::Id(Constants::IOS_SIMULATOR_DEVICE_ID))
+ Core::Id(Constants::IOS_SIMULATOR_DEVICE_ID)),
+ m_lastPort(Constants::IOS_SIMULATOR_PORT_START)
{
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
setDeviceState(DeviceReadyToUse);
}
IosSimulator::IosSimulator(const IosSimulator &other)
- : IDevice(other)
+ : IDevice(other), m_lastPort(other.m_lastPort)
{
setDisplayName(QCoreApplication::translate("Ios::Internal::IosSimulator", "iOS Simulator"));
setDeviceState(DeviceReadyToUse);
@@ -131,6 +134,35 @@ QVariantMap IosSimulator::toMap() const
return res;
}
+quint16 IosSimulator::nextPort() const
+{
+ for (int i = 0; i < 100; ++i) {
+ // use qrand instead?
+ if (++m_lastPort >= Constants::IOS_SIMULATOR_PORT_END)
+ m_lastPort = Constants::IOS_SIMULATOR_PORT_START;
+ QProcess portVerifier;
+ // this is a bit too broad (it does not check just listening sockets, but also connections
+ // to that port from this computer)
+ portVerifier.start(QLatin1String("lsof"), QStringList() << QLatin1String("-n")
+ << QLatin1String("-P") << QLatin1String("-i")
+ << QString::fromLatin1(":%1").arg(m_lastPort));
+ if (!portVerifier.waitForStarted())
+ break;
+ portVerifier.closeWriteChannel();
+ if (!portVerifier.waitForFinished())
+ break;
+ if (portVerifier.exitStatus() != QProcess::NormalExit
+ || portVerifier.exitCode() != 0)
+ break;
+ }
+ return m_lastPort;
+}
+
+bool IosSimulator::canAutoDetectPorts() const
+{
+ return true;
+}
+
IosSimulator::ConstPtr IosKitInformation::simulator(Kit *kit)
{
if (!kit)
diff --git a/src/plugins/ios/iossimulator.h b/src/plugins/ios/iossimulator.h
index e34125461b..0fee860250 100644
--- a/src/plugins/ios/iossimulator.h
+++ b/src/plugins/ios/iossimulator.h
@@ -57,6 +57,8 @@ public:
Utils::FileName simulatorPath() const;
void fromMap(const QVariantMap &map) QTC_OVERRIDE;
QVariantMap toMap() const QTC_OVERRIDE;
+ quint16 nextPort() const;
+ bool canAutoDetectPorts() const QTC_OVERRIDE;
ProjectExplorer::IDevice::Ptr clone() const QTC_OVERRIDE;
@@ -68,6 +70,7 @@ protected:
IosSimulator(const IosSimulator &other);
private:
Utils::FileName m_simulatorPath;
+ mutable quint16 m_lastPort;
};
namespace IosKitInformation {
diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp
index 7a4ffe9f50..26de448afb 100644
--- a/src/plugins/ios/iostoolhandler.cpp
+++ b/src/plugins/ios/iostoolhandler.cpp
@@ -728,7 +728,13 @@ QString IosToolHandler::iosDeviceToolPath()
QString IosToolHandler::iosSimulatorToolPath()
{
+ Utils::FileName devPath = Internal::IosConfigurations::developerPath();
+ bool version182 = devPath.appendPath(QLatin1String(
+ "Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework"))
+ .toFileInfo().exists();
QString res = Core::ICore::libexecPath() + QLatin1String("/ios/iossim");
+ if (version182)
+ res = res.append(QLatin1String("_1_8_2"));
return res;
}
diff --git a/src/plugins/locator/locator.qbs b/src/plugins/locator/locator.qbs
index b32738a9f7..0c52b46eed 100644
--- a/src/plugins/locator/locator.qbs
+++ b/src/plugins/locator/locator.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.FileInfo
import QtcPlugin
diff --git a/src/plugins/macros/macros.qbs b/src/plugins/macros/macros.qbs
index 97a81becec..541b356e00 100644
--- a/src/plugins/macros/macros.qbs
+++ b/src/plugins/macros/macros.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/mercurial/mercurial.qbs b/src/plugins/mercurial/mercurial.qbs
index 11a9354a5f..77aaa39ea2 100644
--- a/src/plugins/mercurial/mercurial.qbs
+++ b/src/plugins/mercurial/mercurial.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/mercurial/srcdestdialog.ui b/src/plugins/mercurial/srcdestdialog.ui
index 3d20f31f68..b560d4857d 100644
--- a/src/plugins/mercurial/srcdestdialog.ui
+++ b/src/plugins/mercurial/srcdestdialog.ui
@@ -36,7 +36,7 @@
<item row="2" column="0">
<widget class="QRadioButton" name="urlButton">
<property name="toolTip">
- <string>e.g. https://[user[:pass]@]host[:port]/[path]</string>
+ <string>For example: 'https://[user[:pass]@]host[:port]/[path]'.</string>
</property>
<property name="text">
<string>Specify URL:</string>
@@ -56,7 +56,7 @@
<bool>false</bool>
</property>
<property name="toolTip">
- <string>e.g. https://[user[:pass]@]host[:port]/[path]</string>
+ <string>For example: 'https://[user[:pass]@]host[:port]/[path]'.</string>
</property>
</widget>
</item>
diff --git a/src/plugins/perforce/perforce.qbs b/src/plugins/perforce/perforce.qbs
index 6999147c9e..2a0ac5bd98 100644
--- a/src/plugins/perforce/perforce.qbs
+++ b/src/plugins/perforce/perforce.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index 641590ae58..5bfae7a878 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -462,7 +462,7 @@ void PerforcePlugin::revertCurrentFile()
bool doNotRevert = false;
if (!result.stdOut.isEmpty())
- doNotRevert = (QMessageBox::warning(0, tr("p4 revert"),
+ doNotRevert = (QMessageBox::warning(Core::ICore::dialogParent(), tr("p4 revert"),
tr("The file has been changed. Do you want to revert it?"),
QMessageBox::Yes, QMessageBox::No) == QMessageBox::No);
if (doNotRevert)
@@ -514,7 +514,7 @@ void PerforcePlugin::revertCurrentProject()
QTC_ASSERT(state.hasProject(), return);
const QString msg = tr("Do you want to revert all changes to the project \"%1\"?").arg(state.currentProjectName());
- if (QMessageBox::warning(0, tr("p4 revert"), msg, QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
+ if (QMessageBox::warning(Core::ICore::dialogParent(), tr("p4 revert"), msg, QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
return;
revertProject(state.currentProjectTopLevel(), perforceRelativeProjectDirectory(state), false);
}
diff --git a/src/plugins/projectexplorer/customtoolchain.cpp b/src/plugins/projectexplorer/customtoolchain.cpp
index 104da390d4..033dffa2e4 100644
--- a/src/plugins/projectexplorer/customtoolchain.cpp
+++ b/src/plugins/projectexplorer/customtoolchain.cpp
@@ -495,7 +495,7 @@ CustomToolChainConfigWidget::CustomToolChainConfigWidget(CustomToolChain *tc) :
QHBoxLayout *parserLayout = new QHBoxLayout(parserLayoutWidget);
parserLayout->setContentsMargins(0, 0, 0, 0);
m_predefinedMacros->setTabChangesFocus(true);
- m_predefinedMacros->setToolTip(tr("Each line defines a macro. Format is MACRO[=VALUE]"));
+ m_predefinedMacros->setToolTip(tr("Each line defines a macro. Format is MACRO[=VALUE]."));
m_headerPaths->setTabChangesFocus(true);
m_headerPaths->setToolTip(tr("Each line adds a global header lookup path."));
m_cxx11Flags->setToolTip(tr("Comma-separated list of flags that turn on C++11 support."));
diff --git a/src/plugins/projectexplorer/dependenciespanel.cpp b/src/plugins/projectexplorer/dependenciespanel.cpp
index 3982d0e383..c10e66f747 100644
--- a/src/plugins/projectexplorer/dependenciespanel.cpp
+++ b/src/plugins/projectexplorer/dependenciespanel.cpp
@@ -32,6 +32,7 @@
#include "session.h"
#include <coreplugin/fileiconprovider.h>
+#include <coreplugin/icore.h>
#include <utils/detailswidget.h>
#include <QDebug>
@@ -114,7 +115,7 @@ bool DependenciesModel::setData(const QModelIndex &index, const QVariant &value,
emit dataChanged(index, index);
return true;
} else {
- QMessageBox::warning(0, QCoreApplication::translate("DependenciesModel", "Unable to Add Dependency"),
+ QMessageBox::warning(Core::ICore::dialogParent(), QCoreApplication::translate("DependenciesModel", "Unable to Add Dependency"),
QCoreApplication::translate("DependenciesModel", "This would create a circular dependency."));
}
} else if (c == Qt::Unchecked) {
diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp
index b1a7c70a1f..b2a48ad379 100644
--- a/src/plugins/projectexplorer/kit.cpp
+++ b/src/plugins/projectexplorer/kit.cpp
@@ -54,6 +54,7 @@ const char SDK_PROVIDED_KEY[] = "PE.Profile.SDK";
const char DATA_KEY[] = "PE.Profile.Data";
const char ICON_KEY[] = "PE.Profile.Icon";
const char MUTABLE_INFO_KEY[] = "PE.Profile.MutableInfo";
+const char STICKY_INFO_KEY[] = "PE.Profile.StickyInfo";
} // namespace
@@ -151,6 +152,10 @@ Kit::Kit(const QVariantMap &data) :
QStringList mutableInfoList = data.value(QLatin1String(MUTABLE_INFO_KEY)).toStringList();
foreach (const QString &mutableInfo, mutableInfoList)
d->m_mutable.insert(Core::Id::fromString(mutableInfo));
+
+ QStringList stickyInfoList = data.value(QLatin1String(STICKY_INFO_KEY)).toStringList();
+ foreach (const QString &stickyInfo, stickyInfoList)
+ d->m_sticky.insert(Core::Id::fromString(stickyInfo));
}
Kit::~Kit()
@@ -437,6 +442,11 @@ QVariantMap Kit::toMap() const
mutableInfo << id.toString();
data.insert(QLatin1String(MUTABLE_INFO_KEY), mutableInfo);
+ QStringList stickyInfo;
+ foreach (const Core::Id &id, d->m_sticky)
+ stickyInfo << id.toString();
+ data.insert(QLatin1String(STICKY_INFO_KEY), stickyInfo);
+
QVariantMap extra;
const IdVariantConstIt cend = d->m_data.constEnd();
diff --git a/src/plugins/projectexplorer/kitinformationconfigwidget.cpp b/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
index a5d119dd1a..dffc0d31ab 100644
--- a/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
@@ -90,7 +90,7 @@ void SysRootInformationConfigWidget::refresh()
void SysRootInformationConfigWidget::makeReadOnly()
{
- m_chooser->setEnabled(false);
+ m_chooser->setReadOnly(true);
}
QWidget *SysRootInformationConfigWidget::mainWidget() const
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index b706012ff1..80613b7d1f 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -190,6 +190,8 @@ QByteArray MsvcToolChain::msvcPredefinedMacros(const QStringList cxxflags,
predefinedMacros += "#undef ";
predefinedMacros += arg.mid(2).toLocal8Bit();
predefinedMacros += '\n';
+ } else if (arg.startsWith(QLatin1String("-I"))) {
+ // Include paths should not have any effect on defines
} else {
toProcess.append(arg);
}
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 61669ea6b4..a3aab42bbd 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -2785,6 +2785,12 @@ QString pathOrDirectoryFor(Node *node, bool dir)
list << f->path() + QLatin1Char('/');
location = Utils::commonPath(list);
}
+
+ QFileInfo fi(location);
+ while ((!fi.exists() || !fi.isDir())
+ && !fi.isRoot())
+ fi.setFile(fi.absolutePath());
+ location = fi.absoluteFilePath();
} else {
QFileInfo fi(path);
// remove any /suffixes, which e.g. ResourceNode uses
diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs
index 1b7c4dfdf9..9ecac8b701 100644
--- a/src/plugins/projectexplorer/projectexplorer.qbs
+++ b/src/plugins/projectexplorer/projectexplorer.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcFunctions
import QtcPlugin
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.ui b/src/plugins/projectexplorer/projectexplorersettingspage.ui
index 8f7816f84c..55bb9fad10 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.ui
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.ui
@@ -175,7 +175,7 @@
<item row="6" column="0">
<widget class="QCheckBox" name="promptToStopRunControlCheckBox">
<property name="toolTip">
- <string>Ask before terminating the running application in response to clicking the stop button in Application Output.</string>
+ <string>Asks before terminating the running application in response to clicking the stop button in Application Output.</string>
</property>
<property name="text">
<string>Always ask before stopping applications</string>
diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp
index 6ab2786edb..5eece06532 100644
--- a/src/plugins/projectexplorer/projectmodels.cpp
+++ b/src/plugins/projectexplorer/projectmodels.cpp
@@ -175,11 +175,11 @@ FlatModel::FlatModel(SessionNode *rootNode, QObject *parent)
NodesWatcher *watcher = new NodesWatcher(this);
m_rootNode->registerWatcher(watcher);
- connect(watcher, SIGNAL(aboutToChangeHasBuildTargets(ProjectExplorer::ProjectNode*)),
- this, SLOT(aboutToHasBuildTargetsChanged(ProjectExplorer::ProjectNode*)));
+ connect(watcher, SIGNAL(aboutToChangeShowInSimpleTree(ProjectExplorer::FolderNode*)),
+ this, SLOT(aboutToShowInSimpleTreeChanged(ProjectExplorer::FolderNode*)));
- connect(watcher, SIGNAL(hasBuildTargetsChanged(ProjectExplorer::ProjectNode*)),
- this, SLOT(hasBuildTargetsChanged(ProjectExplorer::ProjectNode*)));
+ connect(watcher, SIGNAL(showInSimpleTreeChanged(ProjectExplorer::FolderNode*)),
+ this, SLOT(showInSimpleTreeChanged(ProjectExplorer::FolderNode*)));
connect(watcher, SIGNAL(foldersAboutToBeAdded(FolderNode*,QList<FolderNode*>)),
this, SLOT(foldersAboutToBeAdded(FolderNode*,QList<FolderNode*>)));
@@ -566,14 +566,9 @@ FolderNode *FlatModel::visibleFolderNode(FolderNode *node) const
bool FlatModel::filter(Node *node) const
{
bool isHidden = false;
- if (node->nodeType() == SessionNodeType) {
- isHidden = false;
- } else if (ProjectNode *projectNode = qobject_cast<ProjectNode*>(node)) {
- if (m_filterProjects && projectNode->parentFolderNode() != m_rootNode)
- isHidden = !projectNode->hasBuildTargets();
- } else if (node->nodeType() == FolderNodeType || node->nodeType() == VirtualFolderNodeType) {
+ if (FolderNode *folderNode = qobject_cast<FolderNode*>(node)) {
if (m_filterProjects)
- isHidden = true;
+ isHidden = !folderNode->showInSimpleTree();
} else if (FileNode *fileNode = qobject_cast<FileNode*>(node)) {
if (m_filterGeneratedFiles)
isHidden = fileNode->isGenerated();
@@ -762,7 +757,7 @@ void FlatModel::removed(FolderNode* parentNode, const QList<Node*> &newNodeList)
}
}
-void FlatModel::aboutToHasBuildTargetsChanged(ProjectExplorer::ProjectNode* node)
+void FlatModel::aboutToShowInSimpleTreeChanged(ProjectExplorer::FolderNode* node)
{
if (!m_filterProjects)
return;
@@ -777,7 +772,7 @@ void FlatModel::aboutToHasBuildTargetsChanged(ProjectExplorer::ProjectNode* node
m_childNodes.remove(fn);
}
-void FlatModel::hasBuildTargetsChanged(ProjectExplorer::ProjectNode *node)
+void FlatModel::showInSimpleTreeChanged(ProjectExplorer::FolderNode *node)
{
if (!m_filterProjects)
return;
diff --git a/src/plugins/projectexplorer/projectmodels.h b/src/plugins/projectexplorer/projectmodels.h
index bcddc21153..98d83649b9 100644
--- a/src/plugins/projectexplorer/projectmodels.h
+++ b/src/plugins/projectexplorer/projectmodels.h
@@ -78,8 +78,8 @@ public slots:
void setGeneratedFilesFilterEnabled(bool filter);
private slots:
- void aboutToHasBuildTargetsChanged(ProjectExplorer::ProjectNode *node);
- void hasBuildTargetsChanged(ProjectExplorer::ProjectNode *node);
+ void aboutToShowInSimpleTreeChanged(ProjectExplorer::FolderNode *node);
+ void showInSimpleTreeChanged(ProjectExplorer::FolderNode *node);
void foldersAboutToBeAdded(FolderNode *parentFolder, const QList<FolderNode*> &newFolders);
void foldersAdded();
diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp
index a9401f40d2..e3470d259b 100644
--- a/src/plugins/projectexplorer/projectnodes.cpp
+++ b/src/plugins/projectexplorer/projectnodes.cpp
@@ -509,6 +509,23 @@ void FolderNode::removeFolderNodes(const QList<FolderNode*> &subFolders)
emit watcher->foldersRemoved();
}
+void FolderNode::aboutToChangeShowInSimpleTree()
+{
+ foreach (NodesWatcher *watcher, projectNode()->watchers())
+ emit watcher->aboutToChangeShowInSimpleTree(this);
+}
+
+void FolderNode::showInSimpleTreeChanged()
+{
+ foreach (NodesWatcher *watcher, projectNode()->watchers())
+ emit watcher->showInSimpleTreeChanged(this);
+}
+
+bool FolderNode::showInSimpleTree() const
+{
+ return false;
+}
+
/*!
\class ProjectExplorer::VirtualFolderNode
@@ -572,18 +589,6 @@ QList<ProjectNode*> ProjectNode::subProjectNodes() const
return m_subProjectNodes;
}
-void ProjectNode::aboutToChangeHasBuildTargets()
-{
- foreach (NodesWatcher *watcher, watchers())
- emit watcher->aboutToChangeHasBuildTargets(this);
-}
-
-void ProjectNode::hasBuildTargetsChanged()
-{
- foreach (NodesWatcher *watcher, watchers())
- emit watcher->hasBuildTargetsChanged(this);
-}
-
/*!
\function bool ProjectNode::addSubProjects(const QStringList &)
*/
@@ -790,6 +795,11 @@ void SessionNode::accept(NodesVisitor *visitor)
project->accept(visitor);
}
+bool SessionNode::showInSimpleTree() const
+{
+ return true;
+}
+
QList<ProjectNode*> SessionNode::projectNodes() const
{
return m_projectNodes;
diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h
index 6661dfa0af..d6dd28dfb8 100644
--- a/src/plugins/projectexplorer/projectnodes.h
+++ b/src/plugins/projectexplorer/projectnodes.h
@@ -193,12 +193,19 @@ public:
virtual AddNewInformation addNewInformation(const QStringList &files, Node *context) const;
+
+ // determines if node will be shown in the flat view, by default folder and projects aren't shown
+ void aboutToChangeShowInSimpleTree();
+ void showInSimpleTreeChanged();
+ virtual bool showInSimpleTree() const;
+
void addFileNodes(const QList<FileNode*> &files);
void removeFileNodes(const QList<FileNode*> &files);
void addFolderNodes(const QList<FolderNode*> &subFolders);
void removeFolderNodes(const QList<FolderNode*> &subFolders);
+
protected:
QList<FolderNode*> m_subFolderNodes;
QList<FileNode*> m_fileNodes;
@@ -233,12 +240,6 @@ public:
// all subFolders that are projects
QList<ProjectNode*> subProjectNodes() const;
- // determines if the project will be shown in the flat view
- // TODO find a better name
- void aboutToChangeHasBuildTargets();
- void hasBuildTargetsChanged();
- virtual bool hasBuildTargets() const = 0;
-
virtual bool canAddSubProject(const QString &proFilePath) const = 0;
virtual bool addSubProjects(const QStringList &proFilePaths) = 0;
@@ -300,6 +301,7 @@ public:
bool isEnabled() const { return true; }
+ bool showInSimpleTree() const;
protected:
void addProjectNodes(const QList<ProjectNode*> &projectNodes);
void removeProjectNodes(const QList<ProjectNode*> &projectNodes);
@@ -325,8 +327,8 @@ signals:
void nodeUpdated(ProjectExplorer::Node *node);
// projects
- void aboutToChangeHasBuildTargets(ProjectExplorer::ProjectNode*);
- void hasBuildTargetsChanged(ProjectExplorer::ProjectNode *node);
+ void aboutToChangeShowInSimpleTree(ProjectExplorer::FolderNode*);
+ void showInSimpleTreeChanged(ProjectExplorer::FolderNode *node);
// folders & projects
void foldersAboutToBeAdded(FolderNode *parentFolder,
diff --git a/src/plugins/projectexplorer/removetaskhandler.cpp b/src/plugins/projectexplorer/removetaskhandler.cpp
index d2c7d7ba82..2f8ea19bae 100644
--- a/src/plugins/projectexplorer/removetaskhandler.cpp
+++ b/src/plugins/projectexplorer/removetaskhandler.cpp
@@ -44,7 +44,7 @@ void RemoveTaskHandler::handle(const ProjectExplorer::Task &task)
QAction *RemoveTaskHandler::createAction(QObject *parent) const
{
QAction *removeAction = new QAction(tr("Remove", "Name of the action triggering the removetaskhandler"), parent);
- removeAction->setToolTip(tr("Remove task from the task list"));
+ removeAction->setToolTip(tr("Remove task from the task list."));
removeAction->setShortcut(QKeySequence(QKeySequence::Delete));
removeAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
return removeAction;
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index c6f6f49e55..3a164ed3bc 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -395,7 +395,7 @@ bool SessionManager::save()
bool result = d->m_writer->save(data, Core::ICore::mainWindow());
if (!result) {
- QMessageBox::warning(0, tr("Error while saving session"),
+ QMessageBox::warning(ICore::dialogParent(), tr("Error while saving session"),
tr("Could not save session to file %1").arg(d->m_writer->fileName().toUserOutput()));
}
@@ -864,7 +864,7 @@ bool SessionManager::loadSession(const QString &session)
PersistentSettingsReader reader;
if (fileName.toFileInfo().exists()) {
if (!reader.load(fileName)) {
- QMessageBox::warning(0, tr("Error while restoring session"),
+ QMessageBox::warning(ICore::dialogParent(), tr("Error while restoring session"),
tr("Could not restore session %1").arg(fileName.toUserOutput()));
return false;
}
diff --git a/src/plugins/projectexplorer/sessiondialog.ui b/src/plugins/projectexplorer/sessiondialog.ui
index 9a9ad068df..e677951d98 100644
--- a/src/plugins/projectexplorer/sessiondialog.ui
+++ b/src/plugins/projectexplorer/sessiondialog.ui
@@ -88,7 +88,7 @@
<item row="1" column="0">
<widget class="QCheckBox" name="autoLoadCheckBox">
<property name="toolTip">
- <string>Automatically restore the last session when Qt Creator is started.</string>
+ <string>Automatically restores the last session when Qt Creator is started.</string>
</property>
<property name="text">
<string>Restore last session on startup</string>
diff --git a/src/plugins/projectexplorer/toolchainoptionspage.cpp b/src/plugins/projectexplorer/toolchainoptionspage.cpp
index aa5a3fffbd..fb2e03a09f 100644
--- a/src/plugins/projectexplorer/toolchainoptionspage.cpp
+++ b/src/plugins/projectexplorer/toolchainoptionspage.cpp
@@ -34,6 +34,7 @@
#include "toolchainconfigwidget.h"
#include "toolchainmanager.h"
+#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/detailswidget.h>
@@ -308,7 +309,7 @@ void ToolChainModel::apply()
qDeleteAll(m_toAddList);
if (removedTcs.count() == 1) {
- QMessageBox::warning(0,
+ QMessageBox::warning(Core::ICore::dialogParent(),
tr("Duplicate Compilers Detected"),
tr("The following compiler was already configured:<br>"
"&nbsp;%1<br>"
@@ -316,7 +317,7 @@ void ToolChainModel::apply()
.arg(removedTcs.at(0)));
} else if (!removedTcs.isEmpty()) {
- QMessageBox::warning(0,
+ QMessageBox::warning(Core::ICore::dialogParent(),
tr("Duplicate Compilers Detected"),
tr("The following compilers were already configured:<br>"
"&nbsp;%1<br>"
diff --git a/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp b/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp
index 37b9481610..58c2168a13 100644
--- a/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp
+++ b/src/plugins/projectexplorer/vcsannotatetaskhandler.cpp
@@ -66,7 +66,7 @@ void VcsAnnotateTaskHandler::handle(const Task &task)
QAction *VcsAnnotateTaskHandler::createAction(QObject *parent) const
{
QAction *vcsannotateAction = new QAction(tr("&Annotate"), parent);
- vcsannotateAction->setToolTip(tr("Annotate using version control system"));
+ vcsannotateAction->setToolTip(tr("Annotate using version control system."));
return vcsannotateAction;
}
diff --git a/src/plugins/pythoneditor/pythoneditor.qbs b/src/plugins/pythoneditor/pythoneditor.qbs
index c7e5c3b685..f7452298c5 100644
--- a/src/plugins/pythoneditor/pythoneditor.qbs
+++ b/src/plugins/pythoneditor/pythoneditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qbsprojectmanager/qbsnodes.cpp b/src/plugins/qbsprojectmanager/qbsnodes.cpp
index 8ea6551dcd..213fd4afe3 100644
--- a/src/plugins/qbsprojectmanager/qbsnodes.cpp
+++ b/src/plugins/qbsprojectmanager/qbsnodes.cpp
@@ -250,7 +250,7 @@ QbsBaseProjectNode::QbsBaseProjectNode(const QString &path) :
ProjectExplorer::ProjectNode(path)
{ }
-bool QbsBaseProjectNode::hasBuildTargets() const
+bool QbsBaseProjectNode::showInSimpleTree() const
{
return false;
}
@@ -493,7 +493,7 @@ bool QbsProductNode::isEnabled() const
return m_qbsProductData.isEnabled();
}
-bool QbsProductNode::hasBuildTargets() const
+bool QbsProductNode::showInSimpleTree() const
{
return true;
}
@@ -666,6 +666,11 @@ const qbs::ProjectData QbsProjectNode::qbsProjectData() const
return m_qbsProjectData;
}
+bool QbsProjectNode::showInSimpleTree() const
+{
+ return true;
+}
+
void QbsProjectNode::ctor()
{
if (m_projectIcon.isNull())
diff --git a/src/plugins/qbsprojectmanager/qbsnodes.h b/src/plugins/qbsprojectmanager/qbsnodes.h
index fe8ed9a65d..fe4315b63f 100644
--- a/src/plugins/qbsprojectmanager/qbsnodes.h
+++ b/src/plugins/qbsprojectmanager/qbsnodes.h
@@ -74,7 +74,7 @@ class QbsBaseProjectNode : public ProjectExplorer::ProjectNode
public:
explicit QbsBaseProjectNode(const QString &path);
- bool hasBuildTargets() const;
+ bool showInSimpleTree() const;
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
@@ -138,7 +138,7 @@ public:
explicit QbsProductNode(const qbs::ProductData &prd);
bool isEnabled() const;
- bool hasBuildTargets() const;
+ bool showInSimpleTree() const;
void setQbsProductData(const qbs::ProductData prd);
const qbs::ProductData qbsProductData() const { return m_qbsProductData; }
@@ -172,6 +172,7 @@ public:
const qbs::Project qbsProject() const;
const qbs::ProjectData qbsProjectData() const;
+ bool showInSimpleTree() const;
private:
void ctor();
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs b/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
index 1d12592c82..4ef8fee1fb 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import qbs.FileInfo
import QtcPlugin
diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp
index 8589fe4977..1ec71254ff 100644
--- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp
@@ -1568,9 +1568,9 @@ bool QmakeProFileNode::isParent(QmakeProFileNode *node)
return false;
}
-bool QmakeProFileNode::hasBuildTargets() const
+bool QmakeProFileNode::showInSimpleTree() const
{
- return hasBuildTargets(projectType());
+ return showInSimpleTree(projectType()) || m_project->rootProjectNode() == this;
}
ProjectExplorer::FolderNode::AddNewInformation QmakeProFileNode::addNewInformation(const QStringList &files, Node *context) const
@@ -1579,7 +1579,7 @@ ProjectExplorer::FolderNode::AddNewInformation QmakeProFileNode::addNewInformati
return AddNewInformation(QFileInfo(path()).fileName(), context == this ? 120 : 100);
}
-bool QmakeProFileNode::hasBuildTargets(QmakeProjectType projectType) const
+bool QmakeProFileNode::showInSimpleTree(QmakeProjectType projectType) const
{
return (projectType == ApplicationTemplate || projectType == LibraryTemplate);
}
@@ -1789,15 +1789,15 @@ void QmakeProFileNode::applyEvaluate(EvalResult evalResult, bool async)
removeProjectNodes(subProjectNodes());
removeFolderNodes(subFolderNodes());
- bool changesHasBuildTargets = hasBuildTargets() ^ hasBuildTargets(projectType);
+ bool changesShowInSimpleTree = showInSimpleTree() ^ showInSimpleTree(projectType);
- if (changesHasBuildTargets)
- aboutToChangeHasBuildTargets();
+ if (changesShowInSimpleTree)
+ aboutToChangeShowInSimpleTree();
m_projectType = projectType;
- if (changesHasBuildTargets)
- hasBuildTargetsChanged();
+ if (changesShowInSimpleTree)
+ showInSimpleTreeChanged();
// really emit here? or at the end? Nobody is connected to this signal at the moment
// so we kind of can ignore that question for now
diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h
index 71e78b169e..305d16380c 100644
--- a/src/plugins/qmakeprojectmanager/qmakenodes.h
+++ b/src/plugins/qmakeprojectmanager/qmakenodes.h
@@ -147,7 +147,7 @@ public:
// ProjectNode interface
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
- bool hasBuildTargets() const { return false; }
+ bool showInSimpleTree() const { return false; }
bool canAddSubProject(const QString &proFilePath) const;
@@ -366,7 +366,7 @@ public:
bool isParent(QmakeProFileNode *node);
- bool hasBuildTargets() const;
+ bool showInSimpleTree() const;
AddNewInformation addNewInformation(const QStringList &files, Node *context) const;
@@ -404,7 +404,7 @@ public:
bool validParse() const;
bool parseInProgress() const;
- bool hasBuildTargets(QmakeProjectType projectType) const;
+ bool showInSimpleTree(QmakeProjectType projectType) const;
bool isDebugAndRelease() const;
void setParseInProgress(bool b);
diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp
index 94f4396ada..217ceddaa5 100644
--- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp
@@ -42,6 +42,7 @@
#include "wizards/html5app.h"
#include <coreplugin/icontext.h>
+#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/documentmanager.h>
#include <cpptools/cppmodelmanagerinterface.h>
@@ -101,7 +102,7 @@ void updateBoilerPlateCodeFiles(const AbstractMobileApp *app, const QString &pro
"outdated or have been modified:<br><br>%2<br><br>Do you want "
"Qt Creator to update the files? Any changes will be lost.")
.arg(nativeProFile, fileNames.join(QLatin1String(", ")));
- if (QMessageBox::question(0, title, message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
+ if (QMessageBox::question(Core::ICore::dialogParent(), title, message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
QString error;
if (!app->updateFiles(updates, error))
QMessageBox::critical(0, title, error);
diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs
index e41dfdc770..4d7af8f967 100644
--- a/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs
+++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
index e17b470872..cea39f8b5d 100644
--- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
@@ -31,7 +31,6 @@
#include "modelnodecontextmenu_helper.h"
#include <cmath>
-#include <QMessageBox>
#include <QByteArray>
#include <nodeabstractproperty.h>
#include <nodemetainfo.h>
@@ -184,7 +183,7 @@ void toFront(const SelectionContext &selectionState)
node.setVariantProperty("z", maximumZ);
}
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -202,7 +201,7 @@ void toBack(const SelectionContext &selectionState)
}
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -222,7 +221,7 @@ void raise(const SelectionContext &selectionState)
}
}
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -243,7 +242,7 @@ void lower(const SelectionContext &selectionState)
}
}
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -267,7 +266,7 @@ void setVisible(const SelectionContext &selectionState)
try {
selectionState.selectedModelNodes().first().variantProperty("visible").setValue(selectionState.toggled());
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -280,7 +279,7 @@ void setFillWidth(const SelectionContext &selectionState)
try {
selectionState.firstSelectedModelNode().variantProperty("Layout.fillWidth").setValue(selectionState.toggled());
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -293,7 +292,7 @@ void setFillHeight(const SelectionContext &selectionState)
try {
selectionState.firstSelectedModelNode().variantProperty("Layout.fillHeight").setValue(selectionState.toggled());
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -309,7 +308,7 @@ void resetSize(const SelectionContext &selectionState)
node.removeProperty("height");
}
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -325,7 +324,7 @@ void resetPosition(const SelectionContext &selectionState)
node.removeProperty("y");
}
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -390,7 +389,7 @@ void anchorsFill(const SelectionContext &selectionState)
transaction.commit();
} catch (RewritingException &e) { //better save then sorry
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
diff --git a/src/plugins/qmldesigner/components/formeditor/dragtool.cpp b/src/plugins/qmldesigner/components/formeditor/dragtool.cpp
index 8c08d7da65..a5eaa09287 100644
--- a/src/plugins/qmldesigner/components/formeditor/dragtool.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/dragtool.cpp
@@ -38,7 +38,6 @@
#include <QGraphicsSceneMouseEvent>
#include <QDebug>
#include <QMimeData>
-#include <QMessageBox>
#include <QTimer>
namespace QmlDesigner {
@@ -275,7 +274,7 @@ void DragTool::commitTransaction()
try {
m_rewriterTransaction.commit();
} catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
index 805948f053..07bd634dbf 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
@@ -233,29 +233,18 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
painter->drawRect(m_boundingRect.adjusted(0., 0., -1., -1.));
}
-void FormEditorItem::paintPlaceHolderForInvisbleItem(QPainter *painter) const
+static void paintTextInPlaceHolderForInvisbleItem(QPainter *painter,
+ const QString &id,
+ const QString &typeName,
+ const QRectF &boundingRect)
{
- painter->save();
-
- qreal stripesWidth = 12;
-
- QRegion innerRegion = QRegion(m_boundingRect.adjusted(stripesWidth, stripesWidth, -stripesWidth, -stripesWidth).toRect());
- QRegion outerRegion = QRegion(m_boundingRect.toRect()) - innerRegion;
-
- painter->setClipRegion(outerRegion);
- painter->setClipping(true);
- painter->fillRect(m_boundingRect.adjusted(1, 1, -1, -1), Qt::BDiagPattern);
-
- QString displayText = qmlItemNode().id();
-
- if (displayText.isEmpty())
- displayText = qmlItemNode().simplifiedTypeName();
+ QString displayText = id.isEmpty() ? typeName : id;
QTextOption textOption;
textOption.setAlignment(Qt::AlignTop);
textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
- if (m_boundingRect.height() > 60) {
+ if (boundingRect.height() > 60) {
QFont font;
font.setStyleHint(QFont::SansSerif);
font.setBold(true);
@@ -264,22 +253,41 @@ void FormEditorItem::paintPlaceHolderForInvisbleItem(QPainter *painter) const
QFontMetrics fm(font);
painter->rotate(90);
- if (fm.width(displayText) > (m_boundingRect.height() - 32) && displayText.length() > 4) {
+ if (fm.width(displayText) > (boundingRect.height() - 32) && displayText.length() > 4) {
- displayText = fm.elidedText(displayText, Qt::ElideRight, m_boundingRect.height() - 32, Qt::TextShowMnemonic);
+ displayText = fm.elidedText(displayText, Qt::ElideRight, boundingRect.height() - 32, Qt::TextShowMnemonic);
}
QRectF rotatedBoundingBox;
- rotatedBoundingBox.setWidth(m_boundingRect.height());
+ rotatedBoundingBox.setWidth(boundingRect.height());
rotatedBoundingBox.setHeight(12);
- rotatedBoundingBox.setY(-m_boundingRect.width() + 12);
+ rotatedBoundingBox.setY(-boundingRect.width() + 12);
rotatedBoundingBox.setX(20);
painter->setFont(font);
painter->setPen(QColor(48, 48, 96, 255));
+ painter->setClipping(false);
painter->drawText(rotatedBoundingBox, displayText, textOption);
}
+}
+void paintDecorationInPlaceHolderForInvisbleItem(QPainter *painter, const QRectF &boundingRect)
+{
+ qreal stripesWidth = 12;
+
+ QRegion innerRegion = QRegion(boundingRect.adjusted(stripesWidth, stripesWidth, -stripesWidth, -stripesWidth).toRect());
+ QRegion outerRegion = QRegion(boundingRect.toRect()) - innerRegion;
+
+ painter->setClipRegion(outerRegion);
+ painter->setClipping(true);
+ painter->fillRect(boundingRect.adjusted(1, 1, -1, -1), Qt::BDiagPattern);
+}
+
+void FormEditorItem::paintPlaceHolderForInvisbleItem(QPainter *painter) const
+{
+ painter->save();
+ paintDecorationInPlaceHolderForInvisbleItem(painter, m_boundingRect);
+ paintTextInPlaceHolderForInvisbleItem(painter, qmlItemNode().id(), qmlItemNode().simplifiedTypeName(), m_boundingRect);
painter->restore();
}
diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp
index d7689c413e..6b75b3c4fe 100644
--- a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp
+++ b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp
@@ -32,8 +32,6 @@
#include <rewritingexception.h>
-#include <QMessageBox>
-
namespace QmlDesigner {
ImportManagerView::ImportManagerView(QObject *parent) :
@@ -252,7 +250,7 @@ void ImportManagerView::removeImport(const Import &import)
model()->changeImports(QList<Import>(), QList<Import>() << import);
}
catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -263,7 +261,7 @@ void ImportManagerView::addImport(const Import &import)
model()->changeImports(QList<Import>() << import, QList<Import>());
}
catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
diff --git a/src/plugins/qmldesigner/components/integration/componentaction.cpp b/src/plugins/qmldesigner/components/integration/componentaction.cpp
index 69c6718c9c..4898361838 100644
--- a/src/plugins/qmldesigner/components/integration/componentaction.cpp
+++ b/src/plugins/qmldesigner/components/integration/componentaction.cpp
@@ -54,7 +54,7 @@ QWidget *ComponentAction::createWidget(QWidget *parent)
{
QComboBox *comboBox = new QComboBox(parent);
comboBox->setMinimumWidth(120);
- comboBox->setToolTip(tr("Edit sub components defined in this file"));
+ comboBox->setToolTip(tr("Edit sub components defined in this file."));
comboBox->setModel(m_componentView->standardItemModel());
comboBox->setCurrentIndex(-1);
connect(comboBox, SIGNAL(activated(int)), SLOT(emitCurrentComponentChanged(int)));
diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp
index e31c1147b5..39b34b4f26 100644
--- a/src/plugins/qmldesigner/components/integration/designdocument.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp
@@ -52,7 +52,6 @@
#include <QUrl>
#include <QDebug>
-#include <QMessageBox>
#include <QPlainTextEdit>
#include <QApplication>
@@ -365,7 +364,7 @@ void DesignDocument::deleteSelected()
}
} catch (RewritingException &e) {
- QMessageBox::warning(0, tr("Error"), e.description());
+ e.showException();
}
}
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
index d3e15e01cd..3b685cd598 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
@@ -205,7 +205,7 @@ QList<QToolButton *> ItemLibraryWidget::createToolBarWidgets()
buttons << new QToolButton();
buttons.first()->setText(tr("I "));
buttons.first()->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER)));
- buttons.first()->setToolTip(tr("Manage imports for components"));
+ buttons.first()->setToolTip(tr("Manage imports for components."));
buttons.first()->setPopupMode(QToolButton::InstantPopup);
QMenu * menu = new QMenu;
QAction * basicQtAction = new QAction(menu);
diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
index 65ded05831..762c94a37a 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
+++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
@@ -41,6 +41,8 @@
#include <modelnodecontextmenu.h>
#include <qmlitemnode.h>
+#include <coreplugin/icore.h>
+
#include <QMimeData>
#include <QMessageBox>
#include <QApplication>
@@ -326,7 +328,7 @@ void NavigatorTreeModel::handleChangedItem(QStandardItem *item)
try {
node.setId(item->text());
} catch (InvalidIdException &e) { //better save then sorry
- QMessageBox::warning(0, tr("Invalid Id"), e.description());
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Invalid Id"), e.description());
}
} else { //there is already an id, so we refactor
if (node.view()->rewriterView())
@@ -335,9 +337,9 @@ void NavigatorTreeModel::handleChangedItem(QStandardItem *item)
} else {
if (!node.isValidId(item->text()))
- QMessageBox::warning(0, tr("Invalid Id"), tr("%1 is an invalid id.").arg(item->text()));
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Invalid Id"), tr("%1 is an invalid id.").arg(item->text()));
else
- QMessageBox::warning(0, tr("Invalid Id"), tr("%1 already exists.").arg(item->text()));
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Invalid Id"), tr("%1 already exists.").arg(item->text()));
bool blockSingals = blockItemChangedSignal(true);
item->setText(node.id());
blockItemChangedSignal(blockSingals);
@@ -535,7 +537,11 @@ void NavigatorTreeModel::moveNodesInteractive(NodeAbstractProperty parentPropert
continue;
if (propertyNode.isValid()) {
QApplication::setOverrideCursor(Qt::ArrowCursor);
- if (QMessageBox::warning(0, tr("Warning"), tr("Reparenting the component %1 here will cause the component %2 to be deleted. Do you want to proceed?").arg(node.id(), propertyNode.id()), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) {
+ if (QMessageBox::warning(Core::ICore::dialogParent(), tr("Warning"),
+ tr("Reparenting the component %1 here will cause the "
+ "component %2 to be deleted. Do you want to proceed?")
+ .arg(node.id(), propertyNode.id()),
+ QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) {
QApplication::restoreOverrideCursor();
continue;
}
@@ -574,7 +580,7 @@ void NavigatorTreeModel::moveNodesInteractive(NodeAbstractProperty parentPropert
}
}
} catch (RewritingException &e) { //better safe than sorry! There always might be cases where we fail
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
diff --git a/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp b/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp
index 37693aa980..20117c222b 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp
+++ b/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp
@@ -83,24 +83,24 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
buttons << new QToolButton();
buttons.last()->setIcon(QIcon(":/navigator/icon/arrowleft.png"));
- buttons.last()->setToolTip(tr("Become first sibling of parent (CTRL + Left)"));
+ buttons.last()->setToolTip(tr("Become first sibling of parent (CTRL + Left)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Left | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(leftButtonClicked()));
buttons << new QToolButton();
buttons.last()->setIcon(QIcon(":/navigator/icon/arrowright.png"));
- buttons.last()->setToolTip(tr("Become child of first sibling (CTRL + Right)"));
+ buttons.last()->setToolTip(tr("Become child of first sibling (CTRL + Right)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Right | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(rightButtonClicked()));
buttons << new QToolButton();
buttons.last()->setIcon(QIcon(":/navigator/icon/arrowdown.png"));
- buttons.last()->setToolTip(tr("Move down (CTRL + Down)"));
+ buttons.last()->setToolTip(tr("Move down (CTRL + Down)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Down | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(downButtonClicked()));
buttons << new QToolButton();
buttons.last()->setIcon(QIcon(":/navigator/icon/arrowup.png"));
- buttons.last()->setToolTip(tr("Move up (CTRL + Up)"));
+ buttons.last()->setToolTip(tr("Move up (CTRL + Up)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Up | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(upButtonClicked()));
diff --git a/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.cpp b/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.cpp
index 4c91e28037..400211c052 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.cpp
@@ -31,7 +31,7 @@
namespace QmlDesigner {
-DesignerPropertyMap::DesignerPropertyMap(QObject *parent) : QQmlPropertyMap(parent), m_defaultValue(new PropertyEditorValue(this))
+DesignerPropertyMap::DesignerPropertyMap(QObject *parent) : QQmlPropertyMap(parent)
{
}
@@ -39,7 +39,7 @@ QVariant DesignerPropertyMap::value(const QString &key) const
{
if (contains(key))
return QQmlPropertyMap::value(key);
- return QVariant::fromValue(m_defaultValue);
+ return QVariant();
}
void DesignerPropertyMap::registerDeclarativeType(const QString &name)
diff --git a/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h b/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h
index e09e502632..a37936a295 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/designerpropertymap.h
@@ -45,8 +45,6 @@ public:
QVariant value(const QString &key) const;
static void registerDeclarativeType(const QString &name);
-private:
- PropertyEditorValue *m_defaultValue;
};
} //QmlDesigner
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp
index 126be7ad71..00a229d749 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp
@@ -45,6 +45,7 @@
#include <nodeabstractproperty.h>
#include <rewriterview.h>
+#include <coreplugin/icore.h>
#include <utils/fileutils.h>
#include <QCoreApplication>
@@ -155,7 +156,7 @@ void PropertyEditorView::changeValue(const QString &name)
m_locked = true;
value->setValue(m_selectedNode.id());
m_locked = false;
- QMessageBox::warning(0, tr("Invalid Id"), e.description());
+ e.showException(tr("Invalid Id"));
}
} else { //there is already an id, so we refactor
if (rewriterView())
@@ -166,9 +167,9 @@ void PropertyEditorView::changeValue(const QString &name)
value->setValue(m_selectedNode.id());
m_locked = false;
if (!m_selectedNode.isValidId(newId))
- QMessageBox::warning(0, tr("Invalid Id"), tr("%1 is an invalid id.").arg(newId));
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Invalid Id"), tr("%1 is an invalid id.").arg(newId));
else
- QMessageBox::warning(0, tr("Invalid Id"), tr("%1 already exists.").arg(newId));
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Invalid Id"), tr("%1 already exists.").arg(newId));
}
return;
}
@@ -226,7 +227,7 @@ void PropertyEditorView::changeValue(const QString &name)
}
}
catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -302,7 +303,7 @@ void PropertyEditorView::changeExpression(const QString &propertyName)
}
catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
index 9992b0fc9c..9cc907871a 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
@@ -37,6 +37,8 @@
#include <modelnode.h>
#include <variantproperty.h>
+#include <coreplugin/icore.h>
+
enum {
debug = false
};
@@ -169,7 +171,7 @@ void StatesEditorModel::renameState(int nodeId, const QString &newName)
return;
if (newName.isEmpty() ||! m_statesEditorView->validStateName(newName)) {
- QMessageBox::warning(0, tr("Invalid state name"),
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Invalid state name"),
newName.isEmpty() ?
tr("The empty string as a name is reserved for the base state.") :
tr("Name already used in another state"));
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
index bf01960358..b314dabd65 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
@@ -32,7 +32,6 @@
#include "stateseditormodel.h"
#include <rewritingexception.h>
-#include <QMessageBox>
#include <QDebug>
#include <math.h>
@@ -43,6 +42,7 @@
#include <qmlitemnode.h>
+
namespace QmlDesigner {
/**
@@ -158,7 +158,7 @@ void StatesEditorView::removeState(int nodeId)
stateNode.destroy();
}
} catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -209,7 +209,7 @@ void StatesEditorView::addState()
ModelNode newState = rootStateGroup().addState(newStateName);
setCurrentState(newState);
} catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
@@ -304,7 +304,7 @@ void StatesEditorView::renameState(int nodeId, const QString &newName)
setCurrentState(oldState);
}
} catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
}
}
diff --git a/src/plugins/qmldesigner/componentsplugin/Controls/RadioButtonSpecifics.qml b/src/plugins/qmldesigner/componentsplugin/Controls/RadioButtonSpecifics.qml
index 34300d3915..098f63572f 100644
--- a/src/plugins/qmldesigner/componentsplugin/Controls/RadioButtonSpecifics.qml
+++ b/src/plugins/qmldesigner/componentsplugin/Controls/RadioButtonSpecifics.qml
@@ -59,7 +59,7 @@ Column {
Label {
text: qsTr("Checked")
- toolTip: qsTr("Determines whether the radio button is checkable or not.")
+ toolTip: qsTr("Determines whether the radio button is checked or not.")
}
SecondColumnLayout {
diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
index 570cae6494..c00b52f024 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
@@ -34,6 +34,11 @@
#include <cxxabi.h>
#endif
+#include <coreplugin/icore.h>
+
+#include <QCoreApplication>
+#include <QMessageBox>
+
/*!
\defgroup CoreExceptions
@@ -146,6 +151,15 @@ QString Exception::description() const
}
/*!
+ Shows message in a message box.
+*/
+void Exception::showException(const QString &title) const
+{
+ QString t = title.isEmpty() ? QCoreApplication::translate("QmlDesigner", "Error") : title;
+ QMessageBox::warning(Core::ICore::dialogParent(), t, description());
+}
+
+/*!
Returns the line number where this exception was thrown as an integer.
*/
int Exception::line() const
diff --git a/src/plugins/qmldesigner/designercore/include/exception.h b/src/plugins/qmldesigner/designercore/include/exception.h
index cf739dd9fb..15bbe5144f 100644
--- a/src/plugins/qmldesigner/designercore/include/exception.h
+++ b/src/plugins/qmldesigner/designercore/include/exception.h
@@ -47,6 +47,7 @@ public:
virtual QString type() const = 0;
virtual QString description() const;
+ virtual void showException(const QString &title = QString()) const;
int line() const;
QString function() const;
diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp
index b1262b21fe..a80d43a35a 100644
--- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp
+++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp
@@ -73,6 +73,7 @@
#include "qmldesignerplugin.h"
+#include <coreplugin/icore.h>
#include <utils/hostosinfo.h>
#include <QMessageBox>
@@ -119,6 +120,18 @@ static bool hasQtQuick2(NodeInstanceView *nodeInstanceView)
return false;
}
+static bool hasQtQuick1(NodeInstanceView *nodeInstanceView)
+{
+ if (nodeInstanceView && nodeInstanceView->model()) {
+ foreach (const Import &import ,nodeInstanceView->model()->imports()) {
+ if (import.url() == "QtQuick" && import.version().toDouble() < 2.0)
+ return true;
+ }
+ }
+
+ return false;
+}
+
QString NodeInstanceServerProxy::creatorQmlPuppetPath()
{
QString applicationPath = QCoreApplication::applicationDirPath();
@@ -262,11 +275,13 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
}
} else {
- QMessageBox::warning(0, tr("Cannot Start QML Puppet Executable"),
- tr("The executable of the QML Puppet process (%1) cannot be started. "
- "Please check your installation. "
- "QML Puppet is a process which runs in the background to render the items.").
- arg(applicationPath));
+ QMessageBox::warning(Core::ICore::dialogParent(),
+ tr("Cannot Start QML Puppet Executable"),
+ missingQmlPuppetErrorMessage(pathToQt,
+ tr("The executable of the QML Puppet process (%1) cannot be started. "
+ "Please check your installation. "
+ "QML Puppet is a process which runs in the background to render the items."
+ ).arg(applicationPath)));
QmlDesignerPlugin::instance()->switchToTextModeDeferred();
}
@@ -274,12 +289,21 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
m_localServer->close();
} else {
- QMessageBox::warning(0, tr("Wrong QML Puppet Executable Version"), tr("The QML Puppet version is incompatible with the Qt Creator version."));
+ QMessageBox::warning(Core::ICore::dialogParent(),
+ tr("Wrong QML Puppet Executable Version"),
+ missingQmlPuppetErrorMessage(pathToQt,
+ tr("The QML Puppet version is incompatible with the Qt Creator version.")));
QmlDesignerPlugin::instance()->switchToTextModeDeferred();
}
} else {
- QMessageBox::warning(0, tr("Cannot Find QML Puppet Executable"), missingQmlPuppetErrorMessage(applicationPath));
- QmlDesignerPlugin::instance()->switchToTextModeDeferred();
+ QMessageBox::warning(Core::ICore::dialogParent(),
+ tr("Cannot Find QML Puppet Executable"),
+ missingQmlPuppetErrorMessage(pathToQt,
+ tr("The executable of the QML Puppet process (<code>%1</code>) cannot be found. "
+ "Check your installation. "
+ "QML Puppet is a process which runs in the background to render the items.").
+ arg(QDir::toNativeSeparators(applicationPath))) );
+ QmlDesignerPlugin::instance()->switchToTextModeDeferred();
}
int indexOfCapturePuppetStream = QCoreApplication::arguments().indexOf("-capture-puppet-stream");
@@ -356,28 +380,58 @@ NodeInstanceClientInterface *NodeInstanceServerProxy::nodeInstanceClient() const
return m_nodeInstanceView.data();
}
-QString NodeInstanceServerProxy::missingQmlPuppetErrorMessage(const QString &applicationPath) const
+static QString generatePuppetCompilingHelp(const QString &puppetName, const QString &pathToQt)
+{
+
+ QString buildDirectory = QDir::toNativeSeparators(QDir::tempPath() + QStringLiteral("/") + puppetName);
+ QString qmakePath = QDir::toNativeSeparators(pathToQt + QStringLiteral("/bin/qmake -r "));
+ QString projectPath = QDir::toNativeSeparators(sharedDirPath() + QStringLiteral("/qml/qmlpuppet/%1/%1.pro\n"));
+
+ QString puppetCompileHelp;
+
+ puppetCompileHelp.append(QStringLiteral("<p><code><pre>"));
+ puppetCompileHelp.append(QStringLiteral("mkdir ") + buildDirectory+ QStringLiteral("\n"));
+ puppetCompileHelp.append(QStringLiteral("cd ") + buildDirectory + QStringLiteral("\n"));
+ puppetCompileHelp.append(qmakePath + projectPath);
+ puppetCompileHelp.append(QStringLiteral("make"));
+ puppetCompileHelp.append(QStringLiteral("</pre></code></p>"));
+
+ puppetCompileHelp = puppetCompileHelp.arg(puppetName);
+
+ return puppetCompileHelp;
+}
+
+QString NodeInstanceServerProxy::missingQmlPuppetErrorMessage(const QString &pathToQt, const QString &preMessage) const
{
QString message;
- QTextStream str(&message);
- str << "<html><head/><body><p>"
- << tr("The executable of the QML Puppet process (<code>%1</code>) cannot be found. "
- "Check your installation. "
- "QML Puppet is a process which runs in the background to render the items.").
- arg(QDir::toNativeSeparators(applicationPath))
+ QTextStream messageStream(&message);
+ messageStream << "<html><head/><body><p>"
+ << preMessage
<< "</p>";
if (hasQtQuick2(m_nodeInstanceView.data())) {
- str << "<p>"
- << tr("You can build <code>qml2puppet</code> yourself with Qt 5.0.1 or higher. "
+ messageStream << "<p>"
+ << tr("You can build <code>qml2puppet</code> yourself with Qt 5.2.0 or higher. "
"The source can be found in <code>%1</code>.").
arg(QDir::toNativeSeparators(sharedDirPath() + QLatin1String("/qml/qmlpuppet/qml2puppet/")))
<< "</p><p>"
<< tr("<code>qml2puppet</code> will be installed to the <code>bin</code> directory of your Qt version. "
"Qt Quick Designer will check the <code>bin</code> directory of the currently active Qt version "
"of your project.")
- << "</p>";
+ << "</p>"
+ << generatePuppetCompilingHelp(QStringLiteral("qml2puppet"), pathToQt);
+ } else if (hasQtQuick1(m_nodeInstanceView.data())) {
+ messageStream << "<p>"
+ << tr("You can build <code>qml2puppet</code> yourself with Qt 5.2.0 or higher. "
+ "The source can be found in <code>%1</code>.").
+ arg(QDir::toNativeSeparators(sharedDirPath() + QLatin1String("/qml/qmlpuppet/qmlpuppet/")))
+ << "</p><p>"
+ << tr("<code>qmlpuppet</code> will be installed to the <code>bin</code> directory of your Qt version. "
+ "Qt Quick Designer will check the <code>bin</code> directory of the currently active Qt version "
+ "of your project.")
+ << "</p>"
+ << generatePuppetCompilingHelp(QStringLiteral("qmlpuppet"), pathToQt);
}
- str << "</p></body></html>";
+ messageStream << "</p></body></html>";
return message;
}
@@ -433,8 +487,9 @@ void NodeInstanceServerProxy::processFinished(int /*exitCode*/, QProcess::ExitSt
if (m_captureFileForTest.isOpen()) {
m_captureFileForTest.close();
m_captureFileForTest.remove();
- QMessageBox::warning(0, tr("QML Puppet Crashed"), tr("You are recording a puppet stream and the puppet crashed. "
- "It is recommended to reopen the Qt Quick Designer and start again."));
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("QML Puppet Crashed"),
+ tr("You are recording a puppet stream and the puppet crashed. "
+ "It is recommended to reopen the Qt Quick Designer and start again."));
}
diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h
index 00bef05957..7236187567 100644
--- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h
+++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h
@@ -75,7 +75,7 @@ protected:
void writeCommand(const QVariant &command);
void dispatchCommand(const QVariant &command);
NodeInstanceClientInterface *nodeInstanceClient() const;
- QString missingQmlPuppetErrorMessage(const QString &applicationPath) const;
+ QString missingQmlPuppetErrorMessage(const QString &pathToQt, const QString &preMessage) const;
QString qmlPuppetApplicationName() const;
QString macOSBundlePath(const QString &path) const;
QString creatorQmlPuppetPath();
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
index 5200d2ff54..6d31ef0023 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
@@ -1342,7 +1342,7 @@ bool NodeMetaInfo::isSubclassOf(const TypeName &type, int majorVersion, int mino
bool NodeMetaInfo::isGraphicalItem() const
{
- return isSubclassOf("QtQuick.Item", -1, -1) || isSubclassOf("QtQuick.Window", -1, -1);
+ return isSubclassOf("QtQuick.Item", -1, -1) || isSubclassOf("QtQuick.Window.Window", -1, -1);
}
void NodeMetaInfo::clearCache()
diff --git a/src/plugins/qmldesigner/designercore/model/abstractview.cpp b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
index c59dab43b9..dac9e93c05 100644
--- a/src/plugins/qmldesigner/designercore/model/abstractview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/abstractview.cpp
@@ -35,6 +35,8 @@
#include "nodeinstanceview.h"
#include <qmlstate.h>
+#include <utils/qtcassert.h>
+
namespace QmlDesigner {
@@ -326,9 +328,10 @@ ModelNode AbstractView::singleSelectedModelNode() const
/*!
Adds \a node to the selection list.
*/
-void AbstractView::selectModelNode(const ModelNode &node)
+void AbstractView::selectModelNode(const ModelNode &modelNode)
{
- model()->d->selectNode(node.internalNode());
+ QTC_ASSERT(modelNode.isInHierarchy(), return);
+ model()->d->selectNode(modelNode.internalNode());
}
/*!
diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
index 96ca55157f..3f5c06f635 100644
--- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
+++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
@@ -42,7 +42,6 @@
#include "modelmerger.h"
#include "rewritingexception.h"
-#include <QMessageBox>
#include <QUrl>
#include <QPlainTextEdit>
#include <QFileInfo>
@@ -174,7 +173,7 @@ QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibrary
Q_ASSERT(newQmlItemNode.isValid());
}
catch (RewritingException &e) {
- QMessageBox::warning(0, "Error", e.description());
+ e.showException();
}
Q_ASSERT(newQmlItemNode.isValid());
diff --git a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
index d72f804967..eb7fd78c12 100644
--- a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
+++ b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp
@@ -127,7 +127,7 @@ QString QmlTextGenerator::toQml(const AbstractProperty &property, int indentDept
case QVariant::Color:
return QString(QLatin1String("\"%1\"")).arg(properColorName(value.value<QColor>()));
- case QMetaType::Float:
+ case static_cast<QVariant::Type>(QMetaType::Float):
case QVariant::Double:
return doubleToString(value.toDouble());
case QVariant::Int:
diff --git a/src/plugins/qmldesigner/qmldesigner.qbs b/src/plugins/qmldesigner/qmldesigner.qbs
index 092444fb79..d56f8b2b23 100644
--- a/src/plugins/qmldesigner/qmldesigner.qbs
+++ b/src/plugins/qmldesigner/qmldesigner.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp
index 25bdfa5062..a30547aa2c 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.cpp
+++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp
@@ -42,7 +42,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/modemanager.h>
#include <extensionsystem/pluginspec.h>
-
+#include <qmljs/qmljsmodelmanagerinterface.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/hostosinfo.h>
@@ -337,25 +337,42 @@ static bool isDesignerMode(Core::IMode *mode)
return mode == Core::DesignMode::instance();
}
-void QmlDesignerPlugin::onCurrentModeChanged(Core::IMode *newMode, Core::IMode *oldMode)
+static bool checkIfEditorIsQtQuick(Core::IEditor *editor)
{
- if (!isQmlFile(Core::EditorManager::currentEditor()))
- return;
+ if (isQmlFile(Core::EditorManager::currentEditor())) {
+ QmlJS::Document::Ptr document = QmlJS::ModelManagerInterface::instance()->snapshot().document(
+ Core::EditorManager::currentEditor()->document()->filePath());
+ if (!document.isNull())
+ return document->language() == QmlJS::Language::QmlQtQuick1
+ || document->language() == QmlJS::Language::QmlQtQuick2
+ || document->language() == QmlJS::Language::Qml;
+ }
- if ((currentDesignDocument()
- && Core::EditorManager::currentEditor() == currentDesignDocument()->editor())
- && isDesignerMode(newMode))
- return;
+ return false;
+}
- if (!isDesignerMode(newMode) && isDesignerMode(oldMode))
- hideDesigner();
- else if (Core::EditorManager::currentEditor()
- && isDesignerMode(newMode)
- && isQmlFile(Core::EditorManager::currentEditor()))
- showDesigner();
- else if (currentDesignDocument())
- hideDesigner();
+static bool documentIsAlreadyOpen(DesignDocument *designDocument, Core::IEditor *editor, Core::IMode *newMode)
+{
+ return designDocument
+ && editor == designDocument->editor()
+ && isDesignerMode(newMode);
+}
+void QmlDesignerPlugin::onCurrentModeChanged(Core::IMode *newMode, Core::IMode *oldMode)
+{
+ if (Core::EditorManager::currentEditor()
+ && checkIfEditorIsQtQuick(Core::EditorManager::currentEditor())
+ && !documentIsAlreadyOpen(currentDesignDocument(), Core::EditorManager::currentEditor(), newMode)) {
+
+ if (!isDesignerMode(newMode) && isDesignerMode(oldMode))
+ hideDesigner();
+ else if (Core::EditorManager::currentEditor()
+ && isDesignerMode(newMode)
+ && isQmlFile(Core::EditorManager::currentEditor()))
+ showDesigner();
+ else if (currentDesignDocument())
+ hideDesigner();
+ }
}
DesignDocument *QmlDesignerPlugin::currentDesignDocument() const
diff --git a/src/plugins/qmljseditor/qmljseditor.qbs b/src/plugins/qmljseditor/qmljseditor.qbs
index 51e7c82c5c..67f23d2fc0 100644
--- a/src/plugins/qmljseditor/qmljseditor.qbs
+++ b/src/plugins/qmljseditor/qmljseditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp
index d2e2e4e875..b92341637d 100644
--- a/src/plugins/qmljseditor/qmljsfindreferences.cpp
+++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp
@@ -929,7 +929,8 @@ void FindReferences::displayResults(int first, int last)
label, QString(), symbolName, Core::SearchResultWindow::SearchOnly);
} else {
m_currentSearch = Core::SearchResultWindow::instance()->startNewSearch(
- label, QString(), symbolName, Core::SearchResultWindow::SearchAndReplace);
+ label, QString(), symbolName, Core::SearchResultWindow::SearchAndReplace,
+ Core::SearchResultWindow::PreserveCaseDisabled);
m_currentSearch->setTextToReplace(replacement);
connect(m_currentSearch, SIGNAL(replaceButtonClicked(QString,QList<Core::SearchResultItem>,bool)),
SLOT(onReplaceButtonClicked(QString,QList<Core::SearchResultItem>,bool)));
diff --git a/src/plugins/qmljseditor/qmljspreviewrunner.cpp b/src/plugins/qmljseditor/qmljspreviewrunner.cpp
index a6932185b0..6a31fd6320 100644
--- a/src/plugins/qmljseditor/qmljspreviewrunner.cpp
+++ b/src/plugins/qmljseditor/qmljspreviewrunner.cpp
@@ -29,6 +29,8 @@
#include "qmljspreviewrunner.h"
+#include <coreplugin/icore.h>
+
#include <utils/environment.h>
#include <utils/hostosinfo.h>
#include <utils/qtcprocess.h>
@@ -71,7 +73,7 @@ void QmlJSPreviewRunner::run(const QString &filename)
}
if (!errorMessage.isEmpty())
- QMessageBox::warning(0, tr("Failed to preview Qt Quick file"),
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Failed to preview Qt Quick file"),
tr("Could not preview Qt Quick (QML) file. Reason:\n%1").arg(errorMessage));
}
diff --git a/src/plugins/qmljstools/qmljstools.qbs b/src/plugins/qmljstools/qmljstools.qbs
index 6fab90b4af..c49721bae7 100644
--- a/src/plugins/qmljstools/qmljstools.qbs
+++ b/src/plugins/qmljstools/qmljstools.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qmlprofiler/qml/CategoryLabel.qml b/src/plugins/qmlprofiler/qml/CategoryLabel.qml
index 46d14a7332..5314970b63 100644
--- a/src/plugins/qmlprofiler/qml/CategoryLabel.qml
+++ b/src/plugins/qmlprofiler/qml/CategoryLabel.qml
@@ -144,7 +144,7 @@ Item {
Image {
source: expanded ? "arrow_down.png" : "arrow_right.png"
x: parent.width - 12
- y: root.singleRowHeight / 2 - height / 2
+ y: Math.floor((root.singleRowHeight - height) / 2)
smooth: false
MouseArea {
anchors.fill: parent
diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/plugins/qmlprofiler/qml/MainView.qml
index 808d0b79c6..c4aceb6ef9 100644
--- a/src/plugins/qmlprofiler/qml/MainView.qml
+++ b/src/plugins/qmlprofiler/qml/MainView.qml
@@ -79,7 +79,6 @@ Rectangle {
backgroundMarks.updateMarks(startTime, endTime);
view.updateFlickRange(startTime, endTime);
- flick.setContentWidth();
}
}
@@ -288,15 +287,13 @@ Rectangle {
onInteractiveChanged: interactive = stayInteractive
onStayInteractiveChanged: interactive = stayInteractive
- function setContentWidth() {
+ onContentXChanged: view.updateZoomControl()
+ onWidthChanged: {
var duration = Math.abs(zoomControl.endTime() - zoomControl.startTime());
if (duration > 0)
contentWidth = qmlProfilerModelProxy.traceDuration() * width / duration;
}
- onContentXChanged: view.updateZoomControl()
- onWidthChanged: setContentWidth()
-
// ***** child items
TimeMarks {
id: backgroundMarks
@@ -327,8 +324,15 @@ Rectangle {
onEndTimeChanged: requestPaint()
onYChanged: requestPaint()
onHeightChanged: requestPaint()
+ property bool recursionGuard: false
function updateZoomControl() {
+ // Don't updateZoomControl if we're just updating the flick range, _from_
+ // zoomControl. The other way round is OK. We _want_ the flick range to be updated
+ // on external changes to zoomControl.
+ if (recursionGuard)
+ return;
+
var newStartTime = Math.round(flick.contentX * (endTime - startTime) / flick.width) +
qmlProfilerModelProxy.traceStartTime();
if (Math.abs(newStartTime - startTime) > 1) {
@@ -341,16 +345,27 @@ Rectangle {
}
function updateFlickRange(start, end) {
- if (start !== startTime || end !== endTime) {
- startTime = start;
- endTime = end;
- if (!flick.flickingHorizontally) {
- var newStartX = (startTime - qmlProfilerModelProxy.traceStartTime()) *
- flick.width / (endTime-startTime);
- if (isFinite(newStartX) && Math.abs(newStartX - flick.contentX) >= 1)
- flick.contentX = newStartX;
- }
+ var duration = end - start;
+ if (recursionGuard || duration <= 0 || (start === startTime && end === endTime))
+ return;
+
+ recursionGuard = true;
+
+ startTime = start;
+ endTime = end;
+ if (!flick.flickingHorizontally) {
+ // This triggers an unwanted automatic change in contentX. We ignore that by
+ // checking recursionGuard in this function and in updateZoomControl.
+ flick.contentWidth = qmlProfilerModelProxy.traceDuration() * flick.width /
+ duration;
+
+ var newStartX = (startTime - qmlProfilerModelProxy.traceStartTime()) *
+ flick.width / duration;
+
+ if (isFinite(newStartX) && Math.abs(newStartX - flick.contentX) >= 1)
+ flick.contentX = newStartX;
}
+ recursionGuard = false;
}
onSelectedItemChanged: {
diff --git a/src/plugins/qmlprofiler/qmlprofiler.qbs b/src/plugins/qmlprofiler/qmlprofiler.qbs
index 1ad7fa543d..8ed3414959 100644
--- a/src/plugins/qmlprofiler/qmlprofiler.qbs
+++ b/src/plugins/qmlprofiler/qmlprofiler.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
index 45eeaf9116..ace876168d 100644
--- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
@@ -240,8 +240,6 @@ void QmlProfilerClientManager::connectToClient()
if (!d->connection || d->connection->state() != QAbstractSocket::UnconnectedState)
return;
- QmlProfilerTool::logStatus(QString::fromLatin1("QML Profiler: Connecting to %1:%2 ...")
- .arg(d->tcpHost, QString::number(d->tcpPort)));
d->connection->connectToHost(d->tcpHost, d->tcpPort);
}
@@ -309,14 +307,17 @@ void QmlProfilerClientManager::connectionStateChanged()
case QAbstractSocket::ConnectingState: {
if (QmlProfilerPlugin::debugOutput)
qWarning("QML Profiler: Connecting to debug server ...");
+ QmlProfilerTool::logStatus(tr("QML Profiler: Connecting to %1:%2 ...")
+ .arg(d->tcpHost, QString::number(d->tcpPort)));
break;
}
case QAbstractSocket::ConnectedState:
{
if (QmlProfilerPlugin::debugOutput)
qWarning("QML Profiler: connected and running");
- // notify the client recording status
- clientRecordingChanged();
+ // notify the client recording status
+ clientRecordingChanged();
+ QmlProfilerTool::logStatus(tr("QML Profiler: connected and running"));
break;
}
case QAbstractSocket::ClosingState:
diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
index 7876245763..2246832422 100644
--- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
@@ -258,7 +258,9 @@ void QmlProfilerRunControl::processIsRunning(quint16 port)
{
d->m_noDebugOutputTimer.stop();
- if (port > 0 && startParameters().analyzerPort != 0)
+ if (port == 0)
+ port = startParameters().analyzerPort;
+ if (port != 0)
emit processRunning(port);
}
diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
index b7e99c1117..3b8217d2b5 100644
--- a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
@@ -317,6 +317,8 @@ void QmlProfilerFileReader::loadProfilerDataModel(QXmlStreamReader &stream)
range.numericData1 = attributes.value(_("framerate")).toString().toLongLong();
if (attributes.hasAttribute(_("animationcount")))
range.numericData2 = attributes.value(_("animationcount")).toString().toLongLong();
+ if (attributes.hasAttribute(_("thread")))
+ range.numericData3 = attributes.value(_("thread")).toString().toLongLong();
if (attributes.hasAttribute(_("width")))
range.numericData1 = attributes.value(_("width")).toString().toLongLong();
if (attributes.hasAttribute(_("height")))
@@ -483,6 +485,7 @@ void QmlProfilerFileWriter::save(QIODevice *device)
stream.writeAttribute(_("framerate"), QString::number(range.numericData1));
stream.writeAttribute(_("animationcount"), QString::number(range.numericData2));
+ stream.writeAttribute(_("thread"), QString::number(range.numericData3));
}
// special: pixmap cache event
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
index a9b00493f6..4e5dd50e93 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -226,19 +226,19 @@ QWidget *QmlProfilerTraceView::createToolbar()
QToolButton *buttonPrev= new QToolButton;
buttonPrev->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_prev.png")));
- buttonPrev->setToolTip(tr("Jump to previous event"));
+ buttonPrev->setToolTip(tr("Jump to previous event."));
connect(buttonPrev, SIGNAL(clicked()), this, SIGNAL(jumpToPrev()));
connect(this, SIGNAL(enableToolbar(bool)), buttonPrev, SLOT(setEnabled(bool)));
QToolButton *buttonNext= new QToolButton;
buttonNext->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_next.png")));
- buttonNext->setToolTip(tr("Jump to next event"));
+ buttonNext->setToolTip(tr("Jump to next event."));
connect(buttonNext, SIGNAL(clicked()), this, SIGNAL(jumpToNext()));
connect(this, SIGNAL(enableToolbar(bool)), buttonNext, SLOT(setEnabled(bool)));
QToolButton *buttonZoomControls = new QToolButton;
buttonZoomControls->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_zoom.png")));
- buttonZoomControls->setToolTip(tr("Show zoom slider"));
+ buttonZoomControls->setToolTip(tr("Show zoom slider."));
buttonZoomControls->setCheckable(true);
buttonZoomControls->setChecked(false);
connect(buttonZoomControls, SIGNAL(toggled(bool)), this, SIGNAL(showZoomSlider(bool)));
@@ -246,7 +246,7 @@ QWidget *QmlProfilerTraceView::createToolbar()
d->m_buttonRange = new QToolButton;
d->m_buttonRange->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_rangeselection.png")));
- d->m_buttonRange->setToolTip(tr("Select range"));
+ d->m_buttonRange->setToolTip(tr("Select range."));
d->m_buttonRange->setCheckable(true);
d->m_buttonRange->setChecked(false);
connect(d->m_buttonRange, SIGNAL(clicked(bool)), this, SLOT(toggleRangeMode(bool)));
@@ -255,7 +255,7 @@ QWidget *QmlProfilerTraceView::createToolbar()
d->m_buttonLock = new QToolButton;
d->m_buttonLock->setIcon(QIcon(QLatin1String(":/qmlprofiler/ico_selectionmode.png")));
- d->m_buttonLock->setToolTip(tr("View event information on mouseover"));
+ d->m_buttonLock->setToolTip(tr("View event information on mouseover."));
d->m_buttonLock->setCheckable(true);
d->m_buttonLock->setChecked(false);
connect(d->m_buttonLock, SIGNAL(clicked(bool)), this, SLOT(toggleLockMode(bool)));
diff --git a/src/plugins/qmlprofiler/timelinerenderer.cpp b/src/plugins/qmlprofiler/timelinerenderer.cpp
index 04f9459110..0444c37931 100644
--- a/src/plugins/qmlprofiler/timelinerenderer.cpp
+++ b/src/plugins/qmlprofiler/timelinerenderer.cpp
@@ -317,21 +317,23 @@ void TimelineRenderer::manageHovered(int mouseX, int mouseY)
if (m_endTime - m_startTime <=0 || m_lastEndTime - m_lastStartTime <= 0)
return;
- qint64 time = mouseX * (m_endTime - m_startTime) / width() + m_startTime;
+ // Make the "selected" area 3 pixels wide by adding/subtracting 1 to catch very narrow events.
+ qint64 startTime = (mouseX - 1) * (m_endTime - m_startTime) / width() + m_startTime;
+ qint64 endTime = (mouseX + 1) * (m_endTime - m_startTime) / width() + m_startTime;
int row = (mouseY + y()) / DefaultRowHeight;
int modelIndex = modelFromPosition(mouseY + y());
// already covered? nothing to do
if (m_currentSelection.eventIndex != -1 &&
- time >= m_currentSelection.startTime &&
- time <= m_currentSelection.endTime &&
+ endTime >= m_currentSelection.startTime &&
+ startTime <= m_currentSelection.endTime &&
row == m_currentSelection.row) {
return;
}
// find if there's items in the time range
- int eventFrom = m_profilerModelProxy->findFirstIndex(modelIndex, time);
- int eventTo = m_profilerModelProxy->findLastIndex(modelIndex, time);
+ int eventFrom = m_profilerModelProxy->findFirstIndex(modelIndex, startTime);
+ int eventTo = m_profilerModelProxy->findLastIndex(modelIndex, endTime);
if (eventFrom == -1 ||
eventTo < eventFrom || eventTo >= m_profilerModelProxy->count()) {
m_currentSelection.eventIndex = -1;
@@ -345,9 +347,6 @@ void TimelineRenderer::manageHovered(int mouseX, int mouseY)
// find if we are in the right column
int itemRow;
for (int i=eventTo; i>=eventFrom; --i) {
- if (ceil(m_profilerModelProxy->getEndTime(modelIndex, i)*m_spacing) < floor(time*m_spacing))
- continue;
-
itemRow = modelRowStart + m_profilerModelProxy->getEventRow(modelIndex, i);
if (itemRow == row) {
diff --git a/src/plugins/qmlprojectmanager/qmlprojectmanager.qbs b/src/plugins/qmlprojectmanager/qmlprojectmanager.qbs
index 80113871f0..527250f72d 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectmanager.qbs
+++ b/src/plugins/qmlprojectmanager/qmlprojectmanager.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
index dfaa55702b..d8a2e60ad6 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
@@ -164,7 +164,7 @@ ProjectExplorer::FolderNode *QmlProjectNode::findOrCreateFolderByName(const QStr
return findOrCreateFolderByName(components, components.length());
}
-bool QmlProjectNode::hasBuildTargets() const
+bool QmlProjectNode::showInSimpleTree() const
{
return true;
}
diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.h b/src/plugins/qmlprojectmanager/qmlprojectnodes.h
index d47f7fb6d7..f2b94c1121 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectnodes.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.h
@@ -52,7 +52,7 @@ public:
Core::IDocument *projectFile() const;
QString projectFilePath() const;
- virtual bool hasBuildTargets() const;
+ virtual bool showInSimpleTree() const;
virtual QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
diff --git a/src/plugins/qnx/blackberryapilevelconfiguration.cpp b/src/plugins/qnx/blackberryapilevelconfiguration.cpp
index f2192aa5f2..e6b7adf609 100644
--- a/src/plugins/qnx/blackberryapilevelconfiguration.cpp
+++ b/src/plugins/qnx/blackberryapilevelconfiguration.cpp
@@ -337,9 +337,15 @@ Kit *BlackBerryApiLevelConfiguration::createKit(
if (debuggerItemId.isValid())
DebuggerKitInformation::setDebugger(kit, debuggerItemId);
- if (isSimulator)
- QmakeProjectManager::QmakeKitInformation::setMkspec(
- kit, FileName::fromLatin1("blackberry-x86-qcc"));
+ if (version->qtVersion().majorVersion == 4) {
+ if (isSimulator) {
+ QmakeProjectManager::QmakeKitInformation::setMkspec(
+ kit, FileName::fromLatin1("blackberry-x86-qcc"));
+ } else {
+ QmakeProjectManager::QmakeKitInformation::setMkspec(
+ kit, FileName::fromLatin1("blackberry-armv7le-qcc"));
+ }
+ }
DeviceTypeKitInformation::setDeviceTypeId(kit, Constants::QNX_BB_OS_TYPE);
SysRootKitInformation::setSysRoot(kit, m_sysRoot);
diff --git a/src/plugins/qnx/blackberryapplicationrunner.cpp b/src/plugins/qnx/blackberryapplicationrunner.cpp
index c894235bcd..850a12f20f 100644
--- a/src/plugins/qnx/blackberryapplicationrunner.cpp
+++ b/src/plugins/qnx/blackberryapplicationrunner.cpp
@@ -42,14 +42,18 @@
#include <projectexplorer/kit.h>
#include <projectexplorer/target.h>
#include <qmakeprojectmanager/qmakebuildconfiguration.h>
+#include <debugger/debuggerrunconfigurationaspect.h>
#include <ssh/sshremoteprocessrunner.h>
#include <utils/qtcassert.h>
#include <QMessageBox>
#include <QTimer>
#include <QDir>
+#include <QTemporaryFile>
namespace {
+enum { debugCheckQmlJSArgs = 0 };
+
bool parseRunningState(const QString &line)
{
QTC_ASSERT(line.startsWith(QLatin1String("result::")), return false);
@@ -61,9 +65,9 @@ using namespace ProjectExplorer;
using namespace Qnx;
using namespace Qnx::Internal;
-BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool cppDebugMode, BlackBerryRunConfiguration *runConfiguration, QObject *parent)
+BlackBerryApplicationRunner::BlackBerryApplicationRunner(const BlackBerryApplicationRunner::LaunchFlags &launchFlags, BlackBerryRunConfiguration *runConfiguration, QObject *parent)
: QObject(parent)
- , m_cppDebugMode(cppDebugMode)
+ , m_launchFlags(launchFlags)
, m_pid(-1)
, m_appId(QString())
, m_running(false)
@@ -74,6 +78,8 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool cppDebugMode, Blac
, m_logProcessRunner(0)
, m_runningStateTimer(new QTimer(this))
, m_runningStateProcess(0)
+ , m_qmlDebugServerPort(0)
+ , m_checkQmlJsDebugArgumentsProcess(0)
{
QTC_ASSERT(runConfiguration, return);
@@ -92,6 +98,11 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool cppDebugMode, Blac
m_sshParams = m_device->sshParameters();
m_sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationTypePublicKey;
+ Debugger::DebuggerRunConfigurationAspect *aspect =
+ runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
+ if (aspect)
+ m_qmlDebugServerPort = aspect->qmlDebugServerPort();
+
m_runningStateTimer->setInterval(3000);
m_runningStateTimer->setSingleShot(true);
connect(m_runningStateTimer, SIGNAL(timeout()), this, SLOT(determineRunningState()));
@@ -105,14 +116,14 @@ void BlackBerryApplicationRunner::start()
{
if (!BlackBerryDeviceConnectionManager::instance()->isConnected(m_device->id())) {
connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceConnected()),
- this, SLOT(launchApplication()));
+ this, SLOT(checkDeployMode()));
connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceDisconnected(Core::Id)),
this, SLOT(disconnectFromDeviceSignals(Core::Id)));
connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(connectionOutput(Core::Id,QString)),
this, SLOT(displayConnectionOutput(Core::Id,QString)));
BlackBerryDeviceConnectionManager::instance()->connectDevice(m_device->id());
} else {
- launchApplication();
+ checkDeployMode();
}
}
@@ -148,7 +159,7 @@ void BlackBerryApplicationRunner::checkDeviceRuntimeVersion(int status)
if (m_bbApiLevelVersion.isEmpty()) {
emit output(tr("Cannot determine API level version."), Utils::StdErrFormat);
- launchApplication();
+ checkQmlJsDebugArguments();
return;
}
@@ -170,7 +181,7 @@ void BlackBerryApplicationRunner::checkDeviceRuntimeVersion(int status)
}
}
- launchApplication();
+ checkQmlJsDebugArguments();
}
void BlackBerryApplicationRunner::queryDeviceInformation()
@@ -273,7 +284,7 @@ void BlackBerryApplicationRunner::disconnectFromDeviceSignals(Core::Id deviceId)
{
if (m_device->id() == deviceId) {
disconnect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceConnected()),
- this, SLOT(launchApplication()));
+ this, SLOT(checkDeployMode()));
disconnect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceDisconnected(Core::Id)),
this, SLOT(disconnectFromDeviceSignals(Core::Id)));
disconnect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(connectionOutput(Core::Id,QString)),
@@ -291,6 +302,105 @@ void BlackBerryApplicationRunner::setApplicationId(const QString &applicationId)
m_appId = applicationId;
}
+void BlackBerryApplicationRunner::checkQmlJsDebugArguments()
+{
+ if (!m_launchFlags.testFlag(QmlDebugLaunch)) {
+ // no need to change anytning in app manifest for this kind of run
+ launchApplication();
+ }
+
+ emit output(tr("Checking qmljsdebugger command line argument."), Utils::StdOutFormat);
+ QString nativePackagerCmd = m_environment.searchInPath(QLatin1String("blackberry-nativepackager"));
+ if (nativePackagerCmd.isEmpty()) {
+ emit output(tr("Cannot find Native Packager executable."), Utils::StdErrFormat);
+ return;
+ }
+
+ m_checkQmlJsDebugArgumentsProcess = new QProcess(this);
+ connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(checkQmlJsDebugArgumentsManifestLoaded()));
+ connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(finished(int)), this, SLOT(checkQmlJsDebugArgumentsManifestLoaded()));
+
+ QStringList args;
+ args << QLatin1String("-listManifest") << QDir::toNativeSeparators(m_barPackage);
+ if (debugCheckQmlJSArgs)
+ qDebug() << "get manifest:" << nativePackagerCmd << args.join(QLatin1String(" "));
+ m_checkQmlJsDebugArgumentsProcess->start(nativePackagerCmd, args);
+}
+
+void BlackBerryApplicationRunner::checkQmlJsDebugArgumentsManifestLoaded()
+{
+ m_checkQmlJsDebugArgumentsProcess->deleteLater();
+
+ if (m_checkQmlJsDebugArgumentsProcess->exitStatus() != QProcess::NormalExit) {
+ emit output(tr("Cannot read bar package manifest."), Utils::StdErrFormat);
+ qWarning() << "Cannot read bar package manifest:" << m_checkQmlJsDebugArgumentsProcess->errorString();
+ qWarning() << m_checkQmlJsDebugArgumentsProcess->readAllStandardError();
+ return;
+ }
+
+ QString manifestContent = QString::fromUtf8(m_checkQmlJsDebugArgumentsProcess->readAllStandardOutput());
+
+ QRegExp rxEoln(QLatin1String("(\\r\\n|\\n|\\r)"));
+ QStringList manifestLines = manifestContent.split(rxEoln);
+
+ QMutableListIterator<QString> it(manifestLines);
+ QLatin1String entryPoint("Entry-Point: ");
+ while (it.hasNext()) {
+ it.next();
+ if (it.value().startsWith(entryPoint)) {
+ while (it.hasNext() && it.peekNext().startsWith(QLatin1Char(' ')))
+ it.next();
+ QString qmljsdbgArg = QString::fromLatin1("-qmljsdebugger=port:%1%2")
+ .arg(m_qmlDebugServerPort)
+ .arg(m_launchFlags.testFlag(QmlDebugLaunchBlocking)? QLatin1String(",block"): QLatin1String(""));
+ it.insert(QLatin1String(" ") + qmljsdbgArg);
+ manifestContent = manifestLines.join(QLatin1String("\n"));
+ break;
+ }
+ }
+
+ m_checkQmlJsDebugArgumentsProcess = new QProcess(this);
+ connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(checkQmlJsDebugArgumentsManifestSaved()));
+ connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(finished(int)), this, SLOT(checkQmlJsDebugArgumentsManifestSaved()));
+
+ QTemporaryFile *manifestFile = new QTemporaryFile(m_checkQmlJsDebugArgumentsProcess);
+ if (!manifestFile->open()) {
+ emit output(tr("Internal error: Cannot create temporary manifest file '%1'")
+ .arg(manifestFile->fileName()), Utils::StdErrFormat);
+ delete manifestFile;
+ return;
+ }
+
+ manifestFile->write(manifestContent.toUtf8());
+ manifestFile->flush();
+
+ QStringList args;
+ args << QLatin1String("-device") << m_sshParams.host;
+ if (!m_sshParams.password.isEmpty())
+ args << QLatin1String("-password") << m_sshParams.password;
+ args << QLatin1String("-package") << QDir::toNativeSeparators(m_barPackage);
+ args << QLatin1String("-putFile");
+ args << manifestFile->fileName();
+ args << QLatin1String("app/META-INF/MANIFEST.MF");
+ if (debugCheckQmlJSArgs)
+ qDebug() << "set manifest:" << m_deployCmd << args.join(QLatin1String(" "));
+ m_checkQmlJsDebugArgumentsProcess->start(m_deployCmd, args);
+}
+
+void BlackBerryApplicationRunner::checkQmlJsDebugArgumentsManifestSaved()
+{
+ m_checkQmlJsDebugArgumentsProcess->deleteLater();
+
+ if (m_checkQmlJsDebugArgumentsProcess->exitStatus() != QProcess::NormalExit) {
+ emit output(tr("Cannot set command line arguments."), Utils::StdErrFormat);
+ qWarning() << "Cannot set command line arguments:" << m_checkQmlJsDebugArgumentsProcess->errorString();
+ qWarning() << m_checkQmlJsDebugArgumentsProcess->readAllStandardError();
+ return;
+ }
+
+ launchApplication();
+}
+
void BlackBerryApplicationRunner::launchApplication()
{
// If original device connection fails before launching, this method maybe triggered
@@ -300,12 +410,12 @@ void BlackBerryApplicationRunner::launchApplication()
QStringList args;
args << QLatin1String("-launchApp");
- if (m_cppDebugMode)
+ if (m_launchFlags.testFlag(CppDebugLaunch))
args << QLatin1String("-debugNative");
args << QLatin1String("-device") << m_sshParams.host;
if (!m_sshParams.password.isEmpty())
args << QLatin1String("-password") << m_sshParams.password;
- args << QDir::toNativeSeparators(m_barPackage);
+ args << QLatin1String("-package") << QDir::toNativeSeparators(m_barPackage);
if (!m_launchProcess) {
m_launchProcess = new QProcess(this);
@@ -316,7 +426,8 @@ void BlackBerryApplicationRunner::launchApplication()
m_launchProcess->setEnvironment(m_environment.toStringList());
}
-
+ if (debugCheckQmlJSArgs)
+ qDebug() << "launch:" << m_deployCmd << args.join(QLatin1String(" "));
m_launchProcess->start(m_deployCmd, args);
m_runningStateTimer->start();
m_running = true;
@@ -329,10 +440,10 @@ void BlackBerryApplicationRunner::checkDeployMode()
if (!BlackBerryDeviceConnectionManager::instance()->isConnected(m_device->id()))
return;
- if (m_cppDebugMode)
+ if (m_launchFlags.testFlag(CppDebugLaunch))
queryDeviceInformation(); // check API version vs Runtime version
else
- launchApplication();
+ checkQmlJsDebugArguments();
}
void BlackBerryApplicationRunner::startRunningStateTimer()
diff --git a/src/plugins/qnx/blackberryapplicationrunner.h b/src/plugins/qnx/blackberryapplicationrunner.h
index fc8f2a0f3d..490bc395f5 100644
--- a/src/plugins/qnx/blackberryapplicationrunner.h
+++ b/src/plugins/qnx/blackberryapplicationrunner.h
@@ -58,15 +58,24 @@ class BlackBerryApplicationRunner : public QObject
{
Q_OBJECT
public:
- explicit BlackBerryApplicationRunner(bool cppDebugMode, BlackBerryRunConfiguration *runConfiguration, QObject *parent = 0);
+ enum LaunchFlag
+ {
+ CppDebugLaunch = 0x1,
+ QmlDebugLaunch = 0x2,
+ QmlDebugLaunchBlocking = 0x4,
+ QmlProfilerLaunch = 0x8
+ };
+ Q_DECLARE_FLAGS(LaunchFlags, LaunchFlag)
+
+public:
+ explicit BlackBerryApplicationRunner(const LaunchFlags &launchFlags, BlackBerryRunConfiguration *runConfiguration, QObject *parent = 0);
bool isRunning() const;
qint64 pid() const;
- ProjectExplorer::RunControl::StopResult stop();
-
public slots:
void start();
+ ProjectExplorer::RunControl::StopResult stop();
signals:
void output(const QString &msg, Utils::OutputFormat format);
@@ -97,11 +106,15 @@ private slots:
void displayConnectionOutput(Core::Id deviceId, const QString &output);
void checkDeviceRuntimeVersion(int status);
+ void checkQmlJsDebugArguments();
+ void checkQmlJsDebugArgumentsManifestLoaded();
+ void checkQmlJsDebugArgumentsManifestSaved();
+
private:
void reset();
void queryDeviceInformation();
- bool m_cppDebugMode;
+ LaunchFlags m_launchFlags;
qint64 m_pid;
QString m_appId;
@@ -126,6 +139,9 @@ private:
QProcess *m_runningStateProcess;
BlackBerryVersionNumber m_bbApiLevelVersion;
+
+ int m_qmlDebugServerPort;
+ QProcess *m_checkQmlJsDebugArgumentsProcess;
};
} // namespace Internal
diff --git a/src/plugins/qnx/blackberryconfigurationmanager.cpp b/src/plugins/qnx/blackberryconfigurationmanager.cpp
index 5221d88e87..0340ab1ec0 100644
--- a/src/plugins/qnx/blackberryconfigurationmanager.cpp
+++ b/src/plugins/qnx/blackberryconfigurationmanager.cpp
@@ -457,11 +457,6 @@ void BlackBerryConfigurationManager::loadSettings()
loadAutoDetectedRuntimes();
checkToolChainConfiguration();
- // If no target was/is activated, activate one since it's needed by
- // device connection and CSK code.
- if (activeApiLevels().isEmpty() && !m_apiLevels.isEmpty())
- m_apiLevels.first()->activate();
-
emit settingsLoaded();
emit settingsChanged();
}
diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp
index 26a3c74470..4a5df4b28f 100644
--- a/src/plugins/qnx/blackberrycreatepackagestep.cpp
+++ b/src/plugins/qnx/blackberrycreatepackagestep.cpp
@@ -134,7 +134,6 @@ bool BlackBerryCreatePackageStep::init()
// If there is an error, prepareAppDescriptorFile() will raise it
return false;
-
QStringList args;
if (m_packageMode == DevelopmentMode) {
args << QLatin1String("-devMode");
@@ -165,39 +164,6 @@ bool BlackBerryCreatePackageStep::init()
args << QLatin1String("-package") << QnxUtils::addQuotes(QDir::toNativeSeparators(info.packagePath()));
args << QnxUtils::addQuotes(QDir::toNativeSeparators(preparedFilePath));
- if (m_packageMode == DevelopmentMode && m_bundleMode == BundleQt) {
- BlackBerryQtVersion *qtVersion = dynamic_cast<BlackBerryQtVersion *>
- (QtSupport::QtKitInformation::qtVersion(target()->kit()));
- if (!qtVersion) {
- raiseError(tr("Qt version configured for BlackBerry kit "
- "is not a BlackBerry Qt version."));
- return false;
- }
-
- QMap<QString, QString> qtFolders;
- qtFolders[QLatin1String("lib")] =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS"));
- qtFolders[QLatin1String("plugins")] =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_PLUGINS"));
- qtFolders[QLatin1String("imports")] =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS"));
- qtFolders[QLatin1String("qml")] =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML"));
-
- for (QMap<QString, QString>::const_iterator it = qtFolders.constBegin();
- it != qtFolders.constEnd(); ++it) {
- const QString target = it.key();
- const QString qtFolder = it.value();
- if (QFileInfo(qtFolder).exists()) {
- args << QLatin1String("-e");
- args << qtFolder;
- args << target;
- }
- }
-
- args << QLatin1String(".");
- }
-
addCommand(packageCmd, args);
}
@@ -340,24 +306,12 @@ bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDes
QDir::toNativeSeparators(target()->project()->projectDirectory());
doc.expandPlaceHolders(placeHoldersHash);
- // Add parameter for QML debugging (if enabled)
- Debugger::DebuggerRunConfigurationAspect *aspect
- = target()->activeRunConfiguration()->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
- if (aspect->useQmlDebugger()) {
- const QString qmlDebuggerArg = QString::fromLatin1("-qmljsdebugger=port:%1")
- .arg(aspect->qmlDebugServerPort());
-
- QStringList args = doc.value(BarDescriptorDocument::arg).toStringList();
- if (!args.contains(qmlDebuggerArg))
- args.append(qmlDebuggerArg);
-
- doc.setValue(BarDescriptorDocument::arg, args);
- }
-
// Set up correct environment depending on using bundled/pre-installed Qt
QList<Utils::EnvironmentItem> envItems =
doc.value(BarDescriptorDocument::env).value<QList<Utils::EnvironmentItem> >();
Utils::Environment env(Utils::EnvironmentItem::toStringList(envItems), Utils::OsTypeOtherUnix);
+ BarDescriptorAssetList assetList = doc.value(BarDescriptorDocument::asset)
+ .value<BarDescriptorAssetList>();
if (m_packageMode == SigningPackageMode
|| (m_packageMode == DevelopmentMode && m_bundleMode == PreInstalledQt)) {
@@ -371,6 +325,29 @@ bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDes
env.prependOrSetLibrarySearchPath(QString::fromLatin1("/usr/lib/qt%1/lib")
.arg(versionNumber.majorVersion));
} else if (m_packageMode == DevelopmentMode && m_bundleMode == BundleQt) {
+ QList<QPair<QString, QString> > qtFolders;
+ qtFolders.append(qMakePair(QString::fromLatin1("lib"),
+ qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS"))));
+ qtFolders.append(qMakePair(QString::fromLatin1("plugins"),
+ qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_PLUGINS"))));
+ qtFolders.append(qMakePair(QString::fromLatin1("imports"),
+ qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS"))));
+ qtFolders.append(qMakePair(QString::fromLatin1("qml"),
+ qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML"))));
+
+ for (QList<QPair<QString, QString> >::const_iterator it = qtFolders.constBegin();
+ it != qtFolders.constEnd(); ++it) {
+ const QString target = it->first;
+ const QString qtFolder = it->second;
+ if (QFileInfo(qtFolder).exists()) {
+ BarDescriptorAsset asset;
+ asset.source = qtFolder;
+ asset.destination = target;
+ asset.entry = false;
+ assetList << asset;
+ }
+ }
+
env.appendOrSet(QLatin1String("QML2_IMPORT_PATH"),
QLatin1String("app/native/imports:app/native/qml"), QLatin1String(":"));
env.appendOrSet(QLatin1String("QML_IMPORT_PATH"),
@@ -390,6 +367,8 @@ bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDes
env.prependOrSetLibrarySearchPath(QString::fromLatin1("%1/lib").arg(fullQtLibraryPath()));
}
+ doc.setValue(BarDescriptorDocument::asset, QVariant::fromValue(assetList));
+
QVariant envVar;
envVar.setValue(Utils::EnvironmentItem::fromStringList(env.toStringList()));
doc.setValue(BarDescriptorDocument::env, envVar);
diff --git a/src/plugins/qnx/blackberrydebugsupport.cpp b/src/plugins/qnx/blackberrydebugsupport.cpp
index c89650b132..15fe95f6b9 100644
--- a/src/plugins/qnx/blackberrydebugsupport.cpp
+++ b/src/plugins/qnx/blackberrydebugsupport.cpp
@@ -44,8 +44,12 @@ BlackBerryDebugSupport::BlackBerryDebugSupport(BlackBerryRunConfiguration *runCo
: QObject(runControl->engine())
, m_engine(runControl->engine())
{
- const bool cppDebugMode = m_engine->startParameters().languages & Debugger::CppLanguage;
- m_runner = new BlackBerryApplicationRunner(cppDebugMode, runConfig, this);
+ BlackBerryApplicationRunner::LaunchFlags launchFlags;
+ if (m_engine->startParameters().languages & Debugger::CppLanguage)
+ launchFlags |= BlackBerryApplicationRunner::CppDebugLaunch;
+ if (m_engine->startParameters().languages & Debugger::QmlLanguage)
+ launchFlags |= BlackBerryApplicationRunner::QmlDebugLaunch;
+ m_runner = new BlackBerryApplicationRunner(launchFlags, runConfig, this);
connect(m_engine, SIGNAL(requestRemoteSetup()), this, SLOT(launchRemoteApplication()));
connect(m_engine, SIGNAL(stateChanged(Debugger::DebuggerState)),
diff --git a/src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp b/src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp
index 07c1616a90..466e224051 100644
--- a/src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp
+++ b/src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp
@@ -110,7 +110,7 @@ void BlackBerryDebugTokenPinsDialog::removePin()
const QString pin = m_model->item(index.row(), 0)->text();
const int result = QMessageBox::question(this, tr("Confirmation"),
- tr("Are you sure you want to remove PIN: %1")
+ tr("Are you sure you want to remove PIN: %1?")
.arg(pin), QMessageBox::Yes | QMessageBox::No);
if (result == QMessageBox::Yes) {
diff --git a/src/plugins/qnx/blackberryruncontrol.cpp b/src/plugins/qnx/blackberryruncontrol.cpp
index e42a223246..660ca53f59 100644
--- a/src/plugins/qnx/blackberryruncontrol.cpp
+++ b/src/plugins/qnx/blackberryruncontrol.cpp
@@ -43,7 +43,7 @@ using namespace Qnx::Internal;
BlackBerryRunControl::BlackBerryRunControl(BlackBerryRunConfiguration *runConfiguration)
: ProjectExplorer::RunControl(runConfiguration, ProjectExplorer::NormalRunMode)
{
- m_runner = new BlackBerryApplicationRunner(false, runConfiguration, this);
+ m_runner = new BlackBerryApplicationRunner(BlackBerryApplicationRunner::LaunchFlags(), runConfiguration, this);
connect(m_runner, SIGNAL(started()), this, SIGNAL(started()));
connect(m_runner, SIGNAL(finished()), this, SIGNAL(finished()));
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp
index 7ce739d65f..3a67695236 100644
--- a/src/plugins/qnx/blackberryruncontrolfactory.cpp
+++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp
@@ -36,6 +36,7 @@
#include "blackberrydebugsupport.h"
#include "blackberryqtversion.h"
#include "blackberrydeviceconnectionmanager.h"
+#include "blackberryapplicationrunner.h"
#include "qnxutils.h"
#include <debugger/debuggerplugin.h>
@@ -48,6 +49,10 @@
#include <projectexplorer/toolchain.h>
#include <qmakeprojectmanager/qmakebuildconfiguration.h>
#include <qtsupport/qtkitinformation.h>
+#include <analyzerbase/analyzerstartparameters.h>
+#include <analyzerbase/analyzermanager.h>
+#include <analyzerbase/analyzerruncontrol.h>
+#include <coreplugin/messagemanager.h>
using namespace Qnx;
using namespace Qnx::Internal;
@@ -86,6 +91,28 @@ bool BlackBerryRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runC
return activeDeployConf != 0;
}
+static void createAnalyzerStartParameters(Analyzer::AnalyzerStartParameters *pStartParameters, BlackBerryRunConfiguration* runConfiguration, ProjectExplorer::RunMode mode)
+{
+ QTC_ASSERT(pStartParameters, return);
+ pStartParameters->runMode = mode;
+ if (mode == ProjectExplorer::QmlProfilerRunMode)
+ pStartParameters->startMode = Analyzer::StartLocal;
+
+ ProjectExplorer::Target *target = runConfiguration->target();
+ ProjectExplorer::Kit *kit = target->kit();
+
+ ProjectExplorer::IDevice::ConstPtr device = ProjectExplorer::DeviceKitInformation::device(kit);
+ if (device) {
+ pStartParameters->connParams = device->sshParameters();
+ pStartParameters->analyzerHost = device->qmlProfilerHost();
+ }
+ pStartParameters->sysroot = ProjectExplorer::SysRootKitInformation::sysRoot(kit).toString();
+
+ Debugger::DebuggerRunConfigurationAspect *aspect = runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
+ if (aspect)
+ pStartParameters->analyzerPort = aspect->qmlDebugServerPort();
+}
+
ProjectExplorer::RunControl *BlackBerryRunControlFactory::create(ProjectExplorer::RunConfiguration *runConfiguration,
ProjectExplorer::RunMode mode, QString *errorMessage)
{
@@ -106,7 +133,32 @@ ProjectExplorer::RunControl *BlackBerryRunControlFactory::create(ProjectExplorer
m_activeRunControls[rc->key()] = runControl;
return runControl;
}
-
+ if (mode == ProjectExplorer::QmlProfilerRunMode) {
+ QtSupport::BaseQtVersion *qtVer = QtSupport::QtKitInformation::qtVersion(rc->target()->kit());
+ if (qtVer && qtVer->qtVersion() <= QtSupport::QtVersionNumber(4, 8, 6))
+ Core::MessageManager::write(tr("Target Qt version (%1) might not support QML profiling. "
+ "Cascades applications are not affected and should work as expected. "
+ "For more info see http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10")
+ .arg(qtVer->qtVersionString()), Core::MessageManager::Flash
+ );
+
+ Analyzer::AnalyzerStartParameters params;
+ createAnalyzerStartParameters(&params, rc, mode);
+
+ Analyzer::AnalyzerRunControl *runControl = Analyzer::AnalyzerManager::createRunControl(params, runConfiguration);
+ BlackBerryApplicationRunner::LaunchFlags launchFlags(BlackBerryApplicationRunner::QmlDebugLaunch
+ | BlackBerryApplicationRunner::QmlDebugLaunchBlocking
+ | BlackBerryApplicationRunner::QmlProfilerLaunch);
+ BlackBerryApplicationRunner *runner = new BlackBerryApplicationRunner(launchFlags, rc, runControl);
+
+ connect(runner, SIGNAL(finished()), runControl, SLOT(notifyRemoteFinished()));
+ connect(runner, SIGNAL(output(QString, Utils::OutputFormat)),
+ runControl, SLOT(logApplicationMessage(QString, Utils::OutputFormat)));
+ connect(runControl, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)),
+ runner, SLOT(start()));
+ connect(runControl, SIGNAL(finished()), runner, SLOT(stop()));
+ return runControl;
+ }
Debugger::DebuggerRunControl * const runControl =
Debugger::DebuggerPlugin::createDebugger(startParameters(rc), runConfiguration, errorMessage);
if (!runControl)
diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs
index 2dff37b9bf..db37410db6 100644
--- a/src/plugins/qnx/qnx.qbs
+++ b/src/plugins/qnx/qnx.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp
index 4c0ab1f6f9..bee5b0947e 100644
--- a/src/plugins/qnx/qnxtoolchain.cpp
+++ b/src/plugins/qnx/qnxtoolchain.cpp
@@ -108,6 +108,7 @@ QList<Utils::FileName> QnxToolChain::suggestedMkspecList() const
mkspecList << Utils::FileName::fromLatin1("qnx-armv7le-qcc");
mkspecList << Utils::FileName::fromLatin1("qnx-x86-qcc");
mkspecList << Utils::FileName::fromLatin1("blackberry-armv7le-qcc");
+ mkspecList << Utils::FileName::fromLatin1("blackberry-armle-v7-qcc");
mkspecList << Utils::FileName::fromLatin1("blackberry-x86-qcc");
return mkspecList;
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index a37da71f4b..94a467c0bd 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -63,82 +63,30 @@ void setUniqueQtVersionIdSetting(int id)
settings->setValue(QLatin1String(currentQtVersionFilterSettingsKeyC), id);
}
-QtVersionsModel::QtVersionsModel(QObject *parent)
- : QStandardItemModel(parent)
+QtVersionsModel::QtVersionsModel(ExamplesListModel *examplesModel, QObject *parent) :
+ QStandardItemModel(parent),
+ examplesModel(examplesModel)
{
QHash<int, QByteArray> roleNames;
roleNames[Qt::UserRole + 1] = "text";
roleNames[Qt::UserRole + 2] = "QtId";
setRoleNames(roleNames);
-}
-
-int QtVersionsModel::findHighestQtVersion()
-{
- QList<BaseQtVersion *> qtVersions = QtVersionManager::validVersions();
-
- BaseQtVersion *newVersion = 0;
-
- foreach (BaseQtVersion *version, qtVersions) {
- if (version->isValid() && version->hasDemos() && version->hasExamples()) {
- if (!newVersion) {
- newVersion = version;
- } else {
- if (version->qtVersion() > newVersion->qtVersion()) {
- newVersion = version;
- } else if (version->qtVersion() == newVersion->qtVersion()
- && version->uniqueId() < newVersion->uniqueId()) {
- newVersion = version;
- }
- }
- }
- }
-
- if (!newVersion && !qtVersions.isEmpty())
- newVersion = qtVersions.first();
-
- if (!newVersion)
- return noQtVersionsId;
-
- return newVersion->uniqueId();
+ connect(examplesModel, SIGNAL(qtVersionsUpdated()), this, SLOT(update()));
}
-void QtVersionsModel::setupQtVersions()
+void QtVersionsModel::update()
{
beginResetModel();
clear();
- // prioritize default qt version
- QList<BaseQtVersion *> qtVersions = QtVersionManager::validVersions();
- ProjectExplorer::Kit *defaultKit = ProjectExplorer::KitManager::defaultKit();
- BaseQtVersion *defaultVersion = QtKitInformation::qtVersion(defaultKit);
- if (defaultVersion && qtVersions.contains(defaultVersion))
- qtVersions.move(qtVersions.indexOf(defaultVersion), 0);
-
- int qtVersionSetting = uniqueQtVersionIdSetting();
- int newQtVersionSetting = noQtVersionsId;
- if (qtVersionSetting != noQtVersionsId) {
- //ensure that the unique Qt id is valid
- foreach (BaseQtVersion *version, qtVersions) {
- if (version->uniqueId() == qtVersionSetting)
- newQtVersionSetting = qtVersionSetting;
- }
- }
-
- if (newQtVersionSetting == noQtVersionsId)
- newQtVersionSetting = findHighestQtVersion();
-
- if (newQtVersionSetting != qtVersionSetting)
- setUniqueQtVersionIdSetting(newQtVersionSetting);
-
+ QList<BaseQtVersion *> qtVersions = examplesModel->qtVersions();
foreach (BaseQtVersion *version, qtVersions) {
- if (version->hasDemos() || version->hasExamples()) {
- QStandardItem *newItem = new QStandardItem();
- newItem->setData(version->displayName(), Qt::UserRole + 1);
- newItem->setData(version->uniqueId(), Qt::UserRole + 2);
- appendRow(newItem);
- }
+ QStandardItem *newItem = new QStandardItem();
+ newItem->setData(version->displayName(), Qt::UserRole + 1);
+ newItem->setData(version->uniqueId(), Qt::UserRole + 2);
+ appendRow(newItem);
}
endResetModel();
}
@@ -404,12 +352,8 @@ void ExamplesListModel::updateExamples()
{
QString examplesInstallPath;
QString demosInstallPath;
- QString examplesFallback;
- QString demosFallback;
- QString sourceFallback;
- QStringList sources = exampleSources(&examplesInstallPath, &demosInstallPath,
- &examplesFallback, &demosFallback, &sourceFallback);
+ QStringList sources = exampleSources(&examplesInstallPath, &demosInstallPath);
beginResetModel();
m_tags.clear();
@@ -427,18 +371,6 @@ void ExamplesListModel::updateExamples()
QString offsetPath = fi.path();
QDir examplesDir(offsetPath);
QDir demosDir(offsetPath);
- if (!examplesFallback.isEmpty()) {
- // Look at Qt source directory at first,
- // since examplesPath() / demosPath() points at the build directory
- examplesDir = sourceFallback + QLatin1String("/examples");
- demosDir = sourceFallback + QLatin1String("/demos");
- // if examples or demos don't exist in source, try the directories
- // that qmake -query gave (i.e. in the build directory)
- if (!examplesDir.exists() || !demosDir.exists()) {
- examplesDir = examplesFallback;
- demosDir = demosFallback;
- }
- }
if (debugExamples())
qWarning() << QString::fromLatin1("Reading file '%1'...").arg(fi.absoluteFilePath());
@@ -467,13 +399,81 @@ void ExamplesListModel::updateExamples()
emit tagsUpdated();
}
-QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QString *demosInstallPath,
- QString *examplesFallback, QString *demosFallback,
- QString *sourceFallback)
+void ExamplesListModel::updateQtVersions()
+{
+ QList<BaseQtVersion*> versions = QtVersionManager::validVersions();
+
+ QMutableListIterator<BaseQtVersion*> iter(versions);
+ while (iter.hasNext()) {
+ BaseQtVersion *version = iter.next();
+ if (!version->hasExamples()
+ && !version->hasDemos())
+ iter.remove();
+ }
+
+ // prioritize default qt version
+ ProjectExplorer::Kit *defaultKit = ProjectExplorer::KitManager::defaultKit();
+ BaseQtVersion *defaultVersion = QtKitInformation::qtVersion(defaultKit);
+ if (defaultVersion && versions.contains(defaultVersion))
+ versions.move(versions.indexOf(defaultVersion), 0);
+
+ if (m_qtVersions == versions)
+ return;
+
+ m_qtVersions = versions;
+ emit qtVersionsUpdated();
+
+ // determine Qt version to show
+ int newUniqueId = noQtVersionsId;
+ if (m_uniqueQtId != noQtVersionsId) {
+ //ensure that the unique Qt id is valid
+ foreach (BaseQtVersion *version, m_qtVersions) {
+ if (version->uniqueId() == m_uniqueQtId)
+ newUniqueId = m_uniqueQtId;
+ }
+ }
+
+ if (newUniqueId == noQtVersionsId)
+ newUniqueId = findHighestQtVersion();
+
+ if (newUniqueId != m_uniqueQtId) {
+ m_uniqueQtId = newUniqueId;
+ setUniqueQtVersionIdSetting(m_uniqueQtId);
+ emit selectedQtVersionChanged();
+ }
+
+}
+
+int ExamplesListModel::findHighestQtVersion() const
+{
+ QList<BaseQtVersion *> versions = qtVersions();
+
+ BaseQtVersion *newVersion = 0;
+
+ foreach (BaseQtVersion *version, versions) {
+ if (!newVersion) {
+ newVersion = version;
+ } else {
+ if (version->qtVersion() > newVersion->qtVersion()) {
+ newVersion = version;
+ } else if (version->qtVersion() == newVersion->qtVersion()
+ && version->uniqueId() < newVersion->uniqueId()) {
+ newVersion = version;
+ }
+ }
+ }
+
+ if (!newVersion && !versions.isEmpty())
+ newVersion = versions.first();
+
+ if (!newVersion)
+ return noQtVersionsId;
+
+ return newVersion->uniqueId();
+}
+
+QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QString *demosInstallPath)
{
- QTC_CHECK(examplesFallback);
- QTC_CHECK(demosFallback);
- QTC_CHECK(sourceFallback);
QStringList sources;
QString resourceDir = Core::ICore::resourcePath() + QLatin1String("/welcomescreen/");
@@ -502,83 +502,31 @@ QStringList ExamplesListModel::exampleSources(QString *examplesInstallPath, QStr
if (size > 0)
return sources;
- // try to find a suitable Qt version
- // fallbacks are passed back if no example manifest is found
- // and we fallback to Qt Creator's shipped manifest (e.g. only old Qt Versions found)
- QString potentialExamplesFallback;
- QString potentialDemosFallback;
- QString potentialSourceFallback;
- const QStringList pattern(QLatin1String("*.xml"));
-
- // prioritize default qt version
- QList<BaseQtVersion *> qtVersions = QtVersionManager::validVersions();
- ProjectExplorer::Kit *defaultKit = ProjectExplorer::KitManager::defaultKit();
- BaseQtVersion *defaultVersion = QtKitInformation::qtVersion(defaultKit);
- if (defaultVersion && qtVersions.contains(defaultVersion))
- qtVersions.move(qtVersions.indexOf(defaultVersion), 0);
-
- foreach (BaseQtVersion *version, qtVersions) {
-
+ foreach (BaseQtVersion *version, qtVersions()) {
//filter for qt versions
if (version->uniqueId() != m_uniqueQtId && m_uniqueQtId != noQtVersionsId)
continue;
- // qt5 with examples OR demos manifest
- if (version->qtVersion().majorVersion == 5 && (version->hasExamples() || version->hasDemos())) {
- // examples directory in Qt5 is under the qtbase submodule,
- // search other submodule directories for further manifest files
- QDir qt5docPath = QDir(version->documentationPath());
- const QStringList examplesPattern(QLatin1String("examples-manifest.xml"));
- const QStringList demosPattern(QLatin1String("demos-manifest.xml"));
- QFileInfoList fis;
- foreach (QFileInfo subDir, qt5docPath.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
- if (version->hasExamples())
- fis << QDir(subDir.absoluteFilePath()).entryInfoList(examplesPattern);
- if (version->hasDemos())
- fis << QDir(subDir.absoluteFilePath()).entryInfoList(demosPattern);
- }
- if (!fis.isEmpty()) {
- foreach (const QFileInfo &fi, fis)
- sources.append(fi.filePath());
- if (examplesInstallPath)
- *examplesInstallPath = version->examplesPath();
- if (demosInstallPath)
- *demosInstallPath = version->demosPath();
- return sources;
- }
- }
-
+ // search for examples-manifest.xml, demos-manifest.xml in doc/*/
+ QDir qt5docPath = QDir(version->documentationPath());
+ const QStringList examplesPattern(QLatin1String("examples-manifest.xml"));
+ const QStringList demosPattern(QLatin1String("demos-manifest.xml"));
QFileInfoList fis;
- if (version->hasExamples())
- fis << QDir(version->examplesPath()).entryInfoList(pattern);
- if (version->hasDemos())
- fis << QDir(version->demosPath()).entryInfoList(pattern);
+ foreach (QFileInfo subDir, qt5docPath.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
+ fis << QDir(subDir.absoluteFilePath()).entryInfoList(examplesPattern);
+ fis << QDir(subDir.absoluteFilePath()).entryInfoList(demosPattern);
+ }
if (!fis.isEmpty()) {
foreach (const QFileInfo &fi, fis)
sources.append(fi.filePath());
+ if (examplesInstallPath)
+ *examplesInstallPath = version->examplesPath();
+ if (demosInstallPath)
+ *demosInstallPath = version->demosPath();
return sources;
}
- // check if this Qt version would be the preferred fallback, Qt 4 only
- if (version->qtVersion().majorVersion == 4 && version->hasExamples() && version->hasDemos()) { // cached, so no performance hit
- if (potentialExamplesFallback.isEmpty()) {
- potentialExamplesFallback = version->examplesPath();
- potentialDemosFallback = version->demosPath();
- potentialSourceFallback = version->sourcePath().toString();
- }
- }
}
- if (!potentialExamplesFallback.isEmpty()) {
- // We didn't find a manifest, use Creator-provided XML file with fall back Qt version
- // qDebug() << Q_FUNC_INFO << "falling through to Creator-provided XML file";
- sources << QString(resourceDir + QLatin1String("/examples_fallback.xml"));
- if (examplesFallback)
- *examplesFallback = potentialExamplesFallback;
- if (demosFallback)
- *demosFallback = potentialDemosFallback;
- if (sourceFallback)
- *sourceFallback = potentialSourceFallback;
- }
return sources;
}
@@ -650,18 +598,33 @@ QStringList ExamplesListModel::tags() const
return m_tags;
}
-void ExamplesListModel::setUniqueQtId(int id)
+void ExamplesListModel::update()
{
- m_uniqueQtId = id;
+ updateQtVersions();
updateExamples();
}
+int ExamplesListModel::selectedQtVersion() const
+{
+ return m_uniqueQtId;
+}
+
+void ExamplesListModel::selectQtVersion(int id)
+{
+ if (m_uniqueQtId != id) {
+ m_uniqueQtId = id;
+ setUniqueQtVersionIdSetting(id);
+ updateExamples();
+ emit selectedQtVersionChanged();
+ }
+}
+
ExamplesListModelFilter::ExamplesListModelFilter(ExamplesListModel *sourceModel, QObject *parent) :
QSortFilterProxyModel(parent),
m_showTutorialsOnly(true),
m_sourceModel(sourceModel),
m_timerId(0),
- m_qtVersionModel(new QtVersionsModel(this)),
+ m_qtVersionModel(new QtVersionsModel(sourceModel, this)),
m_blockIndexUpdate(false),
m_qtVersionManagerInitialized(false),
m_helpManagerInitialized(false),
@@ -676,6 +639,8 @@ ExamplesListModelFilter::ExamplesListModelFilter(ExamplesListModel *sourceModel,
connect(this, SIGNAL(showTutorialsOnlyChanged()), SLOT(updateFilter()));
+ connect(m_sourceModel, SIGNAL(selectedQtVersionChanged()), this, SIGNAL(qtVersionIndexChanged()));
+
setSourceModel(m_sourceModel);
}
@@ -764,8 +729,7 @@ void ExamplesListModelFilter::filterForQtById(int id)
if (m_blockIndexUpdate || !m_initalized)
return;
- setUniqueQtVersionIdSetting(id);
- m_sourceModel->setUniqueQtId(id);
+ m_sourceModel->selectQtVersion(id);
}
void ExamplesListModelFilter::setShowTutorialsOnly(bool showTutorialsOnly)
@@ -777,9 +741,7 @@ void ExamplesListModelFilter::setShowTutorialsOnly(bool showTutorialsOnly)
void ExamplesListModelFilter::handleQtVersionsChanged()
{
m_blockIndexUpdate = true;
- m_qtVersionModel->setupQtVersions();
- m_sourceModel->updateExamples();
- emit qtVersionIndexChanged();
+ m_sourceModel->update();
m_blockIndexUpdate = false;
}
@@ -812,7 +774,6 @@ void ExamplesListModelFilter::tryToInitialize()
connect(ProjectExplorer::KitManager::instance(), SIGNAL(defaultkitChanged()),
this, SLOT(handleQtVersionsChanged()));
handleQtVersionsChanged();
- m_sourceModel->updateExamples();
}
}
@@ -826,8 +787,8 @@ void ExamplesListModelFilter::delayedUpdateFilter()
int ExamplesListModelFilter::qtVersionIndex() const
{
- int id = uniqueQtVersionIdSetting();
- int index = m_qtVersionModel->indexForUniqueId(id);
+ int id = m_sourceModel->selectedQtVersion();
+ int index = m_qtVersionModel->indexForUniqueId(id);
return index;
}
diff --git a/src/plugins/qtsupport/exampleslistmodel.h b/src/plugins/qtsupport/exampleslistmodel.h
index 9ae31efb12..6fdcd44498 100644
--- a/src/plugins/qtsupport/exampleslistmodel.h
+++ b/src/plugins/qtsupport/exampleslistmodel.h
@@ -35,24 +35,30 @@
#include <QStandardItemModel>
#include <QStringList>
#include <QXmlStreamReader>
+#include <qtsupport/baseqtversion.h>
namespace QtSupport {
namespace Internal {
+class ExamplesListModel;
+
class QtVersionsModel : public QStandardItemModel
{
Q_OBJECT
public:
- QtVersionsModel(QObject *parent);
+ QtVersionsModel(ExamplesListModel *examplesModel, QObject *parent);
- int findHighestQtVersion();
- void setupQtVersions();
int indexForUniqueId(int uniqueId);
public slots:
+ void update();
+
QVariant get(int i);
QVariant getId(int i);
+
+private:
+ ExamplesListModel *examplesModel;
};
enum ExampleRoles
@@ -104,22 +110,33 @@ public:
void beginReset() { beginResetModel(); }
void endReset() { endResetModel(); }
- void setUniqueQtId(int id);
- void updateExamples();
+ void update();
+
+ int selectedQtVersion() const;
+ void selectQtVersion(int id);
+
+ QList<BaseQtVersion*> qtVersions() const { return m_qtVersions; }
signals:
+ void qtVersionsUpdated();
+ void selectedQtVersionChanged();
void tagsUpdated();
private:
+ void updateQtVersions();
+ void updateExamples();
+
+ void updateSelectedQtVersion();
+ int findHighestQtVersion() const;
+
void parseExamples(QXmlStreamReader *reader, const QString &projectsOffset,
const QString &examplesInstallPath);
void parseDemos(QXmlStreamReader *reader, const QString &projectsOffset,
const QString &demosInstallPath);
void parseTutorials(QXmlStreamReader *reader, const QString &projectsOffset);
- QStringList exampleSources(QString *examplesInstallPath, QString *demosInstallPath,
- QString *examplesFallback, QString *demosFallback,
- QString *sourceFallback);
+ QStringList exampleSources(QString *examplesInstallPath, QString *demosInstallPath);
+ QList<BaseQtVersion*> m_qtVersions;
QList<ExampleItem> m_exampleItems;
QStringList m_tags;
int m_uniqueQtId;
diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
index f5b9c68acd..7f3d2bf135 100644
--- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
+++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
@@ -407,13 +407,12 @@ void ExamplesWelcomePage::openProject(const QString &projectFile, const QStringL
ProjectExplorer::ProjectExplorerPlugin *peplugin = ProjectExplorer::ProjectExplorerPlugin::instance();
if (proFile.isEmpty())
return;
- if (ProjectExplorer::Project *project = peplugin->openProject(proFile, &errorMessage)) {
+ if (peplugin->openProject(proFile, &errorMessage)) {
Core::ICore::openFiles(filesToOpen);
- if (project->needsConfiguration())
- project->configureAsExampleProject(platforms);
Core::ModeManager::activateMode(Core::Constants::MODE_EDIT);
if (help.isValid())
Core::HelpManager::handleHelpRequest(help.toString() + QLatin1String("?view=split"));
+ Core::ModeManager::activateMode(ProjectExplorer::Constants::MODE_SESSION);
}
if (!errorMessage.isEmpty())
QMessageBox::critical(Core::ICore::mainWindow(), tr("Failed to Open Project"), errorMessage);
diff --git a/src/plugins/qtsupport/qtsupport.qbs b/src/plugins/qtsupport/qtsupport.qbs
index caf11a4106..fedbd84578 100644
--- a/src/plugins/qtsupport/qtsupport.qbs
+++ b/src/plugins/qtsupport/qtsupport.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcFunctions
import QtcPlugin
diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui
index 1d935a9c2c..2b38ed1ecd 100644
--- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui
+++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui
@@ -140,7 +140,7 @@
<item>
<widget class="QLineEdit" name="portsLineEdit">
<property name="toolTip">
- <string>You can enter lists and ranges like this: 1024,1026-1028,1030</string>
+ <string>You can enter lists and ranges like this: '1024,1026-1028,1030'.</string>
</property>
</widget>
</item>
diff --git a/src/plugins/remotelinux/remotelinux.qbs b/src/plugins/remotelinux/remotelinux.qbs
index cc22cdff19..650303046d 100644
--- a/src/plugins/remotelinux/remotelinux.qbs
+++ b/src/plugins/remotelinux/remotelinux.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/resourceeditor/resourceeditor.qbs b/src/plugins/resourceeditor/resourceeditor.qbs
index 3ed9ee3226..6d7d6c7224 100644
--- a/src/plugins/resourceeditor/resourceeditor.qbs
+++ b/src/plugins/resourceeditor/resourceeditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp
index e01090a93a..7a95719efe 100644
--- a/src/plugins/resourceeditor/resourcenode.cpp
+++ b/src/plugins/resourceeditor/resourcenode.cpp
@@ -48,7 +48,7 @@ using namespace ResourceEditor::Internal;
static bool priority(const QStringList &files)
{
if (files.isEmpty())
- return -1;
+ return false;
Core::MimeType mt = Core::MimeDatabase::findByFile(files.at(0));
QString type = mt.type();
if (type.startsWith(QLatin1String("image/"))
@@ -219,8 +219,6 @@ bool ResourceTopLevelNode::addPrefix(const QString &prefix, const QString &lang)
file.save();
Core::DocumentManager::unexpectFileChange(path());
- update();
-
return true;
}
@@ -236,8 +234,6 @@ bool ResourceTopLevelNode::removePrefix(const QString &prefix, const QString &la
Core::DocumentManager::expectFileChange(path());
file.save();
Core::DocumentManager::unexpectFileChange(path());
-
- update();
return true;
}
}
@@ -261,6 +257,11 @@ ProjectExplorer::FolderNode::AddNewInformation ResourceTopLevelNode::addNewInfor
return AddNewInformation(name, p);
}
+bool ResourceTopLevelNode::showInSimpleTree() const
+{
+ return true;
+}
+
ResourceFolderNode::ResourceFolderNode(const QString &prefix, const QString &lang, ResourceTopLevelNode *parent)
: ProjectExplorer::FolderNode(parent->path() + QLatin1Char('/') + prefix),
// TOOD Why add existing directory doesn't work
@@ -353,7 +354,7 @@ bool ResourceFolderNode::renamePrefix(const QString &prefix, const QString &lang
ResourceFile file(m_topLevelNode->path());
if (!file.load())
return false;
- int index = file.indexOfPrefix(prefix, lang);
+ int index = file.indexOfPrefix(m_prefix, m_lang);
if (index == -1)
return false;
diff --git a/src/plugins/resourceeditor/resourcenode.h b/src/plugins/resourceeditor/resourcenode.h
index 9aa4166c93..01dfaf1c2e 100644
--- a/src/plugins/resourceeditor/resourcenode.h
+++ b/src/plugins/resourceeditor/resourcenode.h
@@ -60,6 +60,7 @@ public:
bool removePrefix(const QString &prefix, const QString &lang);
AddNewInformation addNewInformation(const QStringList &files, Node *context) const;
+ bool showInSimpleTree() const;
private:
Internal::ResourceFileWatcher *m_document;
diff --git a/src/plugins/subversion/subversion.qbs b/src/plugins/subversion/subversion.qbs
index e69bceaa0a..87d207528b 100644
--- a/src/plugins/subversion/subversion.qbs
+++ b/src/plugins/subversion/subversion.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp
index ce429fea9a..a9772ca665 100644
--- a/src/plugins/subversion/subversionplugin.cpp
+++ b/src/plugins/subversion/subversionplugin.cpp
@@ -564,7 +564,8 @@ void SubversionPlugin::revertAll()
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
const QString title = tr("Revert repository");
- if (QMessageBox::warning(0, title, tr("Revert all pending changes to the repository?"),
+ if (QMessageBox::warning(Core::ICore::dialogParent(), title,
+ tr("Revert all pending changes to the repository?"),
QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
return;
// NoteL: Svn "revert ." doesn not work.
@@ -574,7 +575,8 @@ void SubversionPlugin::revertAll()
runSvn(state.topLevel(), args, m_settings.timeOutMs(),
SshPasswordPrompt|ShowStdOutInLogWindow);
if (revertResponse.error)
- QMessageBox::warning(0, title, tr("Revert failed: %1").arg(revertResponse.message), QMessageBox::Ok);
+ QMessageBox::warning(Core::ICore::dialogParent(), title,
+ tr("Revert failed: %1").arg(revertResponse.message), QMessageBox::Ok);
else
subVersionControl()->emitRepositoryChanged(state.topLevel());
}
@@ -594,7 +596,8 @@ void SubversionPlugin::revertCurrentFile()
if (diffResponse.stdOut.isEmpty())
return;
- if (QMessageBox::warning(0, QLatin1String("svn revert"), tr("The file has been changed. Do you want to revert it?"),
+ if (QMessageBox::warning(Core::ICore::dialogParent(), QLatin1String("svn revert"),
+ tr("The file has been changed. Do you want to revert it?"),
QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
return;
diff --git a/src/plugins/tasklist/tasklist.qbs b/src/plugins/tasklist/tasklist.qbs
index 725a7d8de6..b00c1e7505 100644
--- a/src/plugins/tasklist/tasklist.qbs
+++ b/src/plugins/tasklist/tasklist.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp
index 6772d9a64b..b96687bdcb 100644
--- a/src/plugins/texteditor/basefilefind.cpp
+++ b/src/plugins/texteditor/basefilefind.cpp
@@ -132,7 +132,8 @@ void BaseFileFind::runNewSearch(const QString &txt, Core::FindFlags findFlags,
updateComboEntries(d->m_filterCombo, true);
SearchResult *search = Core::SearchResultWindow::instance()->startNewSearch(label(),
toolTip().arg(Core::IFindFilter::descriptionForFindFlags(findFlags)),
- txt, searchMode, QString::fromLatin1("TextEditor"));
+ txt, searchMode, Core::SearchResultWindow::PreserveCaseEnabled,
+ QString::fromLatin1("TextEditor"));
search->setTextToReplace(txt);
search->setSearchAgainSupported(true);
FileFindParameters parameters;
diff --git a/src/plugins/texteditor/behaviorsettingswidget.cpp b/src/plugins/texteditor/behaviorsettingswidget.cpp
index 818e884c57..ab3dc7e9db 100644
--- a/src/plugins/texteditor/behaviorsettingswidget.cpp
+++ b/src/plugins/texteditor/behaviorsettingswidget.cpp
@@ -186,10 +186,10 @@ void BehaviorSettingsWidget::updateConstrainTooltipsBoxTooltip() const
{
if (d->m_ui.constrainTooltipsBox->currentIndex() == 0) {
d->m_ui.constrainTooltipsBox->setToolTip(
- tr("Display context-sensitive help or type information on mouseover."));
+ tr("Displays context-sensitive help or type information on mouseover."));
} else {
d->m_ui.constrainTooltipsBox->setToolTip(
- tr("Display context-sensitive help or type information on Shift+Mouseover."));
+ tr("Displays context-sensitive help or type information on Shift+Mouseover."));
}
}
diff --git a/src/plugins/texteditor/behaviorsettingswidget.ui b/src/plugins/texteditor/behaviorsettingswidget.ui
index 423a270d84..05cee85794 100644
--- a/src/plugins/texteditor/behaviorsettingswidget.ui
+++ b/src/plugins/texteditor/behaviorsettingswidget.ui
@@ -360,7 +360,7 @@ Specifies how backspace interacts with indentation.
<item>
<widget class="QCheckBox" name="keyboardTooltips">
<property name="toolTip">
- <string>Press Alt to display context-sensitive help or type information as tooltips.</string>
+ <string>Pressing Alt displays context-sensitive help or type information as tooltips.</string>
</property>
<property name="text">
<string>Show help tooltips using keyboard shortcut (Alt)</string>
diff --git a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp
index 839e26f31d..5bc89f1dd7 100644
--- a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp
+++ b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp
@@ -36,6 +36,7 @@
#include <texteditor/completionsettings.h>
#include <texteditor/texteditorconstants.h>
+#include <utils/elidinglabel.h>
#include <utils/faketooltip.h>
#include <utils/hostosinfo.h>
@@ -150,13 +151,16 @@ class GenericProposalInfoFrame : public Utils::FakeToolTip
{
public:
GenericProposalInfoFrame(QWidget *parent = 0)
- : Utils::FakeToolTip(parent), m_label(new QLabel(this))
+ : Utils::FakeToolTip(parent), m_label(new Utils::ElidingLabel(this))
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
layout->setSpacing(0);
layout->addWidget(m_label);
+ // Limit horizontal width
+ m_label->setSizePolicy(QSizePolicy::Fixed, m_label->sizePolicy().verticalPolicy());
+
m_label->setForegroundRole(QPalette::ToolTipText);
m_label->setBackgroundRole(QPalette::ToolTipBase);
}
@@ -166,6 +170,20 @@ public:
m_label->setText(text);
}
+ // Workaround QTCREATORBUG-11653
+ void calculateMaximumWidth()
+ {
+ const QDesktopWidget *desktopWidget = QApplication::desktop();
+ const int desktopWidth = desktopWidget->isVirtualDesktop()
+ ? desktopWidget->width()
+ : desktopWidget->availableGeometry(desktopWidget->primaryScreen()).width();
+ const QMargins widgetMargins = contentsMargins();
+ const QMargins layoutMargins = layout()->contentsMargins();
+ const int margins = widgetMargins.left() + widgetMargins.right()
+ + layoutMargins.left() + layoutMargins.right();
+ m_label->setMaximumWidth(desktopWidth - this->pos().x() - margins);
+ }
+
private:
QLabel *m_label;
};
@@ -296,6 +314,7 @@ void GenericProposalWidgetPrivate::maybeShowInfoTip()
m_infoFrame->move(m_completionListView->infoFramePos());
m_infoFrame->setText(infoTip);
+ m_infoFrame->calculateMaximumWidth();
m_infoFrame->adjustSize();
m_infoFrame->show();
m_infoFrame->raise();
diff --git a/src/plugins/texteditor/colorschemeedit.ui b/src/plugins/texteditor/colorschemeedit.ui
index 65af997ede..12e34f937c 100644
--- a/src/plugins/texteditor/colorschemeedit.ui
+++ b/src/plugins/texteditor/colorschemeedit.ui
@@ -61,7 +61,7 @@
<item>
<widget class="QToolButton" name="eraseForegroundToolButton">
<property name="toolTip">
- <string>Erase foreground</string>
+ <string>Erase foreground.</string>
</property>
<property name="text">
<string>x</string>
@@ -107,7 +107,7 @@
<item>
<widget class="QToolButton" name="eraseBackgroundToolButton">
<property name="toolTip">
- <string>Erase background</string>
+ <string>Erase background.</string>
</property>
<property name="text">
<string>x</string>
diff --git a/src/plugins/texteditor/displaysettingspage.ui b/src/plugins/texteditor/displaysettingspage.ui
index 46bd0389c9..b60d8abe71 100644
--- a/src/plugins/texteditor/displaysettingspage.ui
+++ b/src/plugins/texteditor/displaysettingspage.ui
@@ -97,7 +97,7 @@
<item row="4" column="0">
<widget class="QCheckBox" name="visualizeWhitespace">
<property name="toolTip">
- <string>Show tabs and spaces.</string>
+ <string>Shows tabs and spaces.</string>
</property>
<property name="text">
<string>&amp;Visualize whitespace</string>
diff --git a/src/plugins/texteditor/plaintexteditorfactory.cpp b/src/plugins/texteditor/plaintexteditorfactory.cpp
index 4323de80c7..c8af5fbcf5 100644
--- a/src/plugins/texteditor/plaintexteditorfactory.cpp
+++ b/src/plugins/texteditor/plaintexteditorfactory.cpp
@@ -89,7 +89,7 @@ void PlainTextEditorFactory::updateEditorInfoBar(Core::IEditor *editor)
tr("A highlight definition was not found for this file. "
"Would you like to try to find one?"),
Core::InfoBarEntry::GlobalSuppressionEnabled);
- info.setCustomButtonInfo(tr("Show highlighter options..."),
+ info.setCustomButtonInfo(tr("Show Highlighter Options..."),
textEditor, SLOT(acceptMissingSyntaxDefinitionInfo()));
infoBar->addInfo(info);
}
diff --git a/src/plugins/texteditor/texteditor.qbs b/src/plugins/texteditor/texteditor.qbs
index 8d1703c169..a695c2af8d 100644
--- a/src/plugins/texteditor/texteditor.qbs
+++ b/src/plugins/texteditor/texteditor.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp
index 2fbbe433d0..b96f75d208 100644
--- a/src/plugins/texteditor/texteditorsettings.cpp
+++ b/src/plugins/texteditor/texteditorsettings.cpp
@@ -207,7 +207,7 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
tr("Reserved keywords of the programming language."),
Qt::darkYellow));
formatDescr.append(FormatDescription(C_OPERATOR, tr("Operator"),
- tr("Operators. (For example operator++ operator-=)")));
+ tr("Operators (for example operator++ or operator-=).")));
formatDescr.append(FormatDescription(C_PREPROCESSOR, tr("Preprocessor"),
tr("Preprocessor directives."), Qt::darkBlue));
formatDescr.append(FormatDescription(C_LABEL, tr("Label"), tr("Labels for goto statements."),
@@ -220,7 +220,7 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
formatDescr.append(FormatDescription(C_DOXYGEN_TAG, tr("Doxygen Tag"), tr("Doxygen tags."),
Qt::blue));
formatDescr.append(FormatDescription(C_VISUAL_WHITESPACE, tr("Visual Whitespace"),
- tr("Whitespace\nWill not be applied to whitespace "
+ tr("Whitespace.\nWill not be applied to whitespace "
"in comments and strings."), Qt::lightGray));
formatDescr.append(FormatDescription(C_DISABLED_CODE, tr("Disabled Code"),
tr("Code disabled by preprocessor directives.")));
diff --git a/src/plugins/todo/todo.qbs b/src/plugins/todo/todo.qbs
index b97649a3e8..0ee3e4c2ee 100644
--- a/src/plugins/todo/todo.qbs
+++ b/src/plugins/todo/todo.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/updateinfo/updateinfo.qbs b/src/plugins/updateinfo/updateinfo.qbs
index be4722aaba..47b26a895e 100644
--- a/src/plugins/updateinfo/updateinfo.qbs
+++ b/src/plugins/updateinfo/updateinfo.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/valgrind/valgrind.qbs b/src/plugins/valgrind/valgrind.qbs
index beff9f2922..0105d887bc 100644
--- a/src/plugins/valgrind/valgrind.qbs
+++ b/src/plugins/valgrind/valgrind.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/valgrind/valgrindconfigwidget.ui b/src/plugins/valgrind/valgrindconfigwidget.ui
index 2c0e989760..c4344b67d1 100644
--- a/src/plugins/valgrind/valgrindconfigwidget.ui
+++ b/src/plugins/valgrind/valgrindconfigwidget.ui
@@ -152,9 +152,9 @@
&lt;p&gt;By default, only instruction read accesses will be counted (&quot;Ir&quot;).&lt;/p&gt;
&lt;p&gt;
With cache simulation, further event counters are enabled:
-&lt;ul&gt;&lt;li&gt;Cache misses on instruction reads (&quot;I1mr&quot;/&quot;I2mr&quot;)&lt;/li&gt;
-&lt;li&gt;Data read accesses (&quot;Dr&quot;) and related cache misses (&quot;D1mr&quot;/&quot;D2mr&quot;)&lt;/li&gt;
-&lt;li&gt;Data write accesses (&quot;Dw&quot;) and related cache misses (&quot;D1mw&quot;/&quot;D2mw&quot;)&lt;/li&gt;&lt;/ul&gt;
+&lt;ul&gt;&lt;li&gt;Cache misses on instruction reads (&quot;I1mr&quot;/&quot;I2mr&quot;).&lt;/li&gt;
+&lt;li&gt;Data read accesses (&quot;Dr&quot;) and related cache misses (&quot;D1mr&quot;/&quot;D2mr&quot;).&lt;/li&gt;
+&lt;li&gt;Data write accesses (&quot;Dw&quot;) and related cache misses (&quot;D1mw&quot;/&quot;D2mw&quot;).&lt;/li&gt;&lt;/ul&gt;
&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;</string>
@@ -168,12 +168,12 @@ With cache simulation, further event counters are enabled:
<widget class="QCheckBox" name="enableBranchSim">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
-&lt;p&gt;Do branch prediction simulation.&lt;/p&gt;
+&lt;p&gt;Does branch prediction simulation.&lt;/p&gt;
&lt;p&gt;Further event counters are enabled: &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Number of executed conditional branches and related predictor misses (
-&quot;Bc&quot;/&quot;Bcm&quot;)&lt;/li&gt;
+&quot;Bc&quot;/&quot;Bcm&quot;).&lt;/li&gt;
&lt;li&gt;Executed indirect jumps and related misses of the jump address predictor (
-&quot;Bi&quot;/&quot;Bim&quot;)&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&quot;Bi&quot;/&quot;Bim&quot;).&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable branch prediction simulation</string>
@@ -183,7 +183,7 @@ With cache simulation, further event counters are enabled:
<item row="2" column="0">
<widget class="QCheckBox" name="collectSystime">
<property name="toolTip">
- <string>Collect information for system call times.</string>
+ <string>Collects information for system call times.</string>
</property>
<property name="text">
<string>Collect system call time</string>
@@ -205,9 +205,6 @@ With cache simulation, further event counters are enabled:
</item>
<item row="1" column="0">
<widget class="QLabel" name="visualisationMinimumInclusiveCostRatioLabel">
- <property name="toolTip">
- <string/>
- </property>
<property name="text">
<string>Visualization: Minimum event cost:</string>
</property>
diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.cpp b/src/plugins/vcsbase/basecheckoutwizardpage.cpp
index 672f3deea9..a9ea539d1e 100644
--- a/src/plugins/vcsbase/basecheckoutwizardpage.cpp
+++ b/src/plugins/vcsbase/basecheckoutwizardpage.cpp
@@ -30,6 +30,7 @@
#include "basecheckoutwizardpage.h"
#include "ui_basecheckoutwizardpage.h"
+#include <QDir>
#include <QIcon>
/*!
@@ -105,9 +106,14 @@ void BaseCheckoutWizardPage::addRepositoryControl(QWidget *w)
bool BaseCheckoutWizardPage::checkIsValid() const
{
- return d->ui.pathChooser->isValid()
- && !d->ui.checkoutDirectoryLineEdit->text().isEmpty()
- && !d->ui.repositoryLineEdit->text().isEmpty();
+ if (!d->ui.pathChooser->isValid() || d->ui.repositoryLineEdit->text().isEmpty())
+ return false;
+
+ const QString checkoutDirectory = d->ui.checkoutDirectoryLineEdit->text();
+ if (checkoutDirectory.isEmpty())
+ return false;
+ const QDir dir(d->ui.pathChooser->path() + QLatin1Char('/') + checkoutDirectory);
+ return !dir.exists() || (dir.count() <= 2);
}
void BaseCheckoutWizardPage::addRepositoryControl(QString &description, QWidget *w)
diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
index b319e3f97b..e188f5391d 100644
--- a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
+++ b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp
@@ -54,6 +54,7 @@ CheckoutProgressWizardPage::CheckoutProgressWizardPage(QWidget *parent) :
QWizardPage(parent),
ui(new Ui::CheckoutProgressWizardPage),
m_startedStatus(tr("Checkout started...")),
+ m_overwriteOutput(false),
m_state(Idle)
{
ui->setupUi(this);
@@ -86,6 +87,7 @@ void CheckoutProgressWizardPage::start(Command *command)
connect(command, SIGNAL(finished(bool,int,QVariant)), this, SLOT(slotFinished(bool,int,QVariant)));
QApplication::setOverrideCursor(Qt::WaitCursor);
ui->logPlainTextEdit->clear();
+ m_overwriteOutput = false;
ui->statusLabel->setText(m_startedStatus);
ui->statusLabel->setPalette(QPalette());
m_state = Running;
@@ -121,7 +123,20 @@ void CheckoutProgressWizardPage::slotFinished(bool ok, int exitCode, const QVari
void CheckoutProgressWizardPage::slotOutput(const QString &text)
{
- ui->logPlainTextEdit->appendPlainText(text.trimmed());
+ int startPos = 0;
+ int crPos = -1;
+ const QString ansiEraseToEol = QLatin1String("\x1b[K");
+ while ((crPos = text.indexOf(QLatin1Char('\r'), startPos)) >= 0) {
+ QString part = text.mid(startPos, crPos - startPos);
+ // Discard ANSI erase-to-eol
+ if (part.endsWith(ansiEraseToEol))
+ part.chop(ansiEraseToEol.length());
+ outputText(part);
+ startPos = crPos + 1;
+ m_overwriteOutput = true;
+ }
+ if (startPos < text.count())
+ outputText(text.mid(startPos));
}
void CheckoutProgressWizardPage::slotError(const QString &text)
@@ -129,6 +144,18 @@ void CheckoutProgressWizardPage::slotError(const QString &text)
m_error.append(text);
}
+void CheckoutProgressWizardPage::outputText(const QString &text)
+{
+ if (m_overwriteOutput) {
+ QTextCursor cursor = ui->logPlainTextEdit->textCursor();
+ cursor.clearSelection();
+ cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);
+ ui->logPlainTextEdit->setTextCursor(cursor);
+ m_overwriteOutput = false;
+ }
+ ui->logPlainTextEdit->insertPlainText(text);
+}
+
void CheckoutProgressWizardPage::terminate()
{
if (m_command)
diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.h b/src/plugins/vcsbase/checkoutprogresswizardpage.h
index f59782e979..bd0bf104a3 100644
--- a/src/plugins/vcsbase/checkoutprogresswizardpage.h
+++ b/src/plugins/vcsbase/checkoutprogresswizardpage.h
@@ -67,11 +67,14 @@ private slots:
void slotError(const QString &text);
private:
+ void outputText(const QString &text);
+
Ui::CheckoutProgressWizardPage *ui;
Command *m_command;
QString m_startedStatus;
QString m_error;
+ bool m_overwriteOutput;
State m_state;
};
diff --git a/src/plugins/vcsbase/cleandialog.cpp b/src/plugins/vcsbase/cleandialog.cpp
index 6d5183aacc..81568caa2d 100644
--- a/src/plugins/vcsbase/cleandialog.cpp
+++ b/src/plugins/vcsbase/cleandialog.cpp
@@ -223,7 +223,7 @@ void CleanDialog::addFile(const QString &workingDirectory, QString fileName, boo
// Tooltip with size information
if (fi.isFile()) {
const QString lastModified = fi.lastModified().toString(Qt::DefaultLocaleShortDate);
- nameItem->setToolTip(tr("%n bytes, last modified %1", 0, fi.size()).arg(lastModified));
+ nameItem->setToolTip(tr("%n bytes, last modified %1.", 0, fi.size()).arg(lastModified));
}
d->m_filesModel->appendRow(nameItem);
}
diff --git a/src/plugins/vcsbase/commonsettingspage.cpp b/src/plugins/vcsbase/commonsettingspage.cpp
index 9e960d7ce0..2ac0c6af3b 100644
--- a/src/plugins/vcsbase/commonsettingspage.cpp
+++ b/src/plugins/vcsbase/commonsettingspage.cpp
@@ -58,7 +58,7 @@ CommonSettingsWidget::CommonSettingsWidget(QWidget *parent) :
m_ui->nickNameMailMapChooser->setHistoryCompleter(QLatin1String("Vcs.NickMap.History"));
m_ui->sshPromptChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
m_ui->sshPromptChooser->setHistoryCompleter(QLatin1String("Vcs.SshPrompt.History"));
- const QString patchToolTip = tr("Command used for reverting diff chunks");
+ const QString patchToolTip = tr("Command used for reverting diff chunks.");
m_ui->patchCommandLabel->setToolTip(patchToolTip);
m_ui->patchChooser->setToolTip(patchToolTip);
m_ui->patchChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
diff --git a/src/plugins/vcsbase/commonsettingspage.ui b/src/plugins/vcsbase/commonsettingspage.ui
index 3700f037d2..99b43c8594 100644
--- a/src/plugins/vcsbase/commonsettingspage.ui
+++ b/src/plugins/vcsbase/commonsettingspage.ui
@@ -73,7 +73,7 @@
<widget class="QLabel" name="nickNameMailMapLabel">
<property name="toolTip">
<string>A file listing user names and email addresses in a 4-column mailmap format:
-name &lt;email&gt; alias &lt;email&gt;</string>
+'name &lt;email&gt; alias &lt;email&gt;'.</string>
</property>
<property name="text">
<string>User/&amp;alias configuration file:</string>
diff --git a/src/plugins/vcsbase/vcsbase.qbs b/src/plugins/vcsbase/vcsbase.qbs
index b6d5b9a621..8d93398fe7 100644
--- a/src/plugins/vcsbase/vcsbase.qbs
+++ b/src/plugins/vcsbase/vcsbase.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index 55427c17a7..84703732d4 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -633,7 +633,7 @@ void VcsBasePlugin::promptToDeleteCurrentFile()
QTC_ASSERT(state.hasFile(), return);
const bool rc = Core::VcsManager::promptToDelete(versionControl(), state.currentFile());
if (!rc)
- QMessageBox::warning(0, tr("Version Control"),
+ QMessageBox::warning(Core::ICore::dialogParent(), tr("Version Control"),
tr("The file '%1' could not be deleted.").
arg(QDir::toNativeSeparators(state.currentFile())),
QMessageBox::Ok);
diff --git a/src/plugins/welcome/welcome.qbs b/src/plugins/welcome/welcome.qbs
index ef284403b4..c44fbb8965 100644
--- a/src/plugins/welcome/welcome.qbs
+++ b/src/plugins/welcome/welcome.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
diff --git a/src/plugins/winrt/winrt.pro b/src/plugins/winrt/winrt.pro
index 85c18c7c06..f86adb8fcd 100644
--- a/src/plugins/winrt/winrt.pro
+++ b/src/plugins/winrt/winrt.pro
@@ -6,6 +6,7 @@ HEADERS += \
winrtdevice.h \
winrtdevicefactory.h \
winrtpackagedeploymentstep.h \
+ winrtpackagedeploymentstepwidget.h \
winrtphoneqtversion.h \
winrtplugin.h \
winrtqtversion.h \
@@ -20,6 +21,7 @@ SOURCES += \
winrtdevice.cpp \
winrtdevicefactory.cpp \
winrtpackagedeploymentstep.cpp \
+ winrtpackagedeploymentstepwidget.cpp \
winrtphoneqtversion.cpp \
winrtplugin.cpp \
winrtqtversion.cpp \
@@ -32,4 +34,5 @@ SOURCES += \
DEFINES += WINRT_LIBRARY
FORMS += \
+ winrtpackagedeploymentstepwidget.ui \
winrtrunconfigurationwidget.ui
diff --git a/src/plugins/winrt/winrt.qbs b/src/plugins/winrt/winrt.qbs
index e035b11232..45f3e3acee 100644
--- a/src/plugins/winrt/winrt.qbs
+++ b/src/plugins/winrt/winrt.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcPlugin
@@ -21,6 +21,9 @@ QtcPlugin {
"winrtdevicefactory.h",
"winrtpackagedeploymentstep.cpp",
"winrtpackagedeploymentstep.h",
+ "winrtpackagedeploymentstepwidget.cpp",
+ "winrtpackagedeploymentstepwidget.h",
+ "winrtpackagedeploymentstepwidget.ui",
"winrtphoneqtversion.cpp",
"winrtphoneqtversion.h",
"winrtplugin.cpp",
diff --git a/src/plugins/winrt/winrtconstants.h b/src/plugins/winrt/winrtconstants.h
index a573a4fc6d..3704603cff 100644
--- a/src/plugins/winrt/winrtconstants.h
+++ b/src/plugins/winrt/winrtconstants.h
@@ -37,6 +37,7 @@ const char WINRT_DEVICE_TYPE_LOCAL[] = "WinRt.Device.Local";
const char WINRT_DEVICE_TYPE_EMULATOR[] = "WinRt.Device.Emulator";
const char WINRT_DEVICE_TYPE_PHONE[] = "WinRt.Device.Phone";
const char WINRT_BUILD_STEP_DEPLOY[] = "WinRt.BuildStep.Deploy";
+const char WINRT_BUILD_STEP_DEPLOY_ARGUMENTS[] = "WinRt.BuildStep.Deploy.Arguments";
const char WINRT_WINRTQT[] = "WinRt.QtVersion.WindowsRuntime";
const char WINRT_WINPHONEQT[] = "WinRt.QtVersion.WindowsPhone";
const char WINRT_QTMAP_SUBKEYNAME[] = "WinRt";
diff --git a/src/plugins/winrt/winrtdeployconfiguration.cpp b/src/plugins/winrt/winrtdeployconfiguration.cpp
index 2f51340d45..8a76634f73 100644
--- a/src/plugins/winrt/winrtdeployconfiguration.cpp
+++ b/src/plugins/winrt/winrtdeployconfiguration.cpp
@@ -52,7 +52,7 @@ static QString msgDeployConfigurationDisplayName(const Core::Id &id)
{
if (id == appxDeployConfigurationC) {
return QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
- "Deploy locally");
+ "Run windeployqt");
}
if (id == phoneDeployConfigurationC) {
return QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
@@ -159,7 +159,7 @@ QString WinRtDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Constants::WINRT_BUILD_STEP_DEPLOY) {
return QCoreApplication::translate("WinRt::Internal::WinRtDeployStepFactory",
- "Deploy Qt binaries and application files");
+ "Run windeployqt");
}
return QString();
}
diff --git a/src/plugins/winrt/winrtpackagedeploymentstep.cpp b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
index 393903e83a..ff746e2c3d 100644
--- a/src/plugins/winrt/winrtpackagedeploymentstep.cpp
+++ b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
@@ -28,29 +28,17 @@
****************************************************************************/
#include "winrtpackagedeploymentstep.h"
-#include "winrtdevice.h"
+#include "winrtpackagedeploymentstepwidget.h"
#include "winrtconstants.h"
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
-#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildtargetinfo.h>
-#include <projectexplorer/ioutputparser.h>
-#include <projectexplorer/kitinformation.h>
-#include <coreplugin/idocument.h>
-#include <utils/fileutils.h>
-#include <qtsupport/profilereader.h>
-#include <proparser/qmakevfs.h>
-#include <utils/hostosinfo.h>
-
-#include <QJsonDocument>
-#include <QJsonObject>
-#include <QJsonArray>
-#include <QRegularExpression>
-#include <QRegularExpressionMatchIterator>
+#include <utils/qtcprocess.h>
using namespace ProjectExplorer;
+using Utils::QtcProcess;
namespace WinRt {
namespace Internal {
@@ -58,21 +46,25 @@ namespace Internal {
WinRtPackageDeploymentStep::WinRtPackageDeploymentStep(BuildStepList *bsl)
: AbstractProcessStep(bsl, Constants::WINRT_BUILD_STEP_DEPLOY)
{
- setDisplayName(tr("Deploy Qt binaries and application files to output directory"));
+ setDisplayName(tr("Run windeployqt"));
+ m_args = defaultWinDeployQtArguments();
}
bool WinRtPackageDeploymentStep::init()
{
- Utils::FileName proFile = Utils::FileName::fromString(project()->document()->filePath());
+ Utils::FileName proFile = Utils::FileName::fromString(project()->projectFilePath());
const QString targetPath
= target()->applicationTargets().targetForProject(proFile).toString()
+ QLatin1String(".exe");
// ### Actually, targetForProject is supposed to return the file path including the file
// extension. Whenever this will eventually work, we have to remove the .exe suffix here.
+ QString args = QtcProcess::quoteArg(QDir::toNativeSeparators(targetPath));
+ args += QLatin1Char(' ') + m_args;
+
ProcessParameters *params = processParameters();
params->setCommand(QLatin1String("windeployqt.exe"));
- params->setArguments(QDir::toNativeSeparators(targetPath));
+ params->setArguments(args);
params->setEnvironment(target()->activeBuildConfiguration()->environment());
return AbstractProcessStep::init();
@@ -80,7 +72,42 @@ bool WinRtPackageDeploymentStep::init()
BuildStepConfigWidget *WinRtPackageDeploymentStep::createConfigWidget()
{
- return new SimpleBuildStepConfigWidget(this);
+ return new WinRtPackageDeploymentStepWidget(this);
+}
+
+void WinRtPackageDeploymentStep::setWinDeployQtArguments(const QString &args)
+{
+ m_args = args;
+}
+
+QString WinRtPackageDeploymentStep::winDeployQtArguments() const
+{
+ return m_args;
+}
+
+QString WinRtPackageDeploymentStep::defaultWinDeployQtArguments() const
+{
+ QString args;
+ QtcProcess::addArg(&args, QStringLiteral("--qmldir"));
+ QtcProcess::addArg(&args, QDir::toNativeSeparators(project()->projectDirectory()));
+ return args;
+}
+
+bool WinRtPackageDeploymentStep::fromMap(const QVariantMap &map)
+{
+ if (!AbstractProcessStep::fromMap(map))
+ return false;
+ QVariant v = map.value(QLatin1String(Constants::WINRT_BUILD_STEP_DEPLOY_ARGUMENTS));
+ if (v.isValid())
+ m_args = v.toString();
+ return true;
+}
+
+QVariantMap WinRtPackageDeploymentStep::toMap() const
+{
+ QVariantMap map = AbstractProcessStep::toMap();
+ map.insert(QLatin1String(Constants::WINRT_BUILD_STEP_DEPLOY_ARGUMENTS), m_args);
+ return map;
}
} // namespace Internal
diff --git a/src/plugins/winrt/winrtpackagedeploymentstep.h b/src/plugins/winrt/winrtpackagedeploymentstep.h
index 8d51f741fa..592395827b 100644
--- a/src/plugins/winrt/winrtpackagedeploymentstep.h
+++ b/src/plugins/winrt/winrtpackagedeploymentstep.h
@@ -42,6 +42,16 @@ public:
explicit WinRtPackageDeploymentStep(ProjectExplorer::BuildStepList *bsl);
bool init();
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
+
+ void setWinDeployQtArguments(const QString &args);
+ QString winDeployQtArguments() const;
+ QString defaultWinDeployQtArguments() const;
+
+ bool fromMap(const QVariantMap &map);
+ QVariantMap toMap() const;
+
+private:
+ QString m_args;
};
} // namespace Internal
diff --git a/src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp b/src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp
new file mode 100644
index 0000000000..f2f6b3b4c5
--- /dev/null
+++ b/src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#include "winrtpackagedeploymentstepwidget.h"
+#include <ui_winrtpackagedeploymentstepwidget.h>
+#include <coreplugin/coreconstants.h>
+#include <QIcon>
+
+namespace WinRt {
+namespace Internal {
+
+WinRtPackageDeploymentStepWidget::WinRtPackageDeploymentStepWidget(WinRtPackageDeploymentStep *step)
+ : m_ui(new Ui::WinRtPackageDeploymentStepWidget)
+ , m_step(step)
+{
+ m_ui->setupUi(this);
+ m_ui->leArguments->setText(m_step->winDeployQtArguments());
+ m_ui->btnRestoreDefaultArgs->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
+}
+
+WinRtPackageDeploymentStepWidget::~WinRtPackageDeploymentStepWidget()
+{
+ delete m_ui;
+}
+
+QString WinRtPackageDeploymentStepWidget::summaryText() const
+{
+ return displayName();
+}
+
+QString WinRtPackageDeploymentStepWidget::displayName() const
+{
+ return m_step->displayName();
+}
+
+void WinRtPackageDeploymentStepWidget::on_btnRestoreDefaultArgs_clicked()
+{
+ m_ui->leArguments->setText(m_step->defaultWinDeployQtArguments());
+}
+
+void WinRtPackageDeploymentStepWidget::on_leArguments_textChanged(QString str)
+{
+ m_step->setWinDeployQtArguments(str);
+}
+
+} // namespace Internal
+} // namespace WinRt
diff --git a/src/plugins/winrt/winrtpackagedeploymentstepwidget.h b/src/plugins/winrt/winrtpackagedeploymentstepwidget.h
new file mode 100644
index 0000000000..beb136fc10
--- /dev/null
+++ b/src/plugins/winrt/winrtpackagedeploymentstepwidget.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef WINRTPACKAGEDEPLOYMENTSTEPWIDGET_H
+#define WINRTPACKAGEDEPLOYMENTSTEPWIDGET_H
+
+#include "winrtpackagedeploymentstep.h"
+
+#include <projectexplorer/buildstep.h>
+
+namespace WinRt {
+namespace Internal {
+
+namespace Ui { class WinRtPackageDeploymentStepWidget; }
+
+class WinRtPackageDeploymentStepWidget : public ProjectExplorer::BuildStepConfigWidget
+{
+ Q_OBJECT
+public:
+ WinRtPackageDeploymentStepWidget(WinRtPackageDeploymentStep *step);
+ ~WinRtPackageDeploymentStepWidget();
+
+ virtual QString summaryText() const;
+ virtual QString displayName() const;
+
+private slots:
+ void on_btnRestoreDefaultArgs_clicked();
+ void on_leArguments_textChanged(QString str);
+
+private:
+ Ui::WinRtPackageDeploymentStepWidget *m_ui;
+ WinRtPackageDeploymentStep *m_step;
+};
+
+} // namespace Internal
+} // namespace WinRt
+
+#endif // WINRTPACKAGEDEPLOYMENTSTEPWIDGET_H
diff --git a/src/plugins/winrt/winrtpackagedeploymentstepwidget.ui b/src/plugins/winrt/winrtpackagedeploymentstepwidget.ui
new file mode 100644
index 0000000000..e3ce32adfc
--- /dev/null
+++ b/src/plugins/winrt/winrtpackagedeploymentstepwidget.ui
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WinRt::Internal::WinRtPackageDeploymentStepWidget</class>
+ <widget class="QWidget" name="WinRt::Internal::WinRtPackageDeploymentStepWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>59</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Arguments:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="leArguments"/>
+ </item>
+ <item>
+ <widget class="QToolButton" name="btnRestoreDefaultArgs">
+ <property name="text">
+ <string>Restore Default Arguments</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/plugins/winrt/winrtqtversionfactory.cpp b/src/plugins/winrt/winrtqtversionfactory.cpp
index b7ce077a9a..9955aa75ab 100644
--- a/src/plugins/winrt/winrtqtversionfactory.cpp
+++ b/src/plugins/winrt/winrtqtversionfactory.cpp
@@ -80,14 +80,21 @@ QtSupport::BaseQtVersion *WinRtQtVersionFactory::create(const Utils::FileName &q
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
return 0;
+ bool isWinRt = false;
bool isPhone = false;
foreach (const QString &value, evaluator->values(QLatin1String("QMAKE_PLATFORM"))) {
- if (value == QStringLiteral("winphone")) {
+ if (value == QStringLiteral("winrt")) {
+ isWinRt = true;
+ } else if (value == QStringLiteral("winphone")) {
+ isWinRt = true;
isPhone = true;
break;
}
}
+ if (!isWinRt)
+ return 0;
+
return isPhone ? new WinRtPhoneQtVersion(qmakePath, isAutoDetected, autoDetectionSource)
: new WinRtQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
}
diff --git a/src/shared/qbs b/src/shared/qbs
-Subproject 4986148d23758cb358ae3e2c369db7644e3a2ed
+Subproject 91d4e47fc8eb506b3a906d75a838a28b2c3a38e
diff --git a/src/tools/3rdparty/3rdparty.pro b/src/tools/3rdparty/3rdparty.pro
index 9b9062f2d9..c0c053bf4c 100644
--- a/src/tools/3rdparty/3rdparty.pro
+++ b/src/tools/3rdparty/3rdparty.pro
@@ -1,5 +1,7 @@
TEMPLATE = subdirs
mac {
- SUBDIRS += iossim
+ SUBDIRS += \
+ iossim \
+ iossim_1_8_2
}
diff --git a/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h b/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h
new file mode 100644
index 0000000000..70cc4ac436
--- /dev/null
+++ b/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h
@@ -0,0 +1,290 @@
+//
+// Generated by class-dump 3.5 (64 bit).
+//
+// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
+//
+
+#pragma mark Blocks
+
+typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown
+
+#pragma mark -
+
+//
+// File: $(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTiPhoneSimulatorRemoteClient.framework/Versions/A/DVTiPhoneSimulatorRemoteClient
+//
+// Arch: x86_64
+// Current version: 12.0.0
+// Compatibility version: 1.0.0
+// Source version: 5037.3.0.0.0
+// Minimum Mac OS X version: 10.8.0
+// SDK version: 10.9.0
+//
+// Objective-C Garbage Collection: Unsupported
+//
+// Run path: @loader_path/../../../../PrivateFrameworks/
+// = $(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks
+//
+
+
+@class DTiPhoneSimulatorApplicationSpecifier;
+@class DTiPhoneSimulatorSession;
+@class DTiPhoneSimulatorSessionConfig;
+@class DTiPhoneSimulatorSystemRoot;
+@class DVTiPhoneSimulatorMessenger;
+
+@protocol DTiPhoneSimulatorSessionDelegate
+
+- (void) session: (DTiPhoneSimulatorSession *) session didEndWithError: (NSError *) error;
+- (void) session: (DTiPhoneSimulatorSession *) session didStart: (BOOL) started withError: (NSError *) error;
+
+@end
+
+@protocol OS_dispatch_source
+@end
+@protocol OS_dispatch_queue
+@end
+@class DVTDispatchLock;
+@class DVTConfinementServiceConnection;
+@class DVTTask;
+
+
+@interface DVTiPhoneSimulatorMessenger : NSObject
+{
+ DTiPhoneSimulatorSession *_session;
+ CDUnknownBlockType _readyMessageHandler;
+ CDUnknownBlockType _runningMessageHandler;
+ CDUnknownBlockType _appDidLaunchMessageHandler;
+ CDUnknownBlockType _appDidQuitMessageHandler;
+ CDUnknownBlockType _appPIDExitedMessageHandler;
+ CDUnknownBlockType _toolDidLaunchMessageHandler;
+}
+
++ (id)messengerForSession:(id)arg1 withConnection:(id)arg2;
++ (id)messengerForSession:(id)arg1;
+@property(copy, nonatomic) CDUnknownBlockType toolDidLaunchMessageHandler; // @synthesize toolDidLaunchMessageHandler=_toolDidLaunchMessageHandler;
+@property(copy, nonatomic) CDUnknownBlockType appPIDExitedMessageHandler; // @synthesize appPIDExitedMessageHandler=_appPIDExitedMessageHandler;
+@property(copy, nonatomic) CDUnknownBlockType appDidQuitMessageHandler; // @synthesize appDidQuitMessageHandler=_appDidQuitMessageHandler;
+@property(copy, nonatomic) CDUnknownBlockType appDidLaunchMessageHandler; // @synthesize appDidLaunchMessageHandler=_appDidLaunchMessageHandler;
+@property(copy, nonatomic) CDUnknownBlockType runningMessageHandler; // @synthesize runningMessageHandler=_runningMessageHandler;
+@property(copy, nonatomic) CDUnknownBlockType readyMessageHandler; // @synthesize readyMessageHandler=_readyMessageHandler;
+@property(readonly) DTiPhoneSimulatorSession *session; // @synthesize session=_session;
+- (void)doUbiquityFetchEvent;
+- (void)doFetchEventForPID:(int)arg1;
+- (void)backgroundAllApps:(int)arg1;
+- (void)startSimulatorToolSessionWithParameters:(id)arg1;
+- (void)stopSimulatingLocation;
+- (void)startSimulatingLocationWithLatitude:(id)arg1 longitute:(id)arg2;
+- (void)endSimulatorSessionWithPID:(int)arg1;
+- (void)startSimulatorSessionWithRequestInfo:(id)arg1;
+- (void)clearAllMessageHandlers;
+- (void)waitPID:(int)arg1 withAppPIDExitedMessagedHandler:(CDUnknownBlockType)arg2;
+- (void)disconnectFromService;
+- (BOOL)connectToServiceWithSessionOnLaunch:(BOOL)arg1 simulatorPID:(int *)arg2 error:(id *)arg3;
+- (id)initWithSession:(id)arg1;
+
+@end
+
+@interface DVTiPhoneSimulatorLocalMessenger : DVTiPhoneSimulatorMessenger
+{
+ BOOL _appTerminationMessageSent;
+ NSObject<OS_dispatch_source> *_pidDispatchSource;
+ DVTTask *_simTask;
+}
+
+- (void)doUbiquityFetchEvent;
+- (void)doFetchEventForPID:(int)arg1;
+- (void)backgroundAllApps:(int)arg1;
+- (void)_handleSimulatorToolDidLaunchMessage:(id)arg1;
+- (void)setToolDidLaunchMessageHandler:(CDUnknownBlockType)arg1;
+- (void)waitPID:(int)arg1 withAppPIDExitedMessagedHandler:(CDUnknownBlockType)arg2;
+- (void)_handleSimulatorAppDidQuitMessage:(id)arg1;
+- (void)setAppDidQuitMessageHandler:(CDUnknownBlockType)arg1;
+- (void)_handleSimulatorAppDidLaunchMessage:(id)arg1;
+- (void)setAppDidLaunchMessageHandler:(CDUnknownBlockType)arg1;
+- (void)_handleSimulatorRunningMessage:(id)arg1;
+- (void)setRunningMessageHandler:(CDUnknownBlockType)arg1;
+- (void)_handleSimulatorReadyMessage:(id)arg1;
+- (void)setReadyMessageHandler:(CDUnknownBlockType)arg1;
+- (void)startSimulatorToolSessionWithParameters:(id)arg1;
+- (void)stopSimulatingLocation;
+- (void)startSimulatingLocationWithLatitude:(id)arg1 longitute:(id)arg2;
+- (void)endSimulatorSessionWithPID:(int)arg1;
+- (void)startSimulatorSessionWithRequestInfo:(id)arg1;
+- (void)clearAllMessageHandlers;
+- (void)disconnectFromService;
+- (BOOL)connectToServiceWithSessionOnLaunch:(BOOL)arg1 simulatorPID:(int *)arg2 error:(id *)arg3;
+- (void)_enableObserver:(BOOL)arg1 forName:(id)arg2 selector:(SEL)arg3;
+
+@end
+
+@interface DVTiPhoneSimulatorRemoteMessenger : DVTiPhoneSimulatorMessenger
+{
+ unsigned long long _commandTag;
+ NSObject<OS_dispatch_queue> *_responseQueue;
+ DVTDispatchLock *_awaitingLock;
+ NSMutableDictionary *_awaitingSemaphores;
+ NSMutableDictionary *_awaitingResponses;
+ NSMutableSet *_waitingAppPIDs;
+ DVTConfinementServiceConnection *_connection;
+}
+
+@property(readonly) DVTConfinementServiceConnection *connection; // @synthesize connection=_connection;
+- (void)handleNotificationResponse:(id)arg1;
+- (void)waitPID:(int)arg1 withAppPIDExitedMessagedHandler:(CDUnknownBlockType)arg2;
+- (void)startSimulatorToolSessionWithParameters:(id)arg1;
+- (void)stopSimulatingLocation;
+- (void)startSimulatingLocationWithLatitude:(id)arg1 longitute:(id)arg2;
+- (void)endSimulatorSessionWithPID:(int)arg1;
+- (void)startSimulatorSessionWithRequestInfo:(id)arg1;
+- (void)disconnectFromService;
+- (BOOL)connectToServiceWithSessionOnLaunch:(BOOL)arg1 simulatorPID:(int *)arg2 error:(id *)arg3;
+- (BOOL)sendTaggedRequest:(id)arg1 awaitingResponse:(id *)arg2 error:(id *)arg3;
+- (id)nextCommandTag;
+- (id)awaitResponseWithTag:(id)arg1 error:(id *)arg2;
+- (void)enqueueResponse:(id)arg1 withTag:(id)arg2 error:(id)arg3;
+- (BOOL)sendRequest:(id)arg1 withTag:(id)arg2 error:(id *)arg3;
+- (id)initWithSession:(id)arg1 connection:(id)arg2;
+
+@end
+
+@interface DTiPhoneSimulatorSession : NSObject
+{
+ int _simulatedApplicationPID;
+ int _simulatorPID;
+ NSString *_uuid;
+ id <DTiPhoneSimulatorSessionDelegate> _delegate;
+ NSString *_simulatedAppPath;
+ long long _sessionLifecycleProgress;
+ NSTimer *_timeoutTimer;
+ DTiPhoneSimulatorSessionConfig *_sessionConfig;
+ DVTiPhoneSimulatorMessenger *_messenger;
+}
+
+@property(retain) DVTiPhoneSimulatorMessenger *messenger; // @synthesize messenger=_messenger;
+@property(copy, nonatomic) DTiPhoneSimulatorSessionConfig *sessionConfig; // @synthesize sessionConfig=_sessionConfig;
+@property(retain, nonatomic) NSTimer *timeoutTimer; // @synthesize timeoutTimer=_timeoutTimer;
+@property(nonatomic) long long sessionLifecycleProgress; // @synthesize sessionLifecycleProgress=_sessionLifecycleProgress;
+@property int simulatorPID; // @synthesize simulatorPID=_simulatorPID;
+@property(copy) NSString *simulatedAppPath; // @synthesize simulatedAppPath=_simulatedAppPath;
+@property int simulatedApplicationPID; // @synthesize simulatedApplicationPID=_simulatedApplicationPID;
+@property(retain, nonatomic) id <DTiPhoneSimulatorSessionDelegate> delegate; // @synthesize delegate=_delegate;
+@property(copy, nonatomic) NSString *uuid; // @synthesize uuid=_uuid;
+- (void)doUbiquityFetchEvent;
+- (void)doFetchEventForPID:(int)arg1;
+- (void)backgroundAllApps:(int)arg1;
+- (id)_invalidConfigError;
+- (void)_endSimulatorSession;
+- (void)_callDelegateResponseFromSessionEndedInfo:(id)arg1;
+- (void)_callDelegateResponseFromSessionStartedInfo:(id)arg1;
+- (id)_sessionStartRequestInfoFromConfig:(id)arg1 withError:(id *)arg2;
+- (BOOL)_startToolSessionInSimulatorWithError:(id *)arg1;
+- (BOOL)_startApplicationSessionInSimulatorWithError:(id *)arg1;
+- (BOOL)_startBasicSessionInSimulatorWithError:(id *)arg1;
+- (BOOL)_startSessionInSimulatorWithError:(id *)arg1;
+- (BOOL)_handleSessionEndedInSimulator:(id)arg1 notification:(id)arg2;
+- (void)_handleSessionStartedWithSim:(id)arg1;
+- (void)_handleSessionStartedInSimulator:(id)arg1;
+- (void)_handleSimulatorReadyMessage:(id)arg1;
+- (void)_timeoutElapsed:(id)arg1;
+- (BOOL)attachedToTargetWithConfig:(id)arg1 error:(id *)arg2;
+- (void)stopLocationSimulation;
+- (void)simulateLocationWithLatitude:(id)arg1 longitude:(id)arg2;
+- (void)requestEndWithTimeout:(double)arg1;
+- (BOOL)requestStartWithConfig:(id)arg1 timeout:(double)arg2 error:(id *)arg3;
+- (BOOL)_setUpSimulatorMessengerWithConfig:(id)arg1 error:(id *)arg2;
+- (id)description;
+- (void)dealloc;
+- (id)init;
+
+@end
+
+@interface DTiPhoneSimulatorSessionConfig : NSObject <NSCopying>
+{
+ BOOL _launchForBackgroundFetch;
+ BOOL _simulatedApplicationShouldWaitForDebugger;
+ NSString *_localizedClientName;
+ DTiPhoneSimulatorSystemRoot *_simulatedSystemRoot;
+ NSString *_simulatedDeviceInfoName;
+ NSNumber *_simulatedDeviceFamily;
+ NSString *_simulatedArchitecture;
+ NSNumber *_simulatedDisplayHeight;
+ NSNumber *_simulatedDisplayScale;
+ DTiPhoneSimulatorApplicationSpecifier *_applicationToSimulateOnStart;
+ NSNumber *_pid;
+ NSArray *_simulatedApplicationLaunchArgs;
+ NSDictionary *_simulatedApplicationLaunchEnvironment;
+ NSString *_simulatedApplicationStdOutPath;
+ NSString *_simulatedApplicationStdErrPath;
+ NSFileHandle *_stdinFileHandle;
+ NSFileHandle *_stdoutFileHandle;
+ NSFileHandle *_stderrFileHandle;
+ id _confinementService;
+}
+
++ (id)displayNameForDeviceFamily:(id)arg1;
+@property(retain) id confinementService; // @synthesize confinementService=_confinementService;
+@property(retain) NSFileHandle *stderrFileHandle; // @synthesize stderrFileHandle=_stderrFileHandle;
+@property(retain) NSFileHandle *stdoutFileHandle; // @synthesize stdoutFileHandle=_stdoutFileHandle;
+@property(retain) NSFileHandle *stdinFileHandle; // @synthesize stdinFileHandle=_stdinFileHandle;
+@property(copy) NSString *simulatedApplicationStdErrPath; // @synthesize simulatedApplicationStdErrPath=_simulatedApplicationStdErrPath;
+@property(copy) NSString *simulatedApplicationStdOutPath; // @synthesize simulatedApplicationStdOutPath=_simulatedApplicationStdOutPath;
+@property BOOL simulatedApplicationShouldWaitForDebugger; // @synthesize simulatedApplicationShouldWaitForDebugger=_simulatedApplicationShouldWaitForDebugger;
+@property(copy) NSDictionary *simulatedApplicationLaunchEnvironment; // @synthesize simulatedApplicationLaunchEnvironment=_simulatedApplicationLaunchEnvironment;
+@property(copy) NSArray *simulatedApplicationLaunchArgs; // @synthesize simulatedApplicationLaunchArgs=_simulatedApplicationLaunchArgs;
+@property(copy) NSNumber *pid; // @synthesize pid=_pid;
+@property(copy) DTiPhoneSimulatorApplicationSpecifier *applicationToSimulateOnStart; // @synthesize applicationToSimulateOnStart=_applicationToSimulateOnStart;
+@property(copy) NSNumber *simulatedDisplayScale; // @synthesize simulatedDisplayScale=_simulatedDisplayScale;
+@property(copy) NSNumber *simulatedDisplayHeight; // @synthesize simulatedDisplayHeight=_simulatedDisplayHeight;
+@property(copy) NSString *simulatedArchitecture; // @synthesize simulatedArchitecture=_simulatedArchitecture;
+@property(copy) NSNumber *simulatedDeviceFamily; // @synthesize simulatedDeviceFamily=_simulatedDeviceFamily;
+@property(retain) NSString *simulatedDeviceInfoName; // @synthesize simulatedDeviceInfoName=_simulatedDeviceInfoName;
+@property(copy) DTiPhoneSimulatorSystemRoot *simulatedSystemRoot; // @synthesize simulatedSystemRoot=_simulatedSystemRoot;
+@property(copy) NSString *localizedClientName; // @synthesize localizedClientName=_localizedClientName;
+@property BOOL launchForBackgroundFetch; // @synthesize launchForBackgroundFetch=_launchForBackgroundFetch;
+- (id)description;
+- (id)copyWithZone:(struct _NSZone *)arg1;
+- (id)init;
+
+@end
+
+@interface DTiPhoneSimulatorSystemRoot : NSObject <NSCopying>
+{
+ NSString *sdkRootPath;
+ NSString *sdkVersion;
+ NSString *sdkDisplayName;
+}
+
++ (id)rootWithSDKVersion:(id)arg1;
++ (id)rootWithSDKPath:(id)arg1;
++ (id)defaultRoot;
++ (id)knownRoots;
++ (void)initialize;
+@property(copy) NSString *sdkDisplayName; // @synthesize sdkDisplayName;
+@property(copy) NSString *sdkVersion; // @synthesize sdkVersion;
+@property(copy) NSString *sdkRootPath; // @synthesize sdkRootPath;
+- (id)description;
+- (long long)compare:(id)arg1;
+- (id)copyWithZone:(struct _NSZone *)arg1;
+- (BOOL)isEqual:(id)arg1;
+- (id)initWithSDKPath:(id)arg1;
+
+@end
+
+@interface DTiPhoneSimulatorApplicationSpecifier : NSObject <NSCopying>
+{
+ NSString *appPath;
+ NSString *bundleID;
+ NSString *toolPath;
+}
+
++ (id)specifierWithToolPath:(id)arg1;
++ (id)specifierWithApplicationBundleIdentifier:(id)arg1;
++ (id)specifierWithApplicationPath:(id)arg1;
+@property(copy, nonatomic) NSString *toolPath; // @synthesize toolPath;
+@property(copy, nonatomic) NSString *bundleID; // @synthesize bundleID;
+@property(copy, nonatomic) NSString *appPath; // @synthesize appPath;
+- (id)description;
+- (id)copyWithZone:(struct _NSZone *)arg1;
+
+@end \ No newline at end of file
diff --git a/src/tools/3rdparty/iossim/iossim.pro b/src/tools/3rdparty/iossim/iossim.pro
index 9e30307406..557362e4c3 100644
--- a/src/tools/3rdparty/iossim/iossim.pro
+++ b/src/tools/3rdparty/iossim/iossim.pro
@@ -26,10 +26,10 @@ iPhoneSimulatorRemoteClientDirectLinking {
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \
-F/Applications/Xcode.app/Contents/OtherFrameworks
LIBS += \
- -framework iPhoneSimulatorRemoteClient
+ -framework DTViPhoneSimulatorRemoteClient
QMAKE_RPATHDIR += /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \
- /Applications/Xcode.app/Contents/OtherFrameworks
- /System/Library/PrivateFrameworks \
+ /Applications/Xcode.app/Contents/OtherFrameworks \
+ /System/Library/PrivateFrameworks
}
TEMPLATE = app
@@ -49,7 +49,7 @@ HEADERS += \
nsprintf.h \
nsstringexpandpath.h \
version.h \
- iphonesimulatorremoteclient/iphonesimulatorremoteclient.h
+ dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h
OTHER_FILES = IOSSIM_LICENSE \
Info.plist
diff --git a/src/tools/3rdparty/iossim/iossim.qbs b/src/tools/3rdparty/iossim/iossim.qbs
index ba3133b493..1300b107d5 100644
--- a/src/tools/3rdparty/iossim/iossim.qbs
+++ b/src/tools/3rdparty/iossim/iossim.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
@@ -18,7 +18,7 @@ QtcTool {
"nsprintf.h",
"nsstringexpandpath.h",
"version.h",
- "iphonesimulatorremoteclient/iphonesimulatorremoteclient.h"
+ "dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h"
]
cpp.linkerFlags: base.concat(["-sectcreate", "__TEXT", "__info_plist", path + "/Info.plist",
"-fobjc-link-runtime"])
diff --git a/src/tools/3rdparty/iossim/iphonesimulator.h b/src/tools/3rdparty/iossim/iphonesimulator.h
index 0770c50ee3..3049f318d2 100644
--- a/src/tools/3rdparty/iossim/iphonesimulator.h
+++ b/src/tools/3rdparty/iossim/iphonesimulator.h
@@ -6,7 +6,7 @@
*/
#import <Foundation/Foundation.h>
-#import "iphonesimulatorremoteclient/iphonesimulatorremoteclient.h"
+#import <dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h>
#import "version.h"
@interface iPhoneSimulator : NSObject <DTiPhoneSimulatorSessionDelegate> {
@@ -14,8 +14,7 @@
DTiPhoneSimulatorSystemRoot *sdkRoot;
NSFileHandle *stdoutFileHandle;
NSFileHandle *stderrFileHandle;
- DTiPhoneSimulatorSession *session;
- NSTimer *pidCheckingTimer;
+ DTiPhoneSimulatorSession *mySession;
BOOL startOnly;
BOOL exitOnStartup;
BOOL shouldWaitDebugger;
@@ -34,8 +33,7 @@
- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path;
- (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path;
- (void)stop;
-- (void)checkPid:(NSTimer *)timer;
- (void)doExit:(int)errorCode;
-- (void)changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice;
+- (NSString*)changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice;
@end
diff --git a/src/tools/3rdparty/iossim/iphonesimulator.mm b/src/tools/3rdparty/iossim/iphonesimulator.mm
index b06b54276d..e8ca358454 100644
--- a/src/tools/3rdparty/iossim/iphonesimulator.mm
+++ b/src/tools/3rdparty/iossim/iphonesimulator.mm
@@ -10,8 +10,8 @@
#import "nsprintf.h"
#import <sys/types.h>
#import <sys/stat.h>
-#import <objc/runtime.h>
-#import <AppKit/NSRunningApplication.h>
+#import <Foundation/NSTask.h>
+@class DTiPhoneSimulatorSystemRoot;
NSString *simulatorPrefrencesName = @"com.apple.iphonesimulator";
NSString *deviceProperty = @"SimulateDevice";
@@ -21,6 +21,18 @@ NSString *deviceIphone = @"iPhone";
NSString *deviceIpad = @"iPad";
NSString *deviceIpadRetina = @"iPad (Retina)";
+// The path within the developer dir of the private Simulator frameworks.
+NSString* const kSimulatorFrameworkRelativePath = @"Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTiPhoneSimulatorRemoteClient.framework";
+NSString* const kDVTFoundationRelativePath = @"../SharedFrameworks/DVTFoundation.framework";
+NSString* const kDevToolsFoundationRelativePath = @"../OtherFrameworks/DevToolsFoundation.framework";
+//NSString* const kSimulatorRelativePath = @"Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app";
+
+static const char *gDevDir = 0;
+
+@interface DVTPlatform : NSObject
++ (BOOL)loadAllPlatformsReturningError:(id*)arg1;
+@end
+
/**
* A simple iPhoneSimulatorRemoteClient framework.
*/
@@ -28,14 +40,12 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
- (id)init {
self = [super init];
- session = nil;
- pidCheckingTimer = nil;
+ mySession = nil;
return self;
}
- (void)dealloc {
- [session release];
- [pidCheckingTimer release];
+ [mySession release];
[super dealloc];
}
@@ -47,8 +57,88 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
exit(errorCode);
}
+// Helper to find a class by name and die if it isn't found.
+-(Class) FindClassByName:(NSString*) nameOfClass {
+ Class theClass = NSClassFromString(nameOfClass);
+ if (!theClass) {
+ nsfprintf(stderr,@"Failed to find class %@ at runtime.", nameOfClass);
+ [self doExit:EXIT_FAILURE];
+ }
+ return theClass;
+}
+
+// Loads the Simulator framework from the given developer dir.
+-(void) LoadSimulatorFramework:(NSString*) developerDir {
+ // The Simulator framework depends on some of the other Xcode private
+ // frameworks; manually load them first so everything can be linked up.
+ NSString* dvtFoundationPath = [developerDir stringByAppendingPathComponent:kDVTFoundationRelativePath];
+
+ NSBundle* dvtFoundationBundle =
+ [NSBundle bundleWithPath:dvtFoundationPath];
+ if (![dvtFoundationBundle load]){
+ nsprintf(@"Unable to dvtFoundationBundle. Error: ");
+ [self doExit:EXIT_FAILURE];
+ return ;
+ }
+ NSString* devToolsFoundationPath = [developerDir stringByAppendingPathComponent:kDevToolsFoundationRelativePath];
+ NSBundle* devToolsFoundationBundle =
+ [NSBundle bundleWithPath:devToolsFoundationPath];
+ if (![devToolsFoundationBundle load]){
+ nsprintf(@"Unable to devToolsFoundationPath. Error: ");
+ return ;
+ }
+ // Prime DVTPlatform.
+ NSError* error;
+ Class DVTPlatformClass = [self FindClassByName:@"DVTPlatform"];
+ if (![DVTPlatformClass loadAllPlatformsReturningError:&error]) {
+ nsprintf(@"Unable to loadAllPlatformsReturningError. Error: %@",[error localizedDescription]);
+ return ;
+ }
+ NSString* simBundlePath = [developerDir stringByAppendingPathComponent:kSimulatorFrameworkRelativePath];
+ NSBundle* simBundle = [NSBundle bundleWithPath:simBundlePath];
+ if (![simBundle load]){
+ nsprintf(@"Unable to load simulator framework. Error: %@",[error localizedDescription]);
+ return ;
+ }
+ return ;
+}
+
+
+// Finds the developer dir via xcode-select or the DEVELOPER_DIR environment
+// variable.
+NSString* FindDeveloperDir() {
+ if (gDevDir)
+ return [NSString stringWithCString:gDevDir encoding:NSUTF8StringEncoding];
+ // Check the env first.
+ NSDictionary* env = [[NSProcessInfo processInfo] environment];
+ NSString* developerDir = [env objectForKey:@"DEVELOPER_DIR"];
+ if ([developerDir length] > 0)
+ return developerDir;
+
+ // Go look for it via xcode-select.
+ NSTask* xcodeSelectTask = [[[NSTask alloc] init] autorelease];
+ [xcodeSelectTask setLaunchPath:@"/usr/bin/xcode-select"];
+ [xcodeSelectTask setArguments:[NSArray arrayWithObject:@"-print-path"]];
+
+ NSPipe* outputPipe = [NSPipe pipe];
+ [xcodeSelectTask setStandardOutput:outputPipe];
+ NSFileHandle* outputFile = [outputPipe fileHandleForReading];
+
+ [xcodeSelectTask launch];
+ NSData* outputData = [outputFile readDataToEndOfFile];
+ [xcodeSelectTask terminate];
+
+ NSString* output =
+ [[[NSString alloc] initWithData:outputData
+ encoding:NSUTF8StringEncoding] autorelease];
+ output = [output stringByTrimmingCharactersInSet:
+ [NSCharacterSet whitespaceAndNewlineCharacterSet]];
+ if ([output length] == 0)
+ output = nil;
+ return output;
+}
- (void) printUsage {
- fprintf(stdout, "<msg>Usage: iossim <command> <options> [--args ...]\n");
+ fprintf(stdout, "<msg>Usage: ios-sim <command> <options> [--args ...]\n");
fprintf(stdout, "\n");
fprintf(stdout, "Commands:\n");
fprintf(stdout, " showsdks List the available iOS SDK versions\n");
@@ -80,61 +170,60 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
- (int) showSDKs {
- NSUInteger i;
- id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot");
- if (tClass == nil) {
- nsprintf(@"<msg>DTiPhoneSimulatorSystemRoot class is nil.</msg>");
- return EXIT_FAILURE;
- }
- NSArray *roots = [tClass knownRoots];
+ Class systemRootClass = [self FindClassByName:@"DTiPhoneSimulatorSystemRoot"];
+
+ NSArray *roots = [systemRootClass knownRoots];
nsprintf(@"<device_info>");
- for (i = 0; i < [roots count]; ++i) {
+ for (NSUInteger i = 0; i < [roots count]; ++i) {
DTiPhoneSimulatorSystemRoot *root = [roots objectAtIndex:i];
- nsprintf(@"<item><key>sdk%d_name</key><value>%@</value></item>", i, [root sdkDisplayName]);
- nsprintf(@"<item><key>sdk%d_version</key><value>%@</value></item>", i, [root sdkVersion]);
- nsprintf(@"<item><key>sdk%d_sysroot</key><value>%@</value></item>", i, [root sdkRootPath]);
+ nsprintf(@"<item><key>sdk%d_name</key><value>%@</value></item>", i, [root sdkDisplayName]);
+ nsprintf(@"<item><key>sdk%d_version</key><value>%@</value></item>", i, [root sdkVersion]);
+ nsprintf(@"<item><key>sdk%d_sysroot</key><value>%@</value></item>", i, [root sdkRootPath]);
}
nsprintf(@"</device_info>");
+
return EXIT_SUCCESS;
}
-- (void)session:(DTiPhoneSimulatorSession *)mySession didEndWithError:(NSError *)error {
+- (void)session:(DTiPhoneSimulatorSession *)session didEndWithError:(NSError *)error {
if (verbose) {
nsprintf(@"<msg>Session did end with error %@</msg>", error);
}
if (stderrFileHandle != nil) {
- NSString *stderrPath = [[mySession sessionConfig] simulatedApplicationStdErrPath];
+ NSString *stderrPath = [[session sessionConfig] simulatedApplicationStdErrPath];
[self removeStdioFIFO:stderrFileHandle atPath:stderrPath];
}
if (stdoutFileHandle != nil) {
- NSString *stdoutPath = [[mySession sessionConfig] simulatedApplicationStdOutPath];
+ NSString *stdoutPath = [[session sessionConfig] simulatedApplicationStdOutPath];
[self removeStdioFIFO:stdoutFileHandle atPath:stdoutPath];
}
- if (error != nil)
+ if (error != nil) {
[self doExit:EXIT_FAILURE];
- else
- [self doExit:EXIT_SUCCESS];
+ }
+
+ [self doExit:EXIT_SUCCESS];
}
-- (void)session:(DTiPhoneSimulatorSession *)mySession didStart:(BOOL)started withError:(NSError *)error {
- if (startOnly && mySession) {
- [NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript"
- arguments:[NSArray arrayWithObjects:@"-e", @"tell application \"iPhone Simulator\" to activate", nil]];
- nsprintf(@"<msg>Simulator started (no session)</msg>");
- [self doExit:EXIT_SUCCESS];
- return;
+- (void)session:(DTiPhoneSimulatorSession *)session didStart:(BOOL)started withError:(NSError *)error {
+ if (startOnly && session) {
+ [NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript"
+ arguments:[NSArray arrayWithObjects:@"-e", @"tell application \"iPhone Simulator\" to activate", nil]];
+ nsprintf(@"<msg>Simulator started (no session)</msg>");
+ [self doExit:EXIT_SUCCESS];
+ return;
}
if (started) {
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript"
arguments:[NSArray arrayWithObjects:@"-e", @"tell application \"iPhone Simulator\" to activate", nil]];
+ int pid = [session simulatedApplicationPID];
if (shouldStartDebugger) {
- char*args[4] = { NULL, NULL, (char*)[[[mySession simulatedApplicationPID] description] UTF8String], NULL };
+ char*args[4] = { NULL, NULL, (char*)[[@(pid) description] UTF8String], NULL };
if (useGDB) {
args[0] = strdup("gdb");
args[1] = strdup("program");
@@ -156,35 +245,23 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
if (verbose) {
nsprintf(@"<msg>Session started</msg>");
}
- nsprintf(@"<inferior_pid>%@</inferior_pid>", [session simulatedApplicationPID]);
+ nsprintf(@"<inferior_pid>%d</inferior_pid>", pid);
fflush(stdout);
if (exitOnStartup) {
- [self doExit:EXIT_SUCCESS];
- return;
+ [self doExit:EXIT_SUCCESS];
+ return;
}
- pidCheckingTimer = [[NSTimer scheduledTimerWithTimeInterval:5.0 target:self
- selector:@selector(checkPid:) userInfo:nil repeats: TRUE] retain];
} else {
- nsprintf(@"<msg>Session could not be started: %@</msg>", error);
- [self doExit:EXIT_FAILURE];
+ nsprintf(@"<msg>Session could not be started: %@</msg>", error);
+ [self doExit:EXIT_FAILURE];
}
}
- (void)stop {
- if (session)
- [session requestEndWithTimeout: 0.1];
+ if (mySession)
+ [mySession requestEndWithTimeout: 0.1];
}
-- (void)checkPid:(NSTimer *)timer {
- (void)timer;
- if (session && [[session simulatedApplicationPID]intValue] > 0) {
- if (kill((pid_t)[[session simulatedApplicationPID]intValue], 0) == -1) {
- nsprintf(@"<msg>app stopped</msg>");
- [self doExit:EXIT_SUCCESS];
- return;
- }
- }
-}
- (void)stdioDataIsAvailable:(NSNotification *)notification {
[[notification object] readInBackgroundAndNotify];
NSData *data = [[notification userInfo] valueForKey:NSFileHandleNotificationDataItem];
@@ -201,14 +278,13 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
} else {
nsprintf(@"<app_output>%@</app_output>", str); // handle stderr differently?
}
- fflush(stdout);
}
- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path {
*path = [NSString stringWithFormat:@"%@/ios-sim-%@-pipe-%d", NSTemporaryDirectory(), type, (int)time(NULL)];
if (mkfifo([*path UTF8String], S_IRUSR | S_IWUSR) == -1) {
- nsprintf(@"<msg>Unable to create %@ named pipe `%@'</msg>", type, *path);
+ nsprintf(@"<msg>Unable to create %@ named pipe `%@</msg>'", type, *path);
[self doExit:EXIT_FAILURE];
} else {
if (verbose) {
@@ -246,33 +322,27 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
args:(NSArray *)args {
DTiPhoneSimulatorApplicationSpecifier *appSpec;
DTiPhoneSimulatorSessionConfig *config;
- NSError *error = 0;
- id tClass;
+ DTiPhoneSimulatorSession *session;
+ NSError *error;
NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease];
if (!startOnly && ![fileManager fileExistsAtPath:path]) {
- nsprintf(@"<msg>Application path %@ doesn't exist!</msg>", path);
- return EXIT_FAILURE;
+ nsprintf(@"<msg>Application path %@ doesn't exist!</msg>", path);
+ return EXIT_FAILURE;
}
/* Create the app specifier */
- tClass = objc_getClass("DTiPhoneSimulatorApplicationSpecifier");
- if (tClass == nil) {
- nsprintf(@"<msg>DTiPhoneSimulatorApplicationSpecifier class is nil.</msg>");
- return EXIT_FAILURE;
- }
- appSpec = startOnly ? nil : [tClass specifierWithApplicationPath:path];
+ appSpec = startOnly ? nil : [[self FindClassByName:@"DTiPhoneSimulatorApplicationSpecifier"] specifierWithApplicationPath:path];
if (verbose) {
- nsprintf(@"<msg>App Spec: %@</msg>", appSpec);
- nsprintf(@"SDK Root: %@", sdkRoot);
+ nsprintf(@"<msg>App Spec: %@</msg>", appSpec);
+ nsprintf(@"<msg>SDK Root: %@</msg>", sdkRoot);
for (id key in environment) {
nsprintf(@"<msg>Env: %@ = %@</msg>", key, [environment objectForKey:key]);
}
}
-
NSString *sdkVersion = [sdkRoot sdkVersion];
NSString *appSupportDir = [NSString stringWithFormat:@"%@/Library/Application Support/iPhone Simulator/%@",
NSHomeDirectory(), sdkVersion];
@@ -288,12 +358,7 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
environment = mutableEnv;
/* Set up the session configuration */
- tClass = objc_getClass("DTiPhoneSimulatorSessionConfig");
- if (tClass == nil) {
- nsprintf(@"<msg>DTiPhoneSimulatorApplicationSpecifier class is nil.</msg>");
- return EXIT_FAILURE;
- }
- config = [[[tClass alloc] init] autorelease];
+ config = [[[[self FindClassByName:@"DTiPhoneSimulatorSessionConfig"] alloc] init] autorelease];
[config setApplicationToSimulateOnStart:appSpec];
[config setSimulatedSystemRoot:sdkRoot];
[config setSimulatedApplicationShouldWaitForDebugger:shouldWaitDebugger];
@@ -333,16 +398,13 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
[config setSimulatedDeviceFamily:[NSNumber numberWithInt:1]];
}
}
-
- [self changeDeviceType:family retina:retinaDevice isTallDevice:tallDevice];
+
+ NSString* devicePropertyValue = [self changeDeviceType:family retina:retinaDevice isTallDevice:tallDevice];
+ [config setSimulatedDeviceInfoName:devicePropertyValue];
/* Start the session */
- tClass = objc_getClass("DTiPhoneSimulatorSession");
- if (tClass == nil) {
- nsprintf(@"<msg>DTiPhoneSimulatorSession class is nil.</msg>");
- return EXIT_FAILURE;
- }
- session = [[tClass alloc] init];
+ session = [[[[self FindClassByName:@"DTiPhoneSimulatorSession"] alloc] init] autorelease];
+ mySession = session;
[session setDelegate:self];
if (uuid != nil){
[session setUuid:uuid];
@@ -356,7 +418,7 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
return EXIT_SUCCESS;
}
-- (void) changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice {
+- (NSString*) changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice {
NSString *devicePropertyValue;
if (retina) {
if (verbose) {
@@ -381,6 +443,8 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
}
CFPreferencesSetAppValue((CFStringRef)deviceProperty, (CFPropertyListRef)devicePropertyValue, (CFStringRef)simulatorPrefrencesName);
CFPreferencesAppSynchronize((CFStringRef)simulatorPrefrencesName);
+
+ return devicePropertyValue;
}
@@ -398,17 +462,29 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
exitOnStartup = NO;
alreadyPrintedData = NO;
startOnly = strcmp(argv[1], "start") == 0;
+
nsprintf(@"<query_result>");
+ for (int i = 0; i < argc; ++i) {
+ if (strcmp(argv[i], "--developer-path") == 0) {
+ ++i;
+ if (i < argc)
+ gDevDir = argv[i];
+ }
+ }
+ NSString* developerDir = FindDeveloperDir();
+ if (!developerDir) {
+ nsprintf(@"Unable to find developer directory.");
+ exit(EXIT_FAILURE);
+ }
if (strcmp(argv[1], "showsdks") == 0) {
- [self doExit:[self showSDKs]];
- return;
+ [self LoadSimulatorFramework:developerDir];
+ exit([self showSDKs]);
} else if (strcmp(argv[1], "launch") == 0 || startOnly) {
if (strcmp(argv[1], "launch") == 0 && argc < 3) {
nsprintf(@"<msg>Missing application path argument</msg>");
[self printUsage];
- [self doExit:EXIT_FAILURE];
- return;
+ exit(EXIT_FAILURE);
}
NSString *appPath = nil;
@@ -425,6 +501,7 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
NSString *uuid = nil;
NSString *stdoutPath = nil;
NSString *stderrPath = nil;
+ NSString *xctest = nil;
NSTimeInterval timeout = 30;
NSMutableDictionary *environment = [NSMutableDictionary dictionary];
@@ -452,20 +529,15 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
} else if (strcmp(argv[i], "--timeout") == 0) {
if (i + 1 < argc) {
timeout = [[NSString stringWithUTF8String:argv[++i]] doubleValue];
- NSLog(@"<msg>Timeout: %f second(s)</msg>", timeout);
+ NSLog(@"Timeout: %f second(s)", timeout);
}
}
else if (strcmp(argv[i], "--sdk") == 0) {
i++;
+ [self LoadSimulatorFramework:developerDir];
NSString* ver = [NSString stringWithCString:argv[i] encoding:NSUTF8StringEncoding];
- id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot");
- NSArray *roots;
- if (tClass == nil) {
- nsprintf(@"<msg>DTiPhoneSimulatorSystemRoot class is nil.</msg>");
- [self doExit:EXIT_FAILURE];
- return;
- }
- roots = [tClass knownRoots];
+ Class systemRootClass = [self FindClassByName:@"DTiPhoneSimulatorSystemRoot"];
+ NSArray *roots = [systemRootClass knownRoots];
for (DTiPhoneSimulatorSystemRoot *root in roots) {
NSString *v = [root sdkVersion];
if ([v isEqualToString:ver]) {
@@ -491,7 +563,7 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
} else if (strcmp(argv[i], "--env") == 0) {
i++;
NSString *envFilePath = [[NSString stringWithUTF8String:argv[i]] expandPath];
- environment = [NSDictionary dictionaryWithContentsOfFile:envFilePath];
+ [environment setValuesForKeysWithDictionary:[NSDictionary dictionaryWithContentsOfFile:envFilePath]];
if (!environment) {
fprintf(stdout, "<msg>Could not read environment from file: %s</msg>\n", argv[i]);
[self printUsage];
@@ -502,9 +574,13 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
stdoutPath = [[NSString stringWithUTF8String:argv[i]] expandPath];
NSLog(@"stdoutPath: %@", stdoutPath);
} else if (strcmp(argv[i], "--stderr") == 0) {
- i++;
- stderrPath = [[NSString stringWithUTF8String:argv[i]] expandPath];
- NSLog(@"stderrPath: %@", stderrPath);
+ i++;
+ stderrPath = [[NSString stringWithUTF8String:argv[i]] expandPath];
+ NSLog(@"stderrPath: %@", stderrPath);
+ } else if (strcmp(argv[i], "--xctest") == 0) {
+ i++;
+ xctest = [[NSString stringWithUTF8String:argv[i]] expandPath];
+ NSLog(@"xctest: %@", xctest);
} else if (strcmp(argv[i], "--retina") == 0) {
retinaDevice = YES;
} else if (strcmp(argv[i], "--tall") == 0) {
@@ -513,7 +589,7 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
i++;
break;
} else {
- printf("<msg>unrecognized argument:%s</msg>\n", argv[i]);
+ fprintf(stdout, "<msg>unrecognized argument:%s</msg>\n", argv[i]);
[self printUsage];
[self doExit:EXIT_FAILURE];
return;
@@ -525,13 +601,19 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
}
if (sdkRoot == nil) {
- id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot");
- if (tClass == nil) {
- nsprintf(@"<msg>DTiPhoneSimulatorSystemRoot class is nil.</msg>");
- [self doExit:EXIT_FAILURE];
- return;
- }
- sdkRoot = [tClass defaultRoot];
+ [self LoadSimulatorFramework:developerDir];
+ Class systemRootClass = [self FindClassByName:@"DTiPhoneSimulatorSystemRoot"];
+ sdkRoot = [systemRootClass defaultRoot];
+ }
+ if (xctest) {
+ NSString *appName = [appPath lastPathComponent];
+ NSString *executableName = [appName stringByDeletingPathExtension];
+ NSString *injectionPath = @"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection";
+ [environment setValuesForKeysWithDictionary:@{
+ @"DYLD_INSERT_LIBRARIES" : injectionPath,
+ @"XCInjectBundle" : xctest,
+ @"XCInjectBundleInto" : [appPath stringByAppendingFormat:@"/%@", executableName],
+ }];
}
/* Don't exit, adds to runloop */
@@ -556,7 +638,7 @@ NSString *deviceIpadRetina = @"iPad (Retina)";
printf("%s\n", IOS_SIM_VERSION);
[self doExit:EXIT_SUCCESS];
} else {
- fprintf(stdout, "<msg>Unknown command</msg>\n");
+ fprintf(stderr, "Unknown command\n");
[self printUsage];
[self doExit:EXIT_FAILURE];
}
diff --git a/src/tools/3rdparty/iossim/main.mm b/src/tools/3rdparty/iossim/main.mm
index 29b67c5c33..b8f778be27 100644
--- a/src/tools/3rdparty/iossim/main.mm
+++ b/src/tools/3rdparty/iossim/main.mm
@@ -5,69 +5,24 @@
* See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
*/
/* derived from https://github.com/phonegap/ios-sim */
+
#import <AppKit/AppKit.h>
-#import "iphonesimulator.h"
-#include <QLibrary>
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-#include <QApplication>
-#else
-#include <QGuiApplication>
-#endif
-#include <QString>
-#include <QStringList>
-/* to do:
- * - try to stop inferior when killed (or communicate with creator to allow killing the inferior)
- * - remove unneeded functionality and streamline a bit
- */
+#import "iphonesimulator.h"
/*
* Runs the iPhoneSimulator backed by a main runloop.
*/
int main (int argc, char *argv[]) {
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- QApplication a(argc, argv);
-#else
- QGuiApplication a(argc, argv);
-#endif
-
-
- //NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- QString xcodePath = QLatin1String("/Applications/Xcode.app/Contents/Developer/");
- for (int i = 0; i + 1 < argc; ++i) {
- if (strcmp(argv[i], "--developer-path") == 0)
- xcodePath = QCoreApplication::arguments().at(i+1);
- }
- if (!xcodePath.endsWith(QLatin1Char('/')))
- xcodePath.append(QLatin1Char('/'));
-
- /* manual loading of the private deps */
- QStringList deps = QStringList()
- << QLatin1String("/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols")
- << QLatin1String("/System/Library/PrivateFrameworks/CoreSymbolication.framework/CoreSymbolication")
- << (xcodePath + QLatin1String("../OtherFrameworks/DevToolsFoundation.framework/DevToolsFoundation"));
- foreach (const QString &libPath, deps) {
- QLibrary *lib = new QLibrary(libPath);
- //lib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
- if (!lib->load())
- printf("<msg>error loading %s</msg>", libPath.toUtf8().constData());
- }
- QLibrary *libIPhoneSimulatorRemoteClient = new QLibrary(xcodePath
- + QLatin1String("Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/iPhoneSimulatorRemoteClient"));
- //libIPhoneSimulatorRemoteClient->setLoadHints(QLibrary::ResolveAllSymbolsHint|QLibrary::ExportExternalSymbolsHint);
- if (!libIPhoneSimulatorRemoteClient->load())
- printf("<msg>error loading iPhoneSimulatorRemoteClient</msg>");
-
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
iPhoneSimulator *sim = [[iPhoneSimulator alloc] init];
-
+
/* Execute command line handler */
[sim runWithArgc: argc argv: argv];
/* Run the loop to handle added input sources, if any */
+ [[NSRunLoop mainRunLoop] run];
- int res = a.exec();
- exit(res);
- // [pool release];
+ [pool release];
return 0;
}
diff --git a/src/tools/3rdparty/iossim/nsprintf.mm b/src/tools/3rdparty/iossim/nsprintf.mm
index b7413f593c..95c12c785f 100644
--- a/src/tools/3rdparty/iossim/nsprintf.mm
+++ b/src/tools/3rdparty/iossim/nsprintf.mm
@@ -24,7 +24,7 @@ int nsfprintf (FILE *stream, NSString *format, ...) {
va_start(ap, format);
{
retval = nsvfprintf(stream, format, ap);
- }
+ }
va_end(ap);
return retval;
@@ -37,7 +37,7 @@ int nsprintf (NSString *format, ...) {
va_start(ap, format);
{
retval = nsvfprintf(stdout, format, ap);
- }
+ }
va_end(ap);
return retval;
diff --git a/src/tools/3rdparty/iossim/nsstringexpandpath.mm b/src/tools/3rdparty/iossim/nsstringexpandpath.mm
index 53f43e3c12..b36481b504 100644
--- a/src/tools/3rdparty/iossim/nsstringexpandpath.mm
+++ b/src/tools/3rdparty/iossim/nsstringexpandpath.mm
@@ -1,5 +1,5 @@
/*
- * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ * See the LICENSE file for the license on the source code in this file.
*/
#import "nsstringexpandpath.h"
diff --git a/src/tools/3rdparty/iossim/version.h b/src/tools/3rdparty/iossim/version.h
index 9f8c0dfc91..d22dd94b8e 100644
--- a/src/tools/3rdparty/iossim/version.h
+++ b/src/tools/3rdparty/iossim/version.h
@@ -1 +1 @@
-#define IOS_SIM_VERSION "1.8.2m"
+#define IOS_SIM_VERSION "1.9.0"
diff --git a/src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE b/src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE
new file mode 100644
index 0000000000..162622f1db
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE
@@ -0,0 +1,31 @@
+Author: Landon Fuller <landonf@plausiblelabs.com>
+Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Modifications made by the following entities are licensed as above:
+- Jeff Haynie, Appcelerator, Inc.
+- https://github.com/hborders
+- http://pivotallabs.com/users/scoward/blog
+- Eloy Duran, Fingertips <eloy@fngtps.com>
+- Fawzi Mohamed, digia <fawzi.mohamed@digia.com>
diff --git a/src/tools/3rdparty/iossim_1_8_2/Info.plist b/src/tools/3rdparty/iossim_1_8_2/Info.plist
new file mode 100644
index 0000000000..bc69bf3873
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/Info.plist
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.qt-project.qt-creator.iosTool</string>
+ <key>LSUIElement</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/src/tools/3rdparty/iossim_1_8_2/iossim.qbs b/src/tools/3rdparty/iossim_1_8_2/iossim.qbs
new file mode 100644
index 0000000000..1b96084e17
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/iossim.qbs
@@ -0,0 +1,30 @@
+import qbs 1.0
+import QtcTool
+
+
+QtcTool {
+ name: "iossim"
+ condition: qbs.targetOS.contains("osx")
+
+ Depends { name: "Qt"; submodules: ["widgets"] }
+ Depends { name: "app_version_header" }
+
+ files: [
+ "main.mm",
+ "nsprintf.mm",
+ "nsstringexpandpath.mm",
+ "iphonesimulator.mm",
+ "iphonesimulator.h",
+ "nsprintf.h",
+ "nsstringexpandpath.h",
+ "version.h",
+ "iphonesimulatorremoteclient/iphonesimulatorremoteclient.h"
+ ]
+ cpp.linkerFlags: base.concat(["-sectcreate", "__TEXT", "__info_plist", path + "/Info.plist",
+ "-fobjc-link-runtime"])
+ cpp.frameworks: base.concat(["Foundation", "CoreServices", "ApplicationServices", "IOKit",
+ "AppKit"])
+ cpp.frameworkPaths: base.concat("/System/Library/PrivateFrameworks")
+
+ toolInstallDir: project.ide_libexec_path + "/ios"
+}
diff --git a/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro b/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro
new file mode 100644
index 0000000000..9e30307406
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro
@@ -0,0 +1,55 @@
+CONFIG += console
+
+QT += core
+QT += gui
+
+CONFIG -= app_bundle
+
+include(../../../../qtcreator.pri)
+
+# Prevent from popping up in the dock when launched.
+# We embed the Info.plist file, so the application doesn't need to
+# be a bundle.
+QMAKE_LFLAGS += -sectcreate __TEXT __info_plist \"$$PWD/Info.plist\" \
+ -fobjc-link-runtime
+
+LIBS += \
+ -framework Foundation \
+ -framework CoreServices \
+ -framework ApplicationServices \
+ -framework CoreFoundation \
+ -F/System/Library/PrivateFrameworks \
+ -framework IOKit -framework AppKit
+
+iPhoneSimulatorRemoteClientDirectLinking {
+ LIBS += \
+ -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \
+ -F/Applications/Xcode.app/Contents/OtherFrameworks
+ LIBS += \
+ -framework iPhoneSimulatorRemoteClient
+ QMAKE_RPATHDIR += /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \
+ /Applications/Xcode.app/Contents/OtherFrameworks
+ /System/Library/PrivateFrameworks \
+}
+
+TEMPLATE = app
+
+# put into a subdir, so we can deploy a separate qt.conf for it
+DESTDIR = $$IDE_LIBEXEC_PATH/ios
+include(../../../rpath.pri)
+
+OBJECTIVE_SOURCES += \
+ main.mm \
+ nsprintf.mm \
+ nsstringexpandPath.mm \
+ iphonesimulator.mm
+
+HEADERS += \
+ iphonesimulator.h \
+ nsprintf.h \
+ nsstringexpandpath.h \
+ version.h \
+ iphonesimulatorremoteclient/iphonesimulatorremoteclient.h
+
+OTHER_FILES = IOSSIM_LICENSE \
+ Info.plist
diff --git a/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h b/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h
new file mode 100644
index 0000000000..0770c50ee3
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h
@@ -0,0 +1,41 @@
+/* Author: Landon Fuller <landonf@plausiblelabs.com>
+ * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
+ * All rights reserved.
+ *
+ * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ */
+
+#import <Foundation/Foundation.h>
+#import "iphonesimulatorremoteclient/iphonesimulatorremoteclient.h"
+#import "version.h"
+
+@interface iPhoneSimulator : NSObject <DTiPhoneSimulatorSessionDelegate> {
+@private
+ DTiPhoneSimulatorSystemRoot *sdkRoot;
+ NSFileHandle *stdoutFileHandle;
+ NSFileHandle *stderrFileHandle;
+ DTiPhoneSimulatorSession *session;
+ NSTimer *pidCheckingTimer;
+ BOOL startOnly;
+ BOOL exitOnStartup;
+ BOOL shouldWaitDebugger;
+ BOOL shouldStartDebugger;
+ BOOL useGDB;
+ BOOL verbose;
+ BOOL alreadyPrintedData;
+ BOOL retinaDevice;
+ BOOL tallDevice;
+}
+
+- (id)init;
+- (void)dealloc;
+- (void)runWithArgc:(int)argc argv:(char **)argv;
+
+- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path;
+- (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path;
+- (void)stop;
+- (void)checkPid:(NSTimer *)timer;
+- (void)doExit:(int)errorCode;
+- (void)changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice;
+
+@end
diff --git a/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm b/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm
new file mode 100644
index 0000000000..b06b54276d
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm
@@ -0,0 +1,566 @@
+/* Author: Landon Fuller <landonf@plausiblelabs.com>
+ * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
+ * All rights reserved.
+ *
+ * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ */
+
+#import "iphonesimulator.h"
+#import "nsstringexpandpath.h"
+#import "nsprintf.h"
+#import <sys/types.h>
+#import <sys/stat.h>
+#import <objc/runtime.h>
+#import <AppKit/NSRunningApplication.h>
+
+NSString *simulatorPrefrencesName = @"com.apple.iphonesimulator";
+NSString *deviceProperty = @"SimulateDevice";
+NSString *deviceIphoneRetina3_5Inch = @"iPhone Retina (3.5-inch)";
+NSString *deviceIphoneRetina4_0Inch = @"iPhone Retina (4-inch)";
+NSString *deviceIphone = @"iPhone";
+NSString *deviceIpad = @"iPad";
+NSString *deviceIpadRetina = @"iPad (Retina)";
+
+/**
+ * A simple iPhoneSimulatorRemoteClient framework.
+ */
+@implementation iPhoneSimulator
+
+- (id)init {
+ self = [super init];
+ session = nil;
+ pidCheckingTimer = nil;
+ return self;
+}
+
+- (void)dealloc {
+ [session release];
+ [pidCheckingTimer release];
+ [super dealloc];
+}
+
+- (void)doExit:(int)errorCode {
+ nsprintf(@"<exit code=\"%d\"/>", errorCode);
+ nsprintf(@"</query_result>");
+ fflush(stdout);
+ fflush(stderr);
+ exit(errorCode);
+}
+
+- (void) printUsage {
+ fprintf(stdout, "<msg>Usage: iossim <command> <options> [--args ...]\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Commands:\n");
+ fprintf(stdout, " showsdks List the available iOS SDK versions\n");
+ fprintf(stdout, " launch <application path> Launch the application at the specified path on the iOS Simulator\n");
+ fprintf(stdout, " start Launch iOS Simulator without an app\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Options:\n");
+ fprintf(stdout, " --version Print the version of ios-sim\n");
+ fprintf(stdout, " --developer-path <developerDir> path to the developer directory (in Xcode)");
+ fprintf(stdout, " --help Show this help text\n");
+ fprintf(stdout, " --verbose Set the output level to verbose\n");
+ fprintf(stdout, " --exit Exit after startup\n");
+ fprintf(stdout, " --wait-for-debugger Wait for debugger to attach\n");
+ fprintf(stdout, " --debug Attach LLDB to the application on startup\n");
+ fprintf(stdout, " --use-gdb Use GDB instead of LLDB. (Requires --debug)\n");
+ fprintf(stdout, " --sdk <sdkversion> The iOS SDK version to run the application on (defaults to the latest)\n");
+ fprintf(stdout, " --family <device family> The device type that should be simulated (defaults to `iphone')\n");
+ fprintf(stdout, " --retina Start a retina device\n");
+ fprintf(stdout, " --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch))\n");
+ fprintf(stdout, " --uuid <uuid> A UUID identifying the session (is that correct?)\n");
+ fprintf(stdout, " --env <environment file path> A plist file containing environment key-value pairs that should be set\n");
+ fprintf(stdout, " --setenv NAME=VALUE Set an environment variable\n");
+ fprintf(stdout, " --stdout <stdout file path> The path where stdout of the simulator will be redirected to (defaults to stdout of ios-sim)\n");
+ fprintf(stdout, " --stderr <stderr file path> The path where stderr of the simulator will be redirected to (defaults to stderr of ios-sim)\n");
+ fprintf(stdout, " --timeout <seconds> The timeout time to wait for a response from the Simulator. Default value: 30 seconds\n");
+ fprintf(stdout, " --args <...> All following arguments will be passed on to the application</msg>\n");
+ fflush(stdout);
+}
+
+
+- (int) showSDKs {
+ NSUInteger i;
+ id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot");
+ if (tClass == nil) {
+ nsprintf(@"<msg>DTiPhoneSimulatorSystemRoot class is nil.</msg>");
+ return EXIT_FAILURE;
+ }
+ NSArray *roots = [tClass knownRoots];
+
+ nsprintf(@"<device_info>");
+ for (i = 0; i < [roots count]; ++i) {
+ DTiPhoneSimulatorSystemRoot *root = [roots objectAtIndex:i];
+ nsprintf(@"<item><key>sdk%d_name</key><value>%@</value></item>", i, [root sdkDisplayName]);
+ nsprintf(@"<item><key>sdk%d_version</key><value>%@</value></item>", i, [root sdkVersion]);
+ nsprintf(@"<item><key>sdk%d_sysroot</key><value>%@</value></item>", i, [root sdkRootPath]);
+ }
+ nsprintf(@"</device_info>");
+ return EXIT_SUCCESS;
+}
+
+
+- (void)session:(DTiPhoneSimulatorSession *)mySession didEndWithError:(NSError *)error {
+ if (verbose) {
+ nsprintf(@"<msg>Session did end with error %@</msg>", error);
+ }
+
+ if (stderrFileHandle != nil) {
+ NSString *stderrPath = [[mySession sessionConfig] simulatedApplicationStdErrPath];
+ [self removeStdioFIFO:stderrFileHandle atPath:stderrPath];
+ }
+
+ if (stdoutFileHandle != nil) {
+ NSString *stdoutPath = [[mySession sessionConfig] simulatedApplicationStdOutPath];
+ [self removeStdioFIFO:stdoutFileHandle atPath:stdoutPath];
+ }
+
+ if (error != nil)
+ [self doExit:EXIT_FAILURE];
+ else
+ [self doExit:EXIT_SUCCESS];
+}
+
+
+- (void)session:(DTiPhoneSimulatorSession *)mySession didStart:(BOOL)started withError:(NSError *)error {
+ if (startOnly && mySession) {
+ [NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript"
+ arguments:[NSArray arrayWithObjects:@"-e", @"tell application \"iPhone Simulator\" to activate", nil]];
+ nsprintf(@"<msg>Simulator started (no session)</msg>");
+ [self doExit:EXIT_SUCCESS];
+ return;
+ }
+ if (started) {
+ [NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript"
+ arguments:[NSArray arrayWithObjects:@"-e", @"tell application \"iPhone Simulator\" to activate", nil]];
+ if (shouldStartDebugger) {
+ char*args[4] = { NULL, NULL, (char*)[[[mySession simulatedApplicationPID] description] UTF8String], NULL };
+ if (useGDB) {
+ args[0] = strdup("gdb");
+ args[1] = strdup("program");
+ } else {
+ args[0] = strdup("lldb");
+ args[1] = strdup("--attach-pid");
+ }
+ // The parent process must live on to process the stdout/stderr fifos,
+ // so start the debugger as a child process.
+ pid_t child_pid = fork();
+ if (child_pid == 0) {
+ execvp(args[0], args);
+ } else if (child_pid < 0) {
+ nsprintf(@"<msg>Could not start debugger process: %@</msg>", errno);
+ [self doExit:EXIT_FAILURE];
+ return;
+ }
+ }
+ if (verbose) {
+ nsprintf(@"<msg>Session started</msg>");
+ }
+ nsprintf(@"<inferior_pid>%@</inferior_pid>", [session simulatedApplicationPID]);
+ fflush(stdout);
+ if (exitOnStartup) {
+ [self doExit:EXIT_SUCCESS];
+ return;
+ }
+ pidCheckingTimer = [[NSTimer scheduledTimerWithTimeInterval:5.0 target:self
+ selector:@selector(checkPid:) userInfo:nil repeats: TRUE] retain];
+ } else {
+ nsprintf(@"<msg>Session could not be started: %@</msg>", error);
+ [self doExit:EXIT_FAILURE];
+ }
+}
+
+- (void)stop {
+ if (session)
+ [session requestEndWithTimeout: 0.1];
+}
+
+- (void)checkPid:(NSTimer *)timer {
+ (void)timer;
+ if (session && [[session simulatedApplicationPID]intValue] > 0) {
+ if (kill((pid_t)[[session simulatedApplicationPID]intValue], 0) == -1) {
+ nsprintf(@"<msg>app stopped</msg>");
+ [self doExit:EXIT_SUCCESS];
+ return;
+ }
+ }
+}
+- (void)stdioDataIsAvailable:(NSNotification *)notification {
+ [[notification object] readInBackgroundAndNotify];
+ NSData *data = [[notification userInfo] valueForKey:NSFileHandleNotificationDataItem];
+ NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; /* dangerous if partially encoded data is at the boundary */
+ if (!alreadyPrintedData) {
+ if ([str length] == 0) {
+ return;
+ } else {
+ alreadyPrintedData = YES;
+ }
+ }
+ if ([notification object] == stdoutFileHandle) {
+ printf("<app_output>%s</app_output>\n", [str UTF8String]);
+ } else {
+ nsprintf(@"<app_output>%@</app_output>", str); // handle stderr differently?
+ }
+ fflush(stdout);
+}
+
+
+- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path {
+ *path = [NSString stringWithFormat:@"%@/ios-sim-%@-pipe-%d", NSTemporaryDirectory(), type, (int)time(NULL)];
+ if (mkfifo([*path UTF8String], S_IRUSR | S_IWUSR) == -1) {
+ nsprintf(@"<msg>Unable to create %@ named pipe `%@'</msg>", type, *path);
+ [self doExit:EXIT_FAILURE];
+ } else {
+ if (verbose) {
+ nsprintf(@"<msg>Creating named pipe at `%@'</msg>", *path);
+ }
+ int fd = open([*path UTF8String], O_RDONLY | O_NDELAY);
+ *fileHandle = [[[NSFileHandle alloc] initWithFileDescriptor:fd] retain];
+ [*fileHandle readInBackgroundAndNotify];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(stdioDataIsAvailable:)
+ name:NSFileHandleReadCompletionNotification
+ object:*fileHandle];
+ }
+}
+
+
+- (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path {
+ if (verbose) {
+ nsprintf(@"<msg>Removing named pipe at `%@'</msg>", path);
+ }
+ [fileHandle closeFile];
+ [fileHandle release];
+ if (![[NSFileManager defaultManager] removeItemAtPath:path error:NULL]) {
+ nsprintf(@"<msg>Unable to remove named pipe `%@'</msg>", path);
+ }
+}
+
+
+- (int)launchApp:(NSString *)path withFamily:(NSString *)family
+ uuid:(NSString *)uuid
+ environment:(NSDictionary *)environment
+ stdoutPath:(NSString *)stdoutPath
+ stderrPath:(NSString *)stderrPath
+ timeout:(NSTimeInterval)timeout
+ args:(NSArray *)args {
+ DTiPhoneSimulatorApplicationSpecifier *appSpec;
+ DTiPhoneSimulatorSessionConfig *config;
+ NSError *error = 0;
+ id tClass;
+
+ NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease];
+ if (!startOnly && ![fileManager fileExistsAtPath:path]) {
+ nsprintf(@"<msg>Application path %@ doesn't exist!</msg>", path);
+ return EXIT_FAILURE;
+ }
+
+ /* Create the app specifier */
+ tClass = objc_getClass("DTiPhoneSimulatorApplicationSpecifier");
+ if (tClass == nil) {
+ nsprintf(@"<msg>DTiPhoneSimulatorApplicationSpecifier class is nil.</msg>");
+ return EXIT_FAILURE;
+ }
+ appSpec = startOnly ? nil : [tClass specifierWithApplicationPath:path];
+
+ if (verbose) {
+ nsprintf(@"<msg>App Spec: %@</msg>", appSpec);
+ nsprintf(@"SDK Root: %@", sdkRoot);
+
+ for (id key in environment) {
+ nsprintf(@"<msg>Env: %@ = %@</msg>", key, [environment objectForKey:key]);
+ }
+ }
+
+
+ NSString *sdkVersion = [sdkRoot sdkVersion];
+ NSString *appSupportDir = [NSString stringWithFormat:@"%@/Library/Application Support/iPhone Simulator/%@",
+ NSHomeDirectory(), sdkVersion];
+ NSMutableDictionary *mutableEnv = [NSMutableDictionary dictionaryWithDictionary:environment];
+ [mutableEnv setObject:appSupportDir forKey:@"CFFIXED_USER_HOME"];
+ [mutableEnv setObject:appSupportDir forKey:@"IPHONE_SHARED_RESOURCES_DIRECTORY"];
+ [mutableEnv setObject:appSupportDir forKey:@"HOME"];
+ [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"IPHONE_SIMULATOR_ROOT"];
+ [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_ROOT_PATH"];
+ [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_FRAMEWORK_PATH"];
+ [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_LIBRARY_PATH"];
+ [mutableEnv setObject:@"YES" forKey:@"NSUnbufferedIO"];
+ environment = mutableEnv;
+
+ /* Set up the session configuration */
+ tClass = objc_getClass("DTiPhoneSimulatorSessionConfig");
+ if (tClass == nil) {
+ nsprintf(@"<msg>DTiPhoneSimulatorApplicationSpecifier class is nil.</msg>");
+ return EXIT_FAILURE;
+ }
+ config = [[[tClass alloc] init] autorelease];
+ [config setApplicationToSimulateOnStart:appSpec];
+ [config setSimulatedSystemRoot:sdkRoot];
+ [config setSimulatedApplicationShouldWaitForDebugger:shouldWaitDebugger];
+
+ [config setSimulatedApplicationLaunchArgs:args];
+ [config setSimulatedApplicationLaunchEnvironment:environment];
+
+ if (stderrPath) {
+ stderrFileHandle = nil;
+ } else if (!exitOnStartup) {
+ [self createStdioFIFO:&stderrFileHandle ofType:@"stderr" atPath:&stderrPath];
+ }
+ [config setSimulatedApplicationStdErrPath:stderrPath];
+
+ if (stdoutPath) {
+ stdoutFileHandle = nil;
+ } else if (!exitOnStartup) {
+ [self createStdioFIFO:&stdoutFileHandle ofType:@"stdout" atPath:&stdoutPath];
+ }
+ [config setSimulatedApplicationStdOutPath:stdoutPath];
+
+ [config setLocalizedClientName: @"iossim"];
+
+ // this was introduced in 3.2 of SDK
+ if ([config respondsToSelector:@selector(setSimulatedDeviceFamily:)]) {
+ if (family == nil) {
+ family = @"iphone";
+ }
+
+ if (verbose) {
+ nsprintf(@"using device family %@",family);
+ }
+
+ if ([family isEqualToString:@"ipad"]) {
+[config setSimulatedDeviceFamily:[NSNumber numberWithInt:2]];
+ } else{
+ [config setSimulatedDeviceFamily:[NSNumber numberWithInt:1]];
+ }
+ }
+
+ [self changeDeviceType:family retina:retinaDevice isTallDevice:tallDevice];
+
+ /* Start the session */
+ tClass = objc_getClass("DTiPhoneSimulatorSession");
+ if (tClass == nil) {
+ nsprintf(@"<msg>DTiPhoneSimulatorSession class is nil.</msg>");
+ return EXIT_FAILURE;
+ }
+ session = [[tClass alloc] init];
+ [session setDelegate:self];
+ if (uuid != nil){
+ [session setUuid:uuid];
+ }
+
+ if (![session requestStartWithConfig:config timeout:timeout error:&error]) {
+ nsprintf(@"<msg>Could not start simulator session: %@</msg>", error);
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+
+- (void) changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice {
+ NSString *devicePropertyValue;
+ if (retina) {
+ if (verbose) {
+ nsprintf(@"<msg>using retina</msg>");
+ }
+ if ([family isEqualToString:@"ipad"]) {
+ devicePropertyValue = deviceIpadRetina;
+ }
+ else {
+ if (isTallDevice) {
+ devicePropertyValue = deviceIphoneRetina4_0Inch;
+ } else {
+ devicePropertyValue = deviceIphoneRetina3_5Inch;
+ }
+ }
+ } else {
+ if ([family isEqualToString:@"ipad"]) {
+ devicePropertyValue = deviceIpad;
+ } else {
+ devicePropertyValue = deviceIphone;
+ }
+ }
+ CFPreferencesSetAppValue((CFStringRef)deviceProperty, (CFPropertyListRef)devicePropertyValue, (CFStringRef)simulatorPrefrencesName);
+ CFPreferencesAppSynchronize((CFStringRef)simulatorPrefrencesName);
+}
+
+
+/**
+ * Execute 'main'
+ */
+- (void)runWithArgc:(int)argc argv:(char **)argv {
+ if (argc < 2) {
+ [self printUsage];
+ exit(EXIT_FAILURE);
+ }
+
+ retinaDevice = NO;
+ tallDevice = NO;
+ exitOnStartup = NO;
+ alreadyPrintedData = NO;
+ startOnly = strcmp(argv[1], "start") == 0;
+ nsprintf(@"<query_result>");
+
+ if (strcmp(argv[1], "showsdks") == 0) {
+ [self doExit:[self showSDKs]];
+ return;
+ } else if (strcmp(argv[1], "launch") == 0 || startOnly) {
+ if (strcmp(argv[1], "launch") == 0 && argc < 3) {
+ nsprintf(@"<msg>Missing application path argument</msg>");
+ [self printUsage];
+ [self doExit:EXIT_FAILURE];
+ return;
+ }
+
+ NSString *appPath = nil;
+ int argOffset;
+ if (startOnly) {
+ argOffset = 2;
+ }
+ else {
+ argOffset = 3;
+ appPath = [[NSString stringWithUTF8String:argv[2]] expandPath];
+ }
+
+ NSString *family = nil;
+ NSString *uuid = nil;
+ NSString *stdoutPath = nil;
+ NSString *stderrPath = nil;
+ NSTimeInterval timeout = 30;
+ NSMutableDictionary *environment = [NSMutableDictionary dictionary];
+
+ int i = argOffset;
+ for (; i < argc; i++) {
+ if (strcmp(argv[i], "--version") == 0) {
+ printf("%s\n", IOS_SIM_VERSION);
+ exit(EXIT_SUCCESS);
+ } else if (strcmp(argv[i], "--help") == 0) {
+ [self printUsage];
+ exit(EXIT_SUCCESS);
+ } else if (strcmp(argv[i], "--verbose") == 0) {
+ verbose = YES;
+ } else if (strcmp(argv[i], "--exit") == 0) {
+ exitOnStartup = YES;
+ } else if (strcmp(argv[i], "--wait-for-debugger") == 0) {
+ shouldWaitDebugger = YES;
+ } else if (strcmp(argv[i], "--debug") == 0) {
+ shouldWaitDebugger = YES;
+ shouldStartDebugger = YES;
+ } else if (strcmp(argv[i], "--use-gdb") == 0) {
+ useGDB = YES;
+ } else if (strcmp(argv[i], "--developer-path") == 0) {
+ ++i;
+ } else if (strcmp(argv[i], "--timeout") == 0) {
+ if (i + 1 < argc) {
+ timeout = [[NSString stringWithUTF8String:argv[++i]] doubleValue];
+ NSLog(@"<msg>Timeout: %f second(s)</msg>", timeout);
+ }
+ }
+ else if (strcmp(argv[i], "--sdk") == 0) {
+ i++;
+ NSString* ver = [NSString stringWithCString:argv[i] encoding:NSUTF8StringEncoding];
+ id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot");
+ NSArray *roots;
+ if (tClass == nil) {
+ nsprintf(@"<msg>DTiPhoneSimulatorSystemRoot class is nil.</msg>");
+ [self doExit:EXIT_FAILURE];
+ return;
+ }
+ roots = [tClass knownRoots];
+ for (DTiPhoneSimulatorSystemRoot *root in roots) {
+ NSString *v = [root sdkVersion];
+ if ([v isEqualToString:ver]) {
+ sdkRoot = root;
+ break;
+ }
+ }
+ if (sdkRoot == nil) {
+ fprintf(stdout,"<msg>Unknown or unsupported SDK version: %s</msg>\n",argv[i]);
+ [self showSDKs];
+ exit(EXIT_FAILURE);
+ }
+ } else if (strcmp(argv[i], "--family") == 0) {
+ i++;
+ family = [NSString stringWithUTF8String:argv[i]];
+ } else if (strcmp(argv[i], "--uuid") == 0) {
+ i++;
+ uuid = [NSString stringWithUTF8String:argv[i]];
+ } else if (strcmp(argv[i], "--setenv") == 0) {
+ i++;
+ NSArray *parts = [[NSString stringWithUTF8String:argv[i]] componentsSeparatedByString:@"="];
+ [environment setObject:[parts objectAtIndex:1] forKey:[parts objectAtIndex:0]];
+ } else if (strcmp(argv[i], "--env") == 0) {
+ i++;
+ NSString *envFilePath = [[NSString stringWithUTF8String:argv[i]] expandPath];
+ environment = [NSDictionary dictionaryWithContentsOfFile:envFilePath];
+ if (!environment) {
+ fprintf(stdout, "<msg>Could not read environment from file: %s</msg>\n", argv[i]);
+ [self printUsage];
+ exit(EXIT_FAILURE);
+ }
+ } else if (strcmp(argv[i], "--stdout") == 0) {
+ i++;
+ stdoutPath = [[NSString stringWithUTF8String:argv[i]] expandPath];
+ NSLog(@"stdoutPath: %@", stdoutPath);
+ } else if (strcmp(argv[i], "--stderr") == 0) {
+ i++;
+ stderrPath = [[NSString stringWithUTF8String:argv[i]] expandPath];
+ NSLog(@"stderrPath: %@", stderrPath);
+ } else if (strcmp(argv[i], "--retina") == 0) {
+ retinaDevice = YES;
+ } else if (strcmp(argv[i], "--tall") == 0) {
+ tallDevice = YES;
+ } else if (strcmp(argv[i], "--args") == 0) {
+ i++;
+ break;
+ } else {
+ printf("<msg>unrecognized argument:%s</msg>\n", argv[i]);
+ [self printUsage];
+ [self doExit:EXIT_FAILURE];
+ return;
+ }
+ }
+ NSMutableArray *args = [NSMutableArray arrayWithCapacity:MAX(argc - i,0)];
+ for (; i < argc; i++) {
+ [args addObject:[NSString stringWithUTF8String:argv[i]]];
+ }
+
+ if (sdkRoot == nil) {
+ id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot");
+ if (tClass == nil) {
+ nsprintf(@"<msg>DTiPhoneSimulatorSystemRoot class is nil.</msg>");
+ [self doExit:EXIT_FAILURE];
+ return;
+ }
+ sdkRoot = [tClass defaultRoot];
+ }
+
+ /* Don't exit, adds to runloop */
+ int res = [self launchApp:appPath
+ withFamily:family
+ uuid:uuid
+ environment:environment
+ stdoutPath:stdoutPath
+ stderrPath:stderrPath
+ timeout:timeout
+ args:args];
+ nsprintf(@"<app_started status=\"%@\" />", ((res == 0) ? @"SUCCESS" : @"FAILURE"));
+ fflush(stdout);
+ fflush(stderr);
+ if (res != 0)
+ [self doExit:EXIT_FAILURE];
+ } else {
+ if (argc == 2 && strcmp(argv[1], "--help") == 0) {
+ [self printUsage];
+ [self doExit:EXIT_SUCCESS];
+ } else if (argc == 2 && strcmp(argv[1], "--version") == 0) {
+ printf("%s\n", IOS_SIM_VERSION);
+ [self doExit:EXIT_SUCCESS];
+ } else {
+ fprintf(stdout, "<msg>Unknown command</msg>\n");
+ [self printUsage];
+ [self doExit:EXIT_FAILURE];
+ }
+ }
+}
+
+@end
diff --git a/src/tools/3rdparty/iossim/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h b/src/tools/3rdparty/iossim_1_8_2/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h
index abf69c8067..abf69c8067 100644
--- a/src/tools/3rdparty/iossim/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h
+++ b/src/tools/3rdparty/iossim_1_8_2/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h
diff --git a/src/tools/3rdparty/iossim_1_8_2/main.mm b/src/tools/3rdparty/iossim_1_8_2/main.mm
new file mode 100644
index 0000000000..fb83dc3e19
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/main.mm
@@ -0,0 +1,77 @@
+/* Author: Landon Fuller <landonf@plausiblelabs.com>
+ * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc.
+ * All rights reserved.
+ *
+ * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ */
+/* derived from https://github.com/phonegap/ios-sim */
+#import <AppKit/AppKit.h>
+#import "iphonesimulator.h"
+#include <QLibrary>
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+#include <QApplication>
+#else
+#include <QGuiApplication>
+#endif
+#include <QString>
+#include <QStringList>
+
+/* to do:
+ * - try to stop inferior when killed (or communicate with creator to allow killing the inferior)
+ * - remove unneeded functionality and streamline a bit
+ */
+
+/*
+ * Runs the iPhoneSimulator backed by a main runloop.
+ */
+int main (int argc, char *argv[]) {
+ int qtargc = 1;
+ char *qtarg = 0;
+ if (argc)
+ qtarg = argv[0];
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ QApplication a(qtargc, &qtarg);
+#else
+ QGuiApplication a(qtargc, &qtarg);
+#endif
+
+
+ //NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ QString xcodePath = QLatin1String("/Applications/Xcode.app/Contents/Developer/");
+ for (int i = 0; i + 1 < argc; ++i) {
+ if (strcmp(argv[i], "--developer-path") == 0)
+ xcodePath = QString::fromLocal8Bit(argv[i + 1]);
+ }
+ if (!xcodePath.endsWith(QLatin1Char('/')))
+ xcodePath.append(QLatin1Char('/'));
+
+ /* manual loading of the private deps */
+ QStringList deps = QStringList()
+ << QLatin1String("/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols")
+ << QLatin1String("/System/Library/PrivateFrameworks/CoreSymbolication.framework/CoreSymbolication")
+ << (xcodePath + QLatin1String("../OtherFrameworks/DevToolsFoundation.framework/DevToolsFoundation"));
+ foreach (const QString &libPath, deps) {
+ QLibrary *lib = new QLibrary(libPath);
+ //lib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
+ if (!lib->load())
+ printf("<msg>error loading %s</msg>", libPath.toUtf8().constData());
+ }
+ QLibrary *libIPhoneSimulatorRemoteClient = new QLibrary(xcodePath
+ + QLatin1String("Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/iPhoneSimulatorRemoteClient"));
+ //libIPhoneSimulatorRemoteClient->setLoadHints(QLibrary::ResolveAllSymbolsHint|QLibrary::ExportExternalSymbolsHint);
+ if (!libIPhoneSimulatorRemoteClient->load())
+ printf("<msg>error loading iPhoneSimulatorRemoteClient</msg>");
+
+ iPhoneSimulator *sim = [[iPhoneSimulator alloc] init];
+
+ /* Execute command line handler */
+ [sim runWithArgc: argc argv: argv];
+
+ /* Run the loop to handle added input sources, if any */
+
+ int res = a.exec();
+ exit(res);
+ // [pool release];
+ return 0;
+}
diff --git a/src/tools/3rdparty/iossim_1_8_2/nsprintf.h b/src/tools/3rdparty/iossim_1_8_2/nsprintf.h
new file mode 100644
index 0000000000..cee7c00d28
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/nsprintf.h
@@ -0,0 +1,6 @@
+/*
+ * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ */
+int nsvfprintf (FILE *stream, NSString *format, va_list args);
+int nsfprintf (FILE *stream, NSString *format, ...);
+int nsprintf (NSString *format, ...);
diff --git a/src/tools/3rdparty/iossim_1_8_2/nsprintf.mm b/src/tools/3rdparty/iossim_1_8_2/nsprintf.mm
new file mode 100644
index 0000000000..b7413f593c
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/nsprintf.mm
@@ -0,0 +1,44 @@
+/*
+ * NSLog() clone, but writes to arbitrary output stream
+ *
+ * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ */
+
+#import <Foundation/Foundation.h>
+#import <stdio.h>
+
+int nsvfprintf (FILE *stream, NSString *format, va_list args) {
+ int retval;
+
+ NSString *str = (NSString *) CFStringCreateWithFormatAndArguments(NULL, NULL, (CFStringRef) format, args);
+ retval = fprintf(stream, "%s\n", [str UTF8String]);
+ [str release];
+
+ return retval;
+}
+
+int nsfprintf (FILE *stream, NSString *format, ...) {
+ va_list ap;
+ int retval;
+
+ va_start(ap, format);
+ {
+ retval = nsvfprintf(stream, format, ap);
+ }
+ va_end(ap);
+
+ return retval;
+}
+
+int nsprintf (NSString *format, ...) {
+ va_list ap;
+ int retval;
+
+ va_start(ap, format);
+ {
+ retval = nsvfprintf(stdout, format, ap);
+ }
+ va_end(ap);
+
+ return retval;
+}
diff --git a/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h b/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h
new file mode 100644
index 0000000000..3eed139c0e
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h
@@ -0,0 +1,11 @@
+/*
+ * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface NSString (ExpandPath)
+
+- (NSString *)expandPath;
+
+@end
diff --git a/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm b/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm
new file mode 100644
index 0000000000..53f43e3c12
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm
@@ -0,0 +1,18 @@
+/*
+ * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file.
+ */
+
+#import "nsstringexpandpath.h"
+
+@implementation NSString (ExpandPath)
+
+- (NSString *)expandPath {
+ if ([self isAbsolutePath]) {
+ return [self stringByStandardizingPath];
+ } else {
+ NSString *cwd = [[NSFileManager defaultManager] currentDirectoryPath];
+ return [[cwd stringByAppendingPathComponent:self] stringByStandardizingPath];
+ }
+}
+
+@end
diff --git a/src/tools/3rdparty/iossim_1_8_2/version.h b/src/tools/3rdparty/iossim_1_8_2/version.h
new file mode 100644
index 0000000000..9f8c0dfc91
--- /dev/null
+++ b/src/tools/3rdparty/iossim_1_8_2/version.h
@@ -0,0 +1 @@
+#define IOS_SIM_VERSION "1.8.2m"
diff --git a/src/tools/iostool/iostool.qbs b/src/tools/iostool/iostool.qbs
index abb95f0975..e2a40ad446 100644
--- a/src/tools/iostool/iostool.qbs
+++ b/src/tools/iostool/iostool.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/src/tools/qtcdebugger/qtcdebugger.qbs b/src/tools/qtcdebugger/qtcdebugger.qbs
index 1895eb917f..7358d74eb3 100644
--- a/src/tools/qtcdebugger/qtcdebugger.qbs
+++ b/src/tools/qtcdebugger/qtcdebugger.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/src/tools/qtcreatorcrashhandler/qtcreatorcrashhandler.qbs b/src/tools/qtcreatorcrashhandler/qtcreatorcrashhandler.qbs
index 2bd9b70d38..9d0bd4524b 100644
--- a/src/tools/qtcreatorcrashhandler/qtcreatorcrashhandler.qbs
+++ b/src/tools/qtcreatorcrashhandler/qtcreatorcrashhandler.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/src/tools/qtpromaker/qtpromaker.qbs b/src/tools/qtpromaker/qtpromaker.qbs
index b23fb9f0ae..63d01368bc 100644
--- a/src/tools/qtpromaker/qtpromaker.qbs
+++ b/src/tools/qtpromaker/qtpromaker.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/src/tools/sdktool/getoperation.cpp b/src/tools/sdktool/getoperation.cpp
index 1899cefa1c..2beb77f9e5 100644
--- a/src/tools/sdktool/getoperation.cpp
+++ b/src/tools/sdktool/getoperation.cpp
@@ -69,9 +69,10 @@ int GetOperation::execute() const
foreach (const QString &key, m_keys) {
const QVariant result = get(map, key);
- if (result.isValid())
- return 2;
- std::cout << qPrintable(result.toString()) << std::endl;
+ if (!result.isValid())
+ std::cout << "<invalid>" << std::endl;
+ else
+ std::cout << qPrintable(result.toString()) << std::endl;
}
return 0;
diff --git a/src/tools/sdktool/sdktool.qbs b/src/tools/sdktool/sdktool.qbs
index a917b6fe4a..72d6188052 100644
--- a/src/tools/sdktool/sdktool.qbs
+++ b/src/tools/sdktool/sdktool.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
import QtcTool
QtcTool {
diff --git a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
index efad13c5c8..4e113da9de 100644
--- a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
+++ b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
@@ -1539,7 +1539,9 @@ void tst_CheckSymbols::test_checksymbols_AnonymousClass_insideNamespace()
<< Use(13, 11, 3, CppHighlightingSupport::TypeUse)
<< Use(15, 27, 4, CppHighlightingSupport::FieldUse)
<< Use(16, 10, 4, CppHighlightingSupport::FunctionUse)
+ << Use(16, 19, 4, CppHighlightingSupport::FieldUse)
<< Use(18, 8, 4, CppHighlightingSupport::FunctionUse)
+ << Use(20, 10, 4, CppHighlightingSupport::FieldUse)
;
TestData::check(source, expectedUses);
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index f6ecd1b4be..42f9b39b54 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -3428,7 +3428,7 @@ void tst_Dumpers::dumper_data()
"unused(&a, &b);\n")
+ ForceC()
- + GdbVersion(70600)
+ + GdbVersion(70500)
+ Check("a", "0 + 0 * I", "complex double") % GdbEngine
+ Check("b", "0 + 0 * I", "complex double") % GdbEngine
@@ -4604,7 +4604,7 @@ GdbEngine
+ Check("d1", "43", "Ref1")
+ Check("a2", "\"hello\"", "std::string")
- + Check("b2", "\"bababa\"", "std::string &")
+ + Check("b2", "\"bababa\"", Pattern("(std::)?string &")) // Clang...
+ Check("c2", "\"world\"", "std::string")
+ Check("d2", "\"hello\"", "Ref2")
@@ -4894,6 +4894,18 @@ GdbEngine
+ Check("p3", "Thu Jan 1 00:00:00 1970", "boost::posix_time::ptime");
+ QTest::newRow("BoostList")
+ << Data("#include <boost/container/list.hpp>\n",
+ "typedef std::pair<int, double> p;\n"
+ "boost::container::list<p> l;\n"
+ "l.push_back(p(13, 61));\n"
+ "l.push_back(p(14, 64));\n"
+ "l.push_back(p(15, 65));\n"
+ "l.push_back(p(16, 66));\n")
+ + BoostProfile()
+ + Check("l", "<4 items>", "boost::container::list<std::pair<int,double>>")
+ + Check("l.2.second", "65", "double");
+
// // This tests qdump__KRBase in share/qtcreator/debugger/qttypes.py which uses
// // a static typeflag to dispatch to subclasses");
@@ -4957,7 +4969,7 @@ GdbEngine
"byte f = '2';\n"
"int *x = (int*)&f;\n")
+ Check("f", "'2'", "byte") % LldbEngine
- + Check("f", "50 '2'", "byte") % GdbEngine;
+ + Check("f", "50", "byte") % GdbEngine;
// https://bugreports.qt-project.org/browse/QTCREATORBUG-4904
diff --git a/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs b/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs
index c84e9fdd3d..d5ac035694 100644
--- a/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs
+++ b/tests/manual/utils/tcpportsgatherer/tcpportsgatherer.qbs
@@ -1,4 +1,4 @@
-import qbs.base 1.0
+import qbs 1.0
Application {
name: "tcpportsgatherer"
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py
index d63fa9cd4a..e4ed6209b7 100644
--- a/tests/system/shared/editor_utils.py
+++ b/tests/system/shared/editor_utils.py
@@ -324,7 +324,10 @@ def validateSearchResult(expectedCount):
rect = resultTreeView.visualRect(chIndex)
doubleClick(resultTreeView, rect.x+5, rect.y+5, 0, Qt.LeftButton)
editor = getEditorForFileSuffix(itemText)
- waitFor("lineUnderCursor(editor) == text", 2000)
+ timeout = 2000
+ if platform.system() == "Darwin":
+ timeout *= 2
+ waitFor("lineUnderCursor(editor) == text", timeout)
test.compare(lineUnderCursor(editor), text)
# this function invokes context menu and command from it
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index 50b99e63eb..101922e030 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -631,3 +631,12 @@ def verifyItemOrder(items, text):
index = text.find(item)
test.verify(index > lastIndex, "'" + item + "' found at index " + str(index))
lastIndex = index
+
+def openVcsLog():
+ if not object.exists(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"):
+ clickButton(waitForObject(":Qt Creator_Core::Internal::OutputPaneManageButton"))
+ if platform.system() == 'Darwin':
+ waitFor('macHackActivateContextMenuItem("Version Control")', 6000)
+ else:
+ activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Version Control"))
+ ensureChecked(waitForObject(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"))
diff --git a/tests/system/suite_HELP/tst_HELP02/test.py b/tests/system/suite_HELP/tst_HELP02/test.py
index 438e7127a1..03ff488ce8 100755
--- a/tests/system/suite_HELP/tst_HELP02/test.py
+++ b/tests/system/suite_HELP/tst_HELP02/test.py
@@ -57,11 +57,12 @@ def getQtCreatorVersionFromFile():
def checkQtCreatorHelpVersion(expectedVersion):
switchViewTo(ViewConstants.HELP)
try:
- creatorManual = waitForObject("{column='0' container=':Qt Creator_QHelpContentWidget' "
- "text?='Qt Creator Manual*' type='QModelIndex'}", 5000)
- test.compare(str(creatorManual.text)[18:], expectedVersion,
- "Verifying whether manual uses expected version, text is: %s" % creatorManual.text)
- except LookupError:
+ helpContentWidget = waitForObject(':Qt Creator_QHelpContentWidget', 5000)
+ items = dumpItems(helpContentWidget.model())
+ test.compare(filter(lambda x: x.startswith('Qt Creator Manual'), items)[0],
+ 'Qt Creator Manual %s' % expectedVersion,
+ 'Verifying whether manual uses expected version.')
+ except:
test.fail("Missing Qt Creator Manual.")
def main():
diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48.tsv
index d07141bfa6..bff0ad765c 100644
--- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48.tsv
+++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48.tsv
@@ -1,8 +1,8 @@
"0" "1" "4" "9"
"<program>" "Binding" "1" "Main Program"
-"main.qml:15" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
+"main.qml:12" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
"main.qml:1" "Create" "1" "main.qml"
"main.qml:1" "Compile" "1" "main.qml"
-"main.qml:7" "Binding" "1" "text: qsTr(""Hello World"")"
+"main.qml:31" "Binding" "1" "text: qsTr(""Hello World"")"
"<bytecode>" "Binding" "2" "Source code not available."
-"main.qml:14" "Binding" "3" "running: runCount < 2"
+"main.qml:11" "Binding" "3" "running: runCount < 2"
diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48_nonOptimized.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48_nonOptimized.tsv
index 34d8d64d62..754e315949 100644
--- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48_nonOptimized.tsv
+++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt48_nonOptimized.tsv
@@ -1,9 +1,9 @@
"0" "1" "4" "9"
"<program>" "Binding" "1" "Main Program"
-"main.qml:15" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
+"main.qml:12" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
"main.qml:1" "Create" "1" "main.qml"
"main.qml:1" "Compile" "1" "main.qml"
-"main.qml:7" "Binding" "1" "text: qsTr(""Hello World"")"
-"main.qml:14" "Binding" "3" "running: runCount < 2"
-"main.qml:8" "Binding" "1" "centerIn: parent"
-"main.qml:27" "Binding" "1" "fill: parent"
+"main.qml:31" "Binding" "1" "text: qsTr(""Hello World"")"
+"main.qml:11" "Binding" "3" "running: runCount < 2"
+"main.qml:32" "Binding" "1" "centerIn: parent"
+"main.qml:24" "Binding" "1" "fill: parent"
diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50.tsv
index 0f1c83d1f8..bb77fca202 100644
--- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50.tsv
+++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50.tsv
@@ -1,8 +1,8 @@
"0" "1" "4" "9"
"<program>" "Binding" "1" "Main Program"
"main.qml:1" "Create" "1" "main.qml"
-"main.qml:15" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
+"main.qml:12" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
"main.qml:1" "Compile" "1" "main.qml"
-"main.qml:7" "Binding" "1" "text: qsTr(""Hello World"")"
+"main.qml:31" "Binding" "1" "text: qsTr(""Hello World"")"
"<bytecode>" "Binding" "2" "Source code not available."
-"main.qml:14" "Binding" "3" "running: runCount < 2"
+"main.qml:11" "Binding" "3" "running: runCount < 2"
diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50_nonOptimized.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50_nonOptimized.tsv
index 7cf604958e..72c37667a9 100644
--- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50_nonOptimized.tsv
+++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt50_nonOptimized.tsv
@@ -1,9 +1,9 @@
"0" "1" "4" "9"
"<program>" "Binding" "1" "Main Program"
"main.qml:1" "Create" "1" "main.qml"
-"main.qml:15" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
+"main.qml:12" "Signal" "2" "triggered(): { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
"main.qml:1" "Compile" "1" "main.qml"
-"main.qml:7" "Binding" "1" "text: qsTr(""Hello World"")"
-"main.qml:14" "Binding" "3" "running: runCount < 2"
-"main.qml:8" "Binding" "1" "centerIn: parent"
-"main.qml:27" "Binding" "1" "fill: parent"
+"main.qml:31" "Binding" "1" "text: qsTr(""Hello World"")"
+"main.qml:11" "Binding" "3" "running: runCount < 2"
+"main.qml:32" "Binding" "1" "centerIn: parent"
+"main.qml:24" "Binding" "1" "fill: parent"
diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py
index 870b743c07..b1e190428b 100644
--- a/tests/system/suite_general/tst_default_settings/test.py
+++ b/tests/system/suite_general/tst_default_settings/test.py
@@ -105,7 +105,7 @@ def __iterateTree__(treeObj, additionalFunc, *additionalParameters):
doneItems.append(itObj)
if alreadyDone:
itObj = "%s occurrence='%d'}" % (itObj[:-1], alreadyDone + 1)
- currentSelectedTreeItem = waitForObject(itObj, 3000)
+ currentSelectedTreeItem = findObject(itObj)
mouseClick(currentSelectedTreeItem, 5, 5, 0, Qt.LeftButton)
additionalFunc(indexName, *additionalParameters)
currentSelectedTreeItem = None
diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py
index e6b3728b07..907df3a93a 100644
--- a/tests/system/suite_general/tst_rename_file/test.py
+++ b/tests/system/suite_general/tst_rename_file/test.py
@@ -84,15 +84,13 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
openItemContextMenu(treeview, addBranchWildcardToRoot(itemText), 5, 5, 0)
# hack for Squish5/Qt5.2 problems of handling menus on Mac - remove asap
if platform.system() == 'Darwin':
- item = "Rename..."
- if oldname.endswith(".qrc"):
- item = "Rename File"
- waitFor("macHackActivateContextMenuItem(item)", 5000)
+ waitFor("macHackActivateContextMenuItem('Rename...')", 5000)
else:
if oldname.endswith(".qrc"):
- activateItem(waitForObjectItem(":Qt Creator.Project.Menu.Folder_QMenu", "Rename File"))
+ menu = ":Qt Creator.Project.Menu.Folder_QMenu"
else:
- activateItem(waitForObjectItem(":Qt Creator.Project.Menu.File_QMenu", "Rename..."))
+ menu = ":Qt Creator.Project.Menu.File_QMenu"
+ activateItem(waitForObjectItem(menu, "Rename..."))
type(waitForObject(":Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit"), newname)
type(waitForObject(":Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit"), "<Return>")
test.verify(waitFor("os.path.exists(newFilePath)", 1000),
diff --git a/tests/system/suite_tools/tst_git_clone/test.py b/tests/system/suite_tools/tst_git_clone/test.py
index fc33f75a6c..d94797639b 100644
--- a/tests/system/suite_tools/tst_git_clone/test.py
+++ b/tests/system/suite_tools/tst_git_clone/test.py
@@ -33,35 +33,39 @@ cloneUrl = "https://codereview.qt-project.org/p/qt-labs/jom"
cloneDir = "myCloneOfJom"
def verifyCloneLog(targetDir, canceled):
- # Expect fails because of QTCREATORBUG-10531
- cloneLog = waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit")
finish = findObject(":Git Repository Clone.Finish_QPushButton")
waitFor("canceled or finish.enabled", 30000)
- test.xverify(("Executing in " + targetDir + ":" in str(cloneLog.plainText)),
- "Searching for target directory in clone log")
- test.xverify((" ".join(["clone", cloneUrl, cloneDir]) in str(cloneLog.plainText)),
- "Searching for git parameters in clone log")
if canceled:
- test.xverify("Stopping..." in str(cloneLog.plainText),
- "Searching for 'Stopping...' in clone log")
- result = "The process terminated in an abnormal way."
summary = "Failed."
else:
- test.verify(not "Stopping..." in str(cloneLog.plainText),
+ cloneLog = str(waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit").plainText)
+ # test for QTCREATORBUG-10112
+ test.compare(cloneLog.count("remote: Counting objects:"), 1)
+ test.compare(cloneLog.count("remote: Finding sources:"), 1)
+ test.compare(cloneLog.count("Receiving objects:"), 1)
+ test.compare(cloneLog.count("Resolving deltas:"), 1)
+ test.verify(not "Stopping..." in cloneLog,
"Searching for 'Stopping...' in clone log")
- test.verify(("'" + cloneDir + "'..." in str(cloneLog.plainText)),
+ test.verify(("'" + cloneDir + "'..." in cloneLog),
"Searching for clone directory in clone log")
- result = "The process terminated with exit code 0."
summary = "Succeeded."
- # cloneLog.plainText holds escape as character which makes QDom fail while printing the result
- # removing these for letting Jenkins continue execute the test suite
- test.xverify((result in str(cloneLog.plainText)),
- "Searching for result (%s) in clone log:\n%s"
- % (result, str(cloneLog.plainText).replace(unicode("\x1b"), "")))
resultLabel = findObject(":Git Repository Clone.Result._QLabel")
test.verify(waitFor('str(resultLabel.text) == summary', 3000),
"Verifying expected result (%s)" % summary)
+def verifyVersionControlView(targetDir, canceled):
+ openVcsLog()
+ vcsLog = str(waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' "
+ "window=':Qt Creator_Core::Internal::MainWindow'}").plainText)
+ test.log("Clone log is: %s" % vcsLog)
+ test.verify("Executing in " + targetDir + ":" in vcsLog,
+ "Searching for target directory in clone log")
+ test.verify(" ".join(["clone", "--progress", cloneUrl, cloneDir]) in vcsLog,
+ "Searching for git parameters in clone log")
+ test.verify(canceled == (" terminated abnormally" in vcsLog),
+ "Searching for result in clone log")
+ clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
+
def verifyFiles(targetDir):
for file in [".gitignore", "CMakeLists.txt", "jom.pro",
os.path.join("bin", "ibjom.cmd"),
@@ -122,4 +126,5 @@ def main():
test.fail("The checked out project was not being opened.",
waitForObject(":Cannot Open Project_QTextEdit").plainText)
clickButton(waitForObject(":Cannot Open Project.OK_QPushButton"))
+ verifyVersionControlView(targetDir, button == "Cancel immediately")
invokeMenuItem("File", "Exit")
diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py
index 7b6099caa9..5650dd29dc 100644
--- a/tests/system/suite_tools/tst_git_local/test.py
+++ b/tests/system/suite_tools/tst_git_local/test.py
@@ -35,7 +35,7 @@ projectName = "gitProject"
# TODO: Make selecting changes possible
def commit(commitMessage, expectedLogMessage):
- ensureChecked(waitForObject(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"))
+ openVcsLog()
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
invokeMenuItem("Tools", "Git", "Local Repository", "Commit...")
replaceEditorContent(waitForObject(":Description.description_Utils::CompletingTextEdit"), commitMessage)
@@ -136,10 +136,7 @@ def main():
if not startedWithoutPluginError():
return
createProject_Qt_GUI(srcPath, projectName, addToVersionControl = "Git")
- if not object.exists(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"):
- clickButton(waitForObject(":Qt Creator_Core::Internal::OutputPaneManageButton"))
- activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Version Control"))
- ensureChecked(waitForObject(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"))
+ openVcsLog()
vcsLog = waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}").plainText
test.verify("Initialized empty Git repository in %s"