summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-206-43/+44
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-183-31/+32
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| | * Doc: updated QSyntaxHighlighter documentation and use QRegularExpressionSamuel Gaist2017-04-123-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of QSyntaxHighlighter still uses the deprecated QRegExp class. This patch updates the code samples as well as cleanup some typos. Change-Id: I87b525fddb560b7c5bb38f96d9aaceadb594f76c Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | examples: remove some unneeded QStringRef::toString() callsMarc Mutz2017-04-073-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - when appending to another string - when just comparing - when just calling toInt() Change-Id: I6960784569b83bfd3e3640a8c04f2f909c293449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | hellovulkanwidget example: Add a widget showing debug outputFriedemann Kleint2017-03-303-9/+34
| | | | | | | | | | | | | | | | | | | | | Add a tab widget for vulkan info and debug log. Change-Id: I0428bb5b6f847d0e94d62e846d34e4cb69eda5b6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Add the Vulkan cube exampleLaszlo Agocs2017-03-2931-1/+5703
| | | | | | | | | | | | | | | | | | | | | Features a little bit more than a cube, though. Change-Id: I636d4875ba9ccf722ed3caab97f14570be785748 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-283-10/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-273-11/+11
| |\| | | | | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| | * Build examples and tests only if their requirements are metUlf Hermann2017-03-223-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the respective modules aren't available we cannot build the tests and examples. We drop the qtConfig(opengl) requirement for the opengl examples as a, we would need to make the QtGui configuration available for that to work, and b, we should not add too much detail to the tests and examples build configurations. Checking each test and example for every feature it uses would be too much. Task-number: QTBUG-57255 Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Clarify the front face winding order in the Vulkan examplesLaszlo Agocs2017-03-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | After applying the correction matrix the front face is CW, not CCW. The examples work either way but fix them up to avoid reader confusion. Change-Id: I491e6dc17c21897a59f36d32061e937f2b6c4c9d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Introduce QVulkanWindowLaszlo Agocs2017-03-2238-1/+2765
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A convenience subclass of QWindow that provides a Vulkan-capable window with a double-buffered FIFO swapchain. While advanced use cases are better served by a custom QWindow subclass, many applications can benefit from having a convenient helper that makes getting started easier. Add also three examples of increasing complexity, and a variant that shows embeddeding into widgets via QWindowContainer. [ChangeLog][QtGui] Added QVulkanWindow, a convenience subclass of QWindow. Task-number: QTBUG-55981 Change-Id: I6cdc9ff1390ac6258e278377233fd369a0bfeddc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-202-5/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-132-5/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | * Example: migrate treemodelcompleter example to use QRegularExpressionSamuel Gaist2017-03-071-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Update the treemodelcompleter example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I9fa91ca6e847603de37019e4ca86fc69a51a3772 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: fix memory leak in relationnaltablemodel exampleSamuel Gaist2017-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The example creates a view on the heap but doesn't delete it on application end. This patch uses a QScopedPointer to fix that. Change-Id: I3b0c8589999d243c193bd02e1470c03eabfabe40 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Fix building of various examples and tools with -no-feature-processUlf Hermann2017-03-062-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | We should not check for platforms, but rather for features. Also, if dbus is available it doesn't automatically mean that QProcess is. Change-Id: I27ef5863fcb107cca1aa47abba95b734962adc33 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Deprecate QSignalMapperOlivier Goffart2017-03-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Does not make much sense now that we can connect to lambda functions [ChangeLog][QtCore][QSignalMapper] QSignalMapper is now marked as deprecated. Change-Id: I89135f23fdf16b42142a125eb7c9a86084c90bfc Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-148-64/+178
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | Fix computegles31 examplePaolo Angelelli2017-03-083-48/+82
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the example that contained problems showing up with mesa/nouveau drivers. Change-Id: Ic90f6028e394138781f00bcc00c145c56134f441 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
| * | Replace outdated BSD license textKai Koehne2017-03-038-16/+96
| | | | | | | | | | | | | | | | | | | | | | | | For examples and documentation, use new BSD license text that includes the commercial licenses. Change-Id: I1cd74bd8e9c8f2746d8702df00780ee100cbebac Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-022-1/+1
|\| | | | | | | | | | | Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-1/+0
| |\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| | * use regular configure mechanism for openssl library referencesOswald Buddenhagen2017-02-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't attempt to hand-craft a library export any more. instead, use the configure system's built-in mechanism, and refer to it via QMAKE_USE. this also allows us to rely on transitive dependencies in the autotest. as a side effect, this makes the openssl-linked feature imply the openssl one. Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | make TabletMove hover events conditional on QWidget::tabletTrackingShawn Rutledge2017-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the tabletTracking property in the same way that mouseTracking already existed: there is a WA_TabletTracking attribute, and a TabletTrackingChange event to notify when it changes. So for widget applications it's an opt-in feature. QtQuick applications don't yet make use of tablet events, but when they do in the future, we don't yet have a mechanism to turn the move events off; it remains to be seen whether that will be necessary. [ChangeLog][QtWidget] QWidget now has a tabletTracking property, analogous to mouseTracking, which will enable TabletMove events while the stylus is hovering, even if no button is pressed. This allows applications to show feedback based on the other tablet event properties such as rotation and tilt. Task-number: QTBUG-26116 Change-Id: Ie96e8acad882b167e967796cdd17f1ad747a2771 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Add support for custom texture format in QOpenGLWidgetLaszlo Agocs2017-02-262-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...in order to support sRGB framebuffers. Add a --srgb option to the qopenglwidget example to allow testing. [ChangeLog][QtWidgets][QOpenGLWidget] Added support for specifying custom internal texture formats in QOpenGLWidget in order to make it possible to have the widget backed by an sRGB-capable framebuffer. Task-number: QTBUG-50987 Change-Id: I112e2f0ab0b1478c69e601031aa0bafaa87fa847 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Examples: use std::atan2 for simper angle calculationsEdward Welbourne2017-02-235-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using std::atan2 gets the right answer directly from dy and dx, without having to fix up quadrant as we needed to with acos (albeit we have to negate dy in some cases, to match prior sense of angles). In the process, it avoids explicit division, which would be an error when the line's length is zero. Change-Id: Ia2923159d38834e08e6f15cbff6766ed419fa804 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-178-54/+56
|\| | | | | | | | | | | | | | | | | | | | Conflicts: qmake/Makefile.unix Change-Id: Ia18e391198222eef34ffa2df6f683e052058d032
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-167-51/+54
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: I632c400d909f8c204f55743aadc7886af2f15dfb
| | * Example: migrate flightinfo to QRegularExpressionSamuel Gaist2017-02-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Update the flightinfo example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I2395b37170565e922500e675210c400e90ae0f73 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate grabber to use QRegularExpressionSamuel Gaist2017-02-151-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Update the legacy grabber example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I1d1871b7e82cdb214fdd8ad55a606d5e7682fab1 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate the arthur code sample to use QRegularExpressionSamuel Gaist2017-02-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the arthur code sample to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ic7efd4466b4c0fa50170b80ebb22fcb3624399ce Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate the codecs example to use QRegularExpressionSamuel Gaist2017-02-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the codecs example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ibd60b7256071f8166c4bf38e6a40935494c3cf3f Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate settingseditor example to use QRegularExpressionSamuel Gaist2017-02-152-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | Update the settingseditor example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I07e34bf916bdde161c4253fca70b853061cd589b Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate stylesheet example to use QRegularExpressionSamuel Gaist2017-02-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the stylesheet example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I7061b8fd462ff012cb67bfdade656b3bfe442dd8 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | macOS: Make QMacNativeWidget example more usableTor Arne Vestbø2017-02-121-3/+2
| | | | | | | | | | | | | | | Change-Id: I3948c998dfbc2982a79d597c7ea3bc226df9c125 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Polish the XML bookmarks examplesFriedemann Kleint2017-02-1716-208/+227
|/ / | | | | | | | | | | | | | | | | | | | | | | | | - Use Qt 5 connect syntax. - Streamline code, remove unused members. - Add a context menu for copying and opening the URLs. - Add const to XML code. - In the XML code, show the use of QStringLiteral in static inline functions to create strings versus QLatin1String in comparison overloads to avoid allocating strings from const char * literals. Change-Id: Ib5e62ca188e271ffe01996dff3c9ea8e0b60739a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | QRegularExpression example: Handle empty patternsFriedemann Kleint2017-02-092-41/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when clearing the pattern by clicking the clear button, the result match list would display a list of empty matches since apparently an empty pattern matches as many times as the subject is long. This is confusing when using the tool. Restructure RegularExpressionDialog::refresh() so that it bails out if the pattern is empty or invalid. Change-Id: I8119a75db50cead3f64394016e3390a9bf7d0bf7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-081-1/+0
|\| | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| * QXmlStream{Reader,Writer} don't need QtXmlThiago Macieira2017-01-311-1/+0
| | | | | | | | | | | | | | They're in QtCore. Change-Id: I63e21df51c7448bc8b5ffffd148f03c5e80b6fea Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Merge remote-tracking branch 'gerrit/dev' into HEADOswald Buddenhagen2017-02-0125-94/+43
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-304-6/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network-chat/peermanager.cpp src/widgets/util/qsystemtrayicon.cpp src/widgets/util/qsystemtrayicon_qpa.cpp src/widgets/util/qsystemtrayicon_win.cpp src/widgets/util/qsystemtrayicon_x11.cpp Change-Id: I1c026df83818c0ccaf956980370e7522960627db
| | * Example: migrate the classwizard example to use QRegularExpressionSamuel Gaist2017-01-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Update the classwizard example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: I125664549e249c4156f8c664fac7648f1c41f9d5 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate licensewizard example to use QRegularExpressionSamuel Gaist2017-01-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the licensewizard example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ib6e0ee9ec802e83540b1c37846b99378395fe0ec Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Doc: Fixed old text still mentioning QRegExpSamuel Gaist2017-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The example has already been ported to QRegularExpression however part of the documentation still referred to the QRegExp class. This patch updates the documentation to match the new version of the code. Change-Id: Id433d0b28deae0c4f702c0c54d2704174f8c7689 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Tutorial: migrate addressbook tutorial to use QRegularExpressionSamuel Gaist2017-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Update the addressbook tutorial to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Ibea9252ab8fe1d12e6fc862fa70229ca6efe0804 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Example: migrate network-chat to use QRegularExpressionSamuel Gaist2017-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Update the network-chat example to use the new QRegularExpression class in place of the deprecated QRegExp. Change-Id: Idcd3dc5b3e9b520b2eeef9565d50195cc8dffd06 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-2521-88/+34
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
| | * examples: Use lambdas instead of functor classesAlexander Volkov2017-01-092-25/+4
| | | | | | | | | | | | | | | | | | Change-Id: Iee2cc22a9239ab5a351cb5ecb2c8ce10ed019b2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | * Fix compilation without sharedmemoryUlf Hermann2017-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to enable qt_safe_ftok with either sharedmemory or systemsemaphore. In order to make the resulting QT_CONFIG work with the bootstrap library we switch the features off for bootstrapping. Some tests and examples have to be excluded when sharedmemory is not available. Change-Id: I3fc3926d160202b378be2293fba40201a4bf50c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * prune vestiges of DEPLOYMENT_PLUGINOswald Buddenhagen2016-12-233-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the code was broken since 5.0, as it still hardcoded the version number 4 for the plugin basenames. wince is not supported any more, so there is no point in trying to restore the code to function. at a later point, we'll make QTPLUGIN universal enough to cover both static and dynamic deployment. Change-Id: I0911ce4aff7a799dd471d6218e046f13dca6d49e Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>