summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* sub-attaq example: Fix crash with software Open GLFriedemann Kleint2018-03-151-2/+7
| | | | | | | | | | Check whether an Open GL context could be created, else fall back to raster. Task-number: QTBUG-64797 Change-Id: I91bba41b0efca85293a1a4af054842b9f309b126 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 59343eef7dce58b1c167250b59b5f0a68428aa14)
* examples: Add localserver feature check for localfortune examplesFrank Richter2018-01-271-1/+5
| | | | | Change-Id: I536645ddf0a5ead31a2658d03984c1226a7c39c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* hellogles3 example: Fix start-up crash when using dynamic GLFriedemann Kleint2018-01-261-2/+2
| | | | | | | | | Move the instantiation of QGuiApplication to the top since it is required by QOpenGLContext::openGLModuleType(). Task-number: QTBUG-55671 Change-Id: I506cee193fe2ba48400851588a8ef079848bc2f4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Revamp QtConcurrent examples to C++11Michael Winkelmann2017-11-075-48/+57
| | | | | | | | | I updated signals and slots and for each loops to the new syntax and replaced most free functions with std::function. Task-number: QTBUG-60641 Change-Id: I7693f81f71c7f53fcbe83189a0de2fb76ddf99a8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* regularexpression example: Fix compilation with clipboard disabledFriedemann Kleint2017-09-281-2/+10
| | | | | | | | Use the new configure system consistently. Task-number: QTBUG-63429 Change-Id: I6668ba9fde09492f3e60e614103e18e88783d0c4 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Revamp SQL examples to C++11Michael Winkelmann2017-09-1430-146/+171
| | | | | | | | | | | | Changed signals and slots to new syntax, used nullptr and replaced foreach with new C++11 range based for loops. Also fixed a few minor flaws. Task-number: QTBUG-60633 Change-Id: Ice4030133971912f96752d9d84c638c70fd73e35 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Hello GL2 example: Fix exit crashFriedemann Kleint2017-09-051-0/+2
| | | | | | | | Bail out of cleanup() when run 2nd time. Task-number: QTBUG-60626 Change-Id: I8a9be2fcfb0e8a5584ce8ed7952affff24bd2a33 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* OpenGL examples: Introduce QCommandLineParserFriedemann Kleint2017-09-056-12/+82
| | | | | | Task-number: QTBUG-60626 Change-Id: I6d102327c89206fcdce10f3ac04e112270b11ad2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* examples: fix compile without opengl supportPeter Seiderer2017-08-291-1/+2
| | | | | | | | | Compile examples/opengl only in case opengl support is available. Task-number: QTBUG-62372 Change-Id: I742a1eb7b7639a5a722c4d5e9b4ee070b629b02e Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Regular Expression Example: Add context menuFriedemann Kleint2017-07-191-7/+94
| | | | | | | | | | | Add context menu providing: "Escape Selection" Apply QRegularExpression::escape() to selection "Paste from Code" Paste from C++ "Copy to Code" (for completeness) Task-number: QTBUG-60635 Change-Id: Iee15c2243c7d0435b623dde4a1b26249aecd0553 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Examples: Remove remains of winceFriedemann Kleint2017-07-1413-65/+16
| | | | | | | | | | | Task-number: QTBUG-52590 Task-number: QTBUG-60628 Task-number: QTBUG-60633 Task-number: QTBUG-60635 Task-number: QTBUG-60641 Task-number: QTBUG-60659 Change-Id: I9ffc3e25893d2281b19cc12b70e1a92fb2a8b708 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* pathstroke example: Add Q_FALLTHROUGH to unmarked fallthrough seen by GCC 7Friedemann Kleint2017-07-091-0/+1
| | | | | | Task-number: QTBUG-60635 Change-Id: I10695f96122f1b0859bbe7fadb349efb3c7277a6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove WinCE-specific sipdialog exampleFriedemann Kleint2017-07-055-404/+0
| | | | | | | Task-number: QTBUG-52590 Task-number: QTBUG-60635 Change-Id: Ie6d59d1431645faf93d1538fe9f5bf1bea9f3014 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add list with widgets examples using layoutsNico Vertriest2017-07-0310-0/+10
| | | | | Change-Id: I585cd63f68220467de1beed3346cdaa12af2b34b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: cleanup raster window exampleGatis Paeglis2017-07-031-8/+3
| | | | | | | | | | | | | Documentation does not match the sample code. There is no explicit call to QWindow::create(). It is called implicitly by QWindow::show(). Furthermore, QWindow::create() documentation states: "Note that it is not usually necessary to call this function directly, as it will be implicitly called by show(), setVisible(), and other functions that require access to the platform resources.". Change-Id: I632da86438f7f88c1fd8359b9fd6d52f329291cb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Convert features.wizard to QT_[REQUIRE_]CONFIGStephan Binner2017-07-021-1/+5
| | | | | Change-Id: I43e3d9f55a21ae0f602fc43c570321d0152cd8b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.statustip to QT_CONFIGStephan Binner2017-06-291-2/+2
| | | | | Change-Id: Ic719ab93ed1802fcc713885ad0421cb44c7a998b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-2810-10/+10
| | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.printdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-05-3012-24/+69
| | | | | Change-Id: Ifb016ae2a0986b436f788b34513c81ea91f3804a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Doc: Replace "Macintosh" with something suitable or omit itLeena Miettinen2017-05-231-2/+2
| | | | | Change-Id: I3067bd7e6ae2d6d68d5232a56eaf368a0415876c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Add some missing breaks in switch statementsMarc Mutz2017-05-101-0/+2
| | | | | | | | Found by GCC 7. Change-Id: I90267617a038558e5b5213c598a949baf8d4d9be Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove some more register keywordsMarc Mutz2017-05-061-1/+1
| | | | | | | They're deprecated since C++11 and removed in C++17. Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* examples: fix compile without gui modulePeter Seiderer2017-05-052-2/+2
| | | | | | | | | | | | | | With disabled gui module qmake in the directory examples/gui and examples/widgets failes with: Project ERROR: Could not find feature opengl. Fix this by protecting 'qtConfig(opengl)' by 'qtHaveModule(gui)' as already done in examples/examples.pro. Task-number: QTBUG-60488 Change-Id: Ia842124e818e8c81d41d2b8e3b8905bf1dee58ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Update rasterwindow example to not create() in the constructorTor Arne Vestbø2017-04-211-4/+1
| | | | | | | QBackingStore should be able to handle a non-created QWindow just fine. Change-Id: I42299aa0e985422e1fe4279c1385b9979d267a47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* 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>
* | 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>
* | 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>
* | 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.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>
* | 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>
* | 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
|\ \