summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp5
-rw-r--r--src/corelib/doc/src/statemachine.qdoc32
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/gui/kernel/qplatformopenglcontext.cpp4
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp2
-rw-r--r--src/widgets/widgets/qstackedwidget.cpp4
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp2
-rw-r--r--tests/auto/dbus/qdbustype/tst_qdbustype.cpp13
8 files changed, 42 insertions, 24 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
index bc03770f16..9cded446d1 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
@@ -51,8 +51,9 @@ sem.release(2); // resources available == 3
//! [1]
QSystemSemaphore sem("market", 5, QSystemSemaphore::Create);
-sem.acquire(5); // acquire all 5 resources
-sem.release(5); // release the 5 resources
+for (int i = 0; i < 5; ++i) // acquire all 5 resources
+ sem.acquire();
+sem.release(5); // release the 5 resources
//! [1]
diff --git a/src/corelib/doc/src/statemachine.qdoc b/src/corelib/doc/src/statemachine.qdoc
index 846eb7d1f0..4b50174b88 100644
--- a/src/corelib/doc/src/statemachine.qdoc
+++ b/src/corelib/doc/src/statemachine.qdoc
@@ -63,7 +63,7 @@
used to effectively embed the elements and semantics of statecharts in Qt
applications. The framework integrates tightly with Qt's meta-object system;
for example, transitions between states can be triggered by signals, and
- states can be configured to set properties and invoke methods on QObjects.
+ states can be configured to set properties and invoke methods on {QObject}s.
Qt's event system is used to drive the state machines.
The state graph in the State Machine framework is hierarchical. States can be nested inside of
@@ -126,9 +126,9 @@
The QState::entered() signal is emitted when the state is entered, and the
QState::exited() signal is emitted when the state is exited. In the
- following snippet, the button's showMaximized() slot will be called when
- state \c s3 is entered, and the button's showMinimized() slot will be called
- when \c s3 is exited:
+ following snippet, the button's \l {QPushButton::}{showMaximized()} slot
+ will be called when state \c s3 is entered, and the button's \l {QPushButton::}{showMinimized()}
+ slot will be called when \c s3 is exited:
\snippet statemachine/main.cpp 5
@@ -151,7 +151,7 @@
Assume we wanted the user to be able to quit the application at any time by
clicking a Quit button. In order to achieve this, we need to create a final
state and make it the target of a transition associated with the Quit
- button's clicked() signal. We could add a transition from each of \c s1, \c
+ button's \l{QPushButton::}{clicked()} signal. We could add a transition from each of \c s1, \c
s2 and \c s3; however, this seems redundant, and one would also have to
remember to add such a transition from every new state that is added in the
future.
@@ -184,8 +184,8 @@
\snippet statemachine/main2.cpp 1
In this case we want the application to quit when the state machine is
- finished, so the machine's finished() signal is connected to the
- application's quit() slot.
+ finished, so the machine's \l {QStateMachine::}{finished()} signal is connected to the
+ application's \l {QCoreApplication::}{quit()} slot.
A child state can override an inherited transition. For example, the
following code adds a transition that effectively causes the Quit button to
@@ -290,7 +290,7 @@
\endomit
When \c s1 's final state is entered, \c s1 will automatically emit
- finished(). We use a signal transition to cause this event to trigger a
+ \l {QState::}{finished()}. We use a signal transition to cause this event to trigger a
state change:
\snippet statemachine/main3.cpp 1
@@ -302,7 +302,7 @@
encapsulation mechanism when building complex (deeply nested) state
machines. (In the above example, you could of course create a transition
directly from \c s1 's \c done state rather than relying on \c s1 's
- finished() signal, but with the consequence that implementation details of
+ \l {QState::}{finished()} signal, but with the consequence that implementation details of
\c s1 are exposed and depended on).
For parallel state groups, the QState::finished() signal is emitted when \e
@@ -365,8 +365,8 @@
\snippet statemachine/main4.cpp 1
- In the eventTest() reimplementation, we first check if the event type is the
- desired one; if so, we cast the event to a StringEvent and perform the
+ In the \l {QAbstractTransition::}{eventTest()} reimplementation, we first check if the event type is the
+ desired one; if so, we cast the event to a \c StringEvent and perform the
string comparison.
The following is a statechart that uses the custom event and transition:
@@ -486,7 +486,7 @@
message box will pop up before the geometry of the button has actually been set.
To ensure that the message box does not pop up until the geometry actually reaches its final
- value, we can use the state's propertiesAssigned() signal. The propertiesAssigned() signal will be
+ value, we can use the state's \l {QState::}{propertiesAssigned()} signal. The \l {QState::}{propertiesAssigned()} signal will be
emitted when the property is assigned its final value, whether this is done immediately or
after the animation has finished playing.
@@ -503,14 +503,14 @@
has been assigned the defined value.
If the global restore policy is set to QStateMachine::RestoreProperties, the state will not emit
- the propertiesAssigned() signal until these have been executed as well.
+ the \l {QState::}{propertiesAssigned()} signal until these have been executed as well.
\section1 What Happens If A State Is Exited Before The Animation Has Finished
If a state has property assignments, and the transition into the state has animations for the
properties, the state can potentially be exited before the properties have been assigned to the
values defines by the state. This is true in particular when there are transitions out from the
- state that do not depend on the propertiesAssigned signal, as described in the previous section.
+ state that do not depend on the \l {QState::}{propertiesAssigned()} signal, as described in the previous section.
The State Machine API guarantees that a property assigned by the state machine either:
\list
@@ -563,13 +563,13 @@
The parent state machine treats the child machine as an \e atomic state in the state machine
algorithm. The child state machine is self-contained; it maintains its own event queue and
- configuration. In particular, note that the \l{QStateMachine::configuration()}{configuration}
+ configuration. In particular, note that the \l{QStateMachine::}{configuration()}
of the child machine is not part of the parent machine's configuration (only the child machine
itself is).
States of the child state machine cannot be specified as targets of transitions in the parent
state machine; only the child state machine itself can. Conversely, states of the parent state
machine cannot be specified as targets of transitions in the child state machine. The child
- state machine's \l{QState::finished()}{finished}() signal can be used to trigger a transition
+ state machine's \l{QState::}{finished}() signal can be used to trigger a transition
in the parent machine.
*/
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 4547877da6..a1c5132492 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -37,11 +37,11 @@
#include <stddef.h>
-#define QT_VERSION_STR "5.4.2"
+#define QT_VERSION_STR "5.4.3"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x050402
+#define QT_VERSION 0x050403
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp
index 527bfdd983..364c1a5c0e 100644
--- a/src/gui/kernel/qplatformopenglcontext.cpp
+++ b/src/gui/kernel/qplatformopenglcontext.cpp
@@ -121,6 +121,10 @@ bool QPlatformOpenGLContext::parseOpenGLVersion(const QByteArray &versionString,
if (versionParts.size() >= 2) {
major = versionParts.at(0).toInt(&majorOk);
minor = versionParts.at(1).toInt(&minorOk);
+ // Nexus 6 has "OpenGL ES 3.0V@95.0 (GIT@I86da836d38)"
+ if (!minorOk)
+ if (int idx = versionParts.at(1).indexOf('V'))
+ minor = versionParts.at(1).left(idx).toInt(&minorOk);
} else {
qWarning("Unrecognized OpenGL ES version");
}
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 974a101e9c..a4f677efab 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -1280,7 +1280,7 @@ void QNetworkReplyHttpImplPrivate::sentUploadDataSlot(qint64 pos, qint64 amount)
{
if (uploadByteDevicePosition + amount != pos) {
// Sanity check, should not happen.
- error(QNetworkReply::UnknownNetworkError, "");
+ error(QNetworkReply::UnknownNetworkError, QString());
return;
}
uploadByteDevice->advanceReadPointer(amount);
diff --git a/src/widgets/widgets/qstackedwidget.cpp b/src/widgets/widgets/qstackedwidget.cpp
index fd1bf57321..411651f480 100644
--- a/src/widgets/widgets/qstackedwidget.cpp
+++ b/src/widgets/widgets/qstackedwidget.cpp
@@ -182,7 +182,9 @@ int QStackedWidget::insertWidget(int index, QWidget *widget)
not deleted but simply removed from the stacked layout, causing it
to be hidden.
- \b{Note:} Ownership of \a widget reverts to the application.
+ \note Parent object and parent widget of \a widget will remain the
+ QStackedWidget. If the application wants to reuse the removed
+ \a widget, then it is recommended to re-parent it.
\sa addWidget(), insertWidget(), currentWidget()
*/
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index bb3f2d74a8..e897b578c3 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -897,7 +897,7 @@ void QToolButton::setDefaultAction(QAction *action)
return;
if (!actions().contains(action))
addAction(action);
- setText(action->iconText());
+ setText(action->text());
setIcon(action->icon());
#ifndef QT_NO_TOOLTIP
setToolTip(action->toolTip());
diff --git a/tests/auto/dbus/qdbustype/tst_qdbustype.cpp b/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
index e674b6d686..a054db877d 100644
--- a/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
+++ b/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
@@ -87,8 +87,19 @@ static void addFixedTypes()
QTest::newRow("int64") << DBUS_TYPE_INT64_AS_STRING << true << true;
QTest::newRow("uint64") << DBUS_TYPE_UINT64_AS_STRING << true << true;
QTest::newRow("double") << DBUS_TYPE_DOUBLE_AS_STRING << true << true;
+
#ifdef DBUS_TYPE_UNIX_FD_AS_STRING
- QTest::newRow("unixfd") << DBUS_TYPE_UNIX_FD_AS_STRING << true << true;
+# ifndef QT_LINKED_LIBDBUS
+ // We have got the macro from dbus_minimal_p.h, so we need to check if
+ // the library recognizes this as valid type first.
+ // The following function was added for Unix FD support, so if it is
+ // present, so is support for Unix FDs.
+ bool supportsUnixFds = qdbus_resolve_conditionally("dbus_connection_can_send_type");
+# else
+ bool supportsUnixFds = true;
+# endif
+ if (supportsUnixFds)
+ QTest::newRow("unixfd") << DBUS_TYPE_UNIX_FD_AS_STRING << true << true;
#endif
}