Merge remote-tracking branch 'origin/5.15' into dev

Conflicts:
	tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp

Change-Id: Id2e81000bcbd4de18fe22b085fdf5eed42c02516
This commit is contained in:
Liang Qi 2019-10-07 13:10:18 +02:00
commit 7e17fb2ded
278 changed files with 3370 additions and 1193 deletions

89
dist/changes-5.12.5 vendored Normal file
View File

@ -0,0 +1,89 @@
Qt 5.12.5 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.4.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- [QTBUG-76871] TapHandler.point now holds the release position while the
tapped() signal is emitted.
****************************************************************************
* QtQml *
****************************************************************************
- [QTBUG-76018] Readonly QML properties can now be templates such as
list<...>.
- [QTBUG-76085] QQmlApplication engine now automatically loads translation
files from resource directories.
- [QTBUG-75939] Instances of QJSValue can now safely be passed between
threads and destroyed in a different thread.
- [QTBUG-75642] Fixed an invalid memory read caused by the JIT compiler.
- [QTBUG-71387] Fixed a use-after-free condition caused by calling
qmlClearTypeRegistrations().
- [QTBUG-76656] Made sure JavaScript "this" points to the right object when
calling scope and context properties through lookups.
- [QTBUG-76796] Fixed bindings to typeof(<name>) to get re-evaluated when
<name> gets defined.
- [QTBUG-55407] Avoid invalid memory access when calling setData() on a
QQmlComponent constructed without an engine.
- [QTBUG-76441] Fixed importing "qrc:/" (with exactly one slash).
- [QTBUG-71329] Implemented the missing bits of JavaScript promise chains.
- [QTBUG-75983] Fixed null pointer dereference in QQmlXmlHttpRequest.
- [QTBUG-77012] Fixed static build issue: multiple definitions of
qtPositionAttributeName().
- [QTBUG-77102] The component versioning is not enforced when loading
singletons.
****************************************************************************
* QtQuick *
****************************************************************************
- Item Views:
* [QTBUG-76487] We now properly populate delegates with the populate
transition when the view is resized after componentComplete.
* [QTBUG-31677] A ListView footer is now positioned correctly after the
last item is removed.
* [QTBUG-76433][QTBUG-44308] Fixed a crash while doing fast flicking in
transitions that use Animators.
* [QTBUG-76254] Fixed a crash in QQmlDelegateModel.
- Input:
* [QTBUG-75399] Fixed a crash when using the KeyNavigation attached property.
* [QTBUG-76875] DragHandler now respects acceptedButtons.
* [QTBUG-71218] If a Controls 2 Button has a DragHandler, the button is
now released when the drag begins.
- Scene graph:
* [QTBUG-76603] qmlscene now sets the default surface format earlier
and correctly.
* [QTBUG-68566] Fixed rendering freeze when using software rendering
of WebEngine in QQuickWidget.
* [QTBUG-66810] Software rendering: repaint everything when moving
between HiDpi and lower-resolution screens.
- Text:
* [QTBUG-77217] Fixed a bug where aligning an image to "top" or "bottom"
could cause a crash under certain circumstances.
* [QTBUG-76528] Fixed missing glyphs and in some cases crashes when
displaying many characters from the same font on a system with a
low maximum texture size.
* [QTBUG-76528] Fixed a bug when displaying many characters from the same
font on a system with a low maximum texture size.
* [QTBUG-74761] Added support for text color when using color fonts.

107
dist/changes-5.13.1 vendored Normal file
View File

@ -0,0 +1,107 @@
Qt 5.13.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.13.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.13 series is binary compatible with the 5.12.x series.
Applications compiled for 5.12 will continue to run with 5.13.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- [QTBUG-76871] TapHandler.point now holds the release position while the
tapped() signal is emitted.
- [QTBUG-14769][QTBUG-50482] TextEdit now uses the I-beam cursor by default,
and the pointing cursor for links. But if user code sets a custom cursor,
we restore it when the mouse is no longer hovering a link.
****************************************************************************
* QtQml *
****************************************************************************
- [QTBUG-56264] Fixed segfault on Sparc64.
- [QTBUG-77102] Fix bug with singletons not being imported from modules when
using older versions.
- [QTBUG-77047] Fixed crash when creating arrays using the spread operator.
- [QTBUG-75983] Fixed crash in XMLHttpRequest.open.
- [QTBUG-77012] Fixed static build issue: multiple definitions of
qtPositionAttributeName().
- [QTBUG-71329] Fixed promise chaining.
- [QTBUG-76441] Fix support for import statements using qrc:/ urls.
- [QTBUG-55407] Fixed a crash when setData or create is called after a user
mistakenly used the internal constructor of QQmlComponent which does
not take an engine.
- [QTBUG-76796] Fixed late binding re-evaluation when using typeof(name).
- [QTBUG-76627] qmlplugindump now finds enums in composite types.
- [QTBUG-76656] Fixed resolution of 'this' when using the call operator on scope and context
properties.
- [QTBUG-71387] Fixed a crash after calling qmlClearTypeRegistrations().
- [QTBUG-75642] Fixed an invalid memory read in JIT with template literals.
- [QTBUG-75939] Fix crash when destroying QJSValues from other threads.
- [QTBUG-76085] Fixed automatic loading of translations from resources.
- [QTBUG-76018] Fixed grammar to permit readonly list properties.
- [QTBUG-75880] Fix accidental implicit creation of local variable when using anonymous functions
in object literals.
- [QTBUG-67343] Fixed assertion when having a ShaderEffect as a delegate
in a ComboBox.
- [QTBUG-75896] Fixed property lookup in QML singletons.
- [QTBUG-75392] Fixed a crash by working around a compiler bug.
- [QTBUG-48809] Print a warning when using absolute paths in qmldir files.
- [QTBUG-75609] Fixed a performance regression with attached properties.
- [QTBUG-76074] Loader now frees custom qml types when unloading.
****************************************************************************
* QtQuick *
****************************************************************************
- Item Views:
* [QTBUG-76487] We now properly populate delegates with the populate
transition when the view is resized after componentComplete.
* [QTBUG-31677] A ListView footer is now positioned correctly after the
last item is removed.
* [QTBUG-76433][QTBUG-44308] Fixed a crash while doing fast flicking in
transitions that use Animators.
* [QTBUG-76254] Fixed a crash in QQmlDelegateModel.
* [QTBUG-71581] Fixed a crash in ListView when closing an application that
dynamically creates and appends items to an ObjectModel.
- Input:
* [QTBUG-75399] Fixed a crash when using the KeyNavigation attached property.
* [QTBUG-76875] DragHandler now respects acceptedButtons.
* [QTBUG-71218] If a Controls 2 Button has a DragHandler, the button is
now released when the drag begins.
* [QTBUG-75770] MouseArea now respects QPlatformTheme::TouchDoubleTapDistance
to avoid generating double-clicks while moving and clicking the mouse quickly.
- Scene graph:
* [QTBUG-76603] qmlscene now sets the default surface format earlier
and correctly.
* [QTBUG-68566] Fixed rendering freeze when using software rendering
of WebEngine in QQuickWidget.
* [QTBUG-73768] Fixed an assert in BorderImage when any border size
exceeds source image size.
* [QTBUG-66810] Software rendering: repaint everything when moving
between HiDpi and lower-resolution screens.
* [QTBUG-74348] Fixed leaking scene graph rendering contexts when using
the threaded render loop.
* [QTBUG-76055] Cleaned up error messages in shadereffect.
- Text:
* [QTBUG-74761] Added support for text color when using color fonts.
* [QTBUG-76528] Fixed missing glyphs and in some cases crashes when
displaying many characters from the same font on a system with a
low maximum texture size.
* [QTBUG-75002] Accessibility: StaticText nodes are announced as
read-only rather than editable in Windows Narrator.

View File

@ -1,23 +0,0 @@
Some guidelines for Qt QML examples
Snippets
---
Snippets are snatches of QML code that won't even run on their own. They don't belong here, they belong in doc/src/snippets. They should be contained in files that will compile on their own, for automated syntax validation, but don't have to look like anything.
Examples
---
Examples are large blocks of QML code that demonstrate a feature. You should be able to launch an example and visually see the feature take effect. Examples should be written in a small form, and should automatically activate any features. Ideally, when you run an example, you see the feature demonstrate itself over and over until you get bored and close the application using your platform's close window mechanism. Examples shouldn't contain their own close buttons or start screen, explanatory text should be kept to a minimum (show, not tell), and reserve interaction for demonstrating interactive elements. The code should be held to a high level of quality, and should be understandable by people new to QML.
Unless the demonstrated feature uses it, assume no interface devices other than a screen that can show a 320x480 rectangle and a generic pointing device (with the shared subset of mouse/touch functionality).
Groups of similar examples should be placed in one folder with a single launcher application, which uses the shared folder of common components.
The example, or launcher application in case of groups, should contain a qdoc comment explaining the example. The example or launcher should be buildable as a full C++ application and runnable with the standard qml file launcher. Usually this will consist primarily of using the macro found in shared.h.
Demos
---
Demos are examples of creating full applications using QML. They should fit both a desktop and a mobile form factor, they should have their own start screen and method of exiting the application. They should be at a level of quality that you'd be comfortable submitting them to an app store for a platform of the appropriate hardware (screen size, input methods, etc.). The code should be written to a level that is easily understood and modified by a QML expert.
Demos should have a qdoc file in their directory explaining the demo at a high level. The demo should be buildable as a full C++ application and preferably runnable with the standard qml file launcher.

View File

@ -38,12 +38,12 @@
\section1 Scaling with BorderImage
\e BorderImage shows off the various scaling modes of the \l BorderImage
\e BorderImage shows the various scaling modes of the \l BorderImage
type by setting its horizontalTileMode and verticalTileMode properties.
\section1 Image Fill
\e Image shows off the various fill modes of the \l Image type.
\e Image shows the various fill modes of the \l Image type.
\section1 Shadow Effects

View File

@ -26,11 +26,11 @@
****************************************************************************/
/*!
\example scenegraph/textureinsgnode
\example scenegraph/fboitem
\title Scene Graph - Rendering FBOs
\ingroup qtquickexamples
\brief Shows how to use FramebufferObjects with Qt Quick.
\image textureinsgnode-example.jpg
\image fboitem-example.jpg
*/

View File

@ -7,9 +7,9 @@ INCLUDEPATH += ../shared
HEADERS += ../shared/logorenderer.h
SOURCES += ../shared/logorenderer.cpp
RESOURCES += textureinsgnode.qrc
RESOURCES += fboitem.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/textureinsgnode
target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/fboitem
INSTALLS += target
OTHER_FILES += \

View File

@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/scenegraph/textureinsgnode">
<qresource prefix="/scenegraph/fboitem">
<file>main.qml</file>
</qresource>
</RCC>

View File

@ -62,7 +62,7 @@ int main(int argc, char **argv)
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl("qrc:///scenegraph/textureinsgnode/main.qml"));
view.setSource(QUrl("qrc:///scenegraph/fboitem/main.qml"));
view.show();
return app.exec();

View File

@ -281,7 +281,7 @@ void CustomTextureNode::sync()
m_vs = compileShaderFromSource(m_vert, m_vertEntryPoint);
m_fs = compileShaderFromSource(m_frag, m_fragEntryPoint);
const int framesInFlight = m_window->graphicsStateInfo()->framesInFlight;
const int framesInFlight = m_window->graphicsStateInfo().framesInFlight;
m_vbuf = [m_device newBufferWithLength: sizeof(vertices) options: MTLResourceStorageModeShared];
void *p = [m_vbuf contents];
@ -348,8 +348,8 @@ void CustomTextureNode::render()
Q_ASSERT(cb);
id<MTLRenderCommandEncoder> encoder = [cb renderCommandEncoderWithDescriptor: renderpassdesc];
const QQuickWindow::GraphicsStateInfo *stateInfo = m_window->graphicsStateInfo();
void *p = [m_ubuf[stateInfo->currentFrameSlot] contents];
const QQuickWindow::GraphicsStateInfo &stateInfo(m_window->graphicsStateInfo());
void *p = [m_ubuf[stateInfo.currentFrameSlot] contents];
memcpy(p, &m_t, 4);
MTLViewport vp;
@ -361,7 +361,7 @@ void CustomTextureNode::render()
vp.zfar = 1;
[encoder setViewport: vp];
[encoder setFragmentBuffer: m_ubuf[stateInfo->currentFrameSlot] offset: 0 atIndex: 0];
[encoder setFragmentBuffer: m_ubuf[stateInfo.currentFrameSlot] offset: 0 atIndex: 0];
[encoder setVertexBuffer: m_vbuf offset: 0 atIndex: 1];
[encoder setRenderPipelineState: m_pipeline];
[encoder drawPrimitives: MTLPrimitiveTypeTriangleStrip vertexStart: 0 vertexCount: 4 instanceCount: 1 baseInstance: 0];

View File

