diff --git a/doc/images/qmldesigner-run-custom-exe.png b/doc/images/qmldesigner-run-custom-exe.png index 47d053220c947fd20b37dc07bb782b491c63ba2a..a053ec8702b6a6b9c037944aa22ebfeb48c286f6 100644 Binary files a/doc/images/qmldesigner-run-custom-exe.png and b/doc/images/qmldesigner-run-custom-exe.png differ diff --git a/doc/images/qmldesigner-run-settings.png b/doc/images/qmldesigner-run-settings.png index 41d53a99422f1a7da3b208a75c7b7d2c6f07dd4c..f95d7689bfd5ada0e887d4c964d3f3b4ed9063df 100644 Binary files a/doc/images/qmldesigner-run-settings.png and b/doc/images/qmldesigner-run-settings.png differ diff --git a/doc/images/qtcreator-breakdown.png b/doc/images/qtcreator-breakdown.png index 20f2929aaa500247b68d35f2b90b7ad8de74424d..61ac4100d7103364e3814e4705d2b2c99e52036f 100644 Binary files a/doc/images/qtcreator-breakdown.png and b/doc/images/qtcreator-breakdown.png differ diff --git a/doc/images/qtcreator-pprunsettings.png b/doc/images/qtcreator-pprunsettings.png index 5988f60d07c2ccd4ffcff6b4071719a80eac3041..b68b45656a2b2a96e8350bf0a1aee525e0e8af09 100644 Binary files a/doc/images/qtcreator-pprunsettings.png and b/doc/images/qtcreator-pprunsettings.png differ diff --git a/doc/images/qtcreator-vcs-commit.png b/doc/images/qtcreator-vcs-commit.png index 12ad4345217b2203f496d2a004d2f2d8675e0a0c..80a913f6b74c9179e77cf6464e415e1d4bf88279 100644 Binary files a/doc/images/qtcreator-vcs-commit.png and b/doc/images/qtcreator-vcs-commit.png differ diff --git a/doc/images/qtcreator-vcs-gitbranch.png b/doc/images/qtcreator-vcs-gitbranch.png index 398de10ee6595f196b5dac31407a310c1b201f31..ccf292dc9b02658c535681314f3f8e3aa0f5e433 100644 Binary files a/doc/images/qtcreator-vcs-gitbranch.png and b/doc/images/qtcreator-vcs-gitbranch.png differ diff --git a/doc/images/qtcreator-vcs-pane.png b/doc/images/qtcreator-vcs-pane.png index faea0cf32e1a20cfceb71e79274d694cfdb04354..5179240384467b1fa8952ec73d6f1ead767331df 100644 Binary files a/doc/images/qtcreator-vcs-pane.png and b/doc/images/qtcreator-vcs-pane.png differ diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 7455ef7f7c9a44508a16288ace1cff8664f3c5db..694d55f277684fe2de73c69ddb79ee794c5f2f2f 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -389,6 +389,8 @@ \o \gui{Search Results} \o \gui{Application Output} \o \gui{Compile Output} + \o \gui{General Messages} + \o \gui{Version Control} \endlist Output panes are available in all \l{Qt Creator modes}{modes}. @@ -396,6 +398,9 @@ an open output pane, click the \gui {Maximize Output Pane} button or press \key {Alt+9}. + To open the \gui{General Messages} and \gui{Version Control} + panes, select \gui {Window > Output Panes}. + \section2 Build Issues @@ -884,7 +889,7 @@ \gui{Pastebin.com}. For example, you might ask colleagues to review a change that you plan to - submit to a version control system. If you use the git version control system, + submit to a version control system. If you use the Git version control system, you can create a \e{diff} view by selecting \gui{Tools} > \gui{Git} > \gui{Diff Repository}. You can then upload its contents to the server by choosing \gui{Tools} > \gui{Code Pasting} > \gui{Paste Snippet...}. The reviewers can retrieve @@ -2251,6 +2256,9 @@ The settings to specify depend on the type of the project: qmake project or Qt Quick project. + Click \gui Add to add run settings for a project and \gui Remove to remove + the current settings. + \section1 Specifying Run Settings for qmake Projects The run configurations for qmake projects derive their executable from the parsed .pro @@ -2261,24 +2269,23 @@ \section1 Specifying Run Settings for Qt Quick Projects - To run Qt Quick projects in the QML viewer, specify the connection to the - \gui {QML Runtime} in the \gui {Run configuration} field. The settings + Select run settings in the \gui {Run configuration} field. The settings are specified automatically and, usually, you do not need to change them: \list - \o \gui {QML runtime} is the path to QML viewer executable. + \o \gui {QML Viewer} is the path to the \QQV executable. - \o \gui {QML runtime arguments} sets arguments for running the QML viewer. + \o \gui {QML Viewer arguments} sets arguments for running \QQV. The \c{-I <directory>} argument searches for C++ or QML plugins from the project folder. For a list of available arguments, enter \c {qml --help} on the command line. - \o \gui {Main QML File} is the Qt Quick project file. + \o \gui {Main QML file} is the Qt Quick project file. - \o \gui {Debugging address} is the IP address to access the QML viewer. + \o \gui {Debugging address} is the IP address to access \QQV. - \o \gui {Debugging port} is the port to access the QML viewer. You can use any + \o \gui {Debugging port} is the port to access \QQV. You can use any free port in the registered port range. \endlist @@ -2836,7 +2843,7 @@ \i \bold{Address} \i \bold{Notes} \row - \i \bold{git} + \i \bold{Git} \i \l{http://git-scm.com/} \i \row @@ -2861,20 +2868,21 @@ \section1 Setting Up Version Control Systems Qt Creator uses the version control system's command line clients to access - your repositories. To set up the version control system's command line - clients to access your repositories, make sure that the command line clients + your repositories. To allow access, make sure that the command line clients can be located using the \c{PATH} environment variable or specify the path to - the command line client executables, in the settings pages shown by - \gui{Tools} > \gui{Options...}. + the command line client executables in \gui{Tools} > \gui{Options...} > + \gui {Version Control}. + After you set up the version control system, use the command line to check + that everything works (for example, use the status command). If no issues arise, + you should be ready to use the system also from Qt Creator. \section1 Setting Up Common Options Select \gui{Tools} > \gui{Options...} > \gui{Version Control} > \gui{Common} - to view the common settings for version control systems. The following are - the options present in \gui{Common}: + to specify settings for submit messages: \list - \o \gui{Submit message checking script} is a script or program that + \o \gui{Submit message check script} is a script or program that can be used to perform checks on the submit message before submitting. The submit message is passed in as the script's first parameter. If there is an error, the script should output a @@ -2913,20 +2921,20 @@ Qt Creator allows for creating VCS repositories for version control systems that support local repository creation, such as - \bold{git} or \bold{hg}. + Git or Mercurial. When creating a new project by selecting \gui File > \gui{New File or Project...}, you can choose a version control system in the final wizard page. \section1 Using Version Control Systems - The version control sub-menus are in \gui{Tools} > \gui{Options...}. - The \gui{Version Control} page also displays the - version control system managing the current project + The \gui{Tools} menu contains a sub-menu for each supported version + control system. - Under \gui{Application Output} > \gui{Version Control}, there is an output - pane showing the commands that are executed, prepended by a - timestamp and the relevant output. + The \gui{Version Control} output pane displays the commands + that are executed, a timestamp, and the relevant output. + Select \gui {Window > Output Panes > Version Control} to open + the pane. \image qtcreator-vcs-pane.png @@ -2938,10 +2946,10 @@ asking whether the files should be added to a version control system. This happens when the parent directory or the project is already under version control and the system supports the concept of adding files, - for example, \bold{Perforce} and \bold{Subversion}. Alternatively, you can + for example, Perforce and Subversion. Alternatively, you can add files later by using the version control tool menus. - With \bold{git}, there is no concept of adding files. Instead, all modified + With Git, there is no concept of adding files. Instead, all modified files must be staged for a commit. @@ -2960,15 +2968,14 @@ \section2 Viewing Versioning History and Change Details Display the versioning history of a file by selecting \gui{Log} - (for \bold{git}) or \gui{Filelog}(for \bold{Perforce} and - \bold{Subversion}). Typically, the log output contains the date, the commit + (for Git and Mercurial) or \gui{Filelog} (for CVS, Perforce, and + Subversion). Typically, the log output contains the date, the commit message, and a change or revision identifier. Click on the identifier to display a description of the change including the diff. Right-clicking on an identifier brings up a context menu that lets you show annotation views of previous versions (see \l{Annotating Files}). \image qtcreator-vcs-log.png - \image qtcreator-vcs-describe.png \section2 Annotating Files @@ -2982,7 +2989,7 @@ version identifier at the beginning of a line and choose one of the revisions shown at the bottom of the context menu. This allows you to navigate through the history of the file and obtain previous versions of - it. It also works for \gui git/hg using SHA's. + it. It also works for Git and Mercurial using SHA's. The same context menu is available when right-clicking on a version identifier in the file log view of a single file. @@ -2995,6 +3002,8 @@ commit page containing a text editor where you can enter your commit message and a checkable list of modified files to be included. + \image qtcreator-vcs-commit.png + When you have finished filling out the commit page information, click on \gui{Commit} to start committing. @@ -3003,29 +3012,48 @@ editor, you can go back to it by closing the diff view. You can also check a diff view from the editor combo box showing the \gui{Opened files}. - \image qtcreator-vcs-commit.png + \section2 Reverting Changes + + To discard local changes to a file or project, use the \gui Revert + function or the \gui {Undo Changes/Undo Repository Changes} function + (for Git). The changes discarded depend on the version control system. + For example, in Perforce, select \gui{Revert File/Revert Project} + to discard changes made to open files, reverting them to the + revisions last synchronized from the repository. Select + \gui{Revert Unchanged} to revert files if their contents or file + type have not changed after they were opened for editing. - \section2 Using git-specific Menu Entries + \section2 Using Additional Git Functions - The git sub-menu contains additional entries: + The \gui Git sub-menu contains the following additional items: \table + \row - \i \gui{Stash snapshot...} - \i Allows you to save a snapshot of your current + \i \gui {Apply Patch/Apply Patch...} + \i Apply changes to a file or project from a diff file. You can + either apply a patch file that is open in Qt Creator or select + the patch file to apply from the file system. + \row + \i \gui{Stash Snapshot...} + \i Save a snapshot of your current work under a name for later reference. For example, if you want to try out something and find out later that it does not work, you can discard it and return to the state of the snapshot. \row \i \gui{Stash} - \i Stash local changes prior to executing a \bold{pull}. + \i Stash local changes prior to executing a \gui{Pull}. + \row + \i \gui{Stash Pop} + \i Remove a single stashed state from the stash list and apply it on + top of the current working tree state. \row \i \gui{Pull} \i Pull changes from the remote repository. If there are locally modified files, you are prompted to stash those changes. - The \bold{git} settings page contains an option to do + The \gui Git options page contains an option to do a rebase operation while pulling. \row @@ -3051,7 +3079,85 @@ \i Displays a dialog showing the stashes created by \gui{Stash snapshots...} with options to restore, display or delete them. + \row + \i \gui {Stage File for Commit} + \i Mark new or modified files for committing to the repository. + To undo this function, select \gui {Unstage File from Commit}. + \row + \i \gui{Show Commit...} + \i Select a commit to view. Enter the SHA of the commit + in the \gui Change field. + \endtable + + \section2 Using Additional Mercurial Functions + + The \gui Mercurial sub-menu contains the following additional items: + + \table + \row + \i \gui{Import} + \i Apply changes from a patch file. + \row + \i \gui{Incoming} + \i Monitor the status of a remote repository by listing + the changes that will be pulled. + \row + \i \gui{Outgoing} + \i Monitor the status of a remote repository by listing + the changes that will be pushed. + \row + \i \gui{Pull} + \i Pull changes from the remote repository. + \row + \i \gui{Update} + \i Look at an earlier version of the code. \endtable + + \section2 Using Additional Perforce Functions + + When you start Qt Creator, it looks for the executable specified + in the \gui{P4 command} field in \gui{Tools > Options... > Version + Control > Perforce}. If you do not use Perforce and want to turn + off the check, clear this field. + + The \gui Perforce sub-menu contains the following additional items: + + \table + \row + \i \gui{Describe...} + \i View information about changelists and the files in them. + \row + \i \gui{Edit File} + \i Open a file for editing. + \row + \i \gui{Opened} + \i List files that are open for editing. + \row + \i \gui{Pending Changes...} + \i Group files for commit. + \row + \i \gui{Update All/Update Current Project} + \i Fetch the current version of the current project or all + projects from the repository. + + \endtable + + + \section2 Using Additional Subversion Functions + + The \gui Subversion sub-menu contains the following additional items: + + \table + \row + \i \gui{Describe...} + \i Display commit log messages for a revision. + \row + \i \gui{Update Project/Update Repository} + \i Update your working copy. + \endtable + + + */ @@ -3331,7 +3437,7 @@ \note You can press \key {Ctr+Alt+R} or select \gui {Tools > Qt Quick > Preview} - to view QML files that do not belong to projects in the QML viewer. However, + to view QML files that do not belong to projects in \QQV. However, you can only debug QML files that belong to open projects, because the QML inspector plugin needs information about the project. @@ -3340,13 +3446,13 @@ \section1 Modes of Operation When a Qt Quick project is active and you select \gui {Debug > Start Debugging > - Start Debugging} the application is started in the QML viewer and inspected by + Start Debugging} the application is started in \QQV and inspected by the QML inspector. If the Qt Quick project includes C++ plugins, select \gui {Debug > Start Debugging > Start Debugging C++ and QML Simultaneously}. - The QML runtime is started, debugged with the native debugger, and attached to - the QML viewer. + \QQV is started, the native debugger is attached to it, and + the application is inspected by the QML inspector. \note This command is available only if \gui QML is selected in \gui {Debug > Language (QML)}. @@ -3354,7 +3460,7 @@ To debug a Qt project that contains QML content, select \gui {Debug > Start Debugging > Start Debugging C++ and QML Simultaneously}. The application is started under the control of the native debugger, attached - to the QML viewer, and inspected by the QML inspector. + to \QQV, and inspected by the QML inspector. You must use the native debugger to set breakpoints to C++ code and to examine the state of the interrupted Qt application. When a C++ program is interrupted, @@ -3385,7 +3491,7 @@ To start an active application under the control of the QML inspector, select \gui {Debug > Start Debugging > Start Debugging}, or press \key{F5}. - The application is run in the QML viewer. It behaves and performs as usual. + The application is run in \QQV. It behaves and performs as usual. You can view the status of the application when it is executed and the debug output in the \gui {Application Output} view. @@ -3401,27 +3507,27 @@ \image qmldesigner-debugging-simultaneous.png "Start Simultaneous QML and C++ Debugging view" - Usually, the settings for the QML viewer are specified automatically and you do + Usually, the settings for \QQV are specified automatically and you do not need to change them: \list - \o \gui {Debugging address} is the IP address to access the QML viewer. + \o \gui {Debugging address} is the IP address to access \QQV. - \o \gui {Debugging port} is the port to access the QML viewer. You can use any + \o \gui {Debugging port} is the port to access \QQV. You can use any free port in the registered port range. - \o \gui {Viewer path} is the path to QML viewer executable. + \o \gui {Viewer path} is the path to \QQV executable. - \o \gui {Viewer arguments} sets arguments for running the QML viewer. + \o \gui {Viewer arguments} sets arguments for running \QQV. The \c{-I <directory>} argument searches for C++ or QML plugins from the project folder. For a list of available arguments, enter \c {qml --help} on the command line. \endlist - The QML runtime is started, debugged with the native debugger, and attached to - the QML viewer. + \QQV is started, the native debugger is attached to it, and + the application is inspected by the QML inspector. \section1 Viewing and Modifying Values of Properties @@ -3438,7 +3544,7 @@ Double-click an item to move to the place in code where it is declared. - You can change the values of properties and see the results in the QML viewer. + You can change the values of properties and see the results in \QQV. If the QML inspector cannot retrieve the value for an item or a property for inspection, the item or property is grayed in the view. Right-click the item list @@ -3474,17 +3580,17 @@ You can also test the C++ code without rebuilding the whole application. - \section1 Viewing Connections to the QML Viewer + \section1 Viewing Connections to \QQV The \gui Output view displays the status of the connection between the QML - inspector and the QML viewer. + inspector and \QQV. You specify the connection in the \gui {Run Settings} in the \gui Projects mode. For more information, see \l{Specifying Run Settings for Qt Quick Projects}. If the connection does not work, check the values of the \gui {Debugging address} and \gui {Debugging port} fields. Check that the default port number is not reserved - by another application or another instance of the QML viewer that was not shut + by another application or another instance of \QQV that was not shut down properly. You can specify any free port number in the registered port range (1024-49151). @@ -3804,14 +3910,18 @@ \l{http://msdn.microsoft.com/en-us/default.aspx} {Microsoft Developer Network}. - The pre-built \e{Qt SDK for Windows} makes use - of the library if it is present on the system. When building Qt - Creator using the Microsoft Visual C++ Compiler, the - \c{"%ProgramFiles%\Debugging Tools for Windows"} path is - checked to ensure that all required header files are there. + \note Visual Studio does not include the Debugging tools needed, + and therefore, you must install them separately. - You must also add the Symbol Server provided by Microsoft to the symbol - search path of the debugger. For more information, see + The pre-built \e{Qt SDK for Windows} makes use + of the library if it is present on the system. When manually building Qt + Creator using the Microsoft Visual C++ Compiler, the build process checks + for the required files in \c{"%ProgramFiles%\Debugging Tools for Windows"}. + + It is highly recommended that you add the Symbol Server provided by Microsoft to the symbol + search path of the debugger. The Symbol Server provides you + with debugging informaton for the operating system libraries for debugging + Windows applications. For more information, see \l{Setting the Symbol Server in Windows}. \row @@ -3846,9 +3956,22 @@ and select \gui{Symbol Server...}. \o Select a directory where you want to store the cached information and click \gui OK. + + Use a subfolder in a temporary directory, such as + \c {C:\temp\symbolcache}. \endlist + \note Populating the cache might take a long time on a slow network + connection. + + + \omit In v2.1 and later: + + \note The first time you start debugging by using the + Debugging tools for Windows, Qt Creator prompts you to add the Symbol + Server. + \endomit */ /*! @@ -4624,7 +4747,7 @@ is modified externally, you have to restart Qt Creator for the changes to take effect. - To update the \tt{.files} on the \gui git repository use the following + To update the \tt{.files} on the \gui Git repository use the following script: \code git ls-files *.cpp *.h > MyProject.files @@ -4813,7 +4936,7 @@ \image qmldesigner-button.png "Button component" - \o Click the \gui Run button to view the button in the QML viewer. + \o Click the \gui Run button to view the button in \QQV. \endlist @@ -4968,7 +5091,7 @@ a pointer to the \c clicked expression that you added earlier: \c {onClicked: parent.clicked()}. - \o Click the \gui Run button to view the button in the QML viewer. + \o Click the \gui Run button to view the button in \QQV. \endlist @@ -5114,7 +5237,7 @@ \endcode - \o Click the \gui Run button to view the list view in the QML viewer. + \o Click the \gui Run button to view the list view in \QQV. \endlist diff --git a/doc/qtcreator.qdocconf b/doc/qtcreator.qdocconf index ed9cd03158c5895f181a1fe0c02125d65df494a0..b43113be87965dc99116c4480ae43892a47fa7ae 100644 --- a/doc/qtcreator.qdocconf +++ b/doc/qtcreator.qdocconf @@ -85,6 +85,7 @@ macro.QD = "\\e{Qt Designer}" macro.QL = "\\e{Qt Linguist}" macro.QC = "\\e{Qt Creator}" macro.QMLD = "\\e{Qt Quick Designer}" +macro.QQV = "\\e{Qt QML Viewer}" macro.param = "\\e" macro.raisedaster.HTML = "<sup>*</sup>" macro.reg.HTML = "<sup>®</sup>" diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBoxAlternate.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBoxAlternate.qml index 7836ef3345f54f3daa9d382e2ddc8e21b528a3df..ff6eb442c77c6c707e2286e57e37f1946b5ab3dc 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBoxAlternate.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBoxAlternate.qml @@ -70,7 +70,7 @@ QWidget { //This is a special doubleSpinBox that does color coding for states id: label; font.bold: true; alignment: doubleSpinBox.alignRight ? "Qt::AlignRight | Qt::AlignVCenter" : "Qt::AlignLeft | Qt::AlignVCenter"; - fixedWidth: 76 + fixedWidth: frame.labelWidth visible: doubleSpinBox.text != ""; toolTip: text } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FlickableSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/FlickableSpecifics.qml index bd2682a3b829a676d837f3c393875bf3e06a25ae..1acaabc19f64c54f0664f1684ad17df0a6a84ef0 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/FlickableSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/FlickableSpecifics.qml @@ -1,121 +1,26 @@ import Qt 4.7 import Bauhaus 1.0 +//backendValue: backendValues.horizontalVelocity; +//backendValue: backendValues.verticalVelocity; +//backendValue: backendValues.maximumFlickVelocity; +//backendValue: backendValues.overShoot; + +//boundsBehavior : enumeration +//contentHeight : int +//contentWidth : int + QWidget { layout: QVBoxLayout { topMargin: 0 bottomMargin: 0 leftMargin: 0 rightMargin: 0 - spacing: 0 - GroupBox { - - + spacing: 0 GroupBox { finished: finishedNotify; - caption: qsTr("Flickable") - - layout: QVBoxLayout { - topMargin: 15; - bottomMargin: 6; - leftMargin: 0; - rightMargin: 0; - - QWidget { - id: contentWidget; - maximumHeight: 220; - - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 10; - rightMargin: 10; - - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - QLabel { - minimumHeight: 20; - text: "Horizontal Velocity:" - font.bold: true; - } - - QLabel { - minimumHeight: 20; - text: "Vertical Velocity:" - font.bold: true; - } - - QLabel { - minimumHeight: 20; - text: "Maximum Flick Velocity:" - font.bold: true; - } - - QLabel { - minimumHeight: 20; - text: "Over Shoot:" - font.bold: true; - } - } - } - - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - - - DoubleSpinBox { - id: horizontalVelocitySpinBox; - objectName: "horizontalVelocitySpinBox"; - backendValue: backendValues.horizontalVelocity; - minimumWidth: 30; - minimum: 0.1 - maximum: 10 - singleStep: 0.1 - baseStateFlag: isBaseState; - } - - DoubleSpinBox { - id: verticalVelocitySpinBox; - objectName: "verticalVelocitySpinBox"; - backendValue: backendValues.verticalVelocity; - minimumWidth: 30; - minimum: 0.1 - maximum: 10 - singleStep: 0.1 - baseStateFlag: isBaseState; - } - - DoubleSpinBox { - id: maximumVelocitySpinBox; - objectName: "maximumVelocitySpinBox"; - backendValue: backendValues.maximumFlickVelocity; - minimumWidth: 30; - minimum: 0.1 - maximum: 10 - singleStep: 0.1 - baseStateFlag: isBaseState; - } - - CheckBox { - id: overshootCheckBox; - text: "overshoot"; - backendValue: backendValues.overShoot; - baseStateFlag: isBaseState; - checkable: true; - } - } - } - } - } + caption: qsTr("Flickable") } - } } } +} \ No newline at end of file diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FlipableSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/FlipableSpecifics.qml index 62664e414f5b007e609f00b7497fc1dbf82b93f2..1d5c021f4bced4e5d12e55c2cd776d54ba40ec16 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/FlipableSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/FlipableSpecifics.qml @@ -2,21 +2,4 @@ import Qt 4.7 import Bauhaus 1.0 QWidget { - layout: QVBoxLayout { - topMargin: 0 - bottomMargin: 0 - leftMargin: 0 - rightMargin: 0 - spacing: 0 - GroupBox { - - - GroupBox { - maximumHeight: 200; - - finished: finishedNotify; - - } - - } - } +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml index 39f3d25afbf13dfeab02e231e5d60298e164f0d2..e11059f22aa094e3346471e5a49bb6dc13c72f20 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontComboBox.qml @@ -56,6 +56,7 @@ QWidget { layout: HorizontalLayout { QFontComboBox { + editable: false id: fontSelector currentFont.family: backendValue.value diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Label.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Label.qml index bbbbd30fbc53f314dc4d549799044ff9fe908f2f..c3c7c5851aed019c9c27741472a6e094cc3fd820 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Label.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Label.qml @@ -4,5 +4,5 @@ import Bauhaus 1.0 QLabel { id: label alignment: "Qt::AlignRight | Qt::AlignVCenter" - fixedWidth: 76 + fixedWidth: frame.labelWidth } diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ListView.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ListView.qml deleted file mode 100644 index 1740e062eb02cb38d8be4b9b0a4faffdfa32dc47..0000000000000000000000000000000000000000 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ListView.qml +++ /dev/null @@ -1,85 +0,0 @@ -import Qt 4.7 -import Bauhaus 1.0 - -PropertyFrame { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - spacing: 0; - - Switches { - } - - QScrollArea { - horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"; - id: standardPane; - content: properyEditorStandard; - QFrame { - minimumHeight: 400; - id: properyEditorStandard - layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 2; - rightMargin: 2; - Type { - } - HorizontalLine { - } - - Geometry { - } - - Modifiers { - - } - - QScrollArea { - } - - } // layout - } //QWidget - } //QScrollArea - - - QScrollArea { - horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"; - id: specialPane; - visible: false; - visible: false; - content: properyEditorSpecial; - QFrame { - minimumHeight: 200; - id: properyEditorSpecial - layout: QVBoxLayout { - topMargin: 2; - bottomMargin: 2; - leftMargin: 2; - rightMargin: 2; - Type { - } - - QScrollArea { - } - } - } - } - - ExtendedPane { - id: extendedPane; - } - - LayoutPane { - id: layoutPane; - } - - - ResetPane { - id: resetPane; - } - - - } -} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml index 3e6a5ef21200f824c77b4314ea9ecb878656e9a0..5680a1269fc7187434baea0f9fde65a3c9e94b0b 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml @@ -2,87 +2,5 @@ import Qt 4.7 import Bauhaus 1.0 QWidget { - layout: QVBoxLayout { - topMargin: 0 - bottomMargin: 0 - leftMargin: 0 - rightMargin: 0 - spacing: 0 - GroupBox { - - GroupBox { - finished: finishedNotify; - caption: qsTr("List View") - - layout: QVBoxLayout { - topMargin: 15; - bottomMargin: 6; - leftMargin: 0; - rightMargin: 0; - - QWidget { - id: contentWidget; - maximumHeight: 260; - - layout: QHBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 10; - rightMargin: 10; - - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - QLabel { - minimumHeight: 22; - text: "Highlight:" - font.bold: true; - } - - QLabel { - minimumHeight: 22; - text: "Spacing:" - font.bold: true; - } - } - } - - QWidget { - layout: QVBoxLayout { - topMargin: 0; - bottomMargin: 0; - leftMargin: 0; - rightMargin: 0; - - CheckBox { - id: highlightFollowsCurrentItemCheckBox; - text: "Follows"; - backendValue: backendValues.highlightFollowsCurrentItem; - baseStateFlag: isBaseState; - checkable: true; - } - - SpinBox { - id: spacingSpinBox; - objectName: "spacingSpinBox"; - backendValue: backendValues.spacing; - minimumWidth: 30; - minimum: 0; - maximum: 1000; - singleStep: 1; - baseStateFlag: isBaseState; - } - - } - } - } - } - } - } - - } - } +} diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml index 95441b46de6127cd24f8560ca00966d1179fd15b..71e09229807c55a70327cacf7154e6e3c7292943 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/PropertyFrame.qml @@ -5,6 +5,21 @@ WidgetFrame { id: propertyFrame; minimumWidth: 300; + property int frameWidth: width + property int labelWidth: 76 + + onFrameWidthChanged: { + if (frameWidth > 300) { + var moreSpace = (frameWidth - 300) / 3; + var newFixedWidth = 76 + moreSpace; + if (newFixedWidth > 200) + newFixedWidth = 200; + labelWidth = newFixedWidth; + } else { + labelWidth = 76; + } + } + objectName: "propertyEditorFrame" styleSheetFile: "propertyEditor.css"; } diff --git a/src/plugins/coreplugin/images/category_fakevim.png b/src/plugins/coreplugin/images/category_fakevim.png index 92b03a34596df106bb2c699b1de9523b861cead7..47e2201e246beb198d6baddcd84bd1e7548329b5 100644 Binary files a/src/plugins/coreplugin/images/category_fakevim.png and b/src/plugins/coreplugin/images/category_fakevim.png differ diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 1bdb606be6b1cc2071c2f379a57dd484be06d796..b7f0f461fb0467b3aa040080768eabecd5baf410 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -958,7 +958,7 @@ bool CVSPlugin::describe(const QString &repositoryPath, const QString title = QString::fromLatin1("cvs describe %1").arg(commitId); Core::IEditor *newEditor = showOutputInEditor(title, output, VCSBase::DiffOutput, entries.front().file, codec); newEditor->setProperty("describeChange", commitId); - setDiffBaseDirectory(editor, repositoryPath); + setDiffBaseDirectory(newEditor, repositoryPath); } return true; } diff --git a/src/plugins/projectexplorer/sessiondialog.cpp b/src/plugins/projectexplorer/sessiondialog.cpp index 111a11d9a8093f7f5b8f562841204658d2beb45c..fb9bb71ca1b999a96664d057ac900791effe782c 100644 --- a/src/plugins/projectexplorer/sessiondialog.cpp +++ b/src/plugins/projectexplorer/sessiondialog.cpp @@ -78,18 +78,19 @@ class SessionNameInputDialog : public QDialog { Q_OBJECT public: - SessionNameInputDialog(const QStringList& sessions); + SessionNameInputDialog(const QStringList& sessions, const QString &initialValue = QString()); QString value() const; private: QLineEdit *m_newSessionLineEdit; }; -SessionNameInputDialog::SessionNameInputDialog(const QStringList& sessions) +SessionNameInputDialog::SessionNameInputDialog(const QStringList& sessions, const QString &initialValue) { QVBoxLayout *hlayout = new QVBoxLayout(this); QLabel *label = new QLabel(tr("Enter the name of the session:"), this); hlayout->addWidget(label); m_newSessionLineEdit = new QLineEdit(this); + m_newSessionLineEdit->setText(initialValue); m_newSessionLineEdit->setValidator(new SessionValidator(this, sessions)); hlayout->addWidget(m_newSessionLineEdit); QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); @@ -191,7 +192,7 @@ void SessionDialog::createNew() void SessionDialog::clone() { - SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions()); + SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions(), m_ui.sessionList->currentItem()->text()); newSessionInputDialog.setWindowTitle(tr("New session name")); if (newSessionInputDialog.exec() == QDialog::Accepted) { QString newSession = newSessionInputDialog.value(); @@ -215,7 +216,7 @@ void SessionDialog::remove() void SessionDialog::rename() { - SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions()); + SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions(), m_ui.sessionList->currentItem()->text()); newSessionInputDialog.setWindowTitle(tr("Rename session")); if (newSessionInputDialog.exec() == QDialog::Accepted) { m_sessionManager->renameSession(m_ui.sessionList->currentItem()->text(), newSessionInputDialog.value()); diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index c3dc81dccf1a4d9913de72c43e79d3653a2e1dfa..c74e94dd060e9178a18ab5518bda4f85be7c0893 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -879,7 +879,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->drawText(22, 2 + opt.rect.top() + fm.ascent(), bottom); if (fm.width(bottom) > width) { // draw a gradient to mask the text - int gwidth = opt.rect.right() - width; + int gwidth = opt.rect.right() + 1 - width; QLinearGradient lg(QPoint(width, 0), QPoint(width+gwidth, 0)); QColor c = backgroundColor; c.setAlpha(0); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index 7c1f0518d5fac3e1742876a2eb2724d238b0a3aa..b57ad1779f247d999872788b365af6daa1752e86 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -550,40 +550,39 @@ QString templateGeneration(NodeMetaInfo type, NodeMetaInfo superType) qmlTemplate += QLatin1String("layout: VerticalLayout {\n"); QList<QString> orderedList; - foreach (const PropertyMetaInfo &propertyMetaInfo, type.properties()){ - orderedList.append(propertyMetaInfo.name()); - } - + orderedList = type.properties(true).keys(); qSort(orderedList); foreach (const QString &name, orderedList) { - const PropertyMetaInfo propertyMetaInfo(type.property(name)); + const PropertyMetaInfo propertyMetaInfo(type.property(name, true)); + QString properName = name; + properName.replace(".", "_"); - if (!superType.hasProperty(propertyMetaInfo.name())) { + if (!superType.hasProperty(name, true)) { if (propertyMetaInfo.type() == "int") { qmlTemplate += QString(QLatin1String( - "IntEditor { backendValue: backendValues.%1\n caption: \"%1\"\nbaseStateFlag: isBaseState\nslider: false\n}" - )).arg(propertyMetaInfo.name()); + "IntEditor { backendValue: backendValues.%2\n caption: \"%1\"\nbaseStateFlag: isBaseState\nslider: false\n}" + )).arg(name).arg(properName); } if (propertyMetaInfo.type() == "real" || propertyMetaInfo.type() == "double" || propertyMetaInfo.type() == "qreal") { qmlTemplate += QString(QLatin1String( - "DoubleSpinBoxAlternate {\ntext: \"%1\"\nbackendValue: backendValues.%1\nbaseStateFlag: isBaseState\n}\n" - )).arg(propertyMetaInfo.name()); + "DoubleSpinBoxAlternate {\ntext: \"%1\"\nbackendValue: backendValues.%2\nbaseStateFlag: isBaseState\n}\n" + )).arg(name).arg(properName); } if (propertyMetaInfo.type() == "string") { qmlTemplate += QString(QLatin1String( - "QWidget {\nlayout: HorizontalLayout {\nLabel {\ntext: \"%1\"\ntoolTip: \"%1\"\n}\nLineEdit {\nbackendValue: backendValues.%1\nbaseStateFlag: isBaseState\n}\n}\n}\n" - )).arg(propertyMetaInfo.name()); + "QWidget {\nlayout: HorizontalLayout {\nLabel {\ntext: \"%1\"\ntoolTip: \"%1\"\n}\nLineEdit {\nbackendValue: backendValues.%2\nbaseStateFlag: isBaseState\n}\n}\n}\n" + )).arg(name).arg(properName); } if (propertyMetaInfo.type() == "bool") { qmlTemplate += QString(QLatin1String( - "QWidget {\nlayout: HorizontalLayout {\nLabel {\ntext: \"%1\"\ntoolTip: \"%1\"\n}\nCheckBox {text: backendValues.%1.value\nbackendValue: backendValues.%1\nbaseStateFlag: isBaseState\ncheckable: true\n}\n}\n}\n" - )).arg(propertyMetaInfo.name()); + "QWidget {\nlayout: HorizontalLayout {\nLabel {\ntext: \"%1\"\ntoolTip: \"%1\"\n}\nCheckBox {text: backendValues.%2.value\nbackendValue: backendValues.%2\nbaseStateFlag: isBaseState\ncheckable: true\n}\n}\n}\n" + )).arg(name).arg(properName); } - if (propertyMetaInfo.type() == "color" || propertyMetaInfo.type() == "qcolor") { + if (propertyMetaInfo.type() == "color" || propertyMetaInfo.type() == "QColor") { qmlTemplate += QString(QLatin1String( - "ColorGroupBox {\ncaption: \"%1\"\nfinished: finishedNotify\nbackendColor: backendValues.%1\n}\n\n" - )).arg(propertyMetaInfo.name()); + "ColorGroupBox {\ncaption: \"%1\"\nfinished: finishedNotify\nbackendColor: backendValues.%2\n}\n\n" + )).arg(name).arg(properName); } } } diff --git a/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp index 724f3780daf49da998230d0461f0f662b29c2234..a16740cda0e16a97e4d0b1e9622adce433246ddc 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp @@ -447,7 +447,8 @@ QString MetaInfo::fromQtTypes(const QString &type) const { if (m_p->m_QtTypesToQmlTypes.contains(type)) return m_p->m_QtTypesToQmlTypes.value(type); - + if (!isGlobal()) + return global().fromQtTypes(type); return type; } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h index b839c411a00a9dc4e89ba9133fddc6ff18d20497..5542989afb3ca1e9d028b69c5633d01a37acd01a 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h @@ -88,6 +88,11 @@ public: MaemoDeviceConfig deviceConfig() const; QString runtimeGdbServerPort() const; +<<<<<<< HEAD +======= + const QString sshCmd() const; + const QString scpCmd() const; +>>>>>>> origin/2.0 const QString gdbCmd() const; const QString dumperLib() const; @@ -108,6 +113,10 @@ private slots: private: void init(); +<<<<<<< HEAD +======= + const QString cmd(const QString &cmdName) const; +>>>>>>> origin/2.0 const MaemoToolChain *toolchain() const; bool fileNeedsDeployment(const QString &path, const QDateTime &lastDeployed) const; void addDeployTimesToMap(const QString &key, diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index b923f6ef2b3053c0c5f71ef540a031e972436851..5ac8bd97e635b99bd9b23f1dfd6b404e1a5abb5d 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -75,7 +75,6 @@ ResourceEditorW::ResourceEditorW(const QList<int> &context, m_plugin(plugin) { m_resourceEditor->setResourceDragEnabled(true); - m_resourceEditor->layout()->setMargin(9); connect(m_resourceEditor, SIGNAL(dirtyChanged(bool)), this, SLOT(dirtyChanged(bool))); connect(m_resourceEditor, SIGNAL(undoStackChanged(bool, bool)), diff --git a/src/plugins/texteditor/findinfiles.cpp b/src/plugins/texteditor/findinfiles.cpp index 42f4b2457ac4097f02d2f2ead0d1ea157e9990bb..62b41c258584ee79ddfeedb3dd5ab781be35017f 100644 --- a/src/plugins/texteditor/findinfiles.cpp +++ b/src/plugins/texteditor/findinfiles.cpp @@ -31,6 +31,7 @@ #include <QtCore/QtDebug> #include <QtCore/QSettings> +#include <QtCore/QDir> #include <QtCore/QDirIterator> #include <QtGui/QPushButton> #include <QtGui/QFileDialog> @@ -124,8 +125,11 @@ void FindInFiles::openFileBrowser() { if (!m_directory) return; + QString oldDir = m_directory->currentText(); + if (!QDir(oldDir).exists()) + oldDir.clear(); QString dir = QFileDialog::getExistingDirectory(m_configWidget, - tr("Directory to search")); + tr("Directory to search"), oldDir); if (!dir.isEmpty()) m_directory->setEditText(dir); } diff --git a/src/shared/qrceditor/qrceditor.cpp b/src/shared/qrceditor/qrceditor.cpp index 693faf54c61ebde83d7f16e36a5201b522b9f928..8cb7303a8851c79bfc34d8af0421fc71f69a28dc 100644 --- a/src/shared/qrceditor/qrceditor.cpp +++ b/src/shared/qrceditor/qrceditor.cpp @@ -47,9 +47,10 @@ QrcEditor::QrcEditor(QWidget *parent) layout->setSpacing(0); layout->setMargin(0); m_ui.centralWidget->setLayout(layout); - m_treeview->enableContextMenu(false); + m_treeview->setFrameStyle(QFrame::NoFrame);; layout->addWidget(m_treeview); + connect(m_ui.removeButton, SIGNAL(clicked()), this, SLOT(onRemove())); // 'Add' button with menu diff --git a/src/shared/qrceditor/qrceditor.ui b/src/shared/qrceditor/qrceditor.ui index 739b0d8c003e6fc472c13f6ded327054fe0b4266..f9245dcaf52ce700d30a2bec3198484eeb4f1454 100644 --- a/src/shared/qrceditor/qrceditor.ui +++ b/src/shared/qrceditor/qrceditor.ui @@ -10,9 +10,12 @@ <height>381</height> </rect> </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> <property name="margin"> - <number>6</number> + <number>0</number> </property> <item> <widget class="QWidget" name="centralWidget" native="true"> @@ -25,84 +28,118 @@ </widget> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QPushButton" name="addButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Add</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="removeButton"> - <property name="text"> - <string>Remove</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> + <widget class="Line" name="line"> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>1</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">color: #666666</string> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> </item> <item> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>Properties</string> - </property> - <layout class="QFormLayout" name="formLayout"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> + <widget class="QWidget" name="widget" native="true"> + <layout class="QGridLayout" name="gridLayout"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> </property> - <property name="fieldGrowthPolicy"> - <enum>QFormLayout::ExpandingFieldsGrow</enum> + <property name="rightMargin"> + <number>6</number> </property> <item row="0" column="0"> - <widget class="QLabel" name="aliasLabel"> - <property name="text"> - <string>Alias:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLineEdit" name="aliasText"/> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QPushButton" name="addButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Add</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="removeButton"> + <property name="text"> + <string>Remove</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> </item> <item row="1" column="0"> - <widget class="QLabel" name="prefixLabel"> - <property name="text"> - <string>Prefix:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="prefixText"/> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="languageLabel"> - <property name="text"> - <string>Language:</string> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Properties</string> </property> + <layout class="QFormLayout" name="formLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <property name="fieldGrowthPolicy"> + <enum>QFormLayout::ExpandingFieldsGrow</enum> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="aliasLabel"> + <property name="text"> + <string>Alias:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLineEdit" name="aliasText"/> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="prefixLabel"> + <property name="text"> + <string>Prefix:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="prefixText"/> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="languageLabel"> + <property name="text"> + <string>Language:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="languageText"/> + </item> + </layout> </widget> </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="languageText"/> - </item> </layout> </widget> </item> diff --git a/tests/auto/qml/qmldesigner/coretests/testcore.cpp b/tests/auto/qml/qmldesigner/coretests/testcore.cpp index bacf35716cb52790a221a95540fe162cb8e71e96..2208c4f5e46a6d06a776c5f6e5c00625f6a946f9 100644 --- a/tests/auto/qml/qmldesigner/coretests/testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/testcore.cpp @@ -43,6 +43,7 @@ #include <rewritingexception.h> #include <nodeinstanceview.h> #include <nodeinstance.h> +#include <subcomponentmanager.h> #include <QDebug> #include "../testview.h" @@ -3244,6 +3245,38 @@ void TestCore::testCopyModelRewriter2() QCOMPARE(textEdit2.toPlainText(), qmlString1); } +void TestCore::testSubComponentManager() +{ + QString fileName = QString(QTCREATORDIR) + "/tests/auto/qml/qmldesigner/data/fx/usingmybutton.qml"; + QFile file(fileName); + QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); + + QPlainTextEdit textEdit; + textEdit.setPlainText(file.readAll()); + NotIndentingTextEditModifier modifier(&textEdit); + + QScopedPointer<Model> model(Model::create("Qt/Item")); + model->setFileUrl(QUrl::fromLocalFile(fileName)); + QScopedPointer<SubComponentManager> subComponentManager(new SubComponentManager(model->metaInfo(), 0)); + subComponentManager->update(QUrl::fromLocalFile(fileName), modifier.text().toUtf8()); + + QScopedPointer<TestRewriterView> testRewriterView(new TestRewriterView()); + testRewriterView->setTextModifier(&modifier); + model->attachView(testRewriterView.data()); + + QVERIFY(testRewriterView->errors().isEmpty()); + + QVERIFY(testRewriterView->rootModelNode().isValid()); + + + QVERIFY(model->metaInfo().nodeMetaInfo("Qt/Rectangle").properties(true).keys().contains("border.width")); + + QVERIFY(model->metaInfo().hasNodeMetaInfo("Qt/Pen")); + NodeMetaInfo myButtonMetaInfo = model->metaInfo().nodeMetaInfo("MyButton"); + QVERIFY(myButtonMetaInfo.isValid()); + QVERIFY(myButtonMetaInfo.properties(true).keys().contains("border.width")); + QVERIFY(myButtonMetaInfo.property("border.width", true).isValid()); +} void TestCore::loadQml() { @@ -3576,11 +3609,14 @@ void TestCore::testMetaInfoDotProperties() QVERIFY(!rectNode.metaInfo().properties().keys().contains("pos.x")); QVERIFY(rectNode.metaInfo().properties(true).keys().contains("pos.y")); QVERIFY(!rectNode.metaInfo().properties().keys().contains("pos.y")); + QVERIFY(!rectNode.metaInfo().properties().keys().contains("anchors.topMargin")); QVERIFY(rectNode.metaInfo().properties(true).keys().contains("border.width")); QVERIFY(rectNode.metaInfo().hasProperty("border")); QVERIFY(!rectNode.metaInfo().property("border").isValueType()); QVERIFY(rectNode.metaInfo().hasProperty("border.width", true)); QVERIFY(rectNode.metaInfo().property("border.width", true).isValid()); + QVERIFY(rectNode.metaInfo().property("border.width", true).isValid()); + QVERIFY(rectNode.metaInfo().property("anchors.topMargin", true).isValid()); } void TestCore::testMetaInfoListProperties() diff --git a/tests/auto/qml/qmldesigner/coretests/testcore.h b/tests/auto/qml/qmldesigner/coretests/testcore.h index 5ff29f3333ea12ed20ecd174fa6c9ef5a0e760cb..91b4e1e0e5a652e5acd138a268da4c5b0ed61e49 100644 --- a/tests/auto/qml/qmldesigner/coretests/testcore.h +++ b/tests/auto/qml/qmldesigner/coretests/testcore.h @@ -163,6 +163,7 @@ private slots: void testRewriterTransactionRewriter(); void testCopyModelRewriter1(); void testCopyModelRewriter2(); + void testSubComponentManager(); // // regression tests diff --git a/tests/auto/qml/qmldesigner/data/fx/MyButton.qml b/tests/auto/qml/qmldesigner/data/fx/MyButton.qml new file mode 100644 index 0000000000000000000000000000000000000000..d6d32e4668e55090dd2ca6dc124d8e0afb849e5d --- /dev/null +++ b/tests/auto/qml/qmldesigner/data/fx/MyButton.qml @@ -0,0 +1,11 @@ +import Qt 4.7 + +Rectangle { + property string text: "test" + width: 200 + height: 200 + Text { + anchors.fill: parent + } + +} diff --git a/tests/auto/qml/qmldesigner/data/fx/usingmybutton.qml b/tests/auto/qml/qmldesigner/data/fx/usingmybutton.qml new file mode 100644 index 0000000000000000000000000000000000000000..e263cdde127c45c173f91009e4d3e88b5f874d09 --- /dev/null +++ b/tests/auto/qml/qmldesigner/data/fx/usingmybutton.qml @@ -0,0 +1,6 @@ +import Qt 4.7 + +Item { + MyButton { } +} +