diff options
-rw-r--r-- | examples/widgets/doc/images/imagegestures-example.jpg | bin | 0 -> 38962 bytes | |||
-rw-r--r-- | examples/widgets/doc/src/plugandpaint.qdoc | 9 | ||||
-rw-r--r-- | examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc | 3 | ||||
-rw-r--r-- | src/corelib/doc/qtcore.qdocconf | 3 | ||||
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp | 5 | ||||
-rw-r--r-- | src/corelib/doc/src/statemachine.qdoc | 32 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 4 | ||||
-rw-r--r-- | src/corelib/io/qlockfile_win.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformopenglcontext.cpp | 4 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 2 | ||||
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_p.cpp | 1 | ||||
-rw-r--r-- | src/printsupport/kernel/qprinter.cpp | 4 | ||||
-rw-r--r-- | src/printsupport/widgets/qprintpreviewwidget.cpp | 4 | ||||
-rw-r--r-- | src/testlib/doc/qttestlib.qdocconf | 3 | ||||
-rw-r--r-- | src/widgets/widgets/qstackedwidget.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbutton.cpp | 2 | ||||
-rw-r--r-- | src/xml/doc/qtxml.qdocconf | 3 | ||||
-rw-r--r-- | tests/auto/dbus/qdbustype/tst_qdbustype.cpp | 13 |
18 files changed, 67 insertions, 31 deletions
diff --git a/examples/widgets/doc/images/imagegestures-example.jpg b/examples/widgets/doc/images/imagegestures-example.jpg Binary files differnew file mode 100644 index 0000000000..c8484b4a71 --- /dev/null +++ b/examples/widgets/doc/images/imagegestures-example.jpg diff --git a/examples/widgets/doc/src/plugandpaint.qdoc b/examples/widgets/doc/src/plugandpaint.qdoc index 4e48245bd9..caf33feb0a 100644 --- a/examples/widgets/doc/src/plugandpaint.qdoc +++ b/examples/widgets/doc/src/plugandpaint.qdoc @@ -30,8 +30,7 @@ \title Plug & Paint Example \ingroup examples-widgets-tools - \brief The Plug & Paint example demonstrates how to write Qt - applications that can be extended through plugins. + \brief Demonstrates how to extend Qt applications using plugins. \image plugandpaint.png Screenshot of the Plug & Paint example @@ -314,6 +313,9 @@ /*! \example tools/plugandpaintplugins/basictools \title Plug & Paint Basic Tools Example + \brief A plugin providing the basic tools for painting functionality. + + \image plugandpaint.png Screenshot of the Plug & Paint example The Basic Tools example is a static plugin for the \l{tools/plugandpaint}{Plug & Paint} example. It provides a set @@ -499,6 +501,9 @@ /*! \example tools/plugandpaintplugins/extrafilters \title Plug & Paint Extra Filters Example + \brief A plugin providing the extra filters. + + \image plugandpaint.png Screenshot of the Plug & Paint example The Extra Filters example is a plugin for the \l{tools/plugandpaint}{Plug & Paint} example. It provides a set diff --git a/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc index d6d215d6bd..6a1405b0b1 100644 --- a/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc +++ b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc @@ -28,10 +28,13 @@ /*! \example gestures/imagegestures \title Image Gestures Example + \brief Demonstrates the use of simple gestures in a widget This example shows how to enable gestures for a widget and use gesture input to perform actions. + \image imagegestures-example.jpg + We use two classes to create the user interface for the application: \c MainWidget and \c ImageWidget. The \c MainWidget class is simply used as a container for the \c ImageWidget class, which we will configure to accept gesture input. Since we diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf index f3aff83a8b..a166df1143 100644 --- a/src/corelib/doc/qtcore.qdocconf +++ b/src/corelib/doc/qtcore.qdocconf @@ -42,5 +42,8 @@ imagedirs += images excludedirs += snippets +excludefiles += ../../../examples/widgets/tools/customcompleter/doc/src/customcompleter.qdoc \ + ../../../examples/widgets/tools/codecs/doc/src/codecs.qdoc + navigation.landingpage = "Qt Core" navigation.cppclassespage = "Qt Core C++ Classes" 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 d9742408a3..51fba90ba3 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/corelib/io/qlockfile_win.cpp b/src/corelib/io/qlockfile_win.cpp index 3587c7bffe..21ab8f8fea 100644 --- a/src/corelib/io/qlockfile_win.cpp +++ b/src/corelib/io/qlockfile_win.cpp @@ -120,7 +120,7 @@ bool QLockFilePrivate::isApparentlyStale() const // processes due to sandboxing #ifndef Q_OS_WINRT if (getLockInfo(&pid, &hostname, &appname)) { - if (hostname == QString::fromLocal8Bit(localHostName())) { + if (hostname.isEmpty() || hostname == QString::fromLocal8Bit(localHostName())) { HANDLE procHandle = ::OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid); if (!procHandle) return true; 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/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index 6bbea1683c..b963aebbd5 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -75,6 +75,7 @@ QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate() QMutexLocker locker(&mutex); qDeleteAll(sessionEngines); + sessionEngines.clear(); if (bearerThread) bearerThread->quit(); } diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index 8ed2732c1e..d7df796afb 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -1764,7 +1764,7 @@ QRectF QPrinter::paperRect(Unit unit) const } /*! - \obsolete Use pageLayout().paintRect() instead. + \obsolete Use pageLayout().paintRectPixels(resolution()) instead. Returns the page's rectangle; this is usually smaller than the paperRect() since the page normally has margins between its @@ -1781,7 +1781,7 @@ QRect QPrinter::pageRect() const } /*! - \obsolete Use pageLayout().fullPageRect() instead. + \obsolete Use pageLayout().fullRectPixels(resolution()) instead. Returns the paper's rectangle; this is usually larger than the pageRect(). diff --git a/src/printsupport/widgets/qprintpreviewwidget.cpp b/src/printsupport/widgets/qprintpreviewwidget.cpp index 208ad5e0f3..7898dc9352 100644 --- a/src/printsupport/widgets/qprintpreviewwidget.cpp +++ b/src/printsupport/widgets/qprintpreviewwidget.cpp @@ -335,8 +335,8 @@ void QPrintPreviewWidgetPrivate::populateScene() pages.clear(); int numPages = pictures.count(); - QSize paperSize = printer->paperRect().size(); - QRect pageRect = printer->pageRect(); + QSize paperSize = printer->pageLayout().fullRectPixels(printer->resolution()).size(); + QRect pageRect = printer->pageLayout().paintRectPixels(printer->resolution()); for (int i = 0; i < numPages; i++) { PageItem* item = new PageItem(i+1, pictures.at(i), paperSize, pageRect); diff --git a/src/testlib/doc/qttestlib.qdocconf b/src/testlib/doc/qttestlib.qdocconf index 35b4fbcb7b..0fafc733b1 100644 --- a/src/testlib/doc/qttestlib.qdocconf +++ b/src/testlib/doc/qttestlib.qdocconf @@ -40,5 +40,8 @@ excludedirs += ../../../examples/widgets/doc imagedirs += images +# Add a thumbnail for examples that do not have images +manifestmeta.thumbnail.names = "QtTestLib/Chapter *" + navigation.landingpage = "Qt Test" navigation.cppclassespage = "Qt Test C++ Classes" 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/src/xml/doc/qtxml.qdocconf b/src/xml/doc/qtxml.qdocconf index 8ca421ff4e..419859ac8b 100644 --- a/src/xml/doc/qtxml.qdocconf +++ b/src/xml/doc/qtxml.qdocconf @@ -40,3 +40,6 @@ imagedirs += images \ navigation.landingpage = "Qt XML" navigation.cppclassespage = "Qt XML C++ Classes" + +# Add a thumbnail for examples that do not have images +manifestmeta.thumbnail.names = "QtXml/XML Stream Lint Example" 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 } |