Merge remote-tracking branch 'origin/3.0'

Conflicts:
	share/qtcreator/debugger/gdbbridge.py

Change-Id: I32d8158c475f927b50ef06fde9ab8189ebdbcbbc
This commit is contained in:
Eike Ziller
2013-11-15 10:26:57 +01:00
326 changed files with 6324 additions and 4987 deletions
@@ -73,7 +73,7 @@ registerCommonWindowsFileTypeExtensions = function()
for (var i = 0; i < headerExtensions.length; ++i) {
component.addOperation( "RegisterFileType",
headerExtensions[i],
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"C++ Header file",
"text/plain",
component.qtCreatorBinaryPath + ",3",
@@ -85,7 +85,7 @@ registerCommonWindowsFileTypeExtensions = function()
for (var i = 0; i < cppExtensions.length; ++i) {
component.addOperation( "RegisterFileType",
cppExtensions[i],
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"C++ Source file",
"text/plain",
component.qtCreatorBinaryPath + ",2",
@@ -94,7 +94,7 @@ registerCommonWindowsFileTypeExtensions = function()
component.addOperation( "RegisterFileType",
"c",
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"C Source file",
"text/plain",
component.qtCreatorBinaryPath + ",1",
@@ -105,42 +105,42 @@ registerWindowsFileTypeExtensions = function()
{
component.addOperation( "RegisterFileType",
"ui",
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt UI file",
"text/plain",
component.qtCreatorBinaryPath + ",4",
"ProgId=QtProject.QtCreator.ui");
component.addOperation( "RegisterFileType",
"pro",
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt Project file",
"text/plain",
component.qtCreatorBinaryPath + ",5",
"ProgId=QtProject.QtCreator.pro");
component.addOperation( "RegisterFileType",
"pri",
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt Project Include file",
"text/plain",
component.qtCreatorBinaryPath + ",6",
"ProgId=QtProject.QtCreator.pri");
component.addOperation( "RegisterFileType",
"qbs",
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qbs Project file",
"text/plain",
component.qtCreatorBinaryPath + ",5",
"ProgId=QtProject.QtCreator.qbs");
component.addOperation( "RegisterFileType",
"qs",
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt Script file",
"text/plain",
component.qtCreatorBinaryPath + ",0",
"ProgId=QtProject.QtCreator.qs");
component.addOperation( "RegisterFileType",
"qml",
component.qtCreatorBinaryPath + " -client '%1'",
component.qtCreatorBinaryPath + " -client \"%1\"",
"Qt Quick Markup language file",
"text/plain",
component.qtCreatorBinaryPath + ",7",
@@ -153,12 +153,6 @@ Component.prototype.createOperations = function()
component.createOperations();
if ( installer.value("os") == "win" )
{
component.addOperation( "SetPluginPathOnQtCore",
"@TargetDir@/bin",
"@TargetDir@/plugins");
component.addOperation( "SetImportsPathOnQtCore",
"@TargetDir@/bin",
"@TargetDir@/bin");
component.addOperation( "CreateShortcut",
component.qtCreatorBinaryPath,
"@StartMenuDir@/Qt Creator.lnk",
@@ -166,24 +160,13 @@ Component.prototype.createOperations = function()
component.addElevatedOperation("Execute", "{0,3010,1638}", "@TargetDir@\\lib\\vcredist_msvc2010\\vcredist_x86.exe", "/norestart", "/q");
registerWindowsFileTypeExtensions();
try {
if (component.userInterface("AssociateCommonFiletypesForm").AssociateCommonFiletypesCheckBox
.checked) {
registerCommonWindowsFileTypeExtensions();
}
} catch(e) {
print(e);
if (component.userInterface("AssociateCommonFiletypesForm").AssociateCommonFiletypesCheckBox
.checked) {
registerCommonWindowsFileTypeExtensions();
}
}
if ( installer.value("os") == "x11" )
{
component.addOperation( "SetPluginPathOnQtCore",
"@TargetDir@/lib/qtcreator",
"@TargetDir@/lib/qtcreator/plugins");
component.addOperation( "SetImportsPathOnQtCore",
"@TargetDir@/lib/qtcreator",
"@TargetDir@/bin");
component.addOperation( "InstallIcons", "@TargetDir@/share/icons" );
component.addOperation( "CreateDesktopEntry",
"QtProject-qtcreator.desktop",
-3
View File
@@ -42,8 +42,6 @@ Rectangle {
Rectangle {
id: middleRightRect
x: 13
y: 16
width: 64
height: 64
color: "#00000000"
@@ -61,7 +59,6 @@ Rectangle {
Rectangle {
id: bottomLeftRect
y: 11
width: 64
height: 64
color: "#00000000"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 234 KiB

+8 -8
View File
@@ -73,9 +73,10 @@
Qt Creator supports native debuggers when working with
compiled code. On most supported platforms, the GNU Symbolic Debugger
GDB can be used. On Microsoft Windows, when using the Microsoft tool chain
the Microsoft Console Debugger CDB, is needed. There is also an
incomplete experimental interface to LLDB on Mac OS and Linux available
when building \QC from source.
the Microsoft Console Debugger CDB, is needed. On Mac OS X, the LLDB
debugger can be used. Basic support for LLDB is also available on Linux,
but it is restricted by LLDB's capabilities there, and considered
experimental.
The following table summarizes the support for debugging C++ code:
@@ -87,7 +88,7 @@
\row
\li Linux
\li GCC, ICC
\li GDB
\li GDB, LLDB (experimental)
\row
\li Unix
\li GCC, ICC
@@ -95,7 +96,7 @@
\row
\li Mac OS X
\li GCC, Clang
\li Apple GDB, FSF GDB (experimental), LLDB (experimental)
\li Apple GDB, FSF GDB (experimental), LLDB
\row
\li Windows/MinGW
\li GCC
@@ -150,7 +151,7 @@
You can use the LLDB version delivered with Xcode, but we recommend that you
build it from sources using Xcode. The minimal supported version is LLDB
300.99.
300.2.51.
\omit
@@ -246,8 +247,7 @@
\row
\li LLDB
\li An LLDB version is delivered with Xcode, but we recommend that
you build LLDB from sources using Xcode.
\li We recommend using the LLDB version that is delivered with Xcode 5.
\endtable
\section1 Mapping Source Paths
+38 -16
View File
@@ -876,8 +876,6 @@
\list
\li \gui{CodePaster}
\li \gui{Pastebin.Com}
\li \gui{Pastebin.Ca}
@@ -888,29 +886,54 @@
\endlist
To configure the server, select \gui{Tools} > \gui{Options} >
\gui{Code Pasting} > \gui CodePaster. In the \gui Server field, specify the
host name of the CodePaster service.
\section1 Specifying Settings for Code Pasting
To specify settings for the code pasting service:
\list 1
\li Select \gui Tools > \gui Options > \gui{Code Pasting}.
\image qtcreator-code-pasting-options.png "Code Pasting options"
\li In the \gui {Default protocol} field, select a code pasting service
to use by default.
\li In the \gui Username field, enter your username.
\li In the \gui {Expires after} field, specify the time to keep the
pasted snippet on the server.
\li Select the \gui {Copy-paste URL to clipboard} check box to copy the
URL of the post on the code pasting service to the clipboard when
you paste a post.
\li Select the \gui {Display Output pane after sending a post} to
display the URL in the \gui {General Messages} output pane when you
paste a post.
\endlist
Select \gui Fileshare to specify the path to a shared
network drive. The code snippets are copied to the drive as simple files.
You have to delete obsolete files from the drive manually.
\section1 Using Code Pasting Services
To paste a snippet of code onto the server, select \gui{Tools} >
\gui{Code Pasting} > \gui{Paste Snippet} or press \key{Alt+C,Alt+P}.
By default, \QC copies the URL of the snippet to the clipboard and displays
the URL in the \gui Output pane.
the URL in the \gui {General Messages} output pane.
To paste any content that you copied to the clipboard, select \gui Tools >
\gui {Code Pasting} > \gui {Paste Clipboard}.
To fetch a snippet of code from the server, select \gui{Tools} >
\gui{Code Pasting} > \gui{Fetch Snippet} or press \key{Alt+C,Alt+F}.
\gui{Code Pasting} > \gui{Fetch Snippet} or press \key{Alt+C,Alt+F}. Select
the snippet to fetch from the list.
To fetch content from a URL on a CodePaster service, select \gui{Tools} >
\gui{Code Pasting} > \gui{Fetch from URL}. The content is opened in the code
editor.
\note To use \gui{Pastebin.Com}, configure the domain
prefix in \gui{Tools} > \gui{Options} > \gui{Code Pasting} >
\gui{Pastebin.com}.
To fetch the content stored at an URL, select \gui Tools >
\gui {Code Pasting} > \gui {Fetch from URL}.
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
@@ -1255,8 +1278,7 @@
\gui {Regular Expressions}.
Regular expressions used in \QC are modeled on Perl regular
expressions. For more information on using regular expressions, see
\l{http://qt-project.org/doc/qt-5.0/qtcore/qregexp.html#details}
{Detailed Description} in the QRegExp Class Reference.
the documentation for the QRegExp Class.
\endlist
+3 -7
View File
@@ -85,9 +85,9 @@
\gui iOS, and deselect the
\gui {Ask about devices not in developer mode} check box.
\li Select \gui {Qt Creator} > \gui {About Plugins} >
\gui {Device Support} > \gui iOS to enable the iOS plugin.
Restart \QC to be able to use the plugin.
\note If \QC does not detect the devices, the iOS plugin might not be
enabled. Select \gui {Qt Creator} > \gui {About Plugins} >
\gui {Device Support} > \gui iOS and restart \QC.
\li To specify build settings:
@@ -101,10 +101,6 @@
\image qtcreator-ios-add-kit.png "Build & Run Settings"
\li Check that the \gui {iOS build} field contains the build
commands for an Xcode build. To add an Xcode build step, select
\gui {Add Build Step} > \gui xcodebuild.
\endlist
\li Select \gui Run to specify run settings.
@@ -128,14 +128,6 @@
installed on your computer to create and run this type of
projects
\li Qt Quick 2 UI with Controls
Uses a single QML file that contains the main view and that
imports the Qt Quick Controls. You can view the UI in the QML
Scene and you need not build it. This project requires that
you have installed the Qt Quick Controls for your Qt version
(5.1 or later)
\endlist
\li Libraries
+4 -3
View File
@@ -117,8 +117,9 @@
\li In the \gui Id field, enter \e page, to be able to reference the
rectangle from other places.
\li In the \gui Colors group, \gui Rectangle field, set the color to
#343434.
\li In the \gui Color field, set the color to #343434.
\li In the code editor, delete the \c {Qt.quit();} command.
\endlist
@@ -147,7 +148,7 @@
\li In the \gui Size field, set \gui W and \gui H to 64, for the
rectangle size to match the image size.
\li In the \gui Colors group, \gui Rectangle field, click the
\li In the \gui Color field, click the
\inlineimage qmldesigner-transparent-button.png
(\gui Transparent) button to make the rectangle transparent.
+7 -10
View File
@@ -70,7 +70,7 @@
\li In the \gui Text field, type \b Button.
You can select the text color in the \gui Color section and the
You can select the text color in the \gui {Text color} field and the
font, size, and style in the
\gui Font section.
@@ -166,18 +166,18 @@
\li Click \gui {Design} to edit the file in the visual editor.
\li Drag and drop two \gui {Border Image} items from the \gui Library pane
to the scene.
to the canvas.
\li Drag and drop a \gui Text item to the scene.
\li Drag and drop a \gui Text item to the canvas.
\li Drag and drop a \gui {Mouse Area} to the screen.
\li Drag and drop a \gui {Mouse Area} to the canvas.
\li In the \gui Navigator pane, select \gui border_image1 to specify
settings for it in the \gui Properties pane:
\list a
\li Select \gui {Set Expression} in the menu next to the
\li Select \gui {Set Binding} in the menu next to the
\gui Visibility check box.
\li Enter the following expression to specify that the image is
@@ -219,13 +219,10 @@
\li In the \gui Color field, use the color picker to select
the font color, or enter a value in the field.
\li In the \gui Text field, select \gui {Set Expression} and
\li In the \gui Text field, select \gui {Set Binding} and
enter a pointer to the \c {text} property that you specified
earlier: \c {parent.txt}.
\li Select the \gui Smooth check box to enable smooth text
rendering.
\li In the \gui Size field, select \gui {Pixels} to specify the font
size in pixels. By default, the size is specified in points.
@@ -242,7 +239,7 @@
\li Click \gui Advanced to specify scaling for the text in the
\gui Scale field.
\li Select \gui {Set Expression} and enter the following expression:
\li Select \gui {Set Binding} and enter the following expression:
\c {if (!mousearea1.pressed) { 1 } else { 0.95 }}.
\note You can enter long and complicated expressions also in the
+6 -2
View File
@@ -68,8 +68,10 @@
\li \l{http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-textinput.html}{Text Input}
adds a single line of editable plain text that can be validated.
\omit
\li \l{http://qt-project.org/doc/qt-5.0/qtwebkit/qml-qtwebkit3-webview.html}{Web View}
adds web content to a canvas.
\endomit
\endlist
@@ -92,8 +94,10 @@
\list 1
\li Select \gui {File > New File or Project > Files and Classes > QML
> Choose} to create a new .qml file.
\li Select \gui File > \gui {New File or Project} >
\gui {Files and Classes} > \gui Qt > \gui {QML File (Qt Quick 1)} or
\gui {QML File (Qt Quick 2)} > \gui Choose to create a new .qml
file.
\note Components are listed in the \gui {QML Components} section of
the \gui Library pane only if the filename begins with a capital
+26 -28
View File
@@ -51,10 +51,6 @@
need to have the development environment installed on your
computer to create and run this type of project.
\gui {Qt Quick 2 UI with Controls} imports the Qt Quick Controls.
This project requires that you have installed the Qt Quick Controls
for your Qt version (5.1 or later).
\li \gui {Qt Quick Extension Plugins} (in the \gui Libraries category)
create C++ plugins that make it possible to offer extensions that
can be loaded dynamically into Qt Quick applications. Select
@@ -66,10 +62,30 @@
\section1 Creating Qt Quick UI Projects
Select \gui File > \gui {New File or Project} > \gui Applications >
\gui {Qt Quick 1 UI}, \gui {Qt Quick 2 UI}, or
\gui {Qt Quick 2 UI with Controls} > \gui Choose and follow the instructions
of the wizard.
\list 1
\li Select \gui File > \gui {New File or Project} > \gui Applications >
\gui {Qt Quick UI} > \gui Choose.
\li In the \gui {Qt Quick component set} field, select the component set
to use for the project. The Qt Quick imports enable you to create
cross-platform applications with a custom look and feel, whereas the
Qt Quick Controls provide the look and feel for a particular
platform:
\list
\li Select \gui {Qt Quick Controls 1.0} or \gui {Qt Quick 2.0} to
develop for platforms that run Qt 5.
\li Select \gui {Qt Quick 1.1} to develop for platforms that run
Qt 4.7.4. To develop for platforms that run Qt 4.7.1, 4.7.2, or
4.7.3, you must change the import statement to import Qt Quick
1.0.
\endlist
\endlist
\QC creates the following files:
@@ -84,10 +100,6 @@
\endlist
The \c import statement in the beginning of the .qml file specifies the Qt modules to
\l{http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-imports.html}{import}. Each Qt module
contains a set of default QML types. Specify a version to get the features you want.
To use JavaScript and image files in the application, copy them to the
project folder.
@@ -99,22 +111,8 @@
\gui {Qt Quick Application} > \gui Choose.
\li In the \gui {Qt Quick component set} field, select the component set
to use for the project. The Qt Quick imports enable you to create
cross-platform applications with a custom look and feel, whereas the
Qt Quick Controls provide the look and feel for a particular
platform:
\list 1
\li Select \gui {Qt Quick Controls 1.0} or \gui {Qt Quick 2.0} to
develop for platforms that run Qt 5.
\li Select \gui {Qt Quick 1.1} to develop for platforms that run
Qt 4.7.4. To develop for platforms that run Qt 4.7.1, 4.7.2, or
4.7.3, you must change the import statement to import Qt Quick
1.0.
\endlist
to use for the project. For more information, see
\l{Creating Qt Quick UI Projects}.
\li Select \l{glossary-buildandrun-kit}{kits} for running and building
your project, and then click \gui{Next}.
+16 -110
View File
@@ -32,16 +32,6 @@
You can edit .qml files in the \QMLD visual editor or in the code editor.
\note In \QC 2.7, \QMLD supports both Qt Quick 1 and Qt Quick 2. However,
the \QC packages that are not delivered with Qt 5 are still built with
Qt 4.8, and therefore do not contain qml2puppet, which is the external
process that is responsible for rendering Qt Quick 2. To develop Qt Quick 2
applications using \QMLD, download the Qt 5.0.1 packages and build
qml2puppet yourself. The sources for qml2puppet are located in
\c{qt-creator\share\qtcreator\qml\qmlpuppet\qml2puppet}. The qml2puppet is
installed to \c{qtbase\bin}. If you then configure Qt 5.0.1 for your
project, \QMLD picks up the qml2puppet and supports Qt Quick 2.0.
In \gui Projects, double-click a .qml file to open it in the code editor.
Then select the \gui {Design} mode to edit the file in the visual editor.
@@ -146,28 +136,22 @@
\section1 QML Type Library
The \gui {Library} pane contains two tabs: \gui {QML Types} and \gui {Resources}.
The \gui {Library} pane enables you to select QML types, UI components, and
resources, as well as to manage imports.
The \gui {QML Types} pane displays the QML types grouped by category: your own QML
components, basic types, positioner types, and views.
components, basic types, layouts, positioner types, and views.
Sets of UI components with the look and feel of a particular mobile device
platform have been defined for Qt Quick 1. Since Qt 5.1, a set of Qt Quick
Controls is available for creating classic desktop-style user interfaces
using Qt Quick 2.1. The Qt Quick Components and Controls are based on
standard QML types. To view the components and controls in the
\gui {Library} pane, add import
statements to the QML file in the \gui Edit mode. For example:
\gui {Library} pane, import the component sets in the \gui Imports pane.
\list
\li \c {import com.nokia.meego 1.0} for MeeGo
\li \c {import QtQuick.Controls 1.0} for Qt Quick Controls
\endlist
The \gui {Qt Quick Application} wizards for a particular platform, such as
MeeGo Harmattan, and the \gui {Qt Quick 2 UI with Controls} wizard add the
import statements automatically.
The \gui {Qt Quick Application} wizards for a particular platform add the
import statements automatically. You can remove import statements in the
\gui Imports pane.
\image qmldesigner-qml-components.png "QML Components pane"
@@ -245,29 +229,6 @@
\li The type is explicitly set to hidden.
\endtable
\section2 Setting Expressions
\l{http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-propertybinding.html}
{Property binding} is a
declarative way of specifying the value of a property.
Binding allows a property value to be expressed as an JavaScript expression
that defines the value relative to other property values or data accessible
in the application. The property value is automatically kept up to date if
the other properties or data values change.
Property bindings are created implicitly in QML whenever a property is
assigned a JavaScript expression. To set JavaScript expressions as values of
properties in \QMLD, click the circle icon next to a property to open a
context menu, and select \gui {Set Expression}.
\image qmldesigner-set-expression.png "Type properties context menu"
To remove expressions, select \gui Reset in the context menu.
For more information on the JavaScript environment provided by QML, see
\l{http://qt-project.org/doc/qt-5.0/qtqml/qtqml-javascript-topic.html}
{Integrating QML and JavaScript}.
\section2 Marking Text Items for Translation
To support translators, mark each text item that should be translated.
@@ -366,59 +327,6 @@
}
\endqml
\section2 Setting Anchors and Margins
In addition to arranging QML types in a grid, row, or column, you can use
\l{http://qt-project.org/doc/qt-5.0/qtquick/qtquick-positioning-anchors.html}{anchors}
to lay out screens. In an anchor-based layout, each QML type can be thought of as having a
set of invisible \e anchor lines: top, bottom, left, right, fill, horizontal
center, vertical center, and baseline.
In the \gui Layout pane you can set anchors and margins for items. To set
the anchors of an item, click the anchor buttons. You can combine the
top/bottom, left/right, and horizontal/vertical anchors to anchor items in
the corners of the parent item or center them horizontally or vertically
within the parent item.
\image qmldesigner-anchor-buttons.png "Anchor buttons"
Specifying the baseline anchor in Qt Quick Designer is
not supported. You can specify it using the code editor.
For performance reasons, you can only anchor an item to its siblings and
direct parent. By default, an item is anchored to its parent when you
use the anchor buttons. Select a sibling of the item in the \gui Target
field to anchor to it, instead.
Arbitrary anchoring is not supported. For example, you cannot specify:
\c {anchor.left: parent.right}. You have to specify: \c {anchor.left: parent.left}.
When you use the anchor buttons, anchors to the parent item are always
specified to the same side. However, anchors to sibling items are specified
to the opposite side: \c {anchor.left: sibling.right}. This allows you to keep
sibling items together.
In the following image, \gui{Rectangle 2} is anchored to \gui{Rectangle 1}
on its left and to the bottom of its parent.
\image qmldesigner-anchors.png "Anchoring sibling items"
The anchors for \gui{Rectangle 2} are specified as follows in code:
\qml
Rectangle {
id: rectangle2
anchors.left: rectangle1.right
anchors.leftMargin: 15
anchors.bottom: parent.bottom
anchors.bottomMargin: 15
//
}
\endqml
Margins specify the amount of empty space to leave to the outside of an item.
Margins only have meaning for anchors. They do not take any effect when using
other layouts or absolute positioning.
\section2 Building Transformations on Items
The \gui Advanced pane allows you to configure advanced transformations,
@@ -487,12 +395,9 @@
For more information on adding animation, see \l{Animating Screens}.
\section1 Aligning and Positioning QML Types
\section1 Working with QML Types on Canvas
The position of an item on the canvas can be either absolute or relative
to other items. In the item properties, you can set the x and y
coordinates of an item, or \l{Setting Anchors and Margins}{anchor} it to
its parent and sibling items.
You design applications on the canvas by placing items on it.
\section2 Snapping to Parent and Sibling Items
@@ -517,7 +422,7 @@
\section2 Hiding Item Boundaries
Qt Quick Designer displays the boundaries of items on the canvas. To hide
\QMLD displays the boundaries of items on the canvas. To hide
the boundaries, click the
\inlineimage qmldesigner-show-bounding-rectangles-button.png
button.
@@ -549,13 +454,13 @@
\image qmldesigner-preview-size.png "Canvas width and height"
\section1 Specifying Canvas Size
\section2 Specifying Canvas Size
To change the canvas size, select \gui {Tools > Options > Qt Quick
> Qt Quick Designer} and
specify the canvas width and height in the \gui Canvas group.
\section1 Refreshing the Canvas
\section2 Refreshing the Canvas
When you open QML files in \QMLD, the items in the file are drawn on
the canvas. When you edit the item properties in \QMLD, the QML file and
@@ -563,7 +468,8 @@
the position of an item within a column or a row, the new position might
not be displayed correctly on the canvas.
To refresh the image on the canvas, press \key R or select the \gui {Reset
View} button on the canvas toolbar.
To refresh the image on the canvas, press \key R or select
\inlineimage qmldesigner-reset-view.png
(\gui {Reset View}).
*/
+226 -2
View File
@@ -87,7 +87,117 @@
\section1 Positioning Items on Screens
You can use the following QML types to arrange items on screens:
The position of an item on the canvas can be either absolute or relative
to other items. If you are designing a static user interface,
\l{http://dev.qt-project.org/doc/qt-5.0/qtquick-positioning-topic.html#manual-positioning}
{manual positioning} provides the most efficient form of positioning items
on the screen. For a dynamic user interface, you can employ the following
positioning methods provided by Qt Quick:
\list
\li \l{Setting Bindings}
\li \l{Setting Anchors and Margins}
\li \l{Using Positioners}
\li \l{Using Layouts}
\li \l{Using Split Views}
\endlist
\section2 Setting Bindings
\l{http://qt-project.org/doc/qt-5.0/qtquick-positioning-topic.html#positioning-with-bindings}
{Property binding} is a declarative way of specifying the value of a property.
Binding allows a property value to be expressed as an JavaScript expression
that defines the value relative to other property values or data accessible
in the application. The property value is automatically kept up to date if
the other properties or data values change.
Property bindings are created implicitly in QML whenever a property is
assigned a JavaScript expression. To set JavaScript expressions as values of
properties in \QMLD, click the circle icon next to a property to open a
context menu, and select \gui {Set Binding}.
\image qmldesigner-set-expression.png "Type properties context menu"
To remove bindings, select \gui Reset in the context menu.
For more information on the JavaScript environment provided by QML, see
\l{http://qt-project.org/doc/qt-5.0/qtqml/qtqml-javascript-topic.html}
{Integrating QML and JavaScript}.
\QMLD cannot show bindings and using them might have a negative impact on
performance, so consider setting anchors and margins for items, instead.
For example, instead of setting \c {parent.width} for an item, you could
anchor the item to its sibling items on the left and the right.
\section2 Setting Anchors and Margins
In an
\l{http://qt-project.org/doc/qt-5.0/qtquick-positioning-anchors.html}
{anchor-based} layout, each QML type can be thought of as having a set of
invisible \e anchor lines: top, bottom, left, right, fill, horizontal
center, vertical center, and baseline.
In the \gui Layout pane you can set anchors and margins for items. To set
the anchors of an item, click the anchor buttons. You can combine the
top/bottom, left/right, and horizontal/vertical anchors to anchor items in
the corners of the parent item or center them horizontally or vertically
within the parent item.
\image qmldesigner-anchor-buttons.png "Anchor buttons"
Specifying the baseline anchor in \QMLD is not supported. You can specify it
using the code editor.
For performance reasons, you can only anchor an item to its siblings and
direct parent. By default, an item is anchored to its parent when you
use the anchor buttons. Select a sibling of the item in the \gui Target
field to anchor to it, instead.
Arbitrary anchoring is not supported. For example, you cannot specify:
\c {anchor.left: parent.right}. You have to specify: \c {anchor.left: parent.left}.
When you use the anchor buttons, anchors to the parent item are always
specified to the same side. However, anchors to sibling items are specified
to the opposite side: \c {anchor.left: sibling.right}. This allows you to keep
sibling items together.
In the following image, \gui{Rectangle 2} is anchored to \gui{Rectangle 1}
on its left and to the bottom of its parent.
\image qmldesigner-anchors.png "Anchoring sibling items"
The anchors for \gui{Rectangle 2} are specified as follows in code:
\qml
Rectangle {
id: rectangle2
anchors.left: rectangle1.right
anchors.leftMargin: 15
anchors.bottom: parent.bottom
anchors.bottomMargin: 15
//
}
\endqml
Margins specify the amount of empty space to leave to the outside of an item.
Margins only have meaning for anchors. They do not take any effect when using
other layouts or absolute positioning.
\section2 Using Positioners
\l{http://qt-project.org/doc/qt-5.0/qtquick-positioning-layouts.html}
{Positioner items} are container items that manage the positions of items in
a declarative user interface. Positioners behave in a similar way to the
layout managers used with standard Qt widgets, except that they are also
containers in their own right.
You can use the following positioners to arrange items on screens:
\list
@@ -110,6 +220,51 @@
the items on the canvas, and then select \gui Layout in the context
menu.
\section2 Using Layouts
From Qt 5.1, you can use QML types in the
\l{http://qt-project.org/doc/qt-5.1/qtquicklayouts/qtquicklayouts-index.html}
{Qt Quick Layouts module} to arrange Qt Quick items on screens. Unlike p
ositioners, they manage both the positions and sizes of items in a
declarative interface. They are well suited for resizable user interfaces.
You can use the following layout types to arrange items on screens:
\list
\li \l{http://qt-project.org/doc/qt-5.0/qml-qtquick-layouts-layout.html}
{Layout} provides attached properties for items pushed onto a
\gui {Column Layout}, \gui {Row Layout}, or \gui {Grid Layout}.
\li \l{http://qt-project.org/doc/qt-5.0/qml-qtquick-layouts-columnlayout.html}
{Column Layout} provides a grid layout with only one column.
\li \l{http://qt-project.org/doc/qt-5.0/qml-qtquick-layouts-rowlayout.html}
{Row Layout} provides a grid layout with only one row.
\li \l{http://qt-project.org/doc/qt-5.0/qml-qtquick-layouts-gridlayout.html}
{Grid Layout} provides a way of dynamically arranging items in a
grid.
\endlist
To lay out several items in a \gui {Column Layout}, \gui {Row Layout}, or
\gui {Grid Layout}, select the items on the canvas, and then select
\gui Layout in the context menu.
To make an item within a layout as wide as possible while respecting the
given constraints, select the item on the canvas and then select
\gui Layout > \gui {Fill Width} in the context menu. To make the item as
high as possible, select \gui {Fill Height}.
\section2 Using Split Views
From Qt 5.1, you can use the
\l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-splitview.html}
{Split View} Qt Quick Control to arrange items horizontally or vertically
with a draggable splitter between each item.
\section1 Using States
Use states and transitions to navigate between screens.
@@ -202,7 +357,8 @@
\section1 Adding User Interaction Methods
You can add the following basic interaction methods to scenes:
You can use the following QML types to add basic interaction methods to
screens:
\list
@@ -222,6 +378,74 @@
\endlist
From Qt 5.1, you can also use the following
\l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html}
{Qt Quick Controls} to present or receive input from the user:
\list
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-button.html}
{Button} provides a push button that you can associate with an
action.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-checkbox.html}
{Check Box} provides an option button that can be toggled on
(checked) or off (unchecked).
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-combobox.html}
{Combo Box} provides a drop-down list. Add items to the combo box by
assigning it a ListModel, or a list of strings to the model
property.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-groupbox.html}
{Group Box} provides a frame, a title on top, and place for various
other controls inside the frame.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-label.html}
{Label} provides a text label that follows the font and color scheme
of the system.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-progressbar.html}
{Progress Bar} indicates the progress of an operation.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-radiobutton.html}
{Radio Button} provides an option button that can be switched on
(checked) or off (unchecked).
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-slider.html}
{Slider (Horizontal) and Slider (Vertical)} enable the user to move
a slider handle along a horizontal or vertical groove and translate
the handle's position into a value within the specified range.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-spinbox.html}
{Spin Box} enables the user to specify a value by clicking the up or
down buttons, by pressing up or down on the keyboard, or by entering
a value in the box.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-statusbar.html}
{Status Bar} contains status information in your application. It
does not provide a layout of its own, but requires you to position
its contents, for instance by creating a \gui {Row Layout}.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-textarea.html}
{Text Area} displays multiple lines of editable formatted text.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-textfield.html}
{Text Field} displays a single line of editable plain text.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-toolbar.html}
{Tool Bar} provides styling for ToolButton as well as other controls
that it can contain. However, it does not provide a layout of its
own, but requires you to position its contents, for instance by
creating a \gui {Row Layout}.
\li \l{http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-toolbutton.html}
{Tool Button} provides a button that is functionally similar to
\gui Button, but that looks more suitable on a \gui {Tool Bar}.
\endlist
\section1 Implementing Application Logic
A user interface is only a part of an application, and not really useful by itself.
+1 -1
View File
@@ -53,7 +53,7 @@ def qdump__Debugger__Internal__WatchItem(d, value):
d.putPlainChildren(value)
def qdump__Debugger__Internal__BreakpointModelId(d, value):
d.putValue("%s.%s" % (value["m_majorPart"], value["m_minorPart"]))
d.putValue("%s.%s" % (int(value["m_majorPart"]), int(value["m_minorPart"])))
d.putPlainChildren(value)
def qdump__CPlusPlus__ByteArrayRef(d, value):
+218
View File
@@ -473,6 +473,31 @@ class DumperBase:
else:
self.putValue('<%s items>' % count)
def putField(self, name, value):
self.put('%s="%s",' % (name, value))
def putType(self, type, priority = 0):
# Higher priority values override lower ones.
if priority >= self.currentTypePriority:
self.currentType = str(type)
self.currentTypePriority = priority
def putValue(self, value, encoding = None, priority = 0):
# Higher priority values override lower ones.
if priority >= self.currentValuePriority:
self.currentValue = value
self.currentValuePriority = priority
self.currentValueEncoding = encoding
def putEmptyValue(self, priority = -10):
if priority >= self.currentValuePriority:
self.currentValue = ""
self.currentValuePriority = priority
self.currentValueEncoding = None
def putName(self, name):
self.put('name="%s",' % name)
def putNoType(self):
# FIXME: replace with something that does not need special handling
# in SubItem.__exit__().
@@ -483,6 +508,199 @@ class DumperBase:
self.putNumChild(0)
self.currentValue = None
def putNamedSubItem(self, component, value, name):
with SubItem(self, component):
self.putName(name)
self.putItem(value)
def isExpanded(self):
#warn("IS EXPANDED: %s in %s: %s" % (self.currentIName,
# self.expandedINames, self.currentIName in self.expandedINames))
return self.currentIName in self.expandedINames
def putPlainChildren(self, value):
self.putEmptyValue(-99)
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
self.putFields(value)
def putCStyleArray(self, value):
type = value.type.unqualified()
targetType = value[0].type
#self.putAddress(value.address)
self.putType(type)
self.putNumChild(1)
format = self.currentItemFormat()
isDefault = format == None and str(targetType.unqualified()) == "char"
if isDefault or format == 0 or format == 1 or format == 2:
blob = self.readMemory(self.addressOf(value), type.sizeof)
if isDefault:
# Use Latin1 as default for char [].
self.putValue(blob, Hex2EncodedLatin1)
elif format == 0:
# Explicitly requested Latin1 formatting.
self.putValue(blob, Hex2EncodedLatin1)
elif format == 1:
# Explicitly requested UTF-8 formatting.
self.putValue(blob, Hex2EncodedUtf8)
elif format == 2:
# Explicitly requested Local 8-bit formatting.
self.putValue(blob, Hex2EncodedLocal8Bit)
else:
self.putValue("@0x%x" % self.pointerValue(value.cast(targetType.pointer())))
if self.currentIName in self.expandedINames:
p = self.addressOf(value)
ts = targetType.sizeof
if not self.tryPutArrayContents(targetType, p, int(type.sizeof / ts)):
with Children(self, childType=targetType,
addrBase=p, addrStep=ts):
self.putFields(value)
def putFormattedPointer(self, value):
#warn("POINTER: %s" % value)
if self.isNull(value):
#warn("NULL POINTER")
self.putType(value.type)
self.putValue("0x0")
self.putNumChild(0)
return True
typeName = str(value.type)
innerType = value.type.target().unqualified()
innerTypeName = str(innerType)
try:
value.dereference()
except:
# Failure to dereference a pointer should at least
# show the value of a pointer.
self.putValue(cleanAddress(value))
self.putType(typeName)
self.putNumChild(0)
return True
format = self.currentItemFormat(value.type)
if innerTypeName == "void":
#warn("VOID POINTER: %s" % format)
self.putType(typeName)
self.putValue(str(value))
self.putNumChild(0)
return True
if format == None and innerTypeName == "char":
# Use Latin1 as default for char *.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return True
if format == 0:
# Explicitly requested bald pointer.
self.putType(typeName)
self.putPointerValue(value)
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
with SubItem(self, '*'):
self.putItem(value.dereference())
return True
if format == 1:
# Explicitly requested Latin1 formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return True
if format == 2:
# Explicitly requested UTF-8 formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedUtf8)
self.putNumChild(0)
return True
if format == 3:
# Explicitly requested local 8 bit formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLocal8Bit)
self.putNumChild(0)
return True
if format == 4:
# Explicitly requested UTF-16 formatting.
self.putType(typeName)
self.putValue(self.encodeChar2Array(value), Hex4EncodedLittleEndian)
self.putNumChild(0)
return True
if format == 5:
# Explicitly requested UCS-4 formatting.
self.putType(typeName)
self.putValue(self.encodeChar4Array(value), Hex8EncodedLittleEndian)
self.putNumChild(0)
return True
if format == 6:
# Explicitly requested formatting as array of 10 items.
self.putType(typeName)
self.putItemCount(10)
self.putNumChild(10)
self.putArrayData(innerType, value, 10)
return True
if format == 7:
# Explicitly requested formatting as array of 1000 items.
self.putType(typeName)
self.putItemCount(1000)
self.putNumChild(1000)
self.putArrayData(innerType, value, 1000)
return True
if self.isFunctionType(innerType):
# A function pointer.
val = str(value)
pos = val.find(" = ") # LLDB only, but...
if pos > 0:
val = val[pos + 3:]
self.putValue(val)
self.putType(innerTypeName)
self.putNumChild(0)
return
#warn("AUTODEREF: %s" % self.autoDerefPointers)
#warn("INAME: %s" % self.currentIName)
if self.autoDerefPointers or self.currentIName.endswith('.this'):
## Generic pointer type with format None
#warn("GENERIC AUTODEREF POINTER: %s AT %s TO %s"
# % (type, value.address, innerTypeName))
# Never dereference char types.
if innerTypeName != "char" \
and innerTypeName != "signed char" \
and innerTypeName != "unsigned char" \
and innerTypeName != "wchar_t":
self.putType(innerTypeName)
savedCurrentChildType = self.currentChildType
self.currentChildType = stripClassTag(innerTypeName)
self.putItem(value.dereference())
self.currentChildType = savedCurrentChildType
#self.putPointerValue(value)
self.put('origaddr="%s",' % value.address)
return True
#warn("GENERIC PLAIN POINTER: %s" % value.type)
#warn("ADDR PLAIN POINTER: %s" % value.address)
self.putType(typeName)
self.putValue("0x%x" % self.pointerValue(value))
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
with SubItem(self, "*"):
self.putItem(value.dereference())
def putQObjectNameValue(self, value):
try:
intSize = self.intSize()
+5 -177
View File
@@ -982,9 +982,6 @@ class Dumper(DumperBase):
def put(self, value):
self.output.append(value)
def putField(self, name, value):
self.put('%s="%s",' % (name, value))
def childRange(self):
if self.currentMaxNumChild is None:
return xrange(0, toInteger(self.currentNumChild))
@@ -1030,12 +1027,6 @@ class Dumper(DumperBase):
self.isQt3Support = lambda: self.cachedIsQt3Suport
return self.cachedIsQt3Suport
def putType(self, type, priority = 0):
# Higher priority values override lower ones.
if priority >= self.currentTypePriority:
self.currentType = str(type)
self.currentTypePriority = priority
def putBetterType(self, type):
self.currentType = str(type)
self.currentTypePriority = self.currentTypePriority + 1
@@ -1054,22 +1045,9 @@ class Dumper(DumperBase):
if numchild != self.currentChildNumChild:
self.put('numchild="%s",' % numchild)
def putEmptyValue(self, priority = -10):
if priority >= self.currentValuePriority:
self.currentValue = ""
self.currentValuePriority = priority
self.currentValueEncoding = None
def putSimpleValue(self, value, encoding = None, priority = 0):
self.putValue(value, encoding, priority)
def putValue(self, value, encoding = None, priority = 0):
# Higher priority values override lower ones.
if priority >= self.currentValuePriority:
self.currentValue = value
self.currentValuePriority = priority
self.currentValueEncoding = encoding
def putPointerValue(self, value):
# Use a lower priority
if value is None:
@@ -1086,14 +1064,6 @@ class Dumper(DumperBase):
else:
self.put('editvalue="%s|%s",' % (cmd, value))
def putName(self, name):
self.put('name="%s",' % name)
def isExpanded(self):
#warn("IS EXPANDED: %s in %s: %s" % (self.currentIName,
# self.expandedINames, self.currentIName in self.expandedINames))
return self.currentIName in self.expandedINames
def isExpandedSubItem(self, component):
iname = "%s.%s" % (self.currentIName, component)
#warn("IS EXPANDED: %s in %s" % (iname, self.expandedINames))
@@ -1123,11 +1093,6 @@ class Dumper(DumperBase):
with SubItem(self, component):
self.putItem(value, tryDynamic)
def putNamedSubItem(self, component, value, name):
with SubItem(self, component):
self.putName(name)
self.putItem(value)
def isSimpleType(self, typeobj):
code = typeobj.code
return code == BoolCode \
@@ -1242,6 +1207,9 @@ class Dumper(DumperBase):
with SubItem(self, name):
self.putItem(result)
def isFunctionType(self, type):
return type.code == MethodCode or type.code == FunctionCode
def putItem(self, value, tryDynamic=True):
if value is None:
# Happens for non-available watchers in gdb versions that
@@ -1364,157 +1332,17 @@ class Dumper(DumperBase):
return
if type.code == ArrayCode:
qdump____c_style_array__(self, value)
self.putCStyleArray(value)
return
if type.code == PointerCode:
#warn("POINTER: %s" % value)
# This could still be stored in a register and
# potentially dereferencable.
if value.is_optimized_out:
self.putValue("<optimized out>")
try:
value.dereference()
except:
# Failure to dereference a pointer should at least
# show the value of a pointer.
self.putValue(cleanAddress(value))
self.putType(typeName)
self.putNumChild(0)
return
if self.isNull(value):
#warn("NULL POINTER")
self.putType(typeName)
self.putValue("0x0")
self.putNumChild(0)
return
innerType = type.target()
innerTypeName = str(innerType.unqualified())
format = self.currentItemFormat(type)
if innerType.code == VoidCode:
#warn("VOID POINTER: %s" % format)
self.putType(typeName)
self.putValue(str(value))
self.putNumChild(0)
return
if format == None and innerTypeName == "char":
# Use Latin1 as default for char *.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return
if format == 0:
# Explicitly requested bald pointer.
self.putType(typeName)
self.putPointerValue(value)
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
with SubItem(self, '*'):
self.putItem(value.dereference())
return
if format == 1:
# Explicitly requested Latin1 formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return
if format == 2:
# Explicitly requested UTF-8 formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedUtf8)
self.putNumChild(0)
return
if format == 3:
# Explicitly requested local 8 bit formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLocal8Bit)
self.putNumChild(0)
return
if format == 4:
# Explicitly requested UTF-16 formatting.
self.putType(typeName)
self.putValue(self.encodeChar2Array(value), Hex4EncodedLittleEndian)
self.putNumChild(0)
return
if format == 5:
# Explicitly requested UCS-4 formatting.
self.putType(typeName)
self.putValue(self.encodeChar4Array(value), Hex8EncodedLittleEndian)
self.putNumChild(0)
return
if format == 6:
# Explicitly requested formatting as array of 10 items.
self.putType(typeName)
self.putItemCount(10)
self.putNumChild(10)
self.putArrayData(innerType, value, 10)
return
if format == 7:
# Explicitly requested formatting as array of 1000 items.
self.putType(typeName)
self.putItemCount(1000)
self.putNumChild(1000)
self.putArrayData(innerType, value, 1000)
return
if innerType.code == MethodCode or innerType.code == FunctionCode:
# A function pointer with format None.
self.putValue(str(value))
self.putType(typeName)
self.putNumChild(0)
return
#warn("AUTODEREF: %s" % self.autoDerefPointers)
#warn("INAME: %s" % self.currentIName)
if self.autoDerefPointers or self.currentIName.endswith('.this'):
## Generic pointer type with format None
#warn("GENERIC AUTODEREF POINTER: %s AT %s TO %s"
# % (type, value.address, innerTypeName))
# Never dereference char types.
if innerTypeName != "char" \
and innerTypeName != "signed char" \
and innerTypeName != "unsigned char" \
and innerTypeName != "wchar_t":
self.putType(innerType)
savedCurrentChildType = self.currentChildType
self.currentChildType = stripClassTag(innerTypeName)
self.putItem(value.dereference())
self.currentChildType = savedCurrentChildType
#self.putPointerValue(value)
self.put('origaddr="%s",' % value.address)
return
# Fall back to plain pointer printing.
#warn("GENERIC PLAIN POINTER: %s" % value.type)
#warn("ADDR PLAIN POINTER: %s" % value.address)
self.putType(typeName)
self.putField("aaa", "1")
#self.put('addr="0x%x",' % toInteger(value.address))
#self.putAddress(value.address)
self.putField("bbb", "1")
#self.putPointerValue(value)
self.putValue("0x%x" % value.cast(self.lookupType("unsigned long")))
self.putField("ccc", "1")
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
with SubItem(self, "*"):
self.putItem(value.dereference())
self.putFormattedPointer(value)
return
if type.code == MethodPointerCode \
+66 -266
View File
@@ -134,11 +134,8 @@ def impl_SBValue__add__(self, offset):
itemsize = self.GetType().GetPointeeType().GetByteSize()
address = self.GetValueAsUnsigned() + offset * itemsize
address = address & 0xFFFFFFFFFFFFFFFF # Force unsigned
# We don't have a dumper object
#return createPointerValue(self, address, self.GetType().GetPointeeType())
addr = int(address) & 0xFFFFFFFFFFFFFFFF
return self.CreateValueFromAddress(None, addr, self.GetType().GetPointeeType()).AddressOf()
return self.CreateValueFromAddress(None, address,
self.GetType().GetPointeeType()).AddressOf()
raise RuntimeError("SBValue.__add__ not implemented: %s" % self.GetType())
return NotImplemented
@@ -203,6 +200,7 @@ lldb.SBValue.dereference = lambda self: self.Dereference()
lldb.SBValue.address = property(lambda self: self.GetAddress())
lldb.SBType.pointer = lambda self: self.GetPointerType()
lldb.SBType.target = lambda self: self.GetPointeeType()
lldb.SBType.code = lambda self: self.GetTypeClass()
lldb.SBType.sizeof = property(lambda self: self.GetByteSize())
@@ -511,9 +509,6 @@ class Dumper(DumperBase):
def put(self, stuff):
sys.stdout.write(stuff)
def putField(self, name, value):
self.put('%s="%s",' % (name, value))
def isMovableType(self, type):
if type.GetTypeClass() in (lldb.eTypeClassBuiltin, lldb.eTypeClassPointer):
return True
@@ -524,31 +519,9 @@ class Dumper(DumperBase):
#if numchild != self.currentChildNumChild:
self.put('numchild="%s",' % numchild)
def putEmptyValue(self, priority = -10):
if priority >= self.currentValuePriority:
self.currentValue = ""
self.currentValuePriority = priority
self.currentValueEncoding = None
def putSimpleValue(self, value, encoding = None, priority = 0):
self.putValue(value.GetValue(), encoding, priority)
def putValue(self, value, encoding = None, priority = 0):
# Higher priority values override lower ones.
if priority >= self.currentValuePriority:
self.currentValue = value
self.currentValuePriority = priority
self.currentValueEncoding = encoding
#self.put('value="%s",' % value)
def putName(self, name):
self.put('name="%s",' % name)
def isExpanded(self):
#warn("IS EXPANDED: %s in %s: %s" % (self.currentIName,
# self.expandedINames, self.currentIName in self.expandedINames))
return self.currentIName in self.expandedINames
def tryPutArrayContents(self, typeobj, base, n):
if not self.isSimpleType(typeobj):
return False
@@ -599,13 +572,6 @@ class Dumper(DumperBase):
return xrange(0, self.currentNumChild)
return xrange(min(self.currentMaxNumChild, self.currentNumChild))
def putPlainChildren(self, value):
self.putEmptyValue(-99)
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
self.putFields(value)
def lookupType(self, name):
#warn("LOOKUP TYPE NAME: %s" % name)
if name.endswith('*'):
@@ -668,7 +634,8 @@ class Dumper(DumperBase):
launchInfo.SetEnvironmentEntries(environmentList, False)
self.process = self.target.Launch(launchInfo, error)
if not error.Success():
self.report('state="inferiorrunfailed"')
self.reportError(error)
self.report('state="enginerunfailed"')
return
self.report('pid="%s"' % self.process.GetProcessID())
self.report('state="enginerunandinferiorrunok"')
@@ -705,6 +672,13 @@ class Dumper(DumperBase):
line = frame.line_entry.line
self.report('location={file="%s",line="%s",addr="%s"}' % (file, line, frame.pc))
def firstStoppedThread(self):
for i in xrange(0, self.process.GetNumThreads()):
thread = self.process.GetThreadAtIndex(i)
if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
return thread
return None
def reportThreads(self):
reasons = ['None', 'Trace', 'Breakpoint', 'Watchpoint', 'Signal', 'Exception',
'Exec', 'PlanComplete']
@@ -733,8 +707,7 @@ class Dumper(DumperBase):
result += '],current-thread-id="%s"},' % self.currentThread().id
self.report(result)
def firstUsableFrame(self):
thread = self.currentThread()
def firstUsableFrame(self, thread):
for i in xrange(10):
frame = thread.GetFrameAtIndex(i)
lineEntry = frame.GetLineEntry()
@@ -744,36 +717,37 @@ class Dumper(DumperBase):
return None
def reportStack(self, _ = None):
if self.process is None:
if not self.process:
self.report('msg="No process"')
return
thread = self.currentThread()
if not thread:
self.report('msg="No thread"')
return
frame = thread.GetSelectedFrame()
if frame:
frameId = frame.GetFrameID()
else:
thread = self.currentThread()
result = 'stack={current-frame="%s"' % thread.GetSelectedFrame().GetFrameID()
result += ',current-thread="%s"' % thread.GetThreadID()
result += ',frames=['
n = thread.GetNumFrames()
for i in xrange(n):
frame = thread.GetFrameAtIndex(i)
lineEntry = frame.GetLineEntry()
line = lineEntry.GetLine()
usable = line != 0
result += '{pc="0x%x"' % frame.GetPC()
result += ',level="%d"' % frame.idx
result += ',addr="0x%x"' % frame.GetPCAddress().GetLoadAddress(self.target)
result += ',func="%s"' % frame.GetFunctionName()
result += ',line="%d"' % line
result += ',fullname="%s"' % fileName(lineEntry.file)
result += ',usable="%d"' % usable
result += ',file="%s"},' % fileName(lineEntry.file)
result += '],hasmore="0"},'
self.report(result)
def putType(self, type, priority = 0):
# Higher priority values override lower ones.
if priority >= self.currentTypePriority:
self.currentType = str(type)
self.currentTypePriority = priority
#warn("TYPE: %s PRIORITY: %s" % (type, priority))
frameId = 0;
result = 'stack={current-frame="%s"' % frameId
result += ',current-thread="%s"' % thread.GetThreadID()
result += ',frames=['
n = thread.GetNumFrames()
for i in xrange(n):
frame = thread.GetFrameAtIndex(i)
lineEntry = frame.GetLineEntry()
line = lineEntry.GetLine()
usable = line != 0
result += '{pc="0x%x"' % frame.GetPC()
result += ',level="%d"' % frame.idx
result += ',addr="0x%x"' % frame.GetPCAddress().GetLoadAddress(self.target)
result += ',func="%s"' % frame.GetFunctionName()
result += ',line="%d"' % line
result += ',fullname="%s"' % fileName(lineEntry.file)
result += ',usable="%d"' % usable
result += ',file="%s"},' % fileName(lineEntry.file)
result += '],hasmore="0"},'
self.report(result)
def putBetterType(self, type):
try:
@@ -803,13 +777,6 @@ class Dumper(DumperBase):
except:
return False
def putValue(self, value, encoding = None, priority = 0):
# Higher priority values override lower ones.
if priority >= self.currentValuePriority:
self.currentValue = value
self.currentValuePriority = priority
self.currentValueEncoding = encoding
def qtNamespace(self):
# FIXME
return ""
@@ -846,6 +813,9 @@ class Dumper(DumperBase):
except:
pass
def isFunctionType(self, type):
return type.IsFunctionType()
def putItem(self, value, tryDynamic=True):
#value = value.GetDynamicValue(lldb.eDynamicCanRunTarget)
typeName = value.GetTypeName()
@@ -900,12 +870,12 @@ class Dumper(DumperBase):
# Arrays
if typeClass == lldb.eTypeClassArray:
qdump____c_style_array__(self, value)
self.putCStyleArray(value)
return
# Vectors like char __attribute__ ((vector_size (8)))
if typeClass == lldb.eTypeClassVector:
qdump____c_style_array__(self, value)
self.putCStyleArray(value)
return
# References
@@ -920,178 +890,8 @@ class Dumper(DumperBase):
# Pointers
if value.GetType().IsPointerType():
if self.isNull(value):
self.putType(typeName)
self.putValue("0x0")
self.putNumChild(0)
return
try:
value.dereference()
except:
# Failure to dereference a pointer should at least
# show the value of a pointer.
self.putValue(cleanAddress(value))
self.putType(typeName)
self.putNumChild(0)
return
type = value.GetType()
innerType = value.GetType().GetPointeeType().unqualified()
innerTypeName = str(innerType)
format = self.currentItemFormat(type)
if innerTypeName == "void":
warn("VOID POINTER: %s" % format)
self.putType(typeName)
self.putValue(str(value))
self.putNumChild(0)
return
if format == None and innerTypeName == "char":
# Use Latin1 as default for char *.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return
if format == 0:
# Explicitly requested bald pointer.
self.putType(typeName)
self.putPointerValue(value)
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
with SubItem(self, '*'):
self.putItem(value.dereference())
return
if format == 1:
# Explicitly requested Latin1 formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return
if format == 2:
# Explicitly requested UTF-8 formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedUtf8)
self.putNumChild(0)
return
if format == 3:
# Explicitly requested local 8 bit formatting.
self.putType(typeName)
self.putValue(self.encodeCharArray(value), Hex2EncodedLocal8Bit)
self.putNumChild(0)
return
if format == 4:
# Explicitly requested UTF-16 formatting.
self.putType(typeName)
self.putValue(self.encodeChar2Array(value), Hex4EncodedLittleEndian)
self.putNumChild(0)
return
if format == 5:
# Explicitly requested UCS-4 formatting.
self.putType(typeName)
self.putValue(self.encodeChar4Array(value), Hex8EncodedLittleEndian)
self.putNumChild(0)
return
if format == 6:
# Explicitly requested formatting as array of 10 items.
self.putType(typeName)
self.putItemCount(10)
self.putNumChild(10)
self.putArrayData(innerType, value, 10)
return
if format == 7:
# Explicitly requested formatting as array of 1000 items.
self.putType(typeName)
self.putItemCount(1000)
self.putNumChild(1000)
self.putArrayData(innerType, value, 1000)
return
if innerType.IsFunctionType():
# A function pointer.
val = str(value)
pos = val.find(" = ")
if pos > 0:
val = val[pos + 3:]
self.putValue(val)
self.putType(innerType)
self.putNumChild(0)
return
#warn("AUTODEREF: %s" % self.autoDerefPointers)
#warn("INAME: %s" % self.currentIName)
if self.autoDerefPointers or self.currentIName.endswith('.this'):
## Generic pointer type with format None
#warn("GENERIC AUTODEREF POINTER: %s AT %s TO %s"
# % (type, value.address, innerTypeName))
# Never dereference char types.
if innerTypeName != "char" \
and innerTypeName != "signed char" \
and innerTypeName != "unsigned char" \
and innerTypeName != "wchar_t":
self.putType(innerType)
savedCurrentChildType = self.currentChildType
self.currentChildType = stripClassTag(innerTypeName)
self.putItem(value.dereference())
self.currentChildType = savedCurrentChildType
#self.putPointerValue(value)
self.put('origaddr="%s",' % value.address)
return
# Fall back to plain pointer printing.
#warn("GENERIC PLAIN POINTER: %s" % value.type)
#warn("ADDR PLAIN POINTER: %s" % value.address)
#self.putType(typeName)
#self.putField("aaa", "1")
##self.put('addr="0x%x",' % toInteger(value.address))
##self.putAddress(value.address)
#self.putField("bbb", "1")
##self.putPointerValue(value)
#self.putValue("0x%x" % value.cast(self.lookupType("unsigned long")))
#self.putField("ccc", "1")
#self.putNumChild(1)
#if self.currentIName in self.expandedINames:
# with Children(self):
# with SubItem(self, "*"):
# self.putItem(value.dereference())
#return
#if self.autoDerefPointers:
# self.putType(innerType)
# savedCurrentChildType = self.currentChildType
# self.currentChildType = str(innerType)
# inner = value.Dereference()
# if inner.IsValid():
# self.putItem(inner)
# self.currentChildType = savedCurrentChildType
# self.put('origaddr="%s",' % value.address)
# return
#
# else:
numchild = value.GetNumChildren()
self.put('iname="%s",' % self.currentIName)
self.putType(typeName)
self.putValue('0x%x' % value.GetValueAsUnsigned())
self.put('numchild="1",')
self.put('addr="0x%x",' % value.GetLoadAddress())
if self.currentIName in self.expandedINames:
with Children(self):
child = value.Dereference()
with SubItem(self, child):
self.putItem(child)
self.putFormattedPointer(value)
return
#warn("VALUE: %s" % value)
#warn("FANCY: %s" % self.useFancy)
@@ -1169,6 +969,9 @@ class Dumper(DumperBase):
if self.dummyValue is None:
self.dummyValue = value
name = value.GetName()
if name is None:
warn("NO NAME FOR VALUE: %s" % value)
continue
if name in shadowed:
level = shadowed[name]
shadowed[name] = level + 1
@@ -1183,29 +986,25 @@ class Dumper(DumperBase):
if not self.dummyValue is None:
for watcher in self.currentWatchers:
iname = watcher['iname']
index = iname[iname.find('.') + 1:]
# could be 'watch.0' or 'tooltip.deadbead'
(base, component) = iname.split('.')
exp = binascii.unhexlify(watcher['exp'])
warn("EXP: %s" % exp)
warn("INDEX: %s" % index)
if exp == "":
self.put('type="",value="",exp=""')
continue
value = self.dummyValue.CreateValueFromExpression(iname, exp)
#value = self.dummyValue
warn("VALUE: %s" % value)
self.currentIName = 'watch'
with SubItem(self, index):
self.currentIName = base
with SubItem(self, component):
self.put('exp="%s",' % exp)
self.put('wname="%s",' % binascii.hexlify(exp))
self.put('iname="%s",' % self.currentIName)
self.put('iname="%s",' % iname)
self.putItem(value)
self.put(']')
self.report('')
def reportData(self, _ = None):
self.reportRegisters()
if self.process is None:
self.report('process="none"')
else:
@@ -1290,13 +1089,17 @@ class Dumper(DumperBase):
if type == lldb.SBProcess.eBroadcastBitStateChanged:
state = self.process.GetState()
if state == lldb.eStateStopped:
usableFrame = self.firstUsableFrame()
if usableFrame:
self.currentThread().SetSelectedFrame(usableFrame)
stoppedThread = self.firstStoppedThread()
if stoppedThread:
self.process.SetSelectedThread(stoppedThread)
usableFrame = self.firstUsableFrame(stoppedThread)
if usableFrame:
stoppedThread.SetSelectedFrame(usableFrame)
self.reportStack()
self.reportThreads()
self.reportLocation()
self.reportVariables()
self.reportRegisters()
elif type == lldb.SBProcess.eBroadcastBitInterrupt:
pass
elif type == lldb.SBProcess.eBroadcastBitSTDOUT:
@@ -1530,11 +1333,6 @@ class Dumper(DumperBase):
error = str(result.GetError())
self.report('success="%d",output="%s",error="%s"' % (success, output, error))
def setWatchers(self, args):
#self.currentWatchers = args['watchers']
#warn("WATCHERS %s" % self.currentWatchers)
self.reportData()
def updateData(self, args):
if 'expanded' in args:
self.expandedINames = set(args['expanded'].split(','))
@@ -1546,6 +1344,8 @@ class Dumper(DumperBase):
self.useFancy = int(args['fancy'])
if 'passexceptions' in args:
self.passExceptions = int(args['passexceptions'])
if 'watchers' in args:
self.currentWatchers = args['watchers']
self.reportVariables(args)
def disassemble(self, args):
-35
View File
@@ -29,41 +29,6 @@
from dumper import *
def qdump____c_style_array__(d, value):
type = value.type.unqualified()
targetType = value[0].type
#d.putAddress(value.address)
d.putType(type)
d.putNumChild(1)
format = d.currentItemFormat()
isDefault = format == None and str(targetType.unqualified()) == "char"
if isDefault or format == 0 or format == 1 or format == 2:
blob = d.readMemory(d.addressOf(value), type.sizeof)
if isDefault:
# Use Latin1 as default for char [].
d.putValue(blob, Hex2EncodedLatin1)
elif format == 0:
# Explicitly requested Latin1 formatting.
d.putValue(blob, Hex2EncodedLatin1)
elif format == 1:
# Explicitly requested UTF-8 formatting.
d.putValue(blob, Hex2EncodedUtf8)
elif format == 2:
# Explicitly requested Local 8-bit formatting.
d.putValue(blob, Hex2EncodedLocal8Bit)
else:
d.putValue("@0x%x" % d.pointerValue(value.cast(targetType.pointer())))
if d.currentIName in d.expandedINames:
p = d.addressOf(value)
ts = targetType.sizeof
if not d.tryPutArrayContents(targetType, p, int(type.sizeof / ts)):
with Children(d, childType=targetType,
addrBase=p, addrStep=ts):
d.putFields(value)
def qdump__std__array(d, value):
size = d.numericTemplateArgument(value.type, 1)
d.putItemCount(size)
+1 -1
View File
@@ -72,7 +72,7 @@ template <class T>
if (optVerbose) {
for (unsigned int i = 0; i < sizeof(T); i++) {
unsigned int b = mem[i];
printf("%2d %2x %3d\n", i, b, b);
printf("%2u %2x %3u\n", i, b, b);
}
fflush(stdout);
}
@@ -73,7 +73,7 @@ QDataStream &operator>>(QDataStream &in, DebugOutputCommand &command)
bool operator ==(const DebugOutputCommand &first, const DebugOutputCommand &second)
{
return first.m_type == second.m_type
&& second.m_text == second.m_text;
&& first.m_text == second.m_text;
}
QDebug operator <<(QDebug debug, const DebugOutputCommand &command)
@@ -85,7 +85,7 @@ QDataStream &operator>>(QDataStream &in, TokenCommand &command)
bool operator ==(const TokenCommand &first, const TokenCommand &second)
{
return first.m_tokenNumber == second.m_tokenNumber
return first.m_tokenName == second.m_tokenName
&& first.m_tokenNumber == second.m_tokenNumber
&& first.m_instanceIdVector == second.m_instanceIdVector;
}
@@ -1050,14 +1050,20 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
QObject *object = 0;
QQmlType *type = getQmlType(typeName, majorNumber, minorNumber);
if (type && !type->isComposite()) {
if (type
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
&& !type->isComposite()
#endif
) {
if (type->typeName() == "QQmlComponent") {
object = new QQmlComponent(context->engine(), 0);
} else {
object = type->create();
}
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
} else if (type->isComposite()) {
object = createComponent(type->sourceUrl(), context);
#endif
} else {
qWarning() << "QuickDesigner: Cannot create an object of type"
<< QString("%1 %2,%3").arg(typeName).arg(majorNumber).arg(minorNumber)
@@ -108,6 +108,24 @@ bool Qt5InformationNodeInstanceServer::isDirtyRecursiveForNonInstanceItems(QQuic
return false;
}
bool Qt5InformationNodeInstanceServer::isDirtyRecursiveForParentInstances(QQuickItem *item) const
{
if (DesignerSupport::isDirty(item, DesignerSupport::TransformUpdateMask))
return true;
QQuickItem *parentItem = item->parentItem();
if (parentItem) {
if (hasInstanceForObject(parentItem) && DesignerSupport::isDirty(parentItem, DesignerSupport::TransformUpdateMask))
return true;
return isDirtyRecursiveForParentInstances(parentItem);
}
return false;
}
void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
{
static bool inFunction = false;
@@ -126,7 +144,8 @@ void Qt5InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
if (isDirtyRecursiveForNonInstanceItems(item))
informationChangedInstanceSet.insert(instance);
else if (isDirtyRecursiveForParentInstances(item))
informationChangedInstanceSet.insert(instance);
if (DesignerSupport::isDirty(item, DesignerSupport::ParentChanged)) {
m_parentChangedSet.insert(instance);
@@ -53,6 +53,7 @@ protected:
void sendChildrenChangedCommand(const QList<ServerNodeInstance> childList);
void sendTokenBack();
bool isDirtyRecursiveForNonInstanceItems(QQuickItem *item) const;
bool isDirtyRecursiveForParentInstances(QQuickItem *item) const;
private:
QSet<ServerNodeInstance> m_parentChangedSet;
@@ -43,7 +43,8 @@ namespace Internal {
GraphicsObjectNodeInstance::GraphicsObjectNodeInstance(QGraphicsObject *graphicsObject)
: ObjectNodeInstance(graphicsObject),
m_isMovable(true)
m_hasContent(true),
m_isMovable(true)
{
QGraphicsItemPrivate::get(graphicsObject)->sendParentChangeNotification = 1;
}
@@ -62,7 +62,11 @@ Item {
colorButton.alpha = myAlpha
}
property bool block: false
function invalidateColor() {
if (block)
return;
colorButton.color = Qt.hsla(hue, saturation, lightness, alpha);
hueSlider.value = hue
hueSlider2.value = hue
@@ -95,11 +99,16 @@ Item {
h /= 6
}
block = true
if (s > 0)
colorButton.hue = h
colorButton.saturation = s
colorButton.lightness = l
block = false
invalidateColor()
}
Image {
@@ -122,6 +122,7 @@ Column {
LineEdit {
id: textField
inputMask: "\\#HHHHHHhh"
showTranslateCheckBox: false
backendValue: colorEditor.backendendValue
@@ -38,6 +38,7 @@ SpinBoxStyle {
textColor: spinBox.textColor
padding.top: 3
padding.bottom: 1
padding.right: 18
incrementControl: Item {
implicitWidth: 14
@@ -40,6 +40,8 @@ Controls.TextField {
property color highlightColor: "orange"
property color textColor: colorLogic.textColor
property bool showTranslateCheckBox: true
ExtendedFunctionButton {
x: 2
y: 4
@@ -76,6 +78,7 @@ Controls.TextField {
padding.top: 3
padding.bottom: 1
padding.left: 16
padding.right: 16
placeholderTextColor: "gray"
background: Rectangle {
implicitWidth: 100
@@ -98,4 +101,46 @@ Controls.TextField {
}
}
}
Controls.CheckBox {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
id: trCheckbox
checked: backendValue.isTranslated
onClicked: {
if (trCheckbox.checked) {
backendValue.expression = "qsTr(\"" + escapeString(lineEdit.text) + "\")"
} else {
backendValue.value = lineEdit.text
}
colorLogic.evaluate();
}
function escapeString(string) {
var str = string;
str = str.replace(/\\/g, "\\\\");
str.replace(/\"/g, "\\\"");
str = str.replace(/\t/g, "\\t");
str = str.replace(/\r/g, "\\r");
str = str.replace(/\n/g, '\\n');
return str;
}
visible: showTranslateCheckBox
style: CheckBoxStyle {
spacing: 8
label: Controls.Label { text: control.text ; color: checkBox.textColor }
indicator: Item {
implicitWidth: 16
implicitHeight: 16
Image { source: "qrc:qmldesigner/images/checkbox_tr_" +
(control.checked ? "checked": "unchecked") +
(control.pressed ? "_pressed": "") + ".png" }
}
} //control.pressed ? "qrc:qmldesigner/images/checkbox_unchecked_pressed.png" :
}
}
@@ -76,7 +76,7 @@ Section {
}
Label {
text: qsTr("Horizontal Alignment")
text: qsTr("Alignment")
}
AligmentHorizontalButtons {
@@ -85,7 +85,7 @@ Section {
Label {
visible: showVerticalAlignment
text: qsTr("Vertical Alignment")
text: ("")
}
AligmentVerticalButtons {
@@ -76,6 +76,7 @@ Rectangle {
text: backendValues.id.value
Layout.fillWidth: true
Layout.maximumWidth: 320
showTranslateCheckBox: false
}
ExpandingSpacer {
@@ -1,19 +0,0 @@
# Add files and directories to ship with the application
# by adapting the examples below.
# file1.source = myfile
# dir1.source = mydir
DEPLOYMENTFOLDERS = # file1 dir1
# If your application uses the Qt Mobility libraries, uncomment
# the following lines and add the respective components to the
# MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
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()
@@ -1,14 +0,0 @@
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow mainWindow;
mainWindow.setOrientation(MainWindow::ScreenOrientationAuto); // ORIENTATION
mainWindow.showExpanded();
return app.exec();
}
@@ -1,58 +0,0 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QCoreApplication>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::setOrientation(ScreenOrientation orientation)
{
Qt::WidgetAttribute attribute;
switch (orientation) {
#if QT_VERSION < 0x040702
// Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes
case ScreenOrientationLockPortrait:
attribute = static_cast<Qt::WidgetAttribute>(128);
break;
case ScreenOrientationLockLandscape:
attribute = static_cast<Qt::WidgetAttribute>(129);
break;
default:
case ScreenOrientationAuto:
attribute = static_cast<Qt::WidgetAttribute>(130);
break;
#else // QT_VERSION < 0x040702
case ScreenOrientationLockPortrait:
attribute = Qt::WA_LockPortraitOrientation;
break;
case ScreenOrientationLockLandscape:
attribute = Qt::WA_LockLandscapeOrientation;
break;
default:
case ScreenOrientationAuto:
attribute = Qt::WA_AutoOrientation;
break;
#endif // QT_VERSION < 0x040702
};
setAttribute(attribute, true);
}
void MainWindow::showExpanded()
{
#if defined(Q_WS_SIMULATOR)
showFullScreen();
#elif defined(Q_WS_MAEMO_5)
showMaximized();
#else
show();
#endif
}
@@ -1,32 +0,0 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
enum ScreenOrientation {
ScreenOrientationLockPortrait,
ScreenOrientationLockLandscape,
ScreenOrientationAuto
};
explicit MainWindow(QWidget *parent = 0);
virtual ~MainWindow();
// Note that this will only have an effect on Fremantle.
void setOrientation(ScreenOrientation orientation);
void showExpanded();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
@@ -1,22 +0,0 @@
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>200</width>
<height>320</height>
</rect>
</property>
<property name="windowTitle" >
<string>MainWindow</string>
</property>
<widget class="QMenuBar" name="menuBar" />
<widget class="QWidget" name="centralWidget" />
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>
@@ -8,7 +8,7 @@ int main(int argc, char *argv[])
QtQuick1ApplicationViewer viewer;
viewer.addImportPath(QLatin1String("modules")); // ADDIMPORTPATH
viewer.setOrientation(QtQuick1ApplicationViewer::ScreenOrientationAuto); // ORIENTATION
viewer.setMainQmlFile(QLatin1String("qml/app/qtquick10/main.qml")); // MAINQML
viewer.setMainQmlFile(QLatin1String("qml/app/main.qml")); // MAINQML
viewer.showExpanded();
return app.exec();
@@ -27,7 +27,11 @@ class QtQuick1ApplicationViewerPrivate
QString QtQuick1ApplicationViewerPrivate::adjustPath(const QString &path)
{
#ifdef Q_OS_MAC
#if defined(Q_OS_IOS)
if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("%1/%2")
.arg(QCoreApplication::applicationDirPath(), path);
#elif defined(Q_OS_MAC)
if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("%1/../Resources/%2")
.arg(QCoreApplication::applicationDirPath(), path);
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="C"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.1.1"
viewerdir="qtquick1applicationviewer"
viewerclassname="QtQuick1ApplicationViewer"
stubversionminor="24">
<displayname>Qt Quick 1.1</displayname>
<description>Creates a deployable Qt Quick 1 application using the QtQuick 1.1 import. Requires Qt 4.8 or newer.</description>
</template>
@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/app/qtquick20/main.qml")); // MAINQML
viewer.setMainQmlFile(QStringLiteral("qml/app/main.qml")); // MAINQML
viewer.showExpanded();
return app.exec();
@@ -22,7 +22,11 @@ class QtQuick2ApplicationViewerPrivate
QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
{
#if defined(Q_OS_MAC)
#if defined(Q_OS_IOS)
if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("%1/%2")
.arg(QCoreApplication::applicationDirPath(), path);
#elif defined(Q_OS_MAC)
if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("%1/../Resources/%2")
.arg(QCoreApplication::applicationDirPath(), path);
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="B"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.2"
viewerdir="qtquick2applicationviewer"
viewerclassname="QtQuick2ApplicationViewer"
stubversionminor="5">
<displayname>Qt Quick 2.0</displayname>
<description>Creates a deployable Qt Quick 2 application using the QtQuick 2.0 import. Requires Qt 5.0 or newer.</description>
</template>
@@ -5,7 +5,7 @@ int main(int argc, char *argv[])
Application app(argc, argv);
QtQuick2ControlsApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/app/qtquick21/main.qml")); // MAINQML
viewer.setMainQmlFile(QStringLiteral("qml/app/main.qml")); // MAINQML
viewer.show();
return app.exec();
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<template openeditor="main.qml" priority="A"
featuresRequired="QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.2, QtSupport.Wizards.FeatureQtQuick.Controls"
viewerdir="qtquick2controlsapplicationviewer"
viewerclassname="QtQuick2ControlsApplicationViewer"
stubversionminor="1">
<displayname>Qt Quick Controls 1.0</displayname>
<description>Creates a deployable Qt Quick 2 application using Qt Quick Controls. Requires Qt 5.1 or newer.</description>
</template>
@@ -1,66 +0,0 @@
import QtQuick 1.1
import com.nokia.meego 1.0
Page {
id: page
tools: commonTools
property string title : "Application Title"
Image {
id: pageHeader
anchors {
top: page.top
left: page.left
right: page.right
}
height: parent.width < parent.height ? 72 : 46
width: parent.width
source: "image://theme/meegotouch-view-header-fixed" + (theme.inverted ? "-inverted" : "")
z: 1
Label {
id: header
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 16
}
platformStyle: LabelStyle {
fontFamily: "Nokia Pure Text Light"
fontPixelSize: 32
}
text: page.title
}
}
Flickable {
id: pageFlickableContent
anchors {
top: pageHeader.bottom
bottom: page.bottom
left: page.left
right: page.right
margins: 16
}
contentHeight: pageContent.height
contentWidth: pageContent.width
flickableDirection: Flickable.VerticalFlick
Column {
id: pageContent
width: page.width - pageFlickableContent.anchors.margins * 2
spacing: 16
Button{
text: qsTr("Click here!")
onClicked: appWindow.showStatusBar = !appWindow.showStatusBar
}
}
}
ScrollDecorator {
flickableItem: pageFlickableContent
}
}
@@ -1,64 +0,0 @@
import QtQuick 1.1
import com.nokia.meego 1.0
PageStackWindow {
id: appWindow
initialPage: mainPage
MainPage {
id: mainPage
}
ToolBarLayout {
id: commonTools
ToolIcon {
visible: pageStack.depth > 1
platformIconId: "toolbar-back"
onClicked: {
pageStack.pop();
}
}
ToolButton {
anchors.horizontalCenter: parent.horizontalCenter
text: theme.inverted ? "Inverted" : "Non-Inverted"
onClicked: {
theme.inverted = !theme.inverted;
}
}
ToolIcon {
platformIconId: "toolbar-view-menu"
onClicked: {
appWindow.showToolBar = false;
myMenu.open();
}
}
}
QueryDialog {
id: aboutDialog
titleText: "Application Title"
message: "(C) [year] [your name]\n[version]"
}
Menu {
id: myMenu
visualParent: pageStack
MenuLayout {
MenuItem {
text: qsTr("About")
onClicked: {
aboutDialog.open();
}
}
}
onStatusChanged: {
if (status === DialogStatus.Closed) {
appWindow.showToolBar = true;
}
}
}
}
@@ -89,6 +89,28 @@ android-no-sdk {
export(copydeploymentfolders.commands)
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
}
} ios {
copyCommand =
for(deploymentfolder, DEPLOYMENTFOLDERS) {
source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
source = $$replace(source, \\\\, /)
target = $CODESIGNING_FOLDER_PATH/$$eval($${deploymentfolder}.target)
target = $$replace(target, \\\\, /)
sourcePathSegments = $$split(source, /)
targetFullPath = $$target/$$last(sourcePathSegments)
targetFullPath ~= s,/\\.?/,/,
!isEqual(source,$$targetFullPath) {
!isEmpty(copyCommand):copyCommand += &&
copyCommand += mkdir -p \"$$target\"
copyCommand += && cp -r \"$$source\" \"$$target\"
}
}
!isEmpty(copyCommand) {
copyCommand = echo Copying application data... && $$copyCommand
!isEmpty(QMAKE_POST_LINK): QMAKE_POST_LINK += ";"
QMAKE_POST_LINK += "$$copyCommand"
export(QMAKE_POST_LINK)
}
} else:unix {
maemo5 {
desktopfile.files = $${TARGET}.desktop
@@ -0,0 +1,6 @@
let $prefix := string("QT_TRANSLATE_NOOP(&quot;QmakeProjectManager::QtQuickAppWizard&quot;, &quot;")
let $suffix := concat("&quot;)", codepoints-to-string(10))
for $file in tokenize($files, string("\|"))
let $doc := doc($file)
for $text in ($doc/*:template/*:description, $doc/*:template/*:displayname)
return fn:concat($prefix, data($text), $suffix)
@@ -22,17 +22,21 @@ TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/qtcreator_,.ts)
MIME_TR_H = $$OUT_PWD/mime_tr.h
CUSTOMWIZARD_TR_H = $$OUT_PWD/customwizard_tr.h
QMLWIZARD_TR_H = $$OUT_PWD/qmlwizard_tr.h
QTQUICKWIZARD_TR_H = $$OUT_PWD/qtquickwizard_tr.h
EXTERNALTOOLS_TR_H = $$OUT_PWD/externaltools_tr.h
for(dir, $$list($$files($$IDE_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml)
MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/wizards/*))):CUSTOMWIZARD_FILES += $$files($$dir/wizard.xml)
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/wizards/*, true))):CUSTOMWIZARD_FILES += $$files($$dir/wizard.xml)
CUSTOMWIZARD_FILES = \"$$join(CUSTOMWIZARD_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/qml/*))):QMLWIZARD_FILES += $$files($$dir/template.xml)
QMLWIZARD_FILES = \"$$join(QMLWIZARD_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/qtquick/*))):QTQUICKWIZARD_FILES += $$files($$dir/template.xml)
QTQUICKWIZARD_FILES = \"$$join(QTQUICKWIZARD_FILES, |)\"
for(file, $$list($$files($$IDE_SOURCE_TREE/src/share/qtcreator/externaltools/*))):EXTERNALTOOLS_FILES += $$files($$file)
EXTERNALTOOLS_FILES = \"$$join(EXTERNALTOOLS_FILES, |)\"
@@ -40,6 +44,7 @@ extract.commands += \
$$XMLPATTERNS -output $$MIME_TR_H -param files=$$MIMETYPES_FILES $$PWD/extract-mimetypes.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$CUSTOMWIZARD_TR_H -param files=$$CUSTOMWIZARD_FILES $$PWD/extract-customwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$QMLWIZARD_TR_H -param files=$$QMLWIZARD_FILES $$PWD/extract-qmlwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$QTQUICKWIZARD_TR_H -param files=$$QTQUICKWIZARD_FILES $$PWD/extract-qtquickwizards.xq $$escape_expand(\\n\\t) \
$$XMLPATTERNS -output $$EXTERNALTOOLS_TR_H -param files=$$EXTERNALTOOLS_FILES $$PWD/extract-externaltools.xq
QMAKE_EXTRA_TARGETS += extract
@@ -59,12 +64,12 @@ files = $$files($$PWD/*_??.ts) $$PWD/qtcreator_untranslated.ts
for(file, files) {
lang = $$replace(file, .*_([^/]*)\\.ts, \\1)
v = ts-$${lang}.commands
$$v = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$file
$$v = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$QTQUICKWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$file
v = ts-$${lang}.depends
$$v = extract
QMAKE_EXTRA_TARGETS += ts-$$lang
}
ts-all.commands = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$files
ts-all.commands = cd $$wd && $$LUPDATE $$sources $$MIME_TR_H $$CUSTOMWIZARD_TR_H $$QMLWIZARD_TR_H $$QTQUICKWIZARD_TR_H $$EXTERNALTOOLS_TR_H -ts $$files
ts-all.depends = extract
QMAKE_EXTRA_TARGETS += ts-all
+4 -2
View File
@@ -510,8 +510,10 @@ int main(int argc, char **argv)
return 1;
}
if (PluginManager::hasError()) {
PluginErrorOverview errorOverview;
errorOverview.exec();
PluginErrorOverview *errorOverview = new PluginErrorOverview(QApplication::activeWindow());
errorOverview->setAttribute(Qt::WA_DeleteOnClose);
errorOverview->setModal(true);
errorOverview->show();
}
// Set up remote arguments.
+1 -1
View File
@@ -28,7 +28,7 @@
#include "QtContextKeywords.h"
#include <string>
#include <cstdio> // for putchar
#ifdef _MSC_VER
#if defined(_MSC_VER) && (_MSC_VER < 1800)
# define va_copy(dst, src) ((dst) = (src))
#elif defined(__INTEL_COMPILER) && !defined(va_copy)
# define va_copy __va_copy
+1 -1
View File
@@ -32,7 +32,7 @@
#include <algorithm>
#include <utility>
#ifdef _MSC_VER
#if defined(_MSC_VER) && (_MSC_VER < 1800)
# define va_copy(dst, src) ((dst) = (src))
#elif defined(__INTEL_COMPILER) && !defined(va_copy)
# define va_copy __va_copy
+18 -13
View File
@@ -344,9 +344,8 @@ ClassOrNamespace *LookupContext::lookupType(const Name *name, Scope *scope,
if (name->isNameId()) {
if (const Name *usingDeclarationName = ud->name()) {
if (const QualifiedNameId *q = usingDeclarationName->asQualifiedNameId()) {
if (q->name() && q->name()->isEqualTo(name)) {
if (q->name() && q->name()->isEqualTo(name))
return bindings()->globalNamespace()->lookupType(q);
}
}
}
}
@@ -529,6 +528,7 @@ ClassOrNamespace::ClassOrNamespace(CreateBindings *factory, ClassOrNamespace *pa
, _scopeLookupCache(0)
, _templateId(0)
, _instantiationOrigin(0)
, _rootClass(0)
#ifdef DEBUG_LOOKUP
, _name(0)
#endif // DEBUG_LOOKUP
@@ -801,9 +801,8 @@ ClassOrNamespace *ClassOrNamespace::findBlock(Block *block)
flush();
QHash<Block *, ClassOrNamespace *>::const_iterator citBlock = _blocks.find(block);
if (citBlock != _blocks.end()) {
if (citBlock != _blocks.end())
return citBlock.value();
}
for (citBlock = _blocks.begin(); citBlock != _blocks.end(); ++citBlock) {
if (ClassOrNamespace *foundNestedBlock = citBlock.value()->findBlock(block))
@@ -1067,6 +1066,8 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
instantiation->_enums.append(reference->unscopedEnums());
instantiation->_usings.append(reference->usings());
instantiation->_rootClass = reference->rootClass();
// It gets a bit complicated if the reference is actually a class template because we
// now must worry about dependent names in base classes.
if (Template *templateSpecialization = referenceClass->enclosingTemplate()) {
@@ -1107,9 +1108,8 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
for (unsigned i = 0; i < klassMemberCount; ++i){
Symbol *klassMemberAsSymbol = klass->memberAt(i);
if (klassMemberAsSymbol->isTypedef()) {
if (Declaration *declaration = klassMemberAsSymbol->asDeclaration()) {
if (Declaration *declaration = klassMemberAsSymbol->asDeclaration())
qDebug() << "Member: " << oo(declaration->type(), declaration->name());
}
}
}
}
@@ -1347,7 +1347,8 @@ void ClassOrNamespace::addNestedType(const Name *alias, ClassOrNamespace *e)
_classOrNamespaces[alias] = e;
}
ClassOrNamespace *ClassOrNamespace::findOrCreateType(const Name *name, ClassOrNamespace *origin)
ClassOrNamespace *ClassOrNamespace::findOrCreateType(const Name *name, ClassOrNamespace *origin,
Class *clazz)
{
if (! name)
return this;
@@ -1356,15 +1357,16 @@ ClassOrNamespace *ClassOrNamespace::findOrCreateType(const Name *name, ClassOrNa
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
if (! q->base())
return globalNamespace()->findOrCreateType(q->name(), origin);
return globalNamespace()->findOrCreateType(q->name(), origin, clazz);
return findOrCreateType(q->base(), origin)->findOrCreateType(q->name(), origin);
return findOrCreateType(q->base(), origin)->findOrCreateType(q->name(), origin, clazz);
} else if (name->isNameId() || name->isTemplateNameId() || name->isAnonymousNameId()) {
ClassOrNamespace *e = nestedType(name, origin);
if (! e) {
e = _factory->allocClassOrNamespace(this);
e->_rootClass = clazz;
#ifdef DEBUG_LOOKUP
e->_name = name;
#endif // DEBUG_LOOKUP
@@ -1470,7 +1472,8 @@ void CreateBindings::process(Document::Ptr doc)
ClassOrNamespace *CreateBindings::enterClassOrNamespaceBinding(Symbol *symbol)
{
ClassOrNamespace *entity = _currentClassOrNamespace->findOrCreateType(symbol->name());
ClassOrNamespace *entity = _currentClassOrNamespace->findOrCreateType(symbol->name(), 0,
symbol->asClass());
entity->addSymbol(symbol);
return switchCurrentClassOrNamespace(entity);
@@ -1478,7 +1481,8 @@ ClassOrNamespace *CreateBindings::enterClassOrNamespaceBinding(Symbol *symbol)
ClassOrNamespace *CreateBindings::enterGlobalClassOrNamespace(Symbol *symbol)
{
ClassOrNamespace *entity = _globalNamespace->findOrCreateType(symbol->name());
ClassOrNamespace *entity = _globalNamespace->findOrCreateType(symbol->name(), 0,
symbol->asClass());
entity->addSymbol(symbol);
return switchCurrentClassOrNamespace(entity);
@@ -1516,7 +1520,7 @@ bool CreateBindings::visit(Class *klass)
binding = _currentClassOrNamespace->lookupType(klass->name());
if (! binding)
binding = _currentClassOrNamespace->findOrCreateType(klass->name());
binding = _currentClassOrNamespace->findOrCreateType(klass->name(), 0, klass);
_currentClassOrNamespace = binding;
_currentClassOrNamespace->addSymbol(klass);
@@ -1568,7 +1572,8 @@ bool CreateBindings::visit(Declaration *decl)
}
} else if (Class *klass = ty->asClassType()) {
if (const Identifier *nameId = decl->name()->asNameId()) {
ClassOrNamespace *binding = _currentClassOrNamespace->findOrCreateType(nameId);
ClassOrNamespace *binding
= _currentClassOrNamespace->findOrCreateType(nameId, 0, klass);
binding->addSymbol(klass);
}
}
+7 -1
View File
@@ -87,6 +87,9 @@ public:
Symbol *lookupInScope(const QList<const Name *> &fullName);
/// The class this ClassOrNamespace is based on.
Class *rootClass() const { return _rootClass; }
private:
typedef std::map<const Name *, ClassOrNamespace *, Name::Compare> Table;
typedef std::map<const TemplateNameId *, ClassOrNamespace *, TemplateNameId::Compare> TemplateNameIdTable;
@@ -95,7 +98,8 @@ private:
void flush();
/// \internal
ClassOrNamespace *findOrCreateType(const Name *name, ClassOrNamespace *origin = 0);
ClassOrNamespace *findOrCreateType(const Name *name, ClassOrNamespace *origin = 0,
Class *clazz = 0);
void addTodo(Symbol *symbol);
void addSymbol(Symbol *symbol);
@@ -145,6 +149,8 @@ private:
AlreadyConsideredClassContainer<Class> _alreadyConsideredClasses;
AlreadyConsideredClassContainer<TemplateNameId> _alreadyConsideredTemplates;
Class *_rootClass;
class NestedClassInstantiator
{
public:
+1 -2
View File
@@ -1121,9 +1121,8 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
if (! isTypeTypedefed(originalType, ty)
|| ! areOriginalAndTypedefedTypePointer(originalType, ty)) {
*replacedDotOperator = originalType->isPointerType() || ty->isPointerType();
if (PointerType *ptrTy = ty->asPointerType()) {
if (PointerType *ptrTy = ty->asPointerType())
ty = ptrTy->elementType();
}
}
}
+9 -2
View File
@@ -907,8 +907,10 @@ void PluginManagerPrivate::writeSettings()
*/
void PluginManagerPrivate::readSettings()
{
if (globalSettings)
if (globalSettings) {
defaultDisabledPlugins = globalSettings->value(QLatin1String(C_IGNORED_PLUGINS)).toStringList();
defaultEnabledPlugins = globalSettings->value(QLatin1String(C_FORCEENABLED_PLUGINS)).toStringList();
}
if (settings) {
disabledPlugins = settings->value(QLatin1String(C_IGNORED_PLUGINS)).toStringList();
forceEnabledPlugins = settings->value(QLatin1String(C_FORCEENABLED_PLUGINS)).toStringList();
@@ -1225,9 +1227,14 @@ void PluginManagerPrivate::readPluginPaths()
collection = new PluginCollection(spec->category());
pluginCategories.insert(spec->category(), collection);
}
if (defaultDisabledPlugins.contains(spec->name())) {
// defaultDisabledPlugins and defaultEnabledPlugins from install settings
// is used to override the defaults read from the plugin spec
if (!spec->isDisabledByDefault() && defaultDisabledPlugins.contains(spec->name())) {
spec->setDisabledByDefault(true);
spec->setEnabled(false);
} else if (spec->isDisabledByDefault() && defaultEnabledPlugins.contains(spec->name())) {
spec->setDisabledByDefault(false);
spec->setEnabled(true);
}
if (spec->isDisabledByDefault() && forceEnabledPlugins.contains(spec->name()))
spec->setEnabled(true);

Some files were not shown because too many files have changed in this diff Show More