diff --git a/dist/changes-2.1 b/dist/changes-2.1.0 similarity index 90% rename from dist/changes-2.1 rename to dist/changes-2.1.0 index b4fd82af8aa..41d204e81d8 100644 --- a/dist/changes-2.1 +++ b/dist/changes-2.1.0 @@ -14,13 +14,16 @@ General Editing C++ Support + * Added semantic highlighting of types, virtual methods, locals, statics and + member variables (only enabled when running against Qt 4.7.1 and up, for + performance reasons) * Add new %FILENAME%, %CLASS% placeholders to license template Project Support * Add option for adding subprojects to projects in the New wizard * Add context-menu command for removing subprojects in the Edit mode, Projects view - * Add a wizard for adding other than Qt libraries to project files + * Add a wizard for adding other than Qt libraries to project files Debugging * Fix console debugging with MinGW/gdb diff --git a/doc/images/qtcreator-breakdown.png b/doc/images/qtcreator-breakdown.png index 3a8bde3ded3..d1aed6228d5 100644 Binary files a/doc/images/qtcreator-breakdown.png and b/doc/images/qtcreator-breakdown.png differ diff --git a/doc/images/qtcreator-build-environment.png b/doc/images/qtcreator-build-environment.png new file mode 100644 index 00000000000..fe00b2e98e2 Binary files /dev/null and b/doc/images/qtcreator-build-environment.png differ diff --git a/doc/images/qtcreator-build-steps-custom.png b/doc/images/qtcreator-build-steps-custom.png new file mode 100644 index 00000000000..27e1be044b3 Binary files /dev/null and b/doc/images/qtcreator-build-steps-custom.png differ diff --git a/doc/images/qtcreator-build-steps.png b/doc/images/qtcreator-build-steps.png index c629428f4cc..7e506f51508 100644 Binary files a/doc/images/qtcreator-build-steps.png and b/doc/images/qtcreator-build-steps.png differ diff --git a/doc/images/qtcreator-clean-steps.png b/doc/images/qtcreator-clean-steps.png index 778f0689166..6f99b3a998d 100644 Binary files a/doc/images/qtcreator-clean-steps.png and b/doc/images/qtcreator-clean-steps.png differ diff --git a/doc/images/qtcreator-cpp-class-wizard.png b/doc/images/qtcreator-cpp-class-wizard.png new file mode 100644 index 00000000000..6b3483f0e9e Binary files /dev/null and b/doc/images/qtcreator-cpp-class-wizard.png differ diff --git a/doc/images/qtcreator-gs-build-example-open.png b/doc/images/qtcreator-gs-build-example-open.png index 27fce0197b0..6e8229cc2ed 100644 Binary files a/doc/images/qtcreator-gs-build-example-open.png and b/doc/images/qtcreator-gs-build-example-open.png differ diff --git a/doc/images/qtcreator-welcome-session.png b/doc/images/qtcreator-welcome-session.png index 0c0f5036ff0..4293c52a232 100644 Binary files a/doc/images/qtcreator-welcome-session.png and b/doc/images/qtcreator-welcome-session.png differ diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index d5a26cd215b..9e94de80786 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -1818,21 +1818,7 @@ You use wizards to create and import several types of projects and files, such as Qt GUI or console applications and Qt Quick applications. - You can also use - wizards to add individual files to your projects. For example, you can create - the following types of files: - - \list - - \o Qt resource files, which allow you to store binary files in the - application executable - - \o \QD forms and Qt QML files, which specify parts of application user - interfaces - - \o C++ class, source, or header files - - \endlist + You can use wizards also to add individual files to your projects. The wizards prompt you to enter the settings needed for that particular type of project and create the necessary files for you. @@ -1863,6 +1849,14 @@ path. \image qtcreator-intro-and-location.png + + \o Select the Qt versions to use as build targets for your project, and click + \gui{Next}. + + \image qtcreator-new-project-qt-versions.png "Target setting dialog" + + \note If you have only one Qt version installed, this dialog is skipped. + \o Specify the name of the class you want to create and using the drop-down menu select its base class type. @@ -1878,10 +1872,43 @@ \image qtcreator-new-project-summary.png \endlist + \section1 Adding Files to Projects + + You can create the following types of files: + + \list + + \o Qt resource files, which allow you to store binary files in the + application executable + + \o \QD forms and Qt QML files, which specify parts of application user + interfaces + + \o C++ class, source, or header files + + \o Text files + + \endlist + + \section2 Creating C++ Classes + + The \gui {C++ Class Wizard} allows you to create a C++ header and source file for + a new class that you can add to a C++ project. Specify the class name, base + class, and header and source files for the class. + + The wizard supports namespaces. To use a namespace, enter a qualified + class name in the \gui {Class name} field. For example: + MyNamespace::MySubNamespace::MyClass. + + \image qtcreator-cpp-class-wizard.png "Enter Class Name dialog" + + The names of the header and source file are based on the class name. To change the + default suffix of a file, click \gui Configure. + You can create your own project and class wizards. For more information, see \l{Adding New Custom Wizards}. - \section1 Displaying Additional File Types in Projects Pane + \section2 Displaying Additional File Types in Projects Pane Qt Creator determines whether to display files from the project folder in the \gui Projects pane depending on the file type (.pro, .pri, .cpp, @@ -1900,6 +1927,35 @@ This also makes the files available in the \gui Locator. + \section1 Adding Subprojects to Projects + + When you create a new project, you can add it to another project as a subproject + in the \gui{Project Management} dialog. However, you first have to edit the + .pro file of the parent project to specify that qmake uses the \c subdirs template + to build the project. + + The \c subdirs template creates a Makefile for building subprojects. They can be + located either in subdirectories of the project directory or in any other directory. + The location of the targets is specified using the SUBDIRS variable. If the project file + has the same name as the directory, you can just specify the directory name. If the project + name and directory name are different, you must specify the project file name (.pro). + + For more information on the SUBDIRS variable, see the + \l{http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#subdirs}{qmake Variable Reference}. + + For example, the following code specifies that plugin_coreplugin/plugin_coreplugin.pro + and mylogin.pro belong to the project: + + \code + TEMPLATE = subdirs + + SUBDIRS = plugin_coreplugin \ + ../another/plugin/myplugin.pro + \endcode + + To specify dependencies, use the \gui{Add Library} wizard. For more information, + see \l{Adding Libraries to qmake Projects}. + */ @@ -2966,7 +3022,7 @@ \note Shadow building is not supported by the Symbian build system. Also, shadow building on Windows is not supported for Maemo. If you only build for one target platform, you can deselect - the \gui{Shadow Build} checkbox. + the \gui{Shadow build} checkbox. \endlist \endlist @@ -2979,6 +3035,23 @@ \image qtcreator-build-steps.png "Build steps" + \section2 Adding Custom Build Steps + + To add custom steps to the build settings, select \gui {Add Build Step > + Custom Process Step}. + + By default, custom steps are disabled. To activate a custom step, select + the \gui{Enable custom process step} check-box. + + \image qtcreator-build-steps-custom.png "Custom Process Step" + + You can use any environment variables as values in the fields. For a list + of variable names, click \gui {Build Environment > Details}. You can specify + variables as ${VARNAME} or %VARNAME%. For example, ${BUILDDIR} or %BUILDDIR%. + + \note Qt Creator sets SOURCEDIR and BUILDDIR as part of the build environment. + For more information, see \l{Build Environment}. + \section1 Clean Steps You can use the cleaning process to remove intermediate files. This process @@ -2990,10 +3063,10 @@ You can define the cleaning steps for your builds in the \gui{Clean Steps}: \list \o To add a clean step using make or a custom process, click - \gui{Add clean step} and select the type of step you want to add. + \gui{Add Clean Step} and select the type of step you want to add. - By default, custom steps are disabled. Activate custom steps by - checking the \gui{Enable custom process step} check-box. + By default, custom steps are disabled. To activate a custom step, + select the \gui{Enable custom process step} check-box. \o To remove a clean step, click \gui{Remove Item}. \o To change the order of steps, click \inlineimage qtcreator-movestep.png @@ -3010,6 +3083,8 @@ variables or add, reset and unset new variables based on your project requirements. + \image qtcreator-build-environment.png "Build Environment" + */ @@ -4610,17 +4685,21 @@ \title Managing Sessions When you exit Qt Creator, a snapshot of your current workspace is stored - as a session. - A session is a collection of: + as a \e session. A session is an arbitrary collection of: \list - \o Open projects with their dependencies + \o Open projects with their dependencies (including SUBDIRS projects) \o Open editors \o Breakpoints and watches \o Bookmarks \endlist - If you work on a project and need to switch to another project for a + A session is personal, that is, not meant to be shared. It is not + supposed to reflect the project structure. It contains personal data, such as + bookmarks and breakpoints that are usually not of interest to other developers + working on the same projects. + + For example, if you work on a project and need to switch to another project for a while, you can save your workspace as a session. This makes it easier to return to working on the first project later. diff --git a/qtcreator.pri b/qtcreator.pri index 8b2268ca3ff..2994770571f 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -31,6 +31,26 @@ defineReplace(qtLibraryName) { return($$RET) } +defineTest(minQtVersion) { + maj = $$1 + min = $$2 + patch = $$3 + isEqual(QT_MAJOR_VERSION, $$maj) { + isEqual(QT_MINOR_VERSION, $$min) { + isEqual(QT_PATCH_VERSION, $$patch) { + return(true) + } + greaterThan(QT_PATCH_VERSION, $$patch) { + return(true) + } + } + greaterThan(QT_MINOR_VERSION, $$min) { + return(true) + } + } + return(false) +} + # For use in custom compilers which just copy files win32:i_flag = i defineReplace(stripSrcDir) { diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 4d7ef4553a8..b60b5df341b 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -693,7 +693,8 @@ def makeValue(type, init): type = stripClassTag(type) if type.find(":") >= 0: type = "'" + type + "'" - gdb.execute("set $d = (%s*)malloc(sizeof(%s))" % (type, type)) + # Avoid malloc symbol clash with QVector + gdb.execute("set $d = (%s*)calloc(sizeof(%s), 1)" % (type, type)) gdb.execute("set *$d = {%s}" % init) value = parseAndEvaluate("$d").dereference() #warn(" TYPE: %s" % value.type) diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index b3b284e4bdd..0a0bcec04dc 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -723,7 +723,8 @@ def qdump__QObject(d, item): if d.isExpandedIName(item.iname + ".properties"): # FIXME: Make this global. Don't leak. variant = "'%sQVariant'" % d.ns - gdb.execute("set $d = (%s*)malloc(sizeof(%s))" % (variant, variant)) + # Avoid malloc symbol clash with QVector + gdb.execute("set $d = (%s*)calloc(sizeof(%s), 1)" % (variant, variant)) gdb.execute("set $d.d.is_shared = 0") with Children(d, [propertyCount, 500]): @@ -769,7 +770,8 @@ def qdump__QObject(d, item): # % (d.ns, item.value.address, propertyName) #exp = '"((\'%sQObject\'*)%s)"' % (d.ns, item.value.address,) #warn("EXPRESSION: %s" % exp) - value = call(item.value, 'property("%s")' % propertyName) + value = call(item.value, 'property(%s)' + % cleanAddress(metaStringData + metaData[offset])) value1 = value["d"] #warn(" CODE: %s" % value1["type"]) # Type 1 and 2 are bool and int. Try to save a few cycles in this case: diff --git a/share/qtcreator/generic-highlighter/README b/share/qtcreator/generic-highlighter/README deleted file mode 100644 index eb1647a377b..00000000000 --- a/share/qtcreator/generic-highlighter/README +++ /dev/null @@ -1,2 +0,0 @@ -This is Creator's default directory for syntax highlight definitions. -You can download them through the Generic Highlighter options dialog. diff --git a/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml b/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml index af4b85b5525..726298b387e 100644 --- a/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml +++ b/share/qtcreator/qml-type-descriptions/qml-builtin-types.xml @@ -1,6 +1,6 @@ - + @@ -86,7 +86,7 @@ - + @@ -134,13 +134,6 @@ - - - - - - - @@ -157,7 +150,63 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -166,7 +215,7 @@ - + @@ -202,31 +251,528 @@ - - + + + + + + + + + + + + + + - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -243,14 +789,474 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -260,25 +1266,881 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -297,13 +2159,13 @@ - + - + - + @@ -330,7 +2192,169 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -359,8 +2383,56 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,7 +2452,91 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -498,44 +2654,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -571,44 +2689,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1353,28 +3433,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -1556,1732 +3614,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3300,4 +3650,5 @@ + diff --git a/share/qtcreator/qml-type-descriptions/qmlproject-types.xml b/share/qtcreator/qml-type-descriptions/qmlproject-types.xml index 1b3e35fc9cc..f8ae4aa1bcc 100644 --- a/share/qtcreator/qml-type-descriptions/qmlproject-types.xml +++ b/share/qtcreator/qml-type-descriptions/qmlproject-types.xml @@ -1,6 +1,9 @@ + + + @@ -14,14 +17,26 @@ + + + + + + + + + + + + diff --git a/share/qtcreator/qml-type-descriptions/qmlruntime-types.xml b/share/qtcreator/qml-type-descriptions/qmlruntime-types.xml index b1e851edd37..362968d9e3d 100644 --- a/share/qtcreator/qml-type-descriptions/qmlruntime-types.xml +++ b/share/qtcreator/qml-type-descriptions/qmlruntime-types.xml @@ -1,6 +1,9 @@ + + + diff --git a/share/qtcreator/qml/qmldump/main.cpp b/share/qtcreator/qml/qmldump/main.cpp index 61211ee07d9..93f349c98be 100644 --- a/share/qtcreator/qml/qmldump/main.cpp +++ b/share/qtcreator/qml/qmldump/main.cpp @@ -15,15 +15,15 @@ #include #include -static QHash qmlTypeByCppName; -static QHash cppToQml; +static QHash > qmlTypesByCppName; +static QHash cppToId; -QByteArray convertToQmlType(const QByteArray &cppName) +QByteArray convertToId(const QByteArray &cppName) { - QByteArray qmlName = cppToQml.value(cppName, cppName); - qmlName.replace("::", "."); - qmlName.replace("/", "."); - return qmlName; + QByteArray idName = cppToId.value(cppName, cppName); + idName.replace("::", "."); + idName.replace("/", "."); + return idName; } void erasure(QByteArray *typeName, bool *isList, bool *isPointer) @@ -41,7 +41,7 @@ void erasure(QByteArray *typeName, bool *isList, bool *isPointer) erasure(typeName, isList, isPointer); } - *typeName = convertToQmlType(*typeName); + *typeName = convertToId(*typeName); } void processMetaObject(const QMetaObject *meta, QSet *metas) @@ -132,7 +132,7 @@ void dump(const QMetaMethod &meth, QXmlStreamWriter *xml) attributes.append(QXmlStreamAttribute("name", name)); - const QString typeName = convertToQmlType(meth.typeName()); + const QString typeName = convertToId(meth.typeName()); if (! typeName.isEmpty()) attributes.append(QXmlStreamAttribute("type", typeName)); @@ -187,16 +187,12 @@ public: void dump(const QMetaObject *meta, QXmlStreamWriter *xml) { - QByteArray qmlTypeName = convertToQmlType(meta->className()); + QByteArray id = convertToId(meta->className()); xml->writeStartElement("type"); QXmlStreamAttributes attributes; - attributes.append(QXmlStreamAttribute("name", qmlTypeName)); - - if (const QDeclarativeType *qmlTy = qmlTypeByCppName.value(meta->className())) { - attributes.append(QXmlStreamAttribute("version", QString("%1.%2").arg(qmlTy->majorVersion()).arg(qmlTy->minorVersion()))); - } + attributes.append(QXmlStreamAttribute("name", id)); for (int index = meta->classInfoCount() - 1 ; index >= 0 ; --index) { QMetaClassInfo classInfo = meta->classInfo(index); @@ -206,16 +202,31 @@ void dump(const QMetaObject *meta, QXmlStreamWriter *xml) } } - QString version; - if (meta->superClass()) - attributes.append(QXmlStreamAttribute("extends", convertToQmlType(meta->superClass()->className()))); - - if (! version.isEmpty()) - attributes.append(QXmlStreamAttribute("version", version)); + attributes.append(QXmlStreamAttribute("extends", convertToId(meta->superClass()->className()))); xml->writeAttributes(attributes); + QList qmlTypes = qmlTypesByCppName.value(id); + if (!qmlTypes.isEmpty()) { + xml->writeStartElement("exports"); + foreach (const QDeclarativeType *qmlTy, qmlTypes) { + QXmlStreamAttributes moduleAttributes; + const QString qmlTyName = qmlTy->qmlTypeName(); + int slashIdx = qmlTyName.lastIndexOf(QLatin1Char('/')); + if (slashIdx == -1) + continue; + const QString moduleName = qmlTyName.left(slashIdx); + const QString typeName = qmlTyName.mid(slashIdx + 1); + moduleAttributes.append(QXmlStreamAttribute("module", moduleName)); + moduleAttributes.append(QXmlStreamAttribute("version", QString("%1.%2").arg(qmlTy->majorVersion()).arg(qmlTy->minorVersion()))); + moduleAttributes.append(QXmlStreamAttribute("type", typeName)); + xml->writeEmptyElement("export"); + xml->writeAttributes(moduleAttributes); + } + xml->writeEndElement(); + } + for (int index = meta->enumeratorOffset(); index < meta->enumeratorCount(); ++index) dump(meta->enumerator(index), xml); @@ -234,7 +245,7 @@ void writeEasingCurve(QXmlStreamWriter *xml) { QXmlStreamAttributes attributes; attributes.append(QXmlStreamAttribute("name", "QEasingCurve")); - attributes.append(QXmlStreamAttribute("extends", "Qt.Easing")); + attributes.append(QXmlStreamAttribute("extends", "QDeclarativeEasingValueType")); xml->writeAttributes(attributes); } @@ -262,8 +273,22 @@ int main(int argc, char *argv[]) if (!pluginImportPath.isEmpty()) engine->addImportPath(pluginImportPath); + bool hasQtQuickModule = false; + { + QByteArray code = "import QtQuick 1.0; Item {}"; + QDeclarativeComponent c(engine); + c.setData(code, QUrl("xxx")); + c.create(); + if (c.errors().isEmpty()) { + hasQtQuickModule = true; + } + } + QByteArray importCode; importCode += "import Qt 4.7;\n"; + if (hasQtQuickModule) { + importCode += "import QtQuick 1.0;\n"; + } if (pluginImportName.isEmpty()) { importCode += "import Qt.labs.particles 4.7;\n"; importCode += "import Qt.labs.gestures 4.7;\n"; @@ -284,25 +309,25 @@ int main(int argc, char *argv[]) qDebug() << c.errorString(); } - cppToQml.insert("QString", "string"); - cppToQml.insert("QDeclarativeEasingValueType::Type", "Type"); + cppToId.insert("QString", "string"); + cppToId.insert("QDeclarativeEasingValueType::Type", "Type"); QSet metas; metas.insert(FriendlyQObject::qtMeta()); - QMultiHash extensions; + QHash > extensions; foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { - qmlTypeByCppName.insert(ty->metaObject()->className(), ty); + qmlTypesByCppName[ty->metaObject()->className()].append(ty); if (ty->isExtendedType()) { - extensions.insert(ty->typeName(), ty->metaObject()->className()); + extensions[ty->typeName()].insert(ty->metaObject()->className()); } else { - cppToQml.insert(ty->metaObject()->className(), ty->qmlTypeName()); + cppToId.insert(ty->metaObject()->className(), ty->metaObject()->className()); } processDeclarativeType(ty, &metas); } - // Adjust qml names of extended objects. + // Adjust ids of extended objects. // The chain ends up being: // __extended__.originalname - the base object // __extension_0_.originalname - first extension @@ -310,14 +335,19 @@ int main(int argc, char *argv[]) // __extension_n-2_.originalname - second to last extension // originalname - last extension foreach (const QByteArray &extendedCpp, extensions.keys()) { - const QByteArray extendedQml = cppToQml.value(extendedCpp); - cppToQml.insert(extendedCpp, "__extended__." + extendedQml); - QList extensionCppNames = extensions.values(extendedCpp); - for (int i = 0; i < extensionCppNames.size() - 1; ++i) { - QByteArray adjustedName = QString("__extension__%1.%2").arg(QString::number(i), QString(extendedQml)).toAscii(); - cppToQml.insert(extensionCppNames.value(i), adjustedName); + const QByteArray extendedId = cppToId.value(extendedCpp); + cppToId.insert(extendedCpp, "__extended__." + extendedId); + QSet extensionCppNames = extensions.value(extendedCpp); + int c = 0; + foreach (const QByteArray &extensionCppName, extensionCppNames) { + if (c != extensionCppNames.size() - 1) { + QByteArray adjustedName = QString("__extension__%1.%2").arg(QString::number(c), QString(extendedId)).toAscii(); + cppToId.insert(extensionCppName, adjustedName); + } else { + cppToId.insert(extensionCppName, extendedId); + } + ++c; } - cppToQml.insert(extensionCppNames.last(), extendedQml); } foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { @@ -350,13 +380,13 @@ int main(int argc, char *argv[]) QMap nameToMeta; foreach (const QMetaObject *meta, metas) { - nameToMeta.insert(convertToQmlType(meta->className()), meta); + nameToMeta.insert(convertToId(meta->className()), meta); } foreach (const QMetaObject *meta, nameToMeta) { dump(meta, &xml); } - // define QEasingCurve as an extension of Qt.Easing + // define QEasingCurve as an extension of QDeclarativeEasingValueType writeEasingCurve(&xml); xml.writeEndElement(); diff --git a/share/qtcreator/qml/qmljsdebugger/editor/abstractformeditortool.cpp b/share/qtcreator/qml/qmljsdebugger/editor/abstractformeditortool.cpp index 557a3011120..dea47b7e998 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/abstractformeditortool.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/abstractformeditortool.cpp @@ -29,7 +29,7 @@ #include "abstractformeditortool.h" #include "qdeclarativeviewobserver.h" -#include "qdeclarativeviewobserver_p.h" +#include "../qdeclarativeviewobserver_p.h" #include diff --git a/share/qtcreator/qml/qmljsdebugger/editor/rubberbandselectionmanipulator.cpp b/share/qtcreator/qml/qmljsdebugger/editor/rubberbandselectionmanipulator.cpp index 379ba98c44d..43e3575470c 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/rubberbandselectionmanipulator.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/rubberbandselectionmanipulator.cpp @@ -28,7 +28,7 @@ **************************************************************************/ #include "rubberbandselectionmanipulator.h" -#include "qdeclarativeviewobserver_p.h" +#include "../qdeclarativeviewobserver_p.h" #include diff --git a/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp b/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp index 5782f2a5ee2..d6ba81bd736 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/selectionindicator.cpp @@ -28,7 +28,7 @@ **************************************************************************/ #include "selectionindicator.h" -#include "qdeclarativeviewobserver_p.h" +#include "../qdeclarativeviewobserver_p.h" #include "qmlobserverconstants.h" #include @@ -97,11 +97,11 @@ void SelectionIndicator::setItems(const QList > &i // set selections to also all children if they are not editor items - foreach (QWeakPointer obj, itemList) { - if (obj.isNull()) + foreach (QWeakPointer object, itemList) { + if (object.isNull()) continue; - QGraphicsItem *item = obj.data(); + QGraphicsItem *item = object.data(); QGraphicsPolygonItem *newSelectionIndicatorGraphicsItem = new QGraphicsPolygonItem(m_layerItem.data()); if (!m_indicatorShapeHash.contains(item)) { diff --git a/share/qtcreator/qml/qmljsdebugger/editor/selectiontool.cpp b/share/qtcreator/qml/qmljsdebugger/editor/selectiontool.cpp index b677a105771..fdc8b2dc2e6 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/selectiontool.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/selectiontool.cpp @@ -31,7 +31,7 @@ #include "layeritem.h" //#include "resizehandleitem.h" -#include "qdeclarativeviewobserver_p.h" +#include "../qdeclarativeviewobserver_p.h" #include diff --git a/share/qtcreator/qml/qmljsdebugger/editor/singleselectionmanipulator.cpp b/share/qtcreator/qml/qmljsdebugger/editor/singleselectionmanipulator.cpp index d0064815496..e982385650c 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/singleselectionmanipulator.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/singleselectionmanipulator.cpp @@ -29,7 +29,7 @@ #include "singleselectionmanipulator.h" #include "qdeclarativeviewobserver.h" -#include "qdeclarativeviewobserver_p.h" +#include "../qdeclarativeviewobserver_p.h" #include namespace QmlJSDebugger { diff --git a/share/qtcreator/qml/qmljsdebugger/editor/subcomponenteditortool.cpp b/share/qtcreator/qml/qmljsdebugger/editor/subcomponenteditortool.cpp index 5089944ddba..700c0ecf2e5 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/subcomponenteditortool.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/subcomponenteditortool.cpp @@ -1,5 +1,5 @@ #include "subcomponenteditortool.h" -#include "qdeclarativeviewobserver_p.h" +#include "../qdeclarativeviewobserver_p.h" #include "subcomponentmasklayeritem.h" #include "layeritem.h" diff --git a/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp b/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp index 2bb152e2d63..c1d310002b2 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp @@ -1,5 +1,5 @@ #include "zoomtool.h" -#include "qdeclarativeviewobserver_p.h" +#include "../qdeclarativeviewobserver_p.h" #include #include diff --git a/share/qtcreator/qml/qmljsdebugger/include/jsdebuggeragent.h b/share/qtcreator/qml/qmljsdebugger/include/jsdebuggeragent.h index 39b559cabe3..5c0fb017231 100644 --- a/share/qtcreator/qml/qmljsdebugger/include/jsdebuggeragent.h +++ b/share/qtcreator/qml/qmljsdebugger/include/jsdebuggeragent.h @@ -57,9 +57,10 @@ #include #include #include -#include #include +#include "qt_private/qdeclarativedebugservice_p.h" + #include "qmljsdebugger_global.h" QT_FORWARD_DECLARE_CLASS(QScriptContext); @@ -103,7 +104,7 @@ public: const QVariant &argument = QVariant()); void messageReceived(const QByteArray &); - void enabledChanged(bool); + void statusChanged(Status status); public slots: // void pauses(); diff --git a/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeobserverservice.h b/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeobserverservice.h index 121a847684e..66084cd92c4 100644 --- a/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeobserverservice.h +++ b/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeobserverservice.h @@ -42,7 +42,7 @@ #ifndef QDECLARATIVEDESIGNDEBUGSERVER_H #define QDECLARATIVEDESIGNDEBUGSERVER_H -#include +#include "qt_private/qdeclarativedebugservice_p.h" #include "qmlobserverconstants.h" #include "qmljsdebugger_global.h" @@ -70,6 +70,8 @@ public: void reloaded(); QString idStringForObject(QObject *obj) const; + void sendMessage(const QByteArray &message); + public Q_SLOTS: void selectedColorChanged(const QColor &color); void contextPathUpdated(const QStringList &contextPath); @@ -98,7 +100,7 @@ Q_SIGNALS: void clearComponentCacheRequested(); protected: - virtual void enabledChanged(bool enabled); + virtual void statusChanged(Status status); virtual void messageReceived(const QByteArray &); private: diff --git a/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebughelper_p.h b/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebughelper_p.h new file mode 100644 index 00000000000..c9cb8391212 --- /dev/null +++ b/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebughelper_p.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUGHELPER_P_H +#define QDECLARATIVEDEBUGHELPER_P_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QScriptEngine; +class QDeclarativeEngine; + +// Helper methods to access private API through a stable interface +// This is used in the qmljsdebugger library of QtCreator. +class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper +{ +public: + static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); + static void setAnimationSlowDownFactor(qreal factor); +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGHELPER_P_H diff --git a/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebugservice_p.h b/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebugservice_p.h new file mode 100644 index 00000000000..0cadbe5b585 --- /dev/null +++ b/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebugservice_p.h @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUGSERVICE_H +#define QDECLARATIVEDEBUGSERVICE_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugServicePrivate; +class Q_DECLARATIVE_EXPORT QDeclarativeDebugService : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QDeclarativeDebugService) + Q_DISABLE_COPY(QDeclarativeDebugService) + +public: + explicit QDeclarativeDebugService(const QString &, QObject *parent = 0); + ~QDeclarativeDebugService(); + + QString name() const; + + enum Status { NotConnected, Unavailable, Enabled }; + Status status() const; + + void sendMessage(const QByteArray &); + + static int idForObject(QObject *); + static QObject *objectForId(int); + + static QString objectToString(QObject *obj); + + static bool isDebuggingEnabled(); + static bool hasDebuggingClient(); + +protected: + virtual void statusChanged(Status); + virtual void messageReceived(const QByteArray &); + +private: + friend class QDeclarativeDebugServer; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVICE_H + diff --git a/share/qtcreator/qml/qmljsdebugger/jsdebuggeragent.cpp b/share/qtcreator/qml/qmljsdebugger/jsdebuggeragent.cpp index 4258882e10c..00b6ea27489 100644 --- a/share/qtcreator/qml/qmljsdebugger/jsdebuggeragent.cpp +++ b/share/qtcreator/qml/qmljsdebugger/jsdebuggeragent.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "jsdebuggeragent.h" +#include "qt_private/qdeclarativedebughelper_p.h" #include #include @@ -49,7 +50,6 @@ #include #include #include -#include namespace QmlJSDebugger { @@ -193,7 +193,7 @@ JSDebuggerAgent::JSDebuggerAgent(QScriptEngine *engine) JSDebuggerAgent::JSDebuggerAgent(QDeclarativeEngine *engine) : QDeclarativeDebugService("JSDebugger") - , QScriptEngineAgent(QDeclarativeEnginePrivate::getScriptEngine(engine)) + , QScriptEngineAgent(QDeclarativeDebugHelper::getScriptEngine(engine)) , state(NoState) {} @@ -511,9 +511,9 @@ void JSDebuggerAgent::continueExec() loop.quit(); } -void JSDebuggerAgent::enabledChanged(bool on) +void JSDebuggerAgent::statusChanged(Status status) { - engine()->setAgent(on ? this : 0); + engine()->setAgent((status == QDeclarativeDebugService::Enabled) ? this : 0); } } // namespace QmlJSDebugger diff --git a/share/qtcreator/qml/qmljsdebugger/private_headers.pri b/share/qtcreator/qml/qmljsdebugger/private_headers.pri deleted file mode 100644 index fc353961781..00000000000 --- a/share/qtcreator/qml/qmljsdebugger/private_headers.pri +++ /dev/null @@ -1,17 +0,0 @@ -# Try to find location of Qt private headers (see README) -isEmpty(QT_PRIVATE_HEADERS) { - QT_PRIVATE_HEADERS = $$[QT_INSTALL_HEADERS] -} - -INCLUDEPATH += \ - $${QT_PRIVATE_HEADERS} \ - $${QT_PRIVATE_HEADERS}/QtCore \ - $${QT_PRIVATE_HEADERS}/QtGui \ - $${QT_PRIVATE_HEADERS}/QtScript \ - $${QT_PRIVATE_HEADERS}/QtDeclarative -DEPENDPATH += \ - $${QT_PRIVATE_HEADERS} \ - $${QT_PRIVATE_HEADERS}/QtCore \ - $${QT_PRIVATE_HEADERS}/QtGui \ - $${QT_PRIVATE_HEADERS}/QtScript \ - $${QT_PRIVATE_HEADERS}/QtDeclarative diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeobserverservice.cpp b/share/qtcreator/qml/qmljsdebugger/qdeclarativeobserverservice.cpp index 16b5145e74a..114cd15cf6c 100644 --- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeobserverservice.cpp +++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeobserverservice.cpp @@ -60,9 +60,9 @@ QDeclarativeObserverService *QDeclarativeObserverService::instance() return serviceInstance(); } -void QDeclarativeObserverService::enabledChanged(bool enabled) +void QDeclarativeObserverService::statusChanged(Status status) { - emit debuggingClientChanged(enabled); + emit debuggingClientChanged((status == Enabled)); } void QDeclarativeObserverService::messageReceived(const QByteArray &message) @@ -236,4 +236,12 @@ QString QDeclarativeObserverService::idStringForObject(QObject *obj) const return idString; } +void QDeclarativeObserverService::sendMessage(const QByteArray &message) +{ + if (status() != Enabled) + return; + + QDeclarativeDebugService::sendMessage(message); +} + } // namespace QmlJSDebugger diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp index 81cd9b018ba..d48d4eff537 100644 --- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp +++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver.cpp @@ -39,6 +39,8 @@ #include "qmltoolbar.h" #include "jsdebuggeragent.h" +#include "qt_private/qdeclarativedebughelper_p.h" + #include #include #include @@ -47,10 +49,7 @@ #include #include #include - #include -#include -#include namespace QmlJSDebugger { @@ -118,9 +117,6 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje data->createToolbar(); data->_q_changeToSingleSelectTool(); - - // always start debug mode - that's what this design view is for. - setDebugMode(true); } QDeclarativeViewObserver::~QDeclarativeViewObserver() @@ -626,11 +622,13 @@ void QDeclarativeViewObserver::continueExecution(qreal slowdownFactor) data->slowdownFactor = slowdownFactor; static const qreal animSpeedSnapDelta = 0.01f; - bool useStandardSpeed = (qAbs(1.0f - data->slowdownFactor) < animSpeedSnapDelta); - QUnifiedTimer *timer = QUnifiedTimer::instance(); - timer->setSlowdownFactor(data->slowdownFactor); - timer->setSlowModeEnabled(!useStandardSpeed); + qreal slowDownFactor = data->slowdownFactor; + if (qAbs(1.0f - slowDownFactor) < animSpeedSnapDelta) { + slowDownFactor = 1.0f; + } + + QDeclarativeDebugHelper::setAnimationSlowDownFactor(slowDownFactor); data->executionPaused = false; emit executionStarted(data->slowdownFactor); @@ -639,9 +637,7 @@ void QDeclarativeViewObserver::continueExecution(qreal slowdownFactor) void QDeclarativeViewObserver::pauseExecution() { - QUnifiedTimer *timer = QUnifiedTimer::instance(); - timer->setSlowdownFactor(0); - timer->setSlowModeEnabled(true); + QDeclarativeDebugHelper::setAnimationSlowDownFactor(0.0f); data->executionPaused = true; emit executionPaused(); @@ -796,7 +792,7 @@ void QDeclarativeViewObserverPrivate::createToolbar() void QDeclarativeViewObserver::setDebugMode(bool isDebugMode) { if (isDebugMode && !data->jsDebuggerAgent) - data->jsDebuggerAgent = new JSDebuggerAgent(QDeclarativeEnginePrivate::getScriptEngine(data->view->engine())); + data->jsDebuggerAgent = new JSDebuggerAgent(data->view->engine()); } } //namespace QmlJSDebugger diff --git a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h index a276c4350e2..516877dd586 100644 --- a/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h +++ b/share/qtcreator/qml/qmljsdebugger/qdeclarativeviewobserver_p.h @@ -27,8 +27,8 @@ ** **************************************************************************/ -#ifndef QDECLARATIVEDESIGNVIEW_P_H -#define QDECLARATIVEDESIGNVIEW_P_H +#ifndef QDECLARATIVEVIEWOBSERVER_P_H +#define QDECLARATIVEVIEWOBSERVER_P_H #include #include @@ -138,4 +138,4 @@ public: } // namespace QmlJSDebugger -#endif // QDECLARATIVEDESIGNVIEW_P_H +#endif // QDECLARATIVEVIEWOBSERVER_P_H diff --git a/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri b/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri index f8e482e38c7..ec99cd06cc5 100644 --- a/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri +++ b/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri @@ -1,6 +1,6 @@ QT += declarative script -INCLUDEPATH += $$PWD $$PWD/include editor -DEPENDPATH += $$PWD $$PWD/include editor +INCLUDEPATH += $$PWD/include +DEPENDPATH += $$PWD $$PWD/include editor $$PWD/qt-private contains(CONFIG, dll) { DEFINES += BUILD_QMLJSDEBUGGER_LIB @@ -8,28 +8,28 @@ contains(CONFIG, dll) { DEFINES += BUILD_QMLJSDEBUGGER_STATIC_LIB } -include($$PWD/private_headers.pri) - ## Input HEADERS += \ - $$PWD/include/jsdebuggeragent.h \ - $$PWD/include/qmljsdebugger_global.h + include/jsdebuggeragent.h \ + include/qmljsdebugger_global.h \ + include/qt_private/qdeclarativedebughelper_p.h \ + include/qt_private/qdeclarativedebugservice_p.h SOURCES += \ - $$PWD/jsdebuggeragent.cpp + jsdebuggeragent.cpp contains(DEFINES, QMLOBSERVER) { include($$PWD/editor/editor.pri) HEADERS += \ - $$PWD/include/qdeclarativeviewobserver.h \ - $$PWD/include/qdeclarativeobserverservice.h \ - $$PWD/include/qmlobserverconstants.h \ - $$PWD/qdeclarativeviewobserver_p.h + include/qdeclarativeviewobserver.h \ + include/qdeclarativeobserverservice.h \ + include/qmlobserverconstants.h \ + qdeclarativeviewobserver_p.h SOURCES += \ - $$PWD/qdeclarativeviewobserver.cpp \ - $$PWD/qdeclarativeobserverservice.cpp + qdeclarativeviewobserver.cpp \ + qdeclarativeobserverservice.cpp } -OTHER_FILES += $$PWD/qmljsdebugger.pri +OTHER_FILES += qmljsdebugger.pri diff --git a/share/qtcreator/qml/qmlobserver/qmlobserver.pro b/share/qtcreator/qml/qmlobserver/qmlobserver.pro index 06df9ecaccd..d05ca7ee1e6 100644 --- a/share/qtcreator/qml/qmlobserver/qmlobserver.pro +++ b/share/qtcreator/qml/qmlobserver/qmlobserver.pro @@ -16,8 +16,6 @@ exists($$PWD/qmljsdebugger/qmljsdebugger-lib.pri) { include($$PWD/../qmljsdebugger/qmljsdebugger-lib.pri) } -DESTDIR = $$IDE_BIN_PATH - mac { QMAKE_INFO_PLIST=Info_mac.plist TARGET=QMLObserver diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/AlignmentHorizontalButtons.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/AlignmentHorizontalButtons.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/AlignmentHorizontalButtons.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/AlignmentHorizontalButtons.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/AlignmentVerticalButtons.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/AlignmentVerticalButtons.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/AlignmentVerticalButtons.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/AlignmentVerticalButtons.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/AnchorBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/AnchorBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorButtons.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/AnchorButtons.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/AnchorButtons.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/AnchorButtons.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/BorderImageSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/BorderImageSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/BorderImageSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/BorderImageSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/CheckBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/CheckBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/CheckBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/CheckBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorGroupBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ColorGroupBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorGroupBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorLabel.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorLabel.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ColorLabel.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorLabel.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorScheme.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorScheme.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ColorScheme.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorScheme.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColorTypeButtons.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorTypeButtons.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ColorTypeButtons.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColorTypeButtons.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ColumnSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColumnSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ColumnSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ColumnSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ComboBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ComboBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ComboBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ComboBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/DoubleSpinBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/DoubleSpinBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBoxAlternate.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/DoubleSpinBoxAlternate.qml similarity index 98% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBoxAlternate.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/DoubleSpinBoxAlternate.qml index ff6eb442c77..2fe97d2ae17 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBoxAlternate.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/DoubleSpinBoxAlternate.qml @@ -80,6 +80,8 @@ QWidget { //This is a special doubleSpinBox that does color coding for states decimals: 1; keyboardTracking: false; enabled: !backendValue.isBound && doubleSpinBox.enabled; + minimum: -1000 + maximum: 1000 property bool readingFromBackend: false; property real valueFromBackend: doubleSpinBox.backendValue.value; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExpressionEditor.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExpressionEditor.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Extended.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Extended.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExtendedFunctionButton.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExtendedFunctionButton.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedPane.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExtendedPane.qml similarity index 92% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedPane.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExtendedPane.qml index 3c0e9efe129..a764d9dcce0 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedPane.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExtendedPane.qml @@ -16,9 +16,8 @@ QScrollArea { leftMargin: 0; rightMargin: 0; spacing: 0; - - Visibility {} - Transformation {} + + Transformation {} QScrollArea { } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedSwitches.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExtendedSwitches.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedSwitches.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ExtendedSwitches.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FlagedButton.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/FlagedButton.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/FlagedButton.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/FlagedButton.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FlickableSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/FlickableSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/FlickableSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/FlickableSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FlipableSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/FlipableSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/FlipableSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/FlipableSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/FontComboBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/FontComboBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/FontGroupBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/FontGroupBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontStyleButtons.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/FontStyleButtons.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/FontStyleButtons.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/FontStyleButtons.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Geometry.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Geometry.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/GridSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/GridSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/GridSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/GridSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/GroupBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/GroupBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBoxOption.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/GroupBoxOption.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/GroupBoxOption.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/GroupBoxOption.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalLayout.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/HorizontalLayout.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalLayout.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/HorizontalLayout.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalWhiteLine.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/HorizontalWhiteLine.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/HorizontalWhiteLine.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/HorizontalWhiteLine.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ImageSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ImageSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ImageSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ImageSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/IntEditor.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/IntEditor.qml similarity index 96% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/IntEditor.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/IntEditor.qml index dd5f7834ff0..bc0b50f400e 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/IntEditor.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/IntEditor.qml @@ -9,8 +9,8 @@ QWidget { property variant caption; - property variant maximumValue: 99 - property variant minimumValue: 0 + property variant maximumValue: 1000 + property variant minimumValue: -1000 property variant step: 1 property bool slider: true property alias alignment: label.alignment diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ItemPane.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ItemPane.qml similarity index 85% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ItemPane.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ItemPane.qml index 70896d5284a..b4247773de7 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ItemPane.qml @@ -13,10 +13,28 @@ PropertyFrame { leftMargin: 0; rightMargin: 0; spacing: 0; + + Type { + } + + Geometry { + } + + Visibility { + + } + + HorizontalWhiteLine { + maximumHeight: 4; + styleSheet: "QLineEdit {border: 2px solid #707070; min-height: 0px; max-height: 0px;}"; + } + Switches { } + HorizontalWhiteLine { } + ScrollArea { styleSheetFile: ":/qmldesigner/scrollbar.css"; widgetResizable: true; @@ -35,8 +53,6 @@ PropertyFrame { leftMargin: 0; rightMargin: 0; spacing: 0; - Type { - } WidgetLoader { id: specificsOne; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Label.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Label.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Label.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Label.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Layout.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Layout.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/LayoutPane.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/LayoutPane.qml similarity index 90% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/LayoutPane.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/LayoutPane.qml index f22c0c75e9c..2e4dd0dfb2a 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/LayoutPane.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/LayoutPane.qml @@ -15,10 +15,7 @@ QScrollArea { bottomMargin: 0; leftMargin: 0; rightMargin: 0; - spacing: 0 - - Geometry { - } + spacing: 0; Layout { id: layoutBox; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/LineEdit.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/LineEdit.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ListViewSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ListViewSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Modifiers.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Modifiers.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Modifiers.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Modifiers.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/PlaceHolder.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/PlaceHolder.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/PlaceHolder.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/PlaceHolder.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/PropertyFrame.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/PropertyFrame.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/RectangleColorGroupBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/RectangleColorGroupBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/RectangleSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/RectangleSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RowSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/RowSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/RowSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/RowSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ScrollArea.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/ScrollArea.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/ScrollArea.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/ScrollArea.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/SliderWidget.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/SliderWidget.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/SliderWidget.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/SliderWidget.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/SpinBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/SpinBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/StandardTextColorGroupBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextColorGroupBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/StandardTextColorGroupBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/StandardTextGroupBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/StandardTextGroupBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Switches.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Switches.qml similarity index 95% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Switches.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Switches.qml index 3c4b95f95e6..d507c5ada07 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Switches.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Switches.qml @@ -35,8 +35,8 @@ QFrame { id: layoutMode; checkable: true; checked: false; - toolTip: qsTr("layout and geometry"); - text: qsTr("Geometry"); + toolTip: qsTr("layout"); + text: qsTr("Layout"); onClicked: { extendedMode.checked = false; standardMode.checked = false; diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextEditSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextEditSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextInputGroupBox.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextInputGroupBox.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextInputSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextInputSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/TextSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/TextSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Transformation.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Transformation.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Transformation.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Transformation.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Type.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Type.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/VerticalLayout.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/VerticalLayout.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/VerticalLayout.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/VerticalLayout.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Visibility.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/Visibility.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/Visibility.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/Visibility.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/WebViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/WebViewSpecifics.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/WebViewSpecifics.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/WebViewSpecifics.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorbottom.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorbottom.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorbottom.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorbottom.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorbox.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorbox.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorbox.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorbox.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorfill.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorfill.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorfill.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorfill.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorhorizontal.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorhorizontal.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorhorizontal.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorhorizontal.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorleft.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorleft.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorleft.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorleft.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorright.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorright.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorright.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorright.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorspacer.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorspacer.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorspacer.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorspacer.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchortop.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchortop.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchortop.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchortop.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/anchorvertical.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorvertical.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/anchorvertical.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/anchorvertical.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/applybutton.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/applybutton.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/applybutton.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/applybutton.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/aspectlock.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/aspectlock.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/aspectlock.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/aspectlock.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/cancelbutton.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/cancelbutton.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/cancelbutton.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/cancelbutton.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/emptyPane.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/emptyPane.qml similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/emptyPane.qml rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/emptyPane.qml diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentbottom-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentbottom-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentbottom-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentbottom-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentbottom-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentbottom-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentbottom-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentbottom-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentcenterh-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentcenterh-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentcenterh-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentcenterh-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentcenterh-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentcenterh-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentcenterh-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentcenterh-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentleft-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentleft-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentleft-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentleft-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentleft-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentleft-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentleft-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentleft-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentmiddle-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentmiddle-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentmiddle-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentmiddle-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentmiddle-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentmiddle-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentmiddle-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentmiddle-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentright-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentright-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentright-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentright-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentright-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentright-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmentright-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmentright-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmenttop-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmenttop-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmenttop-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmenttop-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmenttop-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmenttop-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/alignmenttop-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/alignmenttop-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/apply.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/apply.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/apply.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/apply.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/behaivour.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/behaivour.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/behaivour.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/behaivour.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/blended-image-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/blended-image-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/blended-image-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/blended-image-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/bold-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/bold-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/bold-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/bold-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/bold-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/bold-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/bold-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/bold-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/button.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/button.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/button.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/button.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/cancel.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/cancel.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/cancel.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/cancel.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/default-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/default-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/default-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/default-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/downArrow.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/downArrow.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/downArrow.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/downArrow.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/expression.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/expression.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/expression.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/expression.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/extended.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/extended.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/extended.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/extended.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/grid-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/grid-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/grid-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/grid-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/icon_color_gradient.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/icon_color_gradient.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/icon_color_gradient.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/icon_color_gradient.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/icon_color_none.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/icon_color_none.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/icon_color_none.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/icon_color_none.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/icon_color_solid.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/icon_color_solid.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/icon_color_solid.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/icon_color_solid.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/image-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/image-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/image-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/image-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/italic-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/italic-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/italic-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/italic-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/italic-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/italic-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/italic-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/italic-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/item-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/item-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/item-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/item-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/layout.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/layout.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/layout.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/layout.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/leftArrow.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/leftArrow.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/leftArrow.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/leftArrow.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/list-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/list-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/list-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/list-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/mouse-area-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/mouse-area-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/mouse-area-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/mouse-area-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/placeholder.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/placeholder.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/placeholder.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/placeholder.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/rect-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/rect-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/rect-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/rect-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/reset-button.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/reset-button.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/reset-button.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/reset-button.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/rightArrow.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/rightArrow.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/rightArrow.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/rightArrow.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/standard.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/standard.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/standard.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/standard.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/strikeout-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/strikeout-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/strikeout-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/strikeout-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/strikeout-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/strikeout-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/strikeout-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/strikeout-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/submenu.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/submenu.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/submenu.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/submenu.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/text-edit-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/text-edit-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/text-edit-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/text-edit-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/text-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/text-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/text-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/text-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/underline-h-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/underline-h-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/underline-h-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/underline-h-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/underline-icon.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/underline-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/underline-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/underline-icon.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/upArrow.png b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/upArrow.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/upArrow.png rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/images/upArrow.png diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/layoutWidget.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/layoutWidget.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/layoutWidget.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/layoutWidget.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/propertyEditor.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/propertyEditor.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/propertyEditor.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/propertyEditor.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/specialCheckBox.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/specialCheckBox.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/specialCheckBox.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/specialCheckBox.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/styledbuttonleft.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/styledbuttonleft.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/styledbuttonleft.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/styledbuttonleft.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/styledbuttonmiddle.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/styledbuttonmiddle.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/styledbuttonmiddle.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/styledbuttonmiddle.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/styledbuttonright.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/styledbuttonright.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/styledbuttonright.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/styledbuttonright.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/switch.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/switch.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/switch.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/switch.css diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/typeLabel.css b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/typeLabel.css similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/typeLabel.css rename to share/qtcreator/qmldesigner/propertyeditor/QtQuick/typeLabel.css diff --git a/share/qtcreator/static.pro b/share/qtcreator/static.pro index 267dc6c6975..ddc10bab704 100644 --- a/share/qtcreator/static.pro +++ b/share/qtcreator/static.pro @@ -35,7 +35,7 @@ DATA_DIRS = \ qmlicons \ qml \ qml-type-descriptions \ - generic-highlighter + qmljsdebugger !isEmpty(copydata) { diff --git a/share/qtcreator/templates/mobileapp/app.pro b/share/qtcreator/templates/mobileapp/app.pro index b8cc1c57582..a832c6b9595 100644 --- a/share/qtcreator/templates/mobileapp/app.pro +++ b/share/qtcreator/templates/mobileapp/app.pro @@ -22,12 +22,10 @@ symbian:TARGET.UID3 = 0xE1111234 # and 0x2002CCCF value if protected UID is given to the application #symbian:DEPLOYMENT.installer_header = 0x2002CCCF -symbian:ICON = symbianicon.svg - SOURCES += main.cpp mainwindow.cpp HEADERS += mainwindow.h FORMS += mainwindow.ui +# Please do not modify the following two lines. Required for deployment. include(../shared/deployment.pri) - qtcAddDeployment() diff --git a/share/qtcreator/templates/qmlapp/app.pro b/share/qtcreator/templates/qmlapp/app.pro index 9d119f7bb08..8cfa591bb97 100644 --- a/share/qtcreator/templates/qmlapp/app.pro +++ b/share/qtcreator/templates/qmlapp/app.pro @@ -27,8 +27,6 @@ symbian:TARGET.UID3 = 0xE1111234 # and 0x2002CCCF value if protected UID is given to the application #symbian:DEPLOYMENT.installer_header = 0x2002CCCF -symbian:ICON = symbianicon.svg - # Define QMLJSDEBUGGER to enable basic debugging (setting breakpoints etc) # Define QMLOBSERVER for advanced features (requires experimental QmlInspector plugin!) #DEFINES += QMLJSDEBUGGER @@ -37,7 +35,8 @@ symbian:ICON = symbianicon.svg # The .cpp file which was generated for your project. Feel free to hack it. SOURCES += main.cpp -# Please do not modify the following three lines. Required for deployment. +# Please do not modify the following two lines. Required for deployment. include(qmlapplicationviewer/qmlapplicationviewer.pri) +# INCLUDE_DEPLOYMENT_PRI (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) # include(../shared/deployment.pri) qtcAddDeployment() diff --git a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri index 934dc6929a7..319587d7821 100644 --- a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri +++ b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri @@ -10,16 +10,45 @@ INCLUDEPATH += $$PWD contains(DEFINES, QMLOBSERVER) { DEFINES *= QMLJSDEBUGGER } + +defineTest(minQtVersion) { + maj = $$1 + min = $$2 + patch = $$3 + isEqual(QT_MAJOR_VERSION, $$maj) { + isEqual(QT_MINOR_VERSION, $$min) { + isEqual(QT_PATCH_VERSION, $$patch) { + return(true) + } + greaterThan(QT_PATCH_VERSION, $$patch) { + return(true) + } + } + greaterThan(QT_MINOR_VERSION, $$min) { + return(true) + } + } + return(false) +} + contains(DEFINES, QMLJSDEBUGGER) { CONFIG(debug, debug|release) { - isEmpty(QMLJSDEBUGGER_PATH) { + !minQtVersion(4, 7, 1) { warning() - warning(Debugging QML requires the qmljsdebugger library that ships with Qt Creator.) - warning(Please specify its location on the qmake command line, e.g.) - warning( qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qml/qmljsdebugger) + warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") + warning("This library requires Qt 4.7.1 or newer.") warning() - error(QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.) + error("Qt version $$QT_VERSION too old for QmlJS Debugging. Aborting.") + } + isEmpty(QMLJSDEBUGGER_PATH) { + warning() + warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") + warning("Please specify its location on the qmake command line, eg") + warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") + warning() + + error("QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.") DEFINES -= QMLJSDEBUGGER } else { include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) diff --git a/share/qtcreator/templates/shared/deployment.pri b/share/qtcreator/templates/shared/deployment.pri index bb79115aafc..7ec5a99ae53 100644 --- a/share/qtcreator/templates/shared/deployment.pri +++ b/share/qtcreator/templates/shared/deployment.pri @@ -16,6 +16,7 @@ for(deploymentfolder, DEPLOYMENTFOLDERS) { MAINPROFILEPWD = $$PWD symbian { + ICON = $${TARGET}.svg TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -leiksrv -lcone contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices @@ -81,6 +82,7 @@ symbian { INSTALLS += desktopfile icon target } +export (ICON) export (INSTALLS) export (DEPLOYMENT) export (TARGET.EPOCHEAPSIZE) diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index b14f0ec62b3..8bbd70645df 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -36,7 +36,7 @@ Compatibility Version: - Zgodność z wersją: + Zgodność z wersją: Vendor: @@ -44,7 +44,7 @@ Url: - Url: + Url: Location: @@ -70,6 +70,14 @@ Group: Grupa: + + Compatibility version: + + + + URL: + URL: + ExtensionSystem::Internal::PluginErrorView @@ -79,7 +87,11 @@ Error Message: - Komunikat Błędu: + Komunikat Błędu: + + + Error message: + Komunikat błędu: @@ -109,11 +121,11 @@ TextLabel - Etykieta + Etykieta CheckBox - CheckBox + CheckBox @@ -197,12 +209,16 @@ &Path: Ś&cieżka: + + Inherits QDeclarativeItem + Wywiedziony z QDeclarativeItem + Utils::ProjectIntroPage Introduction and project location - Nazwa oraz położenie projektu + Nazwa oraz położenie projektu Name: @@ -228,6 +244,10 @@ Use as default project location Ustaw jako domyślne położenie projektów + + Introduction and Project Location + Nazwa oraz położenie projektu + Utils::SubmitEditorWidget @@ -243,6 +263,28 @@ F&iles Pl&iki + + Commit %1/%n Files + + + + + + + + Commit + Wyślij + + + Check All + Check all for submit + Zaznacz wszystko + + + Uncheck All + Uncheck all for submit + + Core::Internal::NewDialog @@ -516,8 +558,7 @@ p, li { white-space: pre-wrap; } &Case-sensitivity: - Uwzględnianie &wielkości liter: - + Uwzględnianie &wielkości liter: Full @@ -535,6 +576,22 @@ p, li { white-space: pre-wrap; } First Letter Tylko pierwsza litera + + Activate completion: + Uaktywniaj uzupełnianie: + + + Manually + Ręcznie + + + When Triggered + Tylko na żądanie + + + Always + Zawsze + CppFileSettingsPage @@ -575,7 +632,7 @@ p, li { white-space: pre-wrap; } Describe all files matching commit id - Opisz wszystkie pliki pasujące do identyfikatora operacji + Opisz wszystkie pliki zgodne z identyfikatorem operacji Timeout: @@ -614,6 +671,10 @@ p, li { white-space: pre-wrap; } Core File: + Plik zrzutu: + + + Core file: Plik zrzutu: @@ -632,11 +693,11 @@ p, li { white-space: pre-wrap; } BreakByFunctionDialog Set Breakpoint at Function - Ustaw pułapkę w funkcji + Ustaw pułapkę w funkcji Function to break on: - Funkcja w której przerwać: + Funkcja w której przerwać: @@ -649,6 +710,22 @@ p, li { white-space: pre-wrap; } Ignore count: Licznik pominięć: + + File name: + Nazwa pliku: + + + Line number: + Numer linii: + + + Function: + Funkcja: + + + Thread specification: + Specyfikacja wątku: + CdbOptionsPageWidget @@ -702,6 +779,10 @@ p, li { white-space: pre-wrap; } Fast loading of debugging helpers Szybkie ładowanie asystentów debuggera + + Break on exception + Przerwij w wyjątku + CommonOptionsPage @@ -731,15 +812,15 @@ p, li { white-space: pre-wrap; } Language - Język + Język Changes the debugger language according to the currently opened file. - Zmienia język debuggera odpowiednio do zawartości otwartego pliku. + Zmienia język debuggera odpowiednio do zawartości otwartego pliku. Change debugger language automatically - Automatycznie zmieniaj język debuggera + Automatycznie zmieniaj język debuggera Register Qt Creator for debugging crashed applications. @@ -788,6 +869,16 @@ p, li { white-space: pre-wrap; } Use Debugging Helper Używaj asystenta debuggera + + QML Observer is used to offer additional debugging facilities to QML applications, such as interactive preview of code changes and inspection tools. + +It is not strictly necessary for debugging with Qt Creator. + + + + Use QML Observer + Użyj QML Observera + GdbOptionsPage @@ -881,6 +972,10 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Behavior of Breakpoint Setting in Plugins Ustawianie pułapek we wtyczkach + + Adjust Breakpoint Locations + Poprawiaj położenia pułapek + StartExternalDialog @@ -900,6 +995,10 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Break at 'main': Przerwij w "main": + + Working directory: + Katalog roboczy: + StartRemoteDialog @@ -1002,7 +1101,7 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. vim's "tabstop" option - Opcja "tabstop" Vima + Opcja "tabstop" Vima Tabulator size: @@ -1072,6 +1171,18 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Show position of text marks Pokazuj znaczniki + + Checking this box passes key sequences like Ctrl-S to the Creator core instead of interpreting them in FakeVim. This gives easier access to Creator core functionality at the price of losing some features of FakeVim. + + + + Pass control key + + + + Vim tabstop option + + Find::Internal::FindDialog @@ -1107,6 +1218,14 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Search && Replace Wyszukaj i zastąp + + Use regular e&xpressions + Używaj wyrażeń &regularnych + + + Cancel + Anuluj + Find::Internal::FindWidget @@ -1128,7 +1247,23 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. All - Wszystko + Wszystko + + + Replace + Zastąp + + + Replace && Find + Zastąp i znajdź + + + Replace All + Zastąp wszystkie + + + Advanced... + Zaawansowane... @@ -1160,6 +1295,10 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. Diff Pokaż różnice + + Log + Dziennik + Refresh Odśwież @@ -1422,6 +1561,18 @@ dla emisji sygnału wskoczy bezpośrednio do podłączonego slotu. From System Z systemu + + Set "HOME" environment variable + Ustaw zmienną środowiskową "HOME" + + + Gitk + Gitk + + + Arguments: + Argumenty: + DocSettingsPage @@ -1474,6 +1625,10 @@ Add, modify, and remove document filters, which determine the documentation set Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokumentacji wyświetlanej w trybie "Pomocy". Atrybuty są zdefiniowane w dokumentach. Zaznaczenie ich spowoduje wyświetlenie zestawu odpowiedniej dokumentacji. Zwróć uwagę że niektóre atrybuty mogą być zdefiniowane w kilku dokumentach. </p></body></html> + + No user defined filters available or no filter selected. + Brak dostępnych filtrów użytkownika lub żaden filtr nie jest zaznaczony. + GeneralSettingsPage @@ -1561,6 +1716,26 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Show My Tabs from Last Session Pokazuj moje karty z ostatniej sesji + + Always Show Help in External Window + Zawsze pokazuj pomoc w zewnętrznym oknie + + + Behaviour + Zachowanie + + + Switch to editor context after last help page is closed. + Przełączaj do trybu edycji po zamknięciu ostatniej strony pomocy. + + + Return to editor on closing the last page + Powracaj do edytora po zamknięciu ostatniej strony + + + Return to editor on closing the last page + Powracaj do edytora po zamknięciu ostatniej strony + Perforce::Internal::ChangeNumberDialog @@ -1657,6 +1832,10 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Environment Variables Zmienne środowiskowe + + Automatically open files when editing + Automatycznie otwieraj pliki jeśli zostały zmodyfikowane + Perforce::Internal::SubmitPanel @@ -1688,7 +1867,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum ProjectExplorer::Internal::ProcessStepWidget Name: - Nazwa: + Nazwa: Command: @@ -1743,7 +1922,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Always build project before running - Zawsze buduj projekt przed uruchomieniem + Zawsze buduj projekt przed uruchomieniem Show compiler output on building @@ -1757,6 +1936,18 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum <i>jom</i> is a drop-in replacement for <i>nmake</i> which distributes the compilation process to multiple CPU cores. The latest binary is available at <a href="ftp://ftp.qt.nokia.com/jom/">ftp://ftp.qt.nokia.com/jom/</a>. Disable it if you experience problems with your builds. <i>jom</i> jest zamiennikiem <i>nmake</i> który dystrybuuje proces kompilacji do wielu rdzeni procesora .Najnowsza wersja jest dostępna tu: <a href="ftp://ftp.qt.nokia.com/jom/">ftp://ftp.qt.nokia.com/jom/</a>. Wyłącz tę opcję jeśli doświadczasz problemów podczas budowania. + + Always build project before deploying it + Zawsze buduj projekt przed zainstalowaniem + + + Always deploy project before running it + Zawsze instaluj projekt przed uruchomieniem + + + Word-wrap application output + Zawijaj komunikaty aplikacji + ProjectExplorer::Internal::ProjectWelcomePageWidget @@ -1808,7 +1999,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum ProjectExplorer::Internal::WizardPage Project management - Organizacja projektu + Organizacja projektu The following files will be added: @@ -1830,6 +2021,10 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Add to &version control: Dodaj do systemu kontroli &wersji: + + Project Management + Organizacja projektu + ProjectExplorer::Internal::RemoveFileDialog @@ -1854,16 +2049,32 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum ProjectExplorer::Internal::RunSettingsPropertiesPage + - + + + - - - + - Run configuration: Konfiguracja uruchamiania: + + Deployment: + Instalacja: + + + Add + Dodaj + + + Remove + Usuń + + + Rename + Zmień nazwę + ProjectExplorer::Internal::SessionDialog @@ -1907,6 +2118,14 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum <a href="qthelp://com.nokia.qtcreator/doc/creator-project-managing-sessions.html">What is a Session?</a> <a href="qthelp://com.nokia.qtcreator/doc/creator-project-managing-sessions.html">Co to jest sesja?</a> + + Automatically restore the last session when Qt Creator is started. + Automatycznie przywracaj ostatnią sesję po uruchomieniu Qt Creatora. + + + Restore last session on startup + Przywracaj ostatnią sesję po uruchomieniu + Qt4ProjectManager::Internal::ClassDefinition @@ -2113,6 +2332,10 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Choose an example... + Wybierz przykład... + + + Choose an Example... Wybierz przykład... @@ -2167,6 +2390,10 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Po dodaniu do projektu zewnętrznej biblioteki, Qt Creator automatycznie Podświetlanie składni i uzupełnianie kodu zadziała automatycznie również dla zewnętrznych bibliotek dodanych do projektu. + + You can quickly search methods, classes, help and more using the <a href="qthelp://com.nokia.qtcreator/doc/creator-editor-locator.html">Locator bar</a> (<tt>%1+K</tt>). + Używając <a href="qthelp://com.nokia.qtcreator/doc/creator-editor-locator.html">lokalizatora</a> (<tt>%1+K</tt>) możesz szybko znaleźć metody, klasy, itd. lub przeszukać dokumentację. + You can switch between Qt Creator's modes using <tt>Ctrl+number</tt>:<ul><li>1 - Welcome</li><li>2 - Edit</li><li>3 - Debug</li><li>4 - Projects</li><li>5 - Help</li></ul> Możesz przełączać tryby Qt Creator'a używając <tt>Ctrl+liczba</tt>:<ul><li>1 - Powitanie</li><li>2 - Edycja</li><li>3 - Debugowanie</li><li>4 - Projekty</li><li>5 - Pomoc</li></ul> @@ -2213,7 +2440,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum You can quickly search methods, classes, help and more using the <a href="qthelp://com.nokia.qtcreator/doc/creator-navigation.html">Locator bar</a> (<tt>%1+K</tt>). - Używając <a href="qthelp://com.nokia.qtcreator/doc/creator-navigation.html">lokalizatora</a> (<tt>%1+K</tt>) możesz szybko znaleźć metody, klasy, itd. lub przeszukać dokumentację. + Używając <a href="qthelp://com.nokia.qtcreator/doc/creator-navigation.html">lokalizatora</a> (<tt>%1+K</tt>) możesz szybko znaleźć metody, klasy, itd. lub przeszukać dokumentację. You can add custom build steps in the <a href="qthelp://com.nokia.qtcreator/doc/creator-build-settings.html">build settings</a>. @@ -2255,6 +2482,30 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Open Project... Otwórz projekt... + + Examples + Przykłady + + + Explore Qt C++ Mobile Examples + Poznaj dogłębnie mobilne przykłady Qt C++ + + + Featured + + + + Image + Obrazek + + + Text + Tekst + + + Link + Odsyłacz + MakeStep @@ -2289,6 +2540,10 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Release Release + + Debug and release + Debug i release + Qt4ProjectManager::Internal::S60DevicesPreferencePane @@ -2351,9 +2606,21 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum General Ogólne + + Invalid Qt version + Niepoprawna wersja Qt + + + Error: + Błąd: + + + Warning: + Ostrzeżenie: + Building in subdirectories of the source directory is not supported by qmake. - Budowanie wewnątrz katalogu ze źródłami nie jest obsługiwane przez qmake. + Budowanie wewnątrz katalogu ze źródłami nie jest obsługiwane przez qmake. An incompatible build exists in %1, which will be overwritten. @@ -2366,7 +2633,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum Configuration name: - Nazwa konfiguracji: + Nazwa konfiguracji: Qt version: @@ -2374,7 +2641,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum This Qt version is invalid. - Ta wersja Qt nie jest poprawna. + Ta wersja Qt nie jest poprawna. Tool chain: @@ -2405,7 +2672,7 @@ Dodaj, zmodyfikuj lub usuń filtry dokumentów, które determinują zestaw dokum p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">Unable to detect MSVC version.</span></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> @@ -2461,7 +2728,15 @@ p, li { white-space: pre-wrap; } Debugging helper: - Asystent debuggera: + Asystent debuggera: + + + Unable to detect MSVC version. + Nie można określić wersji MSVC. + + + Debugging helpers: + Asystenci debuggera: @@ -2636,6 +2911,93 @@ p, li { white-space: pre-wrap; } In Leading White Space Jeśli poprzedzony jest spacją + + <html><head/><body> +Controls the indentation style of curly brace blocks. + +<ul> +<li>Exclude Braces: The braces are not indented. +<pre> +void foo() +{ + if (a) + { + bar(); + } +} +</pre> +</li> + +<li>Include Braces: The braces are indented. The contents of the block are on the same level as the braces. +<pre> +void foo() + { + if (a) + { + bar(); + } + } +</pre> +</li> + +<li>GNU Style: Indent the braces for blocks in statements. The contents are indented twice. +<pre> +void foo() +{ + if (a) + { + bar(); + } +} +</pre> +</li> +</ul></body></html> + + + + Align continuation lines: + + + + <html><head/><body> +Influences the indentation of continuation lines. + +<ul> +<li>Not At All: Do not align at all. Lines will only be indented to the current logical indentation depth. +<pre> +(tab)int i = foo(a, b +(tab)c, d); +</pre> +</li> + +<li>With Spaces: Always use spaces for alignment, regardless of the other indentation settings. +<pre> +(tab)int i = foo(a, b +(tab) c, d); +</pre> +</li> + +<li>With Regular Indent: Use tabs and/or spaces for alignment, as configured above. +<pre> +(tab)int i = foo(a, b +(tab)(tab)(tab) c, d); +</pre> +</li> +</ul></body></html> + + + + Not At All + + + + With Spaces + + + + With Regular Indent + + TextEditor::Internal::ColorSchemeEdit @@ -2657,12 +3019,16 @@ p, li { white-space: pre-wrap; } Erase background - Wyczyść tło + Wyczyść kolor tło x x + + Erase foreground + Wyczyść kolor pierwszoplanowy + TextEditor::DisplaySettingsPage @@ -2776,11 +3142,23 @@ p, li { white-space: pre-wrap; } Path: Ścieżka: + + Branch: + Gałąź: + + + ... + ... + NickNameDialog Nick Names + Przydomki + + + Nicknames Przydomki @@ -2796,7 +3174,7 @@ p, li { white-space: pre-wrap; } <b>Forum Nokia</b><br /><font color='gray'>Mobile Application Support</font> - <b>Forum Nokii</b><br /><font color='gray'>Wsparcie techniczne dla mobilnych aplikacji</font> + <b>Forum Nokii</b><br /><font color='gray'>Wsparcie techniczne dla mobilnych aplikacji</font> <b>Qt LGPL Support</b><br /><font color='gray'>Buy professional Qt support</font> @@ -2808,7 +3186,15 @@ p, li { white-space: pre-wrap; } <b>Qt Centre</b><br /><font color='gray'>Community based Qt support</font> - <b>Qt Centre</b><br /><font color='gray'>Społeczne wsparcie techniczne Qt</font> + <b>Qt Centre</b><br /><font color='gray'>Społeczne wsparcie techniczne Qt</font> + + + <b>Forum Nokia</b><br /><font color='gray'>Mobile application support</font> + <b>Forum Nokii</b><br /><font color='gray'>Wsparcie techniczne dla mobilnych aplikacji</font> + + + <b>Qt DevNet</b><br /><font color='gray'>Qt Developer Resources</font> + <b>Qt DevNet</b><br /><font color='gray'>Zasoby deweloperskie Qt</font> <b>Qt Home</b><br /><font color='gray'>Qt by Nokia on the web</font> @@ -2824,6 +3210,7 @@ p, li { white-space: pre-wrap; } http://labs.trolltech.com/blogs/feed + Add localized feed here only if one exists http://labs.trolltech.com/blogs/feed @@ -2874,7 +3261,7 @@ p, li { white-space: pre-wrap; } Add in Folder: - Dodaj w katalogu: + Dodaj w katalogu: + @@ -2896,6 +3283,10 @@ p, li { white-space: pre-wrap; } Rename Folder Zmień nazwę katalogu + + Add in folder: + Dodaj w katalogu: + FilterNameDialogClass @@ -2926,6 +3317,10 @@ p, li { white-space: pre-wrap; } &Close &Zamknij + + Filter + Filtr + Choose a topic for <b>%1</b>: Wybierz temat dla <b>%1</b>: @@ -3240,9 +3635,13 @@ Przyczyna: %3 Cannot create temporary directory '%1': %2 Nie można utworzyć tymczasowego katalogu "%1": %2 + + Unexpected output from helper program (%1). + Nieoczekiwany komunikat od programu pomocniczego (%1). + Unexpected output from helper program. - Nieoczekiwany komunikat od programu pomocniczego. + Nieoczekiwany komunikat od programu pomocniczego. Cannot change to working directory '%1': %2 @@ -3284,23 +3683,23 @@ Przyczyna: %3 Utils::FileNameValidatingLineEdit Name is empty. - Nazwa jest pusta. + Nazwa jest pusta. Name contains white space. - Nazwa zawiera spacje. + Nazwa zawiera spację. Invalid character '%1'. - Niepoprawny znak: "%1". + Niepoprawny znak: "%1". Invalid characters '%1'. - Niepoprawne znaki: "%1". + Niepoprawne znaki: "%1". Name matches MS Windows device. (%1). - Nazwa pasuje do urządzenia MS Windows. (%1). + Nazwa wskazuje na urządzenie MS Windows. (%1). @@ -3344,10 +3743,23 @@ Przyczyna: %3 Choose Directory Wybierz katalog + + Choose Executable + Wybierz plik wykonywalny + Choose File + + <not valid> + Selected path is not valid: + <niepoprawny> + + + Full path: <b>%1</b> + Pełna ścieżka: <b>%1</b> + The path must not be empty. Ścieżka nie może być pusta. @@ -3356,13 +3768,25 @@ Przyczyna: %3 The path '%1' does not exist. Ścieżka "%1" nie istnieje. + + The path <b>%1</b> is not a directory. + Ścieżka <b>%1</b> nie jest katalogiem. + + + The path <b>%1</b> is not a file. + Ścieżka <b>%1</b> nie jest plikiem. + + + The path <b>%1</b> is not a executable file. + Ścieżka <b>%1</b> nie jest plikiem wykonywalnym. + The path '%1' is not a directory. - "%1" nie jest katalogiem. + "%1" nie jest katalogiem. The path '%1' is not a file. - "%1" nie jest plikiem. + "%1" nie jest plikiem. Path: @@ -3548,11 +3972,11 @@ Przyczyna: %3 CMakeProjectManager::Internal::CMakeRunPage Please specify the path to the cmake executable. No cmake executable was found in the path. - Podaj ścieżkę do programu cmake. Programu cmake nie wykryto w ścieżce. + Podaj ścieżkę do programu cmake. Programu cmake nie wykryto w ścieżce. The cmake executable (%1) does not exist. - Program cmake (%1) nie istnieje. + Program cmake (%1) nie istnieje. The path %1 is not a executable. @@ -3560,7 +3984,7 @@ Przyczyna: %3 The path %1 is not a valid cmake. - Ścieżka %1 nie pokazuje na poprawny program cmake. + Ścieżka %1 nie pokazuje na poprawny program cmake. Run CMake @@ -3572,23 +3996,59 @@ Przyczyna: %3 The directory %1 already contains a cbp file, which is recent enough. You can pass special arguments or change the used toolchain here and rerun cmake. Or simply finish the wizard directly - Katalog %1 zawiera już uaktualniony plik cbp. Możesz przekazać specjalne argumenty lub zmienić istniejący zestaw narzędzi i ponownie uruchomić cmake. Możesz również bezpośrednio zakończyć kreatora. + Katalog %1 zawiera już uaktualniony plik cbp. Możesz przekazać specjalne argumenty lub zmienić istniejący zestaw narzędzi i ponownie uruchomić cmake. Możesz również bezpośrednio zakończyć kreatora. The directory %1 does not contain a cbp file. Qt Creator needs to create this file by running cmake. Some projects require command line arguments to the initial cmake call. - Katalog %1 nie zawiera pliku cbp. Qt Creator wymaga utworzenia go poprzez uruchomienie cmake. Niektóre projekty wymagają dodatkowych argumentów w komendzie cmake. + Katalog %1 nie zawiera pliku cbp. Qt Creator wymaga utworzenia go poprzez uruchomienie cmake. Niektóre projekty wymagają dodatkowych argumentów w komendzie cmake. The directory %1 contains an outdated .cbp file. Qt Creator needs to update this file by running cmake. If you want to add additional command line arguments, add them below. Note that cmake remembers command line arguments from the previous runs. - Katalog %1 zawiera nieaktualny plik cbp. Qt Creator wymaga uaktualnienia go poprzez uruchomienie cmake. Poniżej podaj dodatkowe argumenty dla komendy cmake. Zwróć uwagę że cmake zapamiętuje argumenty komendy z ostatniego uruchomienia. + Katalog %1 zawiera nieaktualny plik cbp. Qt Creator wymaga uaktualnienia go poprzez uruchomienie cmake. Poniżej podaj dodatkowe argumenty dla komendy cmake. Zwróć uwagę że cmake zapamiętuje argumenty komendy z ostatniego uruchomienia. The directory %1 specified in a build-configuration, does not contain a cbp file. Qt Creator needs to recreate this file, by running cmake. Some projects require command line arguments to the initial cmake call. Note that cmake remembers command line arguments from the previous runs. - Katalog %1 podany w konfiguracji budowania nie zawiera pliku cbp. Qt Creator wymaga utworzenia go poprzez uruchomienie cmake. Niektóre projekty wymagają dodatkowych argumentów w komendzie cmake. Zwróć uwagę że cmake zapamiętuje argumenty komendy z ostatniego uruchomienia. + Katalog %1 podany w konfiguracji budowania nie zawiera pliku cbp. Qt Creator wymaga utworzenia go poprzez uruchomienie cmake. Niektóre projekty wymagają dodatkowych argumentów w komendzie cmake. Zwróć uwagę że cmake zapamiętuje argumenty komendy z ostatniego uruchomienia. Qt Creator needs to run cmake in the new build directory. Some projects require command line arguments to the initial cmake call. - Qt Creator wymaga uruchomienia cmake w nowym katalogu budowania. Niektóre projekty wymagają dodatkowych argumentów w komendzie cmake. + Qt Creator wymaga uruchomienia cmake w nowym katalogu budowania. Niektóre projekty wymagają dodatkowych argumentów w komendzie cmake. + + + Please specify the path to the CMake executable. No CMake executable was found in the path. + Podaj ścieżkę do programu CMake. Programu CMake nie wykryto w ścieżce. + + + The CMake executable (%1) does not exist. + Program CMake (%1) nie istnieje. + + + The path %1 is not a valid CMake. + Ścieżka %1 nie pokazuje na poprawny program CMake. + + + The directory %1 already contains a cbp file, which is recent enough. You can pass special arguments or change the used toolchain here and rerun CMake. Or simply finish the wizard directly. + Katalog %1 zawiera już uaktualniony plik cbp. Możesz przekazać specjalne argumenty lub zmienić istniejący zestaw narzędzi i ponownie uruchomić CMake. Możesz również bezpośrednio zakończyć kreatora. + + + The directory %1 does not contain a cbp file. Qt Creator needs to create this file by running CMake. Some projects require command line arguments to the initial CMake call. + Katalog %1 nie zawiera pliku cbp. Qt Creator wymaga utworzenia go poprzez uruchomienie CMake. Niektóre projekty wymagają dodatkowych argumentów w komendzie CMake. + + + The directory %1 contains an outdated .cbp file. Qt Creator needs to update this file by running CMake. If you want to add additional command line arguments, add them below. Note that CMake remembers command line arguments from the previous runs. + Katalog %1 zawiera nieaktualny plik cbp. Qt Creator wymaga uaktualnienia go poprzez uruchomienie CMake. Poniżej podaj dodatkowe argumenty dla komendy CMake. Zwróć uwagę że CMake zapamiętuje argumenty komendy z ostatniego uruchomienia. + + + The directory %1 specified in a build-configuration, does not contain a cbp file. Qt Creator needs to recreate this file, by running CMake. Some projects require command line arguments to the initial CMake call. Note that CMake remembers command line arguments from the previous runs. + Katalog %1 podany w konfiguracji budowania nie zawiera pliku cbp. Qt Creator wymaga utworzenia go poprzez uruchomienie CMake. Niektóre projekty wymagają dodatkowych argumentów w komendzie CMake. Zwróć uwagę że CMake zapamiętuje argumenty komendy z ostatniego uruchomienia. + + + Qt Creator needs to run CMake in the new build directory. Some projects require command line arguments to the initial CMake call. + Qt Creator wymaga uruchomienia CMake w nowym katalogu budowania. Niektóre projekty wymagają dodatkowych argumentów w komendzie CMake. + + + Refreshing cbp file in %1. + Odświeżanie pliku cbp w "%1". NMake Generator @@ -3602,9 +4062,13 @@ Przyczyna: %3 MinGW Generator Generator MinGW + + No valid CMake executable specified. + Brak poprawnego pliku wykonywalnego CMake. + No valid cmake executable specified. - Brak poprawnego pliku wykonywalnego cmake. + Brak poprawnego pliku wykonywalnego cmake. @@ -3614,16 +4078,28 @@ Przyczyna: %3 Budowanie - New configuration + New Configuration Nowa konfiguracja - New Configuration Name: + New configuration name: Nazwa nowej konfiguracji: + + New configuration + Nowa konfiguracja + + + New Configuration Name: + Nazwa nowej konfiguracji: + CMakeProjectManager::Internal::CMakeBuildSettingsWidget + + Reconfigure project: + Przekonfiguruj projekt: + &Change &Zmień @@ -3656,8 +4132,16 @@ Przyczyna: %3 Working Directory: + Katalog roboczy: + + + Working directory: Katalog roboczy: + + Debugger: + Debugger: + Run Environment Środowisko uruchamiania @@ -3805,6 +4289,10 @@ Czy chcesz je nadpisać? Resource Editor Edytor zasobów + + Image Viewer + Przeglądarka plików graficznych + Core::Internal::OpenWithDialog @@ -4011,6 +4499,10 @@ Czy chcesz je nadpisać? Go to Next Split Przejdź do kolejnego podzielonego okna + + The file <i>%1</i> is read only. + Plik <i>%1</i> jest plikiem tylko do odczytu. + Save %1 &As... Zachowaj %1 j&ako... @@ -4029,7 +4521,7 @@ Czy chcesz je nadpisać? All Files (*) - Wszystkie pliki (*) + Wszystkie pliki (*) Opening File @@ -4045,7 +4537,7 @@ Czy chcesz je nadpisać? The file %1 is read only. - Plik %1 jest plikiem tylko do odczytu. + Plik %1 jest plikiem tylko do odczytu. Open with VCS (%1) @@ -4409,15 +4901,15 @@ Czy chcesz je nadpisać? Core::Internal::NavigationWidget Hide Sidebar - Ukrywaj boczny pasek + Ukrywaj boczny pasek Show Sidebar - Pokazuj boczny pasek + Pokazuj boczny pasek Activate %1 Pane - Uaktywnij panel %1 + Uaktywnij panel %1 @@ -4435,7 +4927,7 @@ Czy chcesz je nadpisać? Core::Internal::NavComboBox Activate %1 - Uaktywnij %1 + Uaktywnij %1 @@ -4535,7 +5027,7 @@ Czy chcesz je nadpisać? Core::Internal::ComboBox Activate %1 - Uaktywnij %1 + Uaktywnij %1 @@ -4721,6 +5213,14 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Switch Between Method Declaration/Definition Przełącz między deklaracją a definicją metody + + Open Type Hierarchy + Otwórz hierarchię typów + + + Ctrl+Shift+T + Ctrl+Shift+T + Rename Symbol Under Cursor Zmień nazwę symbolu pod kursorem @@ -4771,6 +5271,10 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. CppTools::Internal::CppCurrentDocumentFilter Methods in current Document + Metody w bieżącym dokumencie + + + Methods in Current Document Metody w bieżącym dokumencie @@ -4986,6 +5490,26 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Revert "%1"... Odwróć zmiany w "%1"... + + Edit + Zmodyfikuj + + + Edit "%1" + Zmodyfikuj "%1" + + + Unedit + Cofnij modyfikacje + + + Unedit "%1" + Cofnij modyfikacje w "%1" + + + Unedit Repository + Cofnij modyfikacje w składnicy + Diff Project "%1" Pokaż różnice w projekcie "%1" @@ -5014,10 +5538,30 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Update Project "%1" Uaktualnij projekt "%1" + + Commit Project + Wyślij projekt + + + Commit Project "%1" + Wyślij projekt "%1" + + + Diff Repository + Pokaż zmiany w składnicy + + + Repository Status + Stan składnicy + Repository Log Dziennik składnicy + + Update Repository + Uaktualnij składnicę + Revert Repository... Odwróć zmiany w składnicy... @@ -5082,10 +5626,22 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Cannot create temporary file: %1 Nie można utworzyć tymczasowego pliku: %1 + + Would you like to discard your changes to the repository '%1'? + + + + Would you like to discard your changes to the file '%1'? + + Project status Stan projektu + + Repository status + Stan składnicy + The initial revision %1 cannot be described. Początkowa poprawka %1 nie może być opisana. @@ -5097,13 +5653,13 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Executing: %1 %2 - Wykonywanie: %1 %2 + Wykonywanie: %1 %2 Executing in %1: %2 %3 - Wykonywanie w %1: %2 %3 + Wykonywanie w %1: %2 %3 @@ -5112,19 +5668,19 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. The process terminated with exit code %1. - Proces zakończył się kodem wyjściowym %1. + Proces zakończył się kodem wyjściowym %1. The process terminated abnormally. - Proces niepoprawnie zakończony. + Proces niepoprawnie zakończony. Could not start cvs '%1'. Please check your settings in the preferences. - Nie można uruchomić cvs "%1". Sprawdź stosowne ustawienia. + Nie można uruchomić cvs "%1". Sprawdź stosowne ustawienia. CVS did not respond within timeout limit (%1 ms). - CVS nie odpowiedział w określonym czasie (%1 ms). + CVS nie odpowiedział w określonym czasie (%1 ms). @@ -5171,6 +5727,26 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Property Właściwość + + Breakpoint Type: + Typ pułapki: + + + Breakpoint + Breakpoint + + + Watchpoint + Watchpoint + + + Unknown breakpoint type + Nieznany typ pułapki + + + State: + Stan: + Requested Zażądano @@ -5207,6 +5783,10 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Ignore Count: Licznik pominięć: + + Thread Specification: + Specyfikacja wątku: + Number Numer @@ -5235,6 +5815,10 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Address Adres + + Threads + Wątki + Breakpoint will only be hit if this condition is met. Program przerwie działanie w pułapce tylko gdy ten warunek będzie spełniony. @@ -5243,6 +5827,14 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Breakpoint will only be hit after being ignored so many times. Program przerwie działanie w pułapce po tym jak zostanie ona zignorowana podaną ilość razy. + + (all) + (wszystko) + + + Breakpoint will only be hit in the specified thread(s). + Program przerwie działanie w pułapce tylko w podanych wątkach. + Debugger::Internal::BreakWindow @@ -5274,9 +5866,33 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Always Adjust Column Widths to Contents Zawsze wyrównuj szerokości kolumn do ich zawartości + + Edit Breakpoint... + Zmodyfikuj pułapkę... + + + Associate Breakpoint With All Threads + Skojarz pułapkę ze wszystkimi wątkami + + + Associate Breakpoint With Thread %1 + Skojarz pułapkę z wątkiem %1 + + + Add Breakpoint... + Dodaj pułapkę... + + + Edit Breakpoint Properties + Zmodyfikuj właściwości pułapki + + + Set Breakpoint... + Ustaw pułapkę... + Edit Condition... - Zmodyfikuj warunek... + Zmodyfikuj warunek... Synchronize Breakpoints @@ -5308,11 +5924,11 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Set Breakpoint at Function... - Ustaw pułapkę w funkcji... + Ustaw pułapkę w funkcji... Set Breakpoint at Function "main" - Ustaw pułapkę w funkcji "main" + Ustaw pułapkę w funkcji "main" Set Breakpoint at "throw" @@ -5324,7 +5940,7 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Conditions on Breakpoint %1 - Warunki dla pułapki %1 + Warunki dla pułapki %1 @@ -5332,123 +5948,119 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. The function "%1()" failed: %2 Function call failed - Funkcja "%1()" zakończona niepowodzeniem: %2 + Funkcja "%1()" zakończona niepowodzeniem: %2 Version: %1 - Wersja: %1 + Wersja: %1 <html>The installed version of the <i>Debugging Tools for Windows</i> (%1) is rather old. Upgrading to version %2 is recommended for the proper display of Qt's data types.</html> - <html>Zainstalowana wersja <i>narzędzi debugowych dla Windows</i> (%1) jest przestarzała. Zalecane jest uaktualnienie do wersji %2 w celu poprawnego wyświetlania typów danych Qt.</html> + <html>Zainstalowana wersja <i>narzędzi debugowych dla Windows</i> (%1) jest przestarzała. Zalecane jest uaktualnienie do wersji %2 w celu poprawnego wyświetlania typów danych Qt.</html> Debugger - Debugger + Debugger The dumper library was not found at %1. - Biblioteka zrzutów nie została znaleziona w %1. - - - The console stub process was unable to start '%1'. - + Biblioteka zrzutów nie została znaleziona w %1. Attaching to core files is not supported! - Dołączanie się do pliku zrzutu nie jest obsługiwane! + Dołączanie się do pliku zrzutu nie jest obsługiwane! The process exited with exit code %1. - Proces zakończył się kodem wyjściowym %1. + Proces zakończył się kodem wyjściowym %1. Continuing with '%1'... - Kontynuacja z "%1"... + Kontynuacja z "%1"... Unable to continue: %1 - Nie można kontynuować: %1 + Nie można kontynuować: %1 Reverse stepping is not implemented. - Kroczenie wstecz nie jest zaimplementowane. + Kroczenie wstecz nie jest zaimplementowane. Thread %1 cannot be stepped. - Wątek %1 nie może być śledzony krok po kroku. + Wątek %1 nie może być śledzony krok po kroku. Stepping %1 - Kroczenie %1 + Kroczenie %1 Running requested... - Zażądano uruchomienia... + Zażądano uruchomienia... Running up to %1:%2... - Wykonanie do osiągnięcia %1:%2... + Wykonanie do osiągnięcia %1:%2... Running up to function '%1()'... - Wykonanie do osiągnięcia funkcji '%1()'... + Wykonanie do osiągnięcia funkcji '%1()'... Jump to line is not implemented - Skok do linii nie jest obsługiwany + Skok do linii nie jest obsługiwany Unable to assign the value '%1' to '%2': %3 - Nie można podstawić wartości "%1" do "%2": %3 + Nie można podstawić wartości "%1" do "%2": %3 Unable to retrieve %1 bytes of memory at 0x%2: %3 - Nie można odczytać %1 bajtów pamięci spod adresu 0x%2: %3 + Nie można odczytać %1 bajtów pamięci spod adresu 0x%2: %3 Cannot retrieve symbols while the debuggee is running. - Nie można odczytać symboli dopóki debugowany program pracuje. + Nie można odczytać symboli dopóki debugowany program pracuje. Debugger Error - Błąd debuggera + Błąd debuggera Ignoring initial breakpoint... - Zignorowano początkową pułapkę... + Zignorowano początkową pułapkę... Interrupted in thread %1, current thread: %2 - Przerwano w wątku %1, bieżący wątek: %2 + Przerwano w wątku %1, bieżący wątek: %2 Stopped, current thread: %1 - Zatrzymano, bieżący wątek: %1 + Zatrzymano, bieżący wątek: %1 Changing threads: %1 -> %2 - Zmiana wątków: %1 -> %2 + Zmiana wątków: %1 -> %2 Stopped at %1:%2 in thread %3. - Zatrzymano w %1:%2 w wątku %3. + Zatrzymano w %1:%2 w wątku %3. Stopped at %1 in thread %2 (missing debug information). - Zatrzymano w %1 w wątku %2 (brak informacji debugowej). + Zatrzymano w %1 w wątku %2 (brak informacji debugowej). Stopped at %1 (%2) in thread %3 (missing debug information). - Zatrzymano w %1 (%2) w wątku %3 (brak informacji debugowej). + Zatrzymano w %1 (%2) w wątku %3 (brak informacji debugowej). Stopped in thread %1 (missing debug information). - Zatrzymano w wątku %1 (brak informacji debugowej). + Zatrzymano w wątku %1 (brak informacji debugowej). Breakpoint: %1 - Pułapka: %1 + Pułapka: %1 @@ -5487,11 +6099,11 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Initializing dumpers... - + Inicjalizacja zrzutów... Disabling dumpers due to debuggee crash... - + Wyłączanie zrzutów z powodu zakończenia pracy debugowanego programu... Querying dumpers for '%1'/'%2' (%3) @@ -5566,7 +6178,7 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Pick a local cache directory - Wybierz katalog z lokalnym cache + Wybierz katalog z lokalnym cache @@ -5577,7 +6189,7 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. This switches the Locals&Watchers view to automatically derefence pointers. This saves a level in the tree view, but also loses data for the now-missing intermediate level. - Włącza automatyczne wyłuskiwanie wskaźników w widoku ze zmiennymi lokalnymi i obserwowanymi. Brak jednego poziomu w widoku upraszcza go, ale jednocześnie powoduje utratę danych w brakującym poziomie pośrednim. + Włącza automatyczne wyłuskiwanie wskaźników w widoku ze zmiennymi lokalnymi i obserwowanymi. Brak jednego poziomu w widoku upraszcza go, ale jednocześnie powoduje utratę danych w brakującym poziomie pośrednim. Debugger Properties... @@ -5617,15 +6229,19 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Watch Expression "%1" - Obserwuj wyrażenie "%1" + Obserwuj wyrażenie "%1" Remove Watch Expression "%1" - Usuń obserwowanie wyrażenia "%1" + Usuń obserwowanie wyrażenia "%1" Watch Expression "%1" in Separate Window - Obserwuj wyrażenie "%1" w osobnym oknie + Obserwuj wyrażenie "%1" w osobnym oknie + + + This switches the Locals&Watchers view to automatically dereference pointers. This saves a level in the tree view, but also loses data for the now-missing intermediate level. + Włącza automatyczne wyłuskiwanie wskaźników w widoku ze zmiennymi lokalnymi i obserwowanymi. Brak jednego poziomu w widoku upraszcza go, ale jednocześnie powoduje utratę danych w brakującym poziomie pośrednim. Show "std::" Namespace in Types @@ -5635,6 +6251,10 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Show Qt's Namespace in Types Pokazuj przestrzeń nazw Qt w widoku typów + + Sort Members of Classes and Structs Alphabetically + Sortuj alfabetycznie składniki klas i struktur + Use Debugging Helpers Używaj asystenta debuggera @@ -5653,7 +6273,15 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Recheck Debugging Helper Availability - Sprawdź ponownie dostępność asystenta debuggera + Sprawdź ponownie dostępność asystenta debuggera + + + This switches the Locals&&Watchers view to automatically dereference pointers. This saves a level in the tree view, but also loses data for the now-missing intermediate level. + Włącza automatyczne wyłuskiwanie wskaźników w widoku ze zmiennymi lokalnymi i obserwowanymi. Brak jednego poziomu w widoku upraszcza go, ale jednocześnie powoduje utratę danych w brakującym poziomie pośrednim. + + + Use QML Observer + Użyj QML Observera Synchronize Breakpoints @@ -5667,6 +6295,14 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Selecting this causes breakpoint synchronization being done after each step. This results in up-to-date breakpoint information on whether a breakpoint has been resolved after loading shared libraries, but slows down stepping. Wybranie tej opcji spowoduje synchronizację pułapek po każdym kroku. W rezultacie informacja o rozwiązaniu pułapek po załadowaniu dzielonych bibliotek będzie aktualizowana na bieżąco, ale kroki będą wykonywane w dłuższym czasie. + + Adjust Breakpoint Locations + Poprawiaj położenia pułapek + + + Not all source code lines generate executable code. Putting a breakpoint on such a line acts as if the breakpoint was set on the next line that generated code. Selecting 'Adjust Breakpoint Locations' shifts the red breakpoint markers in such cases to the location of the true breakpoint. + + Break on "throw" Przerwij w "throw" @@ -5737,11 +6373,11 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Change debugger language automatically - Automatycznie zmieniaj język debuggera + Automatycznie zmieniaj język debuggera Changes the debugger language according to the currently opened file. - Zmienia język debuggera odpowiednio do zawartości otwartego pliku. + Zmienia język debuggera odpowiednio do zawartości otwartego pliku. Checking this will enable tooltips in the locals view during debugging. @@ -5791,85 +6427,85 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Error Loading Symbols - Błąd w trakcie ładowania symboli + Błąd w trakcie ładowania symboli No executable to load symbols from specified. - Nie podano programu z którego można załadować symbole. + Nie podano programu z którego można załadować symbole. Symbols found. - Symbole odnalezione. + Symbole odnalezione. Loading symbols from "%1" failed: - Nie można załadować symboli z "%1": + Nie można załadować symboli z "%1": Attached to core temporarily. - Tymczasowo dołączono do zrzutu. + Tymczasowo dołączono do zrzutu. Unable to determine executable from core file. - Nie można określić pliku wykonywalnego na podstawie zrzutu pamięci. + Nie można określić pliku wykonywalnego na podstawie zrzutu pamięci. Attached to core. - Dołączono do zrzutu. + Dołączono do zrzutu. Attach to core "%1" failed: - Dołączenie do zrzutu "%1" nie powiodło się: + Dołączenie do zrzutu "%1" nie powiodło się: Cannot set up communication with child process: %1 - Nie można ustanowić komunikacji z podprocesem: %1 + Nie można ustanowić komunikacji z podprocesem: %1 Starting executable failed: - Nie można uruchomić programu: + Nie można uruchomić programu: The upload process failed to start. Shell missing? - Nie można rozpocząć procesu przesyłania. Brak powłoki? + Nie można rozpocząć procesu przesyłania. Brak powłoki? The upload process crashed some time after starting successfully. - Proces przesyłania zakończony błędem po poprawnym uruchomieniu. + Proces przesyłania zakończony błędem po poprawnym uruchomieniu. The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again. - Ostatnie wywołanie funkcji waitFor...() zakończyło się niepowodzeniem po określonym czasie. Stan QProcess się nie zmienił, możesz ponownie spróbować wywołać waitFor...(). + Ostatnie wywołanie funkcji waitFor...() zakończyło się niepowodzeniem po określonym czasie. Stan QProcess się nie zmienił, możesz ponownie spróbować wywołać waitFor...(). An error occurred when attempting to write to the upload process. For example, the process may not be running, or it may have closed its input channel. - Wystąpił błąd podczas próby pisania do procesu przesyłania. Być może proces nie jest uruchomiony lub zamknął on swój kanał wejściowy. + Wystąpił błąd podczas próby pisania do procesu przesyłania. Być może proces nie jest uruchomiony lub zamknął on swój kanał wejściowy. An error occurred when attempting to read from the upload process. For example, the process may not be running. - Wystąpił błąd podczas próby czytania z procesu przesyłania. Być może proces nie jest uruchomiony. + Wystąpił błąd podczas próby czytania z procesu przesyłania. Być może proces nie jest uruchomiony. An unknown error in the upload process occurred. This is the default return value of error(). - Wystąpił nieznany błąd podczas procesu przesyłania. Jest to domyślna wartość zwrócona przez error(). + Wystąpił nieznany błąd podczas procesu przesyłania. Jest to domyślna wartość zwrócona przez error(). Error - Błąd + Błąd Starting remote executable failed: - Uruchamianie zdalnego programu zakończone niepowodzeniem: + Uruchamianie zdalnego programu zakończone niepowodzeniem: Debugger Error - Błąd debuggera + Błąd debuggera @@ -5908,6 +6544,10 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Select Executable Wybierz plik wykonywalny + + Select Working Directory + Wybierz katalog roboczy + Executable: Plik wykonywalny: @@ -5940,6 +6580,10 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Debugger::Internal::AddressDialog Select start address + Wybierz adres startowy + + + Select Start Address Wybierz adres startowy @@ -5951,156 +6595,156 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. Debugger::DebuggerManager Continue - Kontynuuj + Kontynuuj Interrupt - Przerwij + Przerwij Step Over - Przeskocz + Przeskocz Step Into - Wskocz do wnętrza + Wskocz do wnętrza Step Out - Wyskocz na zewnątrz + Wyskocz na zewnątrz Run to Line - Uruchom do linii + Uruchom do linii Run to Outermost Function - Uruchom do skrajnej funkcji + Uruchom do skrajnej funkcji Immediately Return From Inner Function - Powróć natychmiast z wewnętrznej funkcji + Powróć natychmiast z wewnętrznej funkcji Jump to Line - Skocz do linii + Skocz do linii Toggle Breakpoint - Przełącz ustawienie pułapki + Przełącz ustawienie pułapki Add to Watch Window - Dodaj do okna obserwowanych + Dodaj do okna obserwowanych Snapshot - Zrzut + Zrzut Reverse Direction - Odwrotny kierunek + Odwrotny kierunek Running... - Uruchamianie... + Uruchamianie... Changing breakpoint state requires either a fully running or fully stopped application. - Zmienianie stanu pułapki wymaga albo w pełni uruchomionej albo w pełni zatrzymanej aplikacji. + Zmienianie stanu pułapki wymaga albo w pełni uruchomionej albo w pełni zatrzymanej aplikacji. The application requires the debugger engine '%1', which is disabled. - Program wymaga silnika debuggera '%1', który jest wyłączony. + Program wymaga silnika debuggera '%1', który jest wyłączony. Starting debugger for tool chain '%1'... - Uruchamianie debuggera dla zestawu narzędzi '%1'... + Uruchamianie debuggera dla zestawu narzędzi '%1'... Cannot debug '%1' (tool chain: '%2'): %3 - Nie można debugować "%1" (zestaw narzędzi: "%2"): %3 + Nie można debugować "%1" (zestaw narzędzi: "%2"): %3 Warning - Ostrzeżenie + Ostrzeżenie Save Debugger Log - Zachowaj dziennik debuggera + Zachowaj dziennik debuggera %1 (explicitly set in the Debugger Options) - %1 (ustawione jawnie w opcjach debuggera) + %1 (ustawione jawnie w opcjach debuggera) Open Qt preferences - Otwórz ustawienia Qt + Otwórz ustawienia Qt Turn off helper usage - Wyłącz asystenta + Wyłącz asystenta The debugger could not load the debugging helper library. - Debugger nie mógł załadować biblioteki asystenta debuggera. + Debugger nie mógł załadować biblioteki asystenta debuggera. The debugging helper is used to nicely format the values of some Qt and Standard Library data types. It must be compiled for each used Qt version separately. This can be done in the Qt preferences page by selecting a Qt installation and clicking on 'Rebuild' in the 'Debugging Helper' row. - Asystent debuggera jest używany do ładnego formatowania niektórych typów Qt i Biblioteki Standardowej. Musi być skompilowany oddzielnie dla każdej używanej wersji Qt. Można to zrobić z poziomu strony ustawień Qt poprzez wybranie instalacji Qt i kliknięcie na "Przebuduj" w linijce "Asystent debuggera". + Asystent debuggera jest używany do ładnego formatowania niektórych typów Qt i Biblioteki Standardowej. Musi być skompilowany oddzielnie dla każdej używanej wersji Qt. Można to zrobić z poziomu strony ustawień Qt poprzez wybranie instalacji Qt i kliknięcie na "Przebuduj" w linijce "Asystent debuggera". Continue anyway - Kontynuuj + Kontynuuj Abort Debugging - Przerwij debugowanie + Przerwij debugowanie Aborts debugging and resets the debugger to the initial state. - Przerywa debugowanie i przywraca debugger do stanu początkowego. + Przerywa debugowanie i przywraca debugger do stanu początkowego. Stopped - Zatrzymano + Zatrzymano Exited - Zakończono + Zakończono Debugging helper missing - Brak asystenta debuggera + Brak asystenta debuggera Stop Debugger - Zatrzymaj debugger + Zatrzymaj debugger DebuggerPane Clear Contents - Wyczyść zawartość + Wyczyść zawartość Save Contents - Zachowaj zawartość + Zachowaj zawartość InputPane Type Ctrl-<Return> to execute a line. - Naciśnij Ctrl-<Return> aby wykonać linię. + Naciśnij Ctrl-<Return> aby wykonać linię. Debugger::Internal::DebuggerOutputWindow Debugger - Debugger + Debugger @@ -6115,16 +6759,16 @@ Zwróć uwagę że spowoduje to usunięcie lokalnego pliku. A debugging session is still in progress. Would you like to terminate it? - Trwa sesja debugowa. + Trwa sesja debugowa. Czy chcesz ją zakończyć? Close Debugging Session - Zakończ sesję debugową + Zakończ sesję debugową A debugging session is still in progress. Terminating the session in the current state (%1) can leave the target in an inconsistent state. Would you still like to terminate it? - Trwa sesja debugowa. Zakończenie jej w bieżącym stanie (%1) może spowodować, że program znajdzie się w niespójnym stanie. Czy wciąż chcesz ją zakończyć? + Trwa sesja debugowa. Zakończenie jej w bieżącym stanie (%1) może spowodować, że program znajdzie się w niespójnym stanie. Czy wciąż chcesz ją zakończyć? @@ -6146,97 +6790,90 @@ Czy chcesz ją zakończyć? Debugger::Internal::DebuggerPlugin Option '%1' is missing the parameter. - Brak parametru w opcji "%1". + Brak parametru w opcji "%1". The parameter '%1' of option '%2' is not a number. - Parametr "%1" w opcji "%2" nie jest liczbą. + Parametr "%1" w opcji "%2" nie jest liczbą. Invalid debugger option: %1 - Niepoprawna opcja debuggera: %1 + Niepoprawna opcja debuggera: %1 Error evaluating command line arguments: %1 - Błąd podczas przetwarzania argumentów komendy: %1 + Błąd podczas przetwarzania argumentów komendy: %1 Start and Debug External Application... - Uruchom i zdebuguj zewnętrzną aplikację... + Uruchom i zdebuguj zewnętrzną aplikację... Attach to Running External Application... - Dołącz do uruchomionej zewnętrznej aplikacji... + Dołącz do uruchomionej zewnętrznej aplikacji... Attach to Core... - Dołącz do zrzutu... + Dołącz do zrzutu... Start and Attach to Remote Application... - Uruchom i dołącz do zdalnej aplikacji... + Uruchom i dołącz do zdalnej aplikacji... Detach Debugger - Odłącz debugger + Odłącz debugger Stop Debugger/Interrupt Debugger - Zatrzymaj debugger / przerwij debugger + Zatrzymaj debugger / przerwij debugger Reset Debugger - Wyzeruj debugger + Wyzeruj debugger Threads: - Wątki: + Wątki: Attaching to PID %1. - Dołączanie do PID %1. + Dołączanie do PID %1. Remove Breakpoint - Usuń pułapkę + Usuń pułapkę Disable Breakpoint - Wyłącz pułapkę + Wyłącz pułapkę Enable Breakpoint - Włącz pułapkę + Włącz pułapkę Set Breakpoint - Ustaw pułapkę + Ustaw pułapkę Warning - Ostrzeżenie + Ostrzeżenie Cannot attach to PID 0 - Nie można dołączyć się do PID 0 + Nie można dołączyć się do PID 0 Attaching to core %1. - Dołączanie do zrzutu %1. + Dołączanie do zrzutu %1. Debugger::Internal::DebuggerRunControlFactory Debug - Debug - - - - Debugger::Internal::DebuggerRunControl - - Debugger - + Debug @@ -6276,11 +6913,11 @@ Czy chcesz ją zakończyć? Debugger::Internal::CoreGdbAdapter Error Loading Symbols - Błąd w trakcie ładowania symboli + Błąd w trakcie ładowania symboli No executable to load symbols from specified. - Nie podano programu z którego można załadować symbole. + Nie podano programu z którego można załadować symbole. Loading symbols from "%1" failed: @@ -6290,7 +6927,7 @@ Czy chcesz ją zakończyć? Attached to core temporarily. - Tymczasowo dołączono do zrzutu. + Tymczasowo dołączono do zrzutu. Unable to determine executable from core file. @@ -6299,22 +6936,27 @@ Czy chcesz ją zakończyć? Attach to core "%1" failed: - Dołączenie do zrzutu "%1" nie powiodło się: + Dołączenie do zrzutu "%1" zakończone niepowodzeniem: + Symbols found. - Symbole odnalezione. + Symbole odnalezione. + + + Attach to core failed. + Dołączenie do zrzutu zakończone niepowodzeniem. Attached to core. - Dołączono do zrzutu. + Dołączono do zrzutu. Debugger::Internal::GdbEngine The Gdb process failed to start. Either the invoked program '%1' is missing, or you may have insufficient permissions to invoke the program. - Nie można rozpocząć procesu Gdb. Brak programu "%1" albo brak wymaganych uprawnień aby go uruchomić. + Nie można rozpocząć procesu Gdb. Brak programu "%1" albo brak wymaganych uprawnień aby go uruchomić. The Gdb process crashed some time after starting successfully. @@ -6346,7 +6988,7 @@ Czy chcesz ją zakończyć? Running... - Uruchamianie... + Uruchamianie... Stop requested... @@ -6354,7 +6996,7 @@ Czy chcesz ją zakończyć? Stopping temporarily. - Zatrzymywanie tymczasowe. + Zatrzymywanie tymczasowe. Executable failed @@ -6362,7 +7004,7 @@ Czy chcesz ją zakończyć? Process failed to start. - Nie można uruchomić procesu. + Nie można uruchomić procesu. Executable failed: %1 @@ -6374,7 +7016,7 @@ Czy chcesz ją zakończyć? Processing queued commands. - Przetwarzanie kolejki komend. + Przetwarzanie kolejki komend. Loading %1... @@ -6408,6 +7050,18 @@ Czy chcesz ją zakończyć? Running requested... Zażądano uruchomienia... + + Watchpoint %1 at %2 triggered: + + + + Stopped at breakpoint %1 in thread %2 + Zatrzymano w pułapce %1 w wątku %2. {1 ?} {2?} + + + Raw structure + + Step requested... @@ -6440,6 +7094,10 @@ Czy chcesz ją zakończyć? Unable to run '%1': %2 Nie można uruchomić "%1": %2 + + Retrieving data for stack view thread 0x%1... + + Retrieving data for stack view... Pobieranie danych dla widoku stosu... @@ -6464,6 +7122,15 @@ Czy chcesz ją zakończyć? Debugging helpers not found. Brak asystentów debuggera. + + Debugging helpers: Qt version mismatch + Asystenci debuggera: Niezgodna wersja Qt + + + The Qt version used to build the debugging helpers (%1) does not match the Qt version used to build the debugged application (%2). +This might yield incorrect results. + + Custom dumper setup: %1 @@ -6483,6 +7150,7 @@ Czy chcesz ją zakończyć? <shadowed> + Type of local variable or parameter shadowed by another variable of the same name in a nested block. <przykryto> @@ -6504,7 +7172,7 @@ Czy chcesz ją zakończyć? Unable to start gdb '%1': %2 - Nie można uruchomić gdb "%1": %2 + Nie można uruchomić gdb "%1": %2 Gdb I/O Error @@ -6534,12 +7202,12 @@ Czy chcesz ją zakończyć? Snapshot Reloading - Przeładowywanie zrzutu + Przeładowywanie zrzutu In order to load snapshots the debugged process needs to be stopped. Continuation will not be possible afterwards. Do you want to stop the debugged process and load the selected snapshot? - W celu załadowania zrzutów należy zatrzymać debugowany proces. Kontynuacja debugowania nie będzie wtedy możliwa. + W celu załadowania zrzutów należy zatrzymać debugowany proces. Kontynuacja debugowania nie będzie wtedy możliwa. Czy chcesz zatrzymać debugowany proces i załadować wybrany zrzut? @@ -6562,6 +7230,11 @@ Czy chcesz zatrzymać debugowany proces i załadować wybrany zrzut?Cannot find debugger initialization script Nie można odnaleźć skryptu inicjalizującego dla debuggera + + The Gdb process failed to start. Either the invoked program '%1' is missing, or you may have insufficient permissions to invoke the program. +%2 + + Library %1 loaded Załadowano bibliotekę %1 @@ -6590,6 +7263,14 @@ Czy chcesz zatrzymać debugowany proces i załadować wybrany zrzut?Thread %1 selected Wybrano wątek %1 + + Stopping temporarily + Zatrzymywanie tymczasowe + + + Processing queued commands + Przetwarzanie kolejki komend + The gdb process has not responded to a command within %1 seconds. This could mean it is stuck in an endless loop or taking longer than expected to perform the operation. You can choose between waiting longer or abort debugging. @@ -6608,6 +7289,10 @@ Możesz poczekać dłużej na odpowiedź lub przerwać debugowanie.Stop debugging Zatrzymaj debugowanie + + Process failed to start + Nie można uruchomić procesu + <unknown> <nieznany> @@ -6634,7 +7319,7 @@ Możesz poczekać dłużej na odpowiedź lub przerwać debugowanie. Stopped at breakpoint %1 in thread %2. - Zatrzymano w pułapce %1 w wątku %2. + Zatrzymano w pułapce %1 w wątku %2. <Unknown> @@ -6678,7 +7363,7 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Launching - Uruchamianie + Uruchamianie Immediate return from function requested... @@ -6686,7 +7371,7 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. ATTEMPT BREAKPOINT SYNC - PRÓBA SYNCHRONIZACJI PUŁAPEK + PRÓBA SYNCHRONIZACJI PUŁAPEK <unknown> @@ -6698,6 +7383,10 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Jumping out of bogus frame... Wyskakiwanie z błędnej ramki... + + Setting up inferior... + + Failed to start application: Nie można uruchomić aplikacji: @@ -6720,7 +7409,7 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Starting inferior... - Uruchamianie podprocesu... + Uruchamianie podprocesu... Adapter crashed @@ -6801,6 +7490,10 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Process started, PID: 0x%1, thread id: 0x%2, code segment: 0x%3, data segment: 0x%4. Proces uruchomiony, PID: 0x%1, identyfikator wątku: 0x%2, segment kodu: 0x%3, segment danych: 0x%4. + + The reported code segment address (0x%1) might be invalid. Symbol resolution or setting breakoints may not work. + + Connecting to TRK server adapter failed: @@ -6822,9 +7515,17 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Module name Nazwa modułu + + Module path + Ścieżka do modułu + Symbols read - Przeczytane symbole + Symbole przeczytane + + + Symbols type + Typ symboli Start address @@ -6834,6 +7535,18 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. End address Adres końcowy + + unknown + nieznane + + + plain + zwykłe + + + fast + szybkie + Debugger::Internal::ModulesWindow @@ -6853,6 +7566,10 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Load Symbols for All Modules Załaduj symbole ze wszystkich modułów + + Examine All Modules + Sprawdź wszystkie moduły + Load Symbols for Module Załaduj symbole z modułu @@ -6887,19 +7604,19 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Address - Adres + Adres Code - Kod + Kod Symbol - Symbol + Symbol Symbols in "%1" - Symbole w "%1" + Symbole w "%1" @@ -7104,6 +7821,10 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Debugger::Internal::ScriptEngine + + Error: + Błąd: + Running requested... Zażądano uruchomienia... @@ -7133,11 +7854,11 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Debugger::Internal::SourceFilesModel Internal name - Nazwa wewnętrzna + Nazwa wewnętrzna Full name - Pełna nazwa + Pełna nazwa @@ -7218,15 +7939,39 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Debugger::Internal::ThreadsHandler Thread: %1 - Wątek: %1 + Wątek: %1 Thread: %1 at %2 (0x%3) - Wątek: %1 w %2 (0x%3) + Wątek: %1 w %2 (0x%3) Thread: %1 at %2, %3:%4 (0x%5) - Wątek: %1 w %2, %3:%4 (0x%5) + Wątek: %1 w %2, %3:%4 (0x%5) + + + Thread&nbsp;id: + Identyfikator&nbsp;wątku: + + + Target&nbsp;id: + Identyfikator&nbsp;produktu: + + + Name: + Nazwa: + + + State: + Stan: + + + Core: + Zrzut: + + + Stopped&nbsp;at: + Zatrzymano&nbsp;w: Thread ID @@ -7248,6 +7993,18 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Address Adres + + Core + Zrzut + + + State + Stan + + + Name + Nazwa + Debugger::Internal::StackWindow @@ -7263,9 +8020,17 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Open Memory Editor Otwórz edytor pamięci + + Open Memory Editor at 0x%1 + Otwórz edytor pamięci z adresem 0x%1 + + + Open Disassembler at 0x%1 + Otwórz deasembler w 0x%1 + Open Memory Editor at %1 - Otwórz edytor pamięci z adresem %1 + Otwórz edytor pamięci z adresem %1 Open Disassembler @@ -7273,7 +8038,7 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Open Disassembler at %1 - Otwórz deasembler w %1 + Otwórz deasembler w %1 Adjust Column Widths to Contents @@ -7303,10 +8068,12 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Debugger::Internal::WatchData <not in scope> + Value of variable in Debugger Locals display for variables out of scope (stopped above initialization). <poza zakresem> %1 <shadowed %2> + Display of variables shadowed by variables of the same name in nested scopes: Variable %1 is the variable name, %2 is a simple count. %1 <przykryło %2> @@ -7348,6 +8115,10 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Root Korzeń + + Return Value + Zwrócona wartość + Locals Zmienne lokalne @@ -7360,13 +8131,49 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Tooltip Podpowiedź + + <empty> + <pusty> + + + <uninitialized> + <niezainicjalizowany> + + + <invalid> + <niepoprawny> + + + <not accessible> + <niedostępny> + + + <%n items> + + <%n element> + <%n elementy> + <%n elementów> + + + + %1 Object at %2 + Obiekt %1 pod adresem %2 + + + %1 Object at Unknown Address + Obiekt %1 pod nieznanym adresem + + + Locals & Watchers + Zmienne lokalne i obserwowane + unknown address - nieznany adres + nieznany adres %1 object at %2 - %1 obiekt w %2 + %1 obiekt w %2 <Edit> @@ -7393,7 +8200,15 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Bald pointer - Łysy wskaźnik + Łysy wskaźnik + + + <Edit> + <Zmodyfikuj> + + + Raw pointer + Wskaźnik Latin1 string @@ -7436,10 +8251,10 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. %n known types, Qt version: %1, Qt namespace: %2 Dumper version: %3 - - - - + + %n znany typ, wersja Qt: %1, przestrzeń nazw Qt: %2, wersja zrzutu: %3 + %n znane typy, wersja Qt: %1, przestrzeń nazw Qt: %2, wersja zrzutu: %3 + %n znanych typów, wersja Qt: %1, przestrzeń nazw Qt: %2, wersja zrzutu: %3 @@ -7453,13 +8268,57 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Change Format for Type "%1" Zmień format typu "%1" + + Automatic + Automatyczny + Change Format for Type Zmień format typu + + Change Format for Object Named "%1" + Zmień format obiektu o nazwie %1 + + + Open Memory Editor at Object's Address (0x%1) + Otwórz edytor pamięci z adresem obiektu (0x%1) + + + Open Memory Editor at Referenced Address (0x%1) + + + + Break on Changes at Object's Address (0x%1) + + + + Break on Changes at Referenced Address (0x%1) + + + + Break on Changing Contents + + + + Watch Expression + Obserwuj wyrażenie + + + Watch Expression "%1" + Obserwuj wyrażenie "%1" + + + Remove Watch Expression + Usuń obserwowanie wyrażenia + + + Remove Watch Expression "%1" + Usuń obserwowanie wyrażenia "%1" + Change Format for Object at %1 - Zmień format obiektu w %1 + Zmień format obiektu w %1 Change Format for Object @@ -7479,12 +8338,16 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Open Memory Editor at %1 - Otwórz edytor pamięci z adresem %1 + Otwórz edytor pamięci z adresem %1 Refresh Code Model Snapshot Odśwież kopię modelu danych + + Show View Contents in Editor + + Adjust Column Widths to Contents Wyrównaj szerokości kolumn do ich zawartości @@ -7495,7 +8358,7 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Clear - Wyczyść + Wyczyść @@ -7517,7 +8380,7 @@ Zaleca się użycie gdb wersji 7.1 lub późniejszej. Designer Xml Editor - Edytor xml + Edytor xml Designer @@ -7633,6 +8496,18 @@ Spróbuj ponownie przebudować projekt. Ctrl+J Ctrl+J + + Alt+Shift+R + Alt+Shift+R + + + Switch Source/Form + Przełącz między źródłem a formularzem + + + Shift+F4 + Shift+F4 + Signals && Slots Editor Edytor sygnałów / slotów @@ -7663,7 +8538,7 @@ Spróbuj ponownie przebudować projekt. Ctrl+Alt+R - Ctrl+Alt+R + Ctrl+Alt+R About Qt Designer plugins.... @@ -7743,7 +8618,7 @@ Spróbuj ponownie przebudować projekt. No documents matching '%1' could be found. Rebuilding the project might help. - Brak dokumentów załączających "%1". + Brak dokumentów dołączających "%1". Przebudowanie projektu może pomóc w ich odnalezieniu. @@ -7884,15 +8759,15 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. FakeVim::Internal::FakeVimPluginPrivate Switch to next file - Przełącz do następnego pliku + Przełącz do następnego pliku Switch to previous file - Przełącz do poprzedniego pliku + Przełącz do poprzedniego pliku Quit FakeVim - Zakończ FakeVim + Zakończ FakeVim File not saved @@ -7943,7 +8818,15 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Replace && Find Next - Zastąp i znajdź następne + Zastąp i znajdź następne + + + Replace + Zastąp + + + Replace && Find + Zastąp i znajdź Ctrl+= @@ -8020,27 +8903,39 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Budowanie - New configuration + New Configuration Nowa konfiguracja - New Configuration Name: + New configuration name: Nazwa nowej konfiguracji: + + New configuration + Nowa konfiguracja + + + New Configuration Name: + Nazwa nowej konfiguracji: + GenericProjectManager::Internal::GenericBuildSettingsWidget Configuration Name: - Nazwa konfiguracji: + Nazwa konfiguracji: Build directory: Katalog budowania wersji: + + Tool chain: + Zestaw narzędzi: + Tool Chain: - Łańcuch narzędzi: + Łańcuch narzędzi: Generic Manager @@ -8136,6 +9031,10 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Clone URL: URL klonu: + + Delete master branch + Usuń gałąź "master" + Git::Internal::GitClient @@ -8155,7 +9054,7 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Executing: %1 %2 Executing: <executable> <arguments> - Uruchamianie: %1 %2 + Uruchamianie: %1 %2 @@ -8215,6 +9114,10 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Nie można usunąć %n plików z %1 plików: %2 + + Unable to move from %1 to %2: %3 + + Unable to reset %1: %2 @@ -8283,6 +9186,31 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Unable apply patch %1 to %2: %3 Nie można zastosować łaty %1 do %2: %3 + + Cannot locate %1. + + + + Unable to launch %1. + + + + Unable to retrieve the last commit data of the repository %1. + + + + Amended %1 (%n file(s)). + + + + + + + + + Amended %1. + + Unable to restore stash %1: %2 @@ -8611,6 +9539,10 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Clean Repository... Wyczyść składnicę... + + Launch gitk + + Saves the current state of your work and resets the repository. Zachowuje bieżący stan Twojej pracy i przywraca składnicę do stanu sprzed zmian. @@ -8635,6 +9567,10 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Alt+G,Alt+C Alt+G,Alt+C + + Amend Last Commit... + + Push Popchnij @@ -8653,13 +9589,33 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Czy chcesz odwrócić wszystkie oczekujące zmiany w składnicy %1? + + Amend %1 + + + + Git Commit + + + + Closing Git Editor + + Unable to retrieve file list Nie można uzyskać listy plików + + Repository Clean + + + + Choose Patch + + Repository clean - Czysta składnica + Czysta składnica The repository is clean. @@ -8671,7 +9627,7 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Choose patch - Wybierz łatę + Wybierz łatę Patch %1 successfully applied to %2 @@ -8723,7 +9679,7 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Closing git editor - Zamykanie edytora git + Zamykanie edytora git Do you want to commit the change? @@ -8741,13 +9697,6 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Nie można odnaleźć pliku binarnego "%1" w ścieżce "%2" - - Git::Internal::GitSubmitEditor - - Git Commit - - - HelloWorld::Internal::HelloWorldPlugin @@ -8814,6 +9763,26 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Filters Filtry + + Unfiltered + Nieprzefiltrowane + + + No user defined filters available or no filter selected. + Brak dostępnych filtrów użytkownika lub żaden filtr nie jest zaznaczony. + + + The filter "%1" will show every documentation file available, as no attributes are specified. + + + + The filter "%1" will only show documentation files that have the attribute %2 specified. + + + + The filter "%1" will only show documentation files that have the attributes %2 specified. + + Help::Internal::GeneralSettingsPage @@ -8823,7 +9792,11 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Open Image - Otwórz plik graficzny + Otwórz plik graficzny + + + Import Bookmarks + Zaimportuj zakładki Files (*.xbel) @@ -8842,6 +9815,10 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Help::Internal::HelpIndexFilter Help index + Indeks pomocy + + + Help Index Indeks pomocy @@ -8963,9 +9940,13 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Poprzedni - Close current Page + Close current page Zamknij bieżącą stronę + + Close current Page + Zamknij bieżącą stronę + Next Następny @@ -9270,7 +10251,7 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Executing: %1 - Wykonywanie: %1 + Wykonywanie: %1 @@ -9416,15 +10397,23 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. The process "%1" crashed. Proces "%1" zakończył pracę błędem. + + Could not start process "%1" %2 + Nie można uruchomić procesu "%1" %2 + Could not start process "%1" - Nie można uruchomić procesu "%1" + Nie można uruchomić procesu "%1" ProjectExplorer::Internal::AllProjectsFilter Files in any project + Pliki we wszystkich projektach + + + Files in Any Project Pliki we wszystkich projektach @@ -9492,6 +10481,10 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Category for build system isses listened under 'Build Issues' System budowania + + Build canceled + Anulowano budowanie + Canceled build. Anulowano budowanie. @@ -9547,60 +10540,89 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Remove Usuń + + Rename + Zmień nazwę + &Clone Selected S&klonuj wybraną - Build Steps - Kroki procesu budowania + Remove Build Configuration + Usuń konfigurację budowania - Clean Steps - Kroki procesu czyszczenia + Do you really want to delete the build configuration <b>%1</b>? + Czy na pewno usunąć konfigurację budowania <b>%1</b>? - Clone configuration + Rename... + Zmień nazwę... + + + New name for build configuration <b>%1</b>: + Nowa nazwa dla konfiguracji budowania <b>%1</b>: + + + Clone Configuration + Title of a the cloned BuildConfiguration window, text of the window Sklonuj konfigurację - New Configuration Name: + New configuration name: Nazwa nowej konfiguracji: + + Build Steps + Kroki procesu budowania + + + Clean Steps + Kroki procesu czyszczenia + + + Clone configuration + Sklonuj konfigurację + + + New Configuration Name: + Nazwa nowej konfiguracji: + ProjectExplorer::Internal::BuildStepsPage Move Up - Przenieś do góry + Przenieś do góry Move Down - Przenieś na dół + Przenieś na dół Remove Item - Usuń element + Usuń element Removing Step failed - Nie można usunąć kroku + Nie można usunąć kroku Can't remove build step while building - Nie można usunąć kroku podczas budowania + Nie można usunąć kroku podczas budowania No Build Steps - Brak kroków procesu budowania + Brak kroków procesu budowania Add Clean Step - Dodaj krok do procesu czyszczenia + Dodaj krok do procesu czyszczenia Add Build Step - Dodaj krok do procesu budowania + Dodaj krok do procesu budowania Clean Steps @@ -9622,29 +10644,33 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. ProjectExplorer::Internal::CoreListenerCheckingForRunningBuild Cancel Build && Close - Anuluj budowanie i zamknij + Anuluj budowanie i zamknij Do not Close - Nie zamykaj + Nie zamykaj Close Qt Creator? - Czy zamknąć Qt Creator? + Czy zamknąć Qt Creator? A project is currently being built. - Trwa budowanie projektu. + Trwa budowanie projektu. Do you want to cancel the build process and close Qt Creator anyway? - Czy chcesz anulować proces budowania i zamknąć Qt Creator? + Czy chcesz anulować proces budowania i zamknąć Qt Creator? ProjectExplorer::Internal::CurrentProjectFilter Files in current project + Pliki w bieżącym projekcie + + + Files in Current Project Pliki w bieżącym projekcie @@ -9663,7 +10689,7 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. ProjectExplorer::Internal::CustomExecutableConfigurationWidget Name: - Nazwa: + Nazwa: Executable: @@ -9675,12 +10701,20 @@ Przebudowanie projektu może pomóc w ich odnalezieniu. Working Directory: + Katalog roboczy: + + + Working directory: Katalog roboczy: Run in &Terminal Uruchom w &terminalu + + Debugger: + Debugger: + Run Environment Środowisko uruchamiania @@ -9771,13 +10805,13 @@ Powód: %2 Building debugging helper library in %1 - Budowanie biblioteki asystenta debuggera w %1 + Budowanie biblioteki asystenta debuggera w %1 Running %1 %2... - Uruchamianie %1 %2... + Uruchamianie %1 %2... @@ -9789,7 +10823,7 @@ Powód: %2 Running %1 ... - Uruchamianie %1... + Uruchamianie %1... @@ -9797,6 +10831,10 @@ Powód: %2 DependenciesModel Unable to add dependency + Nie można dodać zależności + + + Unable to Add Dependency Nie można dodać zależności @@ -9818,18 +10856,24 @@ Powód: %2 Value Wartość - - <VARIABLE> - Name when inserting a new variable - <ZMIENNA> - <VALUE> - Value when inserting a new variable + Value when inserting a new variable <WARTOŚĆ> <VARIABLE> + Name when inserting a new variable + <ZMIENNA> + + + <VALUE> + Value when inserting a new variable + <WARTOŚĆ> + + + <VARIABLE> + Name when inserting a new variable <ZMIENNA> @@ -9895,15 +10939,15 @@ Powód: %2 The application is still running. - Aplikacja jest wciąż uruchomiona. + Aplikacja jest wciąż uruchomiona. Force it to quit? - Zakończyć ją? + Zakończyć ją? Force Quit - Zakończ + Zakończ Application Output @@ -9911,7 +10955,7 @@ Powód: %2 Unable to close - Nie można zamknąć + Nie można zamknąć @@ -9937,9 +10981,18 @@ Powód: %2 Could not open the following project: '%1' Nie można otworzyć projektu: "%1" + + All Projects + Wszystkie projekty + ProjectExplorer::Internal::ProcessStep + + Custom Process Step + Default ProcessStep display name + Własny krok procesu + Custom Process Step item in combobox @@ -10031,6 +11084,10 @@ Powód: %2 Rebuild All Przebuduj wszystko + + Deploy All + Zainstaluj wszystko + Clean All Wyczyść wszystko @@ -10055,6 +11112,14 @@ Powód: %2 Rebuild Project "%1" Przebuduj projekt "%1" + + Deploy Project + Zainstaluj projekt + + + Deploy Project "%1" + Zainstaluj projekt "%1" + Clean Project Wyczyść projekt @@ -10071,6 +11136,10 @@ Powód: %2 Rebuild Without Dependencies Przebuduj bez zależności + + Deploy Without Dependencies + Zainstaluj bez zależności + Clean Without Dependencies Wyczyść bez zależności @@ -10083,6 +11152,63 @@ Powód: %2 Ctrl+R Ctrl+R + + Remove Project... + Remove project from parent profile (Project explorer view); will not physically delete any files. + Usuń projekt... + + + Delete File... + Usuń plik... + + + Set as Startup Project + Ustaw jako projekt startowy + + + Cancel Build && Close + Anuluj budowanie i zamknij + + + Do Not Close + Nie zamykaj + + + Close Qt Creator? + Czy zamknąć Qt Creatora? + + + A project is currently being built. + Trwa budowanie projektu. + + + Do you want to cancel the build process and close Qt Creator anyway? + Czy chcesz anulować proces budowania i zamknąć Qt Creatora? + + + Adding Files to Project Failed + Nie można dodać plików do projektu + + + Adding to Version Control Failed + Nie można dodać do systemu kontroli wersji + + + Removing File Failed + Nie można usunąć pliku + + + Deleting File Failed + Nie można usunąć pliku + + + Delete File + Usuń plik + + + Delete %1 from file system? + Usunąć %1 z systemu plików? + Projects (%1) Projekty (%1) @@ -10169,7 +11295,7 @@ Powód: %2 Add files to project failed - Nie można dodać plików do projektu + Nie można dodać plików do projektu Add to Version Control @@ -10191,11 +11317,11 @@ do systemu kontroli wersji (%2)? Add files to version control failed - Nie można dodać plików do systemu kontroli wersji + Nie można dodać plików do systemu kontroli wersji Remove file failed - Nie można usunąć pliku + Nie można usunąć pliku Could not remove file %1 from project %2. @@ -10203,7 +11329,7 @@ do systemu kontroli wersji (%2)? Delete file failed - Nie można usunąć pliku + Nie można usunąć pliku Could not delete file %1. @@ -10226,7 +11352,7 @@ do systemu kontroli wersji (%2)? Run configuration does not match build configuration - Konfiguracja uruchamiania nie odpowiada konfiguracji budowania + Konfiguracja uruchamiania nie jest zgodna z konfiguracją budowania This can happen if the active build configuration uses the wrong Qt version and/or tool chain for the active run configuration (for example, running in Symbian emulator requires building with the WINSCW tool chain). @@ -10258,6 +11384,16 @@ do systemu kontroli wersji (%2)? ProjectExplorer::Internal::ProjectFileWizardExtension + + <Implicitly Add> + <Niejawnie dodaj> + + + The files are implicitly added to the projects: + + Pliki zostały niejawnie dodane do projektów: + + <None> No version control system selected @@ -10265,6 +11401,12 @@ do systemu kontroli wersji (%2)? No project selected <Brak> + + Failed to add subproject '%1' +to project '%2'. + Nie można dodac podprojektu "%1" +do projektu "%2". + Failed to add one or more files to project '%1' (%2). @@ -10284,10 +11426,18 @@ No project selected ProjectExplorer::Internal::ProjectTreeWidget Simplify tree - Uprość drzewo + Uprość drzewo Hide generated files + Ukryj wygenerowane pliki + + + Simplify Tree + Uprość drzewo + + + Hide Generated Files Ukryj wygenerowane pliki @@ -10302,9 +11452,13 @@ No project selected Projekty - Filter tree + Filter Tree Przefiltruj drzewo + + Filter tree + Przefiltruj drzewo + ProjectExplorer::Internal::ProjectWelcomePage @@ -10332,11 +11486,39 @@ No project selected ProjectExplorer::Internal::RunSettingsWidget Add - Dodaj + Dodaj Remove - Usuń + Usuń + + + Remove Run Configuration? + Usunąć konfigurację uruchamiania? + + + Do you really want to delete the run configuration <b>%1</b>? + Czy na pewno usunąć konfigurację uruchamiania <b>%1</b>? + + + Rename... + Zmień nazwę... + + + New name for run configuration <b>%1</b>: + Nowa nazwa dla konfiguracji uruchamiania <b>%1</b>: + + + Remove Deploy Configuration? + Usunąć konfigurację instalowania? + + + Do you really want to delete deploy configuration <b>%1</b>? + Czy na pewno usunąć konfigurację instalowania <b>%1</b>? + + + New name for deploy configuration <b>%1</b>: + Nowa nazwa dla konfiguracji instalowania <b>%1</b>: @@ -10348,7 +11530,7 @@ No project selected Untitled default file name to display - Nienazwany + Nienazwany @@ -10361,6 +11543,22 @@ No project selected Could not restore session %1 Nie można przywrócić sesji %1 + + Failed to restore project files + Nie można przywrócić plików projektu + + + Could not restore the following project files:<br><b>%1</b> + Nie można przywrócić następujących plików projektu:<br><b>%1</b> + + + Keep projects in Session + Przechowaj projekty w sesji + + + Remove projects from Session + Usuń projekty z sesji + Error while saving session Błąd podczas zachowywania sesji @@ -10379,7 +11577,7 @@ No project selected Session ('%1') - Sesja ("%1") + Sesja ("%1") @@ -10601,7 +11799,12 @@ No project selected qmake QMakeStep display name. - QMake + QMake + + + qmake + QMakeStep default display name + qmake Configuration is faulty, please check the Build Issues view for details. @@ -10624,7 +11827,7 @@ No project selected Qt4ProjectManager::QMakeStepConfigWidget <b>qmake:</b> No Qt version set. Cannot run qmake. - <b>QMake:</b> Brak ustawionej wersji Qt. Nie można uruchomić qmake. + <b>qmake:</b> Brak ustawionej wersji Qt. Nie można uruchomić qmake. <b>qmake:</b> %1 %2 @@ -10642,22 +11845,28 @@ No project selected Qt4ProjectManager::Internal::S60DeviceRunConfiguration %1 on Symbian Device + S60 device runconfiguration default display name, %1 is base pro-File name %1 na urządzeniu Symbian + + Run on Symbian device + S60 device runconfiguration default display name (no profile set) + Uruchom na urządzeniu Symbian + QtS60DeviceRunConfiguration - Konfiguracja uruchamiania urządzenia QtS60 + Konfiguracja uruchamiania urządzenia QtS60 Qt4ProjectManager::Internal::S60DeviceRunConfigurationWidget Device: - Urządzenie: + Urządzenie: Name: - Nazwa: + Nazwa: Arguments: @@ -10665,19 +11874,19 @@ No project selected Installation file: - Plik instalacyjny: + Plik instalacyjny: Device on serial port: - Urządzenie na porcie szeregowym: + Urządzenie na porcie szeregowym: Queries the device for information - Zapytaj urządzenie o informacje + Zapytaj urządzenie o informacje Connecting... - Łączenie... + Łączenie... @@ -10689,6 +11898,109 @@ No project selected Qt4ProjectManager::Internal::S60DeviceRunControlBase + + There is no device plugged in. + Brak podłączonego urządzenia. + + + Executable file: %1 + Plik wykonywalny: %1 + + + Debugger for Symbian Platform + Debugger dla platformy Symbian + + + Package: %1 +Deploying application to '%2'... + Pakiet: %1 +Umieszczanie aplikacji w "%2"... + + + Unable to remove existing file '%1': %2 + Nie można usunąć istniejącego pliku "%1": %2 + + + Unable to rename file '%1' to '%2': %3 + Nie można zmienić nazwy pliku "%1" na "%2": %3 + + + Deploying + Instalowanie + + + Renaming new package '%1' to '%2' + Zmienianie nazwy pakietu "%1" na "%2" + + + Removing old package '%1' + Usuwanie starego pakietu "%1" + + + Package file not found + Plik pakietu nie został odnaleziony + + + Failed to find package '%1': %2 + Nie można odnaleźć pakietu "%1": %2 + + + Could not connect to phone on port '%1': %2 +Check if the phone is connected and App TRK is running. + Nie można nawiązać połączenia z telefonem na porcie "%1": %2 +Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona. + + + Could not create file %1 on device: %2 + Nie można utworzyć pliku %1 na urządzeniu: %2 + + + Could not write to file %1 on device: %2 + Nie można zapisać do pliku %1 na urządzeniu: %2 + + + Could not close file %1 on device: %2. It will be closed when App TRK is closed. + Nie można zamknąć pliku %1 w urządzeniu: %2, będzie on zamknięty gdy aplikacja TRK zostanie zakończona. + + + Could not connect to App TRK on device: %1. Restarting App TRK might help. + Nie można ustanowić połączenia z aplikacją TRK w urządzeniu: %1. Spróbuj ponownie uruchomić aplikację TRK. + + + The device '%1' has been disconnected + Urządzenie "%1" zostało odłączone + + + Installing application... + Instalowanie aplikacji... + + + Copying installation file... + Kopiowanie pliku instalacyjnego... + + + Could not install from package %1 on device: %2 + Nie można zainstalować z pakietu %1 na urządzeniu: %2 + + + Waiting for App TRK + Oczekiwanie na aplikację TRK + + + Please start App TRK on %1. + Proszę uruchomić aplikację TRK na porcie %1. + + + Canceled. + Anulowano. + + + + Qt4ProjectManager::Internal::S60DeviceRunControl + + Launching + Uruchamianie + There is no device plugged in. Brak podłączonego urządzenia. @@ -10701,93 +12013,32 @@ No project selected Debugger for Symbian Platform Debugger dla platformy Symbian - - Package: %1 -Deploying application to '%2'... - Pakiet: %1 -Umieszczanie aplikacji w "%2"... - - - Unable to remove existing file '%1': %2 - Nie można usunąć istniejącego pliku "%1": %2 - - - Unable to rename file '%1' to '%2': %3 - Nie można zmienić nazwy pliku "%1" na "%2": %3 - - - Deploying - Instalowanie - - - Renaming new package '%1' to '%2' - Zmienianie nazwy pakietu "%1" na "%2" - - - Removing old package '%1' - Usuwanie starego pakietu "%1" - - - Package file not found - Plik pakietu nie został odnaleziony - - - Failed to find package '%1': %2 - Nie można odnaleźć pakietu "%1": %2 - Could not connect to phone on port '%1': %2 Check if the phone is connected and App TRK is running. Nie można nawiązać połączenia z telefonem na porcie "%1": %2 Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona. - - Could not create file %1 on device: %2 - Nie można utworzyć pliku %1 na urządzeniu: %2 - - - Could not write to file %1 on device: %2 - Nie można zapisać do pliku %1 na urządzeniu: %2 - - - Could not close file %1 on device: %2. It will be closed when App TRK is closed. - Nie można zamknąć pliku %1 w urządzeniu: %2, będzie on zamknięty gdy aplikacja TRK zostanie zakończona. - Could not connect to App TRK on device: %1. Restarting App TRK might help. Nie można ustanowić połączenia z aplikacją TRK w urządzeniu: %1. Spróbuj ponownie uruchomić aplikację TRK. - - The device '%1' has been disconnected - Urządzenie "%1" zostało odłączone - - - Installing application... - Instalowanie aplikacji... - - - Copying installation file... - Kopiowanie pliku instalacyjnego... - - - Could not install from package %1 on device: %2 - Nie można zainstalować z pakietu %1 na urządzeniu: %2 - Waiting for App TRK Oczekiwanie na aplikację TRK - Please start App TRK on %1. - Proszę uruchomić aplikację TRK na porcie %1. + Qt Creator is waiting for the TRK application to connect.<br>Please make sure the application is running on your mobile phone and the right port is configured in the project settings. + Qt Creator oczekuje na połączenie od aplikacji TRK.<br>Sprawdź czy aplikacja jest uruchomiona na telefonie komórkowym i czy właściwy port jest skonfigurowany w ustawieniach projektu. Canceled. Anulowano. - - - Qt4ProjectManager::Internal::S60DeviceRunControl + + The device '%1' has been disconnected + Urządzenie "%1" zostało odłączone + Finished. Zakończono. @@ -10811,31 +12062,47 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.Warning: Cannot locate the symbol file belonging to %1. Ostrzeżenie: nie można odnaleźć pliku z symbolami należącego do %1. + + Debugger for Symbian Platform + Debugger dla platformy Symbian + + + Debugging + Debugowanie + Launching debugger... Uruchamianie debuggera... Debugging finished. - Zakończono debugowanie. + Zakończono debugowanie. Qt4ProjectManager::Internal::S60EmulatorRunConfiguration %1 in Symbian Emulator + S60 emulator run configuration default display name, %1 is base pro-File name +---------- +S60 emulator run configuration default display name, %1 is base pro-File name %1 w emulatorze Symbian + + Run on Symbian Emulator + S60 emulator run configuration default display name (no pro-file name) + Uruchom na emulatorze Symbiana + Qt Symbian Emulator RunConfiguration - Konfiguracja uruchamiania emulatora Qt Symbian + Konfiguracja uruchamiania emulatora Qt Symbian Qt4ProjectManager::Internal::S60EmulatorRunConfigurationWidget Name: - Nazwa: + Nazwa: Executable: @@ -10897,6 +12164,10 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.Resources Zasoby + + QML + QML + Other files Inne pliki @@ -10905,9 +12176,17 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.Failed! Niepomyślnie zakończone! + + Could not open the file for edit with VCS. + System kontroli wersji nie może otworzyć pliku do edycji. + + + Error while reading .pro file %1: %2 + Błąd podczas czytania pliku pro %1: %2 + Could not open the file for edit with SCC. - Nie udało się otworzyć pliku do edycji przez SCC. + Nie udało się otworzyć pliku do edycji przez SCC. Could not set permissions to writable. @@ -10923,7 +12202,7 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona. Error while reading PRO file %1: %2 - Błąd podczas czytania pliku PRO %1: %2 + Błąd podczas czytania pliku PRO %1: %2 @@ -10958,13 +12237,25 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.Build Budowanie + + Rebuild + Przebuduj + + + Clean + Wyczyść + + + Add Library... + Dodaj bibliotekę... + Run qmake in %1 - Uruchom qmake w %1 + Uruchom qmake w %1 Build in %1 - Zbuduj w %1 + Zbuduj w %1 @@ -10990,7 +12281,7 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.Qt4ProjectManager::Internal::Qt4RunConfigurationWidget Name: - Nazwa: + Nazwa: Executable: @@ -11016,6 +12307,10 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.Run in terminal Uruchom w terminalu + + Debugger: + Debugger: + Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) Użyj pakietów w wersji do debugowania (DYLD_IMAGE_SUFFIX=_debug) @@ -11150,10 +12445,19 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona.Building helpers Budowanie asystentów + + Binary not found + Nie znaleziono pliku binarnego + + + <html><body><table><tr><td>File:</td><td><pre>%1</pre></td></tr><tr><td>Last&nbsp;modified:</td><td>%2</td></tr><tr><td>Size:</td><td>%3 Bytes</td></tr><tr><td>File:</td><td><pre>%4</pre></td></tr><tr><td>Last&nbsp;modified:</td><td>%5</td></tr><tr><td>Size:</td><td>%6 Bytes</td></tr><tr><td>File:</td><td><pre>%7</pre></td></tr><tr><td>Last&nbsp;modified:</td><td>%8</td></tr><tr><td>Size:</td><td>%9 Bytes</td></tr></table></body></html> + Tooltip showing the debugging helper library file. + <html><body><table><tr><td>Plik:</td><td><pre>%1</pre></td></tr><tr><td>Ostatnio&nbsp;zmodyfikowany:</td><td>%2</td></tr><tr><td>Rozmiar:</td><td>%3 Bajtów</td></tr><tr><td>Plik:</td><td><pre>%4</pre></td></tr><tr><td>Ostatnio&nbsp;zmodyfikowany:</td><td>%5</td></tr><tr><td>Rozmiar:</td><td>%6 Bajtów</td></tr><tr><td>Plik:</td><td><pre>%7</pre></td></tr><tr><td>Ostatnio&nbsp;zmodyfikowany:</td><td>%8</td></tr><tr><td>Rozmiar:</td><td>%9 Bajtów</td></tr></table></body></html> + <html><body><table><tr><td>File:</td><td><pre>%1</pre></td></tr><tr><td>Last&nbsp;modified:</td><td>%2</td></tr><tr><td>Size:</td><td>%3 Bytes</td></tr></table></body></html> Tooltip showing the debugging helper library file. - <html><body><table><tr><td>Plik:</td><td><pre>%1</pre></td></tr><tr><td>Ostatnio&nbsp;zmodyfikowany:</td><td>%2</td></tr><tr><td>Rozmiar:</td><td>%3 Bajtów</td></tr></table></body></html> + <html><body><table><tr><td>Plik:</td><td><pre>%1</pre></td></tr><tr><td>Ostatnio&nbsp;zmodyfikowany:</td><td>%2</td></tr><tr><td>Rozmiar:</td><td>%3 Bajtów</td></tr></table></body></html> This Qt Version has a unknown toolchain. @@ -11233,12 +12537,16 @@ Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona. EditorManager Next Open Document in History - Manager edytorów + Manager edytorów EditorManager Previous Open Document in History - Manager edytorów + Manager edytorów + + + Qt QML Viewer + Przeglądarka Qt QML @@ -11337,14 +12645,26 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Qt4ProjectManager::Internal::LibraryWizardDialog Shared library - Biblioteka współdzielona + Biblioteka współdzielona Statically linked library - Biblioteka statycznie dowiązana + Biblioteka statycznie dowiązana Qt 4 plugin + Wtyczka Qt 4 + + + Shared Library + Biblioteka współdzielona + + + Statically Linked Library + Biblioteka statycznie dowiązana + + + Qt 4 Plugin Wtyczka Qt 4 @@ -11359,11 +12679,19 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Details Szczegóły + + Symbian Specific + + Qt4ProjectManager::Internal::ModulesPage Select required modules + Wybierz wymagane moduły + + + Select Required Modules Wybierz wymagane moduły @@ -11463,11 +12791,11 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos &Escaped Pattern: - &Zabezpieczony wzorzec: + &Zabezpieczony wzorzec: &Pattern Syntax: - Składnia &wzorca: + Składnia &wzorca: &Text: @@ -11475,7 +12803,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Case &Sensitive - Uwzględniaj &wielkość liter + Uwzględniaj &wielkość liter &Minimal @@ -11483,19 +12811,19 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Index of Match: - Indeks dopasowania: + Indeks dopasowania: Matched Length: - Dopasowana długość: + Dopasowana długość: Regular expression v1 - Wyrażenie regularne v1 + Wyrażenie regularne v1 Regular expression v2 - Wyrażenie regularne v2 + Wyrażenie regularne v2 Wildcard @@ -11503,6 +12831,38 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Fixed string + Stały ciąg + + + &Escaped pattern: + &Zabezpieczony wzorzec: + + + &Pattern syntax: + Składnia &wzorca: + + + Case &sensitive + Uwzględniaj &wielkość liter + + + Index of match: + Indeks dopasowania: + + + Matched length: + Dopasowana długość: + + + Regular Expression v1 + Wyrażenie regularne v1 + + + Regular Expression v2 + Wyrażenie regularne v2 + + + Fixed String Stały ciąg @@ -11518,20 +12878,36 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Wyrażenie regularne - Enter pattern from code... + Enter Pattern from Code... Wprowadź wzorzec z kodu... - Clear patterns + Clear Patterns Wyczyść wzorce + + Clear Text + Wyczyść tekst + + + Enter Pattern from Code + Wprowadź wzorzec z kodu + + + Enter pattern from code... + Wprowadź wzorzec z kodu... + + + Clear patterns + Wyczyść wzorce + Clear texts - Wyczyść teksty + Wyczyść teksty Enter pattern from code - Wprowadź wzorzec z kodu + Wprowadź wzorzec z kodu Pattern @@ -11820,7 +13196,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Executing in %1: %2 %3 - Wykonywanie w %1: %2 %3 + Wykonywanie w %1: %2 %3 @@ -11830,24 +13206,24 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Executing: %1 %2 - Wykonywanie: %1 %2 + Wykonywanie: %1 %2 The process terminated with exit code %1. - Proces zakończył się kodem wyjściowym %1. + Proces zakończył się kodem wyjściowym %1. The process terminated abnormally. - Proces niepoprawnie zakończony. + Proces niepoprawnie zakończony. Could not start subversion '%1'. Please check your settings in the preferences. - Nie można uruchomić subversion "%1". Sprawdź stosowne ustawienia. + Nie można uruchomić subversion "%1". Sprawdź stosowne ustawienia. Subversion did not respond within timeout limit (%1 ms). - Subversion nie odpowiedział w określonym czasie (%1 ms). + Subversion nie odpowiedział w określonym czasie (%1 ms). @@ -11869,7 +13245,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Use regular e&xpressions - Używaj wyrażeń &regularnych + Używaj wyrażeń &regularnych @@ -11885,6 +13261,10 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos TextEditor::BaseTextEditor + + CTRL+D + Ctrl+D + Print Document Wydruk dokumentu @@ -11897,6 +13277,10 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos Select Encoding Wybierz kodowanie + + The text is too large to be displayed (%1 MB). + Tekst jest zbyt obszerny aby mógł zostać wyświetlony (%1 MB). + TextEditor::BaseTextEditorEditable @@ -12029,6 +13413,10 @@ Następujące kodowania będą najprawdopodobniej pasowały: Line in current document + Linia w bieżącym dokumencie + + + Line in Current Document Linia w bieżącym dokumencie @@ -12112,7 +13500,7 @@ Następujące kodowania będą najprawdopodobniej pasowały: Collapse - Zwiń + Zwiń Ctrl+< @@ -12120,7 +13508,7 @@ Następujące kodowania będą najprawdopodobniej pasowały: Expand - Rozwiń + Rozwiń Ctrl+> @@ -12128,7 +13516,7 @@ Następujące kodowania będą najprawdopodobniej pasowały: (Un)&Collapse All - &Zwiń / rozwiń wszystko + &Zwiń / rozwiń wszystko Increase Font Size @@ -12174,6 +13562,18 @@ Następujące kodowania będą najprawdopodobniej pasowały: Ctrl+[ Ctrl+[ + + Fold + + + + Unfold + + + + (Un)&Fold All + + Ctrl+] Ctrl+] @@ -12238,6 +13638,22 @@ Następujące kodowania będą najprawdopodobniej pasowały: Ctrl+J Ctrl+J + + Insert Line Above Current Line + Wstaw linię ponad bieżącą linią + + + Ctrl+Shift+Return + Ctrl+Shift+Return + + + Insert Line Below Current Line + Wstaw linię pod bieżącą linią + + + Ctrl+Return + Ctrl+Return + Goto Line Start Przejdź do początku linii @@ -12404,6 +13820,22 @@ Następujące kodowania będą najprawdopodobniej pasowały: Type Typ + + Local + Zmienna lokalna + + + Field + Pole + + + Static + Statyczna + + + Virtual Method + Metoda wirtualna + Keyword Słowo kluczowe @@ -12612,16 +14044,24 @@ Następujące kodowania będą najprawdopodobniej pasowały: Version Control System kontroli wersji + + Executing: %1 %2 + + Wykonywanie: %1 %2 + + + + Executing in %1: %2 %3 + + Wykonywanie w %1: %2 %3 + + VCSBase::VCSBaseSubmitEditor - - Check message - - Insert name... - Wstaw nazwę... + Wstaw nazwę... Prompt to submit @@ -12629,7 +14069,19 @@ Następujące kodowania będą najprawdopodobniej pasowały: Submit Message Check failed - Błąd sprawdzania opisu zmiany + Błąd sprawdzania opisu zmiany + + + Check Message + + + + Insert Name... + + + + Submit Message Check Failed + Executing %1 @@ -12712,9 +14164,13 @@ Następujące kodowania będą najprawdopodobniej pasowały: Remove Usuń + + Deleting a folder also removes its content.<br>Do you want to continue? + Usunięcie katalogu usuwa również jego zawartość.<br>Czy chcesz kontynuować? + You are going to delete a Folder which will also<br>remove its content. Are you sure you would like to continue? - Zamierzasz usunąć katalog a to spowoduje usunięcie<br>jego zawartości. Jesteś pewien że chcesz kontynuować? + Zamierzasz usunąć katalog a to spowoduje usunięcie<br>jego zawartości. Jesteś pewien że chcesz kontynuować? New Folder @@ -12776,6 +14232,18 @@ Następujące kodowania będą najprawdopodobniej pasowały: Skip Pomiń + + Choose Copy Location + Wybierz docelowe położenie kopii + + + Overwriting Failed + Błąd nadpisania + + + Copying Failed + Błąd kopiowania + Abort Przerwij @@ -12790,11 +14258,11 @@ Następujące kodowania będą najprawdopodobniej pasowały: Choose copy location - Wybierz docelowe położenie kopii + Wybierz docelowe położenie kopii Overwrite failed - Nie można nadpisać + Nie można nadpisać Could not overwrite file %1. @@ -12802,7 +14270,7 @@ Następujące kodowania będą najprawdopodobniej pasowały: Copying failed - Błąd kopiowania + Błąd kopiowania Could not copy the file to %1. @@ -12836,9 +14304,17 @@ Następujące kodowania będą najprawdopodobniej pasowały: Usuń element - Open file + Open File Otwórz plik + + Input prefix: + Wprowadź przedrostek: + + + Open file + Otwórz plik + All files (*) Wszystkie pliki (*) @@ -12849,7 +14325,7 @@ Następujące kodowania będą najprawdopodobniej pasowały: Input Prefix: - Wprowadź przedrostek: + Wprowadź przedrostek: Change Language @@ -13162,6 +14638,10 @@ Następujące kodowania będą najprawdopodobniej pasowały: Subversion submit template + + Qt Creator task list file + + Plain text document Dokument tekstowy @@ -13170,6 +14650,14 @@ Następujące kodowania będą najprawdopodobniej pasowały: XML document Dokument XML + + Assembler + Asembler + + + Qt Creator Generic Assembler + + Differences between files Różnice pomiędzy plikami @@ -13283,7 +14771,7 @@ aktywny tylko po wpisaniu przedrostka Debugger::Internal::TermGdbAdapter Debugger Error - Błąd debuggera + Błąd debuggera @@ -13321,6 +14809,10 @@ aktywny tylko po wpisaniu przedrostka Locator::Internal::FileSystemFilter Files in file system + Pliki w systemie plików + + + Files in File System Pliki w systemie plików @@ -13385,6 +14877,10 @@ aktywny tylko po wpisaniu przedrostka Locator::Internal::OpenDocumentsFilter Open documents + Otwarte dokumenty + + + Open Documents Otwarte dokumenty @@ -13640,7 +15136,7 @@ aktywny tylko po wpisaniu przedrostka Delete all... - Usuń wszystkie... + Usuń wszystkie... Delete... @@ -13657,7 +15153,7 @@ aktywny tylko po wpisaniu przedrostka Restore to branch... Restore a git stash to new branch to be created - Przywróć do gałęzi... + Przywróć do gałęzi... Refresh @@ -13673,7 +15169,7 @@ aktywny tylko po wpisaniu przedrostka Delete stashes - Usuń odłożone zmiany + Usuń odłożone zmiany Do you want to delete all stashes? @@ -13689,6 +15185,23 @@ aktywny tylko po wpisaniu przedrostka Repository modified + Składnica zmodyfikowana + + + Delete All... + Usuń wszystkie... + + + Restore to Branch... + Restore a git stash to new branch to be created + Przywróć do gałęzi... + + + Delete Stashes + Usuń odłożone zmiany + + + Repository Modified Składnica zmodyfikowana @@ -13866,11 +15379,11 @@ Możesz odłożyć zmiany lub je porzucić. ProjectExplorer::Internal::AddTargetDialog Add target - Dodaj produkt docelowy + Dodaj produkt docelowy Target: - Produkt docelowy: + Produkt docelowy: @@ -13899,11 +15412,11 @@ Możesz odłożyć zmiany lub je porzucić. Id: - Identyfikator: + Identyfikator: Property Name: - Nazwa właściwości: + Nazwa właściwości: Animation @@ -13945,6 +15458,14 @@ Możesz odłożyć zmiany lub je porzucić. Damping: Tłumienie: + + ID: + Identyfikator: + + + Property name: + Nazwa właściwości: + GradientDialog @@ -14574,15 +16095,15 @@ Możesz odłożyć zmiany lub je porzucić. Ports: - Porty: + Porty: SSH: - SSH: + SSH: Gdb server: - Server Gdb: + Server Gdb: s @@ -14616,12 +16137,32 @@ Możesz odłożyć zmiany lub je porzucić. Username: Nazwa użytkownika: + + SSH port: + Port SSH: + + + Free ports: + Wolne porty: + + + You can enter lists and ranges like this: 1024,1026-1028,1030 + Można wprowadzać listy i zakresy, np.: 1024,1026-1028,1030 + + + TextLabel + Etykieta + + + Show password + Pokaż hasło + Qt4ProjectManager::Internal::S60CreatePackageStepWidget Form - Formularz + Formularz Self-signed certificate @@ -14639,6 +16180,18 @@ Możesz odłożyć zmiany lub je porzucić. Key file: Plik z kluczem: + + Create Smart Installer package + + + + Resets saved passphrases for all used keys + + + + Reset Passphrases + + Qt4ProjectManager::Internal::TestWizardPage @@ -14850,15 +16403,15 @@ Możesz odłożyć zmiany lub je porzucić. QmlJS::Link could not find file or directory - nie można odnaleźć pliku lub katalogu + nie można odnaleźć pliku lub katalogu expected two numbers separated by a dot - oczekiwano dwóch liczb oddzielonych kropką + oczekiwano dwóch liczb oddzielonych kropką package import requires a version number - import pakietu wymaga podania numeru wersji + import pakietu wymaga podania numeru wersji package not found @@ -14969,11 +16522,15 @@ Wartość dziesiętna ze znakiem (big endian): %4 BINEditor::Internal::ImageViewerFactory Image Viewer - Przeglądarka plików graficznych + Przeglądarka plików graficznych CMakeProjectManager::Internal::CMakeRunConfiguration + + Run CMake target + + Clean Environment Czyste środowisko @@ -15004,7 +16561,12 @@ Wartość dziesiętna ze znakiem (big endian): %4 Make CMakeProjectManager::MakeStep display name. - Make + Make + + + Make + Default display name for the cmake make step. + Make @@ -15036,6 +16598,10 @@ Wartość dziesiętna ze znakiem (big endian): %4 Environment Środowisko + + All Files (*) + Wszystkie pliki (*) + Core::DesignMode @@ -15213,7 +16779,11 @@ Wartość dziesiętna ze znakiem (big endian): %4 Debugger::Internal::CdbOptionsPage Cdb - Cdb + Cdb + + + CDB + CDB @@ -15261,50 +16831,66 @@ Wartość dziesiętna ze znakiem (big endian): %4 Debugger::DebuggerUISwitcher &Languages - &Języki + &Języki + + + Memory... + Pamięć... Alt+L - Alt+L + Alt+L + + + Debugger Toolbar + Language - Język + Język Debugger::Internal::SnapshotHandler Function: - Funkcja: + Funkcja: File: - Plik: + Plik: Date: - Data: + Data: ... - ... + ... <More> - <Więcej> + <Więcej> Function - Funkcja + Funkcja Date - Data + Data Location - Położenie + Położenie + + + Name + Nazwa + + + File + Plik @@ -15313,6 +16899,14 @@ Wartość dziesiętna ze znakiem (big endian): %4 Snapshots Zrzuty + + Create Snapshot + Utwórz zrzut + + + Remove Snapshot + Usuń zrzut + Adjust Column Widths to Contents Wyrównaj szerokości kolumn do ich zawartości @@ -15377,6 +16971,10 @@ Wartość dziesiętna ze znakiem (big endian): %4 Open Advanced Find... Otwórz zaawansowane przeszukiwanie... + + Advanced... + Zaawansowane... + Ctrl+Shift+F Ctrl+Shift+F @@ -15393,7 +16991,7 @@ Wartość dziesiętna ze znakiem (big endian): %4 Git::Internal::RemoteBranchModel (no branch) - (brak gałęzi) + (brak gałęzi) @@ -15416,6 +17014,10 @@ Wartość dziesiętna ze znakiem (big endian): %4 Blame %1 + + Blame parent revision %1 + + Help @@ -15553,13 +17155,17 @@ Wartość dziesiętna ze znakiem (big endian): %4 Annotate %1 Dołącz adnotację do %1 + + Annotate parent revision %1 + + Mercurial::Internal::MercurialJobRunner Executing: %1 %2 - Wykonywanie: %1 %2 + Wykonywanie: %1 %2 @@ -15751,12 +17357,16 @@ Wartość dziesiętna ze znakiem (big endian): %4 Close commit editor - Zamknij edytor zmiany + Zamknij edytor zmiany Do you want to commit the changes? + + Close Commit Editor + + Message check failed. Do you want to proceed? @@ -15826,6 +17436,16 @@ Wartość dziesiętna ze znakiem (big endian): %4 ProjectExplorer::BuildConfiguration + + Build + Display name of the build build step list. Used as part of the labels in the project window. + + + + Clean + Display name of the clean build step list. Used as part of the labels in the project window. + + System Environment Środowisko systemowe @@ -15901,7 +17521,63 @@ Wartość dziesiętna ze znakiem (big endian): %4 Example Object Class-name: - Przykładowa nazwa klasy obiektu: + Przykładowa nazwa klasy obiektu: + + + Object Class-name: + + + + The project name and the object class-name cannot be the same. + + + + Creates a custom Qt Creator plugin. + + + + Qt Creator plugin + Wtyczka Qt Creatora + + + Other Project + Inny projekt + + + Plugin Information + Informacje o wtyczce + + + Plugin name: + Nazwa wtyczki: + + + Vendor name: + + + + Copyright: + Prawa autorskie: + + + License: + Licencja: + + + Description: + Opis: + + + Url: + Url: + + + Qt Creator sources: + Źródła Qt Creatora: + + + Qt Creator build: + Wersja Qt Creatora: @@ -15961,7 +17637,7 @@ Wartość dziesiętna ze znakiem (big endian): %4 Open parent folder - Otwórz katalog wyżej + Otwórz katalog wyżej Open "%1" @@ -15973,11 +17649,11 @@ Wartość dziesiętna ze znakiem (big endian): %4 Choose folder... - Wybierz katalog... + Wybierz katalog... Choose folder - Wybierz katalog + Wybierz katalog Show in Explorer... @@ -15989,14 +17665,34 @@ Wartość dziesiętna ze znakiem (big endian): %4 Show containing folder... - Pokaż zawierający katalog... - - - Open Command Prompt here... - + Pokaż zawierający katalog... Open Terminal here... + Otwórz tutaj terminal... + + + Open Parent Folder + Otwórz katalog wyżej + + + Choose Folder... + Wybierz katalog... + + + Choose Folder + Wybierz katalog + + + Show Containing Folder... + Pokaż zawierający katalog... + + + Open Command Prompt Here... + + + + Open Terminal Here... Otwórz tutaj terminal... @@ -16028,9 +17724,13 @@ Wartość dziesiętna ze znakiem (big endian): %4 Ustawienia... - Launching Windows Explorer failed + Launching Windows Explorer Failed Nie można uruchomić "Windows Explorer" + + Launching Windows Explorer failed + Nie można uruchomić "Windows Explorer" + Could not find explorer.exe in path to launch Windows Explorer. Nie można odnaleźć explorer.exe w ścieżce w celu uruchomienia "Windows Explorer". @@ -16150,23 +17850,23 @@ Wartość dziesiętna ze znakiem (big endian): %4 ProjectExplorer::TaskWindow Build Issues - Problemy podczas budowania + Problemy podczas budowania &Copy - S&kopiuj + S&kopiuj &Annotate - Dołącz &adnotację + Dołącz &adnotację Show Warnings - Pokazuj ostrzeżenia + Pokazuj ostrzeżenia Filter by categories - Przefiltruj według kategorii + Przefiltruj według kategorii @@ -16250,10 +17950,18 @@ Wartość dziesiętna ze znakiem (big endian): %4 QmlDesigner::XUIFileDialog Open file - Otwórz plik + Otwórz plik Save file + Zachowaj plik + + + Open File + Otwórz plik + + + Save File Zachowaj plik @@ -16300,6 +18008,10 @@ Wartość dziesiętna ze znakiem (big endian): %4 QmlDesigner::PluginManager About plugins + Informacje o wtyczkach + + + About Plugins Informacje o wtyczkach @@ -16623,66 +18335,52 @@ Wartość dziesiętna ze znakiem (big endian): %4 Qml::Internal::QLineGraph Frame rate - Klatki na sekundę + Klatki na sekundę Qml::Internal::GraphWindow Total time elapsed (ms) - Łączny czas który upłynął + Łączny czas który upłynął Qml::Internal::CanvasFrameRate Resolution: - Rozdzielczość: + Rozdzielczość: Clear - Wyczyść + Wyczyść New Graph - Nowy graf + Nowy graf Enabled - Włączony + Włączony Qml::Internal::ExpressionQueryWidget Write and evaluate QtScript expressions. - Wpisz i wykonaj polecenia QtScript. + Wpisz i wykonaj polecenia QtScript. Clear Output - Wyczyść wyjście + Wyczyść wyjście <Type expression to evaluate> - <Wpisz wyrażenie do wykonania> - - - Script Console - - - - - Expression queries - - - - Expression queries (using context for %1) - Selected object - + <Wpisz wyrażenie do wykonania> <%n items> - + <%n element> <%n elementy> <%n elementów> @@ -16693,35 +18391,31 @@ Wartość dziesiętna ze znakiem (big endian): %4 Qml::Internal::ObjectPropertiesView Name - Nazwa + Nazwa Value - Wartość + Wartość Type - Typ + Typ &Watch expression - &Obserwuj wyrażenie + &Obserwuj wyrażenie &Remove watch - &Usuń obserwowanie wyrażenia - - - Show &unwatchable properties - + &Usuń obserwowanie wyrażenia &Group by item type - &Grupuj według typów elementów + &Grupuj według typów elementów <%n items> - + <%n element> <%n elementy> <%n elementów> @@ -16729,172 +18423,143 @@ Wartość dziesiętna ze znakiem (big endian): %4 Watch expression '%1' - Obserwuj wyrażenie "%1" - - - Hide unwatchable properties - - - - Show unwatchable properties - + Obserwuj wyrażenie "%1" Qml::Internal::ObjectTree Add watch expression... - Dodaj wyrażenie do obserwowania... - - - Show uninspectable items - + Dodaj wyrażenie do obserwowania... Go to file - Przejdź do pliku + Przejdź do pliku Watch expression - Obserwuj wyrażenie + Obserwuj wyrażenie Expression: - Wyrażenie: + Wyrażenie: Qml::Internal::WatchTableModel Name - Nazwa + Nazwa Value - Wartość + Wartość Qml::Internal::WatchTableView Stop watching - Zatrzymaj obserwowanie + Zatrzymaj obserwowanie Qml::InspectorOutputWidget Output - Komunikaty + Komunikaty Clear - Wyczyść + Wyczyść Qml::QmlInspector Failed to connect to debugger - Nie można połączyć się z debuggerem + Nie można połączyć się z debuggerem Could not connect to debugger server. - Nie można połączyć się z serwerem debuggera. + Nie można połączyć się z serwerem debuggera. Invalid project, debugging canceled. - Niepoprawny projekt, anulowano debugowanie. + Niepoprawny projekt, anulowano debugowanie. Cannot find project run configuration, debugging canceled. - Nie można odnaleźć konfiguracji uruchamiania, anulowano debugowanie. + Nie można odnaleźć konfiguracji uruchamiania, anulowano debugowanie. [Inspector] set to connect to debug server %1:%2 - [Inspektor] ustawiono server debugowy %1:%2 + [Inspektor] ustawiono server debugowy %1:%2 [Inspector] disconnected. - [Inspektor] rozłączony. + [Inspektor] rozłączony. - - [Inspector] resolving host... - - [Inspector] connecting to debug server... - [Inspektor] łączenie z serwerem debugowym... + [Inspektor] łączenie z serwerem debugowym... [Inspector] connected. - [Inspektor] podłączony. + [Inspektor] podłączony. [Inspector] closing... - [Inspektor] zamykanie... + [Inspektor] zamykanie... [Inspector] error: (%1) %2 %1=error code, %2=error message - [Inspektor] błąd: (%1) %2 + [Inspektor] błąd: (%1) %2 Start Debugging C++ and QML Simultaneously... - Rozpocznij jednoczesne debugowanie QML i C++... + Rozpocznij jednoczesne debugowanie QML i C++... No project was found. - Nie znaleziono żadnego projektu. + Nie znaleziono żadnego projektu. No run configurations were found for the project '%1'. - Nie znaleziono żadnych konfiguracji uruchamiania dla projektu "%1". - - - No valid run configuration was found for the project %1. Only locally runnable configurations are supported. -Please check your project settings. - - - - A valid run control was not registered in Qt Creator for this project run configuration. - + Nie znaleziono żadnych konfiguracji uruchamiania dla projektu "%1". Debugging failed: could not start C++ debugger. - Błąd debugowania: nie można uruchomić debuggera C++. + Błąd debugowania: nie można uruchomić debuggera C++. QML engine: - Silnik QML: + Silnik QML: Object Tree - Drzewo obiektów + Drzewo obiektów Properties and Watchers - Właściwości i zmienne obserwowane - - - Script Console - - - - Output of the QML inspector, such as information on connecting to the server. - + Właściwości i zmienne obserwowane QmlJSEditor::Internal::QmlJSTextEditor + + Show Qt Quick ToolBar + + Rename... Zmień nazwę... @@ -16907,13 +18572,17 @@ Please check your project settings. Unused variable Nieużywana zmienna + + Refactoring + + Rename id '%1'... Zmień nazwę identyfikatora "%1"... <Select Symbol> - <Wybierz symbol> + <Wybierz symbol> @@ -16965,17 +18634,34 @@ Please check your project settings. Qt QML File Plik Qt QML + + QML + QML sub-menu in the Tools menu + QML + + + Find Usages + Znajdź użycia + + + Ctrl+Shift+U + Ctrl+Shift+U + + + Show Qt Quick Toolbar + + Qt Quick - Qt Quick + Qt Quick &Preview - &Podgląd + &Podgląd Ctrl+Alt+R - Ctrl+Alt+R + Ctrl+Alt+R Follow Symbol Under Cursor @@ -16995,6 +18681,13 @@ Please check your project settings. Indexing Indeksowanie + + Type dump of QML plugin in %0 failed. +Errors: +%1 + + + QmlProjectManager::QmlProject @@ -17007,11 +18700,19 @@ Please check your project settings. QmlProjectManager::Internal::QmlProjectApplicationWizardDialog New QML Project - Nowy projekt QML + Nowy projekt QML This wizard generates a QML application project. - Ten kreator generuje projekt aplikacji QML. + Ten kreator generuje projekt aplikacji QML. + + + New Qt Quick UI Project + Nowy Qt Quick UI projekt + + + This wizard generates a Qt Quick UI project. + Ten kreator generuje Qt Quick UI projekt. @@ -17030,16 +18731,26 @@ Projekty aplikacji QML są uruchamiane ze środowiska QML i nie muszą być budo QML Application - Aplikacja QML + Aplikacja QML Creates a QML application project with a single QML file containing the main view. QML application projects are executed by the Qt QML Viewer and do not need to be built. - Tworzy projekt aplikacji QML z pojedynczym plikiem QML zawierającym główny widok. + Tworzy projekt aplikacji QML z pojedynczym plikiem QML zawierającym główny widok. Projekty aplikacji QML są uruchamiane przez przeglądarkę QML i nie muszą być budowane. + + Qt Quick UI + Qt Quick UI + + + Creates a Qt Quick UI project with a single QML file that contains the main view. + +You can review Qt Quick UI projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects. + + File generated by QtCreator qmlproject Template @@ -17141,24 +18852,40 @@ Projekty aplikacji QML są uruchamiane przez przeglądarkę QML i nie muszą by Przeglądarka QML - QML Viewer - Przeglądarka QML + Custom QML Viewer: + Własna przeglądarka QML: - QML Viewer arguments: - Argumenty przeglądarki QML: + Arguments: + Argumenty: - Main QML File: + Debugger: + Debugger: + + + Main QML file: Główny plik QML: + + QML Viewer + Przeglądarka QML + + + QML Viewer arguments: + Argumenty przeglądarki QML: + + + Main QML File: + Główny plik QML: + Debugging Address: - Adres debugowania: + Adres debugowania: Debugging Port: - Port debugowania: + Port debugowania: @@ -17206,19 +18933,35 @@ Projekty aplikacji QML są uruchamiane przez przeglądarkę QML i nie muszą by Device configuration test failed: %1 - Test konfiguracji urządzenia zakończony niepowodzeniem: + Test konfiguracji urządzenia zakończony niepowodzeniem: %1 + + Could not connect to host: %1 + Nie można połączyć się z hostem: %1 + Did you start Qemu? Czy uruchomiłeś Qemu? + + Remote process failed: %1 + Zdalny proces zakończony błędem: %1 + Qt version mismatch! Expected Qt on device: 4.6.2 or later. Niezgodność wersji Qt. Oczekiwano wersji 4.6.2 lub późniejszej dla urządzenia. + + Mad Developer is not installed.<br>You will not be able to deploy to this device. + + + + Device configuration okay. + + Close Zamknij @@ -17244,7 +18987,7 @@ Czy uruchomiłeś Qemu? Device configuration successful. - Konfiguracja urządzenia zakończona pomyślnie. + Konfiguracja urządzenia zakończona pomyślnie. @@ -17260,14 +19003,27 @@ Czy uruchomiłeś Qemu? Qt4ProjectManager::Internal::MaemoRunConfiguration New Maemo Run Configuration - Nowa konfiguracja uruchamiania Maemo + Nowa konfiguracja uruchamiania Maemo + + + Run on Maemo device + Maemo run configuration default display name + Uruchom na urządzeniu Maemo + + + Clean Environment + Czyste środowisko + + + System Environment + Środowisko systemowe Qt4ProjectManager::Internal::MaemoRunConfigurationWidget Run configuration name: - Nazwa konfiguracji uruchamiania: + Nazwa konfiguracji uruchamiania: <a href="%1">Manage device configurations</a> @@ -17281,9 +19037,102 @@ Czy uruchomiłeś Qemu? Device configuration: Konfiguracja urządzenia: + + Executable on host: + Plik wykonywalny na hoście: + + + Executable on device: + Plik wykonywalny na urządzeniu: + + + C++ only + Tylko C++ + + + QML only + Tylko QML + + + C++ and QML + C++ i QML + + + Debugging type: + Typ debugowania: + + + Use remote gdb + Użyj zdalnego gdb + + + Use remote gdbserver + Użyj zdalnego gdbserver + + + Base environment for this run configuration: + Podstawowe środowisko dla tej konfiguracji uruchamiania: + + + Clean Environment + Czyste środowisko + + + System Environment + Środowisko systemowe + + + Fetch Device Environment + Pobierz środowisko urządzenia + + + Choose directory to mount + Wybierz katalog do zamontowania + + + <b>Debugging details:</b> Use gdb + <b>Szczegóły debugowania:</b> Użyj gdb + + + <b>Debugging details:</b> Use gdbserver + <b>Szczegóły debugowania:</b> Użyj gdbserver + + + No local directories to be mounted on the device. + Brak lokalnych katalogów do zamontowania na urządzeniu. + + + One local directory to be mounted on the device. + Jeden lokalny katalog do zamontowania na urządzeniu. + + + %n local directories to be mounted on the device. + Note: Only mountCount>1 will occur here as 0, 1 are handled above. + + %n lokalny katalog do zamontowania na urządzeniu. + %n lokalne katalogi do zamontowania na urządzeniu. + %n lokalnych katalogów do zamontowania na urządzeniu. + + + + WARNING: You want to mount %1 directories, but your device has only %n free ports.<br>You will not be able to run this configuration. + + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolny port.<br>Nie będzie można uruchomić tej configuracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolne porty.<br>Nie będzie można uruchomić tej configuracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie posiada tylko %n wolnych portów.<br>Nie będzie można uruchomić tej configuracji. + + + + WARNING: You want to mount %1 directories, but only %n ports on the device will be available in debug mode. <br>You will not be able to debug your application with this configuration. + + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n port do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej configuracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n porty do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej configuracji. + Ostrzeżenie: Nie można zamontować %1 katalogów ponieważ urządzenie udostępnia tylko %n portów do debugowania.<br>Nie będzie można debugować aplikacji przy użyciu tej configuracji. + + Executable: - Plik wykonywalny: + Plik wykonywalny: Arguments: @@ -17294,63 +19143,63 @@ Czy uruchomiłeś Qemu? Qt4ProjectManager::Internal::AbstractMaemoRunControl Files to deploy: %1. - Pliki do zainstalowania: %1. + Pliki do zainstalowania: %1. Deploying - Instalowanie + Instalowanie No device configuration set for run configuration. - Brak konfiguracji urządzenia dla konfiguracji uruchamiania. + Brak konfiguracji urządzenia dla konfiguracji uruchamiania. Cleaning up remote leftovers first ... - Porządkowanie zdalnych pozostałości... + Porządkowanie zdalnych pozostałości... Initial cleanup canceled by user. - Wstępne porządkowanie anulowane przez użytkownika. + Wstępne porządkowanie anulowane przez użytkownika. Error running initial cleanup: %1. - Błąd podczas wstępnego porządkowania: %1. + Błąd podczas wstępnego porządkowania: %1. Initial cleanup done. - Zakończono wstępne porządkowanie. + Zakończono wstępne porządkowanie. Starting remote application. - Uruchamianie zdalnej aplikacji. + Uruchamianie zdalnej aplikacji. Deployment canceled by user. - Instalowanie anulowane przez użytkownika. + Instalowanie anulowane przez użytkownika. Deployment finished. - Zakończono instalowanie. + Zakończono instalowanie. Remote execution canceled due to user request. - Zdalne uruchomienie anulowane na żądanie użytkownika. + Zdalne uruchomienie anulowane na żądanie użytkownika. Error running remote process: %1 - Błąd zdalnego procesu: %1 + Błąd zdalnego procesu: %1 Finished running remote process. - Zakończono zdalny proces. + Zakończono zdalny proces. Remote Execution Failure - Błąd zdalnego procesu + Błąd zdalnego procesu Deployment failed: %1 - Błąd instalacji: %1 + Błąd instalacji: %1 @@ -17383,13 +19232,21 @@ Czy uruchomiłeś Qemu? Could not read public key file '%1'. Nie można odczytać pliku z publicznym kluczem "%1". + + Could not connect to host: %1 + Nie można połączyć się z hostem: %1 + + + You will need at least one port. + Wymagany jest przynajmniej jeden port. + Stop Deploying Zatrzymaj instalowanie Key deployment failed: %1 - Błąd instalacji klucza: %1 + Błąd instalacji klucza: %1 Deployment Succeeded @@ -17399,6 +19256,10 @@ Czy uruchomiłeś Qemu? Key was successfully deployed. Klucz został pomyślnie zainstalowany. + + Key deployment failed: %1. + Błąd instalacji klucza: %1. + Deploy Public Key ... Zainstaluj klucz publiczny... @@ -17409,8 +19270,39 @@ Czy uruchomiłeś Qemu? Create SIS Package Create SIS package build step name + Utwórz pakiet SIS + + + Create SIS Package + default create SIS package build step display name Utwórz pakiet SIS + + Could not find make command '%1' in the build environment + Nie można odnaleźć komendy make "%1" w środowisku budowania + + + The process "%1" exited normally. + Proces "%1" zakończył się normalnie. + + + The process "%1" exited with code %2. + Proces "%1" zakończył się kodem wyjściowym %2. + + + The process "%1" crashed. + Proces "%1" zakończył pracę błędem. + + + Could not start process "%1" in %2 + Nie można uruchomić procesu "%1" w %2 + + + Starting: "%1" %2 in %3 + + Uruchamianie "%1" %2 w %3 + + Qt4ProjectManager::Internal::S60CreatePackageStepFactory @@ -17421,6 +19313,14 @@ Czy uruchomiłeś Qemu? Qt4ProjectManager::Internal::S60CreatePackageStepConfigWidget + + Reset Passphrases + + + + Do you want to reset all passphrases saved for keys used? + + self-signed własnoręcznie podpisany @@ -17429,6 +19329,10 @@ Czy uruchomiłeś Qemu? signed with certificate %1 and key file %2 podpisany certyfikatem %1 i kluczem %2 + + <b>Create SIS Package:</b> %1, using Smart Installer + + <b>Create SIS Package:</b> %1 <b>Utwórz pakiet SIS:</b> %1 @@ -17442,10 +19346,18 @@ Czy uruchomiłeś Qemu? New configuration - Nowa konfiguracja + Nowa konfiguracja New Configuration Name: + Nazwa nowej konfiguracji: + + + New Configuration + Nowa konfiguracja + + + New configuration name: Nazwa nowej konfiguracji: @@ -17510,13 +19422,13 @@ Czy uruchomiłeś Qemu? Qt4ProjectManager::Internal::MobileGuiAppWizard Mobile Qt Application - Mobilna aplikacja Qt + Mobilna aplikacja Qt Creates a Qt application optimized for mobile devices with a Qt Designer-based main window. Preselects Qt for Simulator and mobile targets if available - Tworzy aplikację Qt dla urządzeń przenośnych. Zawiera główne okno bazujące na Qt Designerze. + Tworzy aplikację Qt dla urządzeń przenośnych. Zawiera główne okno bazujące na Qt Designerze. Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest dostępna). @@ -17549,17 +19461,22 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d Import Is this an import of an existing build or a new one? - Import + Import New Is this an import of an existing build or a new one? - Nowy + Nowy Qt Creator can set up the following targets for project <b>%1</b>: %1: Project name - Qt Creator może ustawić następujące wersje dla projektu <b>%1</b>: + Qt Creator może ustawić następujące wersje dla projektu <b>%1</b>: + + + Qt Creator can set up the following targets for<br>project <b>%1</b>: + %1: Project name + Qt Creator może ustawić następujące wersje dla<br>projektu <b>%1</b>: Choose a directory to scan for additional shadow builds @@ -17574,6 +19491,26 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d %1: pro-file, %2: directory that was checked. Brak zbudowanych wersji dla projektu "%1" w katalogu "%2". + + Check All + Zaznacz wszystko + + + Check all Qt versions + Zaznacz wszystkie wersje Qt + + + Check only this version + Zaznacz tylko tą wersję + + + Check all versions + Zaznacz wszystkie wersje + + + Uncheck all versions + Usuń zaznaczenia + <b>Error:</b> Severity is Task::Error @@ -17584,6 +19521,36 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d Severity is Task::Warning <b>Ostrzeżenie:</b> + + debug and release + We are going to build debug and release + debug i release + + + debug + Debug build + debug + + + release + release build + release + + + <br>using %1 (%2) + %1: qmake used (incl. full path), %2: "debug", "release" or "debug and release" + + + + Import + Is this an import of an existing build or a new one? + Import + + + New + Is this an import of an existing build or a new one? + Nowy + Setup targets for your project Ustaw produkty docelowe dla projektu @@ -17596,6 +19563,14 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d Import Existing Shadow Build... Zaimportuj wersję zbudowaną w innym miejscu... + + Uncheck all Qt versions + + + + Uncheck All + + Qt4ProjectManager::Internal::TestWizard @@ -17656,16 +19631,24 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d Składnica znajduje się już w systemie kontroli wersji - Repository created + Repository Created Utworzono składnicę + + Repository Creation Failed + Błąd podczas tworzenia składnicy + + + Repository created + Utworzono składnicę + A version control repository has been created in %1. Składnica systemu kontroli wersji została utworzona w %1. Repository creation failed - Błąd podczas tworzenia składnicy + Błąd podczas tworzenia składnicy A version control repository could not be created in %1. @@ -17722,39 +19705,39 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d StartExternalQmlDialog Start Simultaneous QML and C++ Debugging - Rozpocznij jednoczesne debugowanie QML i C++ + Rozpocznij jednoczesne debugowanie QML i C++ Debugging address: - Adres debugowania: + Adres debugowania: Debugging port: - Port debugowania: + Port debugowania: 127.0.0.1 - 127.0.0.1 + 127.0.0.1 Project: - Projekt: + Projekt: <No project> - <Brak projektu> + <Brak projektu> Viewer path: - Ścieżka do przeglądarki: + Ścieżka do przeglądarki: Viewer arguments: - Argumenty przeglądarki: + Argumenty przeglądarki: To switch languages while debugging, go to Debug->Language menu. - Aby zmienić język podczas debugowania przejdź do menu: Debugowanie->Język. + Aby zmienić język podczas debugowania przejdź do menu: Debugowanie->Język. @@ -17765,11 +19748,11 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d Add File to Package - Dodaj plik do pakiety + Dodaj plik do pakiety Remove File from Package - Usuń plik z pakietu + Usuń plik z pakietu Check this if you want the files below to be deployed directly. @@ -17781,7 +19764,7 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d Version number: - Numer wersji: + Numer wersji: Major: @@ -17797,7 +19780,23 @@ Wstępnie wybiera wersję Qt dla Symulatora i aplikacji mobilnych (jeśli jest d Files to deploy: - Pliki do zainstalowania: + Pliki do zainstalowania: + + + <b>Version number:</b> + <b>Numer wersji:</b> + + + <b>Adapt Debian file:</b> + + + + Edit + Zmodyfikuj + + + <b>Package Manager Icon:</b> + @@ -17882,6 +19881,15 @@ name <email> alias <email> User fields configuration file: + + Specifies a command that is executed to graphically prompt for a password, +should a repository require SSH-authentication (see documentation on SSH and the environment variable SSH_ASKPASS). + + + + SSH prompt command: + + BorderImageSpecifics @@ -18196,7 +20204,7 @@ name <email> alias <email> Pass. Char - Znak mark. + Znak Password Character @@ -18338,72 +20346,72 @@ name <email> alias <email> GenericSshConnection Could not connect to host. - Nie można połączyć się z hostem. - - - Error in cryptography backend: %1 - + Nie można połączyć się z hostem. Core::InteractiveSshConnection Error sending input - Błąd podczas wysyłania wejścia + Błąd podczas wysyłania wejścia Core::SftpConnection Error setting up SFTP subsystem - Błąd podczas ustanawiania podsystemu SFTP + Błąd podczas ustanawiania podsystemu SFTP Could not open file '%1' - Nie można otworzyć pliku "%1" + Nie można otworzyć pliku "%1" Could not uplodad file '%1' - Nie można wysłać pliku "%1" + Nie można wysłać pliku "%1" Could not copy remote file '%1' to local file '%2' - Nie można skopiować pliku zdalnego "%1" do pliku lokalnego "%2" + Nie można skopiować pliku zdalnego "%1" do pliku lokalnego "%2" Could not create remote directory - Nie można utworzyć zdalnego katalogu + Nie można utworzyć zdalnego katalogu Could not remove remote directory - Nie można usunąć zdalnego katalogu + Nie można usunąć zdalnego katalogu Could not get remote directory contents - Nie można otrzymać zawartości zdalnego katalogu + Nie można otrzymać zawartości zdalnego katalogu Could not remove remote file - Nie można usunąć zdalnego pliku + Nie można usunąć zdalnego pliku Could not change remote working directory - Nie można zmienić zdalnego katalogu roboczego + Nie można zmienić zdalnego katalogu roboczego SshKeyGenerator Error creating temporary files. - Błąd podczas tworzenia plików tymczasowych. + Błąd podczas tworzenia plików tymczasowych. Error generating keys: %1 - Błąd podczas generowania kluczy: %1 + Błąd podczas generowania kluczy: %1 Error reading temporary files. - Błąd podczas odczytywania plików tymczasowych. + Błąd podczas odczytywania plików tymczasowych. + + + Error generating key: %1 + Błąd podczas generowania klucz: %1 @@ -18532,6 +20540,10 @@ name <email> alias <email> Adapter start failed Nie można uruchomić adaptera + + Python Error + Błąd Pythona + '%1' contains no identifier "%1" nie zawiera identyfikatora @@ -18624,14 +20636,14 @@ name <email> alias <email> Engine %1 engine number - Silnik %1 + Silnik %1 Qml::Internal::StartExternalQmlDialog <No project> - <Brak projektu> + <Brak projektu> @@ -18651,18 +20663,18 @@ name <email> alias <email> QmlProjectManager::Internal::QmlTaskManager QML - QML + QML Qt4ProjectManager::Internal::MaemoPackageContents Local File Path - Ścieżka do lokalnego pliku + Ścieżka do lokalnego pliku Remote File Path - Ścieżka do zdalnego pliku + Ścieżka do zdalnego pliku @@ -18677,23 +20689,23 @@ name <email> alias <email> Packaging Error: Cannot open file '%1'. - Błąd pakowania: Nie można otworzyć pliku "%1". + Błąd pakowania: Nie można otworzyć pliku "%1". Packaging Error: Cannot write file '%1'. - Błąd pakowania: Nie można zapisać pliku "%1". + Błąd pakowania: Nie można zapisać pliku "%1". Packaging Error: Could not create directory '%1'. - Błąd pakowania: Nie można utworzyć katalogu "%1. + Błąd pakowania: Nie można utworzyć katalogu "%1. Packaging Error: Could not replace file '%1'. - Błąd pakowania: Nie można zastąpić pliku "%1". + Błąd pakowania: Nie można zastąpić pliku "%1". Packaging Error: Could not copy '%1' to '%2'. - Błąd pakowania: Nie można skopiować pliku "%1" do "%2". + Błąd pakowania: Nie można skopiować pliku "%1" do "%2". Package created. @@ -18707,6 +20719,30 @@ name <email> alias <email> Packaging failed. Błąd pakowania. + + Packaging for Maemo + Pakowanie dla Maemo + + + Package up to date. + Pakiet aktualny. + + + Could not move package files from %1 to %2. + Nie można przenieść plików pakietu z %1 do %2. + + + Could not remove directory '%1'. + Nie można usunąć katalogu "%1". + + + Could not create Debian directory '%1'. + Nie można utworzyć katalogu Debian w "%1". + + + Could not copy file '%1' to '%2' + Nie można skopiować pliku "%1" do "%2" + Packaging error: Could not start command '%1'. Reason: %2 Błąd pakowania: Nie można uruchomić komendy "%1". Powód: %2 @@ -18715,6 +20751,14 @@ name <email> alias <email> Exit code: %1 Kod wyjściowy: %1 + + Your project name contains characters not allowed in Debian packages. +They must only use lower-case letters, numbers, '-', '+' and '.'. +We will try to work around that, but you may experience problems. + Nazwa projektu zawiera znaki które są niedozwolone w pakietach Debiana. +Dozwolonymi znakami są tylko małe litery, liczby, '-', '+' oraz '.'. +Przy obecnej nazwie możesz spodziewać się problemów. + Packaging Error: Command '%1' failed. Błąd pakowania: Komenda "%1" zakończona błędem. @@ -18726,28 +20770,56 @@ name <email> alias <email> Qt4ProjectManager::Internal::MaemoPackageCreationWidget + + No Version Available. + Brak dostępnej wersji. + + + Could not read icon + Nie można odczytać ikony + + + Images + Obrazki + + + Choose Image + Wybierz obrazek + + + Could Not Set New Icon + Nie można ustawić nowej ikony + <b>Create Package:</b> <b>Utwórz pakiet:</b> + + (Packaging disabled) + (Pakowanie wyłączone) + + + Could Not Set Version Number + Nie można ustawić numeru wersji + Choose a local file - Wybierz plik lokalny + Wybierz plik lokalny File already in package - Plik jest już obecny w pakiecie + Plik jest już obecny w pakiecie You have already added this file. - Plik został już uprzednio dodany. + Plik został już uprzednio dodany. Qt4ProjectManager::Internal::MaemoRunConfigurationFactory New Maemo Run Configuration - Nowa konfiguracja uruchamiania Maemo + Nowa konfiguracja uruchamiania Maemo @@ -18861,6 +20933,14 @@ name <email> alias <email> %1: Path to qmake executable Komenda qmake "%1" nie została odnaleziona lub nie jest plikiem wykonywanlym. + + Qmake does not support build directories below the source directory. + Qmake nie obsługuje budowania w katalogach poniżej katalogu ze źródłami. + + + The build directory needs to be at the same level as the source directory. + Katalog przeznaczony do budowania musi być na tym samym poziomie co katalog ze źródłami. + emptyPane @@ -18890,6 +20970,14 @@ name <email> alias <email> Invalid Id Niepoprawny identyfikator + + Warning + Ostrzeżenie + + + Reparenting the component %1 here will cause the component %2 to be deleted. Do you want to proceed? + + QmlDesigner::PropertyEditor @@ -18970,16 +21058,48 @@ Identyfikatory muszą rozpoczynać się małą literą. Split if Statement Rozdziel instrukcję if + + Enclose in QLatin1Char(...) + Umieść w QLatin1Char(...) + Enclose in QLatin1String(...) Umieść w QLatin1String(...) + + Mark as translatable + Zaznacz jako przetłumaczalne + Convert to Objective-C String Literal - Use Fast String Concatenation with % + Convert to Hexadecimal + + + + Convert to Octal + + + + Convert to Decimal + + + + Complete Switch Statement + Dokończ instrukcję "switch" + + + #include header file + + + + Add local declaration + Dodaj lokalnę deklarację + + + Convert to Camel Case ... @@ -19009,31 +21129,19 @@ Identyfikatory muszą rozpoczynać się małą literą. Qt4ProjectManager::Internal::QemuRuntimeManager Start Maemo Emulator - Uruchom emulator Maemo - - - Qemu has been shut down, because you removed the corresponding Qt version. - - - - Qemu finished with error: Exit code was %1. - - - - Qemu failed to start: %1 - + Uruchom emulator Maemo Qemu crashed - Qemu zakończone błędem + Qemu zakończone błędem Qemu error - Błąd Qemu + Błąd Qemu Stop Maemo Emulator - Zatrzymaj emulator Maemo + Zatrzymaj emulator Maemo @@ -19048,19 +21156,19 @@ Identyfikatory muszą rozpoczynać się małą literą. Normal - Normalny + Normalny Outline - Kontur + Kontur Raised - Wypukły + Wypukły Sunken - Wklęsły + Wklęsły ... @@ -19076,6 +21184,10 @@ Identyfikatory muszą rozpoczynać się małą literą. FakeVim::Internal::FakeVimHandler::Private + + [New] + [Nowy] + Not an editor command: %1 %1 nie jest komendą edytora @@ -19085,7 +21197,3682 @@ Identyfikatory muszą rozpoczynać się małą literą. QmlDesigner::ContextPaneWidget Disable permanently - Wyłącz na stałe + Wyłącz na stałe + + + + ContextPaneWidgetBorderImage + + Form + Formularz + + + Stretch vertically. Scales the image to fit to the available area. + + + + Repeat vertically. Tiles the image until there is no more space. May crop the last image. + + + + Round. Like Repeat, but scales the images down to ensure that the last image is not cropped. + + + + Repeat horizontally. Tiles the image until there is no more space. May crop the last image. + + + + Strech horizontally. Scales the image to fit to the available area. + + + + 10 x 10 + 10 x 10 + + + + ContextPaneWidgetImage + + Form + Formularz + + + The image is scaled to fit + + + + The image is stretched horizontally and tiled vertically + + + + The image is stretched vertically and tiled horizontally + + + + The image is duplicated horizontally and vertically + + + + The image is scaled uniformly to fit without cropping + + + + The image is scaled uniformly to fill, cropping if necessary + + + + 10 x 10 + 10 x 10 + + + + ContextPaneWidgetRectangle + + Form + Formularz + + + Gradient + Gradient + + + Color + Kolor + + + ... + ... + + + Border + Brzeg + + + + EasingContextPane + + Dialog + Dialog + + + Play simulation + Odtwórz symulację + + + Easing + + + + Type of easing curve + + + + Subtype + Podtyp + + + Acceleration or deceleration of easing curve + + + + Duration + Czas trwania + + + Duration of animation + Czas trwania animacji + + + INVALID + NIEPOPRAWNA WARTOŚĆ + + + ms + ms + + + Amplitude + Amplituda + + + Amplitude of elastic and bounce easing curves + + + + Period + Okres + + + Easing period of an elastic curve + + + + Overshoot + Przestrzał + + + Easing overshoot for a back curve + + + + + ClassView::Internal::NavigationWidget + + Form + Formularz + + + Show subprojects + Pokaż podprojekty + + + Show Subprojects + Pokaż podprojekty + + + + AttachTcfDialog + + Start Debugger + Uruchom debugger + + + Host and port: + Host i port: + + + Architecture: + Architektura: + + + Use server start script: + Użyj startowego skryptu serwera: + + + Server start script: + Startowy skrypt serwera: + + + + BreakpointDialog + + Dialog + Dialog + + + Breakpoint type: + Typ pułapki: + + + File name: + Nazwa pliku: + + + Line number: + Numer linii: + + + Function: + Funkcja: + + + Condition: + Warunek: + + + Ignore count: + Licznik pominięć: + + + Thread specification: + Specyfikacja wątku: + + + Address: + Adres: + + + Edit Breakpoint Properties + Zmodyfikuj właściwości pułapki + + + Use full path: + Użyj pełnej ścieżki: + + + + Help::Internal::RemoteFilterOptions + + Filter configuration + Konfiguracja filtra + + + Prefix: + Przedrostek: + + + Limit to prefix + Ogranicz aktywność filtru: +aktywny tylko po wpisaniu przedrostka + + + + + + + + + - + - + + + Double click to edit item. + Kliknij dwukrotnie aby zmodyfikować element. + + + + ImageViewer::Internal::ImageViewerToolbar + + Show background + Pokaż tło + + + Show outline + + + + Fit image in the screen + Dopasuj obrazek do ekranu + + + Original size + Oryginalny rozmiar + + + Zoom In + Powiększ + + + Zoom Out + Pomniejsz + + + + ComponentNameDialog + + Dialog + Dialog + + + Component name: + Nazwa komponentu: + + + Path: + Ścieżka: + + + Choose... + Wybierz... + + + + QmlJSEditor::Internal::QuickToolBarSettingsPage + + Form + Formularz + + + Qt Quick Toolbars + + + + Always show Qt Quick Toolbar + + + + If enabled, the toolbar will remain pinned to an absolute position. + + + + Pin Qt Quick Toolbar + + + + Qt Quick ToolBar + + + + + Qt4ProjectManager::Internal::LibraryDetailsWidget + + Form + Formularz + + + Library: + Biblioteka: + + + Library file: + Plik z biblioteką: + + + Include path: + Ścieżka do nagłówków: + + + Platform + Platforma + + + Linux + Linux + + + Mac + Mac + + + Windows + Windows + + + Symbian + Symbian + + + Linkage: + Dowiązanie: + + + Dynamic + Dynamiczne + + + Static + Statyczne + + + Mac: + Mac: + + + Library + Biblioteka + + + Framework + Framework + + + Windows: + Windows: + + + Library inside "debug" or "release" subfolder + Biblioteka wewnątrz podkatalogu "debug" lub "release" + + + Add "d" suffix for debug version + Dodaj przyrostek "d" do wersji debugowej + + + Remove "d" suffix for release version + Usuń przyrostek "d" z wersji release'owej + + + + MaemoDeployableListWidget + + Form + Formularz + + + Add File to Package + Dodaj plik do pakietu + + + Remove File from Package + Usuń plik z pakietu + + + + MaemoDeployStepWidget + + Form + Formularz + + + Device configuration: + Konfiguracja urządzenia: + + + Also deploy to sysroot + + + + These show the INSTALLS settings from the project file(s). + + + + <b>Files to install:</b> + <b>Pliki do zainstalowania:</b> + + + + MobileAppWizardOptionPage + + WizardPage + StronaKreatora + + + General + Ogólne + + + Orientation Behavior: + + + + Symbian specific + + + + Application Icon (.svg): + + + + Target UID3: + + + + Enable network access + Włącz dostęp sieciowy + + + Maemo specific + + + + Application Icon (64x64): + + + + + MobileLibraryWizardOptionPage + + WizardPage + StronaKreatora + + + Enable network access + Włącz dostęp sieciowy + + + Target UID3: + + + + + QmlStandaloneAppWizardSourcesPage + + WizardPage + StronaKreatora + + + Main QML file + Główny plik QML + + + QML Modules + Moduły QML + + + + + + + + + - + - + + + URIs (e.g. 'org.mydomain.MyQmlModule') + Lista URI (np. "org.mojadomena.MojModulQml") + + + Import Paths + Zaimportuj ścieżki + + + Error + Błąd + + + + HighlighterSettingsPage + + Form + Formularz + + + <html><head/><body> +<p>Highlight definitions are provided by the <a href="http://kate-editor.org/">Kate Text Editor</a>.</p></body></html> + + + + Syntax Highlight Definition Files + + + + Location: + Położenie: + + + Use fallback location + + + + Behavior + Zachowanie + + + Alert when a highlight definition is not found + + + + Ignored file patterns: + + + + + ManageDefinitionsDialog + + Dialog + Dialog + + + Definitions + Definicje + + + Select All + Zaznacz wszystko + + + Clear Selection + Usuń selekcję + + + Invert Selection + Odwróć selekcję + + + Download Selected Definitions + Pobierz zaznaczone definicje + + + + ProxySettings + + Dialog + Dialog + + + Use http proxy + Użyj pośrednika http + + + Server Address: + Adres serwera: + + + Port: + Port: + + + Username: + Nazwa użytkownika: + + + Password: + Hasło: + + + HTTP Proxy + Pośrednik HTTP + + + Use HTTP Proxy + Użyj pośrednika HTTP + + + Server + Serwer + + + Name or IP + Nazwa lub IP + + + Port + Port + + + 8080 + 8080 + + + Username + Nazwa użytkownika + + + Password + Hasło + + + + RecordingOptions + + Video options + Ustawienia wideo + + + File: + Plik: + + + ... + ... + + + Size + Rozmiar + + + VGA + VGA + + + 720p + 720p + + + QVGA + QVGA + + + Width: + Szerokość: + + + Height: + Wysokość: + + + Rate + Częstotliwość + + + 60Hz + 60Hz + + + 50Hz + 50Hz + + + 25Hz + 25Hz + + + Hz + Hz + + + 24Hz + 24Hz + + + Profile + Profil + + + Help + Pomoc + + + 60 Hz + 60 Hz + + + 50 Hz + 50 Hz + + + 25 Hz + 25 Hz + + + 24 Hz + 24 Hz + + + 20 Hz + 20 Hz + + + 15 Hz + 15 Hz + + + 10 Hz + 10 Hz + + + File + Plik + + + Options + Opcje + + + + QmlEditorWidgets::ContextPaneWidget + + Hides this toolbar. + + + + Pin Toolbar + + + + Show Always + + + + Unpins the toolbar and moves it to the default position. + + + + Hides this toolbar. This toolbar can be permanently disabled in the options page or in the context menu. + + + + + QmlEditorWidgets::ContextPaneWidgetImage + + double click for preview + kliknij dwukrotnie aby wyświetlić podgląd + + + + QmlEditorWidgets::FileWidget + + Open File + Otwórz plik + + + + QmlJS::Bind + + expected two numbers separated by a dot + oczekiwano dwóch liczb oddzielonych kropką + + + package import requires a version number + import pakietu wymaga podania numeru wersji + + + file or directory not found + nie można odnaleźć pliku lub katalogu + + + + Utils::DebuggerLanguageChooser + + C++ + C++ + + + QML + QML + + + Debug port: + Port debugowania: + + + + Utils::SynchronousProcess + + The command '%1' finished successfully. + Komenda "%1" poprawnie zakończona. + + + The command '%1' terminated with exit code %2. + Komenda "%1" zakończona kodem wyjściowym %2. + + + The command '%1' terminated abnormally. + Komenda "%1" niepoprawnie zakończona. + + + The command '%1' could not be started. + Komenda "%1" nie może zostać uruchomiona. + + + The command '%1' did not respond within the timeout limit (%2 ms). + Komenda "%1" nie odpowiedziała w określonym czasie (%2 ms). + + + Process not Responding + Brak odpowiedzi + + + The process is not responding. + Proces nie odpowiada. + + + The process '%1' is not responding. + Proces "%1" nie odpowiada. + + + Would you like to terminate it? + + + + Would you like to terminate it? + Czy chcesz go zakończyć? + + + + ClassView::Internal::NavigationWidgetFactory + + Class View + Widok klas + + + + Core::Internal::CommandComboBox + + Activate %1 + Uaktywnij %1 + + + + Core::NavigationWidget + + Activate %1 Pane + Uaktywnij panel %1 + + + Hide Sidebar + Ukryj boczny pasek + + + Show Sidebar + Pokaż boczny pasek + + + + Core::Internal::SftpChannelPrivate + + Server could not start sftp subsystem. + Serwer nie może uruchomić podsystemu sftp. + + + Unexpected packet of type %1. + Nieoczekiwany pakiet typu %1. + + + Protocol version mismatch: Expected %1, got %2 + Niezgodność wersji protokołu: Oczekiwano %1 zamiast %2 + + + Unknown error. + Nieznany błąd. + + + Created remote directory '%1'. + Utworzono zdalny katalog "%1". + + + Remote directory '%1' already exists. + Zdalny katalog "%1" już istnieje. + + + Error creating directory '%1': %2 + Błąd tworzenia katalogu "%1": %2 + + + Could not open local file '%1': %2 + Nie można otworzyć lokalnego pliku "%1": %2 + + + Remote directory could not be opened for reading. + Nie można otworzyć zdalnego katalogu do odczytu. + + + Failed to list remote directory contents. + Nie można uzyskać zawartości zdalnego katalogu. + + + Failed to close remote directory. + Nie można zamknąć zdalnego katalogu. + + + Failed to open remote file for reading. + Nie można otworzyć zdalnego pliku do odczytu. + + + Failed retrieve information on the remote file ('stat' failed). + Nie można uzyskać informacji o zdalnym pliku ("stat" niepoprawnie zakończony). + + + Failed to read remote file. + Nie można odczytać zdalnego pliku. + + + Failed to close remote file. + Nie można zamknąć zdalnego pliku. + + + Failed to open remote file for writing. + Nie można otworzyć zdalnego pliku do zapisu. + + + Failed to write remote file. + Nie można zapisać zdalnego pliku. + + + Cannot append to remote file: Server does not support the file size attribute. + Nie można dodać zawartości do zdalnego pliku: Serwer nie obsługuje atrybutu "rozmiar pliku". + + + Server could not start session. + Serwer nie może rozpocząć sesji. + + + Error reading local file: %1 + Błąd odczytu lokalnego pliku: %1 + + + + SshConnection + + Server and client capabilities don't match. Client list was: %1. +Server list was %2. + Niezgodność zdolności serwera i klienta. +Lista klienta: %1. +Lista serwera: %2. + + + + Core::Internal::SshChannelManager + + Invalid channel id %1 + Niepoprawny identyfikator kanału %1 + + + + Core::Internal::SshConnectionPrivate + + SSH Protocol error: %1 + Błąd protokołu SSH: %1 + + + Botan library exception: %1 + Wyjątek biblioteki Botan: %1 + + + Invalid protocol version: Expected '2.0', got '%1'. + Niepoprawna wersja protokołu: Oczekiwano "2.0" zamiast "%1". + + + Invalid server id '%1'. + Niepoprawny identyfikator serwera "%1". + + + Unexpected packet of type %1. + Nieoczekiwany pakiet typu %1. + + + Could not read private key file: %1 + Nie można odczytać pliku z publicznym kluczem: %1 + + + Password expired. + Hasło straciło ważność. + + + Server rejected password. + Serwer odrzucił hasło. + + + Server rejected key. + Serwer odrzucił klucz. + + + Server closed connection: %1 + Serwer zamknął połączenie: %1 + + + Connection closed unexpectedly. + Nieoczekiwane zamknięcie połączenia. + + + Timeout waiting for reply from server. + + + + + CodePaster::NetworkProtocol + + Checking connection + + + + Connecting to %1... + Łączenie z %1... + + + + CheckUndefinedSymbols + + Expected a namespace-name + Oczekiwano nazwy przestrzeni nazw + + + + QCoreApplication + + Add %1 declaration + CppEditor::DeclFromDef + Dodaj deklarację %1 + + + GDB helper + + + + qmldump + + + + QMLObserver + + + + Cannot build qmldump; Qt version must be 4.7.1 or higher. + + + + Cannot build QMLObserver; Qt version must be 4.7.1 or higher. + + + + + CppEditor::Internal::CppTypeHierarchyWidget + + No type hierarchy available + Brak dostępnej hierarchii typów + + + + CppEditor::Internal::CppTypeHierarchyFactory + + Type Hierarchy + Hierarchia typów + + + + CppTools::Internal::SymbolsFindFilter + + C++ Symbols + Symbole C++ + + + Searching + Przeszukiwanie + + + + CppTools::Internal::SymbolsFindFilterConfigWidget + + Types: + Typy: + + + Classes + Klasy + + + Methods + Metody + + + Enums + Typy wyliczeniowe + + + Declarations + Deklaracje + + + Projects Only + Tylko projekty + + + Global + Globalne + + + + Debugger::Internal::BreakpointDialog + + File and Line Number + Plik i numer linii + + + Function Name + Nazwa funkcji + + + Function "main()" + Funkcja "main()" + + + Address + Adres + + + + Debugger::Internal::CdbEngine + + The function "%1()" failed: %2 + Function call failed + Funkcja "%1()" zakończona niepowodzeniem: %2 + + + Version: %1 + Wersja: %1 + + + <html>The installed version of the <i>Debugging Tools for Windows</i> (%1) is rather old. Upgrading to version %2 is recommended for the proper display of Qt's data types.</html> + <html>Zainstalowana wersja <i>narzędzi debugowych dla Windows</i> (%1) jest przestarzała. Zalecane jest uaktualnienie do wersji %2 w celu poprawnego wyświetlania typów danych Qt.</html> + + + Debugger + Debugger + + + <html><head/><body><p>The debugger is not configured to use the public <a href="%1">Microsoft Symbol Server</a>. This is recommended for retrieval of the symbols of the operating system libraries.</p><p><i>Note:</i> A fast internet connection is required for this to work smoothly. Also, a delay might occur when connecting for the first time.</p><p>Would you like to set it up?</p></br></body></html> + + + + Symbol Server + Serwer z symbolami + + + Do not ask again + Nie pytaj więcej + + + The dumper library was not found at %1. + Biblioteka zrzutów nie została znaleziona w %1. + + + The console stub process was unable to start '%1'. + + + + Attaching to core files is not supported! + Dołączanie do pliku zrzutu nie jest obsługiwane. + + + Attaching to core files is not supported. + + + + The process exited with exit code %1. + Proces zakończył się kodem wyjściowym %1. + + + Continuing with '%1'... + Kontynuacja z "%1"... + + + Unable to continue: %1 + Nie można kontynuować: %1 + + + Reverse stepping is not implemented. + Kroczenie wstecz nie jest zaimplementowane. + + + Thread %1 cannot be stepped. + Wątek %1 nie może być śledzony krok po kroku. + + + Stepping %1 + Kroczenie %1 + + + Running requested... + Zażądano uruchomienia... + + + Running up to %1:%2... + Uruchomiony do osiągnięcia %1:%2... + + + Running up to function '%1()'... + Uruchomiony do osiągnięcia funkcji '%1()'... + + + Jump to line is not implemented + Skok do linii nie jest obsługiwany + + + Assigning '%1' to '%2' (%3)... + Arguments: New value, name, (type) + Przypisywanie wartości "%1" do zmiennej "%2" typu %3... + + + Can assign only scalar values. + Przypisać można jedynie wartości skalarne. + + + Cannot assign values of type '%1'. Only POD-types can be assigned. + Nie można przypisać wartości typu "%1". Przypisać można jedynie podstawowe typy POD. + + + Unable to assign the value '%1' to '%2' (%3): %4 + Arguments: New value, name, (type): Error + Nie można przypisać wartości "%1" do "%2" typu %3: %4 + + + Unable to retrieve %1 bytes of memory at 0x%2: %3 + Nie można odczytać %1 bajtów pamięci spod adresu 0x%2: %3 + + + Cannot retrieve symbols while the debuggee is running. + Nie można odczytać symboli dopóki pracuje debugowany program. + + + Debugger Error + Błąd debuggera + + + Ignoring initial breakpoint... + Zignorowano początkową pułapkę... + + + <interrupt thread> + <przerwij wątek> + + + Breakpoint + Pułapka + + + Interrupted in thread %1, current thread: %2 + Przerwano w wątku %1, bieżący wątek: %2 + + + Stopped, current thread: %1 + Zatrzymano, bieżący wątek: %1 + + + Changing threads: %1 -> %2 + Zmiana wątków: %1 -> %2 + + + stopped + zatrzymano + + + Stopped at %1:%2 in thread %3. + Zatrzymano w %1:%2 w wątku %3. + + + Stopped at %1 in thread %2 (missing debug information). + Zatrzymano w %1 w wątku %2 (brak informacji debugowej). + + + Stopped at %1 (%2) in thread %3 (missing debug information). + Zatrzymano w %1 (%2) w wątku %3 (brak informacji debugowej). + + + Stopped in thread %1 (missing debug information). + Zatrzymano w wątku %1 (brak informacji debugowej). + + + Breakpoint: %1 + Pułapka: %1 + + + Watchpoint: %1 + + + + The CDB debug engine does not support the '%1 + + + + + Debugger::Internal::CacheDirectoryDialog + + Select Local Cache Folder + Wybierz katalog z lokalnym cache + + + Path: + Ścieżka: + + + Already Exists + Już istnieje + + + A file named '%1' already exists. + Plik o nazwie "%1" już istnieje. + + + Cannot Create + Nie można utworzyć + + + The folder '%1' could not be created. + Nie można utworzyć katalogu "%1". + + + + Debugger::Internal::Console + + Clear Contents + Wyczyść zawartość + + + Save Contents + Zachowaj zawartość + + + Log File + Plik dziennika + + + Write Failure + Błąd zapisu + + + Unable to write log contents to '%1': %2 + Nie można zapisać zawartości dziennika do "%1": %2 + + + + Debugger::Internal::ConsoleWindow + + Console + Konsola + + + + Debugger::Internal::AttachTcfDialog + + Select Executable + Wybierz plik wykonywalny + + + + Debugger::DebuggerEnginePrivate + + Remove Breakpoint %1 + Usuń pułapkę %1 + + + Disable Breakpoint %1 + Wyłącz pułapkę %1 + + + Enable Breakpoint %1 + Włącz pułapkę %1 + + + Set Breakpoint at 0x%1 + Ustaw pułapkę w 0x%1 + + + Set Breakpoint at line %1 + Ustaw pułapkę w linii %1 + + + + Debugger::DebuggerEngine + + Symbol + Symbol + + + Address + Adres + + + Code + Kod + + + Symbols in "%1" + Symbole w "%1" + + + Launching + Uruchamianie + + + %1 (explicitly set in the Debugger Options) + %1 (ustawione jawnie w opcjach debuggera) + + + Open Qt4 Options + Otwórz ustawienia Qt4 + + + Turn off Helper Usage + Wyłącz używanie asystenta + + + Continue Anyway + Kontynuuj + + + Debugging Helper Missing + Brak asystenta debuggera + + + The debugger could not load the debugging helper library. + Debugger nie mógł załadować biblioteki asystenta debuggera. + + + The debugging helper is used to nicely format the values of some Qt and Standard Library data types. It must be compiled for each used Qt version separately. On the Qt4 options page, select a Qt installation and click Rebuild. + Asystent debuggera jest używany do ładnego formatowania niektórych typów Qt i Biblioteki Standardowej. Musi być skompilowany oddzielnie dla każdej używanej wersji Qt. Można to zrobić z poziomu strony ustawień Qt poprzez wybranie instalacji Qt i kliknięcie na "Przebuduj" w linijce "Asystent debuggera". + + + Turn off QML Observer Usage + + + + QML Observer Missing + + + + QML Observer could not be found. + + + + QML Observer is used to offer additional debugging features for QML applications, such as interactive debugging and inspection tools.It must be compiled for each used Qt version separately. On the Qt4 options page, select a Qt installation and click Rebuild. + + + + Taking notice of pid %1 + + + + + Debugger::DebuggerPlugin + + Option '%1' is missing the parameter. + Brak parametru w opcji "%1". + + + The parameter '%1' of option '%2' is not a number. + Parametr "%1" w opcji "%2" nie jest liczbą. + + + Invalid debugger option: %1 + Niepoprawna opcja debuggera: %1 + + + The application requires the debugger engine '%1', which is disabled. + Program wymaga silnika debuggera "%1", który jest wyłączony. + + + + Debugger::DebuggerPluginPrivate + + QML Script Console + + + + Continue + Kontynuuj + + + Stop Debugger + Zatrzymaj debugger + + + Interrupt + Przerwij + + + Abort Debugging + Przerwij debugowanie + + + Aborts debugging and resets the debugger to the initial state. + Przerywa debugowanie i przywraca debugger do stanu początkowego. + + + Step Over + Przeskocz + + + Step Into + Wskocz do wnętrza + + + Step Out + Wyskocz na zewnątrz + + + Run to Line + Uruchom do linii + + + Run to Outermost Function + Uruchom do skrajnej funkcji + + + Immediately Return From Inner Function + Powróć natychmiast z wewnętrznej funkcji + + + Jump to Line + Skocz do linii + + + Toggle Breakpoint + Przełącz ustawienie pułapki + + + Add to Watch Window + Dodaj do okna obserwowanych + + + Create Snapshot + Utwórz zrzut + + + Reverse Direction + Odwrotny kierunek + + + Move to Called Frame + + + + Move to Calling Frame + + + + C++ + C++ + + + QML/JavaScript + QML/JavaScript + + + Error evaluating command line arguments: %1 + Błąd podczas przetwarzania argumentów komendy: %1 + + + Start and Debug External Application... + Uruchom i zdebuguj zewnętrzną aplikację... + + + Attach to Running External Application... + Dołącz do uruchomionej zewnętrznej aplikacji... + + + Attach to Core... + Dołącz do zrzutu... + + + Attach to Running Tcf Agent... + + + + This attaches to a running 'Target Communication Framework' agent. + + + + Start and Attach to Remote Application... + Uruchom i dołącz do zdalnej aplikacji... + + + Detach Debugger + Odłącz debugger + + + Interrupt Debugger + Przerwij debugger + + + Reset Debugger + Wyzeruj debugger + + + Threads: + Wątki: + + + Warning + Ostrzeżenie + + + Cannot attach to PID 0 + Nie można dołączyć do PID 0 + + + Process %1 + Proces %1 + + + Core file "%1" + Plik zrzutu "%1" + + + Remote: "%1" + Zdalny: "%1" + + + Attaching to PID %1. + Dołączanie do PID %1. + + + Attaching to remote server %1. + Dołączanie do zdalnego serwera %1. + + + Attaching to core %1. + Dołączanie do zrzutu %1. + + + Save Debugger Log + Zachowaj dziennik debuggera + + + + Debugger::DebuggerRunControlFactory + + Debug + + + + + Debugger::DebuggerRunControl + + Cannot debug '%1' (tool chain: '%2'): %3 + Nie można debugować "%1" (zestaw narzędzi: "%2"): %3 + + + Warning + Ostrzeżenie + + + Debugger + Debugger + + + Starting debugger '%1' for tool chain '%2'... + Uruchamianie debuggera "%1" dla zestawu narzędzi "%2"... + + + Debugging starts + Rozpoczęto debugowanie + + + Debugging has failed + Błąd debugowania + + + Debugging has finished + Zakończono debugowanie + + + A debugging session is still in progress. Terminating the session in the current state can leave the target in an inconsistent state. Would you still like to terminate it? + + + + A debugging session are still in progress. Terminating the session in the current state can leave the target in an inconsistent state. Would you still like to terminate it? + Trwa sesja debugowa. Zakończenie jej w bieżącym stanie może spowodować, że program znajdzie się w niespójnym stanie. Czy wciąż chcesz ją zakończyć? + + + Close Debugging Session + Zakończ sesję debugową + + + + Debugger::Internal::AbstractPlainGdbAdapter + + Starting executable failed: + + Nie można uruchomić programu: + + + + + Debugger::Internal::AttachGdbAdapter + + Attached to process %1. + Dołączono do procesu %1 + + + + Debugger::Internal::LocalPlainGdbAdapter + + Cannot set up communication with child process: %1 + Nie można ustanowić komunikacji z podprocesem: %1 + + + This does not seem to be a "Debug" build. +Setting breakpoints by file name and line number may fail. + Nie wygląda to na sesję debugową. +Ustawianie pułapek może się nie powieść. + + + + Debugger::Internal::RemoteGdbProcess + + Connection could not be established. + Nie można ustanowić połączenia. + + + Could not create FIFO. + Nie można utworzyć FIFO. + + + Application output reader unexpectedly finished. + + + + Remote gdb failed to start. + Nie można uruchomić zdalnego gdb. + + + Remote gdb crashed. + Zdalny gdb przerwał pracę. + + + + Debugger::Internal::RemoteGdbServerAdapter + + The upload process failed to start. Shell missing? + Nie można rozpocząć procesu przesyłania. Brak powłoki? + + + The upload process crashed some time after starting successfully. + Proces przesyłania przerwany po poprawnym uruchomieniu. + + + The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again. + Ostatnie wywołanie funkcji waitFor...() zakończyło się niepowodzeniem po określonym czasie. Stan QProcess się nie zmienił, możesz ponownie spróbować wywołać waitFor...(). + + + An error occurred when attempting to write to the upload process. For example, the process may not be running, or it may have closed its input channel. + Wystąpił błąd podczas próby pisania do procesu przesyłania. Proces może nie być uruchomiony lub zamknął on swój kanał wejściowy. + + + An error occurred when attempting to read from the upload process. For example, the process may not be running. + Wystąpił błąd podczas próby czytania z procesu przesyłania. Proces może nie być uruchomiony. + + + An unknown error in the upload process occurred. This is the default return value of error(). + Wystąpił nieznany błąd podczas procesu przesyłania. Jest to domyślna wartość zwrócona przez error(). + + + Error + Błąd + + + No symbol file given. + Brak pliku z symbolami. + + + Reading debug information failed: + + Błąd odczytu informacji debugowej: + + + + + Debugger::Internal::TcfTrkGdbAdapter + + Process started, PID: 0x%1, thread id: 0x%2, code segment: 0x%3, data segment: 0x%4. + Proces uruchomiony, PID: 0x%1, identyfikator wątku: 0x%2, segment kodu: 0x%3, segment danych: 0x%4. + + + The reported code segment address (0x%1) might be invalid. Symbol resolution or setting breakoints may not work. + + + + Connecting to TRK server adapter failed: + + Nie można nawiązać połączenia z adapterem serwera TRK: + + + + + Debugger::Internal::DebuggerPane + + Clear Contents + Wyczyść zawartość + + + Save Contents + Zachowaj zawartość + + + Log File + Plik dziennika + + + Write Failure + Błąd zapisu + + + Unable to write log contents to '%1': %2 + Nie można zapisać zawartości dziennika do "%1": %2 + + + + Debugger::Internal::InputPane + + Type Ctrl-<Return> to execute a line. + Naciśnij Ctrl-<Return> aby wykonać linię. + + + + Debugger::Internal::LogWindow + + Log + Dziennik + + + + Debugger::QmlAdapter + + Connect to debug server %1:%2 + Nawiąż połączenie z serwerem debugowym %1.%2 + + + Error: (%1) %2 + %1=error code, %2=error message + Błąd: (%1) %2 + + + disconnected. + + + rozłączony. + + + + resolving host... + + + + connecting to debug server... + łączenie z serwerem debugowym... + + + connected. + + połączony. + + + + closing... + zamykanie... + + + + Debugger::QmlCppEngine + + %1 debugger activated + Uaktywniono debugger %1 + + + + Debugger::QmlEngine + + QML Debugger connected. + + + + Failed to connect to debugger + Nie można nawiązać połączenia z debuggerem + + + Could not connect to QML debugger server at %1:%2. + + + + QML Debugger: Remote host closed connection. + + + + QML Debugger connecting... + + + + Failed to start application + Nie można uruchomić aplikacji + + + Application startup failed: %1 + + + + Trying to stop while process is no longer running. + + + + Stopped. + Zatrzymano. + + + <p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p> + + + + Uncaught Exception + Nieobsłużony wyjątek + + + QML Debugger disconnected. + + + + + Debugger::Internal::ScriptConsole + + <Type expression to evaluate> + <Wpisz wyrażenie do wykonania> + + + Write and evaluate QtScript expressions. + Wpisz i wykonaj polecenia QtScript. + + + Script Console + + Konsola skryptowa + + + + + Debugger::Internal::SourceFilesHandler + + Internal name + Wewnętrzna nazwa + + + Full name + Pełna nazwa + + + + Debugger::Internal::TcfEngine + + %1. + %1. + + + Running requested... + Zażądano uruchomienia... + + + Stopped. + Zatrzymano. + + + + Git::Internal::SettingsPageWidget + + Set the environment variable HOME to '%1' +(%2). +This causes msysgit to look for the SSH-keys in that location +instead of its installation directory when run outside git bash. + Ustaw zmienną środowiskową HOME na "%1" +(%2). +Spowoduje to że msysgit uruchomiony na zewnątrz powłoki git +zacznie poszukiwać kluczy SSH w tym położeniu +zamiast w jego katalogu instalacyjnym. + + + not currently set + aktualnie nie ustawiona + + + currently set to '%1' + aktualnie ustawiona na "%1" + + + + Help::Internal::ExternalHelpWindow + + Show Sidebar + Pokazuj boczny pasek + + + Qt Creator Offline Help + Pomoc offline Qt Creatora + + + + EditorManager + + Next Open Document in History + Następny otwarty dokument w historii + + + Previous Open Document in History + Poprzedni otwarty dokument w historii + + + + Help::Internal::OpenPagesManager + + Copy Full Path to Clipboard + Skopiuj pełną ścieżkę do schowka + + + + Help::Internal::RemoteHelpFilter + + Online Documentation + Dokumentacja online + + + + ImageViewer::Internal::ImageViewerActionHandler + + Zoom In + Powiększ + + + Ctrl++ + Ctrl++ + + + Zoom Out + Pomniejsz + + + Ctrl+- + Ctrl+- + + + Original Size + Oryginalny rozmiar + + + Ctrl+0 + Ctrl+0 + + + Fit To Screen + Dopasuj do ekranu + + + Ctrl+= + Ctrl+= + + + Switch background + Przełącz tło + + + Ctrl+[ + Ctrl+[ + + + Switch outline + + + + Ctrl+] + Ctrl+] + + + + ProjectExplorer::Internal::BuildStepListWidget + + %1 Steps + %1 is the name returned by BuildStepList::displayName + Kroki %1 + + + No %1 Steps + Brak kroków %1 + + + Add %1 Step + Dodaj krok %1 + + + Move Up + Przenieś do góry + + + Move Down + Przenieś na dół + + + Remove Item + Usuń element + + + Removing Step failed + Nie można usunąć kroku + + + Cannot remove build step while building + Nie można usunąć kroku podczas budowania + + + No Build Steps + Brak kroków procesu budowania + + + + ProjectExplorer::Internal::CopyTaskHandler + + error: + Task is of type error + błąd: + + + warning: + Task is of type warning + ostrzeżenie: + + + &Copy + Name of the action triggering the copytaskhandler + S&kopiuj + + + Copy task to clipboard + Skopiuj zadanie do schowka + + + + ProjectExplorer::DeployConfiguration + + Deploy + Display name of the deploy build step list. Used as part of the labels in the project window. + Zainstaluj + + + No deployment + Default DeployConfiguration display name + Brak instalacji + + + + ProjectExplorer::DeployConfigurationFactory + + Deploy Configuration + Display name of the default deploy configuration + Konfiguracja instalacji + + + + ProjectExplorer::Internal::EditorSettingsWidget + + Default + Domyślne + + + + ProjectExplorer::RunControl + + Application Still Running + Program wciąż uruchomiony + + + %1 is still running. + %1 jest wciąż uruchomiony. + + + Force it to quit? + Zakończyć go? + + + Force Quit + Wymuś zakończenie + + + Keep Running + Pozostaw uruchomionym + + + + ProjectExplorer::Internal::ShowInEditorTaskHandler + + &Show in editor + &Pokaż w edytorze + + + Show task location in an editor + Pokaż położenie zadania w edytorze + + + + ProjectExplorer::Internal::ShowOutputTaskHandler + + Show &Output + Pokaż &wyjście + + + Show output generating this issue. + + + + + ProjectExplorer::Internal::TaskWindow + + Build Issues + Problemy podczas budowania + + + Show Warnings + Pokazuj ostrzeżenia + + + Filter by categories + Przefiltruj według kategorii + + + + ProjectExplorer::UserFileAccessor + + Project Settings File from a different Environment? + + + + Qt Creator has found a .user settings file which was created for another development setup, maybe originating from another machine. + +The .user settings files contain environment specific settings. They should not be copied to a different environment. + +Do you still want to load the settings file? + + + + + ProjectExplorer::UserFileHandler + + No deployment + Brak instalacji + + + Deploy to Maemo device + Zainstaluj na urządzeniu Maemo + + + Deploy to Symbian device + Zainstaluj na urządzeniu Symbian + + + + ProjectExplorer::Internal::VcsAnnotateTaskHandler + + &Annotate + Dołącz &adnotację + + + + QmlJSEditor::ComponentFromObjectDef + + Move Component into separate file + Przenieś komponent do osobnego pliku + + + Move Component into '%1.qml' + Przenieś komponent do "%1.qml" + + + + QmlJSEditor::Internal::ComponentNameDialog + + Choose a path + Wybierz ścieżkę + + + Invalid component name + Niepoprawna nazwa komponentu + + + Invalid path + Niepoprawna ścieżka + + + + QmlJSEditor::FindReferences + + Searching + Przeszukiwanie + + + + QmlJSEditor::QuickFix + + Split initializer + + + + + QmlJSInspector::Internal::QmlInspectorToolbar + + Apply Changes to Document + + + + Observer Mode + + + + Reload + Przeładuj + + + Play/Pause Animations + + + + Select + Wybierz + + + Zoom + Powiększ + + + Color Picker + + + + Live Preview Changes in QML Viewer + + + + Animation Speed + Prędkość animacji + + + 1x + 1x + + + 0.5x + 0.5x + + + 0.25x + 0.25x + + + 0.125x + 0.125x + + + 0.1x + 0.1x + + + Pause + + + + + QmlJSInspector::Internal::ContextCrumblePath + + [no context] + [brak kontekstu] + + + + QmlJSInspector::Internal::InspectorUi + + Context Path + + + + QML Observer + + + + + QmlJSInspector::Internal::QmlJSLiveTextPreview + + You changed a QML file in Live Preview mode, which modifies the running QML application. In case of unexpected behavior, please reload the QML application. + + + + Disable Live Preview + + + + The %1 attribute at line %2, column %3 cannot be changed without reloading the QML application. + + + + The %1 element at line %2, column %3 cannot be changed without reloading the QML application. + + + + You can continue debugging, but behavior can be unexpected. + + + + Reload + Przeładuj + + + + QmlJSInspector::Internal::QmlJSObjectTree + + Go to file + Przejdź do pliku + + + Url: + Url: + + + + QmlJSInspector::ToolBarColorBox + + Copy Color + Skopiuj kolor + + + + Qt4ProjectManager::Internal::AddLibraryWizard + + Add Library + Dodaj bibliotekę + + + Type + Typ + + + Details + Szczegóły + + + Summary + Podsumowanie + + + + Qt4ProjectManager::Internal::LibraryTypePage + + Library Type + Typ biblioteki + + + Choose the type of the library to link to + Wybierz typ biblioteki która ma zostać dowiązana + + + System library + Biblioteka systemowa + + + Links to a system library. +Neither the path to the library nor the path to its includes is added to the .pro file. + Dowiązuje bibliotekę systemową. +Ścieżki do biblioteki i jej nagłówków nie zostaną dodane do pliku .pro. + + + External library + Zewnętrzna biblioteka + + + Links to a library that is not located in your build tree. +Adds the library and include paths to the .pro file. + Dowiązuje bibliotekę która jest poza drzewem budowy projektu. +Ścieżki do biblioteki i jej nagłówków zostaną dodane do pliku .pro. + + + Internal library + Wewnętrzna biblioteka + + + Links to a library that is located in your build tree. +Adds the library and include paths to the .pro file. + Dowiązuje bibliotekę która jest wewnątrz drzewa budowy projektu. +Ścieżki do biblioteki i jej nagłówków zostaną dodane do pliku .pro. + + + + Qt4ProjectManager::Internal::DetailsPage + + System Library + Biblioteka systemowa + + + Specify the library to link to + Wskaż bibliotekę która ma zostać dowiązana + + + External Library + Zewnętrzna biblioteka + + + Specify the library to link to and the includes path + Wskaż bibliotekę która ma zostać dowiązana i podaj ścieżkę do jej nagłówków + + + Internal Library + Wewnętrzna biblioteka + + + Choose the project file of the library to link to + Wybierz plik projektu biblioteki która ma zostać dowiązana + + + + Qt4ProjectManager::Internal::SummaryPage + + Summary + Podsumowanie + + + The following snippet will be added to the<br><b>%1</b> file: + Do pliku <b>%1</b><br>zostanie dodany następujący fragment: + + + + Qt4ProjectManager::Internal::LibraryDetailsController + + Linkage: + Dowiązanie: + + + %1 Dynamic + %1 Dynamiczne + + + %1 Static + %1 Statyczne + + + Mac: + Mac: + + + %1 Framework + %1 Framework + + + %1 Library + %1 Biblioteka + + + + Qt4ProjectManager::Internal::MaemoDebugSupport + + No device configuration set for run configuration. + Brak konfiguracji urządzenia dla konfiguracji uruchamiania. + + + Preparing remote side ... + + + + Upload failed: Could not open file '%1' + + + + Started uploading debugging helpers ('%1'). + + + + Could not upload debugging helpers: %1. + + + + Finished uploading debugging helpers. + + + + Initial setup failed: %1 + + + + + Qt4ProjectManager::Internal::MaemoDeployableListModel + + File already in list. + Plik już jest na liście. + + + Failed to update .pro file. + Nie można uaktualnić pliku .pro. + + + Could not update .pro file. + Nie można uaktualnić pliku .pro. + + + Local File Path + Ścieżka do lokalnego pliku + + + Remote Directory + Zdalny katalog + + + + Qt4ProjectManager::Internal::MaemoDeployableListWidget + + Choose a local file + Wybierz plik lokalny + + + Error adding file + Błąd w trakcie dodawania pliku + + + Error removing file + Błąd w trakcie usuwania pliku + + + + Qt4ProjectManager::Internal::MaemoDeployStep + + Deploy to Maemo device + MaemoDeployStep default display name + Zainstaluj na urządzeniu Maemo + + + Cannot start deployment, as the clean-up from the last time has not finished yet. + Nie można rozpocząć instalowania ponieważ ostatnie czyszczenie nie zostało jeszcze zakończone. + + + Deployment failed: No valid device set. + Błąd instalowania: Nie ustawiono poprawnego urządzenia. + + + All files up to date, no installation necessary. + Wszystkie pliki są aktualne, instalowanie zbyteczne. + + + Could not connect to host: %1 + Nie można połączyć się z hostem: %1 + + + Upload failed: Could not open file '%1' + + + + Started uploading file '%1'. + + + + Could not set up SFTP connection: %1 + + + + Failed to upload file %1: %2 + + + + Successfully uploaded file '%1'. + + + + Deployment finished. + Zakończono instalowanie. + + + Installing package to sysroot ... + + + + Installation to sysroot failed, continuing anyway. + + + + Copying files to sysroot ... + + + + Sysroot installation failed: Could not copy '%1' to '%2'. Continuing anyway. + + + + Connecting to device... + Nawiązywanie połączenia z urządzeniem... + + + Installing package to device... + + + + Copying file '%1' to path '%2' on the device... + + + + Device has not enough free ports for deployment. + + + + Copying file '%1' failed. + + + + Successfully copied file '%1'. + + + + All files copied. + + + + Installing package failed. + Błąd instalowania pakietu. + + + Package installed. + Zainstalowano pakiet. + + + + Qt4ProjectManager::Internal::MaemoDeployStepFactory + + Deploy to device + + + + + Qt4ProjectManager::Internal::MaemoDeployStepWidget + + <b>Deploy to device</b>: %1 + + + + + MaemoDeviceConfig + + (Invalid device) + + + + + Qt4ProjectManager::Internal::MaemoDeviceEnvReader + + Could not connect to host: %1 + Nie można połączyć się z hostem: %1 + + + Error running remote process: %1 + Błąd zdalnego procesu: %1 + + + + Qt4ProjectManager::Internal::MaemoPackageCreationFactory + + Create Debian Package + + + + + Qt4ProjectManager::Internal::MaemoQemuManager + + Start Maemo Emulator + Uruchom emulator Maemo + + + Qemu has been shut down, because you removed the corresponding Qt version. + + + + Qemu finished with error: Exit code was %1. + + + + Qemu failed to start: %1 + + + + Qemu crashed + Qemu zakończone błędem + + + Qemu error + Błąd Qemu + + + Stop Maemo Emulator + Zatrzymaj emulator Maemo + + + + Qt4ProjectManager::Internal::MaemoRemoteMounter + + Unmounting remote mount points... + + + + Could not execute unmount request. + + + + Failure unmounting: %1 + + + + Finished unmounting. + + + + +stderr was: '%1' + + + + Setting up SFTP connection... + + + + Failed to establish SFTP connection: %1 + + + + Uploading UTFS client... + + + + Could not upload UTFS client (%1). + + + + Could not upload UTFS client: %1 + + + + Starting remote UTFS clients... + + + + Failure running UTFS client: %1 + + + + Starting UTFS servers... + + + + +stderr was: %1 + + + + Error running UTFS server: %1 + + + + Timeout waiting for UTFS servers to connect. + + + + + Qt4ProjectManager::Internal::MaemoRemoteMountsModel + + Local directory + + + + Remote mount point + + + + + Qt4ProjectManager::Internal::MaemoRunControl + + No device configuration set for run configuration. + Brak konfiguracji urządzenia dla konfiguracji uruchamiania. + + + Starting remote process ... + + + + Finished running remote process. Exit code was %1. + + + + Remote Execution Failure + Błąd zdalnego procesu + + + + Qt4ProjectManager::Internal::MaemoSshRunner + + Cannot start deployment, as the clean-up from the last time has not finished yet. + Nie można rozpocząć instalowania ponieważ ostatnie czyszczenie nie zostało jeszcze zakończone. + + + Connecting to device... + Nawiązywanie połączenia z urządzeniem... + + + Could not connect to host: %1 + Nie można połączyć się z hostem: %1 + + + Killing remote process(es)... + + + + Initial cleanup failed: %1 + + + + Error running remote process: %1 + Błąd zdalnego procesu: %1 + + + Cannot run: No remote executable set. + + + + The device does not have enough free ports for this run configuration. + + + + + Qt4ProjectManager::Internal::MaemoTemplatesManager + + Unable to create Debian templates: dh_make failed (%1) + + + + Unable to create debian templates: dh_make failed (%1) + + + + Packaging Error: Cannot open file '%1'. + Błąd pakowania: Nie można otworzyć pliku "%1". + + + Packaging Error: Cannot write file '%1'. + Błąd pakowania: Nie można zapisać pliku "%1". + + + Debian changelog file '%1' has unexpected format. + + + + Error writing Debian changelog file '%1': %2 + + + + Invalid icon data in Debian control file. + + + + Could not read image file '%1'. + + + + Could not export image file '%1'. + + + + Error writing file '%1': %2 + + + + Error creating Maemo templates + + + + File '%1' does not exist + + + + Cannot open file '%1': %2 + + + + + Qt4ProjectManager::PassphraseForKeyDialog + + Passphrase: + + + + Save passphrase + + + + This is an insecure option. The password will be saved as a plain text. + + + + Passphrase for %1 + + + + + Qt4ProjectManager::Internal::S60DeployConfiguration + + Deploy %1 to Symbian device + + + + Deploy to Symbian device + Zainstaluj na urządzeniu Symbian + + + + Qt4ProjectManager::Internal::S60DeployConfigurationFactory + + %1 on Symbian Device + %1 na urządzeniu Symbian + + + + Qt4ProjectManager::Internal::S60DeployConfigurationWidget + + Device: + Urządzenie: + + + Silent installation + + + + Installation file: + Plik instalacyjny: + + + Silent installation is an installation mode that does not require user's intervention. In case it fails the non silent installation is launched. + + + + Installation drive: + + + + Device on serial port: + Urządzenie na porcie szeregowym: + + + Queries the device for information + Zapytaj urządzenie o informacje + + + Connecting... + Łączenie... + + + + Qt4ProjectManager::Internal::S60DeployStep + + Unable to remove existing file '%1': %2 + Nie można usunąć istniejącego pliku "%1": %2 + + + Unable to rename file '%1' to '%2': %3 + Nie można zmienić nazwy pliku "%1" na "%2": %3 + + + Deploy + Qt4 Deploystep display name + Zainstaluj + + + Renaming new package '%1' to '%2' + Zmienianie nazwy pakietu "%1" na "%2" + + + Removing old package '%1' + Usuwanie starego pakietu "%1" + + + '%1': Package file not found + + + + There is no device plugged in. + Brak podłączonego urządzenia. + + + Failed to find package %1 + + + + Deploying application to '%2'... + + + + Could not connect to phone on port '%1': %2 +Check if the phone is connected and App TRK is running. + Nie można nawiązać połączenia z telefonem na porcie "%1": %2 +Sprawdź czy telefon jest podłączony i czy aplikacja TRK jest uruchomiona. + + + Canceled. + Anulowano. + + + Could not create file %1 on device: %2 + Nie można utworzyć pliku %1 na urządzeniu: %2 + + + Could not write to file %1 on device: %2 + Nie można zapisać do pliku %1 na urządzeniu: %2 + + + Could not close file %1 on device: %2. It will be closed when App TRK is closed. + Nie można zamknąć pliku %1 w urządzeniu: %2, będzie on zamknięty gdy aplikacja TRK zostanie zakończona. + + + Could not connect to App TRK on device: %1. Restarting App TRK might help. + Nie można ustanowić połączenia z aplikacją TRK w urządzeniu: %1. Spróbuj ponownie uruchomić aplikację TRK. + + + Copying "%1"... + + + + Installing package "%1" on drive %2:... + + + + Installation has finished + + + + Could not install from package %1 on device: %2 + Nie można zainstalować z pakietu %1 na urządzeniu: %2 + + + The device '%1' has been disconnected + Urządzenie "%1" zostało odłączone + + + + Qt4ProjectManager::Internal::S60DeployStepWidget + + Deploy SIS Package + + + + + Qt4ProjectManager::Internal::S60DeployStepFactory + + Deploy SIS Package + + + + + Qt4ProjectManager::SbsV2Parser + + SBSv2 build log + + + + The file '%1' is not a SBSv2 log file. + + + + Running command: %1 + + + + + Recipe %1 failed with exit code %2. + %1 is the SBSv2 build recipe name, %2 the return code of the failed command + + + + + Qt4ProjectManager::Internal::Qt4DeployConfigurationFactory + + Deploy to Symbian device + Zainstaluj na urządzeniu Symbian + + + Deploy to Maemo device + Zainstaluj na urządzeniu Maemo + + + + Qt4ProjectManager::AbstractMobileApp + + Could not open desktop file template + + + + Could not open main.cpp template '%1'. + + + + Could not open project file template '%1'. + + + + Could not open template file '%1'. + + + + + Qt4ProjectManager::Internal::AbstractMobileAppWizardDialog + + Qt versions + + + + Application options + + + + + MobileAppWizard + + Mobile Qt Application + Mobilna aplikacja Qt + + + Creates a Qt application optimized for mobile devices with a Qt Designer-based main window. + +Preselects Qt for Simulator and mobile targets if available. + + + + + Qt4ProjectManager::Internal::MobileAppWizardOptionsPage + + Auto rotate orientation + + + + Lock to landscape orientation + + + + Lock to portrait orientation + + + + The file is not a valid image. + + + + The icon has an invalid size. + + + + Icon unusable + + + + + Qt4ProjectManager::Internal::QmlStandaloneApp + + The QML import path '%1' cannot be found. + + + + The QML module '%1' cannot be found. + + + + Invalid '%1' entry in '%2' of module '%3'. + + + + No .pro file for plugin '%1' cannot be found. + + + + Could not write file '%1'. + + + + + Qt4ProjectManager::Internal::QmlStandaloneAppWizardDialog + + New QML Project + Nowy projekt QML + + + This wizard generates a QML application project. + Ten kreator generuje projekt aplikacji QML. + + + New Qt Quick Application + + + + Qt Quick Application from Existing QML Directory + + + + This wizard generates a Qt Quick application project. + + + + This wizard imports an existing QML directory and creates a Qt Quick application project from it. + + + + QML Sources + + + + + Qt4ProjectManager::Internal::QmlStandaloneAppWizard + + Qt QML Application + Aplikacja Qt QML + + + Qt Quick Application + + + + Import Existing QML Directory + Import istniejącego katalogu QML + + + Creates a Qt Quick application that you can deploy to mobile devices. + + + + Imports an existing QML directory and converts it into a Qt Quick application project. You can deploy the application to mobile devices. + + + + + Qt4ProjectManager::Internal::QmlStandaloneAppWizardSourcesPage + + Select the main QML file of the application. + + + + Select an import path for QML modules. + + + + + TaskList::Internal::StopMonitoringHandler + + Stop monitoring + + + + Stop monitoring task files. + + + + + TaskList::Internal::TaskFileFactory + + Task file reader + + + + + TaskList::TaskListPlugin + + My Tasks + Category under which tasklist tasks are listed in build issues view + + + + + TextEditor::HighlighterSettingsPage + + Generic Highlighter + + + + Download Definitions + + + + Autodetect + Wykryj automatycznie + + + Autodetect Definitions + + + + No pre-installed definitions could be found. + + + + Error connecting to server. + + + + Not possible to retrieve data. + + + + + TextEditor::Internal::ManageDefinitionsDialog + + Name + + + + Installed + + + + Available + + + + Download Definitions + + + + Download Information + + + + There is already one download in progress. Please wait until it is finished. + + + + + TextEditor::Internal::Manager + + Registering definitions + + + + Downloading definitions + + + + Error downloading selected definition(s). + + + + Error downloading one or more definitions. + + + + +Please check the directory's access rights. + + + + Download Error + + + + + TextEditor::Internal::OutlineWidgetStack + + No outline available + + + + Synchronize with Editor + Synchronizuj z edytorem + + + Filter tree + Przefiltruj drzewo + + + + TextEditor::Internal::OutlineFactory + + Outline + Kontur + + + + TextEditor::Internal::PlainTextEditorFactory + + A highlight definition was not found for this file. Would you like to try to find one? + + + + Show highlighter options + + + + + QDeclarativeViewer + + &Open... + &Otwórz... + + + 1x + 1x + + + 0.5x + 0.5x + + + 0.25x + 0.25x + + + 0.125x + 0.125x + + + 0.1x + 0.1x + + + Show Warnings + Pokazuj ostrzeżenia + + + Full Screen + Pełny ekran + + + &Quit + Za&kończ + + + &File + &Plik + + + Properties + Właściwości + + + &Help + P&omoc + + + Cancel + Anuluj + + + + ProjectExplorer::BuildableHelperLibrary + + Building helper library '%1' in %2 + + + + + Running %1 %2... + + Uruchamianie %1 %2... + + + + Running %1 ... + + Uruchamianie %1... + + + + %1 not found in PATH + + Nie znaleziono %1 w zmiennej PATH + + + + + QmlJSEditor::Internal::QmlJSOutlineWidget + + Show All Bindings + + + + + ProjectExplorer::QmlDumpTool + + qmldump could not be built in any of the directories: +- %1 + +Reason: %2 + + + + + ProjectExplorer::QmlObserverTool + + The target directory %1 could not be created. + Nie można utworzyć docelowego katalogu %1. + + + QMLObserver could not be built in any of the directories: +- %1 + +Reason: %2 + diff --git a/src/libs/cplusplus/cplusplus-lib.pri b/src/libs/cplusplus/cplusplus-lib.pri index 5d0266c2af2..2a718d5712b 100644 --- a/src/libs/cplusplus/cplusplus-lib.pri +++ b/src/libs/cplusplus/cplusplus-lib.pri @@ -48,8 +48,7 @@ HEADERS += \ $$PWD/pp-cctype.h \ $$PWD/pp-engine.h \ $$PWD/pp-macro-expander.h \ - $$PWD/pp-scanner.h \ - $$PWD/InsertionPointLocator.h + $$PWD/pp-scanner.h SOURCES += \ $$PWD/SimpleLexer.cpp \ @@ -73,7 +72,6 @@ SOURCES += \ $$PWD/Macro.cpp \ $$PWD/pp-engine.cpp \ $$PWD/pp-macro-expander.cpp \ - $$PWD/pp-scanner.cpp \ - $$PWD/InsertionPointLocator.cpp + $$PWD/pp-scanner.cpp RESOURCES += $$PWD/cplusplus.qrc diff --git a/src/libs/qmljs/qmljscodeformatter.cpp b/src/libs/qmljs/qmljscodeformatter.cpp index 3213cf31e2f..7ec947b4525 100644 --- a/src/libs/qmljs/qmljscodeformatter.cpp +++ b/src/libs/qmljs/qmljscodeformatter.cpp @@ -645,6 +645,7 @@ bool CodeFormatter::tryStatement() return true; case Break: case Continue: + enter(breakcontinue_statement); leave(true); return true; case Throw: diff --git a/src/libs/qmljs/qmljscodeformatter.h b/src/libs/qmljs/qmljscodeformatter.h index aad77a5f527..da22601bcfa 100644 --- a/src/libs/qmljs/qmljscodeformatter.h +++ b/src/libs/qmljs/qmljscodeformatter.h @@ -143,7 +143,8 @@ public: // must be public to make Q_GADGET introspection work jsblock_open, - empty_statement, // for a ';', will never linger + empty_statement, // for a ';', will be popped directly + breakcontinue_statement, // for continue/break, will be popped directly if_statement, // After 'if' maybe_else, // after the first substatement in an if diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 302a6df599b..b293127c34e 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -199,13 +199,19 @@ public: }; class FakeMetaObject { - FakeMetaObject(FakeMetaObject&); - FakeMetaObject &operator=(const FakeMetaObject&); + Q_DISABLE_COPY(FakeMetaObject) - QString m_name; - QString m_package; - QString m_packageNameVersion; - ComponentVersion m_version; +public: + class Export { + public: + QString package; + QString type; + QmlJS::ComponentVersion version; + QString packageNameVersion; + }; + +private: + QList m_exports; const FakeMetaObject *m_super; QString m_superName; QList m_enums; @@ -216,14 +222,26 @@ class FakeMetaObject { QString m_defaultPropertyName; public: - FakeMetaObject(const QString &name, const QString &package, ComponentVersion version) - : m_name(name), m_package(package), m_version(version), m_super(0) + FakeMetaObject() + : m_super(0) { - m_packageNameVersion = QString::fromLatin1("%1.%2 %3.%4").arg( - package, name, - QString::number(version.majorVersion()), QString::number(version.minorVersion())); } + void addExport(const QString &name, const QString &package, QmlJS::ComponentVersion version) + { + Export exp; + exp.type = name; + exp.package = package; + exp.version = version; + exp.packageNameVersion = QString::fromLatin1("%1.%2 %3.%4").arg( + package, name, + QString::number(version.majorVersion()), + QString::number(version.minorVersion())); + m_exports.append(exp); + } + QList exports() const + { return m_exports; } + void setSuperclassName(const QString &superclass) { m_superName = superclass; } QString superclassName() const @@ -233,12 +251,6 @@ public: { m_super = superClass; } const FakeMetaObject *superClass() const { return m_super; } - QString className() const - { return m_name; } - QString packageName() const - { return m_package; } - QString packageClassVersionString() const - { return m_packageNameVersion; } void addEnum(const FakeMetaEnum &fakeEnum) { m_enumNameToIndex.insert(fakeEnum.name(), m_enums.size()); m_enums.append(fakeEnum); } @@ -271,9 +283,6 @@ public: FakeMetaMethod method(int index) const { return m_methods.at(index); } - ComponentVersion version() const - { return m_version; } - QString defaultPropertyName() const { return m_defaultPropertyName; } @@ -404,38 +413,14 @@ private: QString name, defaultPropertyName; QmlJS::ComponentVersion version; QString extends; + QString id; foreach (const QXmlStreamAttribute &attr, _xml.attributes()) { if (attr.name() == QLatin1String("name")) { - name = attr.value().toString(); - if (name.isEmpty()) { + id = attr.value().toString(); + if (id.isEmpty()) { invalidAttr(name, QLatin1String("name"), tag); return; } - } else if (attr.name() == QLatin1String("version")) { - QString versionStr = attr.value().toString(); - int dotIdx = versionStr.indexOf('.'); - if (dotIdx == -1) { - bool ok = false; - const int major = versionStr.toInt(&ok); - if (!ok) { - invalidAttr(versionStr, QLatin1String("version"), tag); - return; - } - version = QmlJS::ComponentVersion(major, QmlJS::ComponentVersion::NoVersion); - } else { - bool ok = false; - const int major = versionStr.left(dotIdx).toInt(&ok); - if (!ok) { - invalidAttr(versionStr, QLatin1String("version"), tag); - return; - } - const int minor = versionStr.mid(dotIdx + 1).toInt(&ok); - if (!ok) { - invalidAttr(versionStr, QLatin1String("version"), tag); - return; - } - version = QmlJS::ComponentVersion(major, minor); - } } else if (attr.name() == QLatin1String("defaultProperty")) { defaultPropertyName = attr.value().toString(); } else if (attr.name() == QLatin1String("extends")) { @@ -451,9 +436,7 @@ private: } } - QString className, packageName; - split(name, &packageName, &className); - FakeMetaObject *metaObject = new FakeMetaObject(className, packageName, version); + FakeMetaObject *metaObject = new FakeMetaObject; if (! extends.isEmpty()) metaObject->setSuperclassName(extends); if (! defaultPropertyName.isEmpty()) @@ -468,14 +451,21 @@ private: readSignal(metaObject); else if (_xml.name() == QLatin1String("method")) readMethod(metaObject); + else if (_xml.name() == QLatin1String("exports")) + readExports(metaObject); else unexpectedElement(_xml.name(), tag); } - if (doInsert) - _objects->insert(name, metaObject); - else + if (metaObject->exports().isEmpty()) { + metaObject->addExport(id, QString(), QmlJS::ComponentVersion()); + } + + if (doInsert) { + _objects->insert(id, metaObject); + } else { delete metaObject; + } } bool split(const QString &name, QString *packageName, QString *className) { @@ -706,6 +696,60 @@ private: metaObject->addMethod(method); } + void readExports(FakeMetaObject *metaObject) + { + Q_ASSERT(metaObject); + QLatin1String tag("exports"); + QLatin1String childTag("export"); + Q_ASSERT(_xml.isStartElement() && _xml.name() == tag); + + while (_xml.readNextStartElement()) { + if (_xml.name() == childTag) { + QString type; + QString package; + QmlJS::ComponentVersion version; + foreach (const QXmlStreamAttribute &attr, _xml.attributes()) { + if (attr.name() == QLatin1String("module")) { + package = attr.value().toString(); + } else if (attr.name() == QLatin1String("type")) { + type = attr.value().toString(); + } else if (attr.name() == QLatin1String("version")) { + QString versionStr = attr.value().toString(); + int dotIdx = versionStr.indexOf('.'); + if (dotIdx == -1) { + bool ok = false; + const int major = versionStr.toInt(&ok); + if (!ok) { + invalidAttr(versionStr, QLatin1String("version"), childTag); + continue; + } + version = QmlJS::ComponentVersion(major, QmlJS::ComponentVersion::NoVersion); + } else { + bool ok = false; + const int major = versionStr.left(dotIdx).toInt(&ok); + if (!ok) { + invalidAttr(versionStr, QLatin1String("version"), childTag); + continue; + } + const int minor = versionStr.mid(dotIdx + 1).toInt(&ok); + if (!ok) { + invalidAttr(versionStr, QLatin1String("version"), childTag); + continue; + } + version = QmlJS::ComponentVersion(major, minor); + } + } else { + ignoreAttr(attr); + } + } + metaObject->addExport(type, package, version); + } else { + unexpectedElement(_xml.name(), childTag); + } + _xml.skipCurrentElement(); // the tag should be empty anyhow + } + } + private: QXmlStreamReader _xml; QMap *_objects; @@ -713,11 +757,12 @@ private: } // end of anonymous namespace -QmlObjectValue::QmlObjectValue(const FakeMetaObject *metaObject, Engine *engine) +QmlObjectValue::QmlObjectValue(const FakeMetaObject *metaObject, int exportIndex, Engine *engine) : ObjectValue(engine), - _metaObject(metaObject) + _metaObject(metaObject), + _exportIndex(exportIndex) { - setClassName(metaObject->className()); // ### TODO: we probably need to do more than just this... + setClassName(metaObject->exports().at(exportIndex).type); // ### TODO: we probably need to do more than just this... } QmlObjectValue::~QmlObjectValue() @@ -834,10 +879,10 @@ const Value *QmlObjectValue::propertyValue(const FakeMetaProperty &prop) const } QString QmlObjectValue::packageName() const -{ return _metaObject->packageName(); } +{ return _metaObject->exports().at(_exportIndex).package; } QmlJS::ComponentVersion QmlObjectValue::version() const -{ return _metaObject->version(); } +{ return _metaObject->exports().at(_exportIndex).version; } QString QmlObjectValue::defaultPropertyName() const { return _metaObject->defaultPropertyName(); } @@ -890,7 +935,7 @@ bool QmlObjectValue::hasChildInPackage() const while (it.hasNext()) { it.next(); const FakeMetaObject *other = it.value()->_metaObject; - if (other->packageName().isEmpty()) + if (other->exports().isEmpty()) continue; for (const FakeMetaObject *iter = other; iter; iter = iter->superClass()) { if (iter == _metaObject) // this object is a parent of other @@ -1981,21 +2026,42 @@ void CppQmlTypes::load(Engine *engine, const QList &obje { // load foreach (const FakeMetaObject *metaObject, objects) { - // make sure we're not loading duplicate objects - if (_typesByFullyQualifiedName.contains(metaObject->packageClassVersionString())) - continue; + for (int i = 0; i < metaObject->exports().size(); ++i) { + const FakeMetaObject::Export &exp = metaObject->exports().at(i); + // make sure we're not loading duplicate objects + if (_typesByFullyQualifiedName.contains(exp.packageNameVersion)) + continue; - QmlObjectValue *objectValue = new QmlObjectValue(metaObject, engine); - _typesByPackage[metaObject->packageName()].append(objectValue); - _typesByFullyQualifiedName[metaObject->packageClassVersionString()] = objectValue; + QmlObjectValue *objectValue = new QmlObjectValue(metaObject, i, engine); + _typesByPackage[exp.package].append(objectValue); + _typesByFullyQualifiedName[exp.packageNameVersion] = objectValue; + } } // set prototype correctly foreach (const FakeMetaObject *metaObject, objects) { - QmlObjectValue *objectValue = _typesByFullyQualifiedName.value(metaObject->packageClassVersionString()); - if (!objectValue || !metaObject->superClass()) - continue; - objectValue->setPrototype(_typesByFullyQualifiedName.value(metaObject->superClass()->packageClassVersionString())); + foreach (const FakeMetaObject::Export &exp, metaObject->exports()) { + QmlObjectValue *objectValue = _typesByFullyQualifiedName.value(exp.packageNameVersion); + if (!objectValue || !metaObject->superClass()) + continue; + bool found = false; + // try to get a prototype from the library first + foreach (const FakeMetaObject::Export &superExports, metaObject->superClass()->exports()) { + if (superExports.package == exp.package) { + objectValue->setPrototype(_typesByFullyQualifiedName.value(superExports.packageNameVersion)); + found = true; + break; + } + } + if (found) + continue; + // otherwise, just use the first available + if (!metaObject->superClass()->exports().isEmpty()) { + objectValue->setPrototype(_typesByFullyQualifiedName.value(metaObject->superClass()->exports().first().packageNameVersion)); + continue; + } + //qWarning() << "Could not find super class for " << exp.packageNameVersion; + } } } diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h index 96df1ebbc15..74858486b5d 100644 --- a/src/libs/qmljs/qmljsinterpreter.h +++ b/src/libs/qmljs/qmljsinterpreter.h @@ -383,7 +383,7 @@ private: class QMLJS_EXPORT QmlObjectValue: public ObjectValue { public: - QmlObjectValue(const FakeMetaObject *metaObject, Engine *engine); + QmlObjectValue(const FakeMetaObject *metaObject, int exportIndex, Engine *engine); virtual ~QmlObjectValue(); virtual void processMembers(MemberProcessor *processor) const; @@ -404,6 +404,7 @@ protected: private: const FakeMetaObject *_metaObject; + const int _exportIndex; mutable QHash _metaSignature; }; diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp index d1c9374b1d3..2fbdc0403c6 100644 --- a/src/libs/qmljs/qmljsscopebuilder.cpp +++ b/src/libs/qmljs/qmljsscopebuilder.cpp @@ -282,7 +282,8 @@ const ObjectValue *ScopeBuilder::isPropertyChangesObject(const Context *context, while (prototype) { if (const QmlObjectValue *qmlMetaObject = dynamic_cast(prototype)) { if (qmlMetaObject->className() == QLatin1String("PropertyChanges") - && qmlMetaObject->packageName() == QLatin1String("Qt")) + && (qmlMetaObject->packageName() == QLatin1String("Qt") + || qmlMetaObject->packageName() == QLatin1String("QtQuick"))) return prototype; } prototype = prototype->prototype(context); diff --git a/src/libs/qmljsdebugclient/qdeclarativedebug.cpp b/src/libs/qmljsdebugclient/qdeclarativedebug.cpp index 1c78a7c91cf..e3b653008ec 100644 --- a/src/libs/qmljsdebugclient/qdeclarativedebug.cpp +++ b/src/libs/qmljsdebugclient/qdeclarativedebug.cpp @@ -51,18 +51,22 @@ public: QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p); protected: + virtual void statusChanged(Status status); virtual void messageReceived(const QByteArray &); private: QDeclarativeEngineDebugPrivate *priv; + friend class QDeclarativeEngineDebugPrivate; }; class QDeclarativeEngineDebugPrivate { // Q_DECLARE_PUBLIC(QDeclarativeEngineDebug) public: - QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *); + QDeclarativeEngineDebugPrivate(QDeclarativeEngineDebug *, QDeclarativeDebugConnection *); + ~QDeclarativeEngineDebugPrivate(); + void statusChanged(QDeclarativeEngineDebug::Status status); void message(const QByteArray &); QDeclarativeEngineDebugClient *client; @@ -90,19 +94,31 @@ QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugCo QDeclarativeEngineDebugPrivate *p) : QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p) { - setEnabled(true); +} + +void QDeclarativeEngineDebugClient::statusChanged(Status status) +{ + if (priv) + priv->statusChanged(static_cast(status)); } void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data) { - priv->message(data); + if (priv) + priv->message(data); } -QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *c) -: client(new QDeclarativeEngineDebugClient(c, this)), nextId(0) +QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeEngineDebug *q, QDeclarativeDebugConnection *c) +: client(new QDeclarativeEngineDebugClient(c, this)), q_ptr(q), nextId(0) { } +QDeclarativeEngineDebugPrivate::~QDeclarativeEngineDebugPrivate() +{ + if (client) + client->priv = 0; +} + int QDeclarativeEngineDebugPrivate::getId() { return nextId++; @@ -116,7 +132,7 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclara } } -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, +void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugRootContextQuery *q) { if (c && q) { @@ -125,6 +141,44 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, } } +// from qdeclarativeenginedebug_p.h +struct QDeclarativeObjectData { + QUrl url; + int lineNumber; + int columnNumber; + QString idString; + QString objectName; + QString objectType; + int objectId; + int contextId; +}; + +QDataStream &operator>>(QDataStream &ds, QDeclarativeObjectData &data) +{ + ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString + >> data.objectName >> data.objectType >> data.objectId >> data.contextId; + return ds; +} + +struct QDeclarativeObjectProperty { + enum Type { Unknown, Basic, Object, List, SignalProperty }; + Type type; + QString name; + QVariant value; + QString valueTypeName; + QString binding; + bool hasNotifySignal; +}; + +QDataStream &operator>>(QDataStream &ds, QDeclarativeObjectProperty &data) +{ + int type; + ds >> type >> data.name >> data.value >> data.valueTypeName + >> data.binding >> data.hasNotifySignal; + data.type = (QDeclarativeObjectProperty::Type)type; + return ds; +} + void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugObjectQuery *q) { if (c && q) { @@ -141,41 +195,6 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclara } } -//from qdeclarativeenginedebug.cpp -struct QDeclarativeObjectData { - QUrl url; - int lineNumber; - int columnNumber; - QString idString; - QString objectName; - QString objectType; - int objectId; - int contextId; -}; -QDataStream &operator>>(QDataStream &ds, QDeclarativeObjectData &data) -{ - ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString - >> data.objectName >> data.objectType >> data.objectId >> data.contextId; - return ds; -} -struct QDeclarativeObjectProperty { - enum Type { Unknown, Basic, Object, List, SignalProperty }; - Type type; - QString name; - QVariant value; - QString valueTypeName; - QString binding; - bool hasNotifySignal; -}; -QDataStream &operator>>(QDataStream &ds, QDeclarativeObjectProperty &data) -{ - int type; - ds >> type >> data.name >> data.value >> data.valueTypeName - >> data.binding >> data.hasNotifySignal; - data.type = (QDeclarativeObjectProperty::Type)type; - return ds; -} - void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o, bool simple) { @@ -260,6 +279,11 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugCo } } +void QDeclarativeEngineDebugPrivate::statusChanged(QDeclarativeEngineDebug::Status status) +{ + emit q_ptr->statusChanged(status); +} + void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) { QDataStream ds(data); @@ -378,18 +402,25 @@ void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) } QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent) -: QObject(parent), d_ptr(new QDeclarativeEngineDebugPrivate(client)) +: QObject(parent), d_ptr(new QDeclarativeEngineDebugPrivate(this, client)) { - d_ptr->q_ptr = this; } -QDeclarativeEngineDebug::~QDeclarativeEngineDebug() {} + +QDeclarativeEngineDebug::~QDeclarativeEngineDebug() { } + +QDeclarativeEngineDebug::Status QDeclarativeEngineDebug::status() const +{ + Q_D(const QDeclarativeEngineDebug); + + return static_cast(d->client->status()); +} QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent) { Q_D(QDeclarativeEngineDebug); QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { int queryId = d->getId(); watch->m_queryId = queryId; watch->m_client = this; @@ -418,7 +449,7 @@ QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const { Q_D(QDeclarativeEngineDebug); QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { int queryId = d->getId(); watch->m_queryId = queryId; watch->m_client = this; @@ -441,7 +472,7 @@ QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebu Q_D(QDeclarativeEngineDebug); QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { int queryId = d->getId(); watch->m_queryId = queryId; watch->m_client = this; @@ -477,7 +508,7 @@ void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch) d->watched.remove(watch->queryId()); - if (d->client && d->client->isConnected()) { + if (d->client && d->client->status() == QDeclarativeDebugClient::Enabled) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("NO_WATCH") << watch->queryId(); @@ -490,7 +521,7 @@ QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QO Q_D(QDeclarativeEngineDebug); QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -512,7 +543,7 @@ QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(co Q_D(QDeclarativeEngineDebug); QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent); - if (d->client->isConnected() && engine.debugId() != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -534,7 +565,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclar Q_D(QDeclarativeEngineDebug); QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->isConnected() && object.debugId() != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -557,7 +588,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons Q_D(QDeclarativeEngineDebug); QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->isConnected() && object.debugId() != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -566,9 +597,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() - << true << true; // Note: dumping all the properties is slow, and make noticable lags. - // TODO: Find an alternative to this when they are needed by the live preview - + << true << true; d->client->sendMessage(message); } else { query->m_state = QDeclarativeDebugQuery::Error; @@ -582,7 +611,7 @@ QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult Q_D(QDeclarativeEngineDebug); QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { query->m_client = this; query->m_expr = expr; int queryId = d->getId(); @@ -606,7 +635,7 @@ bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QStri { Q_D(QDeclarativeEngineDebug); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue; @@ -621,7 +650,7 @@ bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QSt { Q_D(QDeclarativeEngineDebug); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName; @@ -637,7 +666,7 @@ bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &me { Q_D(QDeclarativeEngineDebug); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody; @@ -701,6 +730,7 @@ QString QDeclarativeDebugObjectExpressionWatch::expression() const return m_expr; } + QDeclarativeDebugQuery::QDeclarativeDebugQuery(QObject *parent) : QObject(parent), m_state(Waiting) { @@ -1025,4 +1055,3 @@ bool QDeclarativeDebugPropertyReference::hasNotifySignal() const } } - diff --git a/src/libs/qmljsdebugclient/qdeclarativedebug_p.h b/src/libs/qmljsdebugclient/qdeclarativedebug_p.h index 982e581f690..dfb880250ee 100644 --- a/src/libs/qmljsdebugclient/qdeclarativedebug_p.h +++ b/src/libs/qmljsdebugclient/qdeclarativedebug_p.h @@ -63,15 +63,18 @@ class QDeclarativeDebugObjectReference; class QDeclarativeDebugFileReference; class QDeclarativeDebugEngineReference; class QDeclarativeEngineDebugPrivate; -class QDeclarativeEngineDebug; class QDeclarativeEngineDebug : public QObject { Q_OBJECT public: + enum Status { NotConnected, Unavailable, Enabled }; + explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0); ~QDeclarativeEngineDebug(); + Status status() const; + QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &, QObject *parent = 0); QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugContextReference &, const QString &, @@ -100,16 +103,15 @@ public: bool resetBindingForObject(int objectDebugId, const QString &propertyName); bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody); -signals: +Q_SIGNALS: void newObjects(); + void statusChanged(Status status); private: Q_DECLARE_PRIVATE(QDeclarativeEngineDebug) - Q_DISABLE_COPY(QDeclarativeEngineDebug) QScopedPointer d_ptr; }; - class QDeclarativeDebugWatch : public QObject { Q_OBJECT @@ -368,7 +370,6 @@ private: int m_queryId; QVariant m_expr; QVariant m_result; - }; } @@ -378,6 +379,5 @@ Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugObjectReference) Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugContextReference) Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugPropertyReference) -QT_END_HEADER #endif // QDECLARATIVEDEBUG_H diff --git a/src/libs/qmljsdebugclient/qdeclarativedebugclient.cpp b/src/libs/qmljsdebugclient/qdeclarativedebugclient.cpp index 7fa4ef3004a..a78575a54ca 100644 --- a/src/libs/qmljsdebugclient/qdeclarativedebugclient.cpp +++ b/src/libs/qmljsdebugclient/qdeclarativedebugclient.cpp @@ -48,6 +48,20 @@ namespace QmlJsDebugClient { +const int protocolVersion = 1; +const QString serverId = QLatin1String("QDeclarativeDebugServer"); +const QString clientId = QLatin1String("QDeclarativeDebugClient"); + +class QDeclarativeDebugClientPrivate +{ +// Q_DECLARE_PUBLIC(QDeclarativeDebugClient) +public: + QDeclarativeDebugClientPrivate(); + + QString name; + QDeclarativeDebugConnection *client; +}; + class QDeclarativeDebugConnectionPrivate : public QObject { Q_OBJECT @@ -56,40 +70,123 @@ public: QDeclarativeDebugConnection *q; QPacketProtocol *protocol; - QStringList enabled; + bool gotHello; + QStringList serverPlugins; QHash plugins; + + void advertisePlugins(); + public Q_SLOTS: void connected(); void readyRead(); }; QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarativeDebugConnection *c) -: QObject(c), q(c), protocol(0) +: QObject(c), q(c), protocol(0), gotHello(false) { protocol = new QPacketProtocol(q, this); QObject::connect(c, SIGNAL(connected()), this, SLOT(connected())); QObject::connect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); } +void QDeclarativeDebugConnectionPrivate::advertisePlugins() +{ + if (!q->isConnected() || !gotHello) + return; + + QPacket pack; + pack << serverId << 1 << plugins.keys(); + protocol->send(pack); + q->flush(); +} + void QDeclarativeDebugConnectionPrivate::connected() { QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugServer")) << enabled; + pack << serverId << 0 << protocolVersion << plugins.keys(); protocol->send(pack); + q->flush(); } void QDeclarativeDebugConnectionPrivate::readyRead() { - QPacket pack = protocol->read(); - QString name; QByteArray message; - pack >> name >> message; + if (!gotHello) { + QPacket pack = protocol->read(); + QString name; - QHash::Iterator iter = - plugins.find(name); - if (iter == plugins.end()) { - qWarning() << "QDeclarativeDebugConnection: Message received for missing plugin" << name; - } else { - (*iter)->messageReceived(message); + pack >> name; + + bool validHello = false; + if (name == clientId) { + int op = -1; + pack >> op; + if (op == 0) { + int version = -1; + pack >> version; + if (version == protocolVersion) { + pack >> serverPlugins; + validHello = true; + } + } + } + + if (!validHello) { + qWarning("QDeclarativeDebugConnection: Invalid hello message"); + QObject::disconnect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); + return; + } + gotHello = true; + + QHash::Iterator iter = plugins.begin(); + for (; iter != plugins.end(); ++iter) { + QDeclarativeDebugClient::Status newStatus = QDeclarativeDebugClient::Unavailable; + if (serverPlugins.contains(iter.key())) + newStatus = QDeclarativeDebugClient::Enabled; + iter.value()->statusChanged(newStatus); + } + } + + while (protocol->packetsAvailable()) { + QPacket pack = protocol->read(); + QString name; + pack >> name; + + if (name == clientId) { + int op = -1; + pack >> op; + + if (op == 1) { + // Service Discovery + QStringList oldServerPlugins = serverPlugins; + pack >> serverPlugins; + + QHash::Iterator iter = plugins.begin(); + for (; iter != plugins.end(); ++iter) { + const QString pluginName = iter.key(); + QDeclarativeDebugClient::Status newStatus = QDeclarativeDebugClient::Unavailable; + if (serverPlugins.contains(pluginName)) + newStatus = QDeclarativeDebugClient::Enabled; + + if (oldServerPlugins.contains(pluginName) + != serverPlugins.contains(pluginName)) { + iter.value()->statusChanged(newStatus); + } + } + } else { + qWarning() << "QDeclarativeDebugConnection: Unknown control message id" << op; + } + } else { + QByteArray message; + pack >> message; + + QHash::Iterator iter = + plugins.find(name); + if (iter == plugins.end()) { + qWarning() << "QDeclarativeDebugConnection: Message received for missing plugin" << name; + } else { + (*iter)->messageReceived(message); + } + } } } @@ -98,29 +195,28 @@ QDeclarativeDebugConnection::QDeclarativeDebugConnection(QObject *parent) { } +QDeclarativeDebugConnection::~QDeclarativeDebugConnection() +{ + QHash::iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + iter.value()->d_func()->client = 0; + iter.value()->statusChanged(QDeclarativeDebugClient::NotConnected); + } +} + bool QDeclarativeDebugConnection::isConnected() const { return state() == ConnectedState; } -class QDeclarativeDebugClientPrivate -{ -public: - QDeclarativeDebugClientPrivate(); - - QString name; - QDeclarativeDebugConnection *client; - bool enabled; -}; - QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate() -: client(0), enabled(false) +: client(0) { } QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, QDeclarativeDebugConnection *parent) - : QObject(parent), d(new QDeclarativeDebugClientPrivate) +: QObject(parent), d(new QDeclarativeDebugClientPrivate()) { d->name = name; d->client = parent; @@ -133,60 +229,49 @@ QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, d->client = 0; } else { d->client->d->plugins.insert(name, this); + d->client->d->advertisePlugins(); } } -QDeclarativeDebugClient::~QDeclarativeDebugClient() {} +QDeclarativeDebugClient::~QDeclarativeDebugClient() +{ + if (d->client && d->client->d) { + d->client->d->plugins.remove(d->name); + d->client->d->advertisePlugins(); + } +} QString QDeclarativeDebugClient::name() const { return d->name; } -bool QDeclarativeDebugClient::isEnabled() const +QDeclarativeDebugClient::Status QDeclarativeDebugClient::status() const { - return d->enabled; -} + if (!d->client + || !d->client->isConnected() + || !d->client->d->gotHello) + return NotConnected; -void QDeclarativeDebugClient::setEnabled(bool e) -{ - if (e == d->enabled) - return; + if (d->client->d->serverPlugins.contains(d->name)) + return Enabled; - d->enabled = e; - - if (d->client) { - if (e) - d->client->d->enabled.append(d->name); - else - d->client->d->enabled.removeAll(d->name); - - if (d->client->state() == QTcpSocket::ConnectedState) { - QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugServer")); - if (e) pack << (int)1; - else pack << (int)2; - pack << d->name; - d->client->d->protocol->send(pack); - } - } -} - -bool QDeclarativeDebugClient::isConnected() const -{ - if (!d->client) - return false; - return d->client->isConnected(); + return Unavailable; } void QDeclarativeDebugClient::sendMessage(const QByteArray &message) { - if (!d->client || !d->client->isConnected()) + if (status() != Enabled) return; QPacket pack; pack << d->name << message; d->client->d->protocol->send(pack); + d->client->flush(); +} + +void QDeclarativeDebugClient::statusChanged(Status) +{ } void QDeclarativeDebugClient::messageReceived(const QByteArray &) diff --git a/src/libs/qmljsdebugclient/qdeclarativedebugclient_p.h b/src/libs/qmljsdebugclient/qdeclarativedebugclient_p.h index ffc3b0d8449..f29e58a1b25 100644 --- a/src/libs/qmljsdebugclient/qdeclarativedebugclient_p.h +++ b/src/libs/qmljsdebugclient/qdeclarativedebugclient_p.h @@ -55,6 +55,7 @@ class QDeclarativeDebugConnection : public QTcpSocket Q_DISABLE_COPY(QDeclarativeDebugConnection) public: QDeclarativeDebugConnection(QObject * = 0); + ~QDeclarativeDebugConnection(); bool isConnected() const; private: @@ -71,19 +72,19 @@ class QDeclarativeDebugClient : public QObject Q_DISABLE_COPY(QDeclarativeDebugClient) public: + enum Status { NotConnected, Unavailable, Enabled }; + QDeclarativeDebugClient(const QString &, QDeclarativeDebugConnection *parent); ~QDeclarativeDebugClient(); QString name() const; - bool isEnabled() const; - void setEnabled(bool); - - bool isConnected() const; + Status status() const; void sendMessage(const QByteArray &); protected: + virtual void statusChanged(Status); virtual void messageReceived(const QByteArray &); private: diff --git a/src/libs/utils/buildablehelperlibrary.cpp b/src/libs/utils/buildablehelperlibrary.cpp index c23853d2272..e9fcdbce71d 100644 --- a/src/libs/utils/buildablehelperlibrary.cpp +++ b/src/libs/utils/buildablehelperlibrary.cpp @@ -101,6 +101,33 @@ QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath) return QString(); } +bool BuildableHelperLibrary::checkMinimumQtVersion(const QString &qtVersionString, int majorVersion, int minorVersion, int patchVersion) +{ + int major = -1; + int minor = -1; + int patch = -1; + + // check format + QRegExp qtVersionRegex(QLatin1String("^\\d+\\.\\d+\\.\\d+$")); + if (!qtVersionRegex.exactMatch(qtVersionString)) + return false; + + QStringList parts = qtVersionString.split(QLatin1Char('.')); + major = parts.at(0).toInt(); + minor = parts.at(1).toInt(); + patch = parts.at(2).toInt(); + + if (major == majorVersion) { + if (minor == minorVersion) { + if (patch >= patchVersion) + return true; + } else if (minor > minorVersion) + return true; + } + + return false; +} + QStringList BuildableHelperLibrary::possibleQMakeCommands() { // On windows no one has renamed qmake, right? diff --git a/src/libs/utils/buildablehelperlibrary.h b/src/libs/utils/buildablehelperlibrary.h index e4d9eadbc68..fa8a85648c6 100644 --- a/src/libs/utils/buildablehelperlibrary.h +++ b/src/libs/utils/buildablehelperlibrary.h @@ -19,6 +19,7 @@ public: static QString findSystemQt(const Utils::Environment &env); // return true if the qmake at qmakePath is qt4 (used by QtVersion) static QString qtVersionForQMake(const QString &qmakePath); + static bool checkMinimumQtVersion(const QString &qtversionString, int majorVersion, int minorVersion, int patchVersion); // returns something like qmake4, qmake, qmake-qt4 or whatever distributions have chosen (used by QtVersion) static QStringList possibleQMakeCommands(); diff --git a/src/libs/utils/htmldocextractor.cpp b/src/libs/utils/htmldocextractor.cpp index 0877be15474..41fd38c1ee8 100644 --- a/src/libs/utils/htmldocextractor.cpp +++ b/src/libs/utils/htmldocextractor.cpp @@ -180,28 +180,32 @@ void HtmlDocExtractor::processOutput(QString *html) const return; if (m_mode == FirstParagraph) { - int index = html->indexOf(QLatin1String("

")); - if (index > 0) { - if (html->at(index - 1) == QLatin1Char('.')) { - index += 4; - html->truncate(index); - } else { - //

Paragraphs similar to this. Example:

- index = html->lastIndexOf(QLatin1Char('.'), index); - if (index > 0) { - html->truncate(index); - html->append(QLatin1String(".

")); + // Try to get the entire first paragraph, but if one is not found or if its opening + // tag is not in the very beginning (using an empirical value as the limit) the html + // is cleared to avoid too much content. + int index = html->indexOf(QLatin1String("

")); + if (index != -1 && index < 400) { + index = html->indexOf(QLatin1String("

"), index + 2); + if (index != -1) { + if (html->at(index - 1) == QLatin1Char('.')) { + html->truncate(index + 4); + } else { + //

Paragraphs similar to this. Example:

+ index = html->lastIndexOf(QLatin1Char('.'), index); + if (index != -1) { + html->truncate(index); + html->append(QLatin1String(".

")); + } } + } else { + html->clear(); } } else { - // Some enumerations don't have paragraphs and just a table with the items. In such - // cases the the html is cleared to avoid showing more that desired. html->clear(); - return; } } - if (m_formatContents) { + if (!html->isEmpty() && m_formatContents) { stripBold(html); replaceNonStyledHeadingsForBold(html); replaceTablesForSimpleLines(html); diff --git a/src/libs/utils/submiteditorwidget.cpp b/src/libs/utils/submiteditorwidget.cpp index 0c8aa30a1c4..10cade5c2e1 100644 --- a/src/libs/utils/submiteditorwidget.cpp +++ b/src/libs/utils/submiteditorwidget.cpp @@ -139,7 +139,6 @@ struct SubmitEditorWidgetPrivate Ui::SubmitEditorWidget m_ui; bool m_filesSelected; - bool m_filesChecked; int m_fileNameColumn; int m_activatedRow; bool m_emptyFileListEnabled; @@ -148,16 +147,18 @@ struct SubmitEditorWidgetPrivate QVBoxLayout *m_fieldLayout; QList m_fieldWidgets; int m_lineWidth; + + bool m_commitEnabled; }; SubmitEditorWidgetPrivate::SubmitEditorWidgetPrivate() : m_filesSelected(false), - m_filesChecked(false), m_fileNameColumn(1), m_activatedRow(-1), m_emptyFileListEnabled(false), m_fieldLayout(0), - m_lineWidth(defaultLineWidth) + m_lineWidth(defaultLineWidth), + m_commitEnabled(false) { } @@ -209,10 +210,10 @@ void SubmitEditorWidget::registerActions(QAction *editorUndoAction, QAction *edi int count = 0; if (const QAbstractItemModel *model = m_d->m_ui.fileView->model()) count = model->rowCount(); - qDebug() << Q_FUNC_INFO << submitAction << count << "items" << m_d->m_filesChecked; + qDebug() << Q_FUNC_INFO << submitAction << count << "items"; } - submitAction->setEnabled(m_d->m_filesChecked); - connect(this, SIGNAL(fileCheckStateChanged(bool)), submitAction, SLOT(setEnabled(bool))); + m_d->m_commitEnabled = !canSubmit(); + connect(this, SIGNAL(submitActionEnabledChanged(bool)), submitAction, SLOT(setEnabled(bool))); // Wire setText via QActionSetTextSlotHelper. QActionSetTextSlotHelper *actionSlotHelper = submitAction->findChild(); if (!actionSlotHelper) @@ -243,7 +244,7 @@ void SubmitEditorWidget::unregisterActions(QAction *editorUndoAction, QAction * } if (submitAction) { - disconnect(this, SIGNAL(fileCheckStateChanged(bool)), submitAction, SLOT(setEnabled(bool))); + disconnect(this, SIGNAL(submitActionEnabledChanged(bool)), submitAction, SLOT(setEnabled(bool))); // Just deactivate the QActionSetTextSlotHelper on the action disconnect(this, SIGNAL(submitActionTextChanged(QString)), 0, 0); } @@ -448,18 +449,20 @@ void SubmitEditorWidget::updateActions() void SubmitEditorWidget::updateSubmitAction() { const unsigned checkedCount = checkedFilesCount(); - const bool newFilesCheckedState = m_d->m_emptyFileListEnabled || checkedCount > 0; + const bool newCommitState = canSubmit(); // Emit signal to update action - if (m_d->m_filesChecked != newFilesCheckedState) { - m_d->m_filesChecked = newFilesCheckedState; - emit fileCheckStateChanged(m_d->m_filesChecked); + if (m_d->m_commitEnabled != newCommitState) { + m_d->m_commitEnabled = newCommitState; + emit submitActionEnabledChanged(m_d->m_commitEnabled); + } + if (m_d->m_ui.fileView && m_d->m_ui.fileView->model()) { + // Update button text. + const int fileCount = m_d->m_ui.fileView->model()->rowCount(); + const QString msg = checkedCount ? + tr("Commit %1/%n Files", 0, fileCount).arg(checkedCount) : + tr("Commit"); + emit submitActionTextChanged(msg); } - // Update button text. - const int fileCount = m_d->m_ui.fileView->model()->rowCount(); - const QString msg = checkedCount ? - tr("Commit %1/%n Files", 0, fileCount).arg(checkedCount) : - tr("Commit"); - emit submitActionTextChanged(msg); } // Enable diff depending on selected files @@ -509,6 +512,12 @@ void SubmitEditorWidget::insertTopWidget(QWidget *w) m_d->m_ui.vboxLayout->insertWidget(0, w); } +bool SubmitEditorWidget::canSubmit() const +{ + const unsigned checkedCount = checkedFilesCount(); + return m_d->m_emptyFileListEnabled || checkedCount > 0; +} + void SubmitEditorWidget::addSubmitFieldWidget(SubmitFieldWidget *f) { if (!m_d->m_fieldLayout) { diff --git a/src/libs/utils/submiteditorwidget.h b/src/libs/utils/submiteditorwidget.h index 457783a9d7f..37d1c8b0bd9 100644 --- a/src/libs/utils/submiteditorwidget.h +++ b/src/libs/utils/submiteditorwidget.h @@ -129,8 +129,8 @@ public: signals: void diffSelected(const QStringList &); void fileSelectionChanged(bool someFileSelected); - void fileCheckStateChanged(bool someFileChecked); void submitActionTextChanged(const QString &); + void submitActionEnabledChanged(const bool); public slots: void checkAll(); @@ -139,13 +139,16 @@ public slots: protected: virtual void changeEvent(QEvent *e); void insertTopWidget(QWidget *w); + virtual bool canSubmit() const; + +protected slots: + void updateSubmitAction(); private slots: void triggerDiffSelected(); void diffActivated(const QModelIndex &index); void diffActivatedDelayed(); void updateActions(); - void updateSubmitAction(); void updateDiffAction(); void editorCustomContextMenuRequested(const QPoint &); void fileListCustomContextMenuRequested(const QPoint & pos); diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp index 7a8d5a007eb..c35b148d1bd 100644 --- a/src/libs/utils/synchronousprocess.cpp +++ b/src/libs/utils/synchronousprocess.cpp @@ -365,7 +365,7 @@ static inline bool askToKill(const QString &binary = QString()) SynchronousProcess::tr("The process is not responding.") : SynchronousProcess::tr("The process '%1' is not responding.").arg(binary); msg += QLatin1Char(' '); - msg += SynchronousProcess::tr(" Would you like to terminate it?"); + msg += SynchronousProcess::tr("Would you like to terminate it?"); // Restore the cursor that is set to wait while running. const bool hasOverrideCursor = QApplication::overrideCursor() != 0; if (hasOverrideCursor) diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp index 054e560bd8a..96dfcba38a0 100644 --- a/src/plugins/coreplugin/basefilewizard.cpp +++ b/src/plugins/coreplugin/basefilewizard.cpp @@ -72,7 +72,7 @@ public: }; GeneratedFilePrivate::GeneratedFilePrivate(const QString &p) : - path(p), + path(QDir::cleanPath(p)), binary(false), attributes(0) { @@ -111,7 +111,7 @@ QString GeneratedFile::path() const void GeneratedFile::setPath(const QString &p) { - m_d->path = p; + m_d->path = QDir::cleanPath(p); } QString GeneratedFile::contents() const @@ -628,7 +628,7 @@ bool BaseFileWizard::postGenerateOpenEditors(const GeneratedFiles &l, QString *e if (file.attributes() & Core::GeneratedFile::OpenEditorAttribute) { if (!em->openEditor(file.path(), file.editorId(), Core::EditorManager::ModeSwitch )) { if (errorMessage) - *errorMessage = tr("Failed to open an editor for '%1'.").arg(file.path()); + *errorMessage = tr("Failed to open an editor for '%1'.").arg(QDir::toNativeSeparators(file.path())); return false; } } @@ -663,7 +663,7 @@ BaseFileWizard::OverwriteResult BaseFileWizard::promptOverwrite(const QStringLis if (fi.exists()) { if (!fileNamesMsgPart.isEmpty()) fileNamesMsgPart += QLatin1String(", "); - fileNamesMsgPart += fileName.mid(commonExistingPath.size() + 1); + fileNamesMsgPart += QDir::toNativeSeparators(fileName.mid(commonExistingPath.size() + 1)); do { if (fi.isDir()) { oddStuffFound = true; @@ -687,13 +687,14 @@ BaseFileWizard::OverwriteResult BaseFileWizard::promptOverwrite(const QStringLis return OverwriteOk; if (oddStuffFound) { - *errorMessage = tr("The project directory %1 contains files which cannot be overwritten:\n%2.").arg(commonExistingPath).arg(fileNamesMsgPart); + *errorMessage = tr("The project directory %1 contains files which cannot be overwritten:\n%2.") + .arg(QDir::toNativeSeparators(commonExistingPath)).arg(fileNamesMsgPart); return OverwriteError; } const QString messageFormat = tr("The following files already exist in the directory %1:\n" "%2.\nWould you like to overwrite them?"); - const QString message = messageFormat.arg(commonExistingPath).arg(fileNamesMsgPart); + const QString message = messageFormat.arg(QDir::toNativeSeparators(commonExistingPath)).arg(fileNamesMsgPart); const bool yes = (QMessageBox::question(Core::ICore::instance()->mainWindow(), tr("Existing files"), message, QMessageBox::Yes | QMessageBox::No, diff --git a/src/plugins/coreplugin/iversioncontrol.h b/src/plugins/coreplugin/iversioncontrol.h index c402c1fb77c..d0dd868b1a2 100644 --- a/src/plugins/coreplugin/iversioncontrol.h +++ b/src/plugins/coreplugin/iversioncontrol.h @@ -52,7 +52,9 @@ public: AddOperation, DeleteOperation, OpenOperation, MoveOperation, CreateRepositoryOperation, SnapshotOperations, - AnnotateOperation + AnnotateOperation, + CheckoutOperation, + GetRepositoryRootOperation }; explicit IVersionControl(QObject *parent = 0) : QObject(parent) {} @@ -116,6 +118,16 @@ public: */ virtual bool vcsCreateRepository(const QString &directory) = 0; + /*! + * Called to clone/checkout the version control system in a directory. + */ + virtual bool vcsCheckout(const QString &directory, const QByteArray &url) = 0; + + /*! + * Called to get the version control repository root. + */ + virtual QString vcsGetRepositoryURL(const QString &director) = 0; + /*! * Create a snapshot of the current state and return an identifier or * an empty string in case of failure. diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index 0221e29c9fa..da42a17bad4 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -167,6 +167,41 @@ bool VCSManager::promptToDelete(const QString &fileName) return true; } +IVersionControl *VCSManager::checkout(const QString &versionControlType, + const QString &directory, + const QByteArray &url) +{ + foreach (IVersionControl *versionControl, allVersionControls()) { + if (versionControl->displayName() == versionControlType + && versionControl->supportsOperation(Core::IVersionControl::CheckoutOperation)) { + if (versionControl->vcsCheckout(directory, url)) { + m_d->m_cachedMatches.insert(directory, versionControl); + return versionControl; + } + return 0; + } + } + return 0; +} + +bool VCSManager::findVersionControl(const QString &versionControlType) +{ + foreach (IVersionControl * versionControl, allVersionControls()) { + if (versionControl->displayName() == versionControlType) + return true; + } + return false; +} + +QString VCSManager::getRepositoryURL(const QString &directory) +{ + IVersionControl *vc = findVersionControlForDirectory(directory); + + if (vc && vc->supportsOperation(Core::IVersionControl::GetRepositoryRootOperation)) + return vc->vcsGetRepositoryURL(directory); + return QString(); +} + bool VCSManager::promptToDelete(IVersionControl *vc, const QString &fileName) { QTC_ASSERT(vc, return true) diff --git a/src/plugins/coreplugin/vcsmanager.h b/src/plugins/coreplugin/vcsmanager.h index 71e9b3e9c34..6b2e374a883 100644 --- a/src/plugins/coreplugin/vcsmanager.h +++ b/src/plugins/coreplugin/vcsmanager.h @@ -68,6 +68,11 @@ public: IVersionControl *findVersionControlForDirectory(const QString &directory, QString *topLevelDirectory = 0); + IVersionControl *checkout(const QString &versionControlType, + const QString &directory, + const QByteArray &url); + bool findVersionControl(const QString &versionControl); + QString getRepositoryURL(const QString &directory); // Shows a confirmation dialog, whether the file should also be deleted // from revision control Calls sccDelete on the file. Returns false diff --git a/src/plugins/cpaster/codepasterprotocol.cpp b/src/plugins/cpaster/codepasterprotocol.cpp index bc8137abfd8..bd7657656c8 100644 --- a/src/plugins/cpaster/codepasterprotocol.cpp +++ b/src/plugins/cpaster/codepasterprotocol.cpp @@ -99,13 +99,24 @@ void CodePasterProtocol::fetch(const QString &id) QTC_ASSERT(!m_fetchReply, return; ) QString hostName = m_page->hostName(); - QString link = "http://"; - link.append(hostName); - link.append("/?format=raw&id="); - link.append(id); + const QString httpPrefix = "http://"; + QString link; + // Did the user enter a complete URL instead of an id? + if (id.startsWith(httpPrefix)) { + // Append 'raw' format option + link = id; + link += QLatin1String("&format=raw"); + const int idPos = id.lastIndexOf(QLatin1Char('=')); + m_fetchId = idPos != -1 ? id.mid(idPos + 1) : id; + } else { + link = httpPrefix; + link.append(hostName); + link.append("/?format=raw&id="); + link.append(id); + m_fetchId = id; + } m_fetchReply = httpGet(link); connect(m_fetchReply, SIGNAL(finished()), this, SLOT(fetchFinished())); - m_fetchId = id; } void CodePasterProtocol::list() diff --git a/src/plugins/cppeditor/CppEditor.mimetypes.xml b/src/plugins/cppeditor/CppEditor.mimetypes.xml index 5dd9f0610ab..6305531764a 100644 --- a/src/plugins/cppeditor/CppEditor.mimetypes.xml +++ b/src/plugins/cppeditor/CppEditor.mimetypes.xml @@ -29,9 +29,12 @@ + example, STL ones like . Those can have a big initial + comment exceeding 1000 chars, though. --> - + + + diff --git a/src/plugins/cppeditor/cppeditor.pro b/src/plugins/cppeditor/cppeditor.pro index 0e86ffeb8e8..57767721ec4 100644 --- a/src/plugins/cppeditor/cppeditor.pro +++ b/src/plugins/cppeditor/cppeditor.pro @@ -15,7 +15,6 @@ HEADERS += cppplugin.h \ cppeditor_global.h \ cppclasswizard.h \ cppquickfix.h \ - cpprefactoringchanges.h \ cppchecksymbols.h \ cppsemanticinfo.h \ cppoutline.h \ @@ -31,7 +30,6 @@ SOURCES += cppplugin.cpp \ cppclasswizard.cpp \ cppquickfix.cpp \ cppquickfixes.cpp \ - cpprefactoringchanges.cpp \ cppchecksymbols.cpp \ cppsemanticinfo.cpp \ cppoutline.cpp \ diff --git a/src/plugins/cppeditor/cppelementevaluator.cpp b/src/plugins/cppeditor/cppelementevaluator.cpp index 4ed8a0b207a..cfb1fd77f50 100644 --- a/src/plugins/cppeditor/cppelementevaluator.cpp +++ b/src/plugins/cppeditor/cppelementevaluator.cpp @@ -66,6 +66,18 @@ namespace { ch = doc->characterAt(tc->position()); } } + + QStringList stripName(const QString &name) { + QStringList all; + all << name; + int colonColon = 0; + const int size = name.size(); + while ((colonColon = name.indexOf(QLatin1String("::"), colonColon)) != -1) { + all << name.right(size - colonColon - 2); + colonColon += 2; + } + return all; + } } CppElementEvaluator::CppElementEvaluator(CPPEditor *editor) : @@ -314,16 +326,14 @@ CppDeclarableElement::CppDeclarableElement(Symbol *declaration) : CppElement() declaration->enclosingScope()->isNamespace() || declaration->enclosingScope()->isEnum()) { m_qualifiedName = overview.prettyName(LookupContext::fullyQualifiedName(declaration)); + setHelpIdCandidates(stripName(m_qualifiedName)); } else { m_qualifiedName = m_name; + setHelpIdCandidates(QStringList(m_name)); } setTooltip(overview.prettyType(declaration->type(), m_qualifiedName)); setLink(CPPEditor::linkToSymbol(declaration)); - - QStringList helpIds; - helpIds << m_qualifiedName << m_name; - setHelpIdCandidates(helpIds); setHelpMark(m_name); } @@ -482,10 +492,15 @@ CppVariable::CppVariable(Symbol *declaration, const LookupContext &context, Scop Symbol *symbol = clazz->symbols().at(0); const QString &name = overview.prettyName(LookupContext::fullyQualifiedName(symbol)); - setTooltip(name); - setHelpCategory(TextEditor::HelpItem::ClassOrNamespace); - setHelpMark(name); - setHelpIdCandidates(QStringList(name)); + if (!name.isEmpty()) { + setTooltip(name); + setHelpCategory(TextEditor::HelpItem::ClassOrNamespace); + const QStringList &allNames = stripName(name); + if (!allNames.isEmpty()) { + setHelpMark(allNames.last()); + setHelpIdCandidates(allNames); + } + } } } } diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index 2168bc9e2d1..bd448ddafb9 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -46,16 +46,6 @@ using namespace CppEditor::Internal; using namespace Core; -namespace { - QString removeClassNameQualification(const QString &name) { - const int index = name.lastIndexOf(QLatin1Char(':')); - if (index == -1) - return name; - else - return name.right(name.length() - index - 1); - } -} - CppHoverHandler::CppHoverHandler(QObject *parent) : BaseHoverHandler(parent) {} @@ -87,16 +77,8 @@ void CppHoverHandler::identifyMatch(TextEditor::ITextEditor *editor, int pos) QSharedPointer cppElement = evaluator.identifyCppElement(); if (!cppElement.isNull()) { setToolTip(cppElement->tooltip()); - foreach (QString helpId, cppElement->helpIdCandidates()) { - bool found = false; + foreach (const QString &helpId, cppElement->helpIdCandidates()) { if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty()) { - found = true; - } else { - helpId = removeClassNameQualification(helpId); - if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty()) - found = true; - } - if (found) { setLastHelpItemIdentified(TextEditor::HelpItem(helpId, cppElement->helpMark(), cppElement->helpCategory())); @@ -114,14 +96,26 @@ void CppHoverHandler::decorateToolTip() const TextEditor::HelpItem &help = lastHelpItemIdentified(); if (help.isValid()) { + // If Qt is built with a namespace, we still show the tip without it, as + // it is in the docs and for consistency with the doc extraction mechanism. + const TextEditor::HelpItem::Category category = help.category(); const QString &contents = help.extractContent(false); if (!contents.isEmpty()) { - if (help.category() == TextEditor::HelpItem::ClassOrNamespace) { - setToolTip(Qt::escape(toolTip())); - appendToolTip(contents); - } else { + if (category == TextEditor::HelpItem::ClassOrNamespace) + setToolTip(help.helpId() + contents); + else setToolTip(contents); - } + } else if (category == TextEditor::HelpItem::Typedef || + category == TextEditor::HelpItem::Enum || + category == TextEditor::HelpItem::ClassOrNamespace) { + // This approach is a bit limited since it cannot be used for functions + // because the help id doesn't really help in that case. + QString prefix; + if (category == TextEditor::HelpItem::Typedef) + prefix = QLatin1String("typedef "); + else if (category == TextEditor::HelpItem::Enum) + prefix = QLatin1String("enum "); + setToolTip(prefix + help.helpId()); } addF1ToToolTip(); } diff --git a/src/plugins/cppeditor/cppinsertdecldef.cpp b/src/plugins/cppeditor/cppinsertdecldef.cpp index 2d51b5849e5..66bbdfd6919 100644 --- a/src/plugins/cppeditor/cppinsertdecldef.cpp +++ b/src/plugins/cppeditor/cppinsertdecldef.cpp @@ -36,9 +36,10 @@ #include #include #include -#include +#include #include #include +#include #include @@ -47,8 +48,6 @@ using namespace CppEditor; using namespace CppEditor::Internal; using namespace CppTools; -using CppEditor::CppRefactoringChanges; - namespace { class InsertDeclOperation: public CppQuickFixOperation @@ -81,9 +80,7 @@ public: void performChanges(CppRefactoringFile *, CppRefactoringChanges *refactoring) { - Snapshot snapshot = state().snapshot(); - snapshot.insert(refactoring->file(m_targetFileName).cppDocument()); - InsertionPointLocator locator(snapshot); + InsertionPointLocator locator(refactoring); const InsertionLocation loc = locator.methodDeclarationInClass( m_targetFileName, m_targetSymbol, m_xsSpec); Q_ASSERT(loc.isValid()); @@ -211,170 +208,97 @@ QString DeclFromDef::generateDeclaration(const CppQuickFixState &, namespace { -static inline bool hasFunctionType(DeclarationAST *decl) +class InsertDefOperation: public CppQuickFixOperation { - if (decl->asFunctionDefinition()) - return true; - - if (SimpleDeclarationAST *ast = decl->asSimpleDeclaration()) - if (ast->symbols && ast->symbols->value && !ast->symbols->next) - if (Declaration *decl = ast->symbols->value->asDeclaration()) - if (FullySpecifiedType ty = decl->type()) - return ty->asFunctionType(); - - return false; -} - -static QPair findSurroundingDeclarations( - DeclarationListAST *members, - DeclarationAST *decl) -{ - bool found = false; - DeclarationAST *last = 0, *next = 0, *prev = 0; - DeclarationListAST *iter = members; - for (; iter; iter = iter->next) { - DeclarationAST *value = iter->value; - if (value == decl) { - prev = last; - found = true; - } else if (hasFunctionType(value)) { - if (found) { - next = value; - break; - } else { - last = value; - } - } +public: + InsertDefOperation(const CppQuickFixState &state, int priority, + Declaration *decl, const InsertionLocation &loc) + : CppQuickFixOperation(state, priority) + , m_decl(decl) + , m_loc(loc) + { + setDescription(QCoreApplication::tr("Add definition in %1", + "CppEditor::DefFromDecl") + .arg(m_loc.fileName())); } - return qMakePair(prev, next); -} + void performChanges(CppRefactoringFile *, + CppRefactoringChanges *refactoring) + { + Q_ASSERT(m_loc.isValid()); + + CppRefactoringFile targetFile = refactoring->file(m_loc.fileName()); + + Overview oo; + oo.setShowFunctionSignatures(true); + oo.setShowReturnTypes(true); + oo.setShowArgumentNames(true); + + //-- + SubstitutionEnvironment env; + env.setContext(state().context()); + env.switchScope(m_decl->enclosingScope()); + UseQualifiedNames q; + env.enter(&q); + + Control *control = state().context().control().data(); + FullySpecifiedType tn = rewriteType(m_decl->type(), &env, control); + QString name = oo(LookupContext::fullyQualifiedName(m_decl)); + //-- + + QString defText = oo.prettyType(tn, name) + "\n{\n}"; + + int targetPos = targetFile.position(m_loc.line(), m_loc.column()); + int targetPos2 = qMax(0, targetFile.position(m_loc.line(), 1) - 1); + + Utils::ChangeSet target; + target.insert(targetPos, m_loc.prefix() + defText + m_loc.suffix()); + targetFile.change(target); + targetFile.indent(Utils::ChangeSet::Range(targetPos2, targetPos)); + + const int prefixLineCount = m_loc.prefix().count(QLatin1Char('\n')); + refactoring->activateEditor(m_loc.fileName(), + m_loc.line() + prefixLineCount, + 0); + } + +private: + Declaration *m_decl; + InsertionLocation m_loc; +}; } // anonymous namespace QList DefFromDecl::match(const CppQuickFixState &state) { -#if 0 - qDebug() << Q_FUNC_INFO; - const QList &path = state.path(); const CppRefactoringFile &file = state.currentFile(); - DeclaratorAST *declAST = 0; - ClassSpecifierAST *classSpec = 0; int idx = path.size() - 1; for (; idx >= 0; --idx) { AST *node = path.at(idx); - if (ClassSpecifierAST *clazz = node->asClassSpecifier()) { - classSpec = clazz; - continue; + if (SimpleDeclarationAST *simpleDecl = node->asSimpleDeclaration()) { + if (simpleDecl->symbols && ! simpleDecl->symbols->next) { + if (Symbol *symbol = simpleDecl->symbols->value) { + if (Declaration *decl = symbol->asDeclaration()) { + if (decl->type()->isFunctionType() && decl->enclosingScope() && decl->enclosingScope()->isClass()) { + DeclaratorAST *declarator = simpleDecl->declarator_list->value; + if (file.isCursorOn(declarator->core_declarator)) { + CppRefactoringChanges refactoring(state.snapshot()); + InsertionPointLocator locator(&refactoring); + QList results; + foreach (const InsertionLocation &loc, locator.methodDefinition(decl)) + results.append(CppQuickFixOperation::Ptr(new InsertDefOperation(state, idx, decl, loc))); + return results; + } + } + } + } + } + + break; } - - if (idx <= 1) continue; - DeclaratorIdAST *declId = node->asDeclaratorId(); - if (!declId) continue; - - if (!file.isCursorOn(declId)) continue; - - DeclaratorAST *candidate = path.at(idx - 1)->asDeclarator(); - if (!candidate) continue; - if (!candidate->postfix_declarator_list) continue; - if (!candidate->postfix_declarator_list->value) continue; - if (candidate->postfix_declarator_list->next) continue; - FunctionDeclaratorAST *funDecl = candidate->postfix_declarator_list->value->asFunctionDeclarator(); - if (!funDecl) continue; - if (funDecl->symbol->asFunctionType()) - declAST = candidate; } - if (!declAST || !classSpec || !classSpec->symbol) - return noResult(); - - if (!declAST->symbols || !declAST->symbols->value || declAST->symbols->next) - return noResult(); - - Declaration *decl = declAST->symbols->value->asDeclaration(); - if (!decl) - return noResult(); - - Function *funTy = decl->type()->asFunctionType(); - if (!funTy) - return noResult(); - - qDebug() << "-> Found funTy."; - - QPair surroundingNodes = - findSurroundingDeclarations(classSpec->member_specifier_list, declAST); - qDebug() << "->("<asSimpleDeclaration()) - qDebug()<<"-->prev@"<symbols->value->line()<symbols->value->column(); - if (surroundingNodes.second) - if (SimpleDeclarationAST *sd=surroundingNodes.second->asSimpleDeclaration()) - qDebug()<<"-->next@"<symbols->value->line()<symbols->value->column(); -#endif -// if (ClassOrNamespace *targetBinding = state.context().lookupParent(method)) { -// foreach (Symbol *s, targetBinding->symbols()) { -// if (Class *clazz = s->asClass()) { -// QList results; -// const QLatin1String fn(clazz->fileName()); -// const QString decl = generateDeclaration(state, -// method, -// targetBinding); -// results.append( -// singleResult( -// new InsertDeclOperation(state, idx, fn, clazz, -// InsertionPointLocator::Public, -// decl))); -// results.append( -// singleResult( -// new InsertDeclOperation(state, idx, fn, clazz, -// InsertionPointLocator::Protected, -// decl))); -// results.append( -// singleResult( -// new InsertDeclOperation(state, idx, fn, clazz, -// InsertionPointLocator::Private, -// decl))); -// results.append( -// singleResult( -// new InsertDeclOperation(state, idx, fn, clazz, -// InsertionPointLocator::PublicSlot, -// decl))); -// results.append( -// singleResult( -// new InsertDeclOperation(state, idx, fn, clazz, -// InsertionPointLocator::ProtectedSlot, -// decl))); -// results.append( -// singleResult( -// new InsertDeclOperation(state, idx, fn, clazz, -// InsertionPointLocator::PrivateSlot, -// decl))); -// return results; -// } //! \todo support insertion into namespaces -// } -// } - - Q_UNUSED(findSurroundingDeclarations) - Q_UNUSED(state) return noResult(); } - -QString DefFromDecl::generateDefinition(const CppQuickFixState &, - Function *method, - ClassOrNamespace *targetBinding) -{ - Q_UNUSED(targetBinding); - - Overview oo; - oo.setShowFunctionSignatures(true); - oo.setShowReturnTypes(true); - oo.setShowArgumentNames(true); - - QString decl; - decl += oo(method->type(), method->unqualifiedName()); - decl += QLatin1String(";\n"); - - return decl; -} diff --git a/src/plugins/cppeditor/cppinsertdecldef.h b/src/plugins/cppeditor/cppinsertdecldef.h index c56c17331cb..0b7f2ff51c5 100644 --- a/src/plugins/cppeditor/cppinsertdecldef.h +++ b/src/plugins/cppeditor/cppinsertdecldef.h @@ -56,11 +56,6 @@ class DefFromDecl: public CppQuickFixFactory { public: virtual QList match(const CppQuickFixState &state); - -protected: - static QString generateDefinition(const CppQuickFixState &state, - CPlusPlus::Function *method, - CPlusPlus::ClassOrNamespace *targetBinding); }; } // namespace Internal diff --git a/src/plugins/cppeditor/cppquickfix.cpp b/src/plugins/cppeditor/cppquickfix.cpp index eb5dce7a114..a0ce66a1ce9 100644 --- a/src/plugins/cppeditor/cppquickfix.cpp +++ b/src/plugins/cppeditor/cppquickfix.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include @@ -52,6 +52,7 @@ using namespace CppEditor; using namespace CppEditor::Internal; +using namespace CppTools; using namespace TextEditor; using namespace CPlusPlus; using namespace Utils; diff --git a/src/plugins/cppeditor/cppquickfix.h b/src/plugins/cppeditor/cppquickfix.h index 45cf0e86ac6..a261297f5be 100644 --- a/src/plugins/cppeditor/cppquickfix.h +++ b/src/plugins/cppeditor/cppquickfix.h @@ -30,11 +30,12 @@ #ifndef CPPQUICKFIX_H #define CPPQUICKFIX_H -#include "cpprefactoringchanges.h" +#include "cppeditor_global.h" #include "cppsemanticinfo.h" #include #include +#include #include #include #include @@ -69,7 +70,7 @@ public: CppEditor::Internal::SemanticInfo semanticInfo() const; const CPlusPlus::LookupContext &context() const; - const CppRefactoringFile currentFile() const; + const CppTools::CppRefactoringFile currentFile() const; bool isCursorOn(unsigned tokenIndex) const { return currentFile().isCursorOn(tokenIndex); } @@ -94,7 +95,8 @@ public: virtual void perform(); protected: - virtual void performChanges(CppRefactoringFile *currentFile, CppRefactoringChanges *refactoring) = 0; + virtual void performChanges(CppTools::CppRefactoringFile *currentFile, + CppTools::CppRefactoringChanges *refactoring) = 0; QString fileName() const; diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index c2f648a6cec..509fb1caa08 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -58,6 +58,7 @@ using namespace CppEditor; using namespace CppEditor::Internal; +using namespace CppTools; using namespace TextEditor; using namespace CPlusPlus; using namespace Utils; diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index d1415bb281b..ec71eb4ee6b 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -361,6 +361,12 @@ QString CppPreprocessor::tryIncludeFile(QString &fileName, IncludeType type, uns return contents; } +static inline void appendDirSeparatorIfNeeded(QString &path) +{ + if (!path.endsWith(QLatin1Char('/'), Qt::CaseInsensitive)) + path += QLatin1Char('/'); +} + QString CppPreprocessor::tryIncludeFile_helper(QString &fileName, IncludeType type, unsigned *revision) { QFileInfo fileInfo(fileName); @@ -373,7 +379,7 @@ QString CppPreprocessor::tryIncludeFile_helper(QString &fileName, IncludeType ty if (type == IncludeLocal && m_currentDoc) { QFileInfo currentFileInfo(m_currentDoc->fileName()); QString path = currentFileInfo.absolutePath(); - path += QLatin1Char('/'); + appendDirSeparatorIfNeeded(path); path += fileName; path = QDir::cleanPath(path); QString contents; @@ -385,7 +391,7 @@ QString CppPreprocessor::tryIncludeFile_helper(QString &fileName, IncludeType ty foreach (const QString &includePath, m_includePaths) { QString path = includePath; - path += QLatin1Char('/'); + appendDirSeparatorIfNeeded(path); path += fileName; path = QDir::cleanPath(path); QString contents; @@ -398,7 +404,7 @@ QString CppPreprocessor::tryIncludeFile_helper(QString &fileName, IncludeType ty // look in the system include paths foreach (const QString &includePath, m_systemIncludePaths) { QString path = includePath; - path += QLatin1Char('/'); + appendDirSeparatorIfNeeded(path); path += fileName; path = QDir::cleanPath(path); QString contents; @@ -415,7 +421,7 @@ QString CppPreprocessor::tryIncludeFile_helper(QString &fileName, IncludeType ty foreach (const QString &frameworkPath, m_frameworkPaths) { QString path = frameworkPath; - path += QLatin1Char('/'); + appendDirSeparatorIfNeeded(path); path += frameworkName; path += QLatin1String(".framework/Headers/"); path += name; @@ -1225,6 +1231,9 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface &future, const QString path = paths.takeFirst(); + if (path == QLatin1String("/")) + continue; + // Skip non-existing paths if (!QFile::exists(path)) continue; diff --git a/src/plugins/cppeditor/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp similarity index 99% rename from src/plugins/cppeditor/cpprefactoringchanges.cpp rename to src/plugins/cpptools/cpprefactoringchanges.cpp index cac384bf337..b320b578b52 100644 --- a/src/plugins/cppeditor/cpprefactoringchanges.cpp +++ b/src/plugins/cpptools/cpprefactoringchanges.cpp @@ -37,8 +37,8 @@ #include -using namespace CppEditor; using namespace CPlusPlus; +using namespace CppTools; using namespace Utils; CppRefactoringChanges::CppRefactoringChanges(const Snapshot &snapshot) diff --git a/src/plugins/cppeditor/cpprefactoringchanges.h b/src/plugins/cpptools/cpprefactoringchanges.h similarity index 92% rename from src/plugins/cppeditor/cpprefactoringchanges.h rename to src/plugins/cpptools/cpprefactoringchanges.h index cb2f83c7cc5..2a0e20bf787 100644 --- a/src/plugins/cppeditor/cpprefactoringchanges.h +++ b/src/plugins/cpptools/cpprefactoringchanges.h @@ -35,15 +35,15 @@ #include #include -#include +#include #include -namespace CppEditor { +namespace CppTools { class CppRefactoringChanges; -class CPPEDITOR_EXPORT CppRefactoringFile: public TextEditor::RefactoringFile +class CPPTOOLS_EXPORT CppRefactoringFile: public TextEditor::RefactoringFile { public: CppRefactoringFile(); @@ -79,7 +79,7 @@ private: mutable CPlusPlus::Document::Ptr m_cppDocument; }; -class CPPEDITOR_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges +class CPPTOOLS_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges { public: CppRefactoringChanges(const CPlusPlus::Snapshot &snapshot); @@ -99,6 +99,6 @@ private: CppTools::CppModelManagerInterface::WorkingCopy m_workingCopy; }; -} // namespace CppEditor +} // namespace CppTools #endif // CPPREFACTORINGCHANGES_H diff --git a/src/plugins/cpptools/cpptools.pro b/src/plugins/cpptools/cpptools.pro index 04d10bc11e5..be6a5cfde8a 100644 --- a/src/plugins/cpptools/cpptools.pro +++ b/src/plugins/cpptools/cpptools.pro @@ -26,7 +26,9 @@ HEADERS += completionsettingspage.h \ cppfindreferences.h \ cppcodeformatter.h \ symbolsfindfilter.h \ - uicodecompletionsupport.h + uicodecompletionsupport.h \ + insertionpointlocator.h \ + cpprefactoringchanges.h SOURCES += completionsettingspage.cpp \ cppclassesfilter.cpp \ @@ -44,7 +46,9 @@ SOURCES += completionsettingspage.cpp \ cppfindreferences.cpp \ cppcodeformatter.cpp \ symbolsfindfilter.cpp \ - uicodecompletionsupport.cpp + uicodecompletionsupport.cpp \ + insertionpointlocator.cpp \ + cpprefactoringchanges.cpp FORMS += completionsettingspage.ui \ cppfilesettingspage.ui diff --git a/src/libs/cplusplus/InsertionPointLocator.cpp b/src/plugins/cpptools/insertionpointlocator.cpp similarity index 85% rename from src/libs/cplusplus/InsertionPointLocator.cpp rename to src/plugins/cpptools/insertionpointlocator.cpp index c031e9322d9..f1594b98604 100644 --- a/src/libs/cplusplus/InsertionPointLocator.cpp +++ b/src/plugins/cpptools/insertionpointlocator.cpp @@ -27,13 +27,16 @@ ** **************************************************************************/ -#include "InsertionPointLocator.h" +#include "cpptoolsplugin.h" +#include "cpprefactoringchanges.h" +#include "insertionpointlocator.h" #include #include #include using namespace CPlusPlus; +using namespace CppTools; namespace { @@ -150,7 +153,8 @@ protected: if (needsSuffix) suffix = QLatin1Char('\n'); - _result = InsertionLocation(prefix, suffix, line, column); + _result = InsertionLocation(_doc->fileName(), prefix, suffix, + line, column); return false; } @@ -264,16 +268,19 @@ InsertionLocation::InsertionLocation() , m_column(0) {} -InsertionLocation::InsertionLocation(const QString &prefix, const QString &suffix, +InsertionLocation::InsertionLocation(const QString &fileName, + const QString &prefix, + const QString &suffix, unsigned line, unsigned column) - : m_prefix(prefix) + : m_fileName(fileName) + , m_prefix(prefix) , m_suffix(suffix) , m_line(line) , m_column(column) {} -InsertionPointLocator::InsertionPointLocator(const Snapshot &snapshot) - : m_snapshot(snapshot) +InsertionPointLocator::InsertionPointLocator(CppRefactoringChanges *refactoringChanges) + : m_refactoringChanges(refactoringChanges) { } @@ -282,7 +289,7 @@ InsertionLocation InsertionPointLocator::methodDeclarationInClass( const Class *clazz, AccessSpec xsSpec) const { - const Document::Ptr doc = m_snapshot.document(fileName); + const Document::Ptr doc = m_refactoringChanges->file(fileName).cppDocument(); if (doc) { FindInClass find(doc, clazz, xsSpec); return find(); @@ -293,11 +300,30 @@ InsertionLocation InsertionPointLocator::methodDeclarationInClass( /// Currently, we return the end of fileName.cpp QList InsertionPointLocator::methodDefinition( - const QString &/*fileName*/) const + Declaration *declaration) const { QList result; + if (!declaration) + return result; + Internal::CppToolsPlugin *cpptools = Internal::CppToolsPlugin::instance(); + const QString declFileName = QLatin1String(declaration->fileName()); + QString target = cpptools->correspondingHeaderOrSource(declFileName); + Document::Ptr doc = m_refactoringChanges->file(target).cppDocument(); + if (doc.isNull()) + return result; + + TranslationUnit *xUnit = doc->translationUnit(); + unsigned tokenCount = xUnit->tokenCount(); + if (tokenCount < 2) // no tokens available + return result; + + unsigned line = 0, column = 0; + xUnit->getTokenEndPosition(xUnit->tokenCount() - 2, &line, &column); + + const QLatin1String prefix("\n\n"); + result.append(InsertionLocation(target, prefix, QString(), line, column)); return result; } diff --git a/src/libs/cplusplus/InsertionPointLocator.h b/src/plugins/cpptools/insertionpointlocator.h similarity index 75% rename from src/libs/cplusplus/InsertionPointLocator.h rename to src/plugins/cpptools/insertionpointlocator.h index 5436d36eb60..3124a528f92 100644 --- a/src/libs/cplusplus/InsertionPointLocator.h +++ b/src/plugins/cpptools/insertionpointlocator.h @@ -30,19 +30,27 @@ #ifndef INSERTIONPOINTLOCATOR_H #define INSERTIONPOINTLOCATOR_H +#include "cpptools_global.h" + #include #include #include -#include "CppDocument.h" +#include -namespace CPlusPlus { +namespace CppTools { -class CPLUSPLUS_EXPORT InsertionLocation +class CppRefactoringChanges; + +class CPPTOOLS_EXPORT InsertionLocation { public: InsertionLocation(); - InsertionLocation(const QString &prefix, const QString &suffix, unsigned line, unsigned column); + InsertionLocation(const QString &fileName, const QString &prefix, + const QString &suffix, unsigned line, unsigned column); + + QString fileName() const + { return m_fileName; } /// \returns The prefix to insert before any other text. QString prefix() const @@ -61,16 +69,17 @@ public: { return m_column; } bool isValid() const - { return m_line > 0 && m_column > 0; } + { return !m_fileName.isEmpty() && m_line > 0 && m_column > 0; } private: + QString m_fileName; QString m_prefix; QString m_suffix; unsigned m_line; unsigned m_column; }; -class CPLUSPLUS_EXPORT InsertionPointLocator +class CPPTOOLS_EXPORT InsertionPointLocator { public: enum AccessSpec { @@ -89,18 +98,18 @@ public: }; public: - InsertionPointLocator(const Snapshot &snapshot); + InsertionPointLocator(CppRefactoringChanges *refactoringChanges); InsertionLocation methodDeclarationInClass(const QString &fileName, - const Class *clazz, + const CPlusPlus::Class *clazz, AccessSpec xsSpec) const; - QList methodDefinition(const QString &fileName) const; + QList methodDefinition(CPlusPlus::Declaration *declaration) const; private: - Snapshot m_snapshot; + CppRefactoringChanges *m_refactoringChanges; }; -} // namespace CPlusPlus +} // namespace CppTools #endif // INSERTIONPOINTLOCATOR_H diff --git a/src/plugins/cvs/cvscontrol.cpp b/src/plugins/cvs/cvscontrol.cpp index 41268e79f07..3ba45ffb297 100644 --- a/src/plugins/cvs/cvscontrol.cpp +++ b/src/plugins/cvs/cvscontrol.cpp @@ -58,6 +58,8 @@ bool CVSControl::supportsOperation(Operation operation) const case MoveOperation: case CreateRepositoryOperation: case SnapshotOperations: + case CheckoutOperation: + case GetRepositoryRootOperation: rc = false; break; } @@ -94,6 +96,16 @@ bool CVSControl::vcsCreateRepository(const QString &) return false; } +QString CVSControl::vcsGetRepositoryURL(const QString &) +{ + return QString(); +} + +bool CVSControl::vcsCheckout(const QString &, const QByteArray &) +{ + return false; +} + QString CVSControl::vcsCreateSnapshot(const QString &) { return QString(); diff --git a/src/plugins/cvs/cvscontrol.h b/src/plugins/cvs/cvscontrol.h index 4fd06c2de72..b5b882d4425 100644 --- a/src/plugins/cvs/cvscontrol.h +++ b/src/plugins/cvs/cvscontrol.h @@ -53,6 +53,8 @@ public: virtual bool vcsDelete(const QString &filename); virtual bool vcsMove(const QString &from, const QString &to); virtual bool vcsCreateRepository(const QString &directory); + virtual bool vcsCheckout(const QString &directory, const QByteArray &url); + virtual QString vcsGetRepositoryURL(const QString &directory); virtual QString vcsCreateSnapshot(const QString &topLevel); virtual QStringList vcsSnapshots(const QString &topLevel); virtual bool vcsRestoreSnapshot(const QString &topLevel, const QString &name); diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 363daa66d65..8fff78742c6 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -481,7 +481,7 @@ void CdbEngine::runEngine() } break; case AttachCore: - errorMessage = tr("Attaching to core files is not supported!"); + errorMessage = tr("Attaching to core files is not supported."); break; } if (rc) { @@ -563,6 +563,8 @@ void CdbEngine::processTerminated(unsigned long exitCode) bool CdbEnginePrivate::endInferior(bool detachOnly, QString *errorMessage) { + if (debugCDBExecution) + qDebug("endInferior detach=%d, %s", detachOnly, DebuggerEngine::stateName(m_engine->state())); // Are we running switch (m_engine->state()) { case InferiorRunRequested: @@ -572,6 +574,7 @@ bool CdbEnginePrivate::endInferior(bool detachOnly, QString *errorMessage) case InferiorStopOk: case InferiorStopFailed: case InferiorShutdownRequested: + case EngineShutdownRequested: // Forwarded when choosing 'Abort...' an attached process. break; default: return true; diff --git a/src/plugins/debugger/cdb/symbolgroupcontext.cpp b/src/plugins/debugger/cdb/symbolgroupcontext.cpp index 569d20c5e44..72b8320c0ba 100644 --- a/src/plugins/debugger/cdb/symbolgroupcontext.cpp +++ b/src/plugins/debugger/cdb/symbolgroupcontext.cpp @@ -373,12 +373,23 @@ static inline QString msgExpandFailed(const QString &prefix, unsigned long index return QString::fromLatin1("Unable to expand '%1' %2: %3").arg(prefix).arg(index).arg(why); } +bool SymbolGroupContext::expandSymbol(unsigned long index, QString *errorMessage) +{ + return expandSymbol(m_inameIndexMap.key(index), index, errorMessage); +} + // Expand a symbol using the symbol group interface. bool SymbolGroupContext::expandSymbol(const QString &prefix, unsigned long index, QString *errorMessage) { if (debug) qDebug() << '>' << Q_FUNC_INFO << '\n' << prefix << index; + if (index >= unsigned(m_symbolParameters.size())) { + *errorMessage = QString::fromLatin1("Index %1 (%2) out of range 0..%3."). + arg(index).arg(prefix).arg(m_symbolParameters.size()); + return false; + } + switch (symbolState(index)) { case LeafSymbol: *errorMessage = QString::fromLatin1("Attempt to expand leaf node '%1' %2!").arg(prefix).arg(index); @@ -556,7 +567,7 @@ unsigned SymbolGroupContext::dumpValueRaw(unsigned long index, name.truncate(shadowedPos); } // For class hierarchies, we get sometimes complicated std::template types here. - // (std::map extends std::tree<>... Remove them for display only. + // (std::map extends std::tree<>... Remove them for display only. *nameIn = formatShadowedName(removeInnerTemplateType(name), shadowedNumber); *typeNameIn = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolTypeNameWide, index); // Check for uninitialized variables at level 0 only. @@ -616,7 +627,7 @@ unsigned SymbolGroupContext::dumpValue(unsigned long index, ULONG *typeIdIn, QString *typeNameIn, QString *valueIn) -{ +{ unsigned rc = dumpValueRaw(index, inameIn, nameIn, addrIn, typeIdIn, typeNameIn, valueIn); do { @@ -714,7 +725,7 @@ int SymbolGroupContext::dumpQString(unsigned long index, if (!expandSymbol(iname, index, &errorMessage)) return 2; const unsigned long dIndex = index + 4; - if (!expandSymbol(iname, dIndex, &errorMessage)) + if (!expandSymbol(dIndex, &errorMessage)) return 3; const unsigned long sizeIndex = dIndex + 3; const unsigned long arrayIndex = dIndex + 4; @@ -760,27 +771,49 @@ int SymbolGroupContext::dumpStdString(unsigned long index, { QString errorMessage; - // Expand string ->string_val->_bx. if (!expandSymbol(inameIn, index, &errorMessage)) return 1; - const unsigned long bxIndex = index + 3; - if (!expandSymbol(inameIn, bxIndex, &errorMessage)) - return 2; - // Check if size is something sane - const int sizeIndex = index + 6; + int sizeIndex = -1; + int bufIndex = -1; + if (m_symbolParameters.at(index).SubElements >= 3 + && m_inameIndexMap.key(index + 3).endsWith(QLatin1String("Bx"))) { + // Up to MSVC 2008 + const int bxIndex = index + 3; + if (m_symbolParameters.at(bxIndex).SubElements < 2 + || !expandSymbol(index + 3, &errorMessage)) + return 2; + // Check if size is something sane + sizeIndex = index + 6; + bufIndex = index + 4; + } else { + // MSVC10 onwards: Large nested string_val structure containing Bx + if (m_symbolParameters.at(index + 1).SubElements < 5 + || !expandSymbol(index + 1, &errorMessage)) + return 3; + const int bxIndex = index + 3; + if (m_symbolParameters.at(bxIndex).SubElements < 3 + || !m_inameIndexMap.key(bxIndex).endsWith(QLatin1String("Bx")) + || !expandSymbol(bxIndex, &errorMessage)) + return 4; + sizeIndex = index + 7; + bufIndex = index + 4; + } + if (sizeIndex < 0 || bufIndex < 0 + || sizeIndex >= m_symbolParameters.size() || bufIndex >= m_symbolParameters.size()) + return 5; + // Extract size and buffer qint64 size; if (!getSG_DecimalIntValue(m_symbolGroup, sizeIndex, &size)) - return 3; + return 6; if (size < 0) return 1; // Just copy over the value of the buf[]-array, which should be the string - const QChar doubleQuote = QLatin1Char('"'); - const int bufIndex = index + 4; *valueIn = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolValueTextWide, bufIndex); + const QChar doubleQuote = QLatin1Char('"'); const int quotePos = valueIn->indexOf(doubleQuote); if (quotePos == -1) - return 1; + return 7; valueIn->remove(0, quotePos); if (valueIn->size() > maxStringLength) { valueIn->truncate(maxStringLength); diff --git a/src/plugins/debugger/cdb/symbolgroupcontext.h b/src/plugins/debugger/cdb/symbolgroupcontext.h index 214af95dfc0..559e64a6747 100644 --- a/src/plugins/debugger/cdb/symbolgroupcontext.h +++ b/src/plugins/debugger/cdb/symbolgroupcontext.h @@ -143,6 +143,7 @@ private: void clear(); bool expandSymbol(const QString &prefix, unsigned long index, QString *errorMessage); + bool expandSymbol(unsigned long index, QString *errorMessage); void populateINameIndexMap(const QString &prefix, unsigned long parentId, unsigned long end); QString symbolINameAt(unsigned long index) const; inline QString formatShadowedName(const QString &name, int n) const; diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index 2c6dfe58b1d..0a5ded2ed5b 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -240,7 +240,7 @@ DebuggerSettings *DebuggerSettings::instance() item->setCheckable(true); item->setDefaultValue(true); item->setSettingsKey(debugModeGroup, QLatin1String("AutoDerefPointers")); - item->setToolTip(tr("This switches the Locals&Watchers view to " + item->setToolTip(tr("This switches the Locals&&Watchers view to " "automatically dereference pointers. This saves a level in the " "tree view, but also loses data for the now-missing intermediate " "level.")); diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 3092b6a64dd..cbb287f1099 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -322,7 +322,7 @@ void DebuggerEnginePrivate::breakpointSetRemoveMarginActionTriggered() QAction *act = qobject_cast(sender()); QTC_ASSERT(act, return); QList list = act->data().toList(); - QTC_ASSERT(list.size() >= 3, return); + QTC_ASSERT(list.size() >= 3, qDebug() << list; return); const QString fileName = list.at(0).toString(); const int lineNumber = list.at(1).toInt(); const quint64 address = list.at(2).toULongLong(); @@ -334,7 +334,7 @@ void DebuggerEnginePrivate::breakpointEnableDisableMarginActionTriggered() QAction *act = qobject_cast(sender()); QTC_ASSERT(act, return); QList list = act->data().toList(); - QTC_ASSERT(list.size() == 2, return); + QTC_ASSERT(list.size() == 3, qDebug() << list; return); const QString fileName = list.at(0).toString(); const int lineNumber = list.at(1).toInt(); m_breakHandler.toggleBreakpointEnabled(fileName, lineNumber); @@ -343,7 +343,7 @@ void DebuggerEnginePrivate::breakpointEnableDisableMarginActionTriggered() void DebuggerEnginePrivate::handleContextMenuRequest(const QVariant ¶meters) { const QList list = parameters.toList(); - QTC_ASSERT(list.size() == 3, return); + QTC_ASSERT(list.size() == 3, qDebug() << list; return); TextEditor::ITextEditor *editor = (TextEditor::ITextEditor *)(list.at(0).value()); int lineNumber = list.at(1).toInt(); diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 7eea602ad8e..8c016620bbc 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -613,7 +613,7 @@ bool DebuggerRunControl::aboutToStop() const { QTC_ASSERT(isRunning(), return true;) - const QString question = tr("A debugging session are still in progress. " + const QString question = tr("A debugging session is still in progress. " "Terminating the session in the current" " state can leave the target in an inconsistent state." " Would you still like to terminate it?"); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 14b0400a893..61779d3c449 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -230,6 +230,7 @@ void GdbEngine::initializeVariables() m_isMacGdb = false; m_hasPython = false; m_registerNamesListed = false; + m_hasInferiorThreadList = false; m_fullToShortName.clear(); m_shortToFullName.clear(); diff --git a/src/plugins/debugger/gdb/symbian.cpp b/src/plugins/debugger/gdb/symbian.cpp index f7d6b62f282..636c83da85e 100644 --- a/src/plugins/debugger/gdb/symbian.cpp +++ b/src/plugins/debugger/gdb/symbian.cpp @@ -418,9 +418,9 @@ static void gdbAppendRegister(QByteArray *ba, uint regno, uint value) ba->append(';'); } -QByteArray Snapshot::gdbStopMessage(uint threadId, bool reportThreadId) const +QByteArray Snapshot::gdbStopMessage(uint threadId, int signalNumber, bool reportThreadId) const { - QByteArray ba = "T05"; + QByteArray ba = ('T' + trk::hexNumber(signalNumber, 2)); if (reportThreadId) { ba += "thread:"; ba += trk::hexNumber(threadId, 3); @@ -548,7 +548,7 @@ QVector gdbStartupSequence() } // namespace Symbian // Generic gdb server helpers: Read address/length off a memory -// command like 'm845,455','X845,455' +// command like 'm845,455','X845,455:' QPair parseGdbReadMemoryRequest(const QByteArray &cmd) { QPair rc(0, 0); @@ -559,7 +559,11 @@ QPair parseGdbReadMemoryRequest(const QByteArray &cmd) rc.first = cmd.mid(1, pos - 1).toULongLong(&ok, 16); if (!ok) return rc; - rc.second = cmd.mid(pos + 1).toUInt(&ok, 16); + const int colonPos = cmd.indexOf(':'); + if (colonPos == -1) + rc.second = cmd.mid(pos + 1).toUInt(&ok, 16); + else + rc.second = cmd.mid(pos + 1, colonPos - pos - 1 ).toUInt(&ok, 16); if (!ok) rc.first = 0; return rc; diff --git a/src/plugins/debugger/gdb/symbian.h b/src/plugins/debugger/gdb/symbian.h index 30012183c53..ec34462e47a 100644 --- a/src/plugins/debugger/gdb/symbian.h +++ b/src/plugins/debugger/gdb/symbian.h @@ -73,6 +73,12 @@ struct MemoryRange QDebug operator<<(QDebug d, const MemoryRange &range); +// Signals to be passed to gdb server as stop reason (2 digit hex) +enum GdbServerStopReason { + gdbServerSignalTrap = 5, // Trap/Breakpoint, etc. + gdbServerSignalSegfault = 11 // Segfault +}; + namespace Symbian { enum CodeMode @@ -135,7 +141,7 @@ struct Snapshot QByteArray gdbQsThreadInfo() const; QByteArray gdbQThreadExtraInfo(const QByteArray &cmd) const; // Format a gdb T05 stop message with thread and register set - QByteArray gdbStopMessage(uint threadId, bool reportThreadId) const; + QByteArray gdbStopMessage(uint threadId, int signalNumber, bool reportThreadId) const; // Format a log message for memory access with some smartness about registers QByteArray memoryReadLogMessage(uint addr, uint threadId, bool verbose, const QByteArray &ba) const; // Gdb command parse helpers: 'salnext' diff --git a/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp b/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp index 6e54e60eb54..65e328725e0 100644 --- a/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/tcftrkgdbadapter.cpp @@ -113,6 +113,7 @@ static inline QString startMsg(const trk::Session &session) TcfTrkGdbAdapter::TcfTrkGdbAdapter(GdbEngine *engine) : AbstractGdbAdapter(engine), m_running(false), + m_stopReason(0), m_trkDevice(new TcfTrkDevice(this)), m_gdbAckMode(true), m_uid(0), @@ -326,6 +327,9 @@ void TcfTrkGdbAdapter::tcftrkEvent(const TcfTrkEvent &e) m_snapshot.setThreadState(threadId, reason); // Update registers first, then report stopped m_running = false; + m_stopReason = reason.contains(QLatin1String("exception"), Qt::CaseInsensitive) + || reason.contains(QLatin1String("panic"), Qt::CaseInsensitive) ? + gdbServerSignalSegfault : gdbServerSignalTrap; m_trkDevice->sendRegistersGetMRangeCommand( TcfTrkCallback(this, &TcfTrkGdbAdapter::handleAndReportReadRegistersAfterStop), currentThreadContextId(), 0, @@ -689,7 +693,7 @@ void TcfTrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd) } else { //qDebug() << "Fetching single register"; m_trkDevice->sendRegistersGetMRangeCommand( - TcfTrkCallback(this, &TcfTrkGdbAdapter::handleAndReportReadRegistersAfterStop), + TcfTrkCallback(this, &TcfTrkGdbAdapter::handleAndReportReadRegister), currentThreadContextId(), registerNumber, 1); } } @@ -1306,7 +1310,7 @@ void TcfTrkGdbAdapter::handleAndReportReadRegistersAfterStop(const TcfTrkCommand handleReadRegisters(result); handleReadRegisters(result); const bool reportThread = m_session.tid != m_session.mainTid; - sendGdbServerMessage(m_snapshot.gdbStopMessage(m_session.tid, reportThread), stopMessage()); + sendGdbServerMessage(m_snapshot.gdbStopMessage(m_session.tid, m_stopReason, reportThread), stopMessage()); } void TcfTrkGdbAdapter::handleAndReportSetBreakpoint(const TcfTrkCommandResult &result) diff --git a/src/plugins/debugger/gdb/tcftrkgdbadapter.h b/src/plugins/debugger/gdb/tcftrkgdbadapter.h index ab69c13f256..71becf8e248 100644 --- a/src/plugins/debugger/gdb/tcftrkgdbadapter.h +++ b/src/plugins/debugger/gdb/tcftrkgdbadapter.h @@ -137,6 +137,7 @@ private: QString m_gdbServerName; // 127.0.0.1:(2222+uid) bool m_running; + int m_stopReason; tcftrk::TcfTrkDevice *m_trkDevice; QSharedPointer m_trkIODevice; diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index 1961ab61cf4..05d1ba6bc40 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -829,6 +829,17 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd) sendGdbServerMessage("E20", msg.toLatin1()); } } // qPart/qXfer + + else if (cmd.startsWith("X")) { + logMessage(msgGdbPacket(QLatin1String("Write memory"))); + // X addr,length + sendGdbServerAck(); + const QPair addrLength = parseGdbReadMemoryRequest(cmd); + int pos = cmd.indexOf(':'); + m_snapshot.resetMemory(); + writeMemory(addrLength.first, cmd.mid(pos + 1, addrLength.second)); + } + else { logMessage(msgGdbPacket(QLatin1String("FIXME unknown: ") + QString::fromAscii(cmd)), LogWarning); @@ -963,10 +974,12 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result) # if 1 // We almost always need register values, so get them // now before informing gdb about the stop.s - //qDebug() << "Auto-fetching registers"; + const int signalNumber = reason.contains(QLatin1String("exception"), Qt::CaseInsensitive) + || reason.contains(QLatin1String("panic"), Qt::CaseInsensitive) ? + gdbServerSignalSegfault : gdbServerSignalTrap; sendTrkMessage(0x12, TrkCB(handleAndReportReadRegistersAfterStop), - Launcher::readRegistersMessage(m_session.pid, m_session.tid)); + Launcher::readRegistersMessage(m_session.pid, m_session.tid), signalNumber); # else // As a source-line step typically consists of // several instruction steps, better avoid the multiple @@ -1181,7 +1194,8 @@ void TrkGdbAdapter::handleAndReportReadRegistersAfterStop(const TrkResult &resul { handleReadRegisters(result); const bool reportThread = m_session.tid != m_session.mainTid; - sendGdbServerMessage(m_snapshot.gdbStopMessage(m_session.tid, reportThread), + const int signalNumber = result.cookie.isValid() ? result.cookie.toInt() : int(gdbServerSignalTrap); + sendGdbServerMessage(m_snapshot.gdbStopMessage(m_session.tid, signalNumber, reportThread), "Stopped with registers in thread " + QByteArray::number(m_session.tid, 16)); } @@ -1441,6 +1455,29 @@ void TrkGdbAdapter::readMemory(uint addr, uint len, bool buffered) tryAnswerGdbMemoryRequest(buffered); } +void TrkGdbAdapter::writeMemory(uint addr, const QByteArray &data) +{ + Q_ASSERT(data.size() < (2 << 16)); + if (m_verbose > 2) { + logMessage(_("writeMemory %1 bytes from 0x%2 blocksize=%3 data=%4") + .arg(data.size()).arg(addr, 0, 16).arg(MemoryChunkSize).arg(QString::fromLatin1(data.toHex()))); + } + + sendTrkMessage(0x11, TrkCB(handleWriteMemory), + trkWriteMemoryMessage(addr, data)); +} + +void TrkGdbAdapter::handleWriteMemory(const TrkResult &result) +{ + logMessage(" RESULT: " + result.toString() + result.cookie.toString()); + if (result.errorCode()) { + logMessage("ERROR: " + result.errorString(), LogError); + sendGdbServerMessage("E01"); + return; + } + sendGdbServerMessage("OK"); +} + void TrkGdbAdapter::interruptInferior() { sendTrkMessage(0x1a, TrkCallback(), trkInterruptMessage(), "Interrupting..."); diff --git a/src/plugins/debugger/gdb/trkgdbadapter.h b/src/plugins/debugger/gdb/trkgdbadapter.h index 1e7873815e9..2ea7e1bcfab 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.h +++ b/src/plugins/debugger/gdb/trkgdbadapter.h @@ -162,12 +162,14 @@ private: void handleStep(const TrkResult &result); void handleReadRegisters(const TrkResult &result); void handleWriteRegister(const TrkResult &result); + void handleWriteMemory(const TrkResult &result); void reportToGdb(const TrkResult &result); void gdbSetCurrentThread(const QByteArray &cmd, const char *why); //void reportReadMemoryBuffered(const TrkResult &result); //void reportReadMemoryUnbuffered(const TrkResult &result); void readMemory(uint addr, uint len, bool buffered); + void writeMemory(uint addr, const QByteArray &data); void handleDirectTrk(const TrkResult &response); void directStep(uint addr); diff --git a/src/plugins/debugger/qml/qmladapter.cpp b/src/plugins/debugger/qml/qmladapter.cpp index fbea843d19e..4c32f3c68a8 100644 --- a/src/plugins/debugger/qml/qmladapter.cpp +++ b/src/plugins/debugger/qml/qmladapter.cpp @@ -36,6 +36,8 @@ #include #include +#include + namespace Debugger { struct QmlAdapterPrivate { @@ -49,6 +51,7 @@ struct QmlAdapterPrivate { int m_connectionAttempts; int m_maxConnectionAttempts; QDeclarativeDebugConnection *m_conn; + QList sendBuffer; }; QmlAdapterPrivate::QmlAdapterPrivate(DebuggerEngine *engine, QmlAdapter *q) : @@ -133,6 +136,16 @@ bool QmlAdapter::connectToViewer() return true; } +void QmlAdapter::sendMessage(const QByteArray &msg) +{ + if (d->m_qmlClient->status() == QDeclarativeDebugClient::Enabled) { + flushSendBuffer(); + d->m_qmlClient->sendMessage(msg); + } else { + d->sendBuffer.append(msg); + } +} + void QmlAdapter::connectionErrorOccurred(QAbstractSocket::SocketError socketError) { showConnectionErrorMessage(tr("Error: (%1) %2", "%1=error code, %2=error message") @@ -143,6 +156,19 @@ void QmlAdapter::connectionErrorOccurred(QAbstractSocket::SocketError socketErro emit connectionError(socketError); } +void QmlAdapter::clientStatusChanged(QDeclarativeDebugClient::Status status) +{ + QString serviceName; + if (QDeclarativeDebugClient *client = qobject_cast(sender())) { + serviceName = client->name(); + } + + logServiceStatusChange(serviceName, status); + + if (status == QDeclarativeDebugClient::Enabled) + flushSendBuffer(); +} + void QmlAdapter::connectionStateChanged() { switch (d->m_conn->state()) { @@ -165,6 +191,7 @@ void QmlAdapter::connectionStateChanged() if (!d->m_mainClient) { d->m_mainClient = new QDeclarativeEngineDebug(d->m_conn, this); + logServiceStatusChange(QLatin1String("QmlObserver"), static_cast(d->m_mainClient->status())); } createDebuggerClient(); @@ -185,11 +212,15 @@ void QmlAdapter::createDebuggerClient() { d->m_qmlClient = new Internal::QmlDebuggerClient(d->m_conn); + connect(d->m_qmlClient, SIGNAL(newStatus(QDeclarativeDebugClient::Status)), + this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status))); connect(d->m_engine.data(), SIGNAL(sendMessage(QByteArray)), - d->m_qmlClient, SLOT(slotSendMessage(QByteArray))); + this, SLOT(sendMessage(QByteArray))); connect(d->m_qmlClient, SIGNAL(messageWasReceived(QByteArray)), d->m_engine.data(), SLOT(messageReceived(QByteArray))); + logServiceStatusChange(d->m_qmlClient->name(), d->m_qmlClient->status()); + //engine->startSuccessful(); // FIXME: AAA: port to new debugger states } @@ -237,4 +268,33 @@ void QmlAdapter::setConnectionAttemptInterval(int interval) d->m_connectionTimer->setInterval(interval); } +void QmlAdapter::logServiceStatusChange(const QString &service, QDeclarativeDebugClient::Status newStatus) +{ + switch (newStatus) { + case QDeclarativeDebugClient::Unavailable: { + showConnectionErrorMessage(tr("Error: Cannot connect to debug service '%1'. Debugging functionality will be limited.").arg(service)); + emit serviceConnectionError(service); + break; + } + case QDeclarativeDebugClient::Enabled: { + showConnectionStatusMessage(tr("Connected to debug service '%1'.").arg(service)); + break; + } + + case QDeclarativeDebugClient::NotConnected: { + showConnectionStatusMessage(tr("Not connected to debug service '%1'.").arg(service)); + break; + } + } +} + +void QmlAdapter::flushSendBuffer() +{ + QTC_ASSERT(d->m_qmlClient->status() == QDeclarativeDebugClient::Enabled, return); + foreach (const QByteArray &msg, d->sendBuffer) { + d->m_qmlClient->sendMessage(msg); + } + d->sendBuffer.clear(); +} + } // namespace Debugger diff --git a/src/plugins/debugger/qml/qmladapter.h b/src/plugins/debugger/qml/qmladapter.h index 6118a05543f..64478569d7b 100644 --- a/src/plugins/debugger/qml/qmladapter.h +++ b/src/plugins/debugger/qml/qmladapter.h @@ -36,6 +36,7 @@ #include "debugger_global.h" #include +#include "qmldebuggerclient.h" namespace QmlJsDebugClient { class QDeclarativeEngineDebug; @@ -72,15 +73,19 @@ public: void setMaxConnectionAttempts(int maxAttempts); void setConnectionAttemptInterval(int interval); + void logServiceStatusChange(const QString &service, QDeclarativeDebugClient::Status newStatus); + signals: - void aboutToDisconnect(); void connected(); void disconnected(); void connectionStartupFailed(); void connectionError(QAbstractSocket::SocketError socketError); + void serviceConnectionError(const QString serviceName); private slots: + void sendMessage(const QByteArray &msg); void connectionErrorOccurred(QAbstractSocket::SocketError socketError); + void clientStatusChanged(QDeclarativeDebugClient::Status status); void connectionStateChanged(); void pollInferior(); @@ -89,6 +94,7 @@ private: void createDebuggerClient(); void showConnectionStatusMessage(const QString &message); void showConnectionErrorMessage(const QString &message); + void flushSendBuffer(); private: QScopedPointer d; diff --git a/src/plugins/debugger/qml/qmldebuggerclient.cpp b/src/plugins/debugger/qml/qmldebuggerclient.cpp index a4d852fb93c..99ebc0019c4 100644 --- a/src/plugins/debugger/qml/qmldebuggerclient.cpp +++ b/src/plugins/debugger/qml/qmldebuggerclient.cpp @@ -37,22 +37,21 @@ namespace Internal { QmlDebuggerClient::QmlDebuggerClient(QmlJsDebugClient::QDeclarativeDebugConnection* client) : QDeclarativeDebugClient(QLatin1String("JSDebugger"), client) { - setEnabled(true); } QmlDebuggerClient::~QmlDebuggerClient() { } +void QmlDebuggerClient::statusChanged(Status status) +{ + emit newStatus(status); +} + void QmlDebuggerClient::messageReceived(const QByteArray &data) { emit messageWasReceived(data); } -void QmlDebuggerClient::slotSendMessage(const QByteArray &message) -{ - QDeclarativeDebugClient::sendMessage(message); -} - } // Internal } // Debugger diff --git a/src/plugins/debugger/qml/qmldebuggerclient.h b/src/plugins/debugger/qml/qmldebuggerclient.h index 191e3570d52..2345a56d923 100644 --- a/src/plugins/debugger/qml/qmldebuggerclient.h +++ b/src/plugins/debugger/qml/qmldebuggerclient.h @@ -44,12 +44,11 @@ public: virtual ~QmlDebuggerClient(); signals: + void newStatus(QDeclarativeDebugClient::Status status); void messageWasReceived(const QByteArray &data); -private Q_SLOTS: - void slotSendMessage(const QByteArray &message); - protected: + virtual void statusChanged(Status status); virtual void messageReceived(const QByteArray &data); }; diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index be920e5dc9d..9e1599aedc1 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -218,6 +218,12 @@ void QmlEngine::connectionError(QAbstractSocket::SocketError socketError) plugin()->showMessage(tr("QML Debugger: Remote host closed connection."), StatusBar); } + +void QmlEngine::serviceConnectionError(const QString &serviceName) +{ + plugin()->showMessage(tr("QML Debugger: Couldn't connect to service '%1'.").arg(serviceName), StatusBar); +} + void QmlEngine::runEngine() { QTC_ASSERT(state() == EngineRunRequested, qDebug() << state()); @@ -327,6 +333,7 @@ void QmlEngine::setupEngine() d->m_adapter->setConnectionAttemptInterval(ConnectionAttemptDefaultInterval); connect(d->m_adapter, SIGNAL(connectionError(QAbstractSocket::SocketError)), SLOT(connectionError(QAbstractSocket::SocketError))); + connect(d->m_adapter, SIGNAL(serviceConnectionError(QString)), SLOT(serviceConnectionError(QString))); connect(d->m_adapter, SIGNAL(connected()), SLOT(connectionEstablished())); connect(d->m_adapter, SIGNAL(connectionStartupFailed()), SLOT(connectionStartupFailed())); @@ -659,9 +666,34 @@ void QmlEngine::messageReceived(const QByteArray &message) tr("

An Uncaught Exception occured in %1:

%2

") .arg(stackFrames.value(0).file, Qt::escape(error)); showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg); + } else { + // + // Make breakpoint non-pending + // + QString file; + int line = -1; + + if (!stackFrames.isEmpty()) { + file = stackFrames.at(0).file; + line = stackFrames.at(0).line; + + if (isShadowBuildProject()) { + file = fromShadowBuildFilename(file); + } + } + + Internal::BreakHandler *handler = breakHandler(); + for (int index = 0; index != handler->size(); ++index) { + Internal::BreakpointData *data = handler->at(index); + QString processedFilename = data->fileName; + + if (processedFilename == file + && data->lineNumber == line) { + data->pending = false; + data->updateMarker(); + } + } } - - } else if (command == "RESULT") { Internal::WatchData data; QByteArray iname; diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h index 6a4c9c639b2..d5087873cdd 100644 --- a/src/plugins/debugger/qml/qmlengine.h +++ b/src/plugins/debugger/qml/qmlengine.h @@ -118,6 +118,7 @@ private slots: void connectionEstablished(); void connectionStartupFailed(); void connectionError(QAbstractSocket::SocketError error); + void serviceConnectionError(const QString &service); private: void expandObject(const QByteArray &iname, quint64 objectId); diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 4b741898ecb..d05f9b12226 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -37,8 +37,9 @@ #include #include +#include #include -#include +#include #include #include #include @@ -282,9 +283,10 @@ static void addDeclaration(const Snapshot &snapshot, declaration += functionName; declaration += QLatin1String(";\n"); - InsertionPointLocator find(snapshot); - const InsertionLocation loc = find.methodDeclarationInClass( - fileName, cl, InsertionPointLocator::PrivateSlot); + CppTools::CppRefactoringChanges refactoring(snapshot); + CppTools::InsertionPointLocator find(&refactoring); + const CppTools::InsertionLocation loc = find.methodDeclarationInClass( + fileName, cl, CppTools::InsertionPointLocator::PrivateSlot); // //! \todo change this to use the Refactoring changes. diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 8ff9e454c2d..e0bbf7df805 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -2657,6 +2657,8 @@ EventResult FakeVimHandler::Private::handleInsertMode(const Input &input) enterCommandMode(); m_submode = NoSubMode; m_ctrlVActive = false; + m_opcount.clear(); + m_mvcount.clear(); } else if (m_ctrlVActive) { insertInInsertMode(input.raw()); } else if (input.isControl('v')) { diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 48f5c5a893d..9837b7c35a7 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -1922,6 +1923,67 @@ QString GitClient::readConfigValue(const QString &workingDirectory, const QStrin return readConfig(workingDirectory, QStringList(configVar)).remove(QLatin1Char('\n')); } +bool GitClient::cloneRepository(const QString &directory,const QByteArray &url) +{ + QDir workingDirectory(directory); + const unsigned flags = VCSBase::VCSBasePlugin::SshPasswordPrompt | + VCSBase::VCSBasePlugin::ShowStdOutInLogWindow| + VCSBase::VCSBasePlugin::ShowSuccessMessage; + + if (workingDirectory.exists()) { + if (!synchronousInit(workingDirectory.path())) + return false; + + QStringList arguments(QLatin1String("remote")); + arguments << QLatin1String("add") << QLatin1String("origin") << url; + if (!fullySynchronousGit(workingDirectory.path(), arguments, 0, 0, true)) + return false; + + arguments.clear(); + arguments << QLatin1String("fetch"); + const Utils::SynchronousProcessResponse resp = + synchronousGit(workingDirectory.path(), arguments, flags); + if (resp.result != Utils::SynchronousProcessResponse::Finished) + return false; + + arguments.clear(); + arguments << QLatin1String("config") + << QLatin1String("branch.master.remote") + << QLatin1String("origin"); + if (!fullySynchronousGit(workingDirectory.path(), arguments, 0, 0, true)) + return false; + + arguments.clear(); + arguments << QLatin1String("config") + << QLatin1String("branch.master.merge") + << QLatin1String("refs/heads/master"); + if (!fullySynchronousGit(workingDirectory.path(), arguments, 0, 0, true)) + return false; + + return true; + } else { + QStringList arguments(QLatin1String("clone")); + arguments << url << workingDirectory.dirName(); + workingDirectory.cdUp(); + const Utils::SynchronousProcessResponse resp = + synchronousGit(workingDirectory.path(), arguments, flags); + return resp.result == Utils::SynchronousProcessResponse::Finished; + } +} + +QString GitClient::vcsGetRepositoryURL(const QString &directory) +{ + QStringList arguments(QLatin1String("config")); + QByteArray outputText; + + arguments << QLatin1String("remote.origin.url"); + + if (fullySynchronousGit(directory, arguments, &outputText, 0, false)) { + return commandOutputFromLocal8Bit(outputText); + } + return QString(); +} + GitSettings GitClient::settings() const { return m_settings; diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index 9de98447889..828a4e09094 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -158,6 +158,8 @@ public: unsigned gitVersion(bool silent, QString *errorMessage = 0); QString gitVersionString(bool silent, QString *errorMessage = 0); + bool cloneRepository(const QString &directory, const QByteArray &url); + QString vcsGetRepositoryURL(const QString &directory); bool synchronousFetch(const QString &workingDirectory); bool synchronousPull(const QString &workingDirectory); bool synchronousPush(const QString &workingDirectory); diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp index 1a02f4a8a18..5014a8b20f8 100644 --- a/src/plugins/git/gitsubmiteditorwidget.cpp +++ b/src/plugins/git/gitsubmiteditorwidget.cpp @@ -34,10 +34,13 @@ #include #include +#include +#include #include #include #include +#include #include namespace Git { @@ -116,11 +119,19 @@ GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) : m_gitSubmitPanelUi.setupUi(m_gitSubmitPanel); insertTopWidget(m_gitSubmitPanel); new GitSubmitHighlighter(descriptionEdit()); + + m_emailValidator = new QRegExpValidator(QRegExp(QLatin1String("[^@ ]+@[^@ ]+\\.[a-zA-Z]+")), this); + + m_gitSubmitPanelUi.emailLineEdit->setValidator(m_emailValidator); + connect(m_gitSubmitPanelUi.authorLineEdit, SIGNAL(textChanged(QString)), + this, SLOT(authorInformationChanged())); + connect(m_gitSubmitPanelUi.emailLineEdit, SIGNAL(textChanged(QString)), + this, SLOT(authorInformationChanged())); } void GitSubmitEditorWidget::setPanelInfo(const GitSubmitEditorPanelInfo &info) { - m_gitSubmitPanelUi.repositoryLabel->setText(info.repository); + m_gitSubmitPanelUi.repositoryLabel->setText(QDir::toNativeSeparators(info.repository)); m_gitSubmitPanelUi.branchLabel->setText(info.branch); } @@ -136,6 +147,32 @@ void GitSubmitEditorWidget::setPanelData(const GitSubmitEditorPanelData &data) { m_gitSubmitPanelUi.authorLineEdit->setText(data.author); m_gitSubmitPanelUi.emailLineEdit->setText(data.email); + authorInformationChanged(); +} + +bool GitSubmitEditorWidget::canSubmit() const +{ + if (m_gitSubmitPanelUi.authorLineEdit->text().isEmpty() + || !emailIsValid()) + return false; + return SubmitEditorWidget::canSubmit(); +} + +void GitSubmitEditorWidget::authorInformationChanged() +{ + m_gitSubmitPanelUi.invalidAuthorLabel-> + setVisible(m_gitSubmitPanelUi.authorLineEdit->text().isEmpty()); + m_gitSubmitPanelUi.invalidEmailLabel-> + setVisible(!emailIsValid()); + + updateSubmitAction(); +} + +bool GitSubmitEditorWidget::emailIsValid() const +{ + int pos = m_gitSubmitPanelUi.emailLineEdit->cursorPosition(); + return m_emailValidator->validate(m_gitSubmitPanelUi.emailLineEdit->text(), pos) + == QValidator::Acceptable; } } // namespace Internal diff --git a/src/plugins/git/gitsubmiteditorwidget.h b/src/plugins/git/gitsubmiteditorwidget.h index 40d744641fd..64e4c5aac3c 100644 --- a/src/plugins/git/gitsubmiteditorwidget.h +++ b/src/plugins/git/gitsubmiteditorwidget.h @@ -31,8 +31,13 @@ #define GITSUBMITEDITORWIDGET_H #include "ui_gitsubmitpanel.h" + #include +QT_BEGIN_NAMESPACE +class QValidator; +QT_END_NAMESPACE + namespace Git { namespace Internal { @@ -49,6 +54,7 @@ struct GitSubmitEditorPanelData; class GitSubmitEditorWidget : public Utils::SubmitEditorWidget { + Q_OBJECT public: explicit GitSubmitEditorWidget(QWidget *parent = 0); @@ -59,9 +65,18 @@ public: void setPanelInfo(const GitSubmitEditorPanelInfo &info); +protected: + bool canSubmit() const; + +private slots: + void authorInformationChanged(); + private: + bool emailIsValid() const; + QWidget *m_gitSubmitPanel; Ui::GitSubmitPanel m_gitSubmitPanelUi; + QValidator *m_emailValidator; }; } // namespace Internal diff --git a/src/plugins/git/gitsubmitpanel.ui b/src/plugins/git/gitsubmitpanel.ui index 7dfa9b3ba0f..c790299aa11 100644 --- a/src/plugins/git/gitsubmitpanel.ui +++ b/src/plugins/git/gitsubmitpanel.ui @@ -6,8 +6,8 @@ 0 0 - 374 - 229 + 364 + 172 @@ -59,49 +59,96 @@ Commit Information - - - - - - - Author: - - - - - - - - - - Email: - - - - - - - + + + + + Author: + + - + + + + + 150 + 0 + + + + + + + + + 20 + 20 + + + + + + + :/projectexplorer/images/compile_error.png + + + + Qt::Horizontal + + QSizePolicy::MinimumExpanding + - 161 + 5 20 + + + + Email: + + + + + + + + 150 + 0 + + + + + + + + + 20 + 20 + + + + + + + :/projectexplorer/images/compile_error.png + + + - + + + diff --git a/src/plugins/git/gitversioncontrol.cpp b/src/plugins/git/gitversioncontrol.cpp index 370e20bb270..ad6cc63c2da 100644 --- a/src/plugins/git/gitversioncontrol.cpp +++ b/src/plugins/git/gitversioncontrol.cpp @@ -87,6 +87,10 @@ bool GitVersionControl::supportsOperation(Operation operation) const case AnnotateOperation: rc = true; break; + case CheckoutOperation: + case GetRepositoryRootOperation: + rc = true; + break; } return rc; } @@ -121,6 +125,17 @@ bool GitVersionControl::vcsCreateRepository(const QString &directory) { return gitClient()->synchronousInit(directory); } + +bool GitVersionControl::vcsCheckout(const QString &directory, const QByteArray &url) +{ + return gitClient()->cloneRepository(directory,url); +} + +QString GitVersionControl::vcsGetRepositoryURL(const QString &directory) +{ + return gitClient()->vcsGetRepositoryURL(directory); +} + /* Snapshots are implement using stashes, relying on stash messages for * naming as the actual stash names (stash{n}) are rotated as one adds stashes. * Note that the snapshot interface does not care whether we have an unmodified diff --git a/src/plugins/git/gitversioncontrol.h b/src/plugins/git/gitversioncontrol.h index 35504747a7c..0d7276a392d 100644 --- a/src/plugins/git/gitversioncontrol.h +++ b/src/plugins/git/gitversioncontrol.h @@ -54,6 +54,8 @@ public: virtual bool vcsDelete(const QString &filename); virtual bool vcsMove(const QString &from, const QString &to); virtual bool vcsCreateRepository(const QString &directory); + virtual bool vcsCheckout(const QString &directory, const QByteArray &url); + virtual QString vcsGetRepositoryURL(const QString &directory); virtual QString vcsCreateSnapshot(const QString &topLevel); virtual QStringList vcsSnapshots(const QString &topLevel); virtual bool vcsRestoreSnapshot(const QString &topLevel, const QString &name); diff --git a/src/plugins/help/generalsettingspage.ui b/src/plugins/help/generalsettingspage.ui index 0bcd55ef5e7..2a49b659828 100644 --- a/src/plugins/help/generalsettingspage.ui +++ b/src/plugins/help/generalsettingspage.ui @@ -368,7 +368,7 @@ Switch to editor context after last help page is closed. - Return to editor on closing the last page + Return to editor on closing the last page diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 55438fa64c1..043e3ed2d44 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -73,6 +73,7 @@ #include #include #include +#include #include #include @@ -839,19 +840,49 @@ void HelpPlugin::activateContext() "available.").arg(m_idFromContext)); viewer->setSource(QUrl()); } else { - const QUrl &source = *links.begin(); + int version = 0; + const QRegExp exp("(\\d+)"); + QUrl source = *links.begin(); + const QLatin1String qtRefDoc = QLatin1String("com.trolltech.qt"); + + // workaround to show the latest qt version + foreach (const QUrl &tmp, links) { + const QString &authority = tmp.authority(); + if (authority.startsWith(qtRefDoc)) { + if (exp.indexIn(authority) >= 0) { + const int tmpVersion = exp.cap(1).toInt(); + if (tmpVersion > version) { + source = tmp; + version = tmpVersion; + } + } + } + } + const QUrl &oldSource = viewer->source(); if (source != oldSource) { #if !defined(QT_NO_WEBKIT) viewer->stop(); #endif - viewer->setSource(source); - connect(viewer, SIGNAL(loadFinished(bool)), this, - SLOT(highlightSearchTerms())); + const QString &fragment = source.fragment(); + const bool isQtRefDoc = source.authority().startsWith(qtRefDoc); + if (isQtRefDoc) { + // workaround for qt properties + m_idFromContext = fragment; - if (source.toString().remove(source.fragment()) - == oldSource.toString().remove(oldSource.fragment())) { + if (!m_idFromContext.isEmpty()) { + connect(viewer, SIGNAL(loadFinished(bool)), this, + SLOT(highlightSearchTerms())); + } + } + + viewer->setSource(source); + + if (isQtRefDoc && !m_idFromContext.isEmpty()) { + if (source.toString().remove(fragment) + == oldSource.toString().remove(oldSource.fragment())) { highlightSearchTerms(); + } } } else { #if !defined(QT_NO_WEBKIT) @@ -1011,11 +1042,6 @@ void HelpPlugin::highlightSearchTerms() SLOT(highlightSearchTerms())); #if !defined(QT_NO_WEBKIT) - const QString &attrValue = m_idFromContext.mid(m_idFromContext - .lastIndexOf(QChar(':')) + 1); - if (attrValue.isEmpty()) - return; - const QWebElement &document = viewer->page()->mainFrame()->documentElement(); const QWebElementCollection &collection = document.findAll(QLatin1String("h3.fn a")); @@ -1031,14 +1057,15 @@ void HelpPlugin::highlightSearchTerms() parent.setStyleProperty(property, m_styleProperty); } - if (attrValue == name || name.startsWith(attrValue + QLatin1Char('-'))) { + if (m_idFromContext == name + || name.startsWith(m_idFromContext + QLatin1Char('-'))) { QWebElement parent = element.parent(); m_styleProperty = parent.styleProperty(property, QWebElement::ComputedStyle); parent.setStyleProperty(property, QLatin1String("yellow")); } } - m_oldAttrValue = attrValue; + m_oldAttrValue = m_idFromContext; #endif } } diff --git a/src/plugins/mercurial/mercurialclient.cpp b/src/plugins/mercurial/mercurialclient.cpp index 3cc71ca7aa0..68db76e2901 100644 --- a/src/plugins/mercurial/mercurialclient.cpp +++ b/src/plugins/mercurial/mercurialclient.cpp @@ -497,6 +497,64 @@ bool MercurialClient::pushSync(const QString &repositoryRoot, const QString &rep return resp.result == Utils::SynchronousProcessResponse::Finished; } +bool MercurialClient::clone(const QString &directory, const QString &url) +{ + QDir workingDirectory(directory); + QByteArray output; + const unsigned flags = VCSBase::VCSBasePlugin::SshPasswordPrompt | + VCSBase::VCSBasePlugin::ShowStdOutInLogWindow | + VCSBase::VCSBasePlugin::ShowSuccessMessage; + + if (workingDirectory.exists()) { + // Let's make first init + QStringList arguments(QLatin1String("init")); + if (!executeHgFullySynchronously(workingDirectory.path(), arguments, &output)) { + return false; + } + + // Then pull remote repository + arguments.clear(); + arguments << QLatin1String("pull") << url; + const Utils::SynchronousProcessResponse resp1 = + executeHgSynchronously(workingDirectory.path(), arguments, flags); + if (resp1.result != Utils::SynchronousProcessResponse::Finished) { + return false; + } + + // By now, there is no hgrc file -> create it + QFile hgrc(workingDirectory.path()+"/.hg/hgrc"); + hgrc.open(QIODevice::WriteOnly); + hgrc.write(QString("[paths]\ndefault = %1\n").arg(QString(url)).toUtf8()); + hgrc.close(); + + // And last update repository + arguments.clear(); + arguments << QLatin1String("update"); + const Utils::SynchronousProcessResponse resp2 = + executeHgSynchronously(workingDirectory.path(), arguments, flags); + return resp2.result == Utils::SynchronousProcessResponse::Finished; + } else { + QStringList arguments(QLatin1String("clone")); + arguments << url << workingDirectory.dirName(); + workingDirectory.cdUp(); + const Utils::SynchronousProcessResponse resp = + executeHgSynchronously(workingDirectory.path(), arguments, flags); + return resp.result == Utils::SynchronousProcessResponse::Finished; + } +} + +QString MercurialClient::vcsGetRepositoryURL(const QString &directory) +{ + QByteArray output; + + QStringList arguments(QLatin1String("showconfig")); + arguments << QLatin1String("paths.default"); + + if (executeHgFullySynchronously(directory, arguments, &output)) + return QString::fromLocal8Bit(output);; + return QString(); +} + void MercurialClient::incoming(const QString &repositoryRoot, const QString &repository) { QStringList args; diff --git a/src/plugins/mercurial/mercurialclient.h b/src/plugins/mercurial/mercurialclient.h index f6ea3a3d28b..8750d0fbb23 100644 --- a/src/plugins/mercurial/mercurialclient.h +++ b/src/plugins/mercurial/mercurialclient.h @@ -100,6 +100,8 @@ public: const QString &commiterInfo, const QString &commitMessageFile, bool autoAddRemove = false); + bool clone(const QString &directory, const QString &url); + QString vcsGetRepositoryURL(const QString &directory); static QString findTopLevelForFile(const QFileInfo &file); diff --git a/src/plugins/mercurial/mercurialcontrol.cpp b/src/plugins/mercurial/mercurialcontrol.cpp index 61342dc3507..dc84b9919b4 100644 --- a/src/plugins/mercurial/mercurialcontrol.cpp +++ b/src/plugins/mercurial/mercurialcontrol.cpp @@ -65,6 +65,8 @@ bool MercurialControl::supportsOperation(Operation operation) const case Core::IVersionControl::MoveOperation: case Core::IVersionControl::CreateRepositoryOperation: case Core::IVersionControl::AnnotateOperation: + case Core::IVersionControl::CheckoutOperation: + case Core::IVersionControl::GetRepositoryRootOperation: break; case Core::IVersionControl::OpenOperation: case Core::IVersionControl::SnapshotOperations: @@ -142,6 +144,16 @@ bool MercurialControl::sccManaged(const QString &filename) return mercurialClient->manifestSync(topLevel, topLevelDir.relativeFilePath(filename)); } +bool MercurialControl::vcsCheckout(const QString &directory, const QByteArray &url) +{ + return mercurialClient->clone(directory,url); +} + +QString MercurialControl::vcsGetRepositoryURL(const QString &directory) +{ + return mercurialClient->vcsGetRepositoryURL(directory); +} + void MercurialControl::changed(const QVariant &v) { switch (v.type()) { diff --git a/src/plugins/mercurial/mercurialcontrol.h b/src/plugins/mercurial/mercurialcontrol.h index b74fce99ff8..3f0465d380c 100644 --- a/src/plugins/mercurial/mercurialcontrol.h +++ b/src/plugins/mercurial/mercurialcontrol.h @@ -57,6 +57,8 @@ public: bool vcsDelete(const QString &filename); bool vcsMove(const QString &from, const QString &to); bool vcsCreateRepository(const QString &directory); + bool vcsCheckout(const QString &directory, const QByteArray &url); + QString vcsGetRepositoryURL(const QString &directory); QString vcsCreateSnapshot(const QString &topLevel); QStringList vcsSnapshots(const QString &topLevel); bool vcsRestoreSnapshot(const QString &topLevel, const QString &name); diff --git a/src/plugins/perforce/perforceversioncontrol.cpp b/src/plugins/perforce/perforceversioncontrol.cpp index 0f0a5e81905..8e755a960af 100644 --- a/src/plugins/perforce/perforceversioncontrol.cpp +++ b/src/plugins/perforce/perforceversioncontrol.cpp @@ -59,6 +59,8 @@ bool PerforceVersionControl::supportsOperation(Operation operation) const return true; case CreateRepositoryOperation: case SnapshotOperations: + case CheckoutOperation: + case GetRepositoryRootOperation: break; } return false; @@ -128,6 +130,16 @@ bool PerforceVersionControl::vcsAnnotate(const QString &file, int line) return true; } +bool PerforceVersionControl::vcsCheckout(const QString &,const QByteArray &) +{ + return false; +} + +QString PerforceVersionControl::vcsGetRepositoryURL(const QString &) +{ + return QString(); +} + bool PerforceVersionControl::managesDirectory(const QString &directory, QString *topLevel) const { const bool rc = m_plugin->managesDirectory(directory, topLevel); diff --git a/src/plugins/perforce/perforceversioncontrol.h b/src/plugins/perforce/perforceversioncontrol.h index b3a01f7a6c0..ed688d68503 100644 --- a/src/plugins/perforce/perforceversioncontrol.h +++ b/src/plugins/perforce/perforceversioncontrol.h @@ -55,6 +55,8 @@ public: virtual bool vcsDelete(const QString &filename); virtual bool vcsMove(const QString &from, const QString &to); virtual bool vcsCreateRepository(const QString &directory); + virtual bool vcsCheckout(const QString &directory, const QByteArray &url); + virtual QString vcsGetRepositoryURL(const QString &directory); virtual QString vcsCreateSnapshot(const QString &topLevel); virtual QStringList vcsSnapshots(const QString &topLevel); virtual bool vcsRestoreSnapshot(const QString &topLevel, const QString &name); diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 98d7db777b2..6cbc707d37b 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -38,20 +38,22 @@ SUBDIRS = plugin_coreplugin \ plugin_tasklist \ debugger/dumper.pro -contains(QT_CONFIG, declarative) { +include(../../qtcreator.pri) +contains(QT_CONFIG, declarative) { SUBDIRS += \ plugin_qmlprojectmanager \ plugin_qmljsinspector include(../private_headers.pri) exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) { - isEqual(QT_MINOR_VERSION, 7):greaterThan(QT_PATCH_VERSION, 0) { + + minQtVersion(4, 7, 1) { SUBDIRS += plugin_qmldesigner } else { warning() warning("QmlDesigner plugin has been disabled.") - warning("Qt Version has to be 4.7.x with x > 0") + warning("QmlDesigner requires Qt 4.7.1 or later.") } } else { warning() diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp index b3feff908bf..dbc6878f520 100644 --- a/src/plugins/projectexplorer/customwizard/customwizard.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp @@ -148,7 +148,7 @@ static inline bool createFile(Internal::CustomWizardFile cwFile, const QString sourcePath = sourceDirectory + slash + cwFile.source; // Field replacement on target path Internal::CustomWizardContext::replaceFields(fm, &cwFile.target); - const QString targetPath = QDir::toNativeSeparators(targetDirectory + slash + cwFile.target); + const QString targetPath = targetDirectory + slash + cwFile.target; if (CustomWizardPrivate::verbose) qDebug() << "generating " << targetPath << sourcePath << fm; @@ -533,7 +533,8 @@ bool CustomProjectWizard::postGenerateOpen(const Core::GeneratedFiles &l, QStrin if (file.attributes() & Core::GeneratedFile::OpenProjectAttribute) { if (!ProjectExplorer::ProjectExplorerPlugin::instance()->openProject(file.path())) { if (errorMessage) - *errorMessage = tr("The project %1 could not be opened.").arg(file.path()); + *errorMessage = tr("The project %1 could not be opened."). + arg(QDir::toNativeSeparators(file.path())); return false; } } diff --git a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp index 72f91696429..f650f832bdc 100644 --- a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp @@ -184,7 +184,7 @@ Core::GeneratedFiles fileInfo.isAbsolute() ? token : (targetPath + QLatin1Char('/') + token); - file.setPath(QDir::toNativeSeparators(fullPath)); + file.setPath(fullPath); } } file.setAttributes(attributes); diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index 083e629863f..62339ae0f71 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -101,7 +101,7 @@ struct ProjectEntry { int compare(const ProjectEntry &rhs) const; ProjectNode *node; - QString nativeDirectory; // For matching against wizards' files, which are native. + QString directory; // For matching against wizards' files, which are native. QString fileName; QString baseName; Type type; @@ -116,13 +116,13 @@ ProjectEntry::ProjectEntry(ProjectNode *n) : baseName = fi.baseName(); if (fi.suffix() != QLatin1String("pro")) type = PriFile; - nativeDirectory = QDir::toNativeSeparators(fi.absolutePath()); + directory = fi.absolutePath(); } // Sort helper that sorts by base name and puts '*.pro' before '*.pri' int ProjectEntry::compare(const ProjectEntry &rhs) const { - if (const int drc = nativeDirectory.compare(rhs.nativeDirectory)) + if (const int drc = directory.compare(rhs.directory)) return drc; if (const int brc = baseName.compare(rhs.baseName)) return brc; @@ -140,7 +140,7 @@ inline bool operator<(const ProjectEntry &pe1, const ProjectEntry &pe2) QDebug operator<<(QDebug d, const ProjectEntry &e) { - d.nospace() << e.nativeDirectory << ' ' << e.fileName << ' ' << e.type; + d.nospace() << e.directory << ' ' << e.fileName << ' ' << e.type; return d; } @@ -212,7 +212,7 @@ static int findMatchingProject(const QList &projects, const int count = projects.size(); for (int p = 0; p < count; p++) { // Direct match or better match? (note that the wizards' files are native). - const QString &projectDirectory = projects.at(p).nativeDirectory; + const QString &projectDirectory = projects.at(p).directory; if (projectDirectory == commonPath) return p; if (projectDirectory.size() > bestMatchLength @@ -357,7 +357,7 @@ void ProjectFileWizardExtension::initProjectChoices(const QString &generatedProj for (ProjectEntryMap::const_iterator it = entryMap.constBegin(); it != cend; ++it) { m_context->projects.push_back(it.key()); projectChoices.push_back(it.key().fileName); - projectToolTips.push_back(it.key().nativeDirectory); + projectToolTips.push_back(QDir::toNativeSeparators(it.key().directory)); } m_context->page->setProjects(projectChoices); diff --git a/src/plugins/projectexplorer/sessiondialog.cpp b/src/plugins/projectexplorer/sessiondialog.cpp index fa5405cec19..b0978edb2ef 100644 --- a/src/plugins/projectexplorer/sessiondialog.cpp +++ b/src/plugins/projectexplorer/sessiondialog.cpp @@ -189,16 +189,17 @@ void SessionDialog::markItems() void SessionDialog::updateActions() { - bool isDefault = false; - bool isActive = false; - if (m_ui.sessionList->currentItem()) { - isDefault = (m_ui.sessionList->currentItem()->text() == QLatin1String("default")); - isActive = (m_ui.sessionList->currentItem()->text() == m_sessionManager->activeSession()); + bool isDefault = (m_ui.sessionList->currentItem()->text() == QLatin1String("default")); + bool isActive = (m_ui.sessionList->currentItem()->text() == m_sessionManager->activeSession()); + m_ui.btDelete->setEnabled(!isActive && !isDefault); + m_ui.btRename->setEnabled(!isDefault); + } else { + m_ui.btDelete->setEnabled(false); + m_ui.btRename->setEnabled(false); + m_ui.btClone->setEnabled(false); + m_ui.btSwitch->setEnabled(false); } - - m_ui.btDelete->setDisabled(isActive || isDefault); - m_ui.btRename->setDisabled(isDefault); } void SessionDialog::createNew() @@ -262,11 +263,9 @@ void SessionDialog::rename() void SessionDialog::switchToSession() { - if (m_ui.sessionList->currentItem()) { - QString session = m_ui.sessionList->currentItem()->text(); - m_sessionManager->loadSession(session); - markItems(); - } + QString session = m_ui.sessionList->currentItem()->text(); + m_sessionManager->loadSession(session); + markItems(); updateActions(); } diff --git a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp index efd1eab8a18..917f7ebf5fe 100644 --- a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp @@ -93,7 +93,8 @@ bool AbstractFormEditorTool::topSelectedItemIsMovable(const QListqmlItemNode()) - && !formEditorItem->qmlItemNode().isRootNode() + && formEditorItem->qmlItemNode().instanceIsMovable() + && !formEditorItem->qmlItemNode().instanceIsInPositioner() && (formEditorItem->qmlItemNode().hasShowContent())) return true; } @@ -101,7 +102,8 @@ bool AbstractFormEditorTool::topSelectedItemIsMovable(const QListqmlItemNode().isRootNode() + && formEditorItem->qmlItemNode().instanceIsMovable() + && !formEditorItem->qmlItemNode().instanceIsInPositioner() && selectedNodes.contains(formEditorItem->qmlItemNode())) return true; } diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp index cbe41a4ace5..6e0d7b8b24b 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp @@ -200,8 +200,8 @@ FormEditorItem *FormEditorScene::addFormEditorItem(const QmlItemNode &qmlItemNod QRectF sceneRect(qmlItemNode.instanceBoundingRect()); setSceneRect(sceneRect); - formLayerItem()->update(); - manipulatorLayerItem()->update(); + formLayerItem()->update(); + manipulatorLayerItem()->update(); } diff --git a/src/plugins/qmldesigner/components/formeditor/movetool.cpp b/src/plugins/qmldesigner/components/formeditor/movetool.cpp index ae76d6455f9..38da0a124b0 100644 --- a/src/plugins/qmldesigner/components/formeditor/movetool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/movetool.cpp @@ -322,10 +322,25 @@ FormEditorItem* MoveTool::containerFormEditorItem(const QList &i return 0; } +QList movalbeItems(const QList &itemList) +{ + QList filteredItemList(itemList); + + QMutableListIterator listIterator(filteredItemList); + while (listIterator.hasNext()) { + FormEditorItem *item = listIterator.next(); + if (!item->qmlItemNode().isValid() || !item->qmlItemNode().instanceIsMovable() || item->qmlItemNode().instanceIsInPositioner()) + listIterator.remove(); + } + + return filteredItemList; +} QList MoveTool::movingItems(const QList &selectedItemList) { - FormEditorItem* ancestorItem = ancestorIfOtherItemsAreChild(selectedItemList); + QList filteredItemList = movalbeItems(selectedItemList); + + FormEditorItem* ancestorItem = ancestorIfOtherItemsAreChild(filteredItemList); if (ancestorItem != 0 && ancestorItem->qmlItemNode().isRootNode()) { // view()->changeToSelectionTool(); @@ -339,12 +354,12 @@ QList MoveTool::movingItems(const QList &selec return ancestorItemList; } - if (!haveSameParent(selectedItemList)) { + if (!haveSameParent(filteredItemList)) { // view()->changeToSelectionTool(); return QList(); } - return selectedItemList; + return filteredItemList; } void MoveTool::formEditorItemsChanged(const QList &itemList) diff --git a/src/plugins/qmldesigner/components/formeditor/resizeindicator.cpp b/src/plugins/qmldesigner/components/formeditor/resizeindicator.cpp index a1b5b56fcba..473618a664a 100644 --- a/src/plugins/qmldesigner/components/formeditor/resizeindicator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/resizeindicator.cpp @@ -72,11 +72,12 @@ void ResizeIndicator::setItems(const QList &itemList) foreach (FormEditorItem* item, itemList) { if (item - && item->qmlItemNode().isValid() - && item->qmlItemNode().isRootNode()) - continue; - ResizeController controller(m_layerItem, item); - m_itemControllerHash.insert(item, controller); + && item->qmlItemNode().isValid() + && item->qmlItemNode().instanceIsResizable() + && !item->qmlItemNode().instanceIsInPositioner()) { + ResizeController controller(m_layerItem, item); + m_itemControllerHash.insert(item, controller); + } } } diff --git a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp index 18804d88e44..1872d66fc05 100644 --- a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp @@ -101,18 +101,20 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType) FormEditorItem *formEditorItem = FormEditorItem::fromQGraphicsItem(item); if (formEditorItem - && formEditorItem->qmlItemNode().isValid() - && m_beginFormEditorItem->childItems().contains(formEditorItem) - && !formEditorItem->qmlItemNode().isRootNode()) + && formEditorItem->qmlItemNode().isValid() + && m_beginFormEditorItem->childItems().contains(formEditorItem) + && formEditorItem->qmlItemNode().instanceIsMovable() + && !formEditorItem->qmlItemNode().instanceIsInPositioner()) { newNodeList.append(formEditorItem->qmlItemNode()); } } if (newNodeList.isEmpty() - && m_beginFormEditorItem->qmlItemNode().isValid() - && !m_beginFormEditorItem->qmlItemNode().isRootNode()) - newNodeList.append(m_beginFormEditorItem->qmlItemNode()); + && m_beginFormEditorItem->qmlItemNode().isValid() + && m_beginFormEditorItem->qmlItemNode().instanceIsMovable() + && !m_beginFormEditorItem->qmlItemNode().instanceIsInPositioner()) + newNodeList.append(m_beginFormEditorItem->qmlItemNode()); QList nodeList; diff --git a/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp b/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp index e5c12648f95..2dcda48f20e 100644 --- a/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp @@ -85,7 +85,7 @@ void SelectionIndicator::setItems(const QList &itemList) clear(); foreach (FormEditorItem *item, itemList) { - if (item->qmlItemNode().isValid()) + if (!item->qmlItemNode().isValid()) continue; QGraphicsPolygonItem *newSelectionIndicatorGraphicsItem = new QGraphicsPolygonItem(m_layerItem.data()); diff --git a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp index 787fedef094..5fc65decf03 100644 --- a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp @@ -145,7 +145,8 @@ void SelectionTool::hoverMoveEvent(const QList &itemList, if (formEditorItem && formEditorItem->qmlItemNode().isValid() - && !formEditorItem->qmlItemNode().isRootNode() + && !formEditorItem->qmlItemNode().instanceIsInPositioner() + && formEditorItem->qmlItemNode().instanceIsMovable() && (formEditorItem->qmlItemNode().hasShowContent() || !m_selectOnlyContentItems)) { topSelectableItem = formEditorItem; diff --git a/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.cpp b/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.cpp index cc38edb07ea..3fc09240b80 100644 --- a/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.cpp @@ -81,7 +81,8 @@ void SingleSelectionManipulator::select(SelectionType selectionType, bool select if (formEditorItem && formEditorItem->qmlItemNode().isValid() - && !formEditorItem->qmlItemNode().isRootNode() + && formEditorItem->qmlItemNode().instanceIsMovable() + && !formEditorItem->qmlItemNode().instanceIsInPositioner() && (formEditorItem->qmlItemNode().hasShowContent() || !selectOnlyContentItems)) { selectedNode = formEditorItem->qmlItemNode(); diff --git a/src/plugins/qmldesigner/components/integration/componentview.cpp b/src/plugins/qmldesigner/components/integration/componentview.cpp index 4967fe8b3d4..f3e99da2da2 100644 --- a/src/plugins/qmldesigner/components/integration/componentview.cpp +++ b/src/plugins/qmldesigner/components/integration/componentview.cpp @@ -109,7 +109,7 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node) foreach (const ModelNode &childNode, nodeList) { - if (childNode.type() == "Qt/Component") { + if (childNode.type() == "QtQuick/Component") { if (!childNode.id().isEmpty()) { QStandardItem *item = new QStandardItem(childNode.id()); item->setData(QVariant::fromValue(childNode), ModelNodeRole); diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp index 67daf39827e..facc5814839 100644 --- a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp @@ -269,7 +269,7 @@ QList DesignDocumentController::loadMaster(QPlainTextEdit * //m_d->masterModel = Model::create(m_d->textModifier, m_d->searchPath, errors); - m_d->masterModel = Model::create("Qt/Rectangle", 4, 7); + m_d->masterModel = Model::create("QtQick/Rectangle", 4, 7); #if defined(VIEWLOGGER) m_d->viewLogger = new Internal::ViewLogger(m_d->model.data()); @@ -278,7 +278,7 @@ QList DesignDocumentController::loadMaster(QPlainTextEdit * m_d->masterModel->setFileUrl(m_d->searchPath); - m_d->subComponentModel = Model::create("Qt/Rectangle", 4, 7); + m_d->subComponentModel = Model::create("QtQuick/Rectangle", 4, 7); m_d->subComponentModel->setFileUrl(m_d->searchPath); m_d->subComponentManager = new SubComponentManager(m_d->masterModel->metaInfo(), this); @@ -468,7 +468,7 @@ void DesignDocumentController::deleteSelected() void DesignDocumentController::copySelected() { - QScopedPointer model(Model::create("Qt/Rectangle")); + QScopedPointer model(Model::create("QtQuick/Rectangle")); model->setMetaInfo(m_d->model->metaInfo()); model->setFileUrl(m_d->model->fileUrl()); foreach (const Import &import, m_d->model->imports()) @@ -514,7 +514,7 @@ void DesignDocumentController::copySelected() foreach (ModelNode node, view.rootModelNode().allDirectSubModelNodes()) { node.destroy(); } - view.changeRootNodeType("Qt/Rectangle", 4, 7); + view.changeRootNodeType("QtQuick/Rectangle", 4, 7); view.rootModelNode().setId("designer__Selection"); foreach (const ModelNode &selectedNode, selectedNodes) { @@ -766,7 +766,7 @@ QString DesignDocumentController::contextHelpId() const QString helpId; if (!nodes.isEmpty()) { helpId = nodes.first().type(); - helpId.replace("Qt/", "QML."); + helpId.replace("QtQuick/", "QML."); } return helpId; diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp index 6e63157a2b7..c9d91523169 100644 --- a/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp @@ -107,7 +107,7 @@ void DesignDocumentControllerView::fromClipboard() QString DesignDocumentControllerView::toText() const { - QScopedPointer outputModel(Model::create("Qt/Rectangle")); + QScopedPointer outputModel(Model::create("QtQuick/Rectangle")); outputModel->setMetaInfo(model()->metaInfo()); QPlainTextEdit textEdit; textEdit.setPlainText("import Qt 4.7; Item {}"); @@ -129,7 +129,7 @@ QString DesignDocumentControllerView::toText() const void DesignDocumentControllerView::fromText(QString text) { - QScopedPointer inputModel(Model::create("Qt/Rectangle")); + QScopedPointer inputModel(Model::create("QtQuick/Rectangle")); inputModel->setMetaInfo(model()->metaInfo()); inputModel->setFileUrl(model()->fileUrl()); QPlainTextEdit textEdit; diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index df08b21bda8..99a995e3b1d 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -297,10 +298,11 @@ void NavigatorTreeModel::handleChangedItem(QStandardItem *item) ItemRow itemRow = itemRowForNode(node); if (item == itemRow.idItem) { - try { - node.setId(item->text()); - } catch (InvalidIdException &e) { - QMessageBox::warning(0, tr("Invalid Id"), e.description()); + if (node.isValidId(item->text())) { + if (node.view()->rewriterView()) + node.view()->rewriterView()->renameId(node.id(), item->text()); + } else { + QMessageBox::warning(0, tr("Invalid Id"), item->text() + tr(" is an invalid id")); item->setText(node.id()); } } else if (item == itemRow.visibilityItem) { @@ -349,7 +351,7 @@ void NavigatorTreeModel::setView(AbstractView *view) m_view = view; m_hiddenProperties.clear(); if (view) { - ModelNode sampleItemNode(m_view->createModelNode("Qt/Item", 4, 7)); + ModelNode sampleItemNode(m_view->createModelNode("QtQuick/Item", 4, 7)); m_hiddenProperties << visibleProperties(sampleItemNode); addSubTree(view->rootModelNode()); } diff --git a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp index 3bd5ca8023c..64e03b0dc2b 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp @@ -806,13 +806,13 @@ void GradientLine::updateGradient() modelNode.removeProperty(m_gradientName); } - ModelNode gradientNode = modelNode.view()->createModelNode("Qt/Gradient", 4, 7); + ModelNode gradientNode = modelNode.view()->createModelNode("QtQuick/Gradient", 4, 7); if (!oldId.isNull()) gradientNode.setId(oldId); for (int i = 0;i < m_stops.size(); i++) { - ModelNode gradientStopNode = modelNode.view()->createModelNode("Qt/GradientStop", 4, 7); + ModelNode gradientStopNode = modelNode.view()->createModelNode("QtQuick/GradientStop", 4, 7); gradientStopNode.variantProperty("position") = roundReal(m_stops.at(i)); gradientStopNode.variantProperty("color") = normalizeColor(m_colorList.at(i)); gradientNode.nodeListProperty("stops").reparentHere(gradientStopNode); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index 47a2aae2c55..24832155730 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -43,6 +43,7 @@ #include #include +#include #include "propertyeditorvalue.h" #include "basiclayouts.h" @@ -309,7 +310,7 @@ PropertyEditor::~PropertyEditor() void PropertyEditor::setupPane(const QString &typeName) { - QUrl qmlFile = fileToUrl(locateQmlFile(QLatin1String("Qt/ItemPane.qml"))); + QUrl qmlFile = fileToUrl(locateQmlFile(QLatin1String("QtQuick/ItemPane.qml"))); QUrl qmlSpecificsFile; qmlSpecificsFile = fileToUrl(locateQmlFile(typeName + "Specifics.qml")); @@ -354,13 +355,13 @@ void PropertyEditor::changeValue(const QString &propertyName) PropertyEditorValue *value = qobject_cast(QDeclarativeMetaType::toQObject(m_currentType->m_backendValuesPropertyMap.value(propertyName))); const QString newId = value->value().toString(); - try { - m_selectedNode.setId(newId); - } catch (InvalidIdException &e) { + if (m_selectedNode.isValidId(newId)) { + if (rewriterView()) + rewriterView()->renameId(m_selectedNode.id(), newId); + } else { value->setValue(m_selectedNode.id()); - QMessageBox::warning(0, tr("Invalid Id"), e.description()); + QMessageBox::warning(0, tr("Invalid Id"), newId + tr(" is an invalid id")); } - return; } @@ -576,7 +577,7 @@ QString templateGeneration(NodeMetaInfo type, NodeMetaInfo superType, const QmlO "DoubleSpinBoxAlternate {\ntext: \"%1\"\nbackendValue: backendValues.%2\nbaseStateFlag: isBaseState\n}\n" )).arg(name).arg(properName); } - if (typeName == "string") { + if (typeName == "string" || typeName == "QString" || typeName =="url" || typeName =="QUrl") { qmlTemplate += QString(QLatin1String( "QWidget {\nlayout: HorizontalLayout {\nLabel {\ntext: \"%1\"\ntoolTip: \"%1\"\n}\nLineEdit {\nbackendValue: backendValues.%2\nbaseStateFlag: isBaseState\n}\n}\n}\n" )).arg(name).arg(properName); @@ -715,10 +716,10 @@ void PropertyEditor::modelAttached(Model *model) m_locked = true; - setupPane("Qt/Rectangle"); - setupPane("Qt/Text"); - setupPane("Qt/TextInput"); - setupPane("Qt/TextEdit"); + setupPane("QtQuick/Rectangle"); + setupPane("QtQuick/Text"); + setupPane("QtQuick/TextInput"); + setupPane("QtQuick/TextEdit"); resetView(); m_locked = false; @@ -894,7 +895,7 @@ QUrl PropertyEditor::qmlForNode(const ModelNode &modelNode, QString &className) } } } - return fileToUrl(QDir(m_qmlDir).filePath("Qt/emptyPane.qml")); + return fileToUrl(QDir(m_qmlDir).filePath("QtQuick/emptyPane.qml")); } QString PropertyEditor::locateQmlFile(const QString &relativePath) const diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp index 2206ba8fa68..8c20d615734 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp @@ -30,9 +30,11 @@ #include "stateseditorview.h" #include "stateseditormodel.h" #include +#include #include #include +#include #include #include @@ -78,8 +80,13 @@ void StatesEditorView::setCurrentStateSilent(int index) m_settingSilentState = false; return; } + + nodeInstanceView()->setBlockStatePropertyChanges(true); + QmlModelView::activateState(state); + nodeInstanceView()->setBlockStatePropertyChanges(false); + m_settingSilentState = false; } @@ -109,7 +116,12 @@ void StatesEditorView::createState(const QString &name) if (debug) qDebug() << __FUNCTION__ << name; - stateRootNode().states().addState(name); + try { + model()->addImport(Import::createLibraryImport("QtQuick", "1.0")); + stateRootNode().states().addState(name); + } catch (RewritingException &e) { + QMessageBox::warning(0, "Error", e.description()); + } } void StatesEditorView::removeState(int index) @@ -123,14 +135,18 @@ void StatesEditorView::removeState(int index) setCurrentState(0); - m_thumbnailsToUpdate.removeAt(index); - m_modelStates.removeAll(state); - state.destroy(); + try { + m_modelStates.removeAll(state); + state.destroy(); + m_thumbnailsToUpdate.removeAt(index); - m_editorModel->removeState(index); + m_editorModel->removeState(index); - int newIndex = (index < m_modelStates.count()) ? index : m_modelStates.count() - 1; - setCurrentState(newIndex); + int newIndex = (index < m_modelStates.count()) ? index : m_modelStates.count() - 1; + setCurrentState(newIndex); + } catch (RewritingException &e) { + QMessageBox::warning(0, "Error", e.description()); + } } void StatesEditorView::renameState(int index, const QString &newName) @@ -141,12 +157,17 @@ void StatesEditorView::renameState(int index, const QString &newName) Q_ASSERT(index > 0 && index < m_modelStates.size()); QmlModelState state = m_modelStates.at(index); Q_ASSERT(state.isValid()); - if (state.name() != newName) { - // Jump to base state for the change - QmlModelState oldState = currentState(); - setCurrentStateSilent(0); - state.setName(newName); - setCurrentState(m_modelStates.indexOf(oldState)); + + try { + if (state.name() != newName) { + // Jump to base state for the change + QmlModelState oldState = currentState(); + setCurrentStateSilent(0); + state.setName(newName); + setCurrentState(m_modelStates.indexOf(oldState)); + } + } catch (RewritingException &e) { + QMessageBox::warning(0, "Error", e.description()); } } diff --git a/src/plugins/qmldesigner/designercore/designercore.pri b/src/plugins/qmldesigner/designercore/designercore.pri index 81674e0eb05..885e6cb2ea0 100644 --- a/src/plugins/qmldesigner/designercore/designercore.pri +++ b/src/plugins/qmldesigner/designercore/designercore.pri @@ -94,7 +94,8 @@ SOURCES += $$PWD/model/abstractview.cpp \ $$PWD/exceptions/rewritingexception.cpp \ $$PWD/instances/nodeinstancemetaobject.cpp \ $$PWD/instances/behaviornodeinstance.cpp \ - $$PWD/instances/nodeinstancesignalspy.cpp + $$PWD/instances/nodeinstancesignalspy.cpp \ + $$PWD/instances/positionernodeinstance.cpp HEADERS += $$PWD/include/corelib_global.h \ $$PWD/include/abstractview.h \ @@ -187,7 +188,8 @@ HEADERS += $$PWD/include/corelib_global.h \ $$PWD/include/rewritingexception.h \ $$PWD/instances/nodeinstancemetaobject.h \ $$PWD/instances/behaviornodeinstance.h \ - $$PWD/instances/nodeinstancesignalspy.h + $$PWD/instances/nodeinstancesignalspy.h \ + $$PWD/instances/positionernodeinstance.h contains(CONFIG, plugin) { # If core.pri has been included in the qmldesigner plugin diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h b/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h index 435ad6d7e92..6ff913eb73a 100644 --- a/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h +++ b/src/plugins/qmldesigner/designercore/filemanager/qmlrewriter.h @@ -77,7 +77,7 @@ protected: { return m_textModifier; } bool includeSurroundingWhitespace(int &start, int &end) const; - void includeLeadingEmptyLine(int &start) const; + void includeLeadingEmptyLine(int &start) const; static QmlJS::AST::UiObjectMemberList *searchMemberToInsertAfter(QmlJS::AST::UiObjectMemberList *members, const QStringList &propertyOrder); static QmlJS::AST::UiObjectMemberList *searchMemberToInsertAfter(QmlJS::AST::UiObjectMemberList *members, const QString &propertyName, const QStringList &propertyOrder); diff --git a/src/plugins/qmldesigner/designercore/include/abstractview.h b/src/plugins/qmldesigner/designercore/include/abstractview.h index 118ae560ac9..09016ea663c 100644 --- a/src/plugins/qmldesigner/designercore/include/abstractview.h +++ b/src/plugins/qmldesigner/designercore/include/abstractview.h @@ -55,6 +55,7 @@ namespace QmlDesigner { class QmlModelView; class NodeInstanceView; +class RewriterView; class CORESHARED_EXPORT AbstractView : public QObject { @@ -141,6 +142,7 @@ public: void changeRootNodeType(const QString &type, int majorVersion, int minorVersion); NodeInstanceView *nodeInstanceView() const; + RewriterView *rewriterView() const; protected: void setModel(Model * model); diff --git a/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h b/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h index 7c0f05de4c5..cf2f540581d 100644 --- a/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h +++ b/src/plugins/qmldesigner/designercore/include/basetexteditmodifier.h @@ -53,6 +53,8 @@ public: virtual int indentDepth() const; + virtual bool renameId(const QString &oldId, const QString &newId); + virtual QmlJS::Snapshot getSnapshot() const; virtual QStringList importPaths() const; }; diff --git a/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h b/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h index 4188007a6d6..f60219acfd1 100644 --- a/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h +++ b/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h @@ -61,6 +61,8 @@ public: virtual QmlJS::Snapshot getSnapshot() const; virtual QStringList importPaths() const; + virtual bool renameId(const QString & /* oldId */, const QString & /* newId */) { return false; } + public slots: void contentsChange(int position, int charsRemoved, int charsAdded); diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstance.h b/src/plugins/qmldesigner/designercore/include/nodeinstance.h index 20c13cab39f..0b5a223d38d 100644 --- a/src/plugins/qmldesigner/designercore/include/nodeinstance.h +++ b/src/plugins/qmldesigner/designercore/include/nodeinstance.h @@ -102,6 +102,7 @@ public: bool isQDeclarativeView() const; bool isGraphicsObject() const; bool isTransition() const; + bool isPositioner() const; bool equalGraphicsItem(QGraphicsItem *item) const; @@ -127,6 +128,9 @@ public: bool isValid() const; void makeInvalid(); bool hasContent() const; + bool isResizable() const; + bool isMovable() const; + bool isInPositioner() const; bool isWrappingThisObject(QObject *object) const; diff --git a/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h b/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h index 2d64599c151..e2e28c1a971 100644 --- a/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h +++ b/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h @@ -78,6 +78,8 @@ public: virtual QmlJS::Snapshot getSnapshot() const = 0; virtual QStringList importPaths() const = 0; + virtual bool renameId(const QString & /* oldId */, const QString & /* newId */) { return false; } + protected: QPlainTextEdit *plainTextEdit() const { return m_textEdit; } diff --git a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h index e197067c07c..5500f5eeb05 100644 --- a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h +++ b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h @@ -68,6 +68,9 @@ public: bool canReparent() const; bool instanceIsAnchoredBySibling() const; bool instanceIsAnchoredByChildren() const; + bool instanceIsMovable() const; + bool instanceIsResizable() const; + bool instanceIsInPositioner() const; QRectF instanceBoundingRect() const; QTransform instanceTransform() const; diff --git a/src/plugins/qmldesigner/designercore/include/rewriterview.h b/src/plugins/qmldesigner/designercore/include/rewriterview.h index 3b40ba0fcb9..dc488fa647a 100644 --- a/src/plugins/qmldesigner/designercore/include/rewriterview.h +++ b/src/plugins/qmldesigner/designercore/include/rewriterview.h @@ -78,6 +78,7 @@ public: public: Error(); Error(const QDeclarativeError &qmlError); + Error(const QString &shortDescription); Error(Exception *exception); Type type() const @@ -159,6 +160,8 @@ public: int firstDefinitionInsideLength(const ModelNode &node) const; bool modificationGroupActive(); + bool renameId(const QString& oldId, const QString& newId); + signals: void errorsChanged(const QList &errors); diff --git a/src/plugins/qmldesigner/designercore/include/textmodifier.h b/src/plugins/qmldesigner/designercore/include/textmodifier.h index affbaa4b298..241f0890c8f 100644 --- a/src/plugins/qmldesigner/designercore/include/textmodifier.h +++ b/src/plugins/qmldesigner/designercore/include/textmodifier.h @@ -87,6 +87,8 @@ public: virtual QmlJS::Snapshot getSnapshot() const = 0; virtual QStringList importPaths() const = 0; + virtual bool renameId(const QString &oldId, const QString &newId) = 0; + signals: void textChanged(); diff --git a/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.cpp index f654f198d10..65b15d4d130 100644 --- a/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.cpp +++ b/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.cpp @@ -40,7 +40,8 @@ namespace Internal { GraphicsObjectNodeInstance::GraphicsObjectNodeInstance(QGraphicsObject *graphicsObject, bool hasContent) : ObjectNodeInstance(graphicsObject), - m_hasContent(hasContent) + m_hasContent(hasContent), + m_isMovable(true) { } @@ -232,5 +233,16 @@ void GraphicsObjectNodeInstance::paintUpdate() { graphicsObject()->update(); } + +bool GraphicsObjectNodeInstance::isMovable() const +{ + return m_isMovable && graphicsObject() && graphicsObject()->parentItem(); +} + +void GraphicsObjectNodeInstance::setMovable(bool movable) +{ + m_isMovable = movable; +} + } // namespace Internal } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.h b/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.h index ab718a2c455..45200acd273 100644 --- a/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.h +++ b/src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.h @@ -74,12 +74,16 @@ public: void paintUpdate(); + bool isMovable() const; + void setMovable(bool movable); + protected: QGraphicsObject *graphicsObject() const; void paintRecursively(QGraphicsItem *graphicsItem, QPainter *painter) const; static QPair createGraphicsObject(const NodeMetaInfo &metaInfo, QDeclarativeContext *context); private: // variables bool m_hasContent; + bool m_isMovable; }; } // namespace Internal diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp index a1c97686fac..2cc7c2fc4d5 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp @@ -42,6 +42,7 @@ #include "componentnodeinstance.h" #include "qmltransitionnodeinstance.h" #include "qmlpropertychangesnodeinstance.h" +#include "positionernodeinstance.h" #include "behaviornodeinstance.h" #include "qmlstatenodeinstance.h" #include "nodeabstractproperty.h" @@ -136,29 +137,31 @@ Internal::ObjectNodeInstance::Pointer NodeInstance::createInstance(const NodeMet instance = Internal::DummyNodeInstance::create(); else if (metaInfo.isSubclassOf("QtWebKit/WebView", 1, 0)) instance = Internal::DummyNodeInstance::create(); - else if (metaInfo.isSubclassOf("Qt/QWidget", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/QWidget", 1, 0)) instance = Internal::DummyNodeInstance::create(); - else if (metaInfo.isSubclassOf("Qt/QGraphicsView", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/QGraphicsView", 1, 0)) instance = Internal::GraphicsViewNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/QDeclarativeView", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/QDeclarativeView", 1, 0)) instance = Internal::QDeclarativeViewNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/QGraphicsWidget", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/QGraphicsWidget", 1, 0)) instance = Internal::GraphicsWidgetNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/Item", 4, 7)) + else if (metaInfo.isSubclassOf("QDeclarativeBasePositioner", 1, 0)) + instance = Internal::PositionerNodeInstance::create(metaInfo, context, objectToBeWrapped); + else if (metaInfo.isSubclassOf("QtQuick/Item", 1, 0)) instance = Internal::QmlGraphicsItemNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/QGraphicsScene", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/QGraphicsScene", 1, 0)) instance = Internal::GraphicsSceneNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/Component", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/Component", 1, 0)) instance = Internal::ComponentNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/PropertyChanges", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/PropertyChanges", 1, 0)) instance = Internal::QmlPropertyChangesNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/State", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/State", 1, 0)) instance = Internal::QmlStateNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/Transition", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/Transition", 1, 0)) instance = Internal::QmlTransitionNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/Behavior", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/Behavior", 1, 0)) instance = Internal::BehaviorNodeInstance::create(metaInfo, context, objectToBeWrapped); - else if (metaInfo.isSubclassOf("Qt/QtObject", 4, 7)) + else if (metaInfo.isSubclassOf("QtQuick/QtObject", 1, 0)) instance = Internal::ObjectNodeInstance::create(metaInfo, context, objectToBeWrapped); else instance = Internal::DummyNodeInstance::create(); @@ -341,6 +344,11 @@ bool NodeInstance::isTransition() const return m_nodeInstance->isTransition(); } +bool NodeInstance::isPositioner() const +{ + return m_nodeInstance->isPositioner(); +} + /*! \brief Returns if the NodeInstance is a QGraphicsItem. \returns true if this NodeInstance is a QGraphicsItem @@ -460,6 +468,21 @@ bool NodeInstance::hasContent() const return m_nodeInstance->hasContent(); } +bool NodeInstance::isResizable() const +{ + return m_nodeInstance->isResizable(); +} + +bool NodeInstance::isMovable() const +{ + return m_nodeInstance->isMovable(); +} + +bool NodeInstance::isInPositioner() const +{ + return m_nodeInstance->isInPositioner(); +} + bool NodeInstance::hasAnchor(const QString &name) const { return m_nodeInstance->hasAnchor(name); diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index ae861675458..6f98f505363 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -189,7 +189,7 @@ void NodeInstanceView::resetInstanceProperty(const AbstractProperty &property) NodeInstance instance = instanceForNode(property.parentModelNode()); Q_ASSERT(instance.isValid()); const QString name = property.name(); - if (activeStateInstance().isValid() && !property.parentModelNode().metaInfo().isSubclassOf("PropertyChange", 4, 7)) { + if (activeStateInstance().isValid() && !property.parentModelNode().metaInfo().isSubclassOf("PropertyChange", 1, 0)) { bool statePropertyWasReseted = activeStateInstance().resetStateProperty(instance, name, instance.resetVariant(name)); if (!statePropertyWasReseted) instance.resetProperty(name); @@ -207,7 +207,7 @@ void NodeInstanceView::setInstancePropertyBinding(const BindingProperty &propert const QString expression = property.expression(); - if (activeStateInstance().isValid() && !property.parentModelNode().metaInfo().isSubclassOf("PropertyChange", 4, 7)) { + if (activeStateInstance().isValid() && !property.parentModelNode().metaInfo().isSubclassOf("PropertyChange", 1, 0)) { bool stateBindingWasUpdated = activeStateInstance().updateStateBinding(instance, name, expression); if (!stateBindingWasUpdated) { if (property.isDynamic()) @@ -243,7 +243,7 @@ void NodeInstanceView::setInstancePropertyVariant(const VariantProperty &propert const QVariant value = property.value(); - if (activeStateInstance().isValid() && !property.parentModelNode().metaInfo().isSubclassOf("PropertyChange", 4, 7)) { + if (activeStateInstance().isValid() && !property.parentModelNode().metaInfo().isSubclassOf("PropertyChange", 1, 0)) { bool stateValueWasUpdated = activeStateInstance().updateStateVariant(instance, name, value); if (!stateValueWasUpdated) { if (property.isDynamic()) @@ -390,6 +390,7 @@ void NodeInstanceView::instancePropertyChange(const QList &nodeList) { foreach (const ModelNode &node, nodeList) @@ -405,8 +406,11 @@ void NodeInstanceView::loadNodes(const QList &nodeList) instanceForNode(node).setPropertyBinding(property.name(), property.expression()); } - foreach(NodeInstance instance, m_objectInstanceHash.values()) - instance.doComponentComplete(); + QListIterator listIterator(nodeList); + listIterator.toBack(); + + while (listIterator.hasPrevious()) + instanceForNode(listIterator.previous()).doComponentComplete(); } // TODO: Set base state as current model state diff --git a/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp index 61701feb4b8..3937759fa25 100644 --- a/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp +++ b/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.cpp @@ -98,7 +98,8 @@ bool ChildrenChangeEventFilter::eventFilter(QObject * /*object*/, QEvent *event) ObjectNodeInstance::ObjectNodeInstance(QObject *object) : m_deleteHeldInstance(true), m_object(object), - m_metaObject(0) + m_metaObject(0), + m_isInPositioner(false) { } @@ -249,6 +250,11 @@ bool ObjectNodeInstance::isTransition() const return false; } +bool ObjectNodeInstance::isPositioner() const +{ + return false; +} + bool ObjectNodeInstance::equalGraphicsItem(QGraphicsItem * /*item*/) const { return false; @@ -795,6 +801,26 @@ bool ObjectNodeInstance::hasContent() const return false; } +bool ObjectNodeInstance::isResizable() const +{ + return false; +} + +bool ObjectNodeInstance::isMovable() const +{ + return false; +} + +bool ObjectNodeInstance::isInPositioner() const +{ + return m_isInPositioner; +} + +void ObjectNodeInstance::setInPositioner(bool isInPositioner) +{ + m_isInPositioner = isInPositioner; +} + void ObjectNodeInstance::updateAnchors() { } diff --git a/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.h b/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.h index 20718b3a9a1..f62963cf449 100644 --- a/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.h +++ b/src/plugins/qmldesigner/designercore/instances/objectnodeinstance.h @@ -117,6 +117,8 @@ public: virtual bool isQDeclarativeView() const; virtual bool isGraphicsObject() const; virtual bool isTransition() const; + virtual bool isPositioner() const; + virtual bool equalGraphicsItem(QGraphicsItem *item) const; @@ -165,6 +167,10 @@ public: QObject *object() const; virtual bool hasContent() const; + virtual bool isResizable() const; + virtual bool isMovable() const; + bool isInPositioner() const; + void setInPositioner(bool isInPositioner); bool hasBindingForProperty(const QString &name) const; @@ -207,6 +213,7 @@ private: QWeakPointer m_object; NodeInstanceMetaObject *m_metaObject; NodeInstanceSignalSpy m_signalSpy; + bool m_isInPositioner; }; diff --git a/src/plugins/qmldesigner/designercore/instances/positionernodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/positionernodeinstance.cpp new file mode 100644 index 00000000000..ecc8ee3e8f4 --- /dev/null +++ b/src/plugins/qmldesigner/designercore/instances/positionernodeinstance.cpp @@ -0,0 +1,65 @@ +#include "positionernodeinstance.h" +#include +#include + +namespace QmlDesigner { +namespace Internal { + +PositionerNodeInstance::PositionerNodeInstance(QDeclarativeBasePositioner *item, bool hasContent) + : QmlGraphicsItemNodeInstance(item, hasContent) +{ +} + +bool PositionerNodeInstance::isPositioner() const +{ + return true; +} + +bool PositionerNodeInstance::isResizable() const +{ + return false; +} + +void PositionerNodeInstance::setPropertyVariant(const QString &name, const QVariant &value) +{ + if (name == "move" || name == "add") + return; + + QmlGraphicsItemNodeInstance::setPropertyVariant(name, value); +} + +void PositionerNodeInstance::setPropertyBinding(const QString &name, const QString &expression) +{ + if (name == "move" || name == "add") + return; + + QmlGraphicsItemNodeInstance::setPropertyBinding(name, expression); +} + +PositionerNodeInstance::Pointer PositionerNodeInstance::create(const NodeMetaInfo &metaInfo, QDeclarativeContext *context, QObject *objectToBeWrapped) +{ + QPair objectPair; + + if (objectToBeWrapped) + objectPair = qMakePair(qobject_cast(objectToBeWrapped), false); + else + objectPair = GraphicsObjectNodeInstance::createGraphicsObject(metaInfo, context); + + QDeclarativeBasePositioner *positioner = dynamic_cast(objectPair.first); + + if (positioner == 0) + throw InvalidNodeInstanceException(__LINE__, __FUNCTION__, __FILE__); + + Pointer instance(new PositionerNodeInstance(positioner, objectPair.second)); + + static_cast(positioner)->classBegin(); + + if (objectToBeWrapped) + instance->setDeleteHeldInstance(false); // the object isn't owned + + instance->populateResetValueHash(); + + return instance; +} +} +} // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/instances/positionernodeinstance.h b/src/plugins/qmldesigner/designercore/instances/positionernodeinstance.h new file mode 100644 index 00000000000..628b0d16074 --- /dev/null +++ b/src/plugins/qmldesigner/designercore/instances/positionernodeinstance.h @@ -0,0 +1,36 @@ +#ifndef POSITIONERNODEINSTANCE_H +#define POSITIONERNODEINSTANCE_H + +#include "qmlgraphicsitemnodeinstance.h" + +QT_BEGIN_NAMESPACE +class QDeclarativeBasePositioner; +QT_END_NAMESPACE + +namespace QmlDesigner { +namespace Internal { + +class PositionerNodeInstance : public QmlGraphicsItemNodeInstance +{ +public: + typedef QSharedPointer Pointer; + typedef QWeakPointer WeakPointer; + + static Pointer create(const NodeMetaInfo &metaInfo, QDeclarativeContext *context, QObject *objectToBeWrapped); + + void setPropertyVariant(const QString &name, const QVariant &value); + void setPropertyBinding(const QString &name, const QString &expression); + + bool isPositioner() const; + + bool isResizable() const; + + +protected: + PositionerNodeInstance(QDeclarativeBasePositioner *item, bool hasContent); +}; + +} // namespace Internal +} // namespace QmlDesigner + +#endif // POSITIONERNODEINSTANCE_H diff --git a/src/plugins/qmldesigner/designercore/instances/proxywidgetnodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/proxywidgetnodeinstance.cpp index ecb5ec5ae12..732502e7a99 100644 --- a/src/plugins/qmldesigner/designercore/instances/proxywidgetnodeinstance.cpp +++ b/src/plugins/qmldesigner/designercore/instances/proxywidgetnodeinstance.cpp @@ -44,7 +44,7 @@ ProxyWidgetNodeInstance::ProxyWidgetNodeInstance(QGraphicsProxyWidget *widget) ProxyWidgetNodeInstance::Pointer ProxyWidgetNodeInstance::create(const QString &typeName) { - QObject *object = QDeclarativeMetaType::qmlType(typeName.toLatin1(), 4, 7)->create(); + QObject *object = QDeclarativeMetaType::qmlType(typeName.toLatin1(), 1, 0)->create(); Q_ASSERT(object); if (object == 0) return Pointer(); diff --git a/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.cpp index 671e5b7c949..524da7551a4 100644 --- a/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.cpp +++ b/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.cpp @@ -45,6 +45,8 @@ #include #include #include +#include + #include @@ -56,7 +58,8 @@ namespace Internal { QmlGraphicsItemNodeInstance::QmlGraphicsItemNodeInstance(QDeclarativeItem *item, bool hasContent) : GraphicsObjectNodeInstance(item, hasContent), m_hasHeight(false), - m_hasWidth(false) + m_hasWidth(false), + m_isResizable(true) { } @@ -80,6 +83,9 @@ QmlGraphicsItemNodeInstance::Pointer QmlGraphicsItemNodeInstance::create(const N Pointer instance(new QmlGraphicsItemNodeInstance(qmlGraphicsItem, objectPair.second)); + if (qmlGraphicsItem->inherits("QDeclarativeText")) + instance->setResizable(false); + static_cast(qmlGraphicsItem)->classBegin(); if (objectToBeWrapped) @@ -223,6 +229,8 @@ void QmlGraphicsItemNodeInstance::setPropertyVariant(const QString &name, const } GraphicsObjectNodeInstance::setPropertyVariant(name, value); + + refresh(); } void QmlGraphicsItemNodeInstance::setPropertyBinding(const QString &name, const QString &expression) @@ -288,6 +296,24 @@ void QmlGraphicsItemNodeInstance::resetVertical() setPropertyVariant("height", qmlGraphicsItem()->implicitHeight()); } +static void repositioning(QDeclarativeItem *item) +{ + if (!item) + return; + +// QDeclarativeBasePositioner *positioner = qobject_cast(item); +// if (positioner) +// positioner->rePositioning(); + + if (item->parentObject()) + repositioning(qobject_cast(item->parentObject())); +} + +void QmlGraphicsItemNodeInstance::refresh() +{ + repositioning(qmlGraphicsItem()); +} + void QmlGraphicsItemNodeInstance::doComponentComplete() { if (qmlGraphicsItem()) { @@ -297,6 +323,16 @@ void QmlGraphicsItemNodeInstance::doComponentComplete() } } +bool QmlGraphicsItemNodeInstance::isResizable() const +{ + return m_isResizable && qmlGraphicsItem() && qmlGraphicsItem()->parentItem(); +} + +void QmlGraphicsItemNodeInstance::setResizable(bool resizeable) +{ + m_isResizable = resizeable; +} + int QmlGraphicsItemNodeInstance::penWidth() const { QDeclarativeRectangle *rectangle = qobject_cast(object()); @@ -350,7 +386,19 @@ void QmlGraphicsItemNodeInstance::resetProperty(const QString &name) void QmlGraphicsItemNodeInstance::reparent(const NodeInstance &oldParentInstance, const QString &oldParentProperty, const NodeInstance &newParentInstance, const QString &newParentProperty) { + if (oldParentInstance.isValid() && oldParentInstance.isPositioner()) { + setInPositioner(false); + setMovable(true); + } + GraphicsObjectNodeInstance::reparent(oldParentInstance, oldParentProperty, newParentInstance, newParentProperty); + + if (newParentInstance.isValid() && newParentInstance.isPositioner()) { + setInPositioner(true); + setMovable(false); + } + + refresh(); } //void QmlGraphicsItemNodeInstance::updateAnchors() diff --git a/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.h b/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.h index 96db456ab98..9aa68547e99 100644 --- a/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.h +++ b/src/plugins/qmldesigner/designercore/instances/qmlgraphicsitemnodeinstance.h @@ -70,16 +70,22 @@ public: bool isAnchoredByChildren() const; void doComponentComplete(); + bool isResizable() const; + void setResizable(bool resizeable); + protected: QmlGraphicsItemNodeInstance(QDeclarativeItem *item, bool hasContent); QDeclarativeItem *qmlGraphicsItem() const; QDeclarativeAnchors *anchors() const; void resetHorizontal(); void resetVertical(); + void refresh(); private: //variables bool m_hasHeight; bool m_hasWidth; + bool m_isResizable; + }; } diff --git a/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp index f350af0c6d5..61f8bf7b27b 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp @@ -129,7 +129,7 @@ void MetaInfoPrivate::loadPlugins(QDeclarativeEngine *engine) QDeclarativeComponent pluginComponent(engine, 0); QStringList pluginList; - pluginList += "import Qt 4.7"; + pluginList += "import QtQuick 1.0"; pluginList += "import QtWebKit 1.0"; // load maybe useful plugins @@ -144,6 +144,14 @@ void MetaInfoPrivate::loadPlugins(QDeclarativeEngine *engine) pluginComponent.setData(componentString.toLatin1(), QUrl()); } +QString static inline stripPrefix(const QString &typeName) +{ + QStringList list = typeName.split('/'); + if (list.count() == 2) + return list.last(); + return typeName; +} + void MetaInfoPrivate::parseProperties(NodeMetaInfo &nodeMetaInfo, const QMetaObject *qMetaObject) const { Q_ASSERT_X(qMetaObject, Q_FUNC_INFO, "invalid QMetaObject"); @@ -181,7 +189,11 @@ void MetaInfoPrivate::parseProperties(NodeMetaInfo &nodeMetaInfo, const QMetaObj enumerator.setValid(qEnumerator.isValid()); enumerator.setIsFlagType(qEnumerator.isFlag()); - enumerator.setScope(qEnumerator.scope()); + QString scope = qEnumerator.scope(); + if (m_QtTypesToQmlTypes.contains(scope)) + scope = stripPrefix(m_QtTypesToQmlTypes.value(scope)); + + enumerator.setScope(scope); enumerator.setName(qEnumerator.name()); for (int i = 0 ;i < qEnumerator.keyCount(); i++) { @@ -264,6 +276,15 @@ QList MetaInfoPrivate::qmlTypes() return list; } + +static inline bool isDepricatedQtType(const QString &typeName) +{ + if (typeName.length() < 3) + return false; + + return (typeName.at(0) == 'Q' && typeName.at(1) == 't' && typeName.at(2) == '/'); +} + void MetaInfoPrivate::typeInfo(const QMetaObject *qMetaObject, QString *typeName, int *majorVersion, int *minorVersion) const { Q_ASSERT(typeName); @@ -281,6 +302,13 @@ void MetaInfoPrivate::typeInfo(const QMetaObject *qMetaObject, QString *typeName majVersion = qmlType->majorVersion(); minVersion = qmlType->minorVersion(); } + if (isDepricatedQtType(qmlType->qmlTypeName())) { //### todo there has to be an alternative + QString properTypeName = qmlType->qmlTypeName(); + properTypeName.replace("Qt/", "QtQuick/"); + *typeName = properTypeName; + majVersion = 1; + minVersion = 0; + } } if (majorVersion) *majorVersion = majVersion; @@ -351,7 +379,9 @@ void MetaInfoPrivate::parseQmlTypes() foreach (QDeclarativeType *qmlType, qmlTypes()) { const QString qtTypeName(qmlType->typeName()); const QString qmlTypeName(qmlType->qmlTypeName()); - m_QtTypesToQmlTypes.insert(qtTypeName, qmlTypeName); + + if (!isDepricatedQtType(qmlType->qmlTypeName())) + m_QtTypesToQmlTypes.insert(qtTypeName, qmlTypeName); } foreach (QDeclarativeType *qmlType, qmlTypes()) { const QMetaObject *qMetaObject = qmlType->metaObject(); @@ -360,6 +390,10 @@ void MetaInfoPrivate::parseQmlTypes() if (m_q->hasNodeMetaInfo(qmlType->qmlTypeName(), qmlType->majorVersion(), qmlType->minorVersion())) continue; + // we ignore the depricated Qt/ namespace + if (isDepricatedQtType(qmlType->qmlTypeName())) + continue; + NodeMetaInfo nodeMetaInfo(*m_q); nodeMetaInfo.setType(qmlType->qmlTypeName(), qmlType->majorVersion(), qmlType->minorVersion()); diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp index f381e77df13..dbd6c973d13 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp @@ -326,6 +326,15 @@ void SubComponentManagerPrivate::unregisterQmlFile(const QFileInfo &fileInfo, co } } +static inline bool isDepricatedQtType(const QString &typeName) +{ + if (typeName.length() < 3) + return false; + + return (typeName.at(0) == 'Q' && typeName.at(1) == 't' && typeName.at(2) == '/'); +} + + void SubComponentManagerPrivate::registerQmlFile(const QFileInfo &fileInfo, const QString &qualifier, const QDeclarativeDomDocument &document, bool addToLibrary) { @@ -351,9 +360,17 @@ void SubComponentManagerPrivate::registerQmlFile(const QFileInfo &fileInfo, cons NodeMetaInfo nodeInfo(m_metaInfo); nodeInfo.setType(componentName, -1, -1); nodeInfo.setQmlFile(fileInfo.filePath()); - nodeInfo.setSuperClass(rootObject.objectType(), - rootObject.objectTypeMajorVersion(), - rootObject.objectTypeMinorVersion()); + if (!isDepricatedQtType(rootObject.objectType())) { + nodeInfo.setSuperClass(rootObject.objectType(), + rootObject.objectTypeMajorVersion(), + rootObject.objectTypeMinorVersion()); + } else { + QString properClassName = rootObject.objectType(); + properClassName.replace("Qt/", "QtQuick/"); + nodeInfo.setSuperClass(properClassName, + 1, + 0); + } if (addToLibrary) { // Add file components to the library diff --git a/src/plugins/qmldesigner/designercore/model/abstractview.cpp b/src/plugins/qmldesigner/designercore/model/abstractview.cpp index 9fc221a0df1..2c8a58bb49d 100644 --- a/src/plugins/qmldesigner/designercore/model/abstractview.cpp +++ b/src/plugins/qmldesigner/designercore/model/abstractview.cpp @@ -348,6 +348,15 @@ NodeInstanceView *AbstractView::nodeInstanceView() const } } +RewriterView *AbstractView::rewriterView() const +{ + if (model()) { + return model()->m_d->rewriterView(); + } else { + return 0; + } +} + QList AbstractView::allModelNodes() { return toModelNodeList(model()->m_d->allNodes()); @@ -370,7 +379,7 @@ void AbstractView::emitCustomNotification(const QString &identifier, const QList void AbstractView::emitInstancePropertyChange(const QList > &propertyList) { - if (model()) + if (model() && nodeInstanceView() == this) model()->m_d->notifyInstancePropertyChange(propertyList); } diff --git a/src/plugins/qmldesigner/designercore/model/basetexteditmodifier.cpp b/src/plugins/qmldesigner/designercore/model/basetexteditmodifier.cpp index 3127be6ead8..113ee3b471e 100644 --- a/src/plugins/qmldesigner/designercore/model/basetexteditmodifier.cpp +++ b/src/plugins/qmldesigner/designercore/model/basetexteditmodifier.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include using namespace QmlDesigner; @@ -46,7 +47,7 @@ void BaseTextEditModifier::indent(int offset, int length) if (length == 0 || offset < 0 || offset + length >= text().length()) return; - if (TextEditor::BaseTextEditor *bte = dynamic_cast(plainTextEdit())) { + if (TextEditor::BaseTextEditor *bte = qobject_cast(plainTextEdit())) { // find the applicable block: QTextDocument *doc = bte->document(); QTextCursor tc(doc); @@ -60,13 +61,23 @@ void BaseTextEditModifier::indent(int offset, int length) int BaseTextEditModifier::indentDepth() const { - if (TextEditor::BaseTextEditor *bte = dynamic_cast(plainTextEdit())) { + if (TextEditor::BaseTextEditor *bte = qobject_cast(plainTextEdit())) { return bte->tabSettings().m_indentSize; } else { return 0; } } +bool BaseTextEditModifier::renameId(const QString &oldId, const QString &newId) +{ + if (QmlJSEditor::Internal::QmlJSTextEditor *qmljse = qobject_cast(plainTextEdit())) { + qmljse->renameId(oldId, newId); + return true; + } else { + return false; + } +} + namespace { static inline QmlJS::ModelManagerInterface *getModelManager() { diff --git a/src/plugins/qmldesigner/designercore/model/model.cpp b/src/plugins/qmldesigner/designercore/model/model.cpp index 8f93153cb6f..56035fb53ff 100644 --- a/src/plugins/qmldesigner/designercore/model/model.cpp +++ b/src/plugins/qmldesigner/designercore/model/model.cpp @@ -90,7 +90,7 @@ ModelPrivate::ModelPrivate(Model *model) : m_q(model), m_writeLock(false) { - m_rootInternalNode = createNode("Qt/Item", 4, 7, PropertyListType()); + m_rootInternalNode = createNode("QtQuick/Item", 1, 0, PropertyListType()); } ModelPrivate::~ModelPrivate() @@ -1218,7 +1218,18 @@ bool ModelPrivate::hasId(const QString &id) const QList ModelPrivate::allNodes() const { - return m_nodeSet.toList(); + // the item must be ordered! + + QList nodeList; + + if (m_rootInternalNode.isNull() || !m_rootInternalNode->isValid()) + return nodeList; + + nodeList.append(m_rootInternalNode); + nodeList.append(m_rootInternalNode->allSubNodes()); + nodeList.append((m_nodeSet - nodeList.toSet()).toList()); + + return nodeList; } bool ModelPrivate::isWriteLocked() const diff --git a/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp b/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp index 111d98091ce..ad5b5ab8294 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlchangeset.cpp @@ -51,12 +51,12 @@ void QmlModelStateOperation::setTarget(const ModelNode &target) bool QmlPropertyChanges::isValid() const { - return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isSubclassOf("Qt/PropertyChanges", 4, 7); + return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isSubclassOf("QtQuick/PropertyChanges", 1, 0); } bool QmlModelStateOperation::isValid() const { - return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isSubclassOf("QDeclarativeStateOperation", 4, 7); + return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isSubclassOf("QDeclarativeStateOperation", 1, 0); } void QmlPropertyChanges::removeProperty(const QString &name) diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp index cafa7754ce6..dd3426c53a9 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp @@ -46,7 +46,7 @@ namespace QmlDesigner { bool QmlItemNode::isValid() const { - return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isValid() && modelNode().metaInfo().isSubclassOf("Qt/Item", 4, 7); + return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isValid() && modelNode().metaInfo().isSubclassOf("QtQuick/Item", 1, 0); } bool QmlItemNode::isRootNode() const @@ -201,6 +201,21 @@ bool QmlItemNode::instanceIsAnchoredByChildren() const return nodeInstance().isAnchoredByChildren(); } +bool QmlItemNode::instanceIsMovable() const +{ + return nodeInstance().isMovable(); +} + +bool QmlItemNode::instanceIsResizable() const +{ + return nodeInstance().isResizable(); +} + +bool QmlItemNode::instanceIsInPositioner() const +{ + return nodeInstance().isInPositioner(); +} + QRectF QmlItemNode::instanceBoundingRect() const { return nodeInstance().boundingRect(); @@ -287,7 +302,7 @@ QmlModelState QmlModelStateGroup::addState(const QString &name) PropertyListType propertyList; propertyList.append(qMakePair(QString("name"), QVariant(name))); - ModelNode newState = modelNode().view()->createModelNode("Qt/State", 4, 7, propertyList); + ModelNode newState = modelNode().view()->createModelNode("QtQuick/State", 1, 0, propertyList); modelNode().nodeListProperty("states").reparentHere(newState); return newState; diff --git a/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp b/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp index c1d710467e4..e9dfbad5399 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp @@ -98,8 +98,8 @@ QmlItemNode QmlModelView::createQmlItemNodeFromImage(const QString &imageName, c QmlItemNode newNode; RewriterTransaction transaction = beginRewriterTransaction(); { - const QString newImportUrl = QLatin1String("Qt"); - const QString newImportVersion = QLatin1String("4.7"); + const QString newImportUrl = QLatin1String("QtQuick"); + const QString newImportVersion = QLatin1String("1.0"); Import newImport = Import::createLibraryImport(newImportUrl, newImportVersion); foreach (const Import &import, model()->imports()) { @@ -129,7 +129,7 @@ QmlItemNode QmlModelView::createQmlItemNodeFromImage(const QString &imageName, c } propertyPairList.append(qMakePair(QString("source"), QVariant(relativeImageName))); - newNode = createQmlItemNode("Qt/Image", 4, 7, propertyPairList); + newNode = createQmlItemNode("QtQuick/Image", 1, 0, propertyPairList); parentNode.nodeAbstractProperty("data").reparentHere(newNode); Q_ASSERT(newNode.isValid()); @@ -325,7 +325,9 @@ static bool isTransformProperty(const QString &name) << "z" << "rotation" << "scale" - << "transformOrigin"); + << "transformOrigin" + << "paintedWidth" + << "paintedHeight"); return transformProperties.contains(name); } @@ -385,9 +387,12 @@ void QmlModelView::activateState(const QmlModelState &state) return; if (m_state == state) - return; + return; + + m_state = state; //This is hacky. m_state should be controlled by the instances + //### todo: If the state thumbnail code gets refactored. + // this is not neccessary anymore. - QmlModelState oldState = m_state; NodeInstance newStateInstance = instanceForModelNode(state.modelNode()); diff --git a/src/plugins/qmldesigner/designercore/model/qmlstate.cpp b/src/plugins/qmldesigner/designercore/model/qmlstate.cpp index bd17f083f17..934f32d528f 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlstate.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlstate.cpp @@ -179,7 +179,7 @@ void QmlModelState::addChangeSetIfNotExists(const ModelNode &node) return; //changeSet already there } - ModelNode newChangeSet = modelNode().view()->createModelNode("Qt/PropertyChanges", 4, 7); + ModelNode newChangeSet = modelNode().view()->createModelNode("QtQuick/PropertyChanges", 1, 0); modelNode().nodeListProperty("changes").reparentHere(newChangeSet); QmlPropertyChanges(newChangeSet).setTarget(node); @@ -246,7 +246,7 @@ bool QmlModelState::isValid() const { return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isValid() && - (modelNode().metaInfo().isSubclassOf("Qt/State", 4, 7) || isBaseState()); + (modelNode().metaInfo().isSubclassOf("QtQuick/State", 1, 0) || isBaseState()); } /** @@ -280,7 +280,7 @@ QmlModelState QmlModelState::duplicate(const QString &name) const // QmlModelState newState(stateGroup().addState(name)); PropertyListType propertyList; propertyList.append(qMakePair(QString("name"), QVariant(name))); - QmlModelState newState ( qmlModelView()->createModelNode("Qt/State", 4, 7, propertyList) ); + QmlModelState newState ( qmlModelView()->createModelNode("QtQuick/State", 1, 0, propertyList) ); foreach (const ModelNode &childNode, modelNode().nodeListProperty("changes").toModelNodeList()) { ModelNode newModelNode(qmlModelView()->createModelNode(childNode.type(), childNode.majorVersion(), childNode.minorVersion())); diff --git a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp index f912214db8f..0ddece841d3 100644 --- a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp @@ -35,6 +35,7 @@ #include "nodelistproperty.h" #include "qmltextgenerator.h" #include "variantproperty.h" +#include #include "model.h" using namespace QmlDesigner; @@ -94,25 +95,30 @@ QString QmlTextGenerator::toQml(const AbstractProperty &property, int indentDept if (property.name() == QLatin1String("id")) return stringValue; - switch (value.type()) { - case QVariant::Bool: - if (value.value()) - return QLatin1String("true"); - else - return QLatin1String("false"); + if (variantProperty.metaInfo().isValid() && variantProperty.metaInfo().isEnumType()) { + return variantProperty.metaInfo().enumerator().scope() + '.' + stringValue; + } else { - case QVariant::Color: - return QString(QLatin1String("\"%1\"")).arg(properColorName(value.value())); + switch (value.type()) { + case QVariant::Bool: + if (value.value()) + return QLatin1String("true"); + else + return QLatin1String("false"); - case QVariant::Double: - case QVariant::Int: - case QVariant::LongLong: - case QVariant::UInt: - case QVariant::ULongLong: - return stringValue; + case QVariant::Color: + return QString(QLatin1String("\"%1\"")).arg(properColorName(value.value())); - default: - return QString(QLatin1String("\"%1\"")).arg(escape(stringValue)); + case QVariant::Double: + case QVariant::Int: + case QVariant::LongLong: + case QVariant::UInt: + case QVariant::ULongLong: + return stringValue; + + default: + return QString(QLatin1String("\"%1\"")).arg(escape(stringValue)); + } } } else { Q_ASSERT("Unknown property type"); diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp index f610f3f6b30..19837bee51f 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp +++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp @@ -71,6 +71,16 @@ RewriterView::Error::Error(const QDeclarativeError &qmlError): { } +RewriterView::Error::Error(const QString &shortDescription) : + m_type(ParseError), + m_line(1), + m_column(0), + m_description(shortDescription), + m_url() +{ +} + + QString RewriterView::Error::toString() const { QString str; @@ -539,6 +549,14 @@ bool RewriterView::modificationGroupActive() return m_modificationGroupActive; } +bool RewriterView::renameId(const QString& oldId, const QString& newId) +{ + if (textModifier()) + return textModifier()->renameId(oldId, newId); + + return false; +} + void RewriterView::qmlTextChanged() { if (inErrorState()) diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 0627e0e6e88..0c2e9438671 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -31,6 +31,8 @@ #include "bindingproperty.h" #include "filemanager/firstdefinitionfinder.h" #include "filemanager/objectlengthcalculator.h" +#include "filemanager/qmlrefactoring.h" +#include "rewriteaction.h" #include "nodeproperty.h" #include "propertyparser.h" #include "textmodifier.h" @@ -47,6 +49,7 @@ #include #include #include +#include using namespace QmlJS; using namespace QmlJS::AST; @@ -587,6 +590,40 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH setupImports(doc, differenceHandler); + foreach (const Import &import, m_rewriterView->model()->imports()) { + if (import.url() == "Qt") { + if (QMessageBox::question (0, QObject::tr("Deprecated import: import Qt 4.7", "QmlDesigner::TextToModelMerger"), + QObject::tr("Deprecated import: import Qt 4.7\nuse import QtQuick 1.0 instead.\n\nDo you want to automatically fix the import?", + "QmlDesigner::TextToModelMerger"), + QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok) == QMessageBox::Ok) { + QmlDesigner::QmlRefactoring refactoring(doc, *m_rewriterView->textModifier(), QStringList()); + RemoveImportRewriteAction removeImportRewriteAction(import); + + m_rewriterView->textModifier()->startGroup(); + + Import qtQuickImport = Import::createLibraryImport("QtQuick", "1.0"); + AddImportRewriteAction addImportRewriteAction(qtQuickImport); + bool success = addImportRewriteAction.execute(refactoring, *m_rewriterView->positionStorage()); + + if (success) { + success = refactoring.reparseDocument(); + } + success = removeImportRewriteAction.execute(refactoring, *m_rewriterView->positionStorage()); + + m_rewriterView->textModifier()->commitGroup(); + + return false; + } else { + QList errors; + RewriterView::Error error(QObject::tr("Deprecated import: import Qt 4.7 use import QtQuick 1.0 instead", + "QmlDesigner::TextToModelMerger")); + errors.append(error); + m_rewriterView->setErrors(errors); + return false; + } + } + } + UiObjectMember *astRootNode = 0; if (UiProgram *program = doc->qmlProgram()) if (program->members) @@ -667,7 +704,7 @@ void TextToModelMerger::syncNode(ModelNode &modelNode, if (UiArrayBinding *array = cast(member)) { const QString astPropertyName = flatten(array->qualifiedId); - if (typeName == QLatin1String("Qt/PropertyChanges") || context->lookupProperty(QString(), array->qualifiedId)) { + if (typeName == QLatin1String("QtQuick/PropertyChanges") || context->lookupProperty(QString(), array->qualifiedId)) { AbstractProperty modelProperty = modelNode.property(astPropertyName); QList arrayMembers; for (UiArrayMemberList *iter = array->members; iter; iter = iter->next) @@ -701,7 +738,7 @@ void TextToModelMerger::syncNode(ModelNode &modelNode, const Interpreter::Value *propertyType = 0; const Interpreter::ObjectValue *containingObject = 0; QString name; - if (context->lookupProperty(QString(), binding->qualifiedId, &propertyType, &containingObject, &name) || typeName == QLatin1String("Qt/PropertyChanges")) { + if (context->lookupProperty(QString(), binding->qualifiedId, &propertyType, &containingObject, &name) || typeName == QLatin1String("QtQuick/PropertyChanges")) { AbstractProperty modelProperty = modelNode.property(astPropertyName); if (context->isArrayProperty(propertyType, containingObject, name)) { syncArrayProperty(modelProperty, QList() << member, context, differenceHandler); @@ -745,7 +782,7 @@ void TextToModelMerger::syncNode(ModelNode &modelNode, if (!defaultPropertyItems.isEmpty()) { if (defaultPropertyName.isEmpty()) { - if (modelNode.type() != QLatin1String("Qt/Component")) + if (modelNode.type() != QLatin1String("QtQuick/Component")) qWarning() << "No default property for node type" << modelNode.type() << ", ignoring child items."; } else { AbstractProperty modelProperty = modelNode.property(defaultPropertyName); @@ -805,7 +842,7 @@ QString TextToModelMerger::syncScriptBinding(ModelNode &modelNode, return QString(); if (isLiteralValue(script)) { - if (modelNode.type() == QLatin1String("Qt/PropertyChanges")) { + if (modelNode.type() == QLatin1String("QtQuick/PropertyChanges")) { AbstractProperty modelProperty = modelNode.property(astPropertyName); const QVariant variantValue(deEscape(stripQuotes(astValue))); syncVariantProperty(modelProperty, variantValue, QString(), differenceHandler); @@ -830,7 +867,7 @@ QString TextToModelMerger::syncScriptBinding(ModelNode &modelNode, syncVariantProperty(modelProperty, enumValue, QString(), differenceHandler); return astPropertyName; } else { // Not an enum, so: - if (modelNode.type() == QLatin1String("Qt/PropertyChanges") || context->lookupProperty(prefix, script->qualifiedId)) { + if (modelNode.type() == QLatin1String("QtQuick/PropertyChanges") || context->lookupProperty(prefix, script->qualifiedId)) { AbstractProperty modelProperty = modelNode.property(astPropertyName); syncExpressionProperty(modelProperty, astValue, differenceHandler); return astPropertyName; @@ -959,7 +996,7 @@ void TextToModelMerger::syncNodeListProperty(NodeListProperty &modelListProperty QString name; if (UiObjectDefinition *definition = cast(arrayMember)) name = flatten(definition->qualifiedTypeNameId); - if (name == QLatin1String("Qt/Component")) + if (name == QLatin1String("QtQuick/Component")) setupComponent(newNode); } @@ -1273,7 +1310,7 @@ void ModelAmender::idsDiffer(ModelNode &modelNode, const QString &qmlId) void TextToModelMerger::setupComponent(const ModelNode &node) { - Q_ASSERT(node.type() == QLatin1String("Qt/Component")); + Q_ASSERT(node.type() == QLatin1String("QtQuick/Component")); QString componentText = m_rewriterView->extractText(QList() << node).value(node); diff --git a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp index f4e419ad09e..1480471785d 100644 --- a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp +++ b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp @@ -38,8 +38,8 @@ namespace QmlDesigner { QtQuickPlugin::QtQuickPlugin() { - qmlRegisterType("Qt", 4, 7, "Pen"); - qmlRegisterType("Qt", 4, 7, "ScaleGrid"); + qmlRegisterType("QtQuick", 1, 0, "Pen"); + qmlRegisterType("QtQuick", 1, 0, "ScaleGrid"); } QString QtQuickPlugin::pluginName() diff --git a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo index 139a82bc056..4c828305a62 100644 --- a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo +++ b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo @@ -1,5 +1,5 @@ - + @@ -7,14 +7,14 @@ - + - + @@ -23,7 +23,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -41,13 +41,13 @@ - + - + @@ -56,7 +56,7 @@ - + @@ -65,7 +65,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -81,28 +81,28 @@ - + - + - + - + diff --git a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp index 0d21a6101a5..0fcfd8108ac 100644 --- a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp +++ b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp @@ -149,20 +149,20 @@ public: QList ComponentFromObjectDef::match(const QmlJSQuickFixState &state) { - QList result; const int pos = state.currentFile().cursor().position(); QList path = state.semanticInfo().astPath(pos); for (int i = path.size() - 1; i >= 0; --i) { Node *node = path.at(i); if (UiObjectDefinition *objDef = cast(node)) { + if (!state.currentFile().isCursorOn(objDef->qualifiedTypeNameId)) + return noResult(); // check that the node is not the root node if (i > 0 && !cast(path.at(i - 1))) { - result.append(QmlJSQuickFixOperation::Ptr(new Operation(state, objDef))); - return result; + return singleResult(new Operation(state, objDef)); } } } - return result; + return noResult(); } diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index c983f50ec8d..c3a465b27b5 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -82,7 +83,8 @@ enum { UPDATE_DOCUMENT_DEFAULT_INTERVAL = 100, UPDATE_USES_DEFAULT_INTERVAL = 150, - UPDATE_OUTLINE_INTERVAL = 500 // msecs after new semantic info has been arrived / cursor has moved + UPDATE_OUTLINE_INTERVAL = 500, // msecs after new semantic info has been arrived / cursor has moved + TOOLTIP_TIMER_INTERVAL = 1000 // delay after we show the Quick ToolBar after a tooltip }; using namespace QmlJS; @@ -678,6 +680,7 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) : m_modelManager(0), m_contextPane(0), m_updateSelectedElements(false), + m_toolTipPosition(0), m_findReferences(new FindReferences(this)) { qRegisterMetaType("QmlJSEditor::Internal::SemanticInfo"); @@ -725,6 +728,11 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) : m_cursorPositionTimer->setSingleShot(true); connect(m_cursorPositionTimer, SIGNAL(timeout()), this, SLOT(updateCursorPositionNow())); + m_toolTipTimer = new QTimer(this); + m_toolTipTimer->setInterval(TOOLTIP_TIMER_INTERVAL); + m_toolTipTimer->setSingleShot(true); + connect(m_toolTipTimer, SIGNAL(timeout()), this, SLOT(updateToolTipNow())); + baseTextDocument()->setSyntaxHighlighter(new Highlighter(document())); m_modelManager = ExtensionSystem::PluginManager::instance()->getObject(); @@ -750,6 +758,9 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) : connect(this, SIGNAL(refactorMarkerClicked(TextEditor::Internal::RefactorMarker)), SLOT(onRefactorMarkerClicked(TextEditor::Internal::RefactorMarker))); + connect(editableInterface(), SIGNAL(tooltipRequested(TextEditor::ITextEditor*, QPoint, int)), + SLOT(onTooltipRequested(TextEditor::ITextEditor*, QPoint, int))); + setRequestMarkEnabled(true); } @@ -973,8 +984,8 @@ static UiQualifiedId *qualifiedTypeNameId(UiObjectMember *m) void QmlJSTextEditor::updateCursorPositionNow() { - if (m_contextPane && document() && !semanticInfo().document.isNull() && - document()->revision() == semanticInfo().document->editorRevision()) + if (m_contextPane && document() && semanticInfo().isValid() + && document()->revision() == semanticInfo().document->editorRevision()) { Node *oldNode = m_semanticInfo.declaringMemberNoProperties(m_oldCursorPosition); Node *newNode = m_semanticInfo.declaringMemberNoProperties(position()); @@ -1034,6 +1045,18 @@ void QmlJSTextEditor::setUpdateSelectedElements(bool value) m_updateSelectedElements = value; } +void QmlJSTextEditor::renameId(const QString &oldId, const QString &newId) +{ + Utils::ChangeSet changeSet; + + foreach (const AST::SourceLocation &loc, m_semanticInfo.idLocations.value(oldId)) { + changeSet.replace(loc.begin(), loc.end(), newId); + } + + QTextCursor tc = textCursor(); + changeSet.apply(&tc); +} + void QmlJSTextEditor::updateUsesNow() { if (document()->revision() != m_semanticInfo.revision()) { @@ -1202,7 +1225,7 @@ void QmlJSTextEditor::setSelectedElements() endPos = textCursor().position(); } - if (m_semanticInfo.document) { + if (m_semanticInfo.isValid()) { SelectedElement selectedMembers; QList members = selectedMembers(m_semanticInfo.lookupContext(), startPos, endPos); @@ -1231,14 +1254,7 @@ void QmlJSTextEditor::renameIdUnderCursor() QLineEdit::Normal, id, &ok); if (ok) { - Utils::ChangeSet changeSet; - - foreach (const AST::SourceLocation &loc, m_semanticInfo.idLocations.value(id)) { - changeSet.replace(loc.begin(), loc.end(), newId); - } - - QTextCursor tc = textCursor(); - changeSet.apply(&tc); + renameId(id, newId); } } @@ -1443,7 +1459,7 @@ void QmlJSTextEditor::findUsages() void QmlJSTextEditor::showContextPane() { - if (m_contextPane) { + if (m_contextPane && m_semanticInfo.isValid()) { Node *newNode = m_semanticInfo.declaringMemberNoProperties(position()); m_contextPane->apply(editableInterface(), m_semanticInfo.lookupContext(), newNode, false, true); m_oldCursorPosition = position(); @@ -1458,6 +1474,28 @@ void QmlJSTextEditor::performQuickFix(int index) op->perform(); } +void QmlJSTextEditor::onTooltipRequested(TextEditor::ITextEditor* /* editor */, QPoint /* point */, int position) +{ + m_toolTipPosition = position; + if (m_contextPane) { + m_toolTipTimer->start(); + } +} + +void QmlJSTextEditor::updateToolTipNow() +{ + if (!TextEditor::ToolTip::instance()->isVisible()) + return; + + if (m_contextPane && m_semanticInfo.isValid()) { + Node *newNode = m_semanticInfo.declaringMemberNoProperties(m_toolTipPosition); + m_contextPane->apply(editableInterface(), m_semanticInfo.lookupContext(), newNode, false, true); + m_oldCursorPosition = m_toolTipPosition; + QList markers; + setRefactorMarkers(markers); + } +} + void QmlJSTextEditor::contextMenuEvent(QContextMenuEvent *e) { QMenu *menu = new QMenu(); @@ -1536,8 +1574,12 @@ void QmlJSTextEditor::wheelEvent(QWheelEvent *event) BaseTextEditor::wheelEvent(event); - if (visible) - m_contextPane->apply(editableInterface(), m_semanticInfo.lookupContext(), m_semanticInfo.declaringMemberNoProperties(position()), false, true); + if (visible) { + LookupContext::Ptr lookupContext; + if (m_semanticInfo.isValid()) + lookupContext = m_semanticInfo.lookupContext(); + m_contextPane->apply(editableInterface(), lookupContext, m_semanticInfo.declaringMemberNoProperties(position()), false, true); + } } void QmlJSTextEditor::resizeEvent(QResizeEvent *event) @@ -1838,8 +1880,12 @@ QModelIndex QmlJSTextEditor::indexForPosition(unsigned cursorPosition, const QMo bool QmlJSTextEditor::hideContextPane() { bool b = (m_contextPane) && m_contextPane->widget()->isVisible(); - if (b) - m_contextPane->apply(editableInterface(), m_semanticInfo.lookupContext(), 0, false); + if (b) { + LookupContext::Ptr lookupContext; + if (m_semanticInfo.isValid()) + lookupContext = m_semanticInfo.lookupContext(); + m_contextPane->apply(editableInterface(), lookupContext, 0, false); + } return b; } diff --git a/src/plugins/qmljseditor/qmljseditor.h b/src/plugins/qmljseditor/qmljseditor.h index 8071dd03d80..6f5930d7410 100644 --- a/src/plugins/qmljseditor/qmljseditor.h +++ b/src/plugins/qmljseditor/qmljseditor.h @@ -243,6 +243,8 @@ public: bool updateSelectedElements() const; void setUpdateSelectedElements(bool value); + void renameId(const QString &oldId, const QString &newId); + public slots: void followSymbolUnderCursor(); void findUsages(); @@ -279,6 +281,8 @@ private slots: void onRefactorMarkerClicked(const TextEditor::Internal::RefactorMarker &marker); void performQuickFix(int index); + void onTooltipRequested(TextEditor::ITextEditor* editor, QPoint point, int position); + void updateToolTipNow(); protected: void contextMenuEvent(QContextMenuEvent *e); @@ -316,6 +320,7 @@ private: QTimer *m_semanticRehighlightTimer; QTimer *m_updateOutlineTimer; QTimer *m_updateOutlineIndexTimer; + QTimer *m_toolTipTimer; QTimer *m_cursorPositionTimer; QComboBox *m_outlineCombo; QmlOutlineModel *m_outlineModel; @@ -333,6 +338,7 @@ private: QmlJS::IContextPane *m_contextPane; int m_oldCursorPosition; bool m_updateSelectedElements; + int m_toolTipPosition; FindReferences *m_findReferences; }; diff --git a/src/plugins/qmljseditor/qmljseditorconstants.h b/src/plugins/qmljseditor/qmljseditorconstants.h index 342f6e94acf..753a143bc28 100644 --- a/src/plugins/qmljseditor/qmljseditorconstants.h +++ b/src/plugins/qmljseditor/qmljseditorconstants.h @@ -58,6 +58,10 @@ const char * const JS_MIMETYPE = "application/javascript"; const char *const TASK_CATEGORY_QML = "Task.Category.Qml"; +const char * const WIZARD_CATEGORY_QML = "S.Qml"; +const char * const WIZARD_TR_CATEGORY_QML = QT_TRANSLATE_NOOP("QmlJsEditor", "QML"); + + } // namespace Constants } // namespace QmlJSEditor diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index e7cbfde8131..7e3e74b3ab7 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -134,10 +134,10 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e addObject(m_editor); Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard); - wizardParameters.setCategory(QLatin1String(Core::Constants::WIZARD_CATEGORY_QT)); - wizardParameters.setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT)); - wizardParameters.setDescription(tr("Creates a Qt QML file.")); - wizardParameters.setDisplayName(tr("Qt QML File")); + wizardParameters.setCategory(QLatin1String(Constants::WIZARD_CATEGORY_QML)); + wizardParameters.setDisplayCategory(QCoreApplication::translate("QmlJsEditor", Constants::WIZARD_TR_CATEGORY_QML)); + wizardParameters.setDescription(tr("Creates a QML file.")); + wizardParameters.setDisplayName(tr("QML File")); wizardParameters.setId(QLatin1String("Q.Qml")); addAutoReleasedObject(new QmlFileWizard(wizardParameters, core)); diff --git a/src/plugins/qmljseditor/qmljsquickfix.cpp b/src/plugins/qmljseditor/qmljsquickfix.cpp index 3b5ce360f98..018442cd8bc 100644 --- a/src/plugins/qmljseditor/qmljsquickfix.cpp +++ b/src/plugins/qmljseditor/qmljsquickfix.cpp @@ -117,6 +117,17 @@ QList QmlJSQuickFixFactory::matchingOperations(QuickFixS return QList(); } +QList QmlJSQuickFixFactory::noResult() +{ + return QList(); +} + +QList QmlJSQuickFixFactory::singleResult(QmlJSQuickFixOperation *operation) +{ + QList result; + result.append(QmlJSQuickFixOperation::Ptr(operation)); + return result; +} QmlJSQuickFixCollector::QmlJSQuickFixCollector() { diff --git a/src/plugins/qmljseditor/qmljsquickfix.h b/src/plugins/qmljseditor/qmljsquickfix.h index 419cc73b902..57e6b2521f6 100644 --- a/src/plugins/qmljseditor/qmljsquickfix.h +++ b/src/plugins/qmljseditor/qmljsquickfix.h @@ -132,6 +132,9 @@ public: QmlJSQuickFixOperation objects. */ virtual QList match(const QmlJSQuickFixState &state) = 0; + + static QList noResult(); + static QList singleResult(QmlJSQuickFixOperation *operation); }; namespace Internal { diff --git a/src/plugins/qmljseditor/qmljsquickfixes.cpp b/src/plugins/qmljseditor/qmljsquickfixes.cpp index 145bcee5227..006ce4b457e 100644 --- a/src/plugins/qmljseditor/qmljsquickfixes.cpp +++ b/src/plugins/qmljseditor/qmljsquickfixes.cpp @@ -52,8 +52,6 @@ class SplitInitializerOp: public QmlJSQuickFixFactory public: virtual QList match(const QmlJSQuickFixState &state) { - QList result; - UiObjectInitializer *objectInitializer = 0; const int pos = state.currentFile().cursor().position(); @@ -70,8 +68,9 @@ public: } if (objectInitializer) - result.append(QSharedPointer(new Operation(state, objectInitializer))); - return result; + return singleResult(new Operation(state, objectInitializer)); + else + return noResult(); } private: diff --git a/src/plugins/qmljseditor/qmljsrefactoringchanges.cpp b/src/plugins/qmljseditor/qmljsrefactoringchanges.cpp index a612b070cdf..bf7ed2018c0 100644 --- a/src/plugins/qmljseditor/qmljsrefactoringchanges.cpp +++ b/src/plugins/qmljseditor/qmljsrefactoringchanges.cpp @@ -30,6 +30,7 @@ #include "qmljsrefactoringchanges.h" #include "qmljseditorcodeformatter.h" +#include #include #include #include @@ -109,11 +110,33 @@ Document::Ptr QmlJSRefactoringFile::qmljsDocument() const return m_qmljsDocument; } -unsigned QmlJSRefactoringFile::startOf(const QmlJS::AST::SourceLocation &loc) const +unsigned QmlJSRefactoringFile::startOf(const AST::SourceLocation &loc) const { return position(loc.startLine, loc.startColumn); } +bool QmlJSRefactoringFile::isCursorOn(AST::UiObjectMember *ast) const +{ + const unsigned pos = cursor().position(); + + return ast->firstSourceLocation().begin() <= pos + && pos <= ast->lastSourceLocation().end(); +} + +bool QmlJSRefactoringFile::isCursorOn(AST::UiQualifiedId *ast) const +{ + const unsigned pos = cursor().position(); + + if (ast->identifierToken.begin() > pos) + return false; + + AST::UiQualifiedId *last = ast; + while (last->next) + last = last->next; + + return pos <= ast->identifierToken.end(); +} + QmlJSRefactoringChanges *QmlJSRefactoringFile::refactoringChanges() const { return static_cast(m_refactoringChanges); diff --git a/src/plugins/qmljseditor/qmljsrefactoringchanges.h b/src/plugins/qmljseditor/qmljsrefactoringchanges.h index 993012e9c8c..b1ba3d4e466 100644 --- a/src/plugins/qmljseditor/qmljsrefactoringchanges.h +++ b/src/plugins/qmljseditor/qmljsrefactoringchanges.h @@ -57,6 +57,9 @@ public: */ unsigned startOf(const QmlJS::AST::SourceLocation &loc) const; + bool isCursorOn(QmlJS::AST::UiObjectMember *ast) const; + bool isCursorOn(QmlJS::AST::UiQualifiedId *ast) const; + private: QmlJSRefactoringChanges *refactoringChanges() const; diff --git a/src/plugins/qmljseditor/qmloutlinemodel.cpp b/src/plugins/qmljseditor/qmloutlinemodel.cpp index 595cf7afe7a..b2a44a93666 100644 --- a/src/plugins/qmljseditor/qmloutlinemodel.cpp +++ b/src/plugins/qmljseditor/qmloutlinemodel.cpp @@ -38,7 +38,7 @@ QVariant QmlOutlineItem::data(int role) const if (role == Qt::ToolTipRole) { AST::SourceLocation location = m_outlineModel->sourceLocation(index()); AST::UiQualifiedId *uiQualifiedId = m_outlineModel->idNode(index()); - if (!uiQualifiedId || !location.isValid()) + if (!uiQualifiedId || !location.isValid() || !m_outlineModel->m_semanticInfo.isValid()) return QVariant(); QList astPath = m_outlineModel->m_semanticInfo.astPath(location.begin()); diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp index fca7bb4fe0c..42f15c14d87 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp +++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp @@ -53,10 +53,10 @@ ClientProxy::ClientProxy(Debugger::QmlAdapter *adapter, QObject *parent) , m_designClient(0) , m_engineQuery(0) , m_contextQuery(0) + , m_isConnected(false) { m_requestObjectsTimer.setSingleShot(true); m_requestObjectsTimer.setInterval(3000); - connect(m_adapter, SIGNAL(aboutToDisconnect()), SLOT(disconnectFromServer())); connect(m_client, SIGNAL(newObjects()), this, SLOT(newObjects())); connect(&m_requestObjectsTimer, SIGNAL(timeout()), this, SLOT(refreshObjectTree())); connectToServer(); @@ -65,8 +65,12 @@ ClientProxy::ClientProxy(Debugger::QmlAdapter *adapter, QObject *parent) void ClientProxy::connectToServer() { m_designClient = new QmlJSObserverClient(m_adapter->connection(), this); - emit connected(); + + m_adapter->logServiceStatusChange(m_designClient->name(), m_designClient->status()); + + connect(m_designClient, SIGNAL(connectedStatusChanged(QDeclarativeDebugClient::Status)), + this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status))); connect(m_designClient, SIGNAL(currentObjectsChanged(QList)), SLOT(onCurrentObjectsChanged(QList))); connect(m_designClient, SIGNAL(colorPickerActivated()), @@ -87,12 +91,27 @@ void ClientProxy::connectToServer() SIGNAL(selectedColorChanged(QColor))); connect(m_designClient, SIGNAL(contextPathUpdated(QStringList)), SIGNAL(contextPathUpdated(QStringList))); - reloadEngines(); + + updateConnected(); +} + +void ClientProxy::clientStatusChanged(QDeclarativeDebugClient::Status status) +{ + QString serviceName; + if (QDeclarativeDebugClient *client = qobject_cast(sender())) { + serviceName = client->name(); + } + + m_adapter->logServiceStatusChange(serviceName, status); + + updateConnected(); } void ClientProxy::disconnectFromServer() { if (m_designClient) { + disconnect(m_designClient, SIGNAL(connectedStatusChanged(QDeclarativeDebugClient::Status)), + this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status))); disconnect(m_designClient, SIGNAL(currentObjectsChanged(QList)), this, SLOT(onCurrentObjectsChanged(QList))); disconnect(m_designClient, SIGNAL(colorPickerActivated()), @@ -111,8 +130,6 @@ void ClientProxy::disconnectFromServer() this, SIGNAL(selectedColorChanged(QColor))); disconnect(m_designClient, SIGNAL(contextPathUpdated(QStringList)), this, SIGNAL(contextPathUpdated(QStringList))); - disconnect(m_designClient, SIGNAL(treeRefreshRequested()), - this, SLOT(refreshObjectTree())); delete m_designClient; m_designClient = 0; @@ -128,6 +145,8 @@ void ClientProxy::disconnectFromServer() qDeleteAll(m_objectTreeQuery); m_objectTreeQuery.clear(); + + updateConnected(); } void ClientProxy::refreshObjectTree() @@ -164,7 +183,7 @@ void ClientProxy::onCurrentObjectsChanged(const QList< int >& debugIds, bool req void ClientProxy::setSelectedItemsByObjectId(const QList &objectRefs) { - if (isConnected() && m_designClient) + if (isConnected()) m_designClient->setSelectedItemsByObjectId(objectRefs); } @@ -285,7 +304,7 @@ QDeclarativeDebugExpressionQuery *ClientProxy::queryExpressionResult(int objectD void ClientProxy::clearComponentCache() { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->clearComponentCache(); } @@ -365,7 +384,7 @@ void ClientProxy::objectTreeFetched(QDeclarativeDebugQuery::State state) buildDebugIdHashRecursive(it); emit objectTreeUpdated(); - if (isDesignClientConnected()) { + if (isConnected()) { if (!m_designClient->selectedItemIds().isEmpty()) onCurrentObjectsChanged(m_designClient->selectedItemIds(), false); @@ -410,74 +429,84 @@ void ClientProxy::buildDebugIdHashRecursive(const QDeclarativeDebugObjectReferen void ClientProxy::reloadQmlViewer() { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->reloadViewer(); } void ClientProxy::setDesignModeBehavior(bool inDesignMode) { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->setDesignModeBehavior(inDesignMode); } void ClientProxy::setAnimationSpeed(qreal slowdownFactor) { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->setAnimationSpeed(slowdownFactor); } void ClientProxy::changeToColorPickerTool() { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->changeToColorPickerTool(); } void ClientProxy::changeToZoomTool() { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->changeToZoomTool(); } void ClientProxy::changeToSelectTool() { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->changeToSelectTool(); } void ClientProxy::changeToSelectMarqueeTool() { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->changeToSelectMarqueeTool(); } void ClientProxy::createQmlObject(const QString &qmlText, int parentDebugId, const QStringList &imports, const QString &filename) { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->createQmlObject(qmlText, parentDebugId, imports, filename); } void ClientProxy::destroyQmlObject(int debugId) { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->destroyQmlObject(debugId); } void ClientProxy::reparentQmlObject(int debugId, int newParent) { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->reparentQmlObject(debugId, newParent); } void ClientProxy::setContextPathIndex(int contextIndex) { - if (isDesignClientConnected()) + if (isConnected()) m_designClient->setContextPathIndex(contextIndex); } - -bool ClientProxy::isDesignClientConnected() const +void ClientProxy::updateConnected() { - return (m_designClient && m_adapter->isConnected()); + bool isConnected = m_designClient && m_designClient->status() == QDeclarativeDebugClient::Enabled + && m_client && m_client->status() == QDeclarativeEngineDebug::Enabled; + + if (isConnected != m_isConnected) { + m_isConnected = isConnected; + if (isConnected) { + emit connected(); + reloadEngines(); + } else { + emit disconnected(); + } + } } void ClientProxy::reloadEngines() @@ -518,7 +547,7 @@ Debugger::QmlAdapter *ClientProxy::qmlAdapter() const bool ClientProxy::isConnected() const { - return m_adapter->isConnected(); + return m_isConnected; } void ClientProxy::newObjects() diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h index 1c7c2162f66..bfd628e64f0 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.h +++ b/src/plugins/qmljsinspector/qmljsclientproxy.h @@ -92,7 +92,6 @@ signals: void selectedItemsChanged(const QList &selectedItems); void connected(); - void aboutToDisconnect(); void disconnected(); void colorPickerActivated(); @@ -125,6 +124,7 @@ public slots: private slots: void disconnectFromServer(); void connectToServer(); + void clientStatusChanged(QDeclarativeDebugClient::Status status); void contextChanged(); @@ -135,7 +135,7 @@ private slots: void newObjects(); private: - bool isDesignClientConnected() const; + void updateConnected(); void reloadEngines(); QList objectReferences(const QDeclarativeDebugObjectReference &objectRef) const; @@ -157,6 +157,8 @@ private: QList m_engines; QTimer m_requestObjectsTimer; DebugIdHash m_debugIdHash; + + bool m_isConnected; }; } // namespace Internal diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp index 4f0c39fe0eb..6c25985f643 100644 --- a/src/plugins/qmljsinspector/qmljsinspector.cpp +++ b/src/plugins/qmljsinspector/qmljsinspector.cpp @@ -501,6 +501,20 @@ void InspectorUi::setSelectedItemsByObjectReference(QListenable(); + m_crumblePath->setEnabled(true); + m_objectTreeWidget->setEnabled(true); +} + +void InspectorUi::disable() +{ + m_toolbar->disable(); + m_crumblePath->setEnabled(false); + m_objectTreeWidget->setEnabled(false); +} + void InspectorUi::gotoObjectReferenceDefinition(const QDeclarativeDebugObjectReference &obj) { Q_UNUSED(obj); @@ -686,8 +700,8 @@ void InspectorUi::disableLivePreview() void InspectorUi::setupToolbar(bool doConnect) { if (doConnect) { - connect(m_clientProxy, SIGNAL(connected()), m_toolbar, SLOT(enable())); - connect(m_clientProxy, SIGNAL(disconnected()), m_toolbar, SLOT(disable())); + connect(m_clientProxy, SIGNAL(connected()), this, SLOT(enable())); + connect(m_clientProxy, SIGNAL(disconnected()), this, SLOT(disable())); connect(m_toolbar, SIGNAL(designModeSelected(bool)), m_clientProxy, SLOT(setDesignModeBehavior(bool))); connect(m_toolbar, SIGNAL(reloadSelected()), m_clientProxy, SLOT(reloadQmlViewer())); @@ -705,10 +719,9 @@ void InspectorUi::setupToolbar(bool doConnect) connect(m_clientProxy, SIGNAL(selectedColorChanged(QColor)), m_toolbar, SLOT(setSelectedColor(QColor))); connect(m_clientProxy, SIGNAL(animationSpeedChanged(qreal)), m_toolbar, SLOT(setAnimationSpeed(qreal))); - m_toolbar->enable(); } else { - disconnect(m_clientProxy, SIGNAL(connected()), m_toolbar, SLOT(enable())); - disconnect(m_clientProxy, SIGNAL(disconnected()), m_toolbar, SLOT(disable())); + disconnect(m_clientProxy, SIGNAL(connected()), this, SLOT(enable())); + disconnect(m_clientProxy, SIGNAL(disconnected()), this, SLOT(disable())); disconnect(m_toolbar, SIGNAL(designModeSelected(bool)), m_clientProxy, SLOT(setDesignModeBehavior(bool))); disconnect(m_toolbar, SIGNAL(reloadSelected()), m_clientProxy, SLOT(reloadQmlViewer())); @@ -726,6 +739,11 @@ void InspectorUi::setupToolbar(bool doConnect) disconnect(m_clientProxy, SIGNAL(selectedColorChanged(QColor)), m_toolbar, SLOT(setSelectedColor(QColor))); disconnect(m_clientProxy, SIGNAL(animationSpeedChanged(qreal)), m_toolbar, SLOT(setAnimationSpeed(qreal))); - m_toolbar->disable(); + } + + if (m_clientProxy && m_clientProxy->isConnected()) { + enable(); + } else { + disable(); } } diff --git a/src/plugins/qmljsinspector/qmljsinspector.h b/src/plugins/qmljsinspector/qmljsinspector.h index 494b0fde913..ae56e4eca1a 100644 --- a/src/plugins/qmljsinspector/qmljsinspector.h +++ b/src/plugins/qmljsinspector/qmljsinspector.h @@ -119,6 +119,8 @@ public slots: void setApplyChangesToQmlObserver(bool applyChanges); private slots: + void enable(); + void disable(); void gotoObjectReferenceDefinition(const QDeclarativeDebugObjectReference &obj); void setSelectedItemsByObjectReference(QList objectReferences); diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp index a972d1ba505..a89f00d0baa 100644 --- a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp @@ -118,14 +118,16 @@ void InspectorPlugin::extensionsInitialized() m_inspectorUi->setupUi(); } -// The adapter object is only added to the pool with a succesful connection, -// so we can immediately init our stuff. void InspectorPlugin::objectAdded(QObject *object) { Debugger::QmlAdapter *adapter = qobject_cast(object); if (adapter) { m_clientProxy = new ClientProxy(adapter); - m_inspectorUi->connected(m_clientProxy); + if (m_clientProxy->isConnected()) { + clientProxyConnected(); + } else { + connect(m_clientProxy, SIGNAL(connected()), this, SLOT(clientProxyConnected())); + } return; } @@ -148,4 +150,9 @@ void InspectorPlugin::aboutToRemoveObject(QObject *obj) } } +void InspectorPlugin::clientProxyConnected() +{ + m_inspectorUi->connected(m_clientProxy); +} + Q_EXPORT_PLUGIN(InspectorPlugin) diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.h b/src/plugins/qmljsinspector/qmljsinspectorplugin.h index ea4a378c74e..f0f9500fb74 100644 --- a/src/plugins/qmljsinspector/qmljsinspectorplugin.h +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.h @@ -74,6 +74,7 @@ public: private slots: void objectAdded(QObject *object); void aboutToRemoveObject(QObject *obj); + void clientProxyConnected(); private: void createActions(); diff --git a/src/plugins/qmljsinspector/qmljsobserverclient.cpp b/src/plugins/qmljsinspector/qmljsobserverclient.cpp index 2670008ad65..aef5b972388 100644 --- a/src/plugins/qmljsinspector/qmljsobserverclient.cpp +++ b/src/plugins/qmljsinspector/qmljsobserverclient.cpp @@ -53,7 +53,11 @@ QmlJSObserverClient::QmlJSObserverClient(QDeclarativeDebugConnection *client, : QDeclarativeDebugClient(QLatin1String("QDeclarativeObserverMode"), client) , m_connection(client) { - setEnabled(true); +} + +void QmlJSObserverClient::statusChanged(Status status) +{ + emit connectedStatusChanged(status); } void QmlJSObserverClient::messageReceived(const QByteArray &message) diff --git a/src/plugins/qmljsinspector/qmljsobserverclient.h b/src/plugins/qmljsinspector/qmljsobserverclient.h index 7928984f898..2c7753a4397 100644 --- a/src/plugins/qmljsinspector/qmljsobserverclient.h +++ b/src/plugins/qmljsinspector/qmljsobserverclient.h @@ -80,6 +80,8 @@ public: void clearComponentCache(); signals: + void connectedStatusChanged(QDeclarativeDebugClient::Status status); + void currentObjectsChanged(const QList &debugIds); void selectedColorChanged(const QColor &color); void colorPickerActivated(); @@ -92,6 +94,7 @@ signals: void contextPathUpdated(const QStringList &path); protected: + virtual void statusChanged(Status); virtual void messageReceived(const QByteArray &); private: diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 9027950cea4..83486bbaf99 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -129,6 +130,11 @@ void QmlProject::refresh(RefreshOptions options) QmlJS::ModelManagerInterface::ProjectInfo pinfo(this); pinfo.sourceFiles = files(); pinfo.importPaths = importPaths(); + + if (pinfo.qmlDumpPath.isNull()) { + pinfo.qmlDumpPath = Qt4ProjectManager::QmlDumpTool::qmlDumpPath(this); + } + m_modelManager->updateProjectInfo(pinfo); } diff --git a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp index 260cd600038..c58241c2c89 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp @@ -32,6 +32,7 @@ #include "qmlprojectconstants.h" #include +#include #include @@ -61,7 +62,7 @@ QmlProjectApplicationWizard::~QmlProjectApplicationWizard() Core::BaseFileWizardParameters QmlProjectApplicationWizard::parameters() { Core::BaseFileWizardParameters parameters(ProjectWizard); - parameters.setIcon(QIcon(QLatin1String(Constants::QML_WIZARD_ICON))); + parameters.setIcon(QIcon(QLatin1String(Qt4ProjectManager::Constants::QML_WIZARD_ICON))); parameters.setDisplayName(tr("Qt Quick UI")); parameters.setId(QLatin1String("QA.QML Application")); @@ -70,9 +71,9 @@ Core::BaseFileWizardParameters QmlProjectApplicationWizard::parameters() "You can review Qt Quick UI projects in the QML Viewer and you need not build them. " "You do not need to have the development environment installed " "on your computer to create and run this type of projects.")); - parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY)); - parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE, - Constants::QML_WIZARD_TR_CATEGORY)); + parameters.setCategory(QLatin1String(Qt4ProjectManager::Constants::QML_WIZARD_CATEGORY)); + parameters.setDisplayCategory(QCoreApplication::translate(Qt4ProjectManager::Constants::QML_WIZARD_TR_SCOPE, + Qt4ProjectManager::Constants::QML_WIZARD_TR_CATEGORY)); return parameters; } diff --git a/src/plugins/qmlprojectmanager/qmlprojectconstants.h b/src/plugins/qmlprojectmanager/qmlprojectconstants.h index cd014f52767..3a4bda66a00 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectconstants.h +++ b/src/plugins/qmlprojectmanager/qmlprojectconstants.h @@ -47,12 +47,6 @@ const char *const FILES_EDITOR_ID = "Qt4.QmlProjectEditor"; const char *const FILES_EDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", ".qmlproject Editor"); const char *const FILES_MIMETYPE = QMLMIMETYPE; -// Wizard category -const char * const QML_WIZARD_CATEGORY = "F.Projects"; // (after Qt) -const char * const QML_WIZARD_TR_SCOPE = "QmlProjectManager"; -const char * const QML_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("QmlProjectManager", "Qt Quick Project"); -const char * const QML_WIZARD_ICON = ":/qmlproject/images/qml_wizard.png"; - } // namespace Constants } // namespace QmlProjectManager diff --git a/src/plugins/qmlprojectmanager/qmlprojectimportwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectimportwizard.cpp index 640f0175e38..e3537db8411 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectimportwizard.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectimportwizard.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -116,9 +117,9 @@ Core::BaseFileWizardParameters QmlProjectImportWizard::parameters() parameters.setDisplayName(tr("Import Existing QML Directory")); parameters.setId(QLatin1String("QI.QML Import")); parameters.setDescription(tr("Creates a QML project from an existing directory of QML files.")); - parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY)); - parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE, - Constants::QML_WIZARD_TR_CATEGORY)); + parameters.setCategory(QLatin1String(Qt4ProjectManager::Constants::QML_WIZARD_CATEGORY)); + parameters.setDisplayCategory(QCoreApplication::translate(Qt4ProjectManager::Constants::QML_WIZARD_TR_SCOPE, + Qt4ProjectManager::Constants::QML_WIZARD_TR_CATEGORY)); return parameters; } diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp index 021c55d0db7..ec16ed0e05d 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp @@ -177,6 +177,8 @@ QList QmlProjectNode::supportedActi Q_UNUSED(node); QList actions; actions.append(AddNewFile); + actions.append(EraseFile); + actions.append(Rename); return actions; } @@ -213,14 +215,13 @@ bool QmlProjectNode::removeFiles(const ProjectExplorer::FileType /*fileType*/, bool QmlProjectNode::deleteFiles(const ProjectExplorer::FileType /*fileType*/, const QStringList & /*filePaths*/) { - return false; + return true; } - bool QmlProjectNode::renameFile(const ProjectExplorer::FileType /*fileType*/, const QString & /*filePath*/, const QString & /*newFilePath*/) { - return false; + return true; } } // namespace Internal diff --git a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp index c0c0b7ce977..d41ac9df639 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp @@ -77,6 +77,7 @@ QmlRunControl::QmlRunControl(QmlProjectRunConfiguration *runConfiguration, QStri QmlRunControl::~QmlRunControl() { + stop(); } void QmlRunControl::start() diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui index 226479a345f..bb3ecebd462 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui @@ -269,7 +269,7 @@ - Explore Qt C++ Examples + Explore Qt C++ examples: @@ -291,14 +291,14 @@ - Examples not installed... + Examples Not Installed... - Explore Qt Quick Examples + Explore Qt Quick examples: @@ -320,14 +320,14 @@ - Examples not installed... + Examples Not Installed... - Explore Qt C++ Mobile Examples + Explore Qt C++ mobile examples: @@ -349,7 +349,7 @@ - Examples not installed... + Examples Not Installed... @@ -457,14 +457,14 @@ border-bottom: 1px solid "#C9C9C9"; - Image + Image - Text + Text true @@ -489,7 +489,7 @@ border-bottom: 1px solid "#C9C9C9"; - Link + Link diff --git a/src/plugins/qt4projectmanager/librarydetailswidget.ui b/src/plugins/qt4projectmanager/librarydetailswidget.ui index cf8da064a48..af3be9bc3af 100644 --- a/src/plugins/qt4projectmanager/librarydetailswidget.ui +++ b/src/plugins/qt4projectmanager/librarydetailswidget.ui @@ -10,9 +10,6 @@ 306 - - Form - diff --git a/src/plugins/qt4projectmanager/profileeditor.cpp b/src/plugins/qt4projectmanager/profileeditor.cpp index 8b79faf1836..d7cf57278af 100644 --- a/src/plugins/qt4projectmanager/profileeditor.cpp +++ b/src/plugins/qt4projectmanager/profileeditor.cpp @@ -140,7 +140,8 @@ void ProFileEditor::setFontSettings(const TextEditor::FontSettings &fs) if (categories.isEmpty()) { categories << QLatin1String(TextEditor::Constants::C_TYPE) << QLatin1String(TextEditor::Constants::C_KEYWORD) - << QLatin1String(TextEditor::Constants::C_COMMENT); + << QLatin1String(TextEditor::Constants::C_COMMENT) + << QLatin1String(TextEditor::Constants::C_VISUAL_WHITESPACE); } const QVector formats = fs.toTextCharFormats(categories); diff --git a/src/plugins/qt4projectmanager/profilehighlighter.cpp b/src/plugins/qt4projectmanager/profilehighlighter.cpp index cf9e72d2ca0..14daeee9f63 100644 --- a/src/plugins/qt4projectmanager/profilehighlighter.cpp +++ b/src/plugins/qt4projectmanager/profilehighlighter.cpp @@ -201,5 +201,6 @@ void ProFileHighlighter::highlightBlock(const QString &text) if (i >= text.length()) break; } -} + applyFormatToSpaces(text, m_formats[ProfileVisualWhitespaceFormat]); +} diff --git a/src/plugins/qt4projectmanager/profilehighlighter.h b/src/plugins/qt4projectmanager/profilehighlighter.h index 87dadce27e1..78ede9d738c 100644 --- a/src/plugins/qt4projectmanager/profilehighlighter.h +++ b/src/plugins/qt4projectmanager/profilehighlighter.h @@ -46,6 +46,7 @@ public: ProfileVariableFormat, ProfileFunctionFormat, ProfileCommentFormat, + ProfileVisualWhitespaceFormat, NumProfileFormats }; diff --git a/src/plugins/qt4projectmanager/qmldumptool.cpp b/src/plugins/qt4projectmanager/qmldumptool.cpp index 6b6c52411f1..cc675ce6b0f 100644 --- a/src/plugins/qt4projectmanager/qmldumptool.cpp +++ b/src/plugins/qt4projectmanager/qmldumptool.cpp @@ -30,13 +30,90 @@ #include "qmldumptool.h" #include "qt4project.h" #include "qt4projectmanagerconstants.h" +#include "qtversionmanager.h" #include +#include #include +#include +#include +#include #include #include #include #include +#include + +namespace { +using namespace Qt4ProjectManager; + +class QmlDumpBuildTask; + +typedef QHash QmlDumpByVersion; +Q_GLOBAL_STATIC(QmlDumpByVersion, runningQmlDumpBuilds); + +// A task suitable to be run by QtConcurrent to build qmldump. +class QmlDumpBuildTask : public QObject { + Q_DISABLE_COPY(QmlDumpBuildTask) + Q_OBJECT +public: + explicit QmlDumpBuildTask(QtVersion *version) + : m_version(*version) + { + runningQmlDumpBuilds()->insert(m_version.uniqueId(), this); + } + + void run(QFutureInterface &future) + { + future.setProgressRange(0, 5); + future.setProgressValue(1); + const QString output = m_version.buildDebuggingHelperLibrary(future, true); + + const QString qtInstallData = m_version.versionInfo().value("QT_INSTALL_DATA"); + QString path = QmlDumpTool::toolByInstallData(qtInstallData); + if (path.isEmpty()) { + qWarning() << "Could not build QML plugin dumping helper for " << m_version.displayName() + << "\nOutput:\n" << output; + } + + // proceed in gui thread + metaObject()->invokeMethod(this, "finish", Qt::QueuedConnection, Q_ARG(QString, path)); + } + + void updateProjectWhenDone(ProjectExplorer::Project *project) + { + m_projectsToUpdate.insert(project); + } + +public slots: + void finish(QString qmldumpPath) + { + deleteLater(); + runningQmlDumpBuilds()->remove(m_version.uniqueId()); + + if (qmldumpPath.isEmpty()) + return; + + // update qmldump path for all the project + QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance(); + if (!modelManager) + return; + + foreach (ProjectExplorer::Project *project, m_projectsToUpdate) { + QmlJS::ModelManagerInterface::ProjectInfo projectInfo = modelManager->projectInfo(project); + if (projectInfo.qmlDumpPath.isEmpty()) { + projectInfo.qmlDumpPath = qmldumpPath; + modelManager->updateProjectInfo(projectInfo); + } + } + } + +private: + QSet m_projectsToUpdate; + QtVersion m_version; +}; +} // end of anonymous namespace + namespace Qt4ProjectManager { @@ -49,26 +126,56 @@ static inline QStringList validBinaryFilenames() << QLatin1String("qmldump.app/Contents/MacOS/qmldump"); } -bool QmlDumpTool::canBuild(const QString &installHeadersDir) +bool QmlDumpTool::canBuild(const QtVersion *qtVersion) { - QString qDeclHeader = installHeadersDir + QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h"); - return QFile::exists(qDeclHeader); + const QString installHeaders = qtVersion->versionInfo().value("QT_INSTALL_HEADERS"); + const QString header = installHeaders + QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h"); + return qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID) + && (checkMinimumQtVersion(qtVersion->qtVersionString(), 4, 7, 1) || QFile::exists(header)); } -QString QmlDumpTool::toolForProject(ProjectExplorer::Project *project) +static QtVersion *qtVersionForProject(ProjectExplorer::Project *project) { if (project && project->id() == Qt4ProjectManager::Constants::QT4PROJECT_ID) { Qt4Project *qt4Project = static_cast(project); if (qt4Project && qt4Project->activeTarget() - && qt4Project->activeTarget()->activeBuildConfiguration()) { + && qt4Project->activeTarget()->activeBuildConfiguration()) { QtVersion *version = qt4Project->activeTarget()->activeBuildConfiguration()->qtVersion(); - if (version->isValid()) { - QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA"); - QString toolPath = toolByInstallData(qtInstallData); - return toolPath; + if (version->isValid()) + return version; + } + return 0; + } + + // else, find any desktop Qt version that has qmldump, or - if there isn't any - + // one that could build it + QtVersion *desktopQt = 0; + QtVersionManager *qtVersions = QtVersionManager::instance(); + foreach (QtVersion *version, qtVersions->validVersions()) { + if (version->supportsTargetId(Constants::DESKTOP_TARGET_ID)) { + const QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA"); + const QString path = QmlDumpTool::toolByInstallData(qtInstallData); + if (!path.isEmpty()) + return version; + + if (!desktopQt && QmlDumpTool::canBuild(version)) { + desktopQt = version; } } } + + return desktopQt; +} + +QString QmlDumpTool::toolForProject(ProjectExplorer::Project *project) +{ + QtVersion *version = qtVersionForProject(project); + if (version) { + QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA"); + QString toolPath = toolByInstallData(qtInstallData); + return toolPath; + } + return QString(); } @@ -116,11 +223,11 @@ QString QmlDumpTool::copy(const QString &qtInstallData, QString *errorMessage) QString sourcePath = Core::ICore::instance()->resourcePath() + QLatin1String("/qml/qmldump/"); // Try to find a writeable directory. - foreach(const QString &directory, directories) + foreach(const QString &directory, directories) { if (copyFiles(sourcePath, files, directory, errorMessage)) { - errorMessage->clear(); return directory; } + } *errorMessage = QCoreApplication::translate("ProjectExplorer::QmlDumpTool", "qmldump could not be built in any of the directories:\n- %1\n\nReason: %2") .arg(directories.join(QLatin1String("\n- ")), *errorMessage); @@ -139,4 +246,41 @@ QStringList QmlDumpTool::installDirectories(const QString &qtInstallData) return directories; } -} // namespace +QString QmlDumpTool::qmlDumpPath(ProjectExplorer::Project *project) +{ + QString path; + + path = Qt4ProjectManager::QmlDumpTool::toolForProject(project); + + QtVersion *version = qtVersionForProject(project); + if (version && path.isEmpty()) { + if (runningQmlDumpBuilds()->contains(version->uniqueId())) { + runningQmlDumpBuilds()->value(version->uniqueId())->updateProjectWhenDone(project); + } else { + QmlDumpBuildTask *buildTask = new QmlDumpBuildTask(version); + buildTask->updateProjectWhenDone(project); + QFuture task = QtConcurrent::run(&QmlDumpBuildTask::run, buildTask); + const QString taskName = QmlDumpBuildTask::tr("Building helper"); + Core::ICore::instance()->progressManager()->addTask(task, taskName, + QLatin1String("Qt4ProjectManager::BuildHelpers")); + } + return path; + } + + if (!path.isEmpty()) { + QFileInfo qmldumpFileInfo(path); + if (!qmldumpFileInfo.exists()) { + qWarning() << "QmlDumpTool::qmlDumpPath: qmldump executable does not exist at" << path; + path.clear(); + } else if (!qmldumpFileInfo.isFile()) { + qWarning() << "QmlDumpTool::qmlDumpPath: " << path << " is not a file"; + path.clear(); + } + } + + return path; +} + +} // namespace Qt4ProjectManager + +#include "qmldumptool.moc" diff --git a/src/plugins/qt4projectmanager/qmldumptool.h b/src/plugins/qt4projectmanager/qmldumptool.h index 5ec3355659c..6924690865b 100644 --- a/src/plugins/qt4projectmanager/qmldumptool.h +++ b/src/plugins/qt4projectmanager/qmldumptool.h @@ -42,11 +42,12 @@ namespace ProjectExplorer { } namespace Qt4ProjectManager { +class QtVersion; class QT4PROJECTMANAGER_EXPORT QmlDumpTool : public Utils::BuildableHelperLibrary { public: - static bool canBuild(const QString &installHeadersDir); + static bool canBuild(const QtVersion *qtVersion); static QString toolForProject(ProjectExplorer::Project *project); static QString toolByInstallData(const QString &qtInstallData); static QStringList locationsByInstallData(const QString &qtInstallData); @@ -59,6 +60,8 @@ public: // Copy the source files to a target location and return the chosen target location. static QString copy(const QString &qtInstallData, QString *errorMessage); + static QString qmlDumpPath(ProjectExplorer::Project *project); + private: static QStringList installDirectories(const QString &qtInstallData); diff --git a/src/plugins/qt4projectmanager/qmlobservertool.cpp b/src/plugins/qt4projectmanager/qmlobservertool.cpp index 3a64da2ed7a..f2b55cbac65 100644 --- a/src/plugins/qt4projectmanager/qmlobservertool.cpp +++ b/src/plugins/qt4projectmanager/qmlobservertool.cpp @@ -32,6 +32,7 @@ #include "qt4project.h" #include "qt4projectmanagerconstants.h" #include +#include #include #include @@ -50,10 +51,10 @@ static inline QStringList validBinaryFilenames() << QLatin1String("QMLObserver.app/Contents/MacOS/QMLObserver"); } -bool QmlObserverTool::canBuild(const QString &installHeadersDir) +bool QmlObserverTool::canBuild(const QtVersion *qtVersion) { - QString qDeclHeader = installHeadersDir + QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h"); - return QFile::exists(qDeclHeader); + return qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID) + && checkMinimumQtVersion(qtVersion->qtVersionString(), 4, 7, 1); } QString QmlObserverTool::toolForProject(ProjectExplorer::Project *project) @@ -139,13 +140,15 @@ QString QmlObserverTool::copy(const QString &qtInstallData, QString *errorMessag << QLatin1String("LICENSE.LGPL") << QLatin1String("LGPL_EXCEPTION.TXT"); QStringList debuggerLibFiles; - debuggerLibFiles << QLatin1String("jsdebuggeragent.cpp") << QLatin1String("private_headers.pri") + debuggerLibFiles << QLatin1String("jsdebuggeragent.cpp") << QLatin1String("qdeclarativeobserverservice.cpp") << QLatin1String("qdeclarativeviewobserver.cpp") << QLatin1String("qdeclarativeviewobserver_p.h") << QLatin1String("qmljsdebugger.pri") << QLatin1String("qmljsdebugger.pro") << QLatin1String("qmljsdebugger-lib.pri") << QLatin1String("include/jsdebuggeragent.h") << QLatin1String("include/qdeclarativeobserverservice.h") << QLatin1String("include/qdeclarativeviewobserver.h") << QLatin1String("include/qmljsdebugger_global.h") - << QLatin1String("include/qmlobserverconstants.h"); + << QLatin1String("include/qmlobserverconstants.h") + << QLatin1String("include/qt_private/qdeclarativedebughelper_p.h") + << QLatin1String("include/qt_private/qdeclarativedebugservice_p.h"); QStringList debuggerLibEditorFiles; debuggerLibEditorFiles << QLatin1String("abstractformeditortool.cpp") << QLatin1String("abstractformeditortool.h") @@ -183,7 +186,8 @@ QString QmlObserverTool::copy(const QString &qtInstallData, QString *errorMessag foreach(const QString &directory, directories) { if (!mkpath(directory + QLatin1String("/content/images"), errorMessage) || !mkpath(directory + QLatin1String("/qmljsdebugger/editor/images"), errorMessage) - || !mkpath(directory + QLatin1String("/qmljsdebugger/include"), errorMessage)) + || !mkpath(directory + QLatin1String("/qmljsdebugger/include"), errorMessage) + || !mkpath(directory + QLatin1String("/qmljsdebugger/include/qt_private"), errorMessage)) { continue; } else { diff --git a/src/plugins/qt4projectmanager/qmlobservertool.h b/src/plugins/qt4projectmanager/qmlobservertool.h index 625e625c760..78c8ffc5ae9 100644 --- a/src/plugins/qt4projectmanager/qmlobservertool.h +++ b/src/plugins/qt4projectmanager/qmlobservertool.h @@ -43,10 +43,12 @@ namespace ProjectExplorer { namespace Qt4ProjectManager { +class QtVersion; + class QT4PROJECTMANAGER_EXPORT QmlObserverTool : public Utils::BuildableHelperLibrary { public: - static bool canBuild(const QString &installHeadersDir); + static bool canBuild(const QtVersion *qtVersion); static QString toolForProject(ProjectExplorer::Project *project); static QString toolByInstallData(const QString &qtInstallData); static QStringList locationsByInstallData(const QString &qtInstallData); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp index b0a199f3d45..9ec88695841 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeployables.cpp @@ -153,7 +153,6 @@ QString MaemoDeployables::remoteExecutableFilePath(const QString &localExecutabl if (model->localExecutableFilePath() == localExecutableFilePath) return model->remoteExecutableFilePath(); } - qWarning("No remote executable specified!"); return QString(); } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp index 3b03a7bfeab..804f7e4d880 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp @@ -486,6 +486,11 @@ void MaemoDeployStep::setupMount() void MaemoDeployStep::prepareSftpConnection() { + // TODO: Close channel when upload has finished/failed/etc. + if (m_uploader) { + disconnect(m_uploader.data(), 0, this, 0); + m_uploader->closeChannel(); + } m_uploader = m_connection->createSftpChannel(); connect(m_uploader.data(), SIGNAL(initialized()), this, SLOT(handleSftpChannelInitialized())); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp index 3ab3575939d..476346c9264 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp @@ -128,6 +128,7 @@ void MaemoPackageCreationStep::run(QFutureInterface &fi) { bool success; if (m_packagingEnabled) { + // TODO: Make the build process asynchronous; i.e. no waitFor()-functions etc. QProcess * const buildProc = new QProcess; connect(buildProc, SIGNAL(readyReadStandardOutput()), this, SLOT(handleBuildOutput())); @@ -548,9 +549,6 @@ void MaemoPackageCreationStep::addWorkaroundForHarmattanBug(const QString &rules const int makeInstallEol = content.indexOf('\n', makeInstallLine); if (makeInstallEol == -1) return; - const QByteArray lineBefore("Icon=" + projectName().toUtf8()); - const QByteArray lineAfter("Icon=/usr/share/icons/hicolor/64x64/apps/" - + projectName().toUtf8() + ".png"); QString desktopFileDir = QFileInfo(rulesFile).dir().path() + QLatin1Char('/') + projectName() + QLatin1String("/usr/share/applications/"); @@ -563,15 +561,18 @@ void MaemoPackageCreationStep::addWorkaroundForHarmattanBug(const QString &rules int insertPos = makeInstallEol + 1; foreach (const Qt4ProFileNode * const proFile, proFiles) { const QString appName = proFile->targetInformation().target; + const QByteArray lineBefore("Icon=" + appName.toUtf8()); + const QByteArray lineAfter("Icon=/usr/share/icons/hicolor/64x64/apps/" + + appName.toUtf8() + ".png"); const QString desktopFilePath - = desktopFileDir + appName + QLatin1String(".desktop"); + = desktopFileDir + appName + QLatin1String(".desktop"); const QString tmpFile = desktopFileDir + appName + QLatin1String(".sed"); const QByteArray sedCmd = "\tsed 's:" + lineBefore + ':' + lineAfter - + ":' " + desktopFilePath.toLocal8Bit() + " > " + tmpFile.toUtf8() - + '\n'; - const QByteArray mvCmd = "\tmv " + tmpFile.toUtf8() + ' ' - + desktopFilePath.toUtf8() + '\n'; + + ":' " + desktopFilePath.toLocal8Bit() + " > " + + tmpFile.toLocal8Bit() + " || echo -n\n"; + const QByteArray mvCmd = "\tmv " + tmpFile.toLocal8Bit() + ' ' + + desktopFilePath.toLocal8Bit() + " || echo -n\n"; content.insert(insertPos, sedCmd); insertPos += sedCmd.length(); content.insert(insertPos, mvCmd); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp index 734cc0750c6..3aca439313d 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp @@ -35,9 +35,12 @@ #include #include #include +#include #include +#define ASSERT_STATE(state) assertState(state, Q_FUNC_INFO) + using namespace Core; namespace Qt4ProjectManager { @@ -45,7 +48,7 @@ namespace Internal { MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent) : QObject(parent), m_utfsServerTimer(new QTimer(this)), - m_uploadJobId(SftpInvalidJob), m_stop(false) + m_uploadJobId(SftpInvalidJob), m_state(Inactive) { connect(m_utfsServerTimer, SIGNAL(timeout()), this, SLOT(handleUtfsServerTimeout())); @@ -58,12 +61,16 @@ MaemoRemoteMounter::~MaemoRemoteMounter() void MaemoRemoteMounter::setConnection(const Core::SshConnection::Ptr &connection) { + ASSERT_STATE(Inactive); + m_connection = connection; } bool MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mountSpec, bool mountAsRoot) { + ASSERT_STATE(Inactive); + if (mountSpec.isValid()) { if (!m_portList.hasMore()) return false; @@ -75,21 +82,27 @@ bool MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mo void MaemoRemoteMounter::mount() { - m_stop = false; + ASSERT_STATE(Inactive); Q_ASSERT(m_utfsServers.isEmpty()); + Q_ASSERT(m_connection); if (!m_toolChain->allowsRemoteMounts()) m_mountSpecs.clear(); - if (m_mountSpecs.isEmpty()) + if (m_mountSpecs.isEmpty()) { + setState(Inactive); + emit reportProgress(tr("No directories to mount")); emit mounted(); - else + } else { deployUtfsClient(); + } } void MaemoRemoteMounter::unmount() { - m_stop = false; + ASSERT_STATE(Inactive); + if (m_mountSpecs.isEmpty()) { + emit reportProgress(tr("No directories to unmount")); emit unmounted(); return; } @@ -108,13 +121,17 @@ void MaemoRemoteMounter::unmount() SLOT(handleUnmountProcessFinished(int))); connect(m_unmountProcess.data(), SIGNAL(errorOutputAvailable(QByteArray)), this, SLOT(handleUmountStderr(QByteArray))); + setState(Unmounting); m_unmountProcess->start(); } void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus) { - if (m_stop) + ASSERT_STATE(QList() << Unmounting << Inactive); + + if (m_state == Inactive) return; + setState(Inactive); QString errorMsg; switch (exitStatus) { @@ -148,7 +165,7 @@ void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus) void MaemoRemoteMounter::stop() { - m_stop = true; + setState(Inactive); if (m_utfsClientUploader) { disconnect(m_utfsClientUploader.data(), 0, this, 0); m_utfsClientUploader->closeChannel(); @@ -172,19 +189,24 @@ void MaemoRemoteMounter::deployUtfsClient() connect(m_utfsClientUploader.data(), SIGNAL(initializationFailed(QString)), this, SLOT(handleUploaderInitializationFailed(QString))); m_utfsClientUploader->initialize(); + + setState(UploaderInitializing); } void MaemoRemoteMounter::handleUploaderInitializationFailed(const QString &reason) { - if (m_stop) - return; + ASSERT_STATE(QList() << UploaderInitializing << Inactive); - emit error(tr("Failed to establish SFTP connection: %1").arg(reason)); + if (m_state == UploaderInitializing) { + emit error(tr("Failed to establish SFTP connection: %1").arg(reason)); + setState(Inactive); + } } void MaemoRemoteMounter::handleUploaderInitialized() { - if (m_stop) + ASSERT_STATE(QList() << UploaderInitializing << Inactive); + if (m_state == Inactive) return; emit reportProgress(tr("Uploading UTFS client...")); @@ -195,14 +217,20 @@ void MaemoRemoteMounter::handleUploaderInitialized() = m_toolChain->maddeRoot() + QLatin1String("/madlib/armel/utfs-client"); m_uploadJobId = m_utfsClientUploader->uploadFile(localFile, utfsClientOnDevice(), SftpOverwriteExisting); - if (m_uploadJobId == SftpInvalidJob) + if (m_uploadJobId == SftpInvalidJob) { + setState(Inactive); emit error(tr("Could not upload UTFS client (%1).").arg(localFile)); + } else { + setState(UploadRunning); + } } void MaemoRemoteMounter::handleUploadFinished(Core::SftpJobId jobId, const QString &errorMsg) { - if (m_stop) + ASSERT_STATE(QList() << UploadRunning << Inactive); + + if (m_state == Inactive) return; if (jobId != m_uploadJobId) { @@ -213,6 +241,7 @@ void MaemoRemoteMounter::handleUploadFinished(Core::SftpJobId jobId, m_uploadJobId = SftpInvalidJob; if (!errorMsg.isEmpty()) { emit error(tr("Could not upload UTFS client: %1").arg(errorMsg)); + setState(Inactive); return; } @@ -255,22 +284,31 @@ void MaemoRemoteMounter::startUtfsClients() connect(m_mountProcess.data(), SIGNAL(errorOutputAvailable(QByteArray)), this, SLOT(handleUtfsClientStderr(QByteArray))); m_mountProcess->start(); + + setState(UtfsClientsStarting); } void MaemoRemoteMounter::handleUtfsClientsStarted() { - if (!m_stop) + ASSERT_STATE(QList() << UtfsClientsStarting << Inactive); + if (m_state == UtfsClientsStarting) { + setState(UtfsClientsStarted); QTimer::singleShot(250, this, SLOT(startUtfsServers())); + } } void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus) { - if (m_stop) + ASSERT_STATE(QList() << UtfsClientsStarting << UtfsClientsStarted + << UtfsServersStarted << Inactive); + + if (m_state == Inactive) return; + setState(Inactive); if (exitStatus == SshRemoteProcess::ExitedNormally && m_mountProcess->exitCode() == 0) { - m_utfsServerTimer->stop(); + emit reportProgress(tr("Mount operation succeeded.")); emit mounted(); } else { QString errMsg = tr("Failure running UTFS client: %1") @@ -284,7 +322,9 @@ void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus) void MaemoRemoteMounter::startUtfsServers() { - if (m_stop) + ASSERT_STATE(QList() << UtfsClientsStarted << Inactive); + + if (m_state == Inactive) return; emit reportProgress(tr("Starting UTFS servers...")); @@ -310,11 +350,13 @@ void MaemoRemoteMounter::startUtfsServers() m_utfsServers << utfsServerProc; utfsServerProc->start(utfsServer(), utfsServerArgs); } + + setState(UtfsServersStarted); } void MaemoRemoteMounter::handleUtfsServerStderr() { - if (!m_stop) { + if (m_state != Inactive) { QProcess * const proc = static_cast(sender()); const QByteArray &output = proc->readAllStandardError(); emit debugOutput(QString::fromLocal8Bit(output)); @@ -323,7 +365,7 @@ void MaemoRemoteMounter::handleUtfsServerStderr() void MaemoRemoteMounter::handleUtfsServerError(QProcess::ProcessError) { - if (m_stop || m_utfsServers.isEmpty()) + if (m_state == Inactive || m_utfsServers.isEmpty()) return; QProcess * const proc = static_cast(sender()); @@ -334,25 +376,29 @@ void MaemoRemoteMounter::handleUtfsServerError(QProcess::ProcessError) .arg(QString::fromLocal8Bit(errorOutput)); } killAllUtfsServers(); - m_utfsServerTimer->stop(); + killUtfsClients(); emit error(tr("Error running UTFS server: %1").arg(errorString)); + + setState(Inactive); } void MaemoRemoteMounter::handleUtfsServerFinished(int /* exitCode */, QProcess::ExitStatus exitStatus) { - if (!m_stop && exitStatus != QProcess::NormalExit) + if (m_state != Inactive && exitStatus != QProcess::NormalExit) handleUtfsServerError(static_cast(sender())->error()); } void MaemoRemoteMounter::handleUtfsClientStderr(const QByteArray &output) { - m_utfsClientStderr += output; + if (m_state != Inactive) + m_utfsClientStderr += output; } void MaemoRemoteMounter::handleUmountStderr(const QByteArray &output) { - m_umountStderr += output; + if (m_state != Inactive) + m_umountStderr += output; } QString MaemoRemoteMounter::utfsClientOnDevice() const @@ -383,11 +429,42 @@ void MaemoRemoteMounter::killUtfsServer(QProcess *proc) void MaemoRemoteMounter::handleUtfsServerTimeout() { - if (m_stop) + ASSERT_STATE(QList() << UtfsServersStarted << Inactive); + if (m_state == Inactive) return; killAllUtfsServers(); + killUtfsClients(); emit error(tr("Timeout waiting for UTFS servers to connect.")); + + setState(Inactive); +} + +void MaemoRemoteMounter::assertState(State expectedState, const char *func) +{ + assertState(QList() << expectedState, func); +} + +void MaemoRemoteMounter::assertState(const QList &expectedStates, + const char *func) +{ + QTC_ASSERT(expectedStates.contains(m_state), + qDebug("Unexpected state %d at %s.", m_state, func)) +} + +void MaemoRemoteMounter::setState(State newState) +{ + if (newState == Inactive) + m_utfsServerTimer->stop(); + m_state = newState; +} + +void MaemoRemoteMounter::killUtfsClients() +{ + const SshRemoteProcess::Ptr utfsClientKiller + = m_connection->createRemoteProcess("pkill utfs-client; sleep 1; " + "pkill -9 utfs-client"); + utfsClientKiller->start(); } } // namespace Internal diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h index 334426a1373..9445d3d050d 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h @@ -75,7 +75,7 @@ signals: void mounted(); void unmounted(); void error(const QString &reason); - void reportProgress(const QString &progressOutput); + void reportProgress(const QString &progressOutput); // TODO: No progress output when there's nothingt to mount void debugOutput(const QString &output); private slots: @@ -95,10 +95,20 @@ private slots: void startUtfsServers(); private: + enum State { + Inactive, Unmounting, UploaderInitializing, UploadRunning, + UtfsClientsStarting, UtfsClientsStarted, UtfsServersStarted + }; + + void assertState(State expectedState, const char *func); + void assertState(const QList &expectedStates, const char *func); + void setState(State newState); + void deployUtfsClient(); void startUtfsClients(); void killUtfsServer(QProcess *proc); void killAllUtfsServers(); + void killUtfsClients(); QString utfsClientOnDevice() const; QString utfsServer() const; @@ -123,10 +133,11 @@ private: typedef QSharedPointer ProcPtr; QList m_utfsServers; - bool m_stop; QByteArray m_utfsClientStderr; QByteArray m_umountStderr; MaemoPortList m_portList; + + State m_state; }; } // namespace Internal diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp index 5ea12bc90e2..b39da25f22d 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp @@ -75,11 +75,6 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoSshRunner::~MaemoSshRunner() {} -void MaemoSshRunner::setConnection(const QSharedPointer &connection) -{ - m_connection = connection; -} - void MaemoSshRunner::start() { // Should not happen. diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h index 6d7ea730ec6..96447e0c4ec 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h @@ -60,8 +60,6 @@ public: bool debugging); ~MaemoSshRunner(); - void setConnection(const QSharedPointer &connection); - void start(); void stop(); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp index bae7dd37229..3b17b607f82 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp @@ -176,10 +176,16 @@ bool S60CreatePackageStep::init() m_environment = qt4BuildConfiguration()->environment(); m_args.clear(); - if (m_createSmartInstaller) - m_args << QLatin1String("installer_sis"); + if (m_createSmartInstaller) { + if(signingMode() == NotSigned) + m_args << QLatin1String("unsigned_installer_sis"); + else + m_args << QLatin1String("installer_sis"); + } else if (signingMode() == NotSigned) + m_args << QLatin1String("unsigned_sis"); else m_args << QLatin1String("sis"); + if (signingMode() == SignCustom) { m_args << QLatin1String(MAKE_CERTIFICATE_ARGUMENT) + QDir::toNativeSeparators(customSignaturePath()) << QLatin1String(MAKE_KEY_ARGUMENT) + QDir::toNativeSeparators(customKeyPath()); @@ -645,6 +651,8 @@ S60CreatePackageStepConfigWidget::S60CreatePackageStepConfigWidget(S60CreatePack this, SLOT(updateFromUi())); connect(m_ui.selfSignedButton, SIGNAL(clicked()), this, SLOT(updateFromUi())); + connect(m_ui.notSignedButton, SIGNAL(clicked()), + this, SLOT(updateFromUi())); connect(m_ui.signaturePath, SIGNAL(changed(QString)), this, SLOT(updateFromUi())); connect(m_ui.keyFilePath, SIGNAL(changed(QString)), @@ -657,11 +665,27 @@ S60CreatePackageStepConfigWidget::S60CreatePackageStepConfigWidget(S60CreatePack void S60CreatePackageStepConfigWidget::updateUi() { - bool selfSigned = m_signStep->signingMode() == S60CreatePackageStep::SignSelf; - m_ui.selfSignedButton->setChecked(selfSigned); - m_ui.customCertificateButton->setChecked(!selfSigned); - m_ui.signaturePath->setEnabled(!selfSigned); - m_ui.keyFilePath->setEnabled(!selfSigned); + + switch(m_signStep->signingMode()) { + case S60CreatePackageStep::SignCustom: + m_ui.selfSignedButton->setChecked(false); + m_ui.customCertificateButton->setChecked(true); + m_ui.notSignedButton->setChecked(false); + break; + case S60CreatePackageStep::NotSigned: + m_ui.selfSignedButton->setChecked(false); + m_ui.customCertificateButton->setChecked(false); + m_ui.notSignedButton->setChecked(true); + break; + default: + m_ui.selfSignedButton->setChecked(true); + m_ui.customCertificateButton->setChecked(false); + m_ui.notSignedButton->setChecked(false); + break; + } + bool customSigned = m_signStep->signingMode() == S60CreatePackageStep::SignCustom; + m_ui.signaturePath->setEnabled(customSigned); + m_ui.keyFilePath->setEnabled(customSigned); m_ui.signaturePath->setPath(m_signStep->customSignaturePath()); m_ui.keyFilePath->setPath(m_signStep->customKeyPath()); m_ui.smartInstaller->setChecked(m_signStep->createsSmartInstaller()); @@ -670,9 +694,15 @@ void S60CreatePackageStepConfigWidget::updateUi() void S60CreatePackageStepConfigWidget::updateFromUi() { - bool selfSigned = m_ui.selfSignedButton->isChecked(); - m_signStep->setSigningMode(selfSigned ? S60CreatePackageStep::SignSelf - : S60CreatePackageStep::SignCustom); + S60CreatePackageStep::SigningMode signingMode(S60CreatePackageStep::SignSelf); + if (m_ui.selfSignedButton->isChecked()) + signingMode = S60CreatePackageStep::SignSelf; + else if (m_ui.customCertificateButton->isChecked()) + signingMode = S60CreatePackageStep::SignCustom; + else if (m_ui.notSignedButton->isChecked()) + signingMode = S60CreatePackageStep::NotSigned; + + m_signStep->setSigningMode(signingMode); m_signStep->setCustomSignaturePath(m_ui.signaturePath->path()); m_signStep->setCustomKeyPath(m_ui.keyFilePath->path()); m_signStep->setCreatesSmartInstaller(m_ui.smartInstaller->isChecked()); @@ -691,11 +721,17 @@ void S60CreatePackageStepConfigWidget::resetPassphrases() QString S60CreatePackageStepConfigWidget::summaryText() const { QString text; - if (m_signStep->signingMode() == S60CreatePackageStep::SignSelf) { - text = tr("self-signed"); - } else { + switch(m_signStep->signingMode()) { + case S60CreatePackageStep::SignCustom: text = tr("signed with certificate %1 and key file %2") .arg(m_signStep->customSignaturePath(), m_signStep->customKeyPath()); + break; + case S60CreatePackageStep::NotSigned: + text = tr("not signed"); + break; + default: + text = tr("self-signed"); + break; } if (m_signStep->createsSmartInstaller()) return tr("Create SIS Package: %1, using Smart Installer").arg(text); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h index 8cdc5ecb91c..b37e517f17d 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h @@ -74,7 +74,8 @@ class S60CreatePackageStep : public ProjectExplorer::BuildStep public: enum SigningMode { SignSelf = 0, - SignCustom = 1 + SignCustom = 1, + NotSigned = 2 }; explicit S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui index 55aafb1b68e..b9eccf5ad1a 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui +++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui @@ -7,15 +7,39 @@ 0 0 517 - 108 + 135 - Form + Form - + + + + + + + + + + + + + 0 + 0 + + + + Not signed + + + + + + + diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp index f3a4abb28a4..cd4a04a64e0 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp @@ -147,13 +147,20 @@ QStringList S60DeployConfiguration::signedPackages() const continue; TargetInformation ti = node->targetInformation(); if (ti.valid) - result << ti.buildDir + QLatin1Char('/') + ti.target - + (runSmartInstaller() ? QLatin1String("_installer") : QLatin1String("")) - + QLatin1String(".sis"); + result << ti.buildDir + QLatin1Char('/') + createPackageName(ti.target); } return result; } +QString S60DeployConfiguration::createPackageName(const QString &baseName) const +{ + QString name(baseName); + name += isSigned() ? QLatin1String("") : QLatin1String("_unsigned"); + name += runSmartInstaller() ? QLatin1String("_installer") : QLatin1String(""); + name += QLatin1String(".sis"); + return name; +} + QStringList S60DeployConfiguration::packageFileNamesWithTargetInfo() const { QList leafs = qt4Target()->qt4Project()->leafProFiles(); @@ -216,6 +223,21 @@ bool S60DeployConfiguration::runSmartInstaller() const return false; } +bool S60DeployConfiguration::isSigned() const +{ + DeployConfiguration *dc = target()->activeDeployConfiguration(); + QTC_ASSERT(dc, return false); + BuildStepList *bsl = dc->stepList(); + QTC_ASSERT(bsl, return false); + QList steps = bsl->steps(); + foreach (const BuildStep *step, steps) { + if (const S60CreatePackageStep *packageStep = qobject_cast(step)) { + return packageStep->signingMode() != S60CreatePackageStep::NotSigned; + } + } + return false; +} + ProjectExplorer::ToolChain::ToolChainType S60DeployConfiguration::toolChainType() const { if (Qt4BuildConfiguration *bc = qobject_cast(target()->activeBuildConfiguration())) diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h index 198178dad22..1d299eedd94 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h @@ -93,8 +93,10 @@ protected: private: void ctor(); bool runSmartInstaller() const; + bool isSigned() const; QString symbianPlatform() const; QString symbianTarget() const; + QString createPackageName(const QString &baseName) const; bool isDebug() const; bool isStaticLibrary(const Qt4ProFileNode &projectNode) const; diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index 20808d95ab3..408a259ba86 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -569,6 +569,9 @@ void Qt4Project::updateCppCodeModel() void Qt4Project::updateQmlJSCodeModel() { + if (m_projectFiles->files[QMLType].isEmpty()) + return; + QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance(); if (!modelManager) return; @@ -586,34 +589,8 @@ void Qt4Project::updateQmlJSCodeModel() } projectInfo.importPaths.removeDuplicates(); - if (projectInfo.qmlDumpPath.isNull()) { - ProjectExplorer::Project *activeProject = ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject(); - projectInfo.qmlDumpPath = Qt4ProjectManager::QmlDumpTool::toolForProject(activeProject); - - // ### this is needed for qmlproject and cmake project support, but may not work in all cases. - if (projectInfo.qmlDumpPath.isEmpty()) { - // Try to locate default path in Qt Versions - QtVersionManager *qtVersions = QtVersionManager::instance(); - foreach (QtVersion *version, qtVersions->validVersions()) { - if (version->supportsTargetId(Constants::DESKTOP_TARGET_ID)) { - const QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA"); - projectInfo.qmlDumpPath = QmlDumpTool::toolByInstallData(qtInstallData); - - if (!projectInfo.qmlDumpPath.isEmpty()) { - break; - } - } - } - } - QFileInfo qmldumpFileInfo(projectInfo.qmlDumpPath); - if (!qmldumpFileInfo.exists()) { - qWarning() << "Qt4Project::loadQmlPluginTypes: qmldump executable does not exist at" << projectInfo.qmlDumpPath; - projectInfo.qmlDumpPath.clear(); - } else if (!qmldumpFileInfo.isFile()) { - qWarning() << "Qt4Project::loadQmlPluginTypes: " << projectInfo.qmlDumpPath << " is not a file"; - projectInfo.qmlDumpPath.clear(); - } + projectInfo.qmlDumpPath = QmlDumpTool::qmlDumpPath(this); } modelManager->updateProjectInfo(projectInfo); diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h index 9d62da41eee..db3b1719f89 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h +++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h @@ -88,11 +88,17 @@ const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectMan const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions"; const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions"); -// Wizard categories +// C++ wizard categories const char * const QT_APP_WIZARD_CATEGORY = "C.QtApplicationProjects"; const char * const QT_APP_WIZARD_TR_SCOPE = "Qt4ProjectManager"; const char * const QT_APP_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt C++ Project"); +// QML wizard categories +const char * const QML_WIZARD_CATEGORY = "F.Projects"; // (after Qt) +const char * const QML_WIZARD_TR_SCOPE = "QmlProjectManager"; +const char * const QML_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("QmlProjectManager", "Qt Quick Project"); +const char * const QML_WIZARD_ICON = ":/qmlproject/images/qml_wizard.png"; + // Tasks const char * const PROFILE_EVALUATE = "Qt4ProjectManager.ProFileEvaluate"; diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp index 0ed22615959..6f926c4fd57 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp @@ -140,8 +140,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * MobileAppWizard *mobileWizard = new MobileAppWizard; addAutoReleasedObject(mobileWizard); - addAutoReleasedObject(new QmlStandaloneAppWizard(QmlStandaloneAppWizard::NewQmlFile)); - addAutoReleasedObject(new QmlStandaloneAppWizard(QmlStandaloneAppWizard::ImportQmlFile)); + addAutoReleasedObject(new QmlStandaloneAppWizard()); LibraryWizard *libWizard = new LibraryWizard; addAutoReleasedObject(libWizard); diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp index 4fe9b7739bf..433986b59f4 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp @@ -542,13 +542,12 @@ QString Qt4RunConfiguration::baseWorkingDirectory() const return ti.workingDir; } - -QStringList Qt4RunConfiguration::baseCommandLineArguments() const +QStringList Qt4RunConfiguration::commandLineArguments() const { - return environment().expandVariables(commandLineArguments()); + return environment().expandVariables(baseCommandLineArguments()); } -QStringList Qt4RunConfiguration::commandLineArguments() const +QStringList Qt4RunConfiguration::baseCommandLineArguments() const { return m_commandLineArguments; } diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp index 01798677512..9c3d23dcd77 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp @@ -33,6 +33,8 @@ #include "qt4projectmanagerconstants.h" #include "qt4target.h" #include "qtversionmanager.h" +#include "qmldumptool.h" +#include "qmlobservertool.h" #include #include @@ -238,7 +240,9 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList ver QIcon QtOptionsPageWidget::debuggerHelperIconForQtVersion(const QtVersion *version) { - if (version->hasDebuggingHelper() && version->hasQmlDump() && version->hasQmlObserver()) { + if (version->hasDebuggingHelper() + && (!QmlDumpTool::canBuild(version) || version->hasQmlDump()) + && (!QmlObserverTool::canBuild(version) || version->hasQmlObserver())) { return m_debuggingHelperOkIcon; } else if (!version->hasDebuggingHelper() && !version->hasQmlDump() && !version->hasQmlObserver()) { return m_debuggingHelperErrorIcon; @@ -248,7 +252,9 @@ QIcon QtOptionsPageWidget::debuggerHelperIconForQtVersion(const QtVersion *versi QPixmap QtOptionsPageWidget::debuggerHelperPixmapForQtVersion(const QtVersion *version) { - if (version->hasDebuggingHelper() && version->hasQmlDump() && version->hasQmlObserver()) { + if (version->hasDebuggingHelper() + && (!QmlDumpTool::canBuild(version) || version->hasQmlDump()) + && (!QmlObserverTool::canBuild(version) || version->hasQmlObserver())) { return m_debuggingHelperOkPixmap; } else if (!version->hasDebuggingHelper() && !version->hasQmlDump() && !version->hasQmlObserver()) { return m_debuggingHelperErrorPixmap; @@ -311,7 +317,9 @@ void QtOptionsPageWidget::debuggingHelperBuildFinished(const QString &name, cons QTC_ASSERT(item, return) item->setData(2, Qt::UserRole, output); QSharedPointerQtVersion qtVersion = m_versions.at(index); - const bool success = qtVersion->hasDebuggingHelper() && qtVersion->hasQmlDump() && qtVersion->hasQmlObserver(); + const bool success = qtVersion->hasDebuggingHelper() + && (!QmlDumpTool::canBuild(qtVersion.data()) || qtVersion->hasQmlDump()) + && (!QmlObserverTool::canBuild(qtVersion.data()) || qtVersion->hasQmlObserver()); item->setData(2, Qt::DecorationRole, debuggerHelperIconForQtVersion(qtVersion.data())); // Update bottom control if the selection is still the same @@ -404,12 +412,16 @@ static inline QString msgHtmlHelperToolTip(const QString &gdbHelperPath, const Q QString notFound = QtOptionsPageWidget::tr("Binary not found"); //: Tooltip showing the debugging helper library file. - return QtOptionsPageWidget::tr("" + return QtOptionsPageWidget::tr("
File:
%1
" + "" + "" "" "" + "" "" "" "" + "" "" "" "" @@ -432,12 +444,10 @@ void QtOptionsPageWidget::updateDebuggingHelperStateLabel(const QtVersion *versi { QString tooltip; if (version && version->isValid()) { - const bool hasHelpers = version->hasDebuggingHelper() && version->hasQmlDump() && version->hasQmlObserver(); m_ui->debuggingHelperStateLabel->setPixmap(debuggerHelperPixmapForQtVersion(version)); - if (hasHelpers) - tooltip = msgHtmlHelperToolTip(version->debuggingHelperLibrary(), - version->qmlDumpTool(), - version->qmlObserverTool()); + tooltip = msgHtmlHelperToolTip(version->debuggingHelperLibrary(), + version->qmlDumpTool(), + version->qmlObserverTool()); } else { m_ui->debuggingHelperStateLabel->setPixmap(QPixmap()); } diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 12aeebb035f..2e9fb6ce027 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -1746,7 +1746,7 @@ bool QtVersion::isQt64Bit() const #endif } -QString QtVersion::buildDebuggingHelperLibrary(QFutureInterface &future) +QString QtVersion::buildDebuggingHelperLibrary(QFutureInterface &future, bool onlyQmlDump) { QString qtInstallHeaders = versionInfo().value("QT_INSTALL_HEADERS"); QString qtInstallData = versionInfo().value("QT_INSTALL_DATA"); @@ -1762,15 +1762,30 @@ QString QtVersion::buildDebuggingHelperLibrary(QFutureInterface &future) return QCoreApplication::translate("QtVersion", "The Qt Version has no toolchain."); tc->addToEnvironment(env); QString output; - QString gdbHelperDirectory = DebuggingHelperLibrary::copy(qtInstallData, &output); - if (!gdbHelperDirectory.isEmpty()) { - output += DebuggingHelperLibrary::build(gdbHelperDirectory, tc->makeCommand(), - qmakeCommand(), mkspec(), env, - (tc->type() == ToolChain::GCC_MAEMO ? QLatin1String("-unix") : QLatin1String(""))); - } - future.setProgressValue(2); - if (QmlDumpTool::canBuild(qtInstallHeaders)) { + if (!onlyQmlDump) { + QString gdbHelperDirectory = DebuggingHelperLibrary::copy(qtInstallData, &output); + if (!gdbHelperDirectory.isEmpty()) { + output += DebuggingHelperLibrary::build(gdbHelperDirectory, tc->makeCommand(), + qmakeCommand(), mkspec(), env, + (tc->type() == ToolChain::GCC_MAEMO ? QLatin1String("-unix") : QLatin1String(""))); + } + future.setProgressValue(2); + + if (QmlObserverTool::canBuild(this)) { + QString toolDirectory = QmlObserverTool::copy(qtInstallData, &output); + if (!toolDirectory.isEmpty()) { + output += QmlObserverTool::build(toolDirectory, tc->makeCommand(), + qmakeCommand(), mkspec(), env, + (tc->type() == ToolChain::GCC_MAEMO ? QLatin1String("-unix") : QLatin1String(""))); + } + } else { + output += QCoreApplication::tr("Cannot build QMLObserver; Qt version must be 4.7.1 or higher."); + } + future.setProgressValue(3); + } + + if (QmlDumpTool::canBuild(this)) { QString toolDirectory = QmlDumpTool::copy(qtInstallData, &output); if (!toolDirectory.isEmpty()) { output += QmlDumpTool::build(toolDirectory, tc->makeCommand(), @@ -1780,23 +1795,17 @@ QString QtVersion::buildDebuggingHelperLibrary(QFutureInterface &future) } else { output += QCoreApplication::tr("Cannot build qmldump; Qt version must be 4.7.1 or higher."); } - future.setProgressValue(3); - - if (QmlObserverTool::canBuild(qtInstallHeaders)) { - QString toolDirectory = QmlObserverTool::copy(qtInstallData, &output); - if (!toolDirectory.isEmpty()) { - output += QmlObserverTool::build(toolDirectory, tc->makeCommand(), - qmakeCommand(), mkspec(), env, - (tc->type() == ToolChain::GCC_MAEMO ? QLatin1String("-unix") : QLatin1String(""))); - } - } else { - output += QCoreApplication::tr("Cannot build QMLObserver; Qt version must be 4.7.1 or higher."); - } future.setProgressValue(4); - m_hasDebuggingHelper = !debuggingHelperLibrary().isEmpty(); + // invalidate version before updating version info + m_versionInfoUpToDate = false; + updateVersionInfo(); + + if (!onlyQmlDump) { + m_hasDebuggingHelper = !debuggingHelperLibrary().isEmpty(); + m_hasQmlObserver = !qmlObserverTool().isEmpty(); + } m_hasQmlDump = !qmlDumpTool().isEmpty(); - m_hasQmlObserver = !qmlObserverTool().isEmpty(); + return output; } - diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h index 4e9f0ac1560..1c90205f0e5 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.h +++ b/src/plugins/qt4projectmanager/qtversionmanager.h @@ -122,7 +122,7 @@ public: // Builds a debugging library // returns the output of the commands - QString buildDebuggingHelperLibrary(QFutureInterface &future); + QString buildDebuggingHelperLibrary(QFutureInterface &future, bool onlyQmlDump = false); bool hasExamples() const; QString examplesPath() const; diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp index 422ddd246ac..3c5b4a18e31 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp @@ -167,7 +167,7 @@ QString AbstractMobileApp::path(int fileType) const case DesktopOrigin: return originsRootShared + QLatin1String("app.desktop"); case DeploymentPri: return outputPathBase() + DeploymentPriFileName; case DeploymentPriOrigin: return originsRootShared + DeploymentPriFileName; - case SymbianSvgIcon: return outputPathBase() + symbianIconFileName; + case SymbianSvgIcon: return outputPathBase() + projectName() + QLatin1String(".svg"); case SymbianSvgIconOrigin: return !m_symbianSvgIcon.isEmpty() ? m_symbianSvgIcon : originsRootShared + symbianIconFileName; case MaemoPngIcon: return outputPathBase() + projectName() + QLatin1String(".png"); @@ -319,7 +319,6 @@ Core::GeneratedFiles AbstractMobileApp::generateFiles(QString *errorMessage) con files << file(generateFile(AbstractGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon)); files << file(generateFile(AbstractGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon)); files << file(generateFile(AbstractGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop)); - files << file(generateFile(AbstractGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri)); return files; } #endif // CREATORLESSTEST diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp index a2ba842938b..deb753b07fb 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp @@ -49,10 +49,10 @@ AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent) resize(900, 450); m_targetsPage->setImportDirectoryBrowsingEnabled(false); int pageId = addPage(m_targetsPage); - wizardProgress()->item(pageId)->setTitle(tr("Qt versions")); + wizardProgress()->item(pageId)->setTitle(tr("Qt Versions")); m_optionsPage = new MobileAppWizardOptionsPage; pageId = addPage(m_optionsPage); - wizardProgress()->item(pageId)->setTitle(tr("Application options")); + wizardProgress()->item(pageId)->setTitle(tr("Application Options")); } diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp index 24e63444983..3c8bd3691a9 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp @@ -172,13 +172,13 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w, const QString formHeaderName = buildFileName(projectPath, params.headerFileName, headerSuffix()); Core::GeneratedFile formSource(formSourceFileName); Core::GeneratedFile formHeader(formHeaderName); + formSource.setAttributes(Core::GeneratedFile::OpenEditorAttribute); QSharedPointer form; if (params.designerForm) { // Create files: form const QString formName = buildFileName(projectPath, params.formFileName, formSuffix()); form = QSharedPointer(new Core::GeneratedFile(formName)); - form->setAttributes(Core::GeneratedFile::OpenEditorAttribute); if (!parametrizeTemplate(templatePath, QLatin1String("widget.ui"), params, &contents, errorMessage)) return Core::GeneratedFiles(); form->setContents(contents); @@ -190,7 +190,6 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w, return Core::GeneratedFiles(); formSource.setContents(CppTools::AbstractEditorSupport::licenseTemplate(formSourceFileName) + contents); - formSource.setAttributes(Core::GeneratedFile::OpenEditorAttribute); // Create files: form header const QString formHeaderTemplate = QLatin1String("mywidget.h"); if (!parametrizeTemplate(templatePath, formHeaderTemplate, params, &contents, errorMessage)) diff --git a/src/plugins/qt4projectmanager/wizards/mobileapp.cpp b/src/plugins/qt4projectmanager/wizards/mobileapp.cpp index ef788660cc5..bd03106dbf3 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/mobileapp.cpp @@ -94,6 +94,7 @@ Core::GeneratedFiles MobileApp::generateFiles(QString *errorMessage) const { Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage); + files.append(file(generateFile(AbstractGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri))); files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowCppFile, errorMessage), path(MainWindowCpp))); files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowHFile, errorMessage), path(MainWindowH))); files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowUiFile, errorMessage), path(MainWindowUi))); diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardoptionspage.ui b/src/plugins/qt4projectmanager/wizards/mobileappwizardoptionspage.ui index 78878deca39..95a6bc5f1cd 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileappwizardoptionspage.ui +++ b/src/plugins/qt4projectmanager/wizards/mobileappwizardoptionspage.ui @@ -32,7 +32,7 @@ - Orientation Behavior: + Orientation behavior: orientationBehaviorComboBox @@ -52,7 +52,7 @@ - Symbian specific + Symbian Specific @@ -64,7 +64,7 @@ - Application Icon (.svg): + Application icon (.svg): symbianAppIconLoadToolButton @@ -164,7 +164,7 @@ - Maemo specific + Maemo Specific @@ -176,7 +176,7 @@ - Application Icon (64x64): + Application icon (64x64): diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp b/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp index 6ba89cd368a..0c6b696b6c7 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp +++ b/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp @@ -59,11 +59,11 @@ MobileAppWizardOptionsPage::MobileAppWizardOptionsPage(QWidget *parent) connect(m_d->ui.maemoPngIconButton, SIGNAL(clicked()), this, SLOT(openMaemoPngIcon())); - m_d->ui.orientationBehaviorComboBox->addItem(tr("Auto rotate orientation"), + m_d->ui.orientationBehaviorComboBox->addItem(tr("Automatically Rotate Orientation"), AbstractMobileApp::Auto); - m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to landscape orientation"), + m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to Landscape Orientation"), AbstractMobileApp::LockLandscape); - m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to portrait orientation"), + m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to Portrait Orientation"), AbstractMobileApp::LockPortrait); } diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp index d323107c664..93198f44536 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneapp.cpp @@ -261,6 +261,8 @@ void QmlStandaloneApp::handleCurrentProFileTemplateLine(const QString &line, } proFile << endl; + } else if (line.contains(QLatin1String("# INCLUDE_DEPLOYMENT_PRI"))) { + proFileTemplate.readLine(); // eats 'include(deployment.pri)' } } @@ -378,6 +380,7 @@ QByteArray QmlStandaloneApp::generateFileExtended(int fileType, break; case QmlAppGeneratedFileInfo::AppViewerPriFile: data = readBlob(path(AppViewerPriOrigin), errorMessage); + data.append(readBlob(path(DeploymentPriOrigin), errorMessage)); *comment = ProFileComment; *versionAndCheckSum = true; break; @@ -408,9 +411,7 @@ static QList updateableFiles(const QString &mainProFile } files[] = { {QmlAppGeneratedFileInfo::AppViewerPriFile, appViewerPriFileName}, {QmlAppGeneratedFileInfo::AppViewerHFile, appViewerHFileName}, - {QmlAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName}, - {QmlAppGeneratedFileInfo::DeploymentPriFile, - QLatin1String("../") + AbstractMobileApp::DeploymentPriFileName} + {QmlAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName} }; const QFileInfo mainProFileInfo(mainProFile); const int size = sizeof(files) / sizeof(files[0]); @@ -424,6 +425,8 @@ static QList updateableFiles(const QString &mainProFile file.fileInfo = QFileInfo(fileName); result.append(file); } + if (result.count() != size) + result.clear(); // All files must be found. No wrong/partial updates, please. return result; } diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp index 600000d2c7a..b15b995dd49 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp @@ -52,48 +52,36 @@ class QmlStandaloneAppWizardDialog : public AbstractMobileAppWizardDialog Q_OBJECT public: - explicit QmlStandaloneAppWizardDialog(QmlStandaloneAppWizard::WizardType type, QWidget *parent = 0); + explicit QmlStandaloneAppWizardDialog(QWidget *parent = 0); private: - QmlStandaloneAppWizard::WizardType m_type; class QmlStandaloneAppWizardSourcesPage *m_qmlSourcesPage; friend class QmlStandaloneAppWizard; }; -QmlStandaloneAppWizardDialog::QmlStandaloneAppWizardDialog(QmlStandaloneAppWizard::WizardType type, - QWidget *parent) +QmlStandaloneAppWizardDialog::QmlStandaloneAppWizardDialog(QWidget *parent) : AbstractMobileAppWizardDialog(parent) - , m_type(type) , m_qmlSourcesPage(0) { - setWindowTitle(m_type == QmlStandaloneAppWizard::NewQmlFile - ? tr("New Qt Quick Application") - : tr("Qt Quick Application from Existing QML Directory")); - setIntroDescription(m_type == QmlStandaloneAppWizard::NewQmlFile - ? tr("This wizard generates a Qt Quick application project.") - : tr("This wizard imports an existing QML directory and creates a Qt Quick application project from it.")); + setWindowTitle(tr("New Qt Quick Application")); + setIntroDescription(tr("This wizard generates a Qt Quick application project.")); - if (m_type == QmlStandaloneAppWizard::ImportQmlFile) { - m_qmlSourcesPage = new QmlStandaloneAppWizardSourcesPage; - m_qmlSourcesPage->setMainQmlFileChooserVisible(true); - const int qmlSourcesPagePageId = addPage(m_qmlSourcesPage); - wizardProgress()->item(qmlSourcesPagePageId)->setTitle(tr("QML Sources")); - } + m_qmlSourcesPage = new QmlStandaloneAppWizardSourcesPage; + const int qmlSourcesPagePageId = addPage(m_qmlSourcesPage); + wizardProgress()->item(qmlSourcesPagePageId)->setTitle(tr("QML Sources")); } class QmlStandaloneAppWizardPrivate { - QmlStandaloneAppWizard::WizardType type; class QmlStandaloneApp *standaloneApp; class QmlStandaloneAppWizardDialog *wizardDialog; friend class QmlStandaloneAppWizard; }; -QmlStandaloneAppWizard::QmlStandaloneAppWizard(WizardType type) - : AbstractMobileAppWizard(parameters(type)) +QmlStandaloneAppWizard::QmlStandaloneAppWizard() + : AbstractMobileAppWizard(parameters()) , m_d(new QmlStandaloneAppWizardPrivate) { - m_d->type = type; m_d->standaloneApp = new QmlStandaloneApp; m_d->wizardDialog = 0; } @@ -104,35 +92,22 @@ QmlStandaloneAppWizard::~QmlStandaloneAppWizard() delete m_d; } -Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters(WizardType type) +Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters() { Core::BaseFileWizardParameters parameters(ProjectWizard); parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QML_STANDALONE))); - parameters.setDisplayName(type == QmlStandaloneAppWizard::NewQmlFile - ? tr("Qt Quick Application") - : tr("Import Existing QML Directory")); - parameters.setId(QLatin1String(type == QmlStandaloneAppWizard::NewQmlFile - ? "QA.QMLA Application" - : "QA.QMLB Imported Application")); - parameters.setDescription(type == QmlStandaloneAppWizard::NewQmlFile - ? tr("Creates a Qt Quick application that you can deploy to mobile devices.") - : tr("Imports an existing QML directory and converts it into a " - "Qt Quick application project. " - "You can deploy the application to mobile devices.")); - parameters.setCategory(QLatin1String(Constants::QT_APP_WIZARD_CATEGORY)); - parameters.setDisplayCategory(QCoreApplication::translate(Constants::QT_APP_WIZARD_TR_SCOPE, - Constants::QT_APP_WIZARD_TR_CATEGORY)); + parameters.setDisplayName(tr("Qt Quick Application")); + parameters.setId(QLatin1String("QA.QMLA Application")); + parameters.setDescription(tr("Creates a Qt Quick application that you can deploy to mobile devices.")); + parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY)); + parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE, + Constants::QML_WIZARD_TR_CATEGORY)); return parameters; } AbstractMobileAppWizardDialog *QmlStandaloneAppWizard::createWizardDialogInternal(QWidget *parent) const { - m_d->wizardDialog = new QmlStandaloneAppWizardDialog(m_d->type, parent); - if (m_d->wizardDialog->m_qmlSourcesPage) { - connect(m_d->wizardDialog->m_qmlSourcesPage, - SIGNAL(externalModulesChanged(QStringList, QStringList)), - SLOT(handleModulesChange(QStringList, QStringList))); - } + m_d->wizardDialog = new QmlStandaloneAppWizardDialog(parent); const QList &qtVersions = TargetSetupPage::importInfosForKnownQtVersions(); QList qmlQtVersions; @@ -157,19 +132,16 @@ void QmlStandaloneAppWizard::prepareGenerateFiles(const QWizard *w, { Q_UNUSED(errorMessage) const QmlStandaloneAppWizardDialog *wizard = qobject_cast(w); - if (wizard->m_qmlSourcesPage) { - m_d->standaloneApp->setMainQmlFile(wizard->m_qmlSourcesPage->mainQmlFile()); - m_d->standaloneApp->setExternalModules( - wizard->m_qmlSourcesPage->moduleUris(), - wizard->m_qmlSourcesPage->moduleImportPaths()); - } + const QString mainQmlFile = wizard->m_qmlSourcesPage->mainQmlFile(); + if (!mainQmlFile.isEmpty()) + m_d->standaloneApp->setMainQmlFile(mainQmlFile); } bool QmlStandaloneAppWizard::postGenerateFilesInternal(const Core::GeneratedFiles &l, QString *errorMessage) { const bool success = ProjectExplorer::CustomProjectWizard::postGenerateOpen(l, errorMessage); - if (success && m_d->type == QmlStandaloneAppWizard::ImportQmlFile) { + if (success && !m_d->standaloneApp->mainQmlFile().isEmpty()) { ProjectExplorer::ProjectExplorerPlugin::instance()->setCurrentFile(0, m_d->standaloneApp->mainQmlFile()); Core::EditorManager::instance()->openEditor(m_d->standaloneApp->mainQmlFile(), QString(), Core::EditorManager::ModeSwitch); @@ -177,14 +149,6 @@ bool QmlStandaloneAppWizard::postGenerateFilesInternal(const Core::GeneratedFile return success; } -void QmlStandaloneAppWizard::handleModulesChange(const QStringList &uris, const QStringList &paths) -{ - Q_ASSERT(m_d->wizardDialog->m_qmlSourcesPage); - QmlStandaloneApp testApp; - testApp.setExternalModules(uris, paths); - m_d->wizardDialog->m_qmlSourcesPage->setModulesError(testApp.error()); -} - AbstractMobileApp *QmlStandaloneAppWizard::app() const { return m_d->standaloneApp; diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.h b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.h index 662021c19ef..46d8a26908c 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.h +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.h @@ -40,19 +40,11 @@ class QmlStandaloneAppWizard : public AbstractMobileAppWizard Q_OBJECT public: - enum WizardType { - NewQmlFile, - ImportQmlFile - }; - - QmlStandaloneAppWizard(WizardType type); + QmlStandaloneAppWizard(); virtual ~QmlStandaloneAppWizard(); -private slots: - void handleModulesChange(const QStringList &uris, const QStringList &paths); - private: - static Core::BaseFileWizardParameters parameters(WizardType type); + static Core::BaseFileWizardParameters parameters(); virtual AbstractMobileApp *app() const; virtual AbstractMobileAppWizardDialog *wizardDialog() const; diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.cpp index 34a071b2ec6..ec6fb23f785 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.cpp +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.cpp @@ -42,7 +42,6 @@ namespace Internal { class QmlStandaloneAppWizardSourcesPagePrivate { Ui::QmlStandaloneAppWizardSourcesPage ui; - bool mainQmlFileChooserVisible; friend class QmlStandaloneAppWizardSourcesPage; }; @@ -53,16 +52,13 @@ QmlStandaloneAppWizardSourcesPage::QmlStandaloneAppWizardSourcesPage(QWidget *pa m_d->ui.setupUi(this); m_d->ui.mainQmlFileLineEdit->setExpectedKind(Utils::PathChooser::File); m_d->ui.mainQmlFileLineEdit->setPromptDialogFilter(QLatin1String("*.qml")); - m_d->ui.mainQmlFileLineEdit->setPromptDialogTitle(tr("Select the main QML file of the application.")); - m_d->ui.addModuleUriButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_PLUS))); - m_d->ui.removeModuleUriButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_MINUS))); - m_d->ui.addImportPathButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_PLUS))); - m_d->ui.removeImportPathButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_MINUS))); - setMainQmlFileChooserVisible(true); - setModulesError(QString()); + m_d->ui.mainQmlFileLineEdit->setPromptDialogTitle(tr("Select QML File")); connect(m_d->ui.mainQmlFileLineEdit, SIGNAL(changed(QString)), SIGNAL(completeChanged())); - connect(m_d->ui.urisListWidget, SIGNAL(itemChanged(QListWidgetItem*)), SLOT(handleModulesChanged())); - connect(m_d->ui.importPathsListWidget, SIGNAL(itemChanged(QListWidgetItem*)), SLOT(handleModulesChanged())); + connect(m_d->ui.importExistingQmlRadioButton, + SIGNAL(toggled(bool)), SIGNAL(completeChanged())); + connect(m_d->ui.newQmlRadioButton, SIGNAL(toggled(bool)), + m_d->ui.mainQmlFileLineEdit, SLOT(setDisabled(bool))); + m_d->ui.newQmlRadioButton->setChecked(true); } QmlStandaloneAppWizardSourcesPage::~QmlStandaloneAppWizardSourcesPage() @@ -72,95 +68,14 @@ QmlStandaloneAppWizardSourcesPage::~QmlStandaloneAppWizardSourcesPage() QString QmlStandaloneAppWizardSourcesPage::mainQmlFile() const { - return m_d->ui.mainQmlFileLineEdit->path(); + return m_d->ui.importExistingQmlRadioButton->isChecked() ? + m_d->ui.mainQmlFileLineEdit->path() : QString(); } bool QmlStandaloneAppWizardSourcesPage::isComplete() const { - return (!m_d->mainQmlFileChooserVisible || m_d->ui.mainQmlFileLineEdit->isValid()) - && m_d->ui.errorLabel->text().isEmpty(); -} - -void QmlStandaloneAppWizardSourcesPage::setMainQmlFileChooserVisible(bool visible) -{ - m_d->mainQmlFileChooserVisible = visible; - m_d->ui.mainQmlFileGroupBox->setVisible(m_d->mainQmlFileChooserVisible); -} - -void QmlStandaloneAppWizardSourcesPage::setModulesError(const QString &error) -{ - m_d->ui.errorLabel->setText(error); - m_d->ui.errorLabel->setVisible(!error.isEmpty()); -} - -void QmlStandaloneAppWizardSourcesPage::on_addModuleUriButton_clicked() -{ - QListWidgetItem *item = new QListWidgetItem(m_d->ui.urisListWidget); - item->setFlags(item->flags() | Qt::ItemIsEditable); - m_d->ui.urisListWidget->setCurrentItem(item); - m_d->ui.urisListWidget->editItem(item); -} - -static bool removeListWidgetItem(QListWidget *list) -{ - const int currentRow = list->currentRow(); - if (currentRow >= 0) { - list->takeItem(currentRow); - return true; - } - return false; -} - -void QmlStandaloneAppWizardSourcesPage::on_removeModuleUriButton_clicked() -{ - if (removeListWidgetItem(m_d->ui.urisListWidget)) - handleModulesChanged(); -} - -void QmlStandaloneAppWizardSourcesPage::on_addImportPathButton_clicked() -{ - const QString path = QFileDialog::getExistingDirectory(this, - tr("Select an import path for QML modules."), mainQmlFile()); - if (!path.isEmpty()) { - QListWidgetItem *item = new QListWidgetItem(QDir::toNativeSeparators(path), m_d->ui.importPathsListWidget); - item->setFlags(item->flags() | Qt::ItemIsEditable); - m_d->ui.importPathsListWidget->setCurrentItem(item); - } -} - -void QmlStandaloneAppWizardSourcesPage::on_removeImportPathButton_clicked() -{ - if (removeListWidgetItem(m_d->ui.importPathsListWidget)) - handleModulesChanged(); -} - -static inline QStringList ertriesFromListWidget(const QListWidget &listWidget) -{ - QStringList result; - for (int i = 0; i < listWidget.count(); ++i) { - const QString text = listWidget.item(i)->text().trimmed(); - if (!text.isEmpty()) - result.append(text); - } - return result; -} - -void QmlStandaloneAppWizardSourcesPage::handleModulesChanged() -{ - const QStringList uris = ertriesFromListWidget(*m_d->ui.urisListWidget); - const QStringList paths = ertriesFromListWidget(*m_d->ui.importPathsListWidget); - emit externalModulesChanged(uris, paths); - emit completeChanged(); -} - -QStringList QmlStandaloneAppWizardSourcesPage::moduleUris() const -{ - return ertriesFromListWidget(*m_d->ui.urisListWidget); -} - -QStringList QmlStandaloneAppWizardSourcesPage::moduleImportPaths() const -{ - return ertriesFromListWidget(*m_d->ui.importPathsListWidget); + return !m_d->ui.importExistingQmlRadioButton->isChecked() + || m_d->ui.mainQmlFileLineEdit->isValid(); } } // namespace Internal diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.h b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.h index 5ce91e3a92f..96f56603a1a 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.h +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardpages.h @@ -47,20 +47,6 @@ public: QString mainQmlFile() const; virtual bool isComplete() const; - void setMainQmlFileChooserVisible(bool visible); - void setModulesError(const QString &error); - QStringList moduleUris() const; - QStringList moduleImportPaths() const; - -private slots: - void on_addModuleUriButton_clicked(); - void on_removeModuleUriButton_clicked(); - void on_addImportPathButton_clicked(); - void on_removeImportPathButton_clicked(); - void handleModulesChanged(); - -signals: - void externalModulesChanged(const QStringList &uris, const QStringList &importPaths) const; private: class QmlStandaloneAppWizardSourcesPagePrivate *m_d; diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardsourcespage.ui b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardsourcespage.ui index 1766bba1bea..ffe258e3863 100644 --- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardsourcespage.ui +++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizardsourcespage.ui @@ -6,8 +6,8 @@ 0 0 - 494 - 346 + 605 + 386 @@ -17,133 +17,62 @@ - Main QML file + Main QML File - - + + + + + New 'main.qml' file, generated by this wizard. + + + + + + + Import an existing .qml file + + + + + + + + Qt::Horizontal + + + QSizePolicy::Maximum + + + + 12 + 20 + + + + - - - QML Modules + + + + 0 + 1 + + + + Note: All files and directories which reside in the same directory as the Main QML File will be deployed. You can anytime modify the contents of that directory before deploying. + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true - - - - - Qt::Vertical - - - false - - - - - - - - - - + - - - - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - - URIs (e.g. 'org.mydomain.MyQmlModule') - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - - Import Paths - - - - - - - - - - - - 75 - true - - - - Error - - - - diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp index a9b6b2a7db0..a5862f5390e 100644 --- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp +++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp @@ -516,13 +516,13 @@ void TargetSetupPage::handleDoubleClicks(QTreeWidgetItem *item, int column) } } -void TargetSetupPage::contextMenuRequested(const QPoint & position) +void TargetSetupPage::contextMenuRequested(const QPoint &position) { m_contextMenu->clear(); QTreeWidgetItem *item = m_ui->versionTree->itemAt(position); m_contextMenu = new QMenu(this); - if (item->parent()) { + if (item && item->parent()) { // Qt version item QAction *onlyThisAction = new QAction(tr("Check only this version"), m_contextMenu); connect(onlyThisAction, SIGNAL(triggered()), this, SLOT(checkOneTriggered())); diff --git a/src/plugins/subversion/subversioncontrol.cpp b/src/plugins/subversion/subversioncontrol.cpp index f25fc3ab6a2..597546ee251 100644 --- a/src/plugins/subversion/subversioncontrol.cpp +++ b/src/plugins/subversion/subversioncontrol.cpp @@ -54,6 +54,8 @@ bool SubversionControl::supportsOperation(Operation operation) const case DeleteOperation: case MoveOperation: case AnnotateOperation: + case CheckoutOperation: + case GetRepositoryRootOperation: break; case OpenOperation: case CreateRepositoryOperation: @@ -89,6 +91,16 @@ bool SubversionControl::vcsMove(const QString &from, const QString &to) return m_plugin->vcsMove(fromInfo.absolutePath(), fromInfo.absoluteFilePath(), toInfo.absoluteFilePath()); } +bool SubversionControl::vcsCheckout(const QString &directory, const QByteArray &url) +{ + return m_plugin->vcsCheckout(directory, url); +} + +QString SubversionControl::vcsGetRepositoryURL(const QString &directory) +{ + return m_plugin->vcsGetRepositoryURL(directory); +} + bool SubversionControl::vcsCreateRepository(const QString &) { return false; diff --git a/src/plugins/subversion/subversioncontrol.h b/src/plugins/subversion/subversioncontrol.h index 5610059d661..071773b8600 100644 --- a/src/plugins/subversion/subversioncontrol.h +++ b/src/plugins/subversion/subversioncontrol.h @@ -53,6 +53,8 @@ public: virtual bool vcsDelete(const QString &filename); virtual bool vcsMove(const QString &from, const QString &to); virtual bool vcsCreateRepository(const QString &directory); + virtual bool vcsCheckout(const QString &directory, const QByteArray &url); + virtual QString vcsGetRepositoryURL(const QString &directory); virtual QString vcsCreateSnapshot(const QString &topLevel); virtual QStringList vcsSnapshots(const QString &topLevel); diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 332ca5f3724..5e47b9d07a7 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -65,13 +65,14 @@ #include #include #include +#include #include #include #include #include #include #include - +#include #include using namespace Subversion::Internal; @@ -1224,6 +1225,75 @@ bool SubversionPlugin::vcsMove(const QString &workingDir, const QString &from, c return !response.error; } +bool SubversionPlugin::vcsCheckout(const QString &directory, const QByteArray &url) +{ + QUrl tempUrl; + tempUrl.setEncodedUrl(url); + QString username = tempUrl.userName(); + QString password = tempUrl.password(); + QStringList args = QStringList(QLatin1String("checkout")); + args << QLatin1String(nonInteractiveOptionC) ; + + if(!username.isEmpty() && !password.isEmpty()) + { + // If url contains username and password we have to use separate username and password + // arguments instead of passing those in the url. Otherwise the subversion 'non-interactive' + // authentication will always fail (if the username and password data are not stored locally), + // if for example we are logging into a new host for the first time using svn. There seems to + // be a bug in subversion, so this might get fixed in the future. + tempUrl.setUserInfo(""); + args << tempUrl.toEncoded() << directory; + const SubversionResponse response = runSvn(directory, username, password, args, + m_settings.longTimeOutMS(), + VCSBase::VCSBasePlugin::SshPasswordPrompt); + return !response.error; + } else { + args << url << directory; + const SubversionResponse response = runSvn(directory, args, m_settings.longTimeOutMS(), + VCSBase::VCSBasePlugin::SshPasswordPrompt); + return !response.error; + } +} + +QString SubversionPlugin::vcsGetRepositoryURL(const QString &directory) +{ + QXmlStreamReader xml; + QStringList args = QStringList(QLatin1String("info")); + args << QLatin1String("--xml"); + + const SubversionResponse response = runSvn(directory, args, m_settings.longTimeOutMS(), SuppressCommandLogging); + xml.addData(response.stdOut); + + bool repo = false; + bool root = false; + + while(!xml.atEnd() && !xml.hasError()) { + switch(xml.readNext()) { + case QXmlStreamReader::StartDocument: + break; + case QXmlStreamReader::StartElement: + if(xml.name() == QLatin1String("repository")) + repo = true; + else if(repo && xml.name() == QLatin1String("root")) + root = true; + break; + case QXmlStreamReader::EndElement: + if(xml.name() == QLatin1String("repository")) + repo = false; + else if(repo && xml.name() == QLatin1String("root")) + root = false; + break; + case QXmlStreamReader::Characters: + if (repo && root) + return xml.text().toString(); + break; + default: + break; + } + } + return QString(); +} + /* Subversion has ".svn" directory in each directory * it manages. The top level is the first directory * under the directory that does not have a ".svn". */ diff --git a/src/plugins/subversion/subversionplugin.h b/src/plugins/subversion/subversionplugin.h index 584a196671c..d79ae144e10 100644 --- a/src/plugins/subversion/subversionplugin.h +++ b/src/plugins/subversion/subversionplugin.h @@ -96,6 +96,8 @@ public: bool vcsDelete(const QString &workingDir, const QString &fileName); bool vcsMove(const QString &workingDir, const QString &from, const QString &to); bool managesDirectory(const QString &directory, QString *topLevel = 0) const; + virtual bool vcsCheckout(const QString &directory, const QByteArray &url); + virtual QString vcsGetRepositoryURL(const QString &directory); static SubversionPlugin *subversionPluginInstance(); diff --git a/src/plugins/texteditor/generichighlighter/highlighter.cpp b/src/plugins/texteditor/generichighlighter/highlighter.cpp index 98de86d7fa5..3775a63d51f 100644 --- a/src/plugins/texteditor/generichighlighter/highlighter.cpp +++ b/src/plugins/texteditor/generichighlighter/highlighter.cpp @@ -140,7 +140,7 @@ void Highlighter::highlightBlock(const QString &text) } } - applyVisualWhitespaceFormat(text); + applyFormatToSpaces(text, m_creatorFormats.value(VisualWhitespace)); } void Highlighter::setupDataForBlock(const QString &text) @@ -408,22 +408,6 @@ void Highlighter::applyFormat(int offset, } } -void Highlighter::applyVisualWhitespaceFormat(const QString &text) -{ - int offset = 0; - const int length = text.length(); - while (offset < length) { - if (text.at(offset).isSpace()) { - int start = offset++; - while (offset < length && text.at(offset).isSpace()) - ++offset; - setFormat(start, offset - start, m_creatorFormats.value(VisualWhitespace)); - } else { - ++offset; - } - } -} - void Highlighter::createWillContinueBlock() { BlockData *data = blockData(currentBlockUserData()); diff --git a/src/plugins/texteditor/generichighlighter/highlighter.h b/src/plugins/texteditor/generichighlighter/highlighter.h index 43b7b58df3e..07417972595 100644 --- a/src/plugins/texteditor/generichighlighter/highlighter.h +++ b/src/plugins/texteditor/generichighlighter/highlighter.h @@ -123,7 +123,6 @@ private: int count, const QString &itemDataName, const QSharedPointer &definition); - void applyVisualWhitespaceFormat(const QString &text); void applyRegionBasedFolding() const; void applyIndentationBasedFolding(const QString &text) const; diff --git a/src/plugins/texteditor/generichighlighter/highlightersettings.cpp b/src/plugins/texteditor/generichighlighter/highlightersettings.cpp index ec6c59ab566..2298df67aa5 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettings.cpp +++ b/src/plugins/texteditor/generichighlighter/highlightersettings.cpp @@ -34,9 +34,9 @@ #include #include #include -#include -#ifdef Q_OS_UNIX #include +#include +#ifdef Q_OS_UNIX #include #endif @@ -135,8 +135,7 @@ void HighlighterSettings::fromSettings(const QString &category, QSettings *s) s->beginGroup(group); m_definitionFilesPath = s->value(kDefinitionFilesPath, QString()).toString(); if (!s->contains(kDefinitionFilesPath)) - m_definitionFilesPath = Core::ICore::instance()->resourcePath() + - QLatin1String("/generic-highlighter"); + assignDefaultDefinitionsPath(); else m_definitionFilesPath = s->value(kDefinitionFilesPath).toString(); if (!s->contains(kFallbackDefinitionFilesPath)) { @@ -151,7 +150,7 @@ void HighlighterSettings::fromSettings(const QString &category, QSettings *s) } m_alertWhenNoDefinition = s->value(kAlertWhenDefinitionIsNotFound, true).toBool(); if (!s->contains(kIgnoredFilesPatterns)) - assignInitialIgnoredPatterns(); + assignDefaultIgnoredPatterns(); else setIgnoredFilesPatterns(s->value(kIgnoredFilesPatterns, QString()).toString()); s->endGroup(); @@ -167,7 +166,7 @@ QString HighlighterSettings::ignoredFilesPatterns() const return listFromExpressions().join(QLatin1String(",")); } -void HighlighterSettings::assignInitialIgnoredPatterns() +void HighlighterSettings::assignDefaultIgnoredPatterns() { QStringList patterns; patterns << QLatin1String("*.txt") @@ -180,6 +179,14 @@ void HighlighterSettings::assignInitialIgnoredPatterns() setExpressionsFromList(patterns); } +void HighlighterSettings::assignDefaultDefinitionsPath() +{ + const QString &path = + Core::ICore::instance()->userResourcePath() + QLatin1String("/generic-highlighter"); + if (QFile::exists(path) || QDir().mkpath(path)) + m_definitionFilesPath = path; +} + bool HighlighterSettings::isIgnoredFilePattern(const QString &fileName) const { foreach (const QRegExp ®Exp, m_ignoredFiles) diff --git a/src/plugins/texteditor/generichighlighter/highlightersettings.h b/src/plugins/texteditor/generichighlighter/highlightersettings.h index e3fb4ca75a7..0fbbe7e3eda 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettings.h +++ b/src/plugins/texteditor/generichighlighter/highlightersettings.h @@ -68,7 +68,8 @@ public: bool equals(const HighlighterSettings &highlighterSettings) const; private: - void assignInitialIgnoredPatterns(); + void assignDefaultIgnoredPatterns(); + void assignDefaultDefinitionsPath(); void setExpressionsFromList(const QStringList &patterns); QStringList listFromExpressions() const; diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index b02d6ef9c6c..346c735b26f 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -535,6 +535,22 @@ void SyntaxHighlighter::setFormat(int start, int count, const QFont &font) setFormat(start, count, format); } +void SyntaxHighlighter::applyFormatToSpaces(const QString &text, const QTextCharFormat &format) +{ + int offset = 0; + const int length = text.length(); + while (offset < length) { + if (text.at(offset).isSpace()) { + int start = offset++; + while (offset < length && text.at(offset).isSpace()) + ++offset; + setFormat(start, offset - start, format); + } else { + ++offset; + } + } +} + /*! \fn QTextCharFormat SyntaxHighlighter::format(int position) const diff --git a/src/plugins/texteditor/syntaxhighlighter.h b/src/plugins/texteditor/syntaxhighlighter.h index 5b6722b5a34..a010facf640 100644 --- a/src/plugins/texteditor/syntaxhighlighter.h +++ b/src/plugins/texteditor/syntaxhighlighter.h @@ -89,6 +89,8 @@ protected: void setFormat(int start, int count, const QFont &font); QTextCharFormat format(int pos) const; + void applyFormatToSpaces(const QString &text, const QTextCharFormat &format); + int previousBlockState() const; int currentBlockState() const; void setCurrentBlockState(int newState); diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index 21e55610461..cec7f02433b 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -121,7 +121,7 @@ void tst_TestCore::cleanupTestCase() void tst_TestCore::testModelCreateCoreModel() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer testView(new TestView(model.data())); @@ -140,17 +140,17 @@ void tst_TestCore::loadEmptyCoreModel() textEdit1.setPlainText(file.readAll()); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); model1->attachView(testRewriterView1.data()); QPlainTextEdit textEdit2; - textEdit2.setPlainText("import Qt 4.7; Item{}"); + textEdit2.setPlainText("import QtQuick 1.0; Item{}"); NotIndentingTextEditModifier modifier2(&textEdit2); - QScopedPointer model2(Model::create("Qt/item")); + QScopedPointer model2(Model::create("QtQuick/item")); QScopedPointer testRewriterView2(new TestRewriterView()); testRewriterView2->setTextModifier(&modifier2); @@ -163,10 +163,10 @@ void tst_TestCore::testRewriterView() { try { QPlainTextEdit textEdit; - textEdit.setPlainText("import Qt 4.7;\n\nItem {\n}\n"); + textEdit.setPlainText("import QtQuick 1.0;\n\nItem {\n}\n"); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -179,15 +179,15 @@ void tst_TestCore::testRewriterView() testRewriterView->setTextModifier(&textModifier); model->attachView(testRewriterView.data()); - ModelNode childNode(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); + ModelNode childNode(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); QVERIFY(childNode.isValid()); childNode.setId("childNode"); - ModelNode childNode2(addNodeListChild(childNode, "Qt/Rectangle", 4, 7, "data")); + ModelNode childNode2(addNodeListChild(childNode, "QtQuick/Rectangle", 1, 0, "data")); childNode2.setId("childNode2"); - ModelNode childNode3(addNodeListChild(childNode2, "Qt/Rectangle", 4, 7, "data")); + ModelNode childNode3(addNodeListChild(childNode2, "QtQuick/Rectangle", 1, 0, "data")); childNode3.setId("childNode3"); - ModelNode childNode4(addNodeListChild(childNode3, "Qt/Rectangle", 4, 7, "data")); + ModelNode childNode4(addNodeListChild(childNode3, "QtQuick/Rectangle", 1, 0, "data")); childNode4.setId("childNode4"); QVERIFY(childNode.isValid()); @@ -213,7 +213,7 @@ void tst_TestCore::testRewriterView() testRewriterView->modelToTextMerger()->applyChanges(); - childNode = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + childNode = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(testRewriterView->modelToTextMerger()->isNodeScheduledForAddition(childNode)); testRewriterView->modelToTextMerger()->applyChanges(); @@ -233,10 +233,10 @@ void tst_TestCore::testRewriterView() void tst_TestCore::testRewriterErrors() { QPlainTextEdit textEdit; - textEdit.setPlainText("import Qt 4.7;\n\nItem {\n}\n"); + textEdit.setPlainText("import QtQuick 1.0;\n\nItem {\n}\n"); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -250,10 +250,10 @@ void tst_TestCore::testRewriterErrors() model->attachView(testRewriterView.data()); QVERIFY(testRewriterView->errors().isEmpty()); - textEdit.setPlainText("import Qt 4.7;\n\nError {\n}\n"); + textEdit.setPlainText("import QtQuick 1.0;\n\nError {\n}\n"); QVERIFY(!testRewriterView->errors().isEmpty()); - textEdit.setPlainText("import Qt 4.7;\n\nItem {\n}\n"); + textEdit.setPlainText("import QtQuick 1.0;\n\nItem {\n}\n"); QVERIFY(testRewriterView->errors().isEmpty()); } @@ -267,7 +267,7 @@ void tst_TestCore::saveEmptyCoreModel() textEdit1.setPlainText(file.readAll()); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -279,10 +279,10 @@ void tst_TestCore::saveEmptyCoreModel() modifier1.save(&buffer); QPlainTextEdit textEdit2; - textEdit2.setPlainText("import Qt 4.7; Item{}"); + textEdit2.setPlainText("import QtQuick 1.0; Item{}"); NotIndentingTextEditModifier modifier2(&textEdit2); - QScopedPointer model2(Model::create("Qt/item")); + QScopedPointer model2(Model::create("QtQuick/item")); QScopedPointer testRewriterView2(new TestRewriterView()); testRewriterView2->setTextModifier(&modifier2); @@ -302,17 +302,17 @@ void tst_TestCore::loadAttributesInCoreModel() textEdit1.setPlainText(file.readAll()); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); model1->attachView(testRewriterView1.data()); QPlainTextEdit textEdit2; - textEdit2.setPlainText("import Qt 4.7; Item{}"); + textEdit2.setPlainText("import QtQuick 1.0; Item{}"); NotIndentingTextEditModifier modifier2(&textEdit2); - QScopedPointer model2(Model::create("Qt/item")); + QScopedPointer model2(Model::create("QtQuick/item")); QScopedPointer testRewriterView2(new TestRewriterView()); testRewriterView2->setTextModifier(&modifier2); @@ -337,7 +337,7 @@ void tst_TestCore::saveAttributesInCoreModel() textEdit1.setPlainText(file.readAll()); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -353,7 +353,7 @@ void tst_TestCore::saveAttributesInCoreModel() textEdit2.setPlainText(buffer.data()); NotIndentingTextEditModifier modifier2(&textEdit2); - QScopedPointer model2(Model::create("Qt/Item")); + QScopedPointer model2(Model::create("QtQuick/Item")); QScopedPointer testRewriterView2(new TestRewriterView()); testRewriterView2->setTextModifier(&modifier2); @@ -368,7 +368,7 @@ void tst_TestCore::testModelCreateRect() { try { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -376,7 +376,7 @@ void tst_TestCore::testModelCreateRect() model->attachView(view.data()); QVERIFY(view->rootModelNode().isValid()); - ModelNode childNode = addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode.isValid()); QVERIFY(view->rootModelNode().allDirectSubModelNodes().contains(childNode)); QVERIFY(childNode.parentProperty().parentModelNode() == view->rootModelNode()); @@ -404,7 +404,7 @@ void tst_TestCore::testModelCreateRect() void tst_TestCore::testRewriterDynamicProperties() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " property int i\n" @@ -431,7 +431,7 @@ void tst_TestCore::testRewriterDynamicProperties() textEdit1.setPlainText(qmlString); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -521,10 +521,10 @@ void tst_TestCore::testRewriterDynamicProperties() // test model2text // QPlainTextEdit textEdit2; -// textEdit2.setPlainText("import Qt 4.7; Item{}"); +// textEdit2.setPlainText("import QtQuick 1.0; Item{}"); // NotIndentingTextEditModifier modifier2(&textEdit2); // -// QScopedPointer model2(Model::create("Qt/Item")); +// QScopedPointer model2(Model::create("QtQuick/Item")); // // QScopedPointer testRewriterView2(new TestRewriterView()); // testRewriterView2->setTextModifier(&modifier2); @@ -538,7 +538,7 @@ void tst_TestCore::testRewriterDynamicProperties() void tst_TestCore::testRewriterGroupedProperties() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Text {\n" " font {\n" @@ -551,7 +551,7 @@ void tst_TestCore::testRewriterGroupedProperties() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier modifier1(&textEdit); - QScopedPointer model1(Model::create("Qt/Text")); + QScopedPointer model1(Model::create("QtQuick/Text")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -575,7 +575,7 @@ void tst_TestCore::testRewriterGroupedProperties() rootModelNode.removeProperty(QLatin1String("font.pointSize")); const QLatin1String expected("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Text {\n" "}\n"); @@ -586,7 +586,7 @@ void tst_TestCore::testRewriterGroupedProperties() void tst_TestCore::testRewriterPreserveOrder() { const QLatin1String qmlString1("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "width: 640\n" @@ -607,7 +607,7 @@ void tst_TestCore::testRewriterPreserveOrder() "}\n" "}\n"); const QLatin1String qmlString2("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "width: 640\n" @@ -633,7 +633,7 @@ void tst_TestCore::testRewriterPreserveOrder() textEdit.setPlainText(qmlString2); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Text")); + QScopedPointer model(Model::create("QtQuick/Text")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&modifier); @@ -646,7 +646,7 @@ void tst_TestCore::testRewriterPreserveOrder() RewriterTransaction transaction = testRewriterView->beginRewriterTransaction(); - ModelNode newModelNode = testRewriterView->createModelNode("Qt/Rectangle", 4, 7); + ModelNode newModelNode = testRewriterView->createModelNode("QtQuick/Rectangle", 1, 0); newModelNode.setParentProperty(rootModelNode.nodeAbstractProperty("data")); @@ -668,7 +668,7 @@ void tst_TestCore::testRewriterPreserveOrder() textEdit.setPlainText(qmlString1); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Text")); + QScopedPointer model(Model::create("QtQuick/Text")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&modifier); @@ -681,7 +681,7 @@ void tst_TestCore::testRewriterPreserveOrder() RewriterTransaction transaction = testRewriterView->beginRewriterTransaction(); - ModelNode newModelNode = testRewriterView->createModelNode("Qt/Rectangle", 4, 7); + ModelNode newModelNode = testRewriterView->createModelNode("QtQuick/Rectangle", 1, 0); newModelNode.setParentProperty(rootModelNode.nodeAbstractProperty("data")); @@ -702,7 +702,7 @@ void tst_TestCore::testRewriterPreserveOrder() void tst_TestCore::testRewriterActionCompression() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: root\n" @@ -722,7 +722,7 @@ void tst_TestCore::testRewriterActionCompression() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier modifier1(&textEdit); - QScopedPointer model1(Model::create("Qt/Rectangle")); + QScopedPointer model1(Model::create("QtQuick/Rectangle")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&modifier1); @@ -748,7 +748,7 @@ void tst_TestCore::testRewriterActionCompression() transaction.commit(); const QLatin1String expected("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: root\n" @@ -776,7 +776,7 @@ void tst_TestCore::testRewriterImports() textEdit.setPlainText(file.readAll()); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); model->setFileUrl(QUrl::fromLocalFile(fileName)); QScopedPointer testRewriterView(new TestRewriterView()); @@ -787,7 +787,7 @@ void tst_TestCore::testRewriterImports() QVERIFY(model->imports().size() == 3); - // import Qt 4.7 + // import QtQuick 1.0 Import import = model->imports().at(0); QVERIFY(import.isLibraryImport()); QCOMPARE(import.url(), QString("Qt")); @@ -815,7 +815,7 @@ void tst_TestCore::testRewriterImports() void tst_TestCore::testRewriterChangeImports() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {}\n"); @@ -823,7 +823,7 @@ void tst_TestCore::testRewriterChangeImports() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Rectangle")); + QScopedPointer model(Model::create("QtQuick/Rectangle")); QScopedPointer testRewriterView(new TestRewriterView(0, RewriterView::Amend)); testRewriterView->setTextModifier(&modifier); @@ -838,7 +838,7 @@ void tst_TestCore::testRewriterChangeImports() model->addImport(webkitImport); const QLatin1String qmlWithImport("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "import QtWebKit 1.0\n" "\n" "Rectangle {}\n"); @@ -847,7 +847,7 @@ void tst_TestCore::testRewriterChangeImports() model->removeImport(webkitImport); QCOMPARE(model->imports().size(), 1); - QCOMPARE(model->imports().first(), Import::createLibraryImport("Qt", "4.7")); + QCOMPARE(model->imports().first(), Import::createLibraryImport("QtQuick", "1.0")); QCOMPARE(textEdit.toPlainText(), qmlString); @@ -859,7 +859,7 @@ void tst_TestCore::testRewriterChangeImports() model->addImport(webkitImport); const QLatin1String qmlWithAliasImport("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "import QtWebKit 1.0 as Web\n" "\n" "Rectangle {}\n"); @@ -868,7 +868,7 @@ void tst_TestCore::testRewriterChangeImports() model->removeImport(webkitImport); QCOMPARE(model->imports().size(), 1); - QCOMPARE(model->imports().first(), Import::createLibraryImport("Qt", "4.7")); + QCOMPARE(model->imports().first(), Import::createLibraryImport("QtQuick", "1.0")); QCOMPARE(textEdit.toPlainText(), qmlString); @@ -878,23 +878,23 @@ void tst_TestCore::testRewriterChangeImports() // textEdit.setPlainText(qmlWithImport); QCOMPARE(model->imports().size(), 2); - QCOMPARE(model->imports().first(), Import::createLibraryImport("Qt", "4.7")); + QCOMPARE(model->imports().first(), Import::createLibraryImport("QtQuick", "1.0")); QCOMPARE(model->imports().last(), Import::createLibraryImport("QtWebKit", "1.0")); textEdit.setPlainText(qmlWithAliasImport); QCOMPARE(model->imports().size(), 2); - QCOMPARE(model->imports().first(), Import::createLibraryImport("Qt", "4.7")); + QCOMPARE(model->imports().first(), Import::createLibraryImport("QtQuick", "1.0")); QCOMPARE(model->imports().last(), Import::createLibraryImport("QtWebKit", "1.0", "Web")); textEdit.setPlainText(qmlString); QCOMPARE(model->imports().size(), 1); - QCOMPARE(model->imports().first(), Import::createLibraryImport("Qt", "4.7")); + QCOMPARE(model->imports().first(), Import::createLibraryImport("QtQuick", "1.0")); } void tst_TestCore::testRewriterForGradientMagic() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: root\n" @@ -932,7 +932,7 @@ void tst_TestCore::testRewriterForGradientMagic() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Text")); + QScopedPointer model(Model::create("QtQuick/Text")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&modifier); @@ -948,7 +948,7 @@ void tst_TestCore::testRewriterForGradientMagic() myRect.variantProperty("rotation") = QVariant(45); QVERIFY(myRect.isValid()); - QScopedPointer model1(Model::create("Qt/Item", 4, 7)); + QScopedPointer model1(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model1.data()); QScopedPointer view1(new TestView(model1.data())); @@ -956,7 +956,7 @@ void tst_TestCore::testRewriterForGradientMagic() QScopedPointer testRewriterView1(new TestRewriterView()); QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Item {}"); + textEdit1.setPlainText("import QtQuick 1.0; Item {}"); NotIndentingTextEditModifier modifier1(&textEdit1); testRewriterView1->setTextModifier(&modifier1); @@ -982,7 +982,7 @@ void tst_TestCore::loadSubItems() textEdit1.setPlainText(file.readAll()); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -1000,7 +1000,7 @@ void tst_TestCore::createInvalidCoreModel() void tst_TestCore::testModelCreateSubNode() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1012,7 +1012,7 @@ void tst_TestCore::testModelCreateSubNode() QCOMPARE(view->methodCalls(), expectedCalls); QVERIFY(view->rootModelNode().isValid()); - ModelNode childNode = addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode.isValid()); QVERIFY(view->rootModelNode().allDirectSubModelNodes().contains(childNode)); QVERIFY(childNode.parentProperty().parentModelNode() == view->rootModelNode()); @@ -1046,7 +1046,7 @@ void tst_TestCore::testModelCreateSubNode() void tst_TestCore::testTypicalRewriterOperations() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1075,7 +1075,7 @@ void tst_TestCore::testTypicalRewriterOperations() QCOMPARE(rootModelNode.bindingProperty("test").expression(), QString("parent.x")); - ModelNode childNode(addNodeListChild(rootModelNode, "Qt/Rectangle", 4 ,6, "data")); + ModelNode childNode(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 4 ,6, "data")); rootModelNode.nodeListProperty("test").reparentHere(childNode); QCOMPARE(childNode.parentProperty(), rootModelNode.nodeAbstractProperty("test")); QVERIFY(rootModelNode.property("test").isNodeAbstractProperty()); @@ -1095,7 +1095,7 @@ void tst_TestCore::testTypicalRewriterOperations() void tst_TestCore::testBasicStates() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "id: root;\n" "Rectangle {\n" @@ -1134,7 +1134,7 @@ void tst_TestCore::testBasicStates() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1143,13 +1143,13 @@ void tst_TestCore::testBasicStates() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); model->attachView(testRewriterView.data()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Rectangle")); QVERIFY(rootModelNode.hasProperty("data")); @@ -1246,7 +1246,7 @@ void tst_TestCore::testBasicStates() void tst_TestCore::testModelBasicOperations() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1267,8 +1267,8 @@ void tst_TestCore::testModelBasicOperations() QVERIFY(!rootModelNode.hasProperty("width")); QVERIFY(!rootModelNode.hasProperty("children")); - ModelNode childNode1(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "children")); - ModelNode childNode2(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); + ModelNode childNode1(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "children")); + ModelNode childNode2(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); QVERIFY(childNode1.isValid()); QVERIFY(childNode2.isValid()); @@ -1306,7 +1306,7 @@ void tst_TestCore::testModelBasicOperations() void tst_TestCore::testModelResolveIds() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1316,9 +1316,9 @@ void tst_TestCore::testModelResolveIds() ModelNode rootNode = view->rootModelNode(); rootNode.setId("rootNode"); - ModelNode childNode1(addNodeListChild(rootNode, "Qt/Rectangle", 4, 7, "children")); + ModelNode childNode1(addNodeListChild(rootNode, "QtQuick/Rectangle", 1, 0, "children")); - ModelNode childNode2(addNodeListChild(childNode1, "Qt/Rectangle", 4, 7, "children")); + ModelNode childNode2(addNodeListChild(childNode1, "QtQuick/Rectangle", 1, 0, "children")); childNode2.setId("childNode2"); childNode2.bindingProperty("test").setExpression("parent.parent"); @@ -1329,7 +1329,7 @@ void tst_TestCore::testModelResolveIds() childNode2.bindingProperty("test").setExpression("rootNode"); QCOMPARE(childNode2.bindingProperty("test").resolveToModelNode(), rootNode); - ModelNode childNode3(addNodeListChild(childNode2, "Qt/Rectangle", 4, 7, "children")); + ModelNode childNode3(addNodeListChild(childNode2, "QtQuick/Rectangle", 1, 0, "children")); childNode3.setId("childNode3"); childNode2.nodeProperty("front").setModelNode(childNode3); childNode2.bindingProperty("test").setExpression("childNode3.parent"); @@ -1364,7 +1364,7 @@ void tst_TestCore::testModelNodeListProperty() // // Test NodeListProperty API // - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1382,7 +1382,7 @@ void tst_TestCore::testModelNodeListProperty() QVERIFY(!rootChildren.isNodeListProperty()); QVERIFY(rootChildren.isEmpty()); - ModelNode rectNode = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode rectNode = view->createModelNode("QtQuick/Rectangle", 1, 0); rootChildren.reparentHere(rectNode); // @@ -1393,7 +1393,7 @@ void tst_TestCore::testModelNodeListProperty() QVERIFY(rootChildren.isNodeListProperty()); QVERIFY(!rootChildren.isEmpty()); - ModelNode mouseAreaNode = view->createModelNode("Qt/Item", 4, 7); + ModelNode mouseAreaNode = view->createModelNode("QtQuick/Item", 1, 0); NodeListProperty rectChildren = rectNode.nodeListProperty("children"); rectChildren.reparentHere(mouseAreaNode); @@ -1421,7 +1421,7 @@ void tst_TestCore::testModelNodeListProperty() void tst_TestCore::testBasicOperationsWithView() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1453,8 +1453,8 @@ void tst_TestCore::testBasicOperationsWithView() QCOMPARE(rootInstance.size().width(), 10.0); QCOMPARE(rootInstance.size().height(), 10.0); - ModelNode childNode(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); - ModelNode childNode2(addNodeListChild(childNode, "Qt/Rectangle", 4, 7, "data")); + ModelNode childNode(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); + ModelNode childNode2(addNodeListChild(childNode, "QtQuick/Rectangle", 1, 0, "data")); QVERIFY(childNode2.parentProperty().parentModelNode() == childNode); QVERIFY(childNode.isValid()); @@ -1489,10 +1489,10 @@ void tst_TestCore::testBasicOperationsWithView() QVERIFY(!childInstance2.isValid()); } - childNode = addNodeListChild(rootModelNode, "Qt/Image", 4, 7, "data"); + childNode = addNodeListChild(rootModelNode, "QtQuick/Image", 1, 0, "data"); QVERIFY(childNode.isValid()); - QCOMPARE(childNode.type(), QString("Qt/Image")); - childNode2 = addNodeListChild(childNode, "Qt/Rectangle", 4, 7, "data"); + QCOMPARE(childNode.type(), QString("QtQuick/Image")); + childNode2 = addNodeListChild(childNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode2.isValid()); childNode2.setParentProperty(rootModelNode, "data"); QVERIFY(childNode2.isValid()); @@ -1531,7 +1531,7 @@ void tst_TestCore::testBasicOperationsWithView() void tst_TestCore::testQmlModelView() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QmlModelView *view = new TestView(model.data()); @@ -1549,7 +1549,7 @@ void tst_TestCore::testQmlModelView() propertyList.append(qMakePair(QString("width"), QVariant(20))); propertyList.append(qMakePair(QString("height"), QVariant(20))); - QmlObjectNode node1 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); + QmlObjectNode node1 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); QVERIFY(node1.isValid()); QVERIFY(!node1.hasNodeParent()); @@ -1565,7 +1565,7 @@ void tst_TestCore::testQmlModelView() QVERIFY(node1.instanceParent() == view->rootQmlObjectNode()); - QmlObjectNode node2 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); + QmlObjectNode node2 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); QVERIFY(node2.isValid()); QVERIFY(!node2.hasNodeParent()); @@ -1593,12 +1593,12 @@ void tst_TestCore::testQmlModelView() QCOMPARE(node1.instanceValue("x").toInt(), 2); - QmlObjectNode node3 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); - QmlObjectNode node4 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); - QmlObjectNode node5 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); - QmlObjectNode node6 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); - QmlObjectNode node7 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); - QmlObjectNode node8 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); + QmlObjectNode node3 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); + QmlObjectNode node4 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); + QmlObjectNode node5 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); + QmlObjectNode node6 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); + QmlObjectNode node7 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); + QmlObjectNode node8 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); node3.setParentProperty(node2.nodeAbstractProperty("children")); node4.setParentProperty(node3.nodeAbstractProperty("children")); @@ -1626,12 +1626,12 @@ void tst_TestCore::testQmlModelView() QCOMPARE(node2.instanceValue("x").toInt(), 10); // is this right? or should it be a invalid qvariant? - node1 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); + node1 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); node1.setId("node1"); QCOMPARE(node2.instanceValue("x").toInt(), 20); - node3 = view->createQmlObjectNode("Qt/Rectangle", 4, 7, propertyList); + node3 = view->createQmlObjectNode("QtQuick/Rectangle", 1, 0, propertyList); node3.setParentProperty(node2.nodeAbstractProperty("children")); QCOMPARE(node3.instanceValue("width").toInt(), 20); node3.setVariantProperty("width", 0); @@ -1653,7 +1653,7 @@ void tst_TestCore::testQmlModelView() void tst_TestCore::testModelRemoveNode() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1666,7 +1666,7 @@ void tst_TestCore::testModelRemoveNode() QCOMPARE(view->rootModelNode().allDirectSubModelNodes().count(), 0); - ModelNode childNode = addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode.isValid()); QCOMPARE(view->rootModelNode().allDirectSubModelNodes().count(), 1); QVERIFY(view->rootModelNode().allDirectSubModelNodes().contains(childNode)); @@ -1678,7 +1678,7 @@ void tst_TestCore::testModelRemoveNode() QVERIFY(childInstance.parent() == nodeInstanceView->instanceForNode(view->rootModelNode())); } - ModelNode subChildNode = addNodeListChild(childNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode subChildNode = addNodeListChild(childNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(subChildNode.isValid()); QCOMPARE(childNode.allDirectSubModelNodes().count(), 1); QVERIFY(childNode.allDirectSubModelNodes().contains(subChildNode)); @@ -1709,7 +1709,7 @@ void tst_TestCore::testModelRemoveNode() QVERIFY(view->rootModelNode().isValid()); // delete node not in hierarchy - childNode = view->createModelNode("Qt/Item", 4, 7); + childNode = view->createModelNode("QtQuick/Item", 1, 0); childNode.destroy(); model->detachView(nodeInstanceView); @@ -1717,7 +1717,7 @@ void tst_TestCore::testModelRemoveNode() void tst_TestCore::reparentingNode() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); @@ -1734,7 +1734,7 @@ void tst_TestCore::reparentingNode() NodeInstanceView *nodeInstanceView = new NodeInstanceView(model.data()); model->attachView(nodeInstanceView); - ModelNode childNode = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QCOMPARE(childNode.parentProperty().parentModelNode(), rootModelNode); QVERIFY(rootModelNode.allDirectSubModelNodes().contains(childNode)); @@ -1744,7 +1744,7 @@ void tst_TestCore::reparentingNode() QVERIFY(childInstance.parent() == nodeInstanceView->instanceForNode(view->rootModelNode())); } - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/Item", 4, 7, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/Item", 1, 0, "data"); QCOMPARE(childNode2.parentProperty().parentModelNode(), rootModelNode); QVERIFY(rootModelNode.allDirectSubModelNodes().contains(childNode2)); @@ -1785,10 +1785,10 @@ void tst_TestCore::reparentingNode() void tst_TestCore::reparentingNodeLikeDragAndDrop() { QPlainTextEdit textEdit; - textEdit.setPlainText("import Qt 4.7;\n\nItem {\n}\n"); + textEdit.setPlainText("import QtQuick 1.0;\n\nItem {\n}\n"); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -1804,7 +1804,7 @@ void tst_TestCore::reparentingNodeLikeDragAndDrop() view->rootModelNode().setId("rootModelNode"); QCOMPARE(view->rootModelNode().id(), QString("rootModelNode")); - ModelNode rectNode = addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); + ModelNode rectNode = addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); rectNode.setId("rect_1"); rectNode.variantProperty("x").setValue(20); rectNode.variantProperty("y").setValue(30); @@ -1813,7 +1813,7 @@ void tst_TestCore::reparentingNodeLikeDragAndDrop() RewriterTransaction transaction(view->beginRewriterTransaction()); - ModelNode textNode = addNodeListChild(view->rootModelNode(), "Qt/Text", 4, 7, "data"); + ModelNode textNode = addNodeListChild(view->rootModelNode(), "QtQuick/Text", 1, 0, "data"); QCOMPARE(textNode.parentProperty().parentModelNode(), view->rootModelNode()); QVERIFY(view->rootModelNode().allDirectSubModelNodes().contains(textNode)); @@ -1901,7 +1901,7 @@ void tst_TestCore::reparentingNodeLikeDragAndDrop() void tst_TestCore::testModelReorderSiblings() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1914,11 +1914,11 @@ void tst_TestCore::testModelReorderSiblings() ModelNode rootModelNode = view->rootModelNode(); QVERIFY(rootModelNode.isValid()); - ModelNode a = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode a = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(a.isValid()); - ModelNode b = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode b = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(b.isValid()); - ModelNode c = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode c = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(c.isValid()); { @@ -1952,7 +1952,7 @@ void tst_TestCore::testModelReorderSiblings() void tst_TestCore::testModelRootNode() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -1963,10 +1963,10 @@ void tst_TestCore::testModelRootNode() ModelNode rootModelNode = view->rootModelNode(); QVERIFY(rootModelNode.isValid()); QVERIFY(rootModelNode.isRootNode()); - ModelNode topChildNode = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode topChildNode = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(topChildNode.isValid()); QVERIFY(rootModelNode.isRootNode()); - ModelNode childNode = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode.isValid()); QVERIFY(rootModelNode.isValid()); QVERIFY(rootModelNode.isRootNode()); @@ -1983,15 +1983,15 @@ void tst_TestCore::testModelRootNode() void tst_TestCore::reparentingNodeInModificationGroup() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - ModelNode childNode = addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode2 = addNodeListChild(view->rootModelNode(), "Qt/Item", 4, 7, "data"); + ModelNode childNode = addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode2 = addNodeListChild(view->rootModelNode(), "QtQuick/Item", 1, 0, "data"); childNode.variantProperty("x").setValue(10); childNode.variantProperty("y").setValue(10); @@ -2033,7 +2033,7 @@ void tst_TestCore::reparentingNodeInModificationGroup() void tst_TestCore::testModelAddAndRemoveProperty() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2074,7 +2074,7 @@ void tst_TestCore::testModelAddAndRemoveProperty() void tst_TestCore::testModelViewNotification() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view1(new TestView(model.data())); @@ -2096,7 +2096,7 @@ void tst_TestCore::testModelViewNotification() QCOMPARE(view1->methodCalls(), expectedCalls); QCOMPARE(view2->methodCalls(), expectedCalls); - ModelNode childNode = addNodeListChild(view2->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(view2->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); expectedCalls << TestView::MethodCall("nodeCreated", QStringList() << ""); expectedCalls << TestView::MethodCall("nodeReparented", QStringList() << "" << "data" << "" << "PropertiesAdded"); QCOMPARE(view1->methodCalls(), expectedCalls); @@ -2146,7 +2146,7 @@ void tst_TestCore::testModelViewNotification() void tst_TestCore::testRewriterTransaction() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2156,7 +2156,7 @@ void tst_TestCore::testRewriterTransaction() RewriterTransaction transaction = view->beginRewriterTransaction(); QVERIFY(transaction.isValid()); - ModelNode childNode = addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode.isValid()); childNode.destroy(); @@ -2166,7 +2166,7 @@ void tst_TestCore::testRewriterTransaction() RewriterTransaction transaction2 = view->beginRewriterTransaction(); QVERIFY(transaction2.isValid()); - ModelNode childNode = addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode.isValid()); childNode.destroy(); @@ -2193,7 +2193,7 @@ void tst_TestCore::testRewriterTransaction() void tst_TestCore::testRewriterId() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "}\n"; @@ -2201,7 +2201,7 @@ void tst_TestCore::testRewriterId() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2216,16 +2216,16 @@ void tst_TestCore::testRewriterId() model->attachView(testRewriterView.data()); - QCOMPARE(rootModelNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Rectangle")); QVERIFY(rootModelNode.isValid()); - ModelNode newNode(view->createModelNode("Qt/Rectangle", 4, 7)); + ModelNode newNode(view->createModelNode("QtQuick/Rectangle", 1, 0)); newNode.setId("testId"); rootModelNode.nodeListProperty("data").reparentHere(newNode); - const QLatin1String expected("import Qt 4.7\n" + const QLatin1String expected("import QtQuick 1.0\n" "Rectangle {\n" "Rectangle {\n" " id: testId\n" @@ -2237,7 +2237,7 @@ void tst_TestCore::testRewriterId() void tst_TestCore::testRewriterNodeReparentingTransaction1() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "}\n"; @@ -2245,7 +2245,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction1() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2254,7 +2254,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction1() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); @@ -2262,12 +2262,12 @@ void tst_TestCore::testRewriterNodeReparentingTransaction1() QVERIFY(rootModelNode.isValid()); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode3 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode4 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode3 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode4 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); - ModelNode reparentNode = addNodeListChild(childNode1, "Qt/Rectangle", 4, 7, "data"); + ModelNode reparentNode = addNodeListChild(childNode1, "QtQuick/Rectangle", 1, 0, "data"); RewriterTransaction rewriterTransaction = view->beginRewriterTransaction(); @@ -2282,7 +2282,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction1() void tst_TestCore::testRewriterNodeReparentingTransaction2() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "}\n"; @@ -2290,7 +2290,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction2() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2299,7 +2299,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction2() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); @@ -2307,8 +2307,8 @@ void tst_TestCore::testRewriterNodeReparentingTransaction2() QVERIFY(rootModelNode.isValid()); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); childNode2.variantProperty("x") = 200; childNode2.variantProperty("y") = 50; @@ -2348,7 +2348,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction2() void tst_TestCore::testRewriterNodeReparentingTransaction3() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "}\n"; @@ -2356,7 +2356,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction3() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2365,7 +2365,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction3() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); @@ -2373,10 +2373,10 @@ void tst_TestCore::testRewriterNodeReparentingTransaction3() QVERIFY(rootModelNode.isValid()); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode3 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode4 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode3 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode4 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); RewriterTransaction rewriterTransaction = view->beginRewriterTransaction(); @@ -2398,7 +2398,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction3() void tst_TestCore::testRewriterNodeReparentingTransaction4() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "}\n"; @@ -2406,7 +2406,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction4() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2415,7 +2415,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction4() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); @@ -2423,11 +2423,11 @@ void tst_TestCore::testRewriterNodeReparentingTransaction4() QVERIFY(rootModelNode.isValid()); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode3 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode4 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); - ModelNode childNode5 = addNodeListChild(childNode2, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode3 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode4 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); + ModelNode childNode5 = addNodeListChild(childNode2, "QtQuick/Rectangle", 1, 0, "data"); RewriterTransaction rewriterTransaction = view->beginRewriterTransaction(); @@ -2449,7 +2449,7 @@ void tst_TestCore::testRewriterNodeReparentingTransaction4() void tst_TestCore::testRewriterAddNodeTransaction() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "}\n"; @@ -2457,7 +2457,7 @@ void tst_TestCore::testRewriterAddNodeTransaction() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2466,7 +2466,7 @@ void tst_TestCore::testRewriterAddNodeTransaction() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); @@ -2475,11 +2475,11 @@ void tst_TestCore::testRewriterAddNodeTransaction() QVERIFY(rootModelNode.isValid()); - ModelNode childNode = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); RewriterTransaction rewriterTransaction = view->beginRewriterTransaction(); - ModelNode newNode = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode newNode = view->createModelNode("QtQuick/Rectangle", 1, 0); newNode.variantProperty("x") = 100; newNode.variantProperty("y") = 100; @@ -2491,7 +2491,7 @@ void tst_TestCore::testRewriterAddNodeTransaction() void tst_TestCore::testRewriterComponentId() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" " Component {\n" " id: testComponent\n" @@ -2504,7 +2504,7 @@ void tst_TestCore::testRewriterComponentId() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2517,17 +2517,17 @@ void tst_TestCore::testRewriterComponentId() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Rectangle")); ModelNode component(rootModelNode.allDirectSubModelNodes().first()); QVERIFY(component.isValid()); - QCOMPARE(component.type(), QString("Qt/Component")); + QCOMPARE(component.type(), QString("QtQuick/Component")); QCOMPARE(component.id(), QString("testComponent")); } void tst_TestCore::testRewriterTransactionRewriter() { - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "}\n"; @@ -2535,7 +2535,7 @@ void tst_TestCore::testRewriterTransactionRewriter() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2544,7 +2544,7 @@ void tst_TestCore::testRewriterTransactionRewriter() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); @@ -2557,7 +2557,7 @@ void tst_TestCore::testRewriterTransactionRewriter() { RewriterTransaction transaction = view->beginRewriterTransaction(); - childNode1 = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + childNode1 = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); childNode1.variantProperty("x") = 10; childNode1.variantProperty("y") = 10; } @@ -2569,7 +2569,7 @@ void tst_TestCore::testRewriterTransactionRewriter() { RewriterTransaction transaction = view->beginRewriterTransaction(); - childNode2 = addNodeListChild(childNode1, "Qt/Rectangle", 4, 7, "data"); + childNode2 = addNodeListChild(childNode1, "QtQuick/Rectangle", 1, 0, "data"); childNode2.destroy(); } @@ -2594,7 +2594,7 @@ void tst_TestCore::testRewriterPropertyDeclarations() // property variant myArray: [ Rectangle {} ] // property variant someGradient: Gradient {} - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Item {\n" " property int intProperty\n" " property bool boolProperty: true\n" @@ -2607,7 +2607,7 @@ void tst_TestCore::testRewriterPropertyDeclarations() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2625,7 +2625,7 @@ void tst_TestCore::testRewriterPropertyDeclarations() // ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QCOMPARE(rootModelNode.properties().size(), 4); @@ -2658,7 +2658,7 @@ void tst_TestCore::testRewriterPropertyAliases() // where type is (int | bool | double | real | string | url | color | date | variant) // - char qmlString[] = "import Qt 4.7\n" + char qmlString[] = "import QtQuick 1.0\n" "Item {\n" " property alias theText: t.text\n" " default alias property yPos: t.y\n" @@ -2669,7 +2669,7 @@ void tst_TestCore::testRewriterPropertyAliases() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2682,7 +2682,7 @@ void tst_TestCore::testRewriterPropertyAliases() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QList properties = rootModelNode.properties(); QCOMPARE(properties.size(), 0); // TODO: How to represent alias properties? As Bindings? @@ -2691,7 +2691,7 @@ void tst_TestCore::testRewriterPropertyAliases() void tst_TestCore::testRewriterPositionAndOffset() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: root\n" @@ -2729,7 +2729,7 @@ void tst_TestCore::testRewriterPositionAndOffset() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2742,7 +2742,7 @@ void tst_TestCore::testRewriterPositionAndOffset() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); QString string = QString(qmlString).mid(testRewriterView->nodeOffset(rootNode), testRewriterView->nodeLength(rootNode)); const QString qmlExpected0("Rectangle {\n" @@ -2808,7 +2808,7 @@ void tst_TestCore::testRewriterPositionAndOffset() void tst_TestCore::testRewriterComponentTextModifier() { - const QString qmlString("import Qt 4.7\n" + const QString qmlString("import QtQuick 1.0\n" "Rectangle {\n" " id: root\n" " x: 10;\n" @@ -2831,7 +2831,7 @@ void tst_TestCore::testRewriterComponentTextModifier() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2844,7 +2844,7 @@ void tst_TestCore::testRewriterComponentTextModifier() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); ModelNode componentNode = rootNode.allDirectSubModelNodes().last(); @@ -2855,7 +2855,7 @@ void tst_TestCore::testRewriterComponentTextModifier() ComponentTextModifier componentTextModifier(&textModifier, componentStartOffset, componentEndOffset, rootStartOffset); - const QString qmlExpected("import Qt 4.7\n" + const QString qmlExpected("import QtQuick 1.0\n" " " " " " " @@ -2876,19 +2876,19 @@ void tst_TestCore::testRewriterComponentTextModifier() QCOMPARE(componentTextModifier.text(), qmlExpected); - QScopedPointer componentModel(Model::create("Qt/Item", 4, 7)); + QScopedPointer componentModel(Model::create("QtQuick/Item", 1, 0)); QScopedPointer testRewriterViewComponent(new TestRewriterView()); testRewriterViewComponent->setTextModifier(&componentTextModifier); componentModel->attachView(testRewriterViewComponent.data()); ModelNode componentrootNode = testRewriterViewComponent->rootModelNode(); QVERIFY(componentrootNode.isValid()); - QCOMPARE(componentrootNode.type(), QLatin1String("Qt/Component")); + QCOMPARE(componentrootNode.type(), QLatin1String("QtQuick/Component")); } void tst_TestCore::testRewriterPreserveType() { - const QString qmlString("import Qt 4.7\n" + const QString qmlString("import QtQuick 1.0\n" "Rectangle {\n" " id: root\n" " Text {\n" @@ -2901,7 +2901,7 @@ void tst_TestCore::testRewriterPreserveType() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2914,7 +2914,7 @@ void tst_TestCore::testRewriterPreserveType() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); ModelNode textNode = rootNode.allDirectSubModelNodes().first(); QCOMPARE(QVariant::Bool, textNode.variantProperty("font.bold").value().type()); @@ -2923,7 +2923,7 @@ void tst_TestCore::testRewriterPreserveType() textNode.variantProperty("font.bold") = QVariant(true); textNode.variantProperty("font.pointSize") = QVariant(13.0); - ModelNode newTextNode = addNodeListChild(rootNode, "Qt/Text", 4, 7, "data"); + ModelNode newTextNode = addNodeListChild(rootNode, "QtQuick/Text", 1, 0, "data"); newTextNode.variantProperty("font.bold") = QVariant(true); newTextNode.variantProperty("font.pointSize") = QVariant(13.0); @@ -2935,7 +2935,7 @@ void tst_TestCore::testRewriterPreserveType() void tst_TestCore::testRewriterForArrayMagic() { try { - const QLatin1String qmlString("import Qt 4.7\n" + const QLatin1String qmlString("import QtQuick 1.0\n" "\n" "Rectangle {\n" " states: State {\n" @@ -2946,7 +2946,7 @@ void tst_TestCore::testRewriterForArrayMagic() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -2959,16 +2959,16 @@ void tst_TestCore::testRewriterForArrayMagic() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); QVERIFY(rootNode.property(QLatin1String("states")).isNodeListProperty()); QmlItemNode rootItem(rootNode); QVERIFY(rootItem.isValid()); QmlModelState state1(rootItem.states().addState("s2")); - QCOMPARE(state1.modelNode().type(), QString("Qt/State")); + QCOMPARE(state1.modelNode().type(), QString("QtQuick/State")); - const QLatin1String expected("import Qt 4.7\n" + const QLatin1String expected("import QtQuick 1.0\n" "\n" "Rectangle {\n" " states: [\n" @@ -2989,7 +2989,7 @@ void tst_TestCore::testRewriterForArrayMagic() void tst_TestCore::testRewriterWithSignals() { - const QLatin1String qmlString("import Qt 4.7\n" + const QLatin1String qmlString("import QtQuick 1.0\n" "\n" "TextEdit {\n" " onTextChanged: { print(\"foo\"); }\n" @@ -2998,7 +2998,7 @@ void tst_TestCore::testRewriterWithSignals() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -3011,7 +3011,7 @@ void tst_TestCore::testRewriterWithSignals() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/TextEdit")); + QCOMPARE(rootNode.type(), QString("QtQuick/TextEdit")); QmlItemNode rootItem(rootNode); QVERIFY(rootItem.isValid()); @@ -3021,7 +3021,7 @@ void tst_TestCore::testRewriterWithSignals() void tst_TestCore::testRewriterNodeSliding() { - const QLatin1String qmlString("import Qt 4.7\n" + const QLatin1String qmlString("import QtQuick 1.0\n" "Rectangle {\n" " id: root\n" " Rectangle {\n" @@ -3041,7 +3041,7 @@ void tst_TestCore::testRewriterNodeSliding() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -3054,7 +3054,7 @@ void tst_TestCore::testRewriterNodeSliding() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); QCOMPARE(rootNode.id(), QLatin1String("root")); QCOMPARE(rootNode.nodeListProperty(QLatin1String("data")).toModelNodeList().at(0).id(), QLatin1String("rectangle1")); @@ -3073,7 +3073,7 @@ void tst_TestCore::testRewriterNodeSliding() void tst_TestCore::testRewriterExceptionHandling() { - const QLatin1String qmlString("import Qt 4.7\n" + const QLatin1String qmlString("import QtQuick 1.0\n" "Text {\n" "}"); @@ -3081,7 +3081,7 @@ void tst_TestCore::testRewriterExceptionHandling() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Text", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Text", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -3094,7 +3094,7 @@ void tst_TestCore::testRewriterExceptionHandling() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Text")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Text")); try { @@ -3105,7 +3105,7 @@ void tst_TestCore::testRewriterExceptionHandling() QFAIL("RewritingException should be thrown"); } catch (RewritingException &e) { QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Text")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Text")); QVERIFY(!rootNode.hasProperty("bla")); QVERIFY(!rootNode.hasProperty("text")); } @@ -3113,7 +3113,7 @@ void tst_TestCore::testRewriterExceptionHandling() void tst_TestCore::testRewriterFirstDefinitionInside() { - const QString qmlString("import Qt 4.7\n" + const QString qmlString("import QtQuick 1.0\n" "Rectangle {\n" " id: root\n" " x: 10;\n" @@ -3137,7 +3137,7 @@ void tst_TestCore::testRewriterFirstDefinitionInside() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -3150,7 +3150,7 @@ void tst_TestCore::testRewriterFirstDefinitionInside() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); ModelNode componentNode = rootNode.allDirectSubModelNodes().last(); @@ -3169,7 +3169,7 @@ void tst_TestCore::testRewriterFirstDefinitionInside() void tst_TestCore::testCopyModelRewriter1() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: root\n" @@ -3207,7 +3207,7 @@ void tst_TestCore::testCopyModelRewriter1() textEdit1.setPlainText(qmlString); NotIndentingTextEditModifier textModifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item", 4, 7)); + QScopedPointer model1(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model1.data()); QScopedPointer view1(new TestView(model1.data())); @@ -3220,13 +3220,13 @@ void tst_TestCore::testCopyModelRewriter1() ModelNode rootNode1 = view1->rootModelNode(); QVERIFY(rootNode1.isValid()); - QCOMPARE(rootNode1.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode1.type(), QLatin1String("QtQuick/Rectangle")); QPlainTextEdit textEdit2; textEdit2.setPlainText(qmlString); NotIndentingTextEditModifier textModifier2(&textEdit2); - QScopedPointer model2(Model::create("Qt/Item", 4, 7)); + QScopedPointer model2(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model2.data()); QScopedPointer view2(new TestView(model2.data())); @@ -3239,7 +3239,7 @@ void tst_TestCore::testCopyModelRewriter1() ModelNode rootNode2 = view2->rootModelNode(); QVERIFY(rootNode2.isValid()); - QCOMPARE(rootNode2.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode2.type(), QLatin1String("QtQuick/Rectangle")); // @@ -3264,7 +3264,7 @@ void tst_TestCore::testCopyModelRewriter1() const QLatin1String expected( "\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: root\n" @@ -3339,7 +3339,7 @@ void tst_TestCore::testCopyModelRewriter1() void tst_TestCore::testCopyModelRewriter2() { const QLatin1String qmlString1("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "id: root\n" @@ -3379,7 +3379,7 @@ void tst_TestCore::testCopyModelRewriter2() const QLatin1String qmlString2("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -3388,7 +3388,7 @@ void tst_TestCore::testCopyModelRewriter2() textEdit1.setPlainText(qmlString1); NotIndentingTextEditModifier textModifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item", 4, 7)); + QScopedPointer model1(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model1.data()); QScopedPointer view1(new TestView(model1.data())); @@ -3401,7 +3401,7 @@ void tst_TestCore::testCopyModelRewriter2() ModelNode rootNode1 = view1->rootModelNode(); QVERIFY(rootNode1.isValid()); - QCOMPARE(rootNode1.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode1.type(), QLatin1String("QtQuick/Rectangle")); // read in 2 @@ -3410,7 +3410,7 @@ void tst_TestCore::testCopyModelRewriter2() textEdit2.setPlainText(qmlString2); NotIndentingTextEditModifier textModifier2(&textEdit2); - QScopedPointer model2(Model::create("Qt/Item", 4, 7)); + QScopedPointer model2(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model2.data()); QScopedPointer view2(new TestView(model2.data())); @@ -3422,7 +3422,7 @@ void tst_TestCore::testCopyModelRewriter2() ModelNode rootNode2 = view2->rootModelNode(); QVERIFY(rootNode2.isValid()); - QCOMPARE(rootNode2.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode2.type(), QLatin1String("QtQuick/Rectangle")); // @@ -3431,7 +3431,7 @@ void tst_TestCore::testCopyModelRewriter2() merger.replaceModel(rootNode1); QVERIFY(rootNode2.isValid()); - QCOMPARE(rootNode2.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode2.type(), QLatin1String("QtQuick/Rectangle")); QCOMPARE(textEdit2.toPlainText(), qmlString1); } @@ -3446,7 +3446,7 @@ void tst_TestCore::testSubComponentManager() textEdit.setPlainText(file.readAll()); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); model->setFileUrl(QUrl::fromLocalFile(fileName)); QScopedPointer subComponentManager(new SubComponentManager(model->metaInfo(), 0)); subComponentManager->update(QUrl::fromLocalFile(fileName), modifier.text().toUtf8()); @@ -3460,9 +3460,9 @@ void tst_TestCore::testSubComponentManager() QVERIFY(testRewriterView->rootModelNode().isValid()); - QVERIFY(model->metaInfo().nodeMetaInfo("Qt/Rectangle").properties(true).keys().contains("border.width")); + QVERIFY(model->metaInfo().nodeMetaInfo("QtQuick/Rectangle").properties(true).keys().contains("border.width")); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Pen")); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Pen")); NodeMetaInfo myButtonMetaInfo = model->metaInfo().nodeMetaInfo("MyButton"); QVERIFY(myButtonMetaInfo.isValid()); QVERIFY(myButtonMetaInfo.properties(true).keys().contains("border.width")); @@ -3471,7 +3471,7 @@ void tst_TestCore::testSubComponentManager() void tst_TestCore::testAnchorsAndRewriting() { - const QString qmlString("import Qt 4.7\n" + const QString qmlString("import QtQuick 1.0\n" "Rectangle {\n" " id: root\n" " x: 10;\n" @@ -3494,7 +3494,7 @@ void tst_TestCore::testAnchorsAndRewriting() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -3507,7 +3507,7 @@ void tst_TestCore::testAnchorsAndRewriting() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); QmlItemNode rootItemNode = view->rootQmlItemNode(); QVERIFY(rootItemNode.isValid()); @@ -3532,7 +3532,7 @@ void tst_TestCore::testAnchorsAndRewriting() void tst_TestCore::testAnchorsAndRewritingCenter() { - const QString qmlString("import Qt 4.7\n" + const QString qmlString("import QtQuick 1.0\n" "Rectangle {\n" " id: root\n" " x: 10;\n" @@ -3555,7 +3555,7 @@ void tst_TestCore::testAnchorsAndRewritingCenter() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -3568,7 +3568,7 @@ void tst_TestCore::testAnchorsAndRewritingCenter() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); QmlItemNode rootItemNode = view->rootQmlItemNode(); QVERIFY(rootItemNode.isValid()); @@ -3582,7 +3582,7 @@ void tst_TestCore::testAnchorsAndRewritingCenter() void tst_TestCore::loadQml() { -char qmlString[] = "import Qt 4.7\n" +char qmlString[] = "import QtQuick 1.0\n" "Rectangle {\n" "id: root;\n" "width: 200;\n" @@ -3623,7 +3623,7 @@ char qmlString[] = "import Qt 4.7\n" textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -3632,14 +3632,14 @@ char qmlString[] = "import Qt 4.7\n" ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Item")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Item")); QScopedPointer testRewriterView(new TestRewriterView()); testRewriterView->setTextModifier(&textModifier); model->attachView(testRewriterView.data()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QString("QtQuick/Rectangle")); QCOMPARE(rootModelNode.id(), QString("root")); QCOMPARE(rootModelNode.variantProperty("width").value().toInt(), 200); QCOMPARE(rootModelNode.variantProperty("height").value().toInt(), 200); @@ -3649,7 +3649,7 @@ char qmlString[] = "import Qt 4.7\n" QCOMPARE(rootModelNode.nodeListProperty("data").toModelNodeList().count(), 3); ModelNode textNode1 = rootModelNode.nodeListProperty("data").toModelNodeList().first(); QVERIFY(textNode1.isValid()); - QCOMPARE(textNode1.type(), QString("Qt/Text")); + QCOMPARE(textNode1.type(), QString("QtQuick/Text")); QCOMPARE(textNode1.id(), QString("text1")); QCOMPARE(textNode1.variantProperty("text").value().toString(), QString("Hello World")); QVERIFY(textNode1.hasProperty("anchors.centerIn")); @@ -3665,13 +3665,13 @@ char qmlString[] = "import Qt 4.7\n" ModelNode rectNode = rootModelNode.nodeListProperty("data").toModelNodeList().at(1); QVERIFY(rectNode.isValid()); - QCOMPARE(rectNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rectNode.type(), QString("QtQuick/Rectangle")); QCOMPARE(rectNode.id(), QString("rectangle")); QVERIFY(rectNode.hasProperty("gradient")); QVERIFY(rectNode.property("gradient").isNodeProperty()); ModelNode gradientNode = rectNode.nodeProperty("gradient").modelNode(); QVERIFY(gradientNode.isValid()); - QCOMPARE(gradientNode.type(), QString("Qt/Gradient")); + QCOMPARE(gradientNode.type(), QString("QtQuick/Gradient")); QVERIFY(gradientNode.hasProperty("stops")); QVERIFY(gradientNode.property("stops").isNodeListProperty()); QCOMPARE(gradientNode.nodeListProperty("stops").toModelNodeList().count(), 2); @@ -3682,15 +3682,15 @@ char qmlString[] = "import Qt 4.7\n" QVERIFY(stop1.isValid()); QVERIFY(stop2.isValid()); - QCOMPARE(stop1.type(), QString("Qt/GradientStop")); - QCOMPARE(stop2.type(), QString("Qt/GradientStop")); + QCOMPARE(stop1.type(), QString("QtQuick/GradientStop")); + QCOMPARE(stop2.type(), QString("QtQuick/GradientStop")); QCOMPARE(stop1.variantProperty("position").value().toInt(), 0); QCOMPARE(stop2.variantProperty("position").value().toInt(), 1); ModelNode textNode2 = rootModelNode.nodeListProperty("data").toModelNodeList().last(); QVERIFY(textNode2.isValid()); - QCOMPARE(textNode2.type(), QString("Qt/Text")); + QCOMPARE(textNode2.type(), QString("QtQuick/Text")); QCOMPARE(textNode2.id(), QString("text2")); QCOMPARE(textNode2.variantProperty("width").value().toInt(), 80); QCOMPARE(textNode2.variantProperty("height").value().toInt(), 20); @@ -3701,17 +3701,17 @@ char qmlString[] = "import Qt 4.7\n" void tst_TestCore::testMetaInfo() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); // test whether default type is registered - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7)); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Item", 1, 0)); // test whether types from plugins are registered QVERIFY(model->metaInfo().hasNodeMetaInfo("QtWebKit/WebView", 1, 0)); // test whether non-qml type is registered - QVERIFY(model->metaInfo().hasNodeMetaInfo("QGraphicsObject", 4, 7)); // Qt 4.7 namespace + QVERIFY(model->metaInfo().hasNodeMetaInfo("QGraphicsObject", 1, 0)); // Qt 4.7 namespace QVERIFY(model->metaInfo().hasNodeMetaInfo("QGraphicsObject", 1, 0)); // webkit 1.0 namespace } @@ -3723,20 +3723,20 @@ void tst_TestCore::testMetaInfoSimpleType() // qmlRegisterType("Qt",4,7,"Item") // - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7)); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item", 4, 7)); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Item", 1, 0)); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Item", 1, 0)); - NodeMetaInfo itemMetaInfo = model->metaInfo().nodeMetaInfo("Qt/Item", 4, 7); - NodeMetaInfo itemMetaInfo2 = model->metaInfo().nodeMetaInfo("Qt/Item", 4, 7); + NodeMetaInfo itemMetaInfo = model->metaInfo().nodeMetaInfo("QtQuick/Item", 1, 0); + NodeMetaInfo itemMetaInfo2 = model->metaInfo().nodeMetaInfo("QtQuick/Item", 1, 0); QCOMPARE(itemMetaInfo, itemMetaInfo2); QVERIFY(itemMetaInfo.isValid()); - QCOMPARE(itemMetaInfo.typeName(), QLatin1String("Qt/Item")); - QCOMPARE(itemMetaInfo.majorVersion(), 4); - QCOMPARE(itemMetaInfo.minorVersion(), 7); + QCOMPARE(itemMetaInfo.typeName(), QLatin1String("QtQuick/Item")); + QCOMPARE(itemMetaInfo.majorVersion(), 1); + QCOMPARE(itemMetaInfo.minorVersion(), 0); // super classes NodeMetaInfo graphicsObjectInfo = itemMetaInfo.directSuperClass(); @@ -3745,17 +3745,15 @@ void tst_TestCore::testMetaInfoSimpleType() QCOMPARE(graphicsObjectInfo.majorVersion(), -1); QCOMPARE(graphicsObjectInfo.minorVersion(), -1); - QCOMPARE(itemMetaInfo.superClasses().size(), 2); // QGraphicsObject, Qt/QtObject - QVERIFY(itemMetaInfo.isSubclassOf("QGraphicsObject", 4, 7)); - QVERIFY(itemMetaInfo.isSubclassOf("Qt/QtObject", 4, 7)); + QCOMPARE(itemMetaInfo.superClasses().size(), 2); // QGraphicsObject, QtQuick/QtObject + QVERIFY(itemMetaInfo.isSubclassOf("QGraphicsObject", 1, 0)); + QVERIFY(itemMetaInfo.isSubclassOf("QtQuick/QtObject", 1, 0)); // availableInVersion - QVERIFY(itemMetaInfo.availableInVersion(4, 7)); - QVERIFY(itemMetaInfo.availableInVersion(4, 8)); - QVERIFY(itemMetaInfo.availableInVersion(5, 0)); + QVERIFY(itemMetaInfo.availableInVersion(1, 0)); QVERIFY(itemMetaInfo.availableInVersion(-1, -1)); - QVERIFY(!itemMetaInfo.availableInVersion(4, 6)); - QVERIFY(!itemMetaInfo.availableInVersion(3, 7)); + QVERIFY(!itemMetaInfo.availableInVersion(0, 8)); + QVERIFY(!itemMetaInfo.availableInVersion(0, 9)); } void tst_TestCore::testMetaInfoUncreatableType() @@ -3765,23 +3763,23 @@ void tst_TestCore::testMetaInfoUncreatableType() // qmlRegisterUncreatableType("Qt",4,7,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class")); // - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Animation")); - NodeMetaInfo animationTypeInfo = model->metaInfo().nodeMetaInfo("Qt/Animation", 4, 7); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Animation")); + NodeMetaInfo animationTypeInfo = model->metaInfo().nodeMetaInfo("QtQuick/Animation", 1, 0); QVERIFY(animationTypeInfo.isValid()); QVERIFY(animationTypeInfo.isValid()); - QCOMPARE(animationTypeInfo.typeName(), QLatin1String("Qt/Animation")); - QCOMPARE(animationTypeInfo.majorVersion(), 4); - QCOMPARE(animationTypeInfo.minorVersion(), 7); + QCOMPARE(animationTypeInfo.typeName(), QLatin1String("QtQuick/Animation")); + QCOMPARE(animationTypeInfo.majorVersion(), 1); + QCOMPARE(animationTypeInfo.minorVersion(), 0); NodeMetaInfo qObjectTypeInfo = animationTypeInfo.directSuperClass(); QVERIFY(qObjectTypeInfo.isValid()); - QCOMPARE(qObjectTypeInfo.typeName(), QLatin1String("Qt/QtObject")); - QCOMPARE(qObjectTypeInfo.majorVersion(), 4); - QCOMPARE(qObjectTypeInfo.minorVersion(), 7); + QCOMPARE(qObjectTypeInfo.typeName(), QLatin1String("QtQuick/QtObject")); + QCOMPARE(qObjectTypeInfo.majorVersion(), 1); + QCOMPARE(qObjectTypeInfo.minorVersion(), 0); QCOMPARE(animationTypeInfo.superClasses().size(), 1); } @@ -3792,11 +3790,11 @@ void tst_TestCore::testMetaInfoExtendedType() // qmlRegisterExtendedType("Qt",4,7,"QGraphicsWidget"); // - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/QGraphicsWidget")); - NodeMetaInfo graphicsWidgetTypeInfo = model->metaInfo().nodeMetaInfo("Qt/QGraphicsWidget", 4, 7); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/QGraphicsWidget")); + NodeMetaInfo graphicsWidgetTypeInfo = model->metaInfo().nodeMetaInfo("QtQuick/QGraphicsWidget", 1, 0); QVERIFY(graphicsWidgetTypeInfo.isValid()); QVERIFY(graphicsWidgetTypeInfo.hasProperty("layout")); // from QGraphicsWidgetDeclarativeUI QVERIFY(graphicsWidgetTypeInfo.hasProperty("font")); // from QGraphicsWidget @@ -3822,13 +3820,13 @@ void tst_TestCore::testMetaInfoCustomType() { // Test type registered with qmlRegisterCustomType: // - // qmlRegisterCustomType("Qt", 4, 7, "PropertyChanges", new QDeclarativePropertyChangesParser); + // qmlRegisterCustomType("Qt", 1, 0, "PropertyChanges", new QDeclarativePropertyChangesParser); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/PropertyChanges")); - NodeMetaInfo propertyChangesInfo = model->metaInfo().nodeMetaInfo("Qt/PropertyChanges", 4, 7); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/PropertyChanges")); + NodeMetaInfo propertyChangesInfo = model->metaInfo().nodeMetaInfo("QtQuick/PropertyChanges", 1, 0); QVERIFY(propertyChangesInfo.isValid()); QVERIFY(propertyChangesInfo.hasProperty("target")); // from QDeclarativePropertyChanges QVERIFY(propertyChangesInfo.hasProperty("restoreEntryValues")); // from QDeclarativePropertyChanges @@ -3847,14 +3845,14 @@ void tst_TestCore::testMetaInfoCustomType() void tst_TestCore::testMetaInfoEnums() { - QScopedPointer model(Model::create("Qt/Text")); + QScopedPointer model(Model::create("QtQuick/Text")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - QCOMPARE(view->rootModelNode().metaInfo().typeName(), QString("Qt/Text")); + QCOMPARE(view->rootModelNode().metaInfo().typeName(), QString("QtQuick/Text")); QVERIFY(view->rootModelNode().metaInfo().hasProperty("transformOrigin")); @@ -3871,14 +3869,14 @@ void tst_TestCore::testMetaInfoEnums() void tst_TestCore::testMetaInfoProperties() { - QScopedPointer model(Model::create("Qt/Text")); + QScopedPointer model(Model::create("QtQuick/Text")); QVERIFY(model.data()); - NodeMetaInfo textNodeMetaInfo = model->metaInfo().nodeMetaInfo("Qt/TextEdit", 4, 7); + NodeMetaInfo textNodeMetaInfo = model->metaInfo().nodeMetaInfo("QtQuick/TextEdit", 1, 0); QVERIFY(textNodeMetaInfo.hasProperty("text")); // QDeclarativeTextEdit QVERIFY(textNodeMetaInfo.hasProperty("parent")); // QDeclarativeItem QVERIFY(textNodeMetaInfo.hasProperty("x")); // QGraphicsObject - QVERIFY(textNodeMetaInfo.hasProperty("objectName")); // Qt/QObject + QVERIFY(textNodeMetaInfo.hasProperty("objectName")); // QtQuick/QObject QVERIFY(!textNodeMetaInfo.hasProperty("bla")); QVERIFY(textNodeMetaInfo.property("text").isValid()); @@ -3891,18 +3889,18 @@ void tst_TestCore::testMetaInfoProperties() void tst_TestCore::testMetaInfoDotProperties() { - QScopedPointer model(Model::create("Qt/Text")); + QScopedPointer model(Model::create("QtQuick/Text")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Text")); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Text")); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Pen")); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Pen")); - QCOMPARE(view->rootModelNode().metaInfo().typeName(), QString("Qt/Text")); + QCOMPARE(view->rootModelNode().metaInfo().typeName(), QString("QtQuick/Text")); QVERIFY(!view->rootModelNode().metaInfo().property("text").isValueType()); QVERIFY(view->rootModelNode().metaInfo().hasProperty("font")); QVERIFY(view->rootModelNode().metaInfo().property("font").isValueType()); @@ -3914,7 +3912,7 @@ void tst_TestCore::testMetaInfoDotProperties() QVERIFY(view->rootModelNode().metaInfo().hasProperty("font.pointSize", true)); QVERIFY(view->rootModelNode().metaInfo().property("font.pointSize", true).isValid()); - ModelNode rectNode(addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data")); + ModelNode rectNode(addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data")); QVERIFY(rectNode.metaInfo().properties(true).keys().contains("pos.x")); @@ -3933,15 +3931,15 @@ void tst_TestCore::testMetaInfoDotProperties() void tst_TestCore::testMetaInfoListProperties() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Item")); - QCOMPARE(view->rootModelNode().metaInfo().typeName(), QString("Qt/Item")); + QVERIFY(model->metaInfo().hasNodeMetaInfo("QtQuick/Item")); + QCOMPARE(view->rootModelNode().metaInfo().typeName(), QString("QtQuick/Item")); QVERIFY(view->rootModelNode().metaInfo().hasProperty("states")); QVERIFY(view->rootModelNode().metaInfo().property("states").isListProperty()); @@ -3965,10 +3963,10 @@ void tst_TestCore::testMetaInfoListProperties() void tst_TestCore::testStatesRewriter() { QPlainTextEdit textEdit; - textEdit.setPlainText("import Qt 4.7; Item {}\n"); + textEdit.setPlainText("import QtQuick 1.0; Item {}\n"); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); @@ -4012,10 +4010,10 @@ void tst_TestCore::testStatesRewriter() void tst_TestCore::testGradientsRewriter() { QPlainTextEdit textEdit; - textEdit.setPlainText("\nimport Qt 4.7\n\nItem {\n}\n"); + textEdit.setPlainText("\nimport QtQuick 1.0\n\nItem {\n}\n"); NotIndentingTextEditModifier modifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); @@ -4031,9 +4029,9 @@ void tst_TestCore::testGradientsRewriter() QVERIFY(rootModelNode.isValid()); - ModelNode rectNode(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); + ModelNode rectNode(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); - const QLatin1String expected1("\nimport Qt 4.7\n" + const QLatin1String expected1("\nimport QtQuick 1.0\n" "\n" "Item {\n" "Rectangle {\n" @@ -4041,11 +4039,11 @@ void tst_TestCore::testGradientsRewriter() "}\n"); QCOMPARE(textEdit.toPlainText(), expected1); - ModelNode gradientNode(addNodeChild(rectNode, "Qt/Gradient", 4, 7, "gradient")); + ModelNode gradientNode(addNodeChild(rectNode, "QtQuick/Gradient", 1, 0, "gradient")); QVERIFY(rectNode.hasNodeProperty("gradient")); - const QLatin1String expected2("\nimport Qt 4.7\n" + const QLatin1String expected2("\nimport QtQuick 1.0\n" "\n" "Item {\n" "Rectangle {\n" @@ -4062,11 +4060,11 @@ void tst_TestCore::testGradientsRewriter() propertyList.append(qMakePair(QString("position"), QVariant::fromValue(0))); propertyList.append(qMakePair(QString("color"), QVariant::fromValue(QColor(Qt::red)))); - ModelNode gradientStop1(gradientNode.view()->createModelNode("Qt/GradientStop", 4, 7, propertyList)); + ModelNode gradientStop1(gradientNode.view()->createModelNode("QtQuick/GradientStop", 1, 0, propertyList)); QVERIFY(gradientStop1.isValid()); stops.reparentHere(gradientStop1); - const QLatin1String expected3("\nimport Qt 4.7\n" + const QLatin1String expected3("\nimport QtQuick 1.0\n" "\n" "Item {\n" "Rectangle {\n" @@ -4085,11 +4083,11 @@ void tst_TestCore::testGradientsRewriter() propertyList.append(qMakePair(QString("position"), QVariant::fromValue(0.5))); propertyList.append(qMakePair(QString("color"), QVariant::fromValue(QColor(Qt::blue)))); - ModelNode gradientStop2(gradientNode.view()->createModelNode("Qt/GradientStop", 4, 7, propertyList)); + ModelNode gradientStop2(gradientNode.view()->createModelNode("QtQuick/GradientStop", 1, 0, propertyList)); QVERIFY(gradientStop2.isValid()); stops.reparentHere(gradientStop2); - const QLatin1String expected4("\nimport Qt 4.7\n" + const QLatin1String expected4("\nimport QtQuick 1.0\n" "\n" "Item {\n" "Rectangle {\n" @@ -4113,11 +4111,11 @@ void tst_TestCore::testGradientsRewriter() propertyList.append(qMakePair(QString("position"), QVariant::fromValue(0.8))); propertyList.append(qMakePair(QString("color"), QVariant::fromValue(QColor(Qt::yellow)))); - ModelNode gradientStop3(gradientNode.view()->createModelNode("Qt/GradientStop", 4, 7, propertyList)); + ModelNode gradientStop3(gradientNode.view()->createModelNode("QtQuick/GradientStop", 1, 0, propertyList)); QVERIFY(gradientStop3.isValid()); stops.reparentHere(gradientStop3); - const QLatin1String expected5("\nimport Qt 4.7\n" + const QLatin1String expected5("\nimport QtQuick 1.0\n" "\n" "Item {\n" "Rectangle {\n" @@ -4144,7 +4142,7 @@ void tst_TestCore::testGradientsRewriter() gradientNode.removeProperty("stops"); - const QLatin1String expected6("\nimport Qt 4.7\n" + const QLatin1String expected6("\nimport QtQuick 1.0\n" "\n" "Item {\n" "Rectangle {\n" @@ -4161,7 +4159,7 @@ void tst_TestCore::testGradientsRewriter() propertyList.append(qMakePair(QString("position"), QVariant::fromValue(0))); propertyList.append(qMakePair(QString("color"), QVariant::fromValue(QColor(Qt::blue)))); - gradientStop1 = gradientNode.view()->createModelNode("Qt/GradientStop", 4, 7, propertyList); + gradientStop1 = gradientNode.view()->createModelNode("QtQuick/GradientStop", 1, 0, propertyList); QVERIFY(gradientStop1.isValid()); stops.reparentHere(gradientStop1); @@ -4169,7 +4167,7 @@ void tst_TestCore::testGradientsRewriter() void tst_TestCore::testQmlModelStates() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); @@ -4202,7 +4200,7 @@ void tst_TestCore::testQmlModelStates() void tst_TestCore::testInstancesStates() { // -// import Qt 4.7 +// import QtQuick 1.0 // // Rectangle { // Text { @@ -4230,7 +4228,7 @@ void tst_TestCore::testInstancesStates() // } // - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); @@ -4241,28 +4239,28 @@ void tst_TestCore::testInstancesStates() // ModelNode rootNode = view->rootModelNode(); - ModelNode textNode = view->createModelNode("Qt/Text", 4, 7); + ModelNode textNode = view->createModelNode("QtQuick/Text", 1, 0); textNode.setId("targetObject"); textNode.variantProperty("text").setValue("base state"); rootNode.nodeListProperty("data").reparentHere(textNode); - ModelNode propertyChanges1Node = view->createModelNode("Qt/PropertyChanges", 4, 7); + ModelNode propertyChanges1Node = view->createModelNode("QtQuick/PropertyChanges", 1, 0); propertyChanges1Node.bindingProperty("target").setExpression("targetObject"); propertyChanges1Node.variantProperty("x").setValue(10); propertyChanges1Node.variantProperty("text").setValue("state1"); - ModelNode state1Node = view->createModelNode("Qt/State", 4, 7); + ModelNode state1Node = view->createModelNode("QtQuick/State", 1, 0); state1Node.variantProperty("name").setValue("state1"); state1Node.nodeListProperty("changes").reparentHere(propertyChanges1Node); rootNode.nodeListProperty("states").reparentHere(state1Node); - ModelNode propertyChanges2Node = view->createModelNode("Qt/PropertyChanges", 4, 7); + ModelNode propertyChanges2Node = view->createModelNode("QtQuick/PropertyChanges", 1, 0); propertyChanges2Node.bindingProperty("target").setExpression("targetObject"); propertyChanges2Node.variantProperty("text").setValue("state2"); - ModelNode state2Node = view->createModelNode("Qt/State", 4, 7); + ModelNode state2Node = view->createModelNode("QtQuick/State", 1, 0); state2Node.variantProperty("name").setValue("state2"); state2Node.nodeListProperty("changes").reparentHere(propertyChanges2Node); @@ -4359,7 +4357,7 @@ void tst_TestCore::testInstancesStates() // // move property changes of current state out of state - ModelNode state3Node = view->createModelNode("Qt/State", 4, 7); + ModelNode state3Node = view->createModelNode("QtQuick/State", 1, 0); QDeclarativeListReference changes(state1, "changes"); QCOMPARE(changes.count(), 1); state3Node.nodeListProperty("changes").reparentHere(propertyChanges1Node); @@ -4382,7 +4380,7 @@ void tst_TestCore::testInstancesStates() textNode.variantProperty("text").setValue("base state"); // expressions - ModelNode textNode2 = view->createModelNode("Qt/Text", 4, 7); + ModelNode textNode2 = view->createModelNode("QtQuick/Text", 1, 0); textNode2.setId("targetObject2"); textNode2.variantProperty("text").setValue("textNode2"); @@ -4442,7 +4440,7 @@ void tst_TestCore::testInstancesStates() void tst_TestCore::testStates() { // -// import Qt 4.7 +// import QtQuick 1.0 // // Rectangle { // Text { @@ -4461,7 +4459,7 @@ void tst_TestCore::testStates() // } // - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); @@ -4470,7 +4468,7 @@ void tst_TestCore::testStates() // build up model ModelNode rootNode = view->rootModelNode(); - ModelNode textNode = view->createModelNode("Qt/Text", 4, 7); + ModelNode textNode = view->createModelNode("QtQuick/Text", 1, 0); textNode.setId("targetObject"); textNode.variantProperty("text").setValue("base state"); @@ -4486,7 +4484,7 @@ void tst_TestCore::testStates() QVERIFY(textItem.isValid()); QmlModelState state1(rootItem.states().addState("state 1")); //add state "state 1" - QCOMPARE(state1.modelNode().type(), QString("Qt/State")); + QCOMPARE(state1.modelNode().type(), QString("QtQuick/State")); QVERIFY(view->currentState().isBaseState()); @@ -4519,7 +4517,7 @@ void tst_TestCore::testStates() QCOMPARE(changes.modelNode().variantProperty("text").value(), QVariant("state 1")); QCOMPARE(changes.modelNode().bindingProperty("target").expression(), QString("targetObject")); QCOMPARE(changes.target(), textNode); - QCOMPARE(changes.modelNode().type(), QString("Qt/PropertyChanges")); + QCOMPARE(changes.modelNode().type(), QString("QtQuick/PropertyChanges")); QCOMPARE(changes.modelNode().parentProperty().name(), QString("changes")); QCOMPARE(changes.modelNode().parentProperty().parentModelNode(), state1.modelNode()); @@ -4538,7 +4536,7 @@ void tst_TestCore::testStates() void tst_TestCore::testStatesBaseState() { // -// import Qt 4.7 +// import QtQuick 1.0 // // Rectangle { // Text { @@ -4557,7 +4555,7 @@ void tst_TestCore::testStatesBaseState() // } // - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); @@ -4566,7 +4564,7 @@ void tst_TestCore::testStatesBaseState() // build up model ModelNode rootNode = view->rootModelNode(); - ModelNode textNode = view->createModelNode("Qt/Text", 4, 7); + ModelNode textNode = view->createModelNode("QtQuick/Text", 1, 0); textNode.setId("targetObject"); textNode.variantProperty("text").setValue("base state"); @@ -4582,7 +4580,7 @@ void tst_TestCore::testStatesBaseState() QVERIFY(textItem.isValid()); QmlModelState state1(rootItem.states().addState("state 1")); //add state "state 1" - QCOMPARE(state1.modelNode().type(), QString("Qt/State")); + QCOMPARE(state1.modelNode().type(), QString("QtQuick/State")); QVERIFY(view->currentState().isBaseState()); @@ -4592,7 +4590,7 @@ void tst_TestCore::testStatesBaseState() QVERIFY(textItem.propertyAffectedByCurrentState("text")); QCOMPARE(textItem.instanceValue("text"), QVariant("state 1")); - ModelNode newNode = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode newNode = view->createModelNode("QtQuick/Rectangle", 1, 0); QVERIFY(!QmlObjectNode(newNode).currentState().isBaseState()); view->setCurrentState(view->baseState()); //set currentState base state @@ -4614,13 +4612,13 @@ void tst_TestCore::testStatesBaseState() void tst_TestCore::testInstancesIdResolution() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - // import Qt 4.7 + // import QtQuick 1.0 // // Rectangle { // id: root @@ -4638,7 +4636,7 @@ void tst_TestCore::testInstancesIdResolution() rootNode.variantProperty("width").setValue(100); rootNode.variantProperty("height").setValue(100); - ModelNode item1Node = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode item1Node = view->createModelNode("QtQuick/Rectangle", 1, 0); item1Node.setId("item1"); item1Node.bindingProperty("width").setExpression("root.width"); item1Node.bindingProperty("height").setExpression("item2.height"); @@ -4658,7 +4656,7 @@ void tst_TestCore::testInstancesIdResolution() // height: root.height // } - ModelNode item2Node = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode item2Node = view->createModelNode("QtQuick/Rectangle", 1, 0); item2Node.setId("item2"); item2Node.bindingProperty("width").setExpression("root.width / 2"); item2Node.bindingProperty("height").setExpression("root.height"); @@ -4683,7 +4681,7 @@ void tst_TestCore::testInstancesIdResolution() // height: 80 // } - ModelNode item3Node = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode item3Node = view->createModelNode("QtQuick/Rectangle", 1, 0); item3Node.setId("item3"); item3Node.variantProperty("height").setValue(80); rootNode.nodeListProperty("data").reparentHere(item3Node); @@ -4701,16 +4699,16 @@ void tst_TestCore::testInstancesNotInScene() // test whether deleting an instance which is not in the scene crashes // - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - ModelNode node1 = view->createModelNode("Qt/Item", 4, 7); + ModelNode node1 = view->createModelNode("QtQuick/Item", 1, 0); node1.setId("node1"); - ModelNode node2 = view->createModelNode("Qt/Item", 4, 7); + ModelNode node2 = view->createModelNode("QtQuick/Item", 1, 0); node2.setId("node2"); node1.nodeListProperty("children").reparentHere(node2); @@ -4722,21 +4720,21 @@ void tst_TestCore::testInstancesBindingsInStatesStress() { //This is a stress test to provoke a crash for (int j=0;j<20;j++) { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - ModelNode node1 = view->createModelNode("Qt/Item", 4, 7); + ModelNode node1 = view->createModelNode("QtQuick/Item", 1, 0); node1.setId("node1"); view->rootModelNode().nodeListProperty("children").reparentHere(node1); - ModelNode node2 = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode node2 = view->createModelNode("QtQuick/Rectangle", 1, 0); node2.setId("node2"); - ModelNode node3 = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode node3 = view->createModelNode("QtQuick/Rectangle", 1, 0); node3.setId("node3"); node1.nodeListProperty("children").reparentHere(node2); @@ -4827,21 +4825,21 @@ void tst_TestCore::testInstancesPropertyChangeTargets() //this tests checks if a change of the target of a CropertyChange //node is handled correctly - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - ModelNode node1 = view->createModelNode("Qt/Item", 4, 7); + ModelNode node1 = view->createModelNode("QtQuick/Item", 1, 0); node1.setId("node1"); view->rootModelNode().nodeListProperty("children").reparentHere(node1); - ModelNode node2 = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode node2 = view->createModelNode("QtQuick/Rectangle", 1, 0); node2.setId("node2"); - ModelNode node3 = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode node3 = view->createModelNode("QtQuick/Rectangle", 1, 0); node3.setId("node3"); node1.nodeListProperty("children").reparentHere(node2); @@ -4933,21 +4931,21 @@ void tst_TestCore::testInstancesPropertyChangeTargets() void tst_TestCore::testInstancesDeletePropertyChanges() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); model->attachView(view.data()); - ModelNode node1 = view->createModelNode("Qt/Item", 4, 7); + ModelNode node1 = view->createModelNode("QtQuick/Item", 1, 0); node1.setId("node1"); view->rootModelNode().nodeListProperty("children").reparentHere(node1); - ModelNode node2 = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode node2 = view->createModelNode("QtQuick/Rectangle", 1, 0); node2.setId("node2"); - ModelNode node3 = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode node3 = view->createModelNode("QtQuick/Rectangle", 1, 0); node3.setId("node3"); node1.nodeListProperty("children").reparentHere(node2); @@ -5022,7 +5020,7 @@ void tst_TestCore::testInstancesDeletePropertyChanges() void tst_TestCore::testInstancesChildrenLowLevel() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new NodeInstanceView); @@ -5034,11 +5032,11 @@ void tst_TestCore::testInstancesChildrenLowLevel() rootModelNode.setId("rootModelNode"); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Text", 4, 7, "data"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Text", 1, 0, "data"); QVERIFY(childNode1.isValid()); childNode1.setId("childNode1"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/TextEdit", 4, 7, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/TextEdit", 1, 0, "data"); QVERIFY(childNode2.isValid()); childNode2.setId("childNode2"); @@ -5112,7 +5110,7 @@ void tst_TestCore::testInstancesChildrenLowLevel() void tst_TestCore::testInstancesResourcesLowLevel() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new NodeInstanceView); @@ -5124,15 +5122,15 @@ void tst_TestCore::testInstancesResourcesLowLevel() rootModelNode.setId("rootModelNode"); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Text", 4, 7, "data"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Text", 1, 0, "data"); QVERIFY(childNode1.isValid()); childNode1.setId("childNode1"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/TextEdit", 4, 7, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/TextEdit", 1, 0, "data"); QVERIFY(childNode2.isValid()); childNode2.setId("childNode2"); - ModelNode listModel = addNodeListChild(rootModelNode, "Qt/ListModel", 4, 7, "data"); + ModelNode listModel = addNodeListChild(rootModelNode, "QtQuick/ListModel", 1, 0, "data"); QVERIFY(listModel.isValid()); listModel.setId("listModel"); @@ -5188,6 +5186,8 @@ void tst_TestCore::testInstancesResourcesLowLevel() QCOMPARE(listReferenceData.at(1), child1Item); QCOMPARE(listReferenceData.at(2), child2Item); + QSKIP("This crashes", SkipAll); //### todo might be critical in the future + listReferenceChildren.clear(); QCOMPARE(listReferenceData.count(), 1); @@ -5209,7 +5209,7 @@ void tst_TestCore::testInstancesResourcesLowLevel() QCOMPARE(listReferenceData.at(1), child1Item); QCOMPARE(listReferenceData.at(2), child2Item); - ModelNode listModel2 = addNodeListChild(rootModelNode, "Qt/ListModel", 4, 7, "data"); + ModelNode listModel2 = addNodeListChild(rootModelNode, "QtQuick/ListModel", 1, 0, "data"); QVERIFY(listModel2.isValid()); listModel2.setId("listModel2"); @@ -5257,7 +5257,7 @@ void tst_TestCore::testInstancesResourcesLowLevel() void tst_TestCore::testInstancesFlickableLowLevel() { - QScopedPointer model(Model::create("Qt/Flickable", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Flickable", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new NodeInstanceView); @@ -5269,15 +5269,15 @@ void tst_TestCore::testInstancesFlickableLowLevel() rootModelNode.setId("rootModelNode"); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Text", 4, 7, "flickableData"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Text", 1, 0, "flickableData"); QVERIFY(childNode1.isValid()); childNode1.setId("childNode1"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/TextEdit", 4, 7, "flickableData"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/TextEdit", 1, 0, "flickableData"); QVERIFY(childNode2.isValid()); childNode2.setId("childNode2"); - ModelNode listModel = addNodeListChild(rootModelNode, "Qt/ListModel", 4, 7, "flickableData"); + ModelNode listModel = addNodeListChild(rootModelNode, "QtQuick/ListModel", 1, 0, "flickableData"); QVERIFY(listModel.isValid()); listModel.setId("listModel"); @@ -5345,7 +5345,7 @@ void tst_TestCore::testInstancesFlickableLowLevel() void tst_TestCore::testInstancesReorderChildrenLowLevel() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new NodeInstanceView); @@ -5357,23 +5357,23 @@ void tst_TestCore::testInstancesReorderChildrenLowLevel() rootModelNode.setId("rootModelNode"); - ModelNode childNode1 = addNodeListChild(rootModelNode, "Qt/Text", 4, 7, "data"); + ModelNode childNode1 = addNodeListChild(rootModelNode, "QtQuick/Text", 1, 0, "data"); QVERIFY(childNode1.isValid()); childNode1.setId("childNode1"); - ModelNode childNode2 = addNodeListChild(rootModelNode, "Qt/TextEdit", 4, 7, "data"); + ModelNode childNode2 = addNodeListChild(rootModelNode, "QtQuick/TextEdit", 1, 0, "data"); QVERIFY(childNode2.isValid()); childNode2.setId("childNode2"); - ModelNode listModel = addNodeListChild(rootModelNode, "Qt/ListModel", 4, 7, "data"); + ModelNode listModel = addNodeListChild(rootModelNode, "QtQuick/ListModel", 1, 0, "data"); QVERIFY(listModel.isValid()); listModel.setId("listModel"); - ModelNode childNode3 = addNodeListChild(rootModelNode, "Qt/TextEdit", 4, 7, "data"); + ModelNode childNode3 = addNodeListChild(rootModelNode, "QtQuick/TextEdit", 1, 0, "data"); QVERIFY(childNode3.isValid()); childNode3.setId("childNode3"); - ModelNode childNode4 = addNodeListChild(rootModelNode, "Qt/TextEdit", 4, 7, "data"); + ModelNode childNode4 = addNodeListChild(rootModelNode, "QtQuick/TextEdit", 1, 0, "data"); QVERIFY(childNode4.isValid()); childNode4.setId("childNode4"); @@ -5444,7 +5444,7 @@ void tst_TestCore::testInstancesReorderChildrenLowLevel() void tst_TestCore::testQmlModelStatesInvalidForRemovedNodes() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -5461,11 +5461,11 @@ void tst_TestCore::testQmlModelStatesInvalidForRemovedNodes() QVERIFY(state1.isValid()); QCOMPARE(state1.name(), QString("state1")); - ModelNode childNode = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(childNode.isValid()); childNode.setId("childNode"); - ModelNode subChildNode = addNodeListChild(childNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode subChildNode = addNodeListChild(childNode, "QtQuick/Rectangle", 1, 0, "data"); QVERIFY(subChildNode.isValid()); subChildNode.setId("subChildNode"); @@ -5485,7 +5485,7 @@ void tst_TestCore::testInstancesAttachToExistingModel() // Test attaching nodeinstanceview to an existing model // - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -5493,7 +5493,7 @@ void tst_TestCore::testInstancesAttachToExistingModel() model->attachView(view.data()); ModelNode rootNode = view->rootModelNode(); - ModelNode rectangleNode = addNodeListChild(rootNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode rectangleNode = addNodeListChild(rootNode, "QtQuick/Rectangle", 1, 0, "data"); rectangleNode.variantProperty("width").setValue(100); @@ -5518,7 +5518,7 @@ void tst_TestCore::testInstancesAttachToExistingModel() void tst_TestCore::testQmlModelAddMultipleStates() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -5549,7 +5549,7 @@ void tst_TestCore::testQmlModelAddMultipleStates() void tst_TestCore::testQmlModelRemoveStates() { - QScopedPointer model(Model::create("Qt/Rectangle", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Rectangle", 1, 0)); QScopedPointer view(new TestView(model.data())); QVERIFY(view.data()); @@ -5579,10 +5579,10 @@ void tst_TestCore::testQmlModelRemoveStates() void tst_TestCore::testQmlModelStateWithName() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Rectangle { id: theRect; width: 100; states: [ State { name: \"a\"; PropertyChanges { target: theRect; width: 200; } } ] }\n"); + textEdit1.setPlainText("import QtQuick 1.0; Rectangle { id: theRect; width: 100; states: [ State { name: \"a\"; PropertyChanges { target: theRect; width: 200; } } ] }\n"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); TestRewriterView *testRewriterView1 = new TestRewriterView(model1.data()); testRewriterView1->setTextModifier(&modifier1); @@ -5604,7 +5604,7 @@ void tst_TestCore::testQmlModelStateWithName() view->setCurrentState(rootNode.states().allStates().at(0)); rootNode.setVariantProperty("width", 112); - const QLatin1String expected1("import Qt 4.7; Rectangle { id: theRect; width: 100; states: [ State { name: \"a\"; PropertyChanges { target: theRect; width: 112 } } ] }\n"); + const QLatin1String expected1("import QtQuick 1.0; Rectangle { id: theRect; width: 100; states: [ State { name: \"a\"; PropertyChanges { target: theRect; width: 112 } } ] }\n"); QCOMPARE(textEdit1.toPlainText(), expected1); QVERIFY(!rootNode.isInBaseState()); @@ -5624,10 +5624,10 @@ void tst_TestCore::testQmlModelStateWithName() void tst_TestCore::testRewriterAutomaticSemicolonAfterChangedProperty() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Rectangle {\n width: 640\n height: 480\n}\n"); + textEdit1.setPlainText("import QtQuick 1.0; Rectangle {\n width: 640\n height: 480\n}\n"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); TestRewriterView *testRewriterView1 = new TestRewriterView(model1.data()); testRewriterView1->setTextModifier(&modifier1); @@ -5644,7 +5644,7 @@ void tst_TestCore::testRewriterAutomaticSemicolonAfterChangedProperty() void tst_TestCore::defaultPropertyValues() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -5654,12 +5654,12 @@ void tst_TestCore::defaultPropertyValues() QCOMPARE(view->rootModelNode().variantProperty("x").value().toDouble(), 0.0); QCOMPARE(view->rootModelNode().variantProperty("width").value().toDouble(), 0.0); - ModelNode rectNode(addNodeListChild(view->rootModelNode(), "Qt/Rectangle", 4, 7, "data")); + ModelNode rectNode(addNodeListChild(view->rootModelNode(), "QtQuick/Rectangle", 1, 0, "data")); QCOMPARE(rectNode.variantProperty("y").value().toDouble(), 0.0); QCOMPARE(rectNode.variantProperty("width").value().toDouble(), 0.0); - ModelNode imageNode(addNodeListChild(view->rootModelNode(), "Qt/Image", 4, 7, "data")); + ModelNode imageNode(addNodeListChild(view->rootModelNode(), "QtQuick/Image", 1, 0, "data")); QCOMPARE(imageNode.variantProperty("y").value().toDouble(), 0.0); QCOMPARE(imageNode.variantProperty("width").value().toDouble(), 0.0); @@ -5668,10 +5668,10 @@ void tst_TestCore::defaultPropertyValues() void tst_TestCore::testModelPropertyValueTypes() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Rectangle { width: 100; radius: 1.5; color: \"red\"; }"); + textEdit1.setPlainText("import QtQuick 1.0; Rectangle { width: 100; radius: 1.5; color: \"red\"; }"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model1(Model::create("Qt/Item")); + QScopedPointer model1(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -5689,7 +5689,7 @@ void tst_TestCore::testModelPropertyValueTypes() void tst_TestCore::testModelNodeInHierarchy() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -5697,9 +5697,9 @@ void tst_TestCore::testModelNodeInHierarchy() model->attachView(view.data()); QVERIFY(view->rootModelNode().isInHierarchy()); - ModelNode node1 = addNodeListChild(view->rootModelNode(), "Qt/Item", 4, 7, "data"); + ModelNode node1 = addNodeListChild(view->rootModelNode(), "QtQuick/Item", 1, 0, "data"); QVERIFY(node1.isInHierarchy()); - ModelNode node2 = view->createModelNode("Qt/Item", 4, 7); + ModelNode node2 = view->createModelNode("QtQuick/Item", 1, 0); QVERIFY(!node2.isInHierarchy()); node2.nodeListProperty("data").reparentHere(node1); QVERIFY(!node2.isInHierarchy()); @@ -5710,11 +5710,11 @@ void tst_TestCore::testModelNodeInHierarchy() void tst_TestCore::testModelNodeIsAncestorOf() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); // - // import Qt 4.7 + // import QtQuick 1.0 // Item { // Item { // id: item2 @@ -5732,11 +5732,11 @@ void tst_TestCore::testModelNodeIsAncestorOf() model->attachView(view.data()); view->rootModelNode().setId("item1"); - ModelNode item2 = addNodeListChild(view->rootModelNode(), "Qt/Item", 4, 7, "data"); + ModelNode item2 = addNodeListChild(view->rootModelNode(), "QtQuick/Item", 1, 0, "data"); item2.setId("item2"); - ModelNode item3 = addNodeListChild(view->rootModelNode(), "Qt/Item", 4, 7, "data"); + ModelNode item3 = addNodeListChild(view->rootModelNode(), "QtQuick/Item", 1, 0, "data"); item3.setId("item3"); - ModelNode item4 = addNodeListChild(item3, "Qt/Item", 4, 7, "data"); + ModelNode item4 = addNodeListChild(item3, "QtQuick/Item", 1, 0, "data"); item4.setId("item4"); QVERIFY(view->rootModelNode().isAncestorOf(item2)); @@ -5749,7 +5749,7 @@ void tst_TestCore::testModelNodeIsAncestorOf() void tst_TestCore::testModelDefaultProperties() { - QScopedPointer model(Model::create("Qt/Rectangle")); + QScopedPointer model(Model::create("QtQuick/Rectangle")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -5765,10 +5765,10 @@ void tst_TestCore::testModelDefaultProperties() void tst_TestCore::loadAnchors() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Item { width: 100; height: 100; Rectangle { anchors.left: parent.left; anchors.horizontalCenter: parent.horizontalCenter; anchors.rightMargin: 20; }}"); + textEdit1.setPlainText("import QtQuick 1.0; Item { width: 100; height: 100; Rectangle { anchors.left: parent.left; anchors.horizontalCenter: parent.horizontalCenter; anchors.rightMargin: 20; }}"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -5804,10 +5804,10 @@ void tst_TestCore::loadAnchors() void tst_TestCore::changeAnchors() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Item { width: 100; height: 100; Rectangle { anchors.left: parent.left; anchors.horizontalCenter: parent.horizontalCenter; anchors.rightMargin: 20; }}"); + textEdit1.setPlainText("import QtQuick 1.0; Item { width: 100; height: 100; Rectangle { anchors.left: parent.left; anchors.horizontalCenter: parent.horizontalCenter; anchors.rightMargin: 20; }}"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -5865,10 +5865,10 @@ void tst_TestCore::changeAnchors() void tst_TestCore::anchorToSibling() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Item { Rectangle {} Rectangle { id: secondChild } }"); + textEdit1.setPlainText("import QtQuick 1.0; Item { Rectangle {} Rectangle { id: secondChild } }"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -5909,10 +5909,10 @@ void tst_TestCore::anchorToSibling() void tst_TestCore::removeFillAnchorByDetaching() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Item { width: 100; height: 100; Rectangle { id: child; anchors.fill: parent } }"); + textEdit1.setPlainText("import QtQuick 1.0; Item { width: 100; height: 100; Rectangle { id: child; anchors.fill: parent } }"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -5989,10 +5989,10 @@ void tst_TestCore::removeFillAnchorByDetaching() void tst_TestCore::removeFillAnchorByChanging() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Item { width: 100; height: 100; Rectangle { id: child; anchors.fill: parent } }"); + textEdit1.setPlainText("import QtQuick 1.0; Item { width: 100; height: 100; Rectangle { id: child; anchors.fill: parent } }"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -6069,7 +6069,7 @@ void tst_TestCore::removeFillAnchorByChanging() void tst_TestCore::testModelBindings() { - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); NodeInstanceView *nodeInstanceView = new NodeInstanceView(model.data()); @@ -6089,7 +6089,7 @@ void tst_TestCore::testModelBindings() QCOMPARE(rootInstance.size().width(), 200.0); QCOMPARE(rootInstance.size().height(), 100.0); - ModelNode childNode = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode childNode = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); childNode.variantProperty("width") = 100; childNode.variantProperty("height") = 100; @@ -6127,7 +6127,7 @@ void tst_TestCore::testModelBindings() void tst_TestCore::testModelDynamicProperties() { - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); TestView *testView = new TestView(model.data()); @@ -6171,7 +6171,7 @@ void tst_TestCore::testModelDynamicProperties() void tst_TestCore::testModelSliding() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6180,10 +6180,10 @@ void tst_TestCore::testModelSliding() ModelNode rootModelNode(view->rootModelNode()); - ModelNode rect00(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); - ModelNode rect01(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); - ModelNode rect02(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); - ModelNode rect03(addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data")); + ModelNode rect00(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); + ModelNode rect01(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); + ModelNode rect02(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); + ModelNode rect03(addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data")); QVERIFY(rect00.isValid()); QVERIFY(rect01.isValid()); @@ -6239,13 +6239,13 @@ void tst_TestCore::testModelSliding() void tst_TestCore::testRewriterChangeId() { - const char* qmlString = "import Qt 4.7\nRectangle { }"; + const char* qmlString = "import QtQuick 1.0\nRectangle { }"; QPlainTextEdit textEdit; textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6264,25 +6264,25 @@ void tst_TestCore::testRewriterChangeId() QCOMPARE(rootModelNode.id(), QString("rectId")); - QString expected = "import Qt 4.7\n" + QString expected = "import QtQuick 1.0\n" "Rectangle { id: rectId }"; QCOMPARE(textEdit.toPlainText(), expected); // change id for node outside of hierarchy - ModelNode node = view->createModelNode("Qt/Item", 4, 7); + ModelNode node = view->createModelNode("QtQuick/Item", 1, 0); node.setId("myId"); } void tst_TestCore::testRewriterRemoveId() { - const char* qmlString = "import Qt 4.7\nRectangle { id: rect }"; + const char* qmlString = "import QtQuick 1.0\nRectangle { id: rect }"; QPlainTextEdit textEdit; textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6300,7 +6300,7 @@ void tst_TestCore::testRewriterRemoveId() // // remove id in text // - const char* qmlString2 = "import Qt 4.7\nRectangle { }"; + const char* qmlString2 = "import QtQuick 1.0\nRectangle { }"; textEdit.setPlainText(qmlString2); QCOMPARE(rootModelNode.id(), QString()); @@ -6308,13 +6308,13 @@ void tst_TestCore::testRewriterRemoveId() void tst_TestCore::testRewriterChangeValueProperty() { - const char* qmlString = "import Qt 4.7\nRectangle { x: 10; y: 10 }"; + const char* qmlString = "import QtQuick 1.0\nRectangle { x: 10; y: 10 }"; QPlainTextEdit textEdit; textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6337,14 +6337,14 @@ void tst_TestCore::testRewriterChangeValueProperty() // change property for node outside of hierarchy PropertyListType properties; properties.append(QPair("x", 10)); - ModelNode node = view->createModelNode("Qt/Item", 4, 7, properties); + ModelNode node = view->createModelNode("QtQuick/Item", 1, 0, properties); node.variantProperty("x").setValue(20); } void tst_TestCore::testRewriterRemoveValueProperty() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "Rectangle {\n" " x: 10\n" " y: 10;\n" @@ -6354,7 +6354,7 @@ void tst_TestCore::testRewriterRemoveValueProperty() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6375,7 +6375,7 @@ void tst_TestCore::testRewriterRemoveValueProperty() rootModelNode.removeProperty("x"); const QLatin1String expected("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "Rectangle {\n" " y: 10;\n" "}\n"); @@ -6384,19 +6384,19 @@ void tst_TestCore::testRewriterRemoveValueProperty() // remove property for node outside of hierarchy PropertyListType properties; properties.append(QPair("x", 10)); - ModelNode node = view->createModelNode("Qt/Item", 4, 7, properties); + ModelNode node = view->createModelNode("QtQuick/Item", 1, 0, properties); node.removeProperty("x"); } void tst_TestCore::testRewriterSignalProperty() { - const char* qmlString = "import Qt 4.7\nRectangle { onColorChanged: {} }"; + const char* qmlString = "import QtQuick 1.0\nRectangle { onColorChanged: {} }"; QPlainTextEdit textEdit; textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6416,13 +6416,13 @@ void tst_TestCore::testRewriterSignalProperty() void tst_TestCore::testRewriterObjectTypeProperty() { - const char* qmlString = "import Qt 4.7\nRectangle { x: 10; y: 10 }"; + const char* qmlString = "import QtQuick 1.0\nRectangle { x: 10; y: 10 }"; QPlainTextEdit textEdit; textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6436,11 +6436,11 @@ void tst_TestCore::testRewriterObjectTypeProperty() ModelNode rootModelNode(view->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QLatin1String("QtQuick/Rectangle")); - view->changeRootNodeType(QLatin1String("Qt/Text"), 4, 7); + view->changeRootNodeType(QLatin1String("QtQuick/Text"), 1, 0); - QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Text")); + QCOMPARE(rootModelNode.type(), QLatin1String("QtQuick/Text")); } void tst_TestCore::testRewriterPropertyChanges() @@ -6450,7 +6450,7 @@ void tst_TestCore::testRewriterPropertyChanges() // Use a slightly more complicated example so that target properties are not resolved in default scope const char* qmlString - = "import Qt 4.7\n" + = "import QtQuick 1.0\n" "Rectangle {\n" " Text {\n" " id: targetObj\n" @@ -6470,7 +6470,7 @@ void tst_TestCore::testRewriterPropertyChanges() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6483,7 +6483,7 @@ void tst_TestCore::testRewriterPropertyChanges() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); QVERIFY(rootNode.propertyNames().contains(QLatin1String("data"))); QVERIFY(rootNode.propertyNames().contains(QLatin1String("states"))); QCOMPARE(rootNode.propertyNames().count(), 2); @@ -6494,7 +6494,7 @@ void tst_TestCore::testRewriterPropertyChanges() ModelNode stateNode = statesProperty.toModelNodeList().first(); QVERIFY(stateNode.isValid()); - QCOMPARE(stateNode.type(), QString("Qt/State")); + QCOMPARE(stateNode.type(), QString("QtQuick/State")); QCOMPARE(stateNode.propertyNames(), QStringList("changes")); NodeListProperty stateChangesProperty = stateNode.property("changes").toNodeListProperty(); @@ -6521,13 +6521,13 @@ void tst_TestCore::testRewriterListModel() try { // ListModel uses a custom parser - const char* qmlString = "import Qt 4.7; ListModel {\n ListElement {\n age: 12\n} \n}"; + const char* qmlString = "import QtQuick 1.0; ListModel {\n ListElement {\n age: 12\n} \n}"; QPlainTextEdit textEdit; textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -6556,7 +6556,7 @@ void tst_TestCore::testRewriterListModel() void tst_TestCore::testRewriterAddProperty() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -6564,7 +6564,7 @@ void tst_TestCore::testRewriterAddProperty() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6577,7 +6577,7 @@ void tst_TestCore::testRewriterAddProperty() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); rootNode.variantProperty(QLatin1String("x")).setValue(123); @@ -6586,7 +6586,7 @@ void tst_TestCore::testRewriterAddProperty() QCOMPARE(rootNode.variantProperty(QLatin1String("x")).value(), QVariant(123)); const QLatin1String expected("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "x: 123\n" @@ -6597,7 +6597,7 @@ void tst_TestCore::testRewriterAddProperty() void tst_TestCore::testRewriterAddPropertyInNestedObject() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Rectangle {\n" @@ -6608,7 +6608,7 @@ void tst_TestCore::testRewriterAddPropertyInNestedObject() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6621,18 +6621,18 @@ void tst_TestCore::testRewriterAddPropertyInNestedObject() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); ModelNode childNode = rootNode.nodeListProperty(QLatin1String("data")).toModelNodeList().at(0); QVERIFY(childNode.isValid()); - QCOMPARE(childNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(childNode.type(), QLatin1String("QtQuick/Rectangle")); QCOMPARE(childNode.id(), QLatin1String("rectangle1")); childNode.variantProperty(QLatin1String("x")).setValue(10); childNode.variantProperty(QLatin1String("y")).setValue(10); const QLatin1String expected("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Rectangle {\n" @@ -6646,7 +6646,7 @@ void tst_TestCore::testRewriterAddPropertyInNestedObject() void tst_TestCore::testRewriterAddObjectDefinition() { - const QLatin1String qmlString("import Qt 4.7\n" + const QLatin1String qmlString("import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -6654,7 +6654,7 @@ void tst_TestCore::testRewriterAddObjectDefinition() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6667,20 +6667,20 @@ void tst_TestCore::testRewriterAddObjectDefinition() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); - ModelNode childNode = view->createModelNode("Qt/MouseArea", 4, 7); + ModelNode childNode = view->createModelNode("QtQuick/MouseArea", 1, 0); rootNode.nodeAbstractProperty(QLatin1String("data")).reparentHere(childNode); QCOMPARE(rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().size(), 1); childNode = rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().at(0); - QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseArea"))); + QCOMPARE(childNode.type(), QString(QLatin1String("QtQuick/MouseArea"))); } void tst_TestCore::testRewriterAddStatesArray() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -6688,7 +6688,7 @@ void tst_TestCore::testRewriterAddStatesArray() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6700,13 +6700,13 @@ void tst_TestCore::testRewriterAddStatesArray() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); - ModelNode stateNode = view->createModelNode("Qt/State", 4, 7); + ModelNode stateNode = view->createModelNode("QtQuick/State", 1, 0); rootNode.nodeListProperty(QLatin1String("states")).reparentHere(stateNode); const QString expected1 = QLatin1String("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "states: [\n" @@ -6716,11 +6716,11 @@ void tst_TestCore::testRewriterAddStatesArray() "}"); QCOMPARE(textEdit.toPlainText(), expected1); - ModelNode stateNode2 = view->createModelNode("Qt/State", 4, 7); + ModelNode stateNode2 = view->createModelNode("QtQuick/State", 1, 0); rootNode.nodeListProperty(QLatin1String("states")).reparentHere(stateNode2); const QString expected2 = QLatin1String("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "states: [\n" @@ -6736,7 +6736,7 @@ void tst_TestCore::testRewriterAddStatesArray() void tst_TestCore::testRewriterRemoveStates() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " states: [\n" @@ -6750,7 +6750,7 @@ void tst_TestCore::testRewriterRemoveStates() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6762,7 +6762,7 @@ void tst_TestCore::testRewriterRemoveStates() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); NodeListProperty statesProperty = rootNode.nodeListProperty(QLatin1String("states")); QVERIFY(statesProperty.isValid()); @@ -6772,7 +6772,7 @@ void tst_TestCore::testRewriterRemoveStates() state.destroy(); const QLatin1String expected1("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " states: [\n" @@ -6786,7 +6786,7 @@ void tst_TestCore::testRewriterRemoveStates() state.destroy(); const QLatin1String expected2("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -6796,7 +6796,7 @@ void tst_TestCore::testRewriterRemoveStates() void tst_TestCore::testRewriterRemoveObjectDefinition() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " MouseArea {\n" @@ -6808,7 +6808,7 @@ void tst_TestCore::testRewriterRemoveObjectDefinition() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6821,24 +6821,24 @@ void tst_TestCore::testRewriterRemoveObjectDefinition() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); QCOMPARE(rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().size(), 2); ModelNode childNode = rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().at(1); - QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseArea"))); + QCOMPARE(childNode.type(), QString(QLatin1String("QtQuick/MouseArea"))); childNode.destroy(); QCOMPARE(rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().size(), 1); childNode = rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().at(0); - QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseArea"))); + QCOMPARE(childNode.type(), QString(QLatin1String("QtQuick/MouseArea"))); childNode.destroy(); QVERIFY(!rootNode.hasProperty(QLatin1String("data"))); const QString expected = QLatin1String("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " // some comment here\n" @@ -6846,9 +6846,9 @@ void tst_TestCore::testRewriterRemoveObjectDefinition() QCOMPARE(textEdit.toPlainText(), expected); // don't crash when deleting nodes not in any hierarchy - ModelNode node1 = view->createModelNode("Qt/Rectangle", 4, 7); - ModelNode node2 = addNodeListChild(node1, "Qt/Item", 4, 7, "data"); - ModelNode node3 = addNodeListChild(node2, "Qt/Item", 4, 7, "data"); + ModelNode node1 = view->createModelNode("QtQuick/Rectangle", 1, 0); + ModelNode node2 = addNodeListChild(node1, "QtQuick/Item", 1, 0, "data"); + ModelNode node3 = addNodeListChild(node2, "QtQuick/Item", 1, 0, "data"); node3.destroy(); node1.destroy(); @@ -6857,7 +6857,7 @@ void tst_TestCore::testRewriterRemoveObjectDefinition() void tst_TestCore::testRewriterRemoveScriptBinding() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " x: 10; // some comment\n" @@ -6867,7 +6867,7 @@ void tst_TestCore::testRewriterRemoveScriptBinding() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6880,7 +6880,7 @@ void tst_TestCore::testRewriterRemoveScriptBinding() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); QCOMPARE(rootNode.properties().size(), 2); QVERIFY(rootNode.hasProperty(QLatin1String("x"))); @@ -6897,7 +6897,7 @@ void tst_TestCore::testRewriterRemoveScriptBinding() QCOMPARE(rootNode.properties().size(), 0); const QString expected = QLatin1String("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " // some comment\n" @@ -6908,7 +6908,7 @@ void tst_TestCore::testRewriterRemoveScriptBinding() void tst_TestCore::testRewriterNodeReparenting() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -6920,7 +6920,7 @@ void tst_TestCore::testRewriterNodeReparenting() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -6933,15 +6933,15 @@ void tst_TestCore::testRewriterNodeReparenting() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); ModelNode itemNode = rootNode.nodeListProperty("data").toModelNodeList().at(0); QVERIFY(itemNode.isValid()); - QCOMPARE(itemNode.type(), QLatin1String("Qt/Item")); + QCOMPARE(itemNode.type(), QLatin1String("QtQuick/Item")); ModelNode mouseArea = itemNode.nodeListProperty("data").toModelNodeList().at(0); QVERIFY(mouseArea.isValid()); - QCOMPARE(mouseArea.type(), QLatin1String("Qt/MouseArea")); + QCOMPARE(mouseArea.type(), QLatin1String("QtQuick/MouseArea")); rootNode.nodeListProperty("data").reparentHere(mouseArea); @@ -6949,7 +6949,7 @@ void tst_TestCore::testRewriterNodeReparenting() QCOMPARE(rootNode.nodeListProperty("data").toModelNodeList().size(), 2); QString expected = "\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -6961,9 +6961,9 @@ void tst_TestCore::testRewriterNodeReparenting() QCOMPARE(textEdit.toPlainText(), expected); // reparenting outside of the hierarchy - ModelNode node1 = view->createModelNode("Qt/Rectangle", 4, 7); - ModelNode node2 = view->createModelNode("Qt/Item", 4, 7); - ModelNode node3 = view->createModelNode("Qt/Item", 4, 7); + ModelNode node1 = view->createModelNode("QtQuick/Rectangle", 1, 0); + ModelNode node2 = view->createModelNode("QtQuick/Item", 1, 0); + ModelNode node3 = view->createModelNode("QtQuick/Item", 1, 0); node2.nodeListProperty("data").reparentHere(node3); node1.nodeListProperty("data").reparentHere(node2); @@ -6971,7 +6971,7 @@ void tst_TestCore::testRewriterNodeReparenting() rootNode.nodeListProperty("data").reparentHere(node1); expected = "\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -6991,11 +6991,11 @@ void tst_TestCore::testRewriterNodeReparenting() QCOMPARE(textEdit.toPlainText(), expected); // reparent out of the hierarchy - ModelNode node4 = view->createModelNode("Qt/Rectangle", 4, 7); + ModelNode node4 = view->createModelNode("QtQuick/Rectangle", 1, 0); node4.nodeListProperty("data").reparentHere(node1); expected = "\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -7011,7 +7011,7 @@ void tst_TestCore::testRewriterNodeReparenting() void tst_TestCore::testRewriterNodeReparentingWithTransaction() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: rootItem\n" @@ -7028,7 +7028,7 @@ void tst_TestCore::testRewriterNodeReparentingWithTransaction() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -7041,17 +7041,17 @@ void tst_TestCore::testRewriterNodeReparentingWithTransaction() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QLatin1String("QtQuick/Rectangle")); QCOMPARE(rootNode.id(), QLatin1String("rootItem")); ModelNode item1Node = rootNode.nodeListProperty("data").toModelNodeList().at(0); QVERIFY(item1Node.isValid()); - QCOMPARE(item1Node.type(), QLatin1String("Qt/Item")); + QCOMPARE(item1Node.type(), QLatin1String("QtQuick/Item")); QCOMPARE(item1Node.id(), QLatin1String("firstItem")); ModelNode item2Node = rootNode.nodeListProperty("data").toModelNodeList().at(1); QVERIFY(item2Node.isValid()); - QCOMPARE(item2Node.type(), QLatin1String("Qt/Item")); + QCOMPARE(item2Node.type(), QLatin1String("QtQuick/Item")); QCOMPARE(item2Node.id(), QLatin1String("secondItem")); RewriterTransaction transaction = testRewriterView->beginRewriterTransaction(); @@ -7062,7 +7062,7 @@ void tst_TestCore::testRewriterNodeReparentingWithTransaction() transaction.commit(); const QLatin1String expected("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " id: rootItem\n" @@ -7081,7 +7081,7 @@ void tst_TestCore::testRewriterNodeReparentingWithTransaction() void tst_TestCore::testRewriterMovingInOut() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -7089,7 +7089,7 @@ void tst_TestCore::testRewriterMovingInOut() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -7102,13 +7102,13 @@ void tst_TestCore::testRewriterMovingInOut() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); - ModelNode newNode = view->createModelNode("Qt/MouseArea", 4, 7); + ModelNode newNode = view->createModelNode("QtQuick/MouseArea", 1, 0); rootNode.nodeListProperty(QLatin1String("data")).reparentHere(newNode); const QLatin1String expected1("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "MouseArea {\n" @@ -7127,7 +7127,7 @@ void tst_TestCore::testRewriterMovingInOut() newNode.destroy(); const QLatin1String expected2("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -7137,7 +7137,7 @@ void tst_TestCore::testRewriterMovingInOut() void tst_TestCore::testRewriterMovingInOutWithTransaction() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -7145,7 +7145,7 @@ void tst_TestCore::testRewriterMovingInOutWithTransaction() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -7158,11 +7158,11 @@ void tst_TestCore::testRewriterMovingInOutWithTransaction() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); RewriterTransaction transaction = view->beginRewriterTransaction(); - ModelNode newNode = view->createModelNode("Qt/MouseArea", 4, 7); + ModelNode newNode = view->createModelNode("QtQuick/MouseArea", 1, 0); rootNode.nodeListProperty(QLatin1String("data")).reparentHere(newNode); #define move(node, x, y) {\ @@ -7178,7 +7178,7 @@ void tst_TestCore::testRewriterMovingInOutWithTransaction() transaction.commit(); const QLatin1String expected2("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" "}"); @@ -7188,7 +7188,7 @@ void tst_TestCore::testRewriterMovingInOutWithTransaction() void tst_TestCore::testRewriterComplexMovingInOut() { const QLatin1String qmlString("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -7198,7 +7198,7 @@ void tst_TestCore::testRewriterComplexMovingInOut() textEdit.setPlainText(qmlString); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -7211,14 +7211,14 @@ void tst_TestCore::testRewriterComplexMovingInOut() ModelNode rootNode = view->rootModelNode(); QVERIFY(rootNode.isValid()); - QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); + QCOMPARE(rootNode.type(), QString("QtQuick/Rectangle")); ModelNode itemNode = rootNode.nodeListProperty(QLatin1String("data")).toModelNodeList().at(0); - ModelNode newNode = view->createModelNode("Qt/MouseArea", 4, 7); + ModelNode newNode = view->createModelNode("QtQuick/MouseArea", 1, 0); rootNode.nodeListProperty(QLatin1String("data")).reparentHere(newNode); const QLatin1String expected1("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -7238,7 +7238,7 @@ void tst_TestCore::testRewriterComplexMovingInOut() move(newNode, 3, 3); const QLatin1String expected2("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -7254,7 +7254,7 @@ void tst_TestCore::testRewriterComplexMovingInOut() itemNode.nodeListProperty(QLatin1String("data")).reparentHere(newNode); const QLatin1String expected3("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -7274,7 +7274,7 @@ void tst_TestCore::testRewriterComplexMovingInOut() newNode.destroy(); const QLatin1String expected4("\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "\n" "Rectangle {\n" " Item {\n" @@ -7286,10 +7286,10 @@ void tst_TestCore::testRewriterComplexMovingInOut() void tst_TestCore::removeCenteredInAnchorByDetaching() { QPlainTextEdit textEdit1; - textEdit1.setPlainText("import Qt 4.7; Item { Rectangle { id: child; anchors.centerIn: parent } }"); + textEdit1.setPlainText("import QtQuick 1.0; Item { Rectangle { id: child; anchors.centerIn: parent } }"); NotIndentingTextEditModifier modifier1(&textEdit1); - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QScopedPointer testRewriterView1(new TestRewriterView()); testRewriterView1->setTextModifier(&modifier1); @@ -7340,7 +7340,7 @@ void tst_TestCore::removeCenteredInAnchorByDetaching() void tst_TestCore::changePropertyBinding() { - QScopedPointer model(Model::create("Qt/Item")); + QScopedPointer model(Model::create("QtQuick/Item")); QVERIFY(model.data()); QScopedPointer view(new TestView(model.data())); @@ -7349,7 +7349,7 @@ void tst_TestCore::changePropertyBinding() ModelNode rootModelNode(view->rootModelNode()); rootModelNode.variantProperty("width") = 20; - ModelNode firstChild = addNodeListChild(rootModelNode, "Qt/Rectangle", 4, 7, "data"); + ModelNode firstChild = addNodeListChild(rootModelNode, "QtQuick/Rectangle", 1, 0, "data"); firstChild.bindingProperty("width").setExpression(QString("parent.width")); firstChild.variantProperty("height")= 10; QVERIFY(firstChild.isValid()); @@ -7389,7 +7389,7 @@ void tst_TestCore::loadTestFiles() textEdit.setPlainText(QString(file.readAll())); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -7400,7 +7400,7 @@ void tst_TestCore::loadTestFiles() QVERIFY(model.data()); ModelNode rootModelNode(testRewriterView->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Item")); + QCOMPARE(rootModelNode.type(), QLatin1String("QtQuick/Item")); QVERIFY(rootModelNode.allDirectSubModelNodes().isEmpty()); } @@ -7412,7 +7412,7 @@ void tst_TestCore::loadTestFiles() textEdit.setPlainText(QString(file.readAll())); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -7423,14 +7423,14 @@ void tst_TestCore::loadTestFiles() QVERIFY(model.data()); ModelNode rootModelNode(testRewriterView->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QLatin1String("QtQuick/Rectangle")); QCOMPARE(rootModelNode.allDirectSubModelNodes().count(), 1); QCOMPARE(rootModelNode.variantProperty("width").value().toInt(), 200); QCOMPARE(rootModelNode.variantProperty("height").value().toInt(), 200); ModelNode textNode(rootModelNode.allDirectSubModelNodes().first()); QVERIFY(textNode.isValid()); - QCOMPARE(textNode.type(), QLatin1String("Qt/Text")); + QCOMPARE(textNode.type(), QLatin1String("QtQuick/Text")); QCOMPARE(textNode.variantProperty("x").value().toInt(), 66); QCOMPARE(textNode.variantProperty("y").value().toInt(), 93); } @@ -7442,7 +7442,7 @@ void tst_TestCore::loadTestFiles() textEdit.setPlainText(QString(file.readAll())); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -7453,7 +7453,7 @@ void tst_TestCore::loadTestFiles() QVERIFY(model.data()); ModelNode rootModelNode(testRewriterView->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QLatin1String("QtQuick/Rectangle")); QCOMPARE(rootModelNode.allDirectSubModelNodes().count(), 4); QCOMPARE(rootModelNode.variantProperty("width").value().toInt(), 200); QCOMPARE(rootModelNode.variantProperty("height").value().toInt(), 200); @@ -7464,14 +7464,14 @@ void tst_TestCore::loadTestFiles() ModelNode textNode(rootModelNode.nodeListProperty("data").toModelNodeList().first()); QVERIFY(textNode.isValid()); QCOMPARE(textNode.id(), QLatin1String("text")); - QCOMPARE(textNode.type(), QLatin1String("Qt/Text")); + QCOMPARE(textNode.type(), QLatin1String("QtQuick/Text")); QCOMPARE(textNode.variantProperty("x").value().toInt(), 66); QCOMPARE(textNode.variantProperty("y").value().toInt(), 93); ModelNode imageNode(rootModelNode.nodeListProperty("data").toModelNodeList().last()); QVERIFY(imageNode.isValid()); QCOMPARE(imageNode.id(), QLatin1String("image1")); - QCOMPARE(imageNode.type(), QLatin1String("Qt/Image")); + QCOMPARE(imageNode.type(), QLatin1String("QtQuick/Image")); QCOMPARE(imageNode.variantProperty("x").value().toInt(), 41); QCOMPARE(imageNode.variantProperty("y").value().toInt(), 46); QCOMPARE(imageNode.variantProperty("source").value().toUrl(), QUrl("images/qtcreator.png")); @@ -7491,7 +7491,7 @@ void tst_TestCore::loadTestFiles() textEdit.setPlainText(QString(file.readAll())); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -7503,12 +7503,12 @@ void tst_TestCore::loadTestFiles() QVERIFY(model.data()); ModelNode rootModelNode(testRewriterView->rootModelNode()); QVERIFY(rootModelNode.isValid()); - QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Rectangle")); + QCOMPARE(rootModelNode.type(), QLatin1String("QtQuick/Rectangle")); QVERIFY(!rootModelNode.allDirectSubModelNodes().isEmpty()); } } -static QString rectWithGradient = "import Qt 4.7\n" +static QString rectWithGradient = "import QtQuick 1.0\n" "Rectangle {\n" " gradient: Gradient {\n" " id: pGradient\n" @@ -7528,7 +7528,7 @@ void tst_TestCore::loadGradient() textEdit.setPlainText(rectWithGradient); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -7547,7 +7547,7 @@ void tst_TestCore::loadGradient() QVERIFY(gradientProperty.isNodeProperty()); ModelNode gradientPropertyModelNode = gradientProperty.toNodeProperty().modelNode(); QVERIFY(gradientPropertyModelNode.isValid()); - QCOMPARE(gradientPropertyModelNode.type(), QString("Qt/Gradient")); + QCOMPARE(gradientPropertyModelNode.type(), QString("QtQuick/Gradient")); QCOMPARE(gradientPropertyModelNode.allDirectSubModelNodes().size(), 2); AbstractProperty stopsProperty = gradientPropertyModelNode.property("stops"); @@ -7560,7 +7560,7 @@ void tst_TestCore::loadGradient() ModelNode pOne = stops.first(); ModelNode pTwo = stops.last(); - QCOMPARE(pOne.type(), QString("Qt/GradientStop")); + QCOMPARE(pOne.type(), QString("QtQuick/GradientStop")); QCOMPARE(pOne.id(), QString("pOne")); QCOMPARE(pOne.allDirectSubModelNodes().size(), 0); QCOMPARE(pOne.propertyNames().size(), 2); @@ -7569,7 +7569,7 @@ void tst_TestCore::loadGradient() QCOMPARE(pOne.variantProperty("color").value().type(), QVariant::Color); QCOMPARE(pOne.variantProperty("color").value().value(), QColor("lightsteelblue")); - QCOMPARE(pTwo.type(), QString("Qt/GradientStop")); + QCOMPARE(pTwo.type(), QString("QtQuick/GradientStop")); QCOMPARE(pTwo.id(), QString("pTwo")); QCOMPARE(pTwo.allDirectSubModelNodes().size(), 0); QCOMPARE(pTwo.propertyNames().size(), 2); @@ -7582,8 +7582,8 @@ void tst_TestCore::loadGradient() { ModelNode gradientNode = rootModelNode.allDirectSubModelNodes().last(); QVERIFY(gradientNode.isValid()); - QVERIFY(!gradientNode.metaInfo().isSubclassOf("Qt/Item", -1, -1)); - QCOMPARE(gradientNode.type(), QString("Qt/Gradient")); + QVERIFY(!gradientNode.metaInfo().isSubclassOf("QtQuick/Item", -1, -1)); + QCOMPARE(gradientNode.type(), QString("QtQuick/Gradient")); QCOMPARE(gradientNode.id(), QString("secondGradient")); QCOMPARE(gradientNode.allDirectSubModelNodes().size(), 2); @@ -7597,7 +7597,7 @@ void tst_TestCore::loadGradient() ModelNode nOne = stops.first(); ModelNode nTwo = stops.last(); - QCOMPARE(nOne.type(), QString("Qt/GradientStop")); + QCOMPARE(nOne.type(), QString("QtQuick/GradientStop")); QCOMPARE(nOne.id(), QString("nOne")); QCOMPARE(nOne.allDirectSubModelNodes().size(), 0); QCOMPARE(nOne.propertyNames().size(), 2); @@ -7606,7 +7606,7 @@ void tst_TestCore::loadGradient() QCOMPARE(nOne.variantProperty("color").value().type(), QVariant::Color); QCOMPARE(nOne.variantProperty("color").value().value(), QColor("blue")); - QCOMPARE(nTwo.type(), QString("Qt/GradientStop")); + QCOMPARE(nTwo.type(), QString("QtQuick/GradientStop")); QCOMPARE(nTwo.id(), QString("nTwo")); QCOMPARE(nTwo.allDirectSubModelNodes().size(), 0); QCOMPARE(nTwo.propertyNames().size(), 2); @@ -7624,7 +7624,7 @@ void tst_TestCore::changeGradientId() textEdit.setPlainText(rectWithGradient); NotIndentingTextEditModifier textModifier(&textEdit); - QScopedPointer model(Model::create("Qt/Item", 4, 7)); + QScopedPointer model(Model::create("QtQuick/Item", 1, 0)); QVERIFY(model.data()); QScopedPointer testRewriterView(new TestRewriterView()); @@ -7657,7 +7657,7 @@ void tst_TestCore::changeGradientId() firstStop.destroy(); QVERIFY(!firstStop.isValid()); - ModelNode gradientStop = addNodeListChild(gradientNode, "Qt/GradientStop", 4, 7, "stops"); + ModelNode gradientStop = addNodeListChild(gradientNode, "QtQuick/GradientStop", 1, 0, "stops"); gradientStop.variantProperty("position") = 0.5; gradientStop.variantProperty("color") = QColor("yellow"); diff --git a/tests/auto/qml/qmldesigner/data/fx/attributes.qml b/tests/auto/qml/qmldesigner/data/fx/attributes.qml index e2d4ed37c41..d58d77908b5 100644 --- a/tests/auto/qml/qmldesigner/data/fx/attributes.qml +++ b/tests/auto/qml/qmldesigner/data/fx/attributes.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: id; diff --git a/tests/auto/qml/qmldesigner/data/fx/empty.qml b/tests/auto/qml/qmldesigner/data/fx/empty.qml index dd9e9ea1930..f6760b6a9fa 100644 --- a/tests/auto/qml/qmldesigner/data/fx/empty.qml +++ b/tests/auto/qml/qmldesigner/data/fx/empty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { } diff --git a/tests/auto/qml/qmldesigner/data/fx/helloworld.qml b/tests/auto/qml/qmldesigner/data/fx/helloworld.qml index bc17ab1b27d..d225c436306 100644 --- a/tests/auto/qml/qmldesigner/data/fx/helloworld.qml +++ b/tests/auto/qml/qmldesigner/data/fx/helloworld.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/tests/auto/qml/qmldesigner/data/fx/properties.qml b/tests/auto/qml/qmldesigner/data/fx/properties.qml index 12b79f63f80..e9078ff8e76 100644 --- a/tests/auto/qml/qmldesigner/data/fx/properties.qml +++ b/tests/auto/qml/qmldesigner/data/fx/properties.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property bool pushed diff --git a/tests/auto/qml/qmldesigner/data/fx/states.qml b/tests/auto/qml/qmldesigner/data/fx/states.qml index 2e50ca9b7be..836e0ca0173 100644 --- a/tests/auto/qml/qmldesigner/data/fx/states.qml +++ b/tests/auto/qml/qmldesigner/data/fx/states.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/tests/auto/qml/qmldesigner/data/fx/topitem.qml b/tests/auto/qml/qmldesigner/data/fx/topitem.qml index 244a7ac6f3e..84ef3c829c8 100644 --- a/tests/auto/qml/qmldesigner/data/fx/topitem.qml +++ b/tests/auto/qml/qmldesigner/data/fx/topitem.qml @@ -1,5 +1,5 @@ -import Qt 4.7 -import Qt 4.7 as Qt46 +import QtQuick 1.0 +import QtQuick 1.0 as Qt46 import "subitems" import "subitems" as Subdir diff --git a/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp index 5e1f4c29e70..9b0d05d12e6 100644 --- a/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp +++ b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp @@ -31,6 +31,7 @@ private Q_SLOTS: void ifStatementWithoutBraces2(); void ifStatementWithBraces1(); void ifStatementWithBraces2(); + void ifStatementWithBraces3(); void ifStatementMixed(); void ifStatementAndComments(); void ifStatementLongCondition(); @@ -543,6 +544,18 @@ void tst_QMLCodeFormatter::ifStatementWithBraces2() checkIndent(data); } +void tst_QMLCodeFormatter::ifStatementWithBraces3() +{ + QList data; + data << Line("function foo() {") + << Line(" if (a) {") + << Line(" continue") + << Line(" }") + << Line(" var foo") + << Line("}"); + checkIndent(data); +} + void tst_QMLCodeFormatter::ifStatementMixed() { QList data; diff --git a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp index 41d978636e3..9e2bc9ec9e9 100644 --- a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp +++ b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp @@ -937,13 +937,13 @@ void testPlugin() QLibrary lib(dir + "/libsimple_gdbtest_plugin.dylib"); #endif #ifdef Q_OS_WIN - QLibrary lib(dir + "/libsimple_gdbtest_plugin.dll"); + QLibrary lib(dir + "/debug/simple_gdbtest_plugin.dll"); #endif #ifdef Q_OS_SYMBIAN QLibrary lib(dir + "/libsimple_gdbtest_plugin.dll"); #endif int (*foo)() = (int(*)()) lib.resolve("pluginTest"); - qDebug() << "library resolve: " << foo; + qDebug() << "library resolve: " << foo << lib.fileName(); if (foo) { int res = foo(); res += 1; @@ -2093,6 +2093,7 @@ int main(int argc, char *argv[]) Q_UNUSED(s); Q_UNUSED(w); + return 0; } QT_BEGIN_NAMESPACE diff --git a/tests/manual/qmlstandalone/main.cpp b/tests/manual/qmlstandalone/main.cpp index f6eaf4778ea..03a40925871 100644 --- a/tests/manual/qmlstandalone/main.cpp +++ b/tests/manual/qmlstandalone/main.cpp @@ -52,8 +52,7 @@ bool QmlStandaloneApp::generateFiles(QString *errorMessage) const && writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH)) && writeFile(generateFile(QmlAppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon)) && writeFile(generateFile(QmlAppGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon)) - && writeFile(generateFile(QmlAppGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop)) - && writeFile(generateFile(QmlAppGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri)); + && writeFile(generateFile(QmlAppGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop)); } QString AbstractMobileApp::templatesRoot()
GDB debugging helpers
File:
%1
Last modified:%2
Size:%3 Bytes
QML type dumper
File:
%4
Last modified:%5
Size:%6 Bytes
QML observer
File:
%7
Last modified:%8
Size:%9 Bytes