@ -215,7 +215,7 @@ void SquircleRenderer::frameStart()
prepareShader(FragmentStage);
if (!m_initialized)
init(m_window->graphicsStateInfo()->framesInFlight);
init(m_window->graphicsStateInfo().framesInFlight);
}
static const float vertices[] = {
@ -233,7 +233,7 @@ void SquircleRenderer::mainPassRecordingStart()
// the scenegraph's main renderpass. It does not create its own passes,
// rendertargets, etc. so no synchronization is needed.
const QQuickWindow::GraphicsStateInfo *stateInfo = m_window->graphicsStateInfo();
const QQuickWindow::GraphicsStateInfo &stateInfo(m_window->graphicsStateInfo());
QSGRendererInterface *rif = m_window->rendererInterface();
id<MTLRenderCommandEncoder> encoder = (id<MTLRenderCommandEncoder>) rif->getResource(
@ -242,7 +242,7 @@ void SquircleRenderer::mainPassRecordingStart()
m_window->beginExternalCommands();
void *p = [m_ubuf[stateInfo->currentFrameSlot] contents];
void *p = [m_ubuf[stateInfo.currentFrameSlot] contents];
float t = m_t;
memcpy(p, &t, 4);
@ -255,7 +255,7 @@ void SquircleRenderer::mainPassRecordingStart()
vp.zfar = 1;
[encoder setViewport: vp];
[encoder setFragmentBuffer: m_ubuf[stateInfo->currentFrameSlot] offset: 0 atIndex: 0];
[encoder setFragmentBuffer: m_ubuf[stateInfo.currentFrameSlot] offset: 0 atIndex: 0];
[encoder setVertexBuffer: m_vbuf offset: 0 atIndex: 1];
[encoder setRenderPipelineState: m_pipeline];
[encoder drawPrimitives: MTLPrimitiveTypeTriangleStrip vertexStart: 0 vertexCount: 4 instanceCount: 1 baseInstance: 0];

View File

@ -131,7 +131,7 @@ void MetalRenderNodeResourceBuilder::build()
g.fs = compileShaderFromSource(g.fsSource, QByteArrayLiteral("main0"));
}
const int framesInFlight = m_window->graphicsStateInfo()->framesInFlight;
const int framesInFlight = m_window->graphicsStateInfo().framesInFlight;
// For simplicity's sake we use shared mode (something like host visible +
// host coherent) for everything.
@ -258,9 +258,9 @@ void MetalRenderNode::releaseResources()
void MetalRenderNode::render(const RenderState *state)
{
Q_ASSERT(m_window);
const QQuickWindow::GraphicsStateInfo *stateInfo = m_window->graphicsStateInfo();
id<MTLBuffer> vbuf = g.vbuf[stateInfo->currentFrameSlot];
id<MTLBuffer> ubuf = g.ubuf[stateInfo->currentFrameSlot];
const QQuickWindow::GraphicsStateInfo &stateInfo(m_window->graphicsStateInfo());
id<MTLBuffer> vbuf = g.vbuf[stateInfo.currentFrameSlot];
id<MTLBuffer> ubuf = g.ubuf[stateInfo.currentFrameSlot];
QPointF p0(m_width - 1, m_height - 1);
QPointF p1(0, 0);

View File

@ -5,7 +5,7 @@ qtConfig(opengl(es1|es2)?) {
graph \
simplematerial \
sgengine \
textureinsgnode \
fboitem \
openglunderqml \
textureinthread \
twotextureproviders

View File

@ -212,7 +212,7 @@ void SquircleRenderer::frameStart()
prepareShader(FragmentStage);
if (!m_initialized)
init(m_window->graphicsStateInfo()->framesInFlight);
init(m_window->graphicsStateInfo().framesInFlight);
}
static const float vertices[] = {
@ -230,10 +230,10 @@ void SquircleRenderer::mainPassRecordingStart()
// the scenegraph's main renderpass. It does not create its own passes,
// rendertargets, etc. so no synchronization is needed.
const QQuickWindow::GraphicsStateInfo *stateInfo = m_window->graphicsStateInfo();
const QQuickWindow::GraphicsStateInfo &stateInfo(m_window->graphicsStateInfo());
QSGRendererInterface *rif = m_window->rendererInterface();
VkDeviceSize ubufOffset = stateInfo->currentFrameSlot * m_allocPerUbuf;
VkDeviceSize ubufOffset = stateInfo.currentFrameSlot * m_allocPerUbuf;
void *p = nullptr;
VkResult err = m_devFuncs->vkMapMemory(m_dev, m_ubufMem, ubufOffset, m_allocPerUbuf, 0, &p);
if (err != VK_SUCCESS || !p)
@ -259,7 +259,7 @@ void SquircleRenderer::mainPassRecordingStart()
VkDeviceSize vbufOffset = 0;
m_devFuncs->vkCmdBindVertexBuffers(cb, 0, 1, &m_vbuf, &vbufOffset);
uint32_t dynamicOffset = m_allocPerUbuf * stateInfo->currentFrameSlot;
uint32_t dynamicOffset = m_allocPerUbuf * stateInfo.currentFrameSlot;
m_devFuncs->vkCmdBindDescriptorSets(cb, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout, 0, 1,
&m_ubufDescriptor, 1, &dynamicOffset);
@ -362,13 +362,13 @@ void SquircleRenderer::init(int framesInFlight)
}
}
}
if (memTypeIndex < 0)
if (memTypeIndex == uint32_t(-1))
qFatal("Failed to find host visible and coherent memory type");
allocInfo.memoryTypeIndex = memTypeIndex;
err = m_devFuncs->vkAllocateMemory(m_dev, &allocInfo, nullptr, &m_vbufMem);
if (err != VK_SUCCESS)
qFatal("Failed to allocate vertex buffer memory of size %llu: %d", allocInfo.allocationSize, err);
qFatal("Failed to allocate vertex buffer memory of size %u: %d", uint(allocInfo.allocationSize), err);
void *p = nullptr;
err = m_devFuncs->vkMapMemory(m_dev, m_vbufMem, 0, allocInfo.allocationSize, 0, &p);
@ -412,14 +412,14 @@ void SquircleRenderer::init(int framesInFlight)
}
}
}
if (memTypeIndex < 0)
if (memTypeIndex == uint32_t(-1))
qFatal("Failed to find host visible and coherent memory type");
allocInfo.allocationSize = framesInFlight * m_allocPerUbuf;
allocInfo.memoryTypeIndex = memTypeIndex;
err = m_devFuncs->vkAllocateMemory(m_dev, &allocInfo, nullptr, &m_ubufMem);
if (err != VK_SUCCESS)
qFatal("Failed to allocate uniform buffer memory of size %llu: %d", allocInfo.allocationSize, err);
qFatal("Failed to allocate uniform buffer memory of size %u: %d", uint(allocInfo.allocationSize), err);
err = m_devFuncs->vkBindBufferMemory(m_dev, m_ubuf, m_ubufMem, 0);
if (err != VK_SUCCESS)

View File

@ -170,14 +170,45 @@ Rectangle {
property variant resizers: []
property variant funcs
property Component mouseArea: Component {
Rectangle {
id: rr
property variant obj
property string xprop
property string yprop
width: 20
height: 20
MouseArea {
property bool a: false
anchors.fill: parent
hoverEnabled: true
onEntered: color = "yellow"
onExited: color = rr.color
onPressed: a = true
onReleased: a = false
onPositionChanged: {
if (a) {
var pt = mapToItem(rr.parent, mouse.x, mouse.y);
rr.obj[rr.xprop] = pt.x
rr.obj[rr.yprop] = pt.y
rr.x = pt.x - 10
rr.y = pt.y - 10
}
}
}
}
}
function genResizer(obj, x, y, xprop, yprop, color) {
var ma = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; Rectangle { id: rr; property variant obj; color: "' + color + '"; width: 20; height: 20;'+
'MouseArea { anchors.fill: parent; hoverEnabled: true;' +
'onEntered: color = "yellow"; onExited: color = "' + color + '";' +
'property bool a: false; onPressed: a = true; onReleased: a = false; ' +
'onPositionChanged: if (a) { var pt = mapToItem(rr.parent, mouse.x, mouse.y);' +
'obj.' + xprop + ' = pt.x; obj.' + yprop + ' = pt.y; rr.x = pt.x - 10; rr.y = pt.y - 10; } } }',
canvas, "resizer_item");
var ma = mouseArea.createObject(canvas, {
color: color,
xprop: xprop,
yprop: yprop
});
ma.visible = root.showResizers;
ma.obj = obj;
ma.x = x - 10;
@ -186,15 +217,55 @@ Rectangle {
return ma;
}
property Component linePath: Component {
ShapePath {
id: lineShapePath
strokeColor: "black"
strokeWidth: widthSlider.value
fillColor: "transparent"
PathLine {
x: lineShapePath.startX + 1
y: lineShapePath.startY + 1
}
}
}
property Component cubicPath: Component {
ShapePath {
id: cubicShapePath
strokeColor: "black"
strokeWidth: widthSlider.value
fillColor: root.fill ? 'green' : 'transparent'
PathCubic {
x: cubicShapePath.startX + 1
y: cubicShapePath.startY + 1
control1X: cubicShapePath.startX + 50;
control1Y: cubicShapePath.startY + 50;
control2X: cubicShapePath.startX + 150;
control2Y: cubicShapePath.startY + 50;
}
}
}
property Component quadPath: Component {
ShapePath {
id: quadShapePath
strokeColor: "black"
strokeWidth: widthSlider.value
fillColor: root.fill ? 'green' : 'transparent'
PathQuad {
x: quadShapePath.startx + 1
y: quadShapePath.startY + 1
controlX: quadShapePath.startX + 50
controlY: quadShapePath.startY + 50
}
}
}
Component.onCompleted: {
funcs = [
{ "start": function(x, y) {
var p = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; ShapePath {' +
'strokeColor: "black"; fillColor: "transparent";'+
'strokeWidth: ' + widthSlider.value + ';' +
'startX: ' + x + '; startY: ' + y + ';' +
'PathLine { x: ' + x + ' + 1; y: ' + y + ' + 1 } }',
root, "dynamic_visual_path");
var p = linePath.createObject(root, { startX: x, startY: y });
shape.data.push(p);
activePath = p;
}, "move": function(x, y) {
@ -211,13 +282,7 @@ Rectangle {
}
},
{ "start": function(x, y) {
var p = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; ShapePath {' +
'strokeColor: "black"; fillColor: "' + (root.fill ? 'green' : 'transparent') + '";'+
'strokeWidth: ' + widthSlider.value + ';' +
'startX: ' + x + '; startY: ' + y + ';' +
'PathCubic { x: ' + x + ' + 1; y: ' + y + ' + 1;' +
'control1X: ' + x + ' + 50; control1Y: ' + y + ' + 50; control2X: ' + x + ' + 150; control2Y: ' + y + ' + 50; } }',
root, "dynamic_visual_path");
var p = cubicPath.createObject(root, { startX: x, startY: y });
shape.data.push(p);
activePath = p;
}, "move": function(x, y) {
@ -236,13 +301,7 @@ Rectangle {
}
},
{ "start": function(x, y) {
var p = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; ShapePath {' +
'strokeColor: "black"; fillColor: "' + (root.fill ? 'green' : 'transparent') + '";'+
'strokeWidth: ' + widthSlider.value + ';' +
'startX: ' + x + '; startY: ' + y + ';' +
'PathQuad { x: ' + x + ' + 1; y: ' + y + ' + 1;' +
'controlX: ' + x + ' + 50; controlY: ' + y + ' + 50 } }',
root, "dynamic_visual_path");
var p = quadPath.createObject(root, { startX: x, startY: y });
shape.data.push(p);
activePath = p;
}, "move": function(x, y) {

View File

@ -1685,6 +1685,17 @@ Module {
"ChecksumItuV41": 1
}
}
Enum {
name: "HighDpiScaleFactorRoundingPolicy"
values: {
"Unset": 0,
"Round": 1,
"Ceil": 2,
"Floor": 3,
"RoundPreferFloor": 4,
"PassThrough": 5
}
}
}
Component { name: "QEasingCurve"; prototype: "QQmlEasingValueType" }
}

View File

@ -8,6 +8,280 @@ import QtQuick.tooling 1.2
Module {
dependencies: ["QtQuick 2.0"]
Component {
name: "QAbstractItemModel"
prototype: "QObject"
Enum {
name: "LayoutChangeHint"
values: {
"NoLayoutChangeHint": 0,
"VerticalSortHint": 1,
"HorizontalSortHint": 2
}
}
Enum {
name: "CheckIndexOption"
values: {
"NoOption": 0,
"IndexIsValid": 1,
"DoNotUseParent": 2,
"ParentIsInvalid": 4
}
}
Signal {
name: "dataChanged"
Parameter { name: "topLeft"; type: "QModelIndex" }
Parameter { name: "bottomRight"; type: "QModelIndex" }
Parameter { name: "roles"; type: "QVector<int>" }
}
Signal {
name: "dataChanged"
Parameter { name: "topLeft"; type: "QModelIndex" }
Parameter { name: "bottomRight"; type: "QModelIndex" }
}
Signal {
name: "headerDataChanged"
Parameter { name: "orientation"; type: "Qt::Orientation" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "layoutChanged"
Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
}
Signal {
name: "layoutChanged"
Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
}
Signal { name: "layoutChanged" }
Signal {
name: "layoutAboutToBeChanged"
Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
}
Signal {
name: "layoutAboutToBeChanged"
Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
}
Signal { name: "layoutAboutToBeChanged" }
Signal {
name: "rowsAboutToBeInserted"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "rowsInserted"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "rowsAboutToBeRemoved"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "rowsRemoved"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "columnsAboutToBeInserted"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "columnsInserted"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "columnsAboutToBeRemoved"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal {
name: "columnsRemoved"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "first"; type: "int" }
Parameter { name: "last"; type: "int" }
}
Signal { name: "modelAboutToBeReset" }
Signal { name: "modelReset" }
Signal {
name: "rowsAboutToBeMoved"
Parameter { name: "sourceParent"; type: "QModelIndex" }
Parameter { name: "sourceStart"; type: "int" }
Parameter { name: "sourceEnd"; type: "int" }
Parameter { name: "destinationParent"; type: "QModelIndex" }
Parameter { name: "destinationRow"; type: "int" }
}
Signal {
name: "rowsMoved"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "start"; type: "int" }
Parameter { name: "end"; type: "int" }
Parameter { name: "destination"; type: "QModelIndex" }
Parameter { name: "row"; type: "int" }
}
Signal {
name: "columnsAboutToBeMoved"
Parameter { name: "sourceParent"; type: "QModelIndex" }
Parameter { name: "sourceStart"; type: "int" }
Parameter { name: "sourceEnd"; type: "int" }
Parameter { name: "destinationParent"; type: "QModelIndex" }
Parameter { name: "destinationColumn"; type: "int" }
}
Signal {
name: "columnsMoved"
Parameter { name: "parent"; type: "QModelIndex" }
Parameter { name: "start"; type: "int" }
Parameter { name: "end"; type: "int" }
Parameter { name: "destination"; type: "QModelIndex" }
Parameter { name: "column"; type: "int" }
}
Method { name: "submit"; type: "bool" }
Method { name: "revert" }
Method {
name: "hasIndex"
type: "bool"
Parameter { name: "row"; type: "int" }
Parameter { name: "column"; type: "int" }
Parameter { name: "parent"; type: "QModelIndex" }
}
Method {
name: "hasIndex"
type: "bool"
Parameter { name: "row"; type: "int" }
Parameter { name: "column"; type: "int" }
}
Method {
name: "index"
type: "QModelIndex"
Parameter { name: "row"; type: "int" }
Parameter { name: "column"; type: "int" }
Parameter { name: "parent"; type: "QModelIndex" }
}
Method {
name: "index"
type: "QModelIndex"
Parameter { name: "row"; type: "int" }
Parameter { name: "column"; type: "int" }
}
Method {
name: "parent"
type: "QModelIndex"
Parameter { name: "child"; type: "QModelIndex" }
}
Method {
name: "sibling"
type: "QModelIndex"
Parameter { name: "row"; type: "int" }
Parameter { name: "column"; type: "int" }
Parameter { name: "idx"; type: "QModelIndex" }
}
Method {
name: "rowCount"
type: "int"
Parameter { name: "parent"; type: "QModelIndex" }
}
Method { name: "rowCount"; type: "int" }
Method {
name: "columnCount"
type: "int"
Parameter { name: "parent"; type: "QModelIndex" }
}
Method { name: "columnCount"; type: "int" }
Method {
name: "hasChildren"
type: "bool"
Parameter { name: "parent"; type: "QModelIndex" }
}
Method { name: "hasChildren"; type: "bool" }
Method {
name: "data"
type: "QVariant"
Parameter { name: "index"; type: "QModelIndex" }
Parameter { name: "role"; type: "int" }
}
Method {
name: "data"
type: "QVariant"
Parameter { name: "index"; type: "QModelIndex" }
}
Method {
name: "setData"
type: "bool"
Parameter { name: "index"; type: "QModelIndex" }
Parameter { name: "value"; type: "QVariant" }
Parameter { name: "role"; type: "int" }
}
Method {
name: "setData"
type: "bool"
Parameter { name: "index"; type: "QModelIndex" }
Parameter { name: "value"; type: "QVariant" }
}
Method {
name: "headerData"
type: "QVariant"
Parameter { name: "section"; type: "int" }
Parameter { name: "orientation"; type: "Qt::Orientation" }
Parameter { name: "role"; type: "int" }
}
Method {
name: "headerData"
type: "QVariant"
Parameter { name: "section"; type: "int" }
Parameter { name: "orientation"; type: "Qt::Orientation" }
}
Method {
name: "fetchMore"
Parameter { name: "parent"; type: "QModelIndex" }
}
Method {
name: "canFetchMore"
type: "bool"
Parameter { name: "parent"; type: "QModelIndex" }
}
Method {
name: "flags"
type: "Qt::ItemFlags"
Parameter { name: "index"; type: "QModelIndex" }
}
Method {
name: "match"
type: "QModelIndexList"
Parameter { name: "start"; type: "QModelIndex" }
Parameter { name: "role"; type: "int" }
Parameter { name: "value"; type: "QVariant" }
Parameter { name: "hits"; type: "int" }
Parameter { name: "flags"; type: "Qt::MatchFlags" }
}
Method {
name: "match"
type: "QModelIndexList"
Parameter { name: "start"; type: "QModelIndex" }
Parameter { name: "role"; type: "int" }
Parameter { name: "value"; type: "QVariant" }
Parameter { name: "hits"; type: "int" }
}
Method {
name: "match"
type: "QModelIndexList"
Parameter { name: "start"; type: "QModelIndex" }
Parameter { name: "role"; type: "int" }
Parameter { name: "value"; type: "QVariant" }
}
}
Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
Component {
name: "QQuickFolderListModel"
prototype: "QAbstractListModel"

View File

@ -539,6 +539,8 @@ QStringList QQuickFolderListModel::nameFilters() const
void QQuickFolderListModel::setNameFilters(const QStringList &filters)
{
Q_D(QQuickFolderListModel);
if (d->nameFilters == filters)
return;
d->fileInfoThread.setNameFilters(filters);
d->nameFilters = filters;
}
@ -731,6 +733,7 @@ void QQuickFolderListModel::setShowDotAndDotDot(bool on)
if (on != d->showDotAndDotDot) {
d->fileInfoThread.setShowDotAndDotDot(on);
d->showDotAndDotDot = on;
}
}
@ -756,6 +759,7 @@ void QQuickFolderListModel::setShowHidden(bool on)
if (on != d->showHidden) {
d->fileInfoThread.setShowHidden(on);
d->showHidden = on;
}
}
@ -781,6 +785,7 @@ void QQuickFolderListModel::setShowOnlyReadable(bool on)
if (on != d->showOnlyReadable) {
d->fileInfoThread.setShowOnlyReadable(on);
d->showOnlyReadable = on;
}
}
@ -805,6 +810,7 @@ void QQuickFolderListModel::setCaseSensitive(bool on)
if (on != d->caseSensitive) {
d->fileInfoThread.setCaseSensitive(on);
d->caseSensitive = on;
}
}
@ -852,7 +858,7 @@ QQuickFolderListModel::Status QQuickFolderListModel::status() const
\qmlproperty bool FolderListModel::sortCaseSensitive
\since 5.12
If set to true, the sort is case sensitive. This property is true by default.
If set to \c true, the sort is case sensitive. This property is \c true by default.
*/
bool QQuickFolderListModel::sortCaseSensitive() const
@ -874,8 +880,8 @@ void QQuickFolderListModel::setSortCaseSensitive(bool on)
/*!
\qmlmethod var FolderListModel::get(int index, string property)
Get the folder property for the given index. The following properties
are available.
Returns the folder \a property for the given \a index. The following properties
are available:
\list
\li \c fileName
@ -902,7 +908,7 @@ QVariant QQuickFolderListModel::get(int idx, const QString &property) const
\qmlmethod int FolderListModel::indexOf(url file)
\since 5.6
Get the index of the given file URL if the model contains it,
Returns the index of the given \a file URL if the model contains it,
or -1 if not.
*/
int QQuickFolderListModel::indexOf(const QUrl &file) const

View File

@ -28,6 +28,6 @@ qtHaveModule(quick) {
qtConfig(quick-particles): \
SUBDIRS += particles
qtConfig(quick-path):qtConfig(thread): SUBDIRS += shapes
qtConfig(quick-path): SUBDIRS += shapes
}

View File

@ -4,10 +4,10 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
// 'qmlplugindump -nonrelocatable Qt.labs.animation 1.0'
// 'qmlplugindump -nonrelocatable -dependencies dependencies.json Qt.labs.animation 1.0'
Module {
dependencies: ["QtQuick 2.0"]
dependencies: []
Component {
name: "QQuickBoundaryRule"
prototype: "QObject"

View File

@ -483,6 +483,58 @@ Module {
}
}
Component { name: "QQmlDelegateModelParts"; prototype: "QObject" }
Component {
name: "QQmlInstanceModel"
prototype: "QObject"
Property { name: "count"; type: "int"; isReadonly: true }
Signal {
name: "modelUpdated"
Parameter { name: "changeSet"; type: "QQmlChangeSet" }
Parameter { name: "reset"; type: "bool" }
}
Signal {
name: "createdItem"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Signal {
name: "initItem"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Signal {
name: "destroyingItem"
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
}
Component {
name: "QQmlInstantiator"
defaultProperty: "delegate"
prototype: "QObject"
exports: ["QtQml.Models/Instantiator 2.14"]
exportMetaObjectRevisions: [0]
Property { name: "active"; type: "bool" }
Property { name: "asynchronous"; type: "bool" }
Property { name: "model"; type: "QVariant" }
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
Property { name: "object"; type: "QObject"; isReadonly: true; isPointer: true }
Signal {
name: "objectAdded"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Signal {
name: "objectRemoved"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Method {
name: "objectAt"
type: "QObject*"
Parameter { name: "index"; type: "int" }
}
}
Component {
name: "QQmlListElement"
prototype: "QObject"

View File

@ -1080,6 +1080,56 @@ Module {
Parameter { name: "arg"; type: "bool" }
}
}
Component {
name: "QQuickStochasticState"
prototype: "QObject"
Property { name: "duration"; type: "int" }
Property { name: "durationVariation"; type: "int" }
Property { name: "randomStart"; type: "bool" }
Property { name: "to"; type: "QVariantMap" }
Property { name: "name"; type: "string" }
Signal {
name: "durationChanged"
Parameter { name: "arg"; type: "int" }
}
Signal {
name: "nameChanged"
Parameter { name: "arg"; type: "string" }
}
Signal {
name: "toChanged"
Parameter { name: "arg"; type: "QVariantMap" }
}
Signal {
name: "durationVariationChanged"
Parameter { name: "arg"; type: "int" }
}
Signal { name: "entered" }
Signal {
name: "randomStartChanged"
Parameter { name: "arg"; type: "bool" }
}
Method {
name: "setDuration"
Parameter { name: "arg"; type: "int" }
}
Method {
name: "setName"
Parameter { name: "arg"; type: "string" }
}
Method {
name: "setTo"
Parameter { name: "arg"; type: "QVariantMap" }
}
Method {
name: "setDurationVariation"
Parameter { name: "arg"; type: "int" }
}
Method {
name: "setRandomStart"
Parameter { name: "arg"; type: "bool" }
}
}
Component {
name: "QQuickTargetDirection"
prototype: "QQuickDirection"

View File

@ -10,8 +10,8 @@ Module {
dependencies: []
Component {
name: "QObject"
exports: ["QML/QtObject 1.0", "QtQml/QtObject 2.0"]
exportMetaObjectRevisions: [0, 0]
exports: ["QtQml/QtObject 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "objectName"; type: "string" }
Signal {
name: "objectNameChanged"
@ -52,8 +52,8 @@ Module {
Component {
name: "QQmlComponent"
prototype: "QObject"
exports: ["QML/Component 1.0", "QtQml/Component 2.0"]
exportMetaObjectRevisions: [0, 0]
exports: ["QtQml/Component 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQmlComponentAttached"
Enum {
name: "CompilationMode"
@ -242,18 +242,4 @@ Module {
Method { name: "stop" }
Method { name: "restart" }
}
Component {
name: "QQuickMouseEvent"
prototype: "QObject"
Property { name: "x"; type: "double"; isReadonly: true }
Property { name: "y"; type: "double"; isReadonly: true }
Property { name: "button"; type: "int"; isReadonly: true }
Property { name: "buttons"; type: "int"; isReadonly: true }
Property { name: "modifiers"; type: "int"; isReadonly: true }
Property { name: "source"; revision: 7; type: "int"; isReadonly: true }
Property { name: "wasHeld"; type: "bool"; isReadonly: true }
Property { name: "isClick"; type: "bool"; isReadonly: true }
Property { name: "accepted"; type: "bool" }
Property { name: "flags"; revision: 11; type: "int"; isReadonly: true }
}
}

View File

@ -448,6 +448,22 @@ Module {
}
}
}
Component {
name: "QObject"
exports: ["QtQuick/QtObject 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "objectName"; type: "string" }
Signal {
name: "objectNameChanged"
Parameter { name: "objectName"; type: "string" }
}
Method { name: "toString" }
Method { name: "destroy" }
Method {
name: "destroy"
Parameter { name: "delay"; type: "int" }
}
}
Component {
name: "QPointingDeviceUniqueId"
exports: ["QtQuick/PointingDeviceUniqueId 2.9"]
@ -481,6 +497,92 @@ Module {
Parameter { name: "arg"; type: "string" }
}
}
Component {
name: "QQmlBind"
prototype: "QObject"
exports: ["QtQuick/Binding 2.0", "QtQuick/Binding 2.8"]
exportMetaObjectRevisions: [0, 8]
Enum {
name: "RestorationMode"
values: {
"RestoreNone": 0,
"RestoreBinding": 1,
"RestoreValue": 2,
"RestoreBindingOrValue": 3
}
}
Property { name: "target"; type: "QObject"; isPointer: true }
Property { name: "property"; type: "string" }
Property { name: "value"; type: "QVariant" }
Property { name: "when"; type: "bool" }
Property { name: "delayed"; revision: 8; type: "bool" }
Property { name: "restoreMode"; revision: 14; type: "RestorationMode" }
}
Component {
name: "QQmlComponent"
prototype: "QObject"
exports: ["QtQuick/Component 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQmlComponentAttached"
Enum {
name: "CompilationMode"
values: {
"PreferSynchronous": 0,
"Asynchronous": 1
}
}
Enum {
name: "Status"
values: {
"Null": 0,
"Ready": 1,
"Loading": 2,
"Error": 3
}
}
Property { name: "progress"; type: "double"; isReadonly: true }
Property { name: "status"; type: "Status"; isReadonly: true }
Property { name: "url"; type: "QUrl"; isReadonly: true }
Signal {
name: "statusChanged"
Parameter { type: "QQmlComponent::Status" }
}
Signal {
name: "progressChanged"
Parameter { type: "double" }
}
Method {
name: "loadUrl"
Parameter { name: "url"; type: "QUrl" }
}
Method {
name: "loadUrl"
Parameter { name: "url"; type: "QUrl" }
Parameter { name: "mode"; type: "CompilationMode" }
}
Method {
name: "setData"
Parameter { type: "QByteArray" }
Parameter { name: "baseUrl"; type: "QUrl" }
}
Method { name: "errorString"; type: "string" }
}
Component {
name: "QQmlComponentAttached"
prototype: "QObject"
Signal { name: "completed" }
Signal { name: "destruction" }
}
Component {
name: "QQmlConnections"
prototype: "QObject"
exports: ["QtQuick/Connections 2.0", "QtQuick/Connections 2.7"]
exportMetaObjectRevisions: [0, 3]
Property { name: "target"; type: "QObject"; isPointer: true }
Property { name: "enabled"; revision: 3; type: "bool" }
Property { name: "ignoreUnknownSignals"; type: "bool" }
Signal { name: "enabledChanged"; revision: 3 }
}
Component {
name: "QQmlDelegateModel"
defaultProperty: "delegate"
@ -633,6 +735,58 @@ Module {
Property { name: "period"; type: "double" }
Property { name: "bezierCurve"; type: "QVariantList" }
}
Component {
name: "QQmlInstanceModel"
prototype: "QObject"
Property { name: "count"; type: "int"; isReadonly: true }
Signal {
name: "modelUpdated"
Parameter { name: "changeSet"; type: "QQmlChangeSet" }
Parameter { name: "reset"; type: "bool" }
}
Signal {
name: "createdItem"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Signal {
name: "initItem"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Signal {
name: "destroyingItem"
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
}
Component {
name: "QQmlInstantiator"
defaultProperty: "delegate"
prototype: "QObject"
exports: ["QtQuick/Instantiator 2.1"]
exportMetaObjectRevisions: [0]
Property { name: "active"; type: "bool" }
Property { name: "asynchronous"; type: "bool" }
Property { name: "model"; type: "QVariant" }
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
Property { name: "object"; type: "QObject"; isReadonly: true; isPointer: true }
Signal {
name: "objectAdded"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Signal {
name: "objectRemoved"
Parameter { name: "index"; type: "int" }
Parameter { name: "object"; type: "QObject"; isPointer: true }
}
Method {
name: "objectAt"
type: "QObject*"
Parameter { name: "index"; type: "int" }
}
}
Component {
name: "QQmlListElement"
prototype: "QObject"
@ -732,6 +886,70 @@ Module {
}
Method { name: "sync" }
}
Component {
name: "QQmlLocale"
exports: ["QtQuick/Locale 2.0"]
isCreatable: false
exportMetaObjectRevisions: [0]
Enum {
name: "MeasurementSystem"
values: {
"MetricSystem": 0,
"ImperialSystem": 1,
"ImperialUSSystem": 1,
"ImperialUKSystem": 2
}
}
Enum {
name: "FormatType"
values: {
"LongFormat": 0,
"ShortFormat": 1,
"NarrowFormat": 2
}
}
Enum {
name: "CurrencySymbolFormat"
values: {
"CurrencyIsoCode": 0,
"CurrencySymbol": 1,
"CurrencyDisplayName": 2
}
}
Enum {
name: "DayOfWeek"
values: {
"Sunday": 0,
"Monday": 1,
"Tuesday": 2,
"Wednesday": 3,
"Thursday": 4,
"Friday": 5,
"Saturday": 6
}
}
}
Component {
name: "QQmlLoggingCategory"
prototype: "QObject"
exports: [
"QtQuick/LoggingCategory 2.12",
"QtQuick/LoggingCategory 2.8"
]
exportMetaObjectRevisions: [12, 0]
Enum {
name: "DefaultLogLevel"
values: {
"Debug": 0,
"Info": 4,
"Warning": 1,
"Critical": 2,
"Fatal": 3
}
}
Property { name: "name"; type: "string" }
Property { name: "defaultLogLevel"; revision: 12; type: "DefaultLogLevel" }
}
Component {
name: "QQmlObjectModel"
defaultProperty: "children"
@ -788,6 +1006,21 @@ Module {
prototype: "QObject"
Property { name: "index"; type: "int"; isReadonly: true }
}
Component {
name: "QQmlTimer"
prototype: "QObject"
exports: ["QtQuick/Timer 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "interval"; type: "int" }
Property { name: "running"; type: "bool" }
Property { name: "repeat"; type: "bool" }
Property { name: "triggeredOnStart"; type: "bool" }
Property { name: "parent"; type: "QObject"; isReadonly: true; isPointer: true }
Signal { name: "triggered" }
Method { name: "start" }
Method { name: "stop" }
Method { name: "restart" }
}
Component {
name: "QQuickAbstractAnimation"
prototype: "QObject"
@ -1569,8 +1802,8 @@ Module {
Component {
name: "QQuickDragHandler"
prototype: "QQuickMultiPointHandler"
exports: ["QtQuick/DragHandler 2.12"]
exportMetaObjectRevisions: [12]
exports: ["QtQuick/DragHandler 2.12", "QtQuick/DragHandler 2.14"]
exportMetaObjectRevisions: [12, 14]
Enum {
name: "SnapMode"
values: {
@ -1583,7 +1816,8 @@ Module {
Property { name: "xAxis"; type: "QQuickDragAxis"; isReadonly: true; isPointer: true }
Property { name: "yAxis"; type: "QQuickDragAxis"; isReadonly: true; isPointer: true }
Property { name: "translation"; type: "QVector2D"; isReadonly: true }
Property { name: "snapMode"; type: "SnapMode" }
Property { name: "snapMode"; revision: 14; type: "SnapMode" }
Signal { name: "snapModeChanged"; revision: 14 }
}
Component {
name: "QQuickDropArea"
@ -2282,12 +2516,13 @@ Module {
"QtQuick/Image 2.0",
"QtQuick/Image 2.1",
"QtQuick/Image 2.11",
"QtQuick/Image 2.14",
"QtQuick/Image 2.3",
"QtQuick/Image 2.4",
"QtQuick/Image 2.5",
"QtQuick/Image 2.7"
]
exportMetaObjectRevisions: [0, 1, 11, 3, 4, 5, 7]
exportMetaObjectRevisions: [0, 1, 11, 14, 3, 4, 5, 7]
Enum {
name: "HAlignment"
values: {
@ -2343,6 +2578,9 @@ Module {
name: "QQuickImageBase"
defaultProperty: "data"
prototype: "QQuickImplicitSizeItem"
exports: ["QtQuick/ImageBase 2.14"]
isCreatable: false
exportMetaObjectRevisions: [14]
Enum {
name: "Status"
values: {
@ -2359,6 +2597,8 @@ Module {
Property { name: "cache"; type: "bool" }
Property { name: "sourceSize"; type: "QSize" }
Property { name: "mirror"; type: "bool" }
Property { name: "currentFrame"; revision: 14; type: "int" }
Property { name: "frameCount"; revision: 14; type: "int"; isReadonly: true }
Signal {
name: "sourceChanged"
Parameter { type: "QUrl" }
@ -2371,6 +2611,8 @@ Module {
name: "progressChanged"
Parameter { name: "progress"; type: "double" }
}
Signal { name: "currentFrameChanged"; revision: 14 }
Signal { name: "frameCountChanged"; revision: 14 }
}
Component {
name: "QQuickImplicitSizeItem"
@ -3188,6 +3430,20 @@ Module {
Signal { name: "containsPressChanged"; revision: 4 }
Signal { name: "pressAndHoldIntervalChanged"; revision: 9 }
}
Component {
name: "QQuickMouseEvent"
prototype: "QObject"
Property { name: "x"; type: "double"; isReadonly: true }
Property { name: "y"; type: "double"; isReadonly: true }
Property { name: "button"; type: "int"; isReadonly: true }
Property { name: "buttons"; type: "int"; isReadonly: true }
Property { name: "modifiers"; type: "int"; isReadonly: true }
Property { name: "source"; revision: 7; type: "int"; isReadonly: true }
Property { name: "wasHeld"; type: "bool"; isReadonly: true }
Property { name: "isClick"; type: "bool"; isReadonly: true }
Property { name: "accepted"; type: "bool" }
Property { name: "flags"; revision: 11; type: "int"; isReadonly: true }
}
Component {
name: "QQuickMultiPointHandler"
prototype: "QQuickPointerDeviceHandler"
@ -3535,7 +3791,7 @@ Module {
exports: ["QtQuick/PathMultiline 2.14"]
exportMetaObjectRevisions: [14]
Property { name: "start"; type: "QPointF"; isReadonly: true }
Property { name: "paths"; type: "QVariantList" }
Property { name: "paths"; type: "QVariant" }
}
Component {
name: "QQuickPathPercent"
@ -3550,7 +3806,7 @@ Module {
exports: ["QtQuick/PathPolyline 2.14"]
exportMetaObjectRevisions: [14]
Property { name: "start"; type: "QPointF"; isReadonly: true }
Property { name: "path"; type: "QVariantList" }
Property { name: "path"; type: "QVariant" }
}
Component {
name: "QQuickPathQuad"

View File

@ -473,7 +473,7 @@ QVariant QQmlSettings::value(const QString &key, const QVariant &defaultValue) c
/*!
\qmlmethod Settings::setValue(string key, var value)
Sets the value of setting key to value. If the key already exists,
Sets the value of setting \a key to \a value. If the key already exists,
the previous value is overwritten.
\since Qt 5.12

View File

@ -104,6 +104,12 @@ Module {
"NativeTextRendering": 1
}
}
Enum {
name: "NativeObjectType"
values: {
"NativeObjectTexture": 0
}
}
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "color"; type: "QColor" }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }

View File

@ -179,7 +179,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_tabled.frag.qsb"));
}
bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@ -216,7 +216,7 @@ public:
return true;
}
void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@ -331,7 +331,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_deformed.frag.qsb"));
}
bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@ -357,7 +357,7 @@ public:
return true;
}
void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@ -487,7 +487,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_sprite.frag.qsb"));
}
bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@ -524,7 +524,7 @@ public:
return true;
}
void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@ -651,7 +651,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_colored.frag.qsb"));
}
bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@ -677,7 +677,7 @@ public:
return true;
}
void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();
@ -799,7 +799,7 @@ public:
setShaderFileName(FragmentStage, QStringLiteral(":/particles/shaders_ng/imageparticle_simple.frag.qsb"));
}
bool updateUniformData(const RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
bool updateUniformData(RenderState &renderState, QSGMaterial *newMaterial, QSGMaterial *) override
{
QByteArray *buf = renderState.uniformData();
Q_ASSERT(buf->size() >= 80 + 2 * (UNIFORM_ARRAY_SIZE * 4 * 4));
@ -825,7 +825,7 @@ public:
return true;
}
void updateSampledImage(const RenderState &renderState, int binding, QSGTexture **texture,
void updateSampledImage(RenderState &renderState, int binding, QSGTexture **texture,
QSGMaterial *newMaterial, QSGMaterial *) override
{
ImageMaterialData *state = static_cast<ImageMaterial *>(newMaterial)->state();

View File

@ -59,32 +59,38 @@ QT_BEGIN_NAMESPACE
/*!
\qmlmethod QtQuick.Particles::ItemParticle::freeze(Item item)
Suspends the flow of time for the logical particle which item represents, allowing you to control its movement.
Suspends the flow of time for the logical particle which \a item represents,
allowing you to control its movement.
*/
/*!
\qmlmethod QtQuick.Particles::ItemParticle::unfreeze(Item item)
Restarts the flow of time for the logical particle which item represents, allowing it to be moved by the particle system again.
Restarts the flow of time for the logical particle which \a item represents,
allowing it to be moved by the particle system again.
*/
/*!
\qmlmethod QtQuick.Particles::ItemParticle::take(Item item, bool prioritize)
Asks the ItemParticle to take over control of item positioning temporarily.
Asks the ItemParticle to take over control of \a item positioning temporarily.
It will follow the movement of a logical particle when one is available.
By default items form a queue when waiting for a logical particle, but if prioritize is true then it will go immediately to the
head of the queue.
By default items form a queue when waiting for a logical particle, but if
\a prioritize is \c true, then it will go immediately to the head of the
queue.
ItemParticle does not take ownership of the item, and will relinquish
control when the logical particle expires. Commonly at this point you will
want to put it back in the queue, you can do this with the below line in
the delegate definition:
\code
ItemParticle.onDetached: itemParticleInstance.take(delegateRootItem);
\endcode
or delete it, such as with the below line in the delegate definition:
\code
ItemParticle.onDetached: delegateRootItem.destroy();
\endcode
@ -93,7 +99,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlmethod QtQuick.Particles::ItemParticle::give(Item item)
Orders the ItemParticle to give you control of the item. It will cease controlling it and the item will lose its association to the logical particle.
Orders the ItemParticle to give you control of the \a item. It will cease
controlling it and the item will lose its association to the logical
particle.
*/
/*!

View File

@ -125,7 +125,7 @@ QT_BEGIN_NAMESPACE
themselves). As this executes JavaScript code per particle, it is not recommended to use this
signal with a high-volume particle system.
x,y is the particle's current position.
(\a {x}, \a {y}) is the particle's current position.
The corresponding handler is \c onAffected.
*/

View File

@ -191,10 +191,10 @@ QT_BEGIN_NAMESPACE
/*!
\qmlsignal QtQuick.Particles::Emitter::emitParticles(Array particles)
This signal is emitted when particles are emitted. particles is a JavaScript
This signal is emitted when particles are emitted. \a particles is a JavaScript
array of Particle objects. You can modify particle attributes directly within the handler.
Note that JavaScript is slower to execute, so it is not recommended to use this in
\note JavaScript is slower to execute, so it is not recommended to use this in
high-volume particle systems.
The corresponding handler is \c onEmitParticles.
@ -202,19 +202,20 @@ QT_BEGIN_NAMESPACE
/*! \qmlmethod QtQuick.Particles::Emitter::burst(int count)
Emits count particles from this emitter immediately.
Emits a number of particles, specified by \a count, from this emitter immediately.
*/
/*! \qmlmethod QtQuick.Particles::Emitter::burst(int count, int x, int y)
Emits count particles from this emitter immediately. The particles are emitted
as if the Emitter was positioned at x,y but all other properties are the same.
Emits a number of particles, specified by \a count, from this emitter immediately.
The particles are emitted as if the Emitter was positioned at (\a {x}, \a {y}) but
all other properties are the same.
*/
/*! \qmlmethod QtQuick.Particles::Emitter::pulse(int duration)
If the emitter is not enabled, enables it for duration milliseconds and then switches
it back off.
If the emitter is not enabled, enables it for a specified \a duration
(in milliseconds) and then switches it back off.
*/
QQuickParticleEmitter::QQuickParticleEmitter(QQuickItem *parent) :

View File

@ -148,7 +148,7 @@ void QSGD3D12RenderLoop::windowDestroyed(QQuickWindow *window)
delete rc;
delete engine;
delete wd->animationController;
wd->animationController.reset();
}
void QSGD3D12RenderLoop::exposeWindow(QQuickWindow *window)

View File

@ -373,7 +373,7 @@ bool QSGD3D12RenderThread::event(QEvent *e)
QCoreApplication::processEvents();
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
if (wme->destroying)
delete wd->animationController;
wd->animationController.reset();
}
if (wme->destroying)
active = false;
@ -1006,7 +1006,7 @@ void QSGD3D12ThreadedRenderLoop::handleExposure(QQuickWindow *window)
if (Q_UNLIKELY(debug_loop()))
qDebug("starting render thread");
// Push a few things to the render thread.
QQuickAnimatorController *controller = QQuickWindowPrivate::get(w->window)->animationController;
QQuickAnimatorController *controller = QQuickWindowPrivate::get(w->window)->animationController.data();
if (controller->thread() != w->thread)
controller->moveToThread(w->thread);
if (w->thread->thread() == QThread::currentThread()) {

View File

@ -96,7 +96,7 @@ void QSGOpenVGRenderLoop::windowDestroyed(QQuickWindow *window)
vg->doneCurrent();
}
delete d->animationController;
d->animationController.reset();
}
void QSGOpenVGRenderLoop::exposureChanged(QQuickWindow *window)

View File

@ -37,11 +37,17 @@ tagfile = ../../../doc/qtqml/qtqml.tags
depends += qtcore qtgui qtquick qtdoc qtlinguist qmake qtscript qtwidgets qtxmlpatterns qtquickcontrols
headerdirs += .. \
../../imports/models
../../imports/models \
../../qmlmodels \
../../qml \
../../qmlworkerscript
sourcedirs += .. \
../../imports/models \
../../imports/statemachine
../../imports/statemachine \
../../qmlmodels \
../../qml \
../../qmlworkerscript
exampledirs += ../../../examples/qml \
../ \

View File

@ -407,8 +407,7 @@ located at the same level as the application that uses our new import module.
This way, the QML engine will find our module as the default search path for QML
imports includes the directory of the application executable. On \macos, the
plugin binary is copied to \c Contents/PlugIns in the the application bundle;
this path is set in \l {tutorials/extending-qml/chapter6-plugins/app.pro}
{chapter6-plugins/app.pro}:
this path is set in \c {chapter6-plugins/app.pro}:
\quotefromfile tutorials/extending-qml/chapter6-plugins/app.pro
\skipto osx

View File

@ -25,13 +25,6 @@
**
****************************************************************************/
/*!
\group qtjavascript
\title Scripting Classes and Overviews
\brief Classes for embedding JavaScript in Qt/C++ applications.
*/
/*!
\page qtjavascript.html
\title Making Applications Scriptable

View File

@ -39,8 +39,8 @@
/*!
\qmlmethod string String::arg(value)
Returns a copy of this string with the lowest numbered place marker replaced by value,
i.e., %1, %2, ..., %99. The following example prints "There are 20 items"
Returns a copy of this string with the lowest numbered place marker replaced by \a value,
i.e., %1, %2, ..., %99. The following example prints "There are 20 items":
\code
var message = "There are %1 items"

View File

@ -276,25 +276,14 @@
/*!
\fn int qmlRegisterAnonymousType(const char *uri, int versionMajor)
This template function registers the C++ type in the QML system. Instances of this type cannot be created from the QML system.
This template function registers the C++ type in the QML system as an anonymous type. The
resulting QML type does not have a name. Therefore, instances of this type cannot be created from
the QML system. You can, however, access instances of the type when they are exposed as properties
of other types.
Use this function when the type will not be referenced by name. Use \a uri and \a versionMajor to indicate to which module the type belongs.
\sa {Choosing the Correct Integration Method Between C++ and QML}
*/
/*!
\fn int qmlRegisterType()
\relates QQmlEngine
\overload
This template function registers the C++ type in the QML
system. Instances of this type cannot be created from the QML
system.
This function should be used when the type will not be referenced by name.
Specifically, it has to be used for C++ types that are used as the left-hand
side of a property binding.
Use this function when the type will not be referenced by name, specifically for C++ types that
are used on the left-hand side of a property binding. To indicate to which module the type belongs
use \a uri and \a versionMajor.
For example, consider the following two classes:
@ -354,17 +343,28 @@
\code
qmlRegisterType<Foo>("App", 1, 0, "Foo");
qmlRegisterType<Bar>();
qmlRegisterAnonymousType<Bar>("App", 1);
\endcode
As the \c Foo type is instantiated in QML, it must be registered
with the version of \l qmlRegisterType() that takes an import URI.
with the version of \l qmlRegisterType() that takes an element name.
Returns the QML type id.
\since 5.14
\sa {Choosing the Correct Integration Method Between C++ and QML}
*/
/*!
\fn int qmlRegisterType()
\relates QQmlEngine
\overload
\deprecated
Do not use this function. For anonymous type registrations, use \l qmlRegisterAnonymousType(),
and make sure to provide a URI and a major version.
*/
/*!
\fn int qmlRegisterInterface(const char *typeName)
\relates QQmlEngine
@ -458,7 +458,7 @@
*/
/*!
\fn template<typename T> QObject *qmlAttachedPropertiesObject(const QObject *attachee, bool create = true)
\fn template<typename T> QObject *qmlAttachedPropertiesObject(const QObject *attachee, bool create)
\relates QQmlEngine
The form of this template function is:

View File

@ -624,9 +624,9 @@ public:
// and jump out of the exception handler.
loadPtr(exceptionHandlerAddress(), ScratchRegister);
Jump exitFunction = branchPtr(Equal, ScratchRegister, TrustedImmPtr(0));
loadUndefined();
jump(ScratchRegister);
exitFunction.link(this);
loadUndefined();
if (functionExit.isSet())
jump(functionExit);

View File

@ -1474,6 +1474,12 @@ void BaselineAssembler::saveAccumulatorInFrame()
offsetof(CallData, accumulator)));
}
void BaselineAssembler::loadAccumulatorFromFrame()
{
pasm()->loadAccumulator(PlatformAssembler::Address(PlatformAssembler::JSStackFrameRegister,
offsetof(CallData, accumulator)));
}
static ReturnedValue TheJitIs__Tail_Calling__ToTheRuntimeSoTheJitFrameIsMissing(CppStackFrame *frame, ExecutionEngine *engine)
{
return Runtime::TailCall::call(frame, engine);
@ -1600,7 +1606,6 @@ void BaselineAssembler::deadTemporalZoneCheck(int offsetForSavedIP, int variable
{
auto valueIsAliveJump = pasm()->jumpNotEmpty();
storeInstructionPointer(offsetForSavedIP);
saveAccumulatorInFrame();
prepareCallWithArgCount(2);
passInt32AsArg(variableName, 1);
passEngineAsArg(0);

View File

@ -155,6 +155,7 @@ public:
void passPointerAsArg(void *ptr, int arg);
void callRuntime(const char *functionName, const void *funcPtr, CallResultDestination dest);
void saveAccumulatorInFrame();
void loadAccumulatorFromFrame();
void jsTailCall(int func, int thisObject, int argc, int argv);
// exception/context stuff

View File

@ -74,6 +74,7 @@ void BaselineJIT::generate()
#define STORE_IP() as->storeInstructionPointer(nextInstructionOffset())
#define STORE_ACC() as->saveAccumulatorInFrame()
#define LOAD_ACC() as->loadAccumulatorFromFrame()
#define BASELINEJIT_GENERATE_RUNTIME_CALL(function, destination) { \
as->GENERATE_RUNTIME_CALL(function, destination); \
if (Runtime::function::throws) \
@ -228,6 +229,7 @@ void BaselineJIT::generate_StoreNameSloppy(int name)
as->passInt32AsArg(name, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreNameSloppy, CallResultDestination::Ignore);
LOAD_ACC();
}
void BaselineJIT::generate_StoreNameStrict(int name)
@ -239,6 +241,7 @@ void BaselineJIT::generate_StoreNameStrict(int name)
as->passInt32AsArg(name, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreNameStrict, CallResultDestination::Ignore);
LOAD_ACC();
}
void BaselineJIT::generate_LoadElement(int base)
@ -262,6 +265,7 @@ void BaselineJIT::generate_StoreElement(int base, int index)
as->passJSSlotAsArg(base, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreElement, CallResultDestination::Ignore);
LOAD_ACC();
}
void BaselineJIT::generate_LoadProperty(int name)
@ -297,6 +301,7 @@ void BaselineJIT::generate_StoreProperty(int name, int base)
as->passJSSlotAsArg(base, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreProperty, CallResultDestination::Ignore);
LOAD_ACC();
}
void BaselineJIT::generate_SetLookup(int index, int base)
@ -317,7 +322,6 @@ void BaselineJIT::generate_SetLookup(int index, int base)
void BaselineJIT::generate_LoadSuperProperty(int property)
{
STORE_IP();
STORE_ACC();
as->prepareCallWithArgCount(2);
as->passJSSlotAsArg(property, 1);
as->passEngineAsArg(0);
@ -333,6 +337,7 @@ void BaselineJIT::generate_StoreSuperProperty(int property)
as->passJSSlotAsArg(property, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(StoreSuperProperty, CallResultDestination::Ignore);
LOAD_ACC();
}
void BaselineJIT::generate_Yield()
@ -562,6 +567,7 @@ void BaselineJIT::generate_PushBlockContext(int index)
as->passInt32AsArg(index, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(PushBlockContext, CallResultDestination::Ignore);
as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_CloneBlockContext()
@ -570,6 +576,7 @@ void BaselineJIT::generate_CloneBlockContext()
as->prepareCallWithArgCount(1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(CloneBlockContext, CallResultDestination::Ignore);
as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_PushScriptContext(int index)
@ -579,6 +586,7 @@ void BaselineJIT::generate_PushScriptContext(int index)
as->passInt32AsArg(index, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(PushScriptContext, CallResultDestination::Ignore);
as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_PopScriptContext()
@ -587,6 +595,7 @@ void BaselineJIT::generate_PopScriptContext()
as->prepareCallWithArgCount(1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(PopScriptContext, CallResultDestination::Ignore);
as->loadAccumulatorFromFrame();
}
void BaselineJIT::generate_PopContext() { as->popContext(); }
@ -682,11 +691,13 @@ void BaselineJIT::generate_TypeofValue()
void BaselineJIT::generate_DeclareVar(int varName, int isDeletable)
{
STORE_ACC();
as->prepareCallWithArgCount(3);
as->passInt32AsArg(varName, 2);
as->passInt32AsArg(isDeletable, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(DeclareVar, CallResultDestination::Ignore);
LOAD_ACC();
}
void BaselineJIT::generate_DefineArray(int argc, int args)
@ -744,11 +755,13 @@ void BaselineJIT::generate_CreateRestParameter(int argIndex)
void BaselineJIT::generate_ConvertThisToObject()
{
STORE_ACC();
as->prepareCallWithArgCount(2);
as->passJSSlotAsArg(CallData::This, 1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(ConvertThisToObject, CallResultDestination::InAccumulator);
as->storeReg(CallData::This);
LOAD_ACC();
}
void BaselineJIT::generate_LoadSuperConstructor()
@ -893,6 +906,7 @@ void BaselineJIT::generate_ThrowOnNullOrUndefined()
as->passAccumulatorAsArg(1);
as->passEngineAsArg(0);
BASELINEJIT_GENERATE_RUNTIME_CALL(ThrowOnNullOrUndefined, CallResultDestination::Ignore);
LOAD_ACC();
}
void BaselineJIT::generate_GetTemplateObject(int index)

View File

@ -615,7 +615,9 @@ QJSValue QJSEngine::newObject()
/*!
\since 5.12
Creates a JavaScript object of class Error.
Creates a JavaScript object of class Error, with \a message as the error
message.
The prototype of the created object will be \a errorType.

View File

@ -729,14 +729,16 @@ void Heap::DateObject::init(const QTime &time)
* time from it, which shall (via toQDateTime(), below) discard the date
* part. We need a date for which time-zone data is likely to be sane (so
* MakeDay(0, 0, 0) was a bad choice; 2 BC, December 31st is before
* time-zones were standardized), with no transition nearby in date. We
* ignore DST transitions before 1970, but even then zone transitions did
* happen. Some do happen at new year, others on DST transitions in spring
* and autumn; so pick the three hundredth anniversary of the birth of
* Giovanni Domenico Cassini (1625-06-08), whose work first let us
* synchronize clocks tolerably accurately at distant locations.
* time-zones were standardized), with no transition nearby in date.
* QDateTime ignores DST transitions before 1970, but even then zone
* transitions did happen; and DaylightSavingTA() will include DST, at odds
* with QDateTime. So pick a date since 1970 and prefer one when no zone
* was in DST. One such interval (according to the Olson database, at
* least) was 1971 March 15th to April 17th. Since converting a time to a
* date-time without specifying a date is foolish, let's use April Fools'
* day.
*/
static const double d = MakeDay(1925, 5, 8);
static const double d = MakeDay(1971, 3, 1);
double t = MakeTime(time.hour(), time.minute(), time.second(), time.msec());
date = TimeClip(UTC(MakeDate(d, t), internalClass->engine->localTZA));
}

View File

@ -1765,6 +1765,12 @@ ReturnedValue ExecutionEngine::global()
QQmlRefPointer<ExecutableCompilationUnit> ExecutionEngine::compileModule(const QUrl &url)
{
QQmlMetaType::CachedUnitLookupError cacheError = QQmlMetaType::CachedUnitLookupError::NoError;
if (const QV4::CompiledData::Unit *cachedUnit = QQmlMetaType::findCachedCompilationUnit(url, &cacheError)) {
return ExecutableCompilationUnit::create(
QV4::CompiledData::CompilationUnit(cachedUnit, url.fileName(), url.toString()));
}
QFile f(QQmlFile::urlToLocalFileOrQrc(url));
if (!f.open(QIODevice::ReadOnly)) {
throwError(QStringLiteral("Could not open module %1 for reading").arg(url.toString()));

View File

@ -52,6 +52,7 @@
#include <private/qv4module_p.h>
#include <private/qv4compilationunitmapper_p.h>
#include <private/qml_compile_hash_p.h>
#include <private/qqmltypewrapper_p.h>
#include <QtQml/qqmlfile.h>
#include <QtQml/qqmlpropertymap.h>
@ -291,15 +292,18 @@ void ExecutableCompilationUnit::unlink()
if (runtimeLookups) {
for (uint i = 0; i < data->lookupTableSize; ++i) {
QV4::Lookup &l = runtimeLookups[i];
if (l.getter == QV4::QObjectWrapper::lookupGetter) {
if (l.getter == QV4::QObjectWrapper::lookupGetter
|| l.getter == QQmlTypeWrapper::lookupSingletonProperty) {
if (QQmlPropertyCache *pc = l.qobjectLookup.propertyCache)
pc->release();
} else if (l.getter == QQmlValueTypeWrapper::lookupGetter) {
} else if (l.getter == QQmlValueTypeWrapper::lookupGetter
|| l.getter == QQmlTypeWrapper::lookupSingletonProperty) {
if (QQmlPropertyCache *pc = l.qgadgetLookup.propertyCache)
pc->release();
}
if (l.qmlContextPropertyGetter == QQmlContextWrapper::lookupScopeObjectProperty) {
if (l.qmlContextPropertyGetter == QQmlContextWrapper::lookupScopeObjectProperty
|| l.qmlContextPropertyGetter == QQmlContextWrapper::lookupContextObjectProperty) {
if (QQmlPropertyCache *pc = l.qobjectLookup.propertyCache)
pc->release();
}

View File

@ -163,6 +163,7 @@ void ReactionHandler::executeReaction(ReactionEvent *event)
ScopedFunctionObject reaction(scope);
if (scope.hasException()) {
reaction = capability->d()->reject.as<QV4::FunctionObject>();
result = scope.engine->catchException();
} else {
reaction = capability->d()->resolve.as<QV4::FunctionObject>();
}

View File

@ -647,7 +647,6 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_BEGIN_INSTR(LoadSuperProperty)
STORE_IP();
STORE_ACC();
acc = Runtime::LoadSuperProperty::call(engine, STACK_VALUE(property));
CHECK_EXCEPTION;
MOTH_END_INSTR(LoadSuperProperty)
@ -794,12 +793,14 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_BEGIN_INSTR(Construct)
STORE_IP();
STORE_ACC();
acc = Runtime::Construct::call(engine, STACK_VALUE(func), ACC, stack + argv, argc);
CHECK_EXCEPTION;
MOTH_END_INSTR(Construct)
MOTH_BEGIN_INSTR(ConstructWithSpread)
STORE_IP();
STORE_ACC();
acc = Runtime::ConstructWithSpread::call(engine, STACK_VALUE(func), ACC, stack + argv, argc);
CHECK_EXCEPTION;
MOTH_END_INSTR(ConstructWithSpread)
@ -827,7 +828,6 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_BEGIN_INSTR(DeadTemporalZoneCheck)
if (ACC.isEmpty()) {
STORE_IP();
STORE_ACC();
Runtime::ThrowReferenceError::call(engine, name);
goto handleUnwind;
}
@ -970,6 +970,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_END_INSTR(CreateRestParameter)
MOTH_BEGIN_INSTR(ConvertThisToObject)
STORE_ACC();
stack[CallData::This] = Runtime::ConvertThisToObject::call(engine, stack[CallData::This]);
CHECK_EXCEPTION;
MOTH_END_INSTR(ConvertThisToObject)
@ -980,6 +981,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_END_INSTR(LoadSuperConstructor)
MOTH_BEGIN_INSTR(ToObject)
STORE_ACC();
acc = ACC.toObject(engine)->asReturnedValue();
CHECK_EXCEPTION;
MOTH_END_INSTR(ToObject)

View File

@ -150,6 +150,10 @@ Returns an STL-style iterator pointing to the imaginary item after the last item
Remove the current object from the list, and return an iterator to the next element.
*/
/*!
\class QIntrusiveListNode
\internal
*/
/*!
\fn QIntrusiveListNode::QIntrusiveListNode()

View File

@ -168,11 +168,13 @@ int qmlRegisterAnonymousType(const char *uri, int versionMajor)
return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type);
}
#if QT_DEPRECATED_SINCE(5, 14)
template<typename T>
QT_DEPRECATED_VERSION_X_5_14("Use qmlRegisterAnonymousType instead") int qmlRegisterType()
{
return qmlRegisterAnonymousType<T>("", 1);
}
#endif
int Q_QML_EXPORT qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message);
@ -621,8 +623,10 @@ namespace QtQml {
Q_QML_EXPORT QQmlContext *qmlContext(const QObject *);
Q_QML_EXPORT QQmlEngine *qmlEngine(const QObject *);
#if QT_DEPRECATED_SINCE(5, 14)
Q_QML_EXPORT QT_DEPRECATED QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true);
Q_QML_EXPORT QT_DEPRECATED QObject *qmlAttachedPropertiesObject(
Q_QML_EXPORT QT_DEPRECATED_VERSION_X_5_14("Use qmlAttachedPropertiesObject(QObject *, QQmlAttachedPropertiesFunc, bool")
QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true);
Q_QML_EXPORT QT_DEPRECATED_VERSION_X_5_14("Use qmlAttachedPropertiesObject(QObject *, QQmlAttachedPropertiesFunc, bool")
QObject *qmlAttachedPropertiesObject(
int *, const QObject *, const QMetaObject *, bool create);
#endif
Q_QML_EXPORT QQmlAttachedPropertiesFunc qmlAttachedPropertiesFunction(QObject *,

View File

@ -279,7 +279,7 @@ void QQmlApplicationEngine::load(const QString &filePath)
}
/*!
Sets the initial properties with which the QML component gets initialized after
Sets the \a initialProperties with which the QML component gets initialized after
it gets loaded.

View File

@ -827,8 +827,9 @@ QObject *QQmlComponent::create(QQmlContext *context)
}
/*!
Create an object instance of this component, and initialize its toplevel properties according to initalPropertyValues.
Create an object instance of this component, and initialize its toplevel
properties with \a initialProperties. \a context specifies the context
where the object instance is to be created.
\sa QQmlComponent::create
\since 5.14
@ -1178,7 +1179,7 @@ void QQmlComponent::create(QQmlIncubator &incubator, QQmlContext *context,
}
/*!
Set toplevel properties of the component.
Set toplevel \a properties of the \a component.
This method provides advanced control over component instance creation.

View File

@ -242,7 +242,9 @@ private:
mutable QString m_finalUrlString;
// List of QQmlDataBlob's that are waiting for me to complete.
protected:
QList<QQmlDataBlob *> m_waitingOnMe;
private:
// List of QQmlDataBlob's that I am waiting for to complete.
QVector<QQmlRefPointer<QQmlDataBlob>> m_waitingFor;

View File

@ -90,7 +90,7 @@ QT_BEGIN_NAMESPACE
\endcode
*/
#define qmlobject_connect(Sender, SenderType, Signal, Receiver, ReceiverType, Method) \
{ \
do { \
SenderType *sender = (Sender); \
ReceiverType *receiver = (Receiver); \
const char *signal = (Signal); \
@ -111,7 +111,7 @@ QT_BEGIN_NAMESPACE
} \
Q_ASSERT(signalIdx != -1 && methodIdx != -1); \
QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); \
}
} while (0)
/*!
Disconnect \a Signal of \a Sender from \a Method of \a Receiver. \a Signal must be
@ -129,7 +129,7 @@ QT_BEGIN_NAMESPACE
\endcode
*/
#define qmlobject_disconnect(Sender, SenderType, Signal, Receiver, ReceiverType, Method) \
{ \
do { \
SenderType *sender = (Sender); \
ReceiverType *receiver = (Receiver); \
const char *signal = (Signal); \
@ -150,7 +150,7 @@ QT_BEGIN_NAMESPACE
} \
Q_ASSERT(signalIdx != -1 && methodIdx != -1); \
QMetaObject::disconnect(sender, signalIdx, receiver, methodIdx); \
}
} while (0)
/*!
This method is identical to qobject_cast<T>() except that it does not require lazy

View File

@ -1751,6 +1751,16 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
addImportPath(QStringLiteral("qrc:/qt-project.org/imports"));
addImportPath(QCoreApplication::applicationDirPath());
#if defined(Q_OS_ANDROID)
addImportPath(QStringLiteral("qrc:/android_rcc_bundle/qml"));
if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QT_BUNDLED_LIBS_PATH"))) {
const QString envImportPath = qEnvironmentVariable("QT_BUNDLED_LIBS_PATH");
QLatin1Char pathSep(':');
QStringList paths = envImportPath.split(pathSep, QString::SkipEmptyParts);
for (int ii = paths.count() - 1; ii >= 0; --ii)
addPluginPath(paths.at(ii));
}
#endif
}
QQmlImportDatabase::~QQmlImportDatabase()
@ -1798,6 +1808,18 @@ QString QQmlImportDatabase::resolvePlugin(QQmlTypeLoader *typeLoader,
if (!resolvedPath.endsWith(Slash))
resolvedPath += Slash;
#if defined(Q_OS_ANDROID)
if (qmldirPath.size() > 25 && qmldirPath.at(0) == QLatin1Char(':') && qmldirPath.at(1) == QLatin1Char('/') &&
qmldirPath.startsWith(QStringLiteral(":/android_rcc_bundle/qml/"), Qt::CaseInsensitive)) {
QString pluginName = qmldirPath.mid(21) + Slash + baseName;
auto bundledPath = resolvedPath + QLatin1String("lib") + pluginName.replace(QLatin1Char('/'), QLatin1Char('_'));
for (const QString &suffix : suffixes) {
const QString absolutePath = typeLoader->absoluteFilePath(bundledPath + suffix);
if (!absolutePath.isEmpty())
return absolutePath;
}
}
#endif
resolvedPath += prefix + baseName;
for (const QString &suffix : suffixes) {
const QString absolutePath = typeLoader->absoluteFilePath(resolvedPath + suffix);

View File

@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QQmlInfo QtQml::qmlDebug(const QObject *object)
\relates QQmlEngine
\relates QtQml
\since 5.9
Prints debug messages that include the file and line number for the
@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QQmlInfo QtQml::qmlInfo(const QObject *object)
\relates QQmlEngine
\relates QtQml
Prints informational messages that include the file and line number for the
specified QML \a object.
@ -119,7 +119,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QQmlInfo QtQml::qmlWarning(const QObject *object)
\relates QQmlEngine
\relates QtQml
\since 5.9
Prints warning messages that include the file and line number for the

View File

@ -69,6 +69,7 @@ void QQmlMetaTypeData::registerType(QQmlTypePrivate *priv)
if (!types.at(i).isValid()) {
types[i] = QQmlType(priv);
priv->index = i;
priv->release();
return;
}
}

View File

@ -152,9 +152,18 @@ inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::buil
template <typename ObjectContainer>
inline QQmlJS::DiagnosticMessage QQmlPropertyCacheCreator<ObjectContainer>::buildMetaObjectRecursively(int objectIndex, const QQmlBindingInstantiationContext &context)
{
const CompiledObject *obj = objectContainer->objectAt(objectIndex);
auto isAddressable = [](const QUrl &url) {
const QString fileName = url.fileName();
return !fileName.isEmpty() && fileName.front().isUpper();
};
const CompiledObject *obj = objectContainer->objectAt(objectIndex);
bool needVMEMetaObject = obj->propertyCount() != 0 || obj->aliasCount() != 0
|| obj->signalCount() != 0 || obj->functionCount() != 0 || obj->enumCount() != 0
|| (((obj->flags & QV4::CompiledData::Object::IsComponent)
|| (objectIndex == 0 && isAddressable(objectContainer->url())))
&& !objectContainer->resolvedType(obj->inheritedTypeNameIndex)->isFullyDynamicType);
bool needVMEMetaObject = obj->propertyCount() != 0 || obj->aliasCount() != 0 || obj->signalCount() != 0 || obj->functionCount() != 0 || obj->enumCount() != 0;
if (!needVMEMetaObject) {
auto binding = obj->bindingsBegin();
auto end = obj->bindingsEnd();

View File

@ -177,7 +177,7 @@ void QQmlScriptBlob::done()
}
if (!m_isModule) {
m_scriptData->typeNameCache = new QQmlTypeNameCache(m_importCache);
m_scriptData->typeNameCache.adopt(new QQmlTypeNameCache(m_importCache));
QSet<QString> ns;
@ -195,7 +195,7 @@ void QQmlScriptBlob::done()
m_scriptData->typeNameCache->add(script.qualifier, scriptIndex, script.nameSpace);
}
m_importCache.populateCache(m_scriptData->typeNameCache);
m_importCache.populateCache(m_scriptData->typeNameCache.data());
}
m_scripts.clear();
}

View File

@ -156,11 +156,7 @@ QV4::ReturnedValue QQmlScriptData::scriptValueForContext(QQmlContextData *parent
void QQmlScriptData::clear()
{
if (typeNameCache) {
typeNameCache->release();
typeNameCache = nullptr;
}
typeNameCache = nullptr;
scripts.clear();
// An addref() was made when the QQmlCleanup was added to the engine.

View File

@ -82,7 +82,7 @@ private:
public:
QUrl url;
QString urlString;
QQmlTypeNameCache *typeNameCache;
QQmlRefPointer<QQmlTypeNameCache> typeNameCache;
QVector<QQmlRefPointer<QQmlScriptBlob>> scripts;
QV4::ReturnedValue scriptValueForContext(QQmlContextData *parentCtxt);

View File

@ -158,6 +158,9 @@ QQmlRefPointer<QV4::ExecutableCompilationUnit> QQmlTypeCompiler::compile()
QmlIR::QmlUnitGenerator qmlGenerator;
qmlGenerator.generate(*document, dependencyHasher);
if (!errors.isEmpty())
return nullptr;
QQmlRefPointer<QV4::ExecutableCompilationUnit> compilationUnit
= QV4::ExecutableCompilationUnit::create(std::move(
document->javaScriptCompilationUnit));
@ -165,11 +168,7 @@ QQmlRefPointer<QV4::ExecutableCompilationUnit> QQmlTypeCompiler::compile()
compilationUnit->resolvedTypes = *resolvedTypes;
compilationUnit->propertyCaches = std::move(m_propertyCaches);
Q_ASSERT(compilationUnit->propertyCaches.count() == static_cast<int>(compilationUnit->objectCount()));
if (errors.isEmpty())
return compilationUnit;
else
return nullptr;
return compilationUnit;
}
void QQmlTypeCompiler::recordError(const QV4::CompiledData::Location &location, const QString &description)

View File

@ -305,6 +305,7 @@ void QQmlTypeData::done()
QQmlJS::DiagnosticMessage error = buildTypeResolutionCaches(&typeNameCache, &resolvedTypeCache);
if (error.isValid()) {
setError(error);
qDeleteAll(resolvedTypeCache);
return;
}
}
@ -614,6 +615,8 @@ void QQmlTypeData::compile(const QQmlRefPointer<QQmlTypeNameCache> &typeNameCach
QQmlTypeCompiler compiler(enginePrivate, this, m_document.data(), typeNameCache, resolvedTypeCache, dependencyHasher);
m_compiledData = compiler.compile();
if (!m_compiledData) {
qDeleteAll(*resolvedTypeCache);
resolvedTypeCache->clear();
setError(compiler.compilationErrors());
return;
}
@ -678,7 +681,7 @@ void QQmlTypeData::resolveTypes()
if (ref.type.isCompositeSingleton()) {
ref.typeData = typeLoader()->getType(ref.type.sourceUrl());
if (ref.typeData->status() == QQmlDataBlob::ResolvingDependencies) {
if (ref.typeData->status() == QQmlDataBlob::ResolvingDependencies || m_waitingOnMe.contains(ref.typeData.data())) {
// TODO: give an error message? If so, we should record and show the path of the cycle.
continue;
}

View File

@ -229,8 +229,10 @@ OwnPropertyKeyIterator *QtObject::virtualOwnPropertyKeys(const Object *m, Value
}
/*!
\qmlmethod bool Qt::isQtObject(object)
Returns true if \c object is a valid reference to a Qt or QML object, otherwise false.
\qmlmethod bool Qt::isQtObject(object)
Returns \c true if \a object is a valid reference to a Qt or QML object,
\c false otherwise.
*/
ReturnedValue QtObject::method_isQtObject(const FunctionObject *, const Value *, const Value *argv, int argc)
{
@ -241,10 +243,10 @@ ReturnedValue QtObject::method_isQtObject(const FunctionObject *, const Value *,
}
/*!
\qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
\qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
Returns a color with the specified \c red, \c green, \c blue and \c alpha components.
All components should be in the range 0-1 inclusive.
Returns a color with the specified \a red, \a green, \a blue, and \a alpha
components. All components should be in the range 0-1 (inclusive).
*/
ReturnedValue QtObject::method_rgba(const FunctionObject *f, const Value *, const Value *argv, int argc)
{
@ -270,10 +272,10 @@ ReturnedValue QtObject::method_rgba(const FunctionObject *f, const Value *, cons
}
/*!
\qmlmethod color Qt::hsla(real hue, real saturation, real lightness, real alpha)
\qmlmethod color Qt::hsla(real hue, real saturation, real lightness, real alpha)
Returns a color with the specified \c hue, \c saturation, \c lightness and \c alpha components.
All components should be in the range 0-1 inclusive.
Returns a color with the specified \a hue, \a saturation, \a lightness, and \a alpha
components. All components should be in the range 0-1 (inclusive).
*/
ReturnedValue QtObject::method_hsla(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -300,12 +302,12 @@ ReturnedValue QtObject::method_hsla(const FunctionObject *b, const Value *, cons
}
/*!
\qmlmethod color Qt::hsva(real hue, real saturation, real value, real alpha)
\since 5.5
\qmlmethod color Qt::hsva(real hue, real saturation, real value, real alpha)
Returns a color with the specified \c hue, \c saturation, \c value and \c alpha components.
All components should be in the range 0-1 inclusive.
Returns a color with the specified \a hue, \a saturation, \a value and \a alpha
components. All components should be in the range 0-1 (inclusive).
\since 5.5
*/
ReturnedValue QtObject::method_hsva(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -328,12 +330,12 @@ ReturnedValue QtObject::method_hsva(const FunctionObject *b, const Value *, cons
}
/*!
\qmlmethod color Qt::colorEqual(color lhs, string rhs)
\qmlmethod color Qt::colorEqual(color lhs, string rhs)
Returns true if both \c lhs and \c rhs yield equal color values. Both arguments
may be either color values or string values. If a string value is supplied it
must be convertible to a color, as described for the \l{colorbasictypedocs}{color}
basic type.
Returns \c true if both \a lhs and \a rhs yield equal color values. Both
arguments may be either color values or string values. If a string value
is supplied it must be convertible to a color, as described for the
\l{colorbasictypedocs}{color} basic type.
*/
ReturnedValue QtObject::method_colorEqual(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -368,11 +370,9 @@ ReturnedValue QtObject::method_colorEqual(const FunctionObject *b, const Value *
}
/*!
\qmlmethod rect Qt::rect(int x, int y, int width, int height)
\qmlmethod rect Qt::rect(int x, int y, int width, int height)
Returns a \c rect with the top-left corner at \c x, \c y and the specified \c width and \c height.
The returned object has \c x, \c y, \c width and \c height attributes with the given values.
Returns a rect with the top-left corner at \a x, \a y and the specified \a width and \a height.
*/
ReturnedValue QtObject::method_rect(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -389,8 +389,9 @@ ReturnedValue QtObject::method_rect(const FunctionObject *b, const Value *, cons
}
/*!
\qmlmethod point Qt::point(int x, int y)
Returns a Point with the specified \c x and \c y coordinates.
\qmlmethod point Qt::point(int x, int y)
Returns a point with the specified \a x and \a y coordinates.
*/
ReturnedValue QtObject::method_point(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -405,8 +406,9 @@ ReturnedValue QtObject::method_point(const FunctionObject *b, const Value *, con
}
/*!
\qmlmethod Qt::size(int width, int height)
Returns a Size with the specified \c width and \c height.
\qmlmethod size Qt::size(int width, int height)
Returns a size with the specified \a width and \a height.
*/
ReturnedValue QtObject::method_size(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -421,12 +423,13 @@ ReturnedValue QtObject::method_size(const FunctionObject *b, const Value *, cons
}
/*!
\qmlmethod Qt::font(object fontSpecifier)
Returns a Font with the properties specified in the \c fontSpecifier object
or the nearest matching font. The \c fontSpecifier object should contain
key-value pairs where valid keys are the \l{fontbasictypedocs}{font} type's
subproperty names, and the values are valid values for each subproperty.
Invalid keys will be ignored.
\qmlmethod font Qt::font(object fontSpecifier)
Returns a font with the properties specified in the \a fontSpecifier object
or the nearest matching font. The \a fontSpecifier object should contain
key-value pairs where valid keys are the \l{fontbasictypedocs}{font} type's
subproperty names, and the values are valid values for each subproperty.
Invalid keys will be ignored.
*/
ReturnedValue QtObject::method_font(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -445,8 +448,9 @@ ReturnedValue QtObject::method_font(const FunctionObject *b, const Value *, cons
/*!
\qmlmethod Qt::vector2d(real x, real y)
Returns a Vector2D with the specified \c x and \c y.
\qmlmethod vector2d Qt::vector2d(real x, real y)
Returns a vector2d with the specified \a x and \a y values.
*/
ReturnedValue QtObject::method_vector2d(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -463,8 +467,9 @@ ReturnedValue QtObject::method_vector2d(const FunctionObject *b, const Value *,
}
/*!
\qmlmethod Qt::vector3d(real x, real y, real z)
Returns a Vector3D with the specified \c x, \c y and \c z.
\qmlmethod vector3d Qt::vector3d(real x, real y, real z)
Returns a vector3d with the specified \a x, \a y, and \a z values.
*/
ReturnedValue QtObject::method_vector3d(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -482,8 +487,9 @@ ReturnedValue QtObject::method_vector3d(const FunctionObject *b, const Value *,
}
/*!
\qmlmethod Qt::vector4d(real x, real y, real z, real w)
Returns a Vector4D with the specified \c x, \c y, \c z and \c w.
\qmlmethod vector4d Qt::vector4d(real x, real y, real z, real w)
Returns a vector4d with the specified \a x, \a y, \a z, and \a w values.
*/
ReturnedValue QtObject::method_vector4d(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -502,8 +508,9 @@ ReturnedValue QtObject::method_vector4d(const FunctionObject *b, const Value *,
}
/*!
\qmlmethod Qt::quaternion(real scalar, real x, real y, real z)
Returns a Quaternion with the specified \c scalar, \c x, \c y, and \c z.
\qmlmethod quaternion Qt::quaternion(real scalar, real x, real y, real z)
Returns a quaternion with the specified \a scalar, \a x, \a y, and \a z values.
*/
ReturnedValue QtObject::method_quaternion(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -522,13 +529,25 @@ ReturnedValue QtObject::method_quaternion(const FunctionObject *b, const Value *
}
/*!
\qmlmethod Qt::matrix4x4(real m11, real m12, real m13, real m14, real m21, real m22, real m23, real m24, real m31, real m32, real m33, real m34, real m41, real m42, real m43, real m44)
Returns a Matrix4x4 with the specified values.
Alternatively, the function may be called with a single argument
where that argument is a JavaScript array which contains the sixteen
matrix values.
Finally, the function may be called with no arguments and the resulting
matrix will be the identity matrix.
\qmlmethod matrix4x4 Qt::matrix4x4(real m11, real m12, real m13, real m14, real m21, real m22, real m23, real m24, real m31, real m32, real m33, real m34, real m41, real m42, real m43, real m44)
Returns a matrix4x4 with the specified values.
The arguments correspond to their positions in the matrix:
\table
\row \li \a m11 \li \a m12 \li \a m13 \li \a m14
\row \li \a m21 \li \a m22 \li \a m23 \li \a m24
\row \li \a m31 \li \a m32 \li \a m33 \li \a m34
\row \li \a m41 \li \a m42 \li \a m43 \li \a m44
\endtable
Alternatively, the function may be called with a single argument
where that argument is a JavaScript array which contains the sixteen
matrix values.
Finally, the function may be called with no arguments and the resulting
matrix will be the identity matrix.
*/
ReturnedValue QtObject::method_matrix4x4(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -572,18 +591,19 @@ ReturnedValue QtObject::method_matrix4x4(const FunctionObject *b, const Value *,
}
/*!
\qmlmethod color Qt::lighter(color baseColor, real factor)
Returns a color lighter than \c baseColor by the \c factor provided.
\qmlmethod color Qt::lighter(color baseColor, real factor)
If the factor is greater than 1.0, this functions returns a lighter color.
Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0,
the return color is darker, but we recommend using the Qt.darker() function for this purpose.
If the factor is 0 or negative, the return value is unspecified.
Returns a color lighter than \a baseColor by the \a factor provided.
The function converts the current RGB color to HSV, multiplies the value (V) component
by factor and converts the color back to RGB.
If the factor is greater than 1.0, this functions returns a lighter color.
Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0,
the return color is darker, but we recommend using the Qt.darker() function for this purpose.
If the factor is 0 or negative, the return value is unspecified.
If \c factor is not supplied, returns a color 50% lighter than \c baseColor (factor 1.5).
The function converts the current RGB color to HSV, multiplies the value (V) component
by factor and converts the color back to RGB.
If \a factor is not supplied, returns a color that is 50% lighter than \a baseColor (factor 1.5).
*/
ReturnedValue QtObject::method_lighter(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -610,19 +630,20 @@ ReturnedValue QtObject::method_lighter(const FunctionObject *b, const Value *, c
}
/*!
\qmlmethod color Qt::darker(color baseColor, real factor)
Returns a color darker than \c baseColor by the \c factor provided.
\qmlmethod color Qt::darker(color baseColor, real factor)
If the factor is greater than 1.0, this function returns a darker color.
Setting factor to 3.0 returns a color that has one-third the brightness.
If the factor is less than 1.0, the return color is lighter, but we recommend using
the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return
value is unspecified.
Returns a color darker than \a baseColor by the \a factor provided.
The function converts the current RGB color to HSV, divides the value (V) component
by factor and converts the color back to RGB.
If the factor is greater than 1.0, this function returns a darker color.
Setting factor to 3.0 returns a color that has one-third the brightness.
If the factor is less than 1.0, the return color is lighter, but we recommend using
the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return
value is unspecified.
If \c factor is not supplied, returns a color 50% darker than \c baseColor (factor 2.0).
The function converts the current RGB color to HSV, divides the value (V) component
by factor and converts the color back to RGB.
If \a factor is not supplied, returns a color that is 50% darker than \a baseColor (factor 2.0).
*/
ReturnedValue QtObject::method_darker(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -650,7 +671,8 @@ ReturnedValue QtObject::method_darker(const FunctionObject *b, const Value *, co
/*!
\qmlmethod color Qt::tint(color baseColor, color tintColor)
This function allows tinting one color with another.
This function allows tinting one color (\a baseColor) with another (\a tintColor).
The tint color should usually be mostly transparent, or you will not be
able to see the underlying color. The below example provides a slight red
@ -670,7 +692,8 @@ ReturnedValue QtObject::method_darker(const FunctionObject *b, const Value *, co
\endqml
\image declarative-rect_tint.png
Tint is most useful when a subtle change is intended to be conveyed due to some event; you can then use tinting to more effectively tune the visible color.
Tint is most useful when a subtle change is intended to be conveyed due to some event;
you can then use tinting to more effectively tune the visible color.
*/
ReturnedValue QtObject::method_tint(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -708,8 +731,8 @@ ReturnedValue QtObject::method_tint(const FunctionObject *b, const Value *, cons
/*!
\qmlmethod string Qt::formatDate(datetime date, variant format)
Returns a string representation of \c date, optionally formatted according
to \c format.
Returns a string representation of \a date, optionally formatted according
to \a format.
The \a date parameter may be a JavaScript \c Date object, a \l{date}{date}
property, a QDate, or QDateTime value. The \a format parameter may be any of
@ -752,8 +775,8 @@ ReturnedValue QtObject::method_formatDate(const FunctionObject *b, const Value *
/*!
\qmlmethod string Qt::formatTime(datetime time, variant format)
Returns a string representation of \c time, optionally formatted according to
\c format.
Returns a string representation of \a time, optionally formatted according to
\a format.
The \a time parameter may be a JavaScript \c Date object, a QTime, or QDateTime
value. The \a format parameter may be any of the possible format values as
@ -801,10 +824,10 @@ ReturnedValue QtObject::method_formatTime(const FunctionObject *b, const Value *
/*!
\qmlmethod string Qt::formatDateTime(datetime dateTime, variant format)
Returns a string representation of \c datetime, optionally formatted according to
\c format.
Returns a string representation of \a dateTime, optionally formatted according to
\a format.
The \a date parameter may be a JavaScript \c Date object, a \l{date}{date}
The \a dateTime parameter may be a JavaScript \c Date object, a \l{date}{date}
property, a QDate, QTime, or QDateTime value.
If \a format is not provided, \a dateTime is formatted using
@ -921,8 +944,8 @@ ReturnedValue QtObject::method_formatDateTime(const FunctionObject *b, const Val
/*!
\qmlmethod bool Qt::openUrlExternally(url target)
Attempts to open the specified \c target url in an external application, based on the user's
desktop preferences. Returns true if it succeeds, and false otherwise.
Attempts to open the specified \a target url in an external application, based on the user's
desktop preferences. Returns \c true if it succeeds, \c false otherwise.
\warning A return value of \c true indicates that the application has successfully requested
the operating system to open the URL in an external application. The external application may
@ -942,6 +965,7 @@ ReturnedValue QtObject::method_openUrlExternally(const FunctionObject *b, const
/*!
\qmlmethod url Qt::resolvedUrl(url url)
Returns \a url resolved relative to the URL of the caller.
*/
ReturnedValue QtObject::method_resolvedUrl(const FunctionObject *b, const Value *, const Value *argv, int argc)
@ -967,6 +991,7 @@ ReturnedValue QtObject::method_resolvedUrl(const FunctionObject *b, const Value
/*!
\qmlmethod list<string> Qt::fontFamilies()
Returns a list of the font families available to the application.
*/
ReturnedValue QtObject::method_fontFamilies(const FunctionObject *b, const Value *, const Value *, int argc)
@ -980,7 +1005,7 @@ ReturnedValue QtObject::method_fontFamilies(const FunctionObject *b, const Value
/*!
\qmlmethod string Qt::md5(data)
Returns a hex string of the md5 hash of \c data.
Returns a hex string of the md5 hash of \a data.
*/
ReturnedValue QtObject::method_md5(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -995,7 +1020,7 @@ ReturnedValue QtObject::method_md5(const FunctionObject *b, const Value *, const
/*!
\qmlmethod string Qt::btoa(data)
Binary to ASCII - this function returns a base64 encoding of \c data.
Binary to ASCII - this function returns a base64 encoding of \a data.
*/
ReturnedValue QtObject::method_btoa(const FunctionObject *b, const Value *, const Value *argv, int argc)
{
@ -1043,9 +1068,9 @@ ReturnedValue QtObject::method_quit(const FunctionObject *b, const Value *, cons
This function causes the QQmlEngine::exit(int) signal to be emitted.
Within the \l {Prototyping with qmlscene}, this causes the launcher application to exit
the specified return code. To exit from the event loop with a specified return code when this
method is called, a C++ application can connect the QQmlEngine::exit(int) signal
to the QCoreApplication::exit(int) slot.
the specified return code (\a retCode). To exit from the event loop with a specified
return code when this method is called, a C++ application can connect the
QQmlEngine::exit(int) signal to the QCoreApplication::exit(int) slot.
\sa quit()
*/
@ -1318,13 +1343,13 @@ ReturnedValue QtObject::method_createComponent(const FunctionObject *b, const Va
\qmlmethod Qt::locale(name)
Returns a JS object representing the locale with the specified
name, which has the format "language[_territory][.codeset][@modifier]"
\a name, which has the format "language[_territory][.codeset][@modifier]"
or "C", where:
\list
\li language is a lowercase, two-letter, ISO 639 language code,
\li territory is an uppercase, two-letter, ISO 3166 country code,
\li and codeset and modifier are ignored.
\li \c language is a lowercase, two-letter, ISO 639 language code,
\li \c territory is an uppercase, two-letter, ISO 3166 country code, and
\li \c codeset and \c modifier are ignored.
\endlist
If the string violates the locale format, or language is not a
@ -1372,7 +1397,8 @@ DEFINE_OBJECT_VTABLE(QQmlBindingFunction);
/*!
\qmlmethod Qt::binding(function)
Returns a JavaScript object representing a \l{Property Binding}{property binding}.
Returns a JavaScript object representing a \l{Property Binding}{property binding},
with a \a function that evaluates the binding.
There are two main use-cases for the function: firstly, to apply a
property binding imperatively from JavaScript code:

View File

@ -382,10 +382,10 @@ QQmlBind::RestorationMode QQmlBind::restoreMode() const
void QQmlBind::setRestoreMode(RestorationMode newMode)
{
Q_D(QQmlBind);
d->restoreModeExplicit = true;
if (newMode != restoreMode()) {
d->restoreValue = (newMode & RestoreValue);
d->restoreBinding = (newMode & RestoreBinding);
d->restoreModeExplicit = true;
emit restoreModeChanged();
}
}

View File

@ -180,6 +180,10 @@ int QQmlPropertyMapMetaObject::createProperty(const char *name, const char *valu
\note When deriving a class from QQmlPropertyMap, use the
\l {QQmlPropertyMap::QQmlPropertyMap(DerivedType *derived, QObject *parent)} {protected two-argument constructor}
which ensures that the class is correctly registered with the Qt \l {Meta-Object System}.
\note The QMetaObject of a QQmlPropertyMap is dynamically generated and modified.
Operations on that meta object are not thread safe, so applications need to take
care to explicitly synchronize access to the meta object.
*/
/*!

View File

@ -0,0 +1,37 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
include($QT_INSTALL_DOCS/config/exampleurl-qtdeclarative.qdocconf)
project = QtQmlModels
description = Qt Qml Models Reference Documentation
version = $QT_VERSION
moduleheader = QtQmlModels
qhp.projects = QtQmlModels
qhp.QtQmlModels.file = qtqmlmodels.qhp
qhp.QtQmlModels.namespace = org.qt-project.qtqmlmodels.$QT_VERSION_TAG
qhp.QtQmlModels.virtualFolder = qtqmlmodels
qhp.QtQmlModels.indexRoot =
qhp.QtQmlModels.filterAttributes = qtqmlmodels $QT_VERSION qtrefdoc
qhp.QtQmlModels.customFilters.Qt.name = QtQmlModels $QT_VERSION
qhp.QtQmlModels.customFilters.Qt.filterAttributes = qtqmlmodels $QT_VERSION
qhp.QtQmlModels.title = QML Types
qhp.QtQmlModels.indexTitle = Qt QML Models QML Types
qhp.QtQmlModels.selectors = qmlclass
qhp.QtQmlModels.sortPages = true
tagfile = qtqmlmodels.tags
depends += qtcore qtqml qtdoc
headerdirs += ..
sourcedirs += .. \
../../imports/models
exampledirs += ../../../examples/qml \
../ \
snippets
navigation.qmltypespage = "Qt Qml Models QML Types"

View File

@ -1,6 +1,8 @@
TARGET = QtQmlModels
QT = core-private qml-private
QMAKE_DOCS = $$PWD/doc/qtqmlmodels.qdocconf
DEFINES += QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES QT_NO_FOREACH
HEADERS += \

View File

@ -58,19 +58,6 @@ QVariant QQmlAbstractDelegateComponent::value(QQmlAdaptorModel *adaptorModel, in
return adaptorModel->value(adaptorModel->indexAt(row, column), role);
}
/*!
\qmlmodule Qt.labs.qmlmodels 1.0
\title Qt Labs QML Models - QML Types
\ingroup qmlmodules
\brief The Qt Labs QML Models module provides various model-related types for use with views.
To use this module, import the module with the following line:
\qml
import Qt.labs.qmlmodels 1.0
\endqml
*/
/*!
\qmltype DelegateChoice
\instantiates QQmlDelegateChoice

View File

@ -539,10 +539,10 @@ void QQmlDelegateModel::setRootIndex(const QVariant &root)
\qmlmethod QModelIndex QtQml.Models::DelegateModel::modelIndex(int index)
QAbstractItemModel provides a hierarchical tree of data, whereas
QML only operates on list data. This function assists in using
QML only operates on list data. This function assists in using
tree models in QML.
Returns a QModelIndex for the specified index.
Returns a QModelIndex for the specified \a index.
This value can be assigned to rootIndex.
\sa rootIndex

View File

@ -220,7 +220,8 @@ void QQmlInstantiatorPrivate::makeModel()
/*!
\qmltype Instantiator
\instantiates QQmlInstantiator
\inqmlmodule QtQml
\inqmlmodule QtQml.Models
\ingroup qtquick-models
\brief Dynamically creates objects.
A Instantiator can be used to control the dynamic creation of objects, or to dynamically
@ -231,6 +232,8 @@ void QQmlInstantiatorPrivate::makeModel()
can also be destroyed dynamically through other means, and the Instantiator will not recreate
them unless the properties of the Instantiator change.
\note Instantiator is part of QtQml.Models since version 2.14 and part of QtQml since
version 2.1. Importing Instantiator via QtQml is deprecated since Qt 5.14.
*/
QQmlInstantiator::QQmlInstantiator(QObject *parent)
: QObject(*(new QQmlInstantiatorPrivate), parent)

View File

@ -62,7 +62,7 @@
\section1 QModelIndexList Type
\l QModelIndexList is exposed in QML as a JavaScript array. Conversions are
QModelIndexList is exposed in QML as a JavaScript array. Conversions are
automatically made from and to C++. In fact, any JavaScript array can be
converted back to QModelIndexList, with non-QModelIndex objects replaced by
invalid \l{QModelIndex}es.

View File

@ -328,7 +328,7 @@ QObject *QQmlObjectModel::get(int index) const
\qmlmethod QtQml.Models::ObjectModel::append(object item)
\since 5.6
Appends a new item to the end of the model.
Appends a new \a item to the end of the model.
\code
objectModel.append(objectComponent.createObject())
@ -346,7 +346,7 @@ void QQmlObjectModel::append(QObject *object)
\qmlmethod QtQml.Models::ObjectModel::insert(int index, object item)
\since 5.6
Inserts a new item to the model at position \a index.
Inserts a new \a item to the model at position \a index.
\code
objectModel.insert(2, objectComponent.createObject())
@ -371,7 +371,7 @@ void QQmlObjectModel::insert(int index, QObject *object)
\qmlmethod QtQml.Models::ObjectModel::move(int from, int to, int n = 1)
\since 5.6
Moves \a n items \a from one position \a to another.
Moves \e n items \a from one position \a to another.
The from and to ranges must exist; for example, to move the first 3 items
to the end of the model:
@ -398,7 +398,7 @@ void QQmlObjectModel::move(int from, int to, int n)
\qmlmethod QtQml.Models::ObjectModel::remove(int index, int n = 1)
\since 5.6
Removes the items at \a index from the model.
Removes \e n items at \a index from the model.
\sa clear()
*/

View File

@ -64,7 +64,7 @@ Q_LOGGING_CATEGORY(lcTableModel, "qt.qml.tablemodel")
The model's initial row data is set with either the \l rows property or by
calling \l appendRow(). Each column in the model is specified by declaring
a \l TableModelColumn instance, where the order of each instance determines
its column index. Once the model's \l Component.completed() signal has been
its column index. Once the model's \l Component::completed() signal has been
emitted, the columns and roles will have been established and are then
fixed for the lifetime of the model.

View File

@ -47,8 +47,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Package
\instantiates QQuickPackage
\inqmlmodule QtQuick
\ingroup qtquick-views
\inqmlmodule QtQml.Models
\ingroup qtquick-models
\brief Specifies a collection of named items.
The Package type is used in conjunction with
@ -71,6 +71,9 @@ QT_BEGIN_NAMESPACE
\snippet package/view.qml 0
\note Package is part of QtQml.Models since version 2.14 and part of QtQuick since version 2.0.
Importing Package via QtQuick is deprecated since Qt 5.14.
\sa {Qt Quick Examples - Views}, {Qt Quick Demo - Photo Viewer}, {Qt QML}
*/

View File

@ -0,0 +1,37 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
include($QT_INSTALL_DOCS/config/exampleurl-qtdeclarative.qdocconf)
project = QtQmlWorkerScript
description = Qt Qml WorkerScript Reference Documentation
version = $QT_VERSION
moduleheader = QtQmlWorkerScript
qhp.projects = QtQmlWorkerScript
qhp.QtQmlWorkerScript.file = qtqmlworkerscript.qhp
qhp.QtQmlWorkerScript.namespace = org.qt-project.qtqmlworkerscript.$QT_VERSION_TAG
qhp.QtQmlWorkerScript.virtualFolder = qtqmlworkerscript
qhp.QtQmlWorkerScript.indexRoot =
qhp.QtQmlWorkerScript.filterAttributes = qtqmlworkerscript $QT_VERSION qtrefdoc
qhp.QtQmlWorkerScript.customFilters.Qt.name = QtQmlWorkerScript $QT_VERSION
qhp.QtQmlWorkerScript.customFilters.Qt.filterAttributes = qtqmlworkerscript $QT_VERSION
qhp.QtQmlWorkerScript.title = QML Types
qhp.QtQmlWorkerScript.indexTitle = Qt QML WorkerScript QML Types
qhp.QtQmlWorkerScript.selectors = qmlclass
qhp.QtQmlWorkerScript.sortPages = true
tagfile = qtqmlworkerscript.tags
depends += qtcore qtqml qtdoc
headerdirs += ..
sourcedirs += .. \
../../imports/workerscript
exampledirs += ../../../examples/qml \
../ \
snippets
navigation.qmltypespage = "Qt Qml WorkerScript QML Types"

View File

@ -1,6 +1,8 @@
TARGET = QtQmlWorkerScript
QT = core-private qml-private
QMAKE_DOCS = $$PWD/doc/qtqmlworkerscript.qdocconf
DEFINES += QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES QT_NO_FOREACH
HEADERS += \

View File

@ -374,7 +374,7 @@ QQuickWorkerScriptEngine::~QQuickWorkerScriptEngine()
yieldCurrentThread();
}
d->deleteLater();
delete d;
}
WorkerScript::WorkerScript(int id, QQuickWorkerScriptEnginePrivate *parent)
@ -441,7 +441,7 @@ void QQuickWorkerScriptEngine::run()
\qmltype WorkerScript
\instantiates QQuickWorkerScript
\ingroup qtquick-threading
\inqmlmodule QtQml
\inqmlmodule QtQml.WorkerScript
\brief Enables the use of threads in a Qt Quick application.
Use WorkerScript to run operations in a new thread.

View File

@ -41,9 +41,11 @@ tagfile = ../../../doc/qtquick/qtquick.tags
depends += qtcore qtqml qtqmltest qtgui qtlinguist qtquickcontrols1 qtquickcontrols qtdoc qtquickdialogs qtsensors qtwidgets qmake qtmultimedia qtgraphicaleffects qtsql qtxmlpatterns
headerdirs += ..\
../../quick \
../../quickwidgets
sourcedirs += .. \
../../quick \
../../quickwidgets
exampledirs += ../../../examples/quick \

View File

@ -227,7 +227,7 @@ access to the data from QML:
The QSqlQueryModel class is good enough to implement a custom read-only
model that represents data in an SQL database. The
\l{Qt Quick Controls 2 - Chat Tutorial}{chat tutorial} example
\l{Qt Quick Controls - Chat Tutorial}{chat tutorial} example
demonstrates this very well by implementing a custom model to fetch the
contact details from an SQLite database.

View File

@ -1016,6 +1016,14 @@ with multiple windows.
\li Where applicable (Vulkan, Direct3D), enables the graphics API implementation's debug
and/or validation layers, if available.
\row
\li \c QSG_RHI_PREFER_SOFTWARE_RENDERER
\li \c 1
\li Requests choosing an adapter or physical device that uses software-based
rasterization. Applicable only when the underlying API has support for
enumerating adapters (for example, Direct3D or Vulkan), and is ignored
otherwise.
\endtable
Applications wishing to always run with a single given graphics API, can
@ -1031,4 +1039,9 @@ with multiple windows.
equivalent in effect to running with both \c QSG_RHI and \c QSG_RHI_BACKEND
set.
All QRhi backends will choose the system default GPU adapter or physical
device, unless overridden by \c{QSG_RHI_PREFER_SOFTWARE_RENDERER} or a
backend-specific variable, such as, \c{QT_D3D_ADAPTER_INDEX} or
\c{QT_VK_PHYSICAL_DEVICE_INDEX}. No further adapter configurability is
provided at this time.
*/

View File

@ -45,9 +45,9 @@ UI. It is recommended to browse this list of UI controls before creating your
own custom UI control.
Besides these basic UI controls offered by Qt Quick itself, a rich set of UI
controls are also available with Qt Quick Controls 2. They cater to the most
controls are also available with Qt Quick Controls. They cater to the most
common use cases without any change, and offer a lot more possibilities with their
customization options. In particular, Qt Quick Controls 2 provides styling
customization options. In particular, Qt Quick Controls provides styling
options that align with the latest UI design trends. If these UI controls do not
satisfy your application's needs, only then it is recommended to create a
custom control.
@ -55,7 +55,7 @@ custom control.
\section2 Related Information
\list
\li \l{Qt Quick Controls 2}
\li \l{Qt Quick Controls}
\li \l{Qt Quick}
\endlist
@ -323,7 +323,7 @@ see \l {Choosing the Correct Integration Method Between C++ and QML}.
\section2 Related Information
\list
\li \l{Integrating QML and C++}
\li \l{Qt Quick Controls 2 - Chat Tutorial}{Chat application tutorial}
\li \l{Qt Quick Controls - Chat Tutorial}{Chat application tutorial}
\endlist
\section1 Using Qt Quick Layouts
@ -426,7 +426,7 @@ developers to follow these tips:
\li Use anchors or the Qt Quick Layouts module to lay out the visual items.
\li Do not specify explicit width and height for a visual item.
\li Provide UI resources such as images and icons for each display resolution
that your application supports. The Qt Quick Controls 2 gallery example
that your application supports. The Qt Quick Controls gallery example
demonstrates this well by providing the \c qt-logo.png for \c @2x, \c @3x,
and \c @4x resolutions, enabling the application to cater to high
resolution displays. Qt automatically chooses the appropriate
@ -437,7 +437,7 @@ developers to follow these tips:
versions of an image, as is necessary with bitmap images.
\li Use font-based icons, such as Font Awesome. These scale to any display
resolution, and also allow colorization. The
Qt Quick Controls 2 Text Editor example demonstrates this well.
Qt Quick Controls Text Editor example demonstrates this well.
\endlist
With this in place, your application's UI should scale depending
@ -448,8 +448,8 @@ on the display resolution on offer.
\section2 Related Information
\list
\li \l{Qt Quick Controls 2 - Gallery}{Gallery example}
\li \l{Qt Quick Controls 2 - Text Editor}{Text Editor example}
\li \l{Qt Quick Controls - Gallery}{Gallery example}
\li \l{Qt Quick Controls - Text Editor}{Text Editor example}
\li \l{Font Awesome}
\li \l{Scalability}
\li \l{High DPI Displays}

View File

@ -39,15 +39,15 @@ information about them.
The Qt Quick Designer enables designing Qt Quick-based UIs using simple
drag-n-drop gestures that most designers are familiar with. It offers UI
elements from the Qt Quick and Qt Quick Controls 2 modules, as well as
elements from the Qt Quick and Qt Quick Controls modules, as well as
integration for custom UI elements.
The following is a list of example applications that use UIs created by
the Qt Quick Designer:
\list
\li \l{Qt Quick Controls 2 - Contact List}
\li \l{Qt Quick Controls 2 - Flat Style}
\li \l{Qt Quick Controls - Contact List}
\li \l{Qt Quick Controls - Flat Style}
\endlist
\section2 QML Debugger and Profiler

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