summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Switch examples to build as isolated sub-buildsAlexandru Croitor2021-12-155-15/+15
| | | | | | | | Task-number: QTBUG-90820 Change-Id: I5ad7541596d39cb089f9af03b8a194b968659910 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit b87c3573c48666ec1aba018422ab22284a6117b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing CMake commands in the linguist examplesLucie Gérard2021-11-047-0/+54
| | | | | | | | | | | Also, extend the documentation of the arrowpad and hellotr examples to cover the CMake commands used to produce translations. Fixes: QTBUG-96162 Change-Id: Ib6d6adb32709c34eb0feb8befdf2d8e66a59ca53 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lucie Gerard <lucie.gerard@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace 0 with nullptrZhang Hao2021-10-181-1/+1
| | | | | | | | We know that c++11 uses nullptr to replace 0, so we replace 0 with nullptr in the project. Change-Id: I52e3b70f58c477414ad8187e3d3cdae25408ecc7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-2215-15/+15
| | | | | | | | | | | | | Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Pick-to: 6.2 Task-number: QTBUG-95018 Change-Id: I1191a6b4b5c13b2b6047a0e2a2ff8c3801f6762b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Linguist examples: Fix translator loading codeFriedemann Kleint2021-08-302-6/+6
| | | | | | | | Adapt to qtbase/74515a7a30b809a3ab0a2d67496e870ea3c872e6. Pick-to: 6.2 Change-Id: I089970f5e2a7f16ba470aaf4d9e7f1fc9c3e50fd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Examples: Don't use QDir::separator() in internal pathsKai Köhne2021-06-143-11/+13
| | | | | | | | | | | | Documentation says: You do not need to use this function to build file paths. If you always use "/", Qt will translate your paths to conform to the underlying operating system. Pick-to: 5.15 6.2 Change-Id: Iba62a197821b9abc819c3d333e44c9f1ed989898 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix qdoc warning and broken linkVolker Hilsheimer2021-04-133-3/+3
| | | | | | | | | The link to qobject_cast was overly specific, so no link was generated. Pick-to: 6.1 6.1.0 Change-Id: I74990ee89997a5f91d617db1eb116a2bb3bd4864 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Don't use deprecated QLibrary::locationVolker Hilsheimer2021-03-264-5/+5
| | | | | | | Use QLibrary::path instead to silence compiler warnings. Change-Id: Ib39ab1528f6060ae37dddfaf6b69e420c37bcd35 Reviewed-by: hjk <hjk@qt.io>
* Brush up the taskmenuextension exampleFriedemann Kleint2021-02-034-33/+31
| | | | | | | | | | | | | | | | | | When porting the code to Python, some issues showed up. - Rewrite cellRect() to take the position (reason being that porting the existing code to Python creates problems with implicit conversion to float in the division). - Use plain assignment by operator[] to replace the characters in the string - Avoid repeating return types. - Streamline code. - Initialize myState member variable. - Indicate C++ in the tool tip Task-number: PYSIDE-1455 Change-Id: I62fa61eebaa2eefe8db0842d6a3789bd7cd4257e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Qt Designer: Use raw string literals for domXML functions in pluginsFriedemann Kleint2021-01-064-56/+65
| | | | | | | This improves readibility. Change-Id: Id8cffc15ee7fae9cd4a5f51bbf778849b9774226 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Revert "Exclude assistant from build"Kai Koehne2020-11-232-2/+12
| | | | | | | | | | This reverts commit 7aeec24a9b8c00ee56891e4037406eca8271aa4d. Reason for revert: See discussion in QTBUG-86746 Pick-to: 6.0.0 6.0 Change-Id: I9e9cc95513a1b9b3685b10b262ae2ee7334caf69 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* QtHelp: update generated help filesJarek Kobus2020-11-212-0/+0
| | | | | | | | | Otherwise, when help engine is in readonly mode, it won't be able to autofix them on startup. Pick-to: 6.0 6.0.0 Change-Id: I6a6cd33252f8ae315748cad4626821036754f3b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Exclude assistant from buildJarek Kobus2020-11-052-12/+2
| | | | | | | Task-number: QTBUG-86746 Tash-number: QTBUG-88123 Change-Id: Ia086ab9a7c193e7829ef886929dc921432f67a1b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Regenerate examples to set the WIN32_EXECUTABLE propertyAlexandru Croitor2020-10-2620-0/+80
| | | | | | | | As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Change-Id: I26917656f6f2b653649765ebbea4e3f348b22ae7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate examples to use qt_add_executableAlexandru Croitor2020-10-2016-16/+16
| | | | | | Task-number: QTBUG-87661 Change-Id: I06af51591b79f9432d09b08595f8af021118a6dc Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Remove deprecated functionalityLars Knoll2020-08-241-3/+4
| | | | | | | Required to get the module to compile against a new qtbase Change-Id: I4f7c6f10c94da640c1f1eec0bbbbc22bbd7cb2ea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* examples: Fix compilation issues with QMultiMapSamuli Piippo2020-08-141-1/+1
| | | | | Change-Id: I845d24352b2e9e57b4ccf0b84134710388417762 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Check the return value from QTranslator::load()Edward Welbourne2020-08-041-1/+2
| | | | | | | Examples should exhibit good practice. Change-Id: Ib1ec9c85ca4202ef6d0b5884aea101c64913507f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "Qt Designer: Migrate from QList to QVector"Friedemann Kleint2020-06-082-3/+3
| | | | | | | | | | This reverts commit ee87edebe6f934ec915b7cb4a0f5a28f73e9f221. The official class name will be QList. Task-number: QTBUG-84469 Change-Id: Ia6c1f0ed64b3ef3d5b8e0c0435ec76fbe76f867b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* examples: fix the Designer plugins directoryChristophe Giboudeaux2020-06-044-4/+20
| | | | | | | INSTALL_EXAMPLESDIR shall be used when installing examples. Change-Id: Ieed06f4376c33a27660f5cf895862d38c52867df Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port QtTools examples to cmakeMårten Nordheim2020-06-0327-1/+874
| | | | | Change-Id: I11146959edbec6b4577fdd339d0fcb807f53c95b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix ambiguous construction from char to QCharLiang Qi2020-05-181-1/+3
| | | | | Change-Id: I956c9764ac4e4da24bfd5676433a02159cbfcfdc Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix compilation of exampleLars Knoll2020-05-181-1/+0
| | | | | Change-Id: I05baa125797065c44d6e7d80861e75f993050512 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Polish the SimpleTextViewer exampleFriedemann Kleint2020-04-246-45/+54
| | | | | | | | | | | - Port to Qt 5 connection syntax, fixing error in Qt 6 QObject::connect: No such signal QComboBox::currentIndexChanged(QString) in findfiledialog.cpp:194 - Remove unused functions and parameters to avoid QOverload - Add process error handling Pick-to: 5.15 Change-Id: I923f44ce0eb27b7f73f9a0e16c11f48a80a0c03a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* SimpleTextViewer example: Fix documentation not showingFriedemann Kleint2020-04-243-8/+38
| | | | | | | | | | Add a path search including the application source directory, which should at least fix Qt 5.15. For educational purposes, also uses some standard paths. Pick-to: 5.15 Change-Id: I1b20bd632b604a1413d7ac66d2e419e771708562 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix some deprecation warningsFriedemann Kleint2020-04-151-1/+1
| | | | | | | | | | | findfiledialog.cpp:188:24: warning: ‘AdjustToMinimumContentsLength’ is deprecated: Use AdjustToContents or AdjustToContentsOnFirstShow [-Wdeprecated-declarations] tst_lupdate.cpp:291:63: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] tst_qtattributionsscanner.cpp:112:63: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] tst_qtdiag.cpp:70:27: warning: ‘void QProcess::start(const QString&, QIODevice::OpenMode)’ is deprecated: Use QProcess::start(const QString &program, const QStringList &arguments,OpenMode mode = ReadWrite) instead [-Wdeprecated-declarations] Change-Id: I103a28bd6ce97de311042f145d4a793be9d4b9a7 Pick-to: 5.15 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Migrate away from QRegExpFriedemann Kleint2020-03-191-3/+6
| | | | | | | | | | | It will be moved to Qt5Compat, avoid depending on it where not necessary. Remove usages in Qt Designer, windeployqt and examples. Change-Id: I5f5efc6999e60d995ebbc81fcaf80e7be08711b2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-181-1/+1
|\ | | | | | | Change-Id: Iddb27e0884cb095f46fd668a2b8d64dc6dd4f58d
| * Assistant/remotecontrol example: Fix deprecation warningFriedemann Kleint2020-02-131-1/+1
| | | | | | | | | | | | | | | | Use {} to initialize QFLags, fixing: remotecontrol.h:67:70: warning: ‘constexpr QFlags<T>::QFlags(QFlags<T>::Zero) [with Enum = Qt::WindowType; QFlags<T>::Zero = int QFlags<Qt::WindowType>::Private::*]’ is deprecated: Use default constructor instead [-Wdeprecated-declarations] Change-Id: I0a29d15312c00e5efa203121c28e170e109bc7c0 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* | Qt Designer: Migrate from QList to QVectorFriedemann Kleint2019-12-092-3/+3
| | | | | | | | | | Change-Id: I75f6f4b7157616ba86bf520e1936536571a66ba5 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-231-10/+8
|\| | | | | | | Change-Id: Ib7e4d5d1f997c67bb68f4c5cb20adb4a5e26f6f5
| * Doc: Resolve documentation warningsTopi Reinio2019-11-111-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | - QDoc Manual: UIComponents example project has been moved to be a part of test case - remove references to it from the manual. - Add missing image. - Document the namespace qdesigner_internal as \internal. Fixes: QTBUG-79833 Change-Id: Ic0984cef4091e794de5e502d04a897b1f532d9d8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Qt Designer: Clean up the SDK headersFriedemann Kleint2019-11-113-0/+15
|/ | | | | | | | | | | | | | | - Use "= default" for constructors/destructors - Disable copy/move for non-QObject type interfaces and add constructors were needed - Remove duplicated disable copy for QObject type interfaces - Fix some formatting - Remove default implementation of QDesignerContainerExtension::canAddWidget()/canRemoveWidget() - Remove Qt 6 fixme comments Task-number: QTBUG-79896 Change-Id: If9521910c6488c081817e2ccdbf42de578cb16ad Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* disable tools that don't make sense on iOS more sensiblyv5.12.0-alpha1Oswald Buddenhagen2018-09-111-4/+5
| | | | | | | | | | | the primary method of doing that is via the -nomake tools machanism, which is the default when cross-building. amends 78df61b51. Fixes: QTBUG-70454 Change-Id: I837d5d130c1295154dab5d0424da46dacbfe2a34 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Disable tools that don't make sense on iOSTor Arne Vestbø2018-08-271-1/+4
| | | | | | | | | Until we can build hosts tools (or tools that only make sense to run on the host/development platform, not the target), that have GUI dependencies, we have to exclude the tools completely. Change-Id: If12c5b4bd47a6456f7ae2779a62cca430cf15c3c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge qcollectiongenerator into qhelpgenerator toolJarek Kobus2018-07-261-2/+2
| | | | | Change-Id: I3c961d7c13ce4f9a3aa36dd0554ec5184fbc5953 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix links in simpletextviewer example .qhp fileKai Koehne2018-03-205-56/+61
| | | | | Change-Id: I9694fd92853c15f2eecb2bdd1b9655b05940f217 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-182-2/+6
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia803aad211281c71a8d13b403d83fb5ec3b2cb2c
| * SimpleTextViewer example: Remove QObject::tr antipatternKai Koehne2018-01-042-2/+6
| | | | | | | | | | Change-Id: I8e7d1dcf9cd2a5a1ccc563032324528fe3262611 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-1513-76/+77
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/examples.pro Change-Id: I1b10716619d6a07466db9d5407a958062e7cd38a
| * RemoteControl example: Remove Q_INIT_RESOURCEKai Koehne2017-10-041-2/+0
| | | | | | | | | | | | | | For exectuables, resources are initialized by default. Change-Id: I3d1aea0afd9cc01996d4b0a496ac9a01787fce4a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * RemoteControl example: Remove superfluous connectKai Koehne2017-10-041-1/+0
| | | | | | | | | | | | | | quitOnLastWindowClosed is the default. Change-Id: Ic2afbef731895f2fce17050655d11facd51736ab Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * Assistant Examples: Use nullptrKai Koehne2017-10-044-4/+4
| | | | | | | | | | Change-Id: Icfede0f02c6651aa39e2a0a9d5b586a5bb7037e9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * Assistant Examples: Remove stray ;Kai Koehne2017-10-041-1/+1
| | | | | | | | | | Change-Id: I4374610fa78d2c42fc8ca88d80cd1f50a431d046 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * Assistant Examples: Unify #include styleKai Koehne2017-10-0412-59/+64
| | | | | | | | | | Change-Id: I72c419123e27e06ae30fa2042fb8bb6ddbab9da4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * Improve SimpleTextViewer example documentationKai Koehne2017-09-181-9/+8
| | | | | | | | | | Change-Id: I6da730993b6e9a0fd3b75705547260aef638048d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Fix exclusion condition for assistant examplesJake Petroules2017-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | The actual reason why they were disabled for WinRT is because that platform lacks process support (see 40e060d). Therefore, this fixes the build for VxWorks as well. Change-Id: Id411c467f4c3bbed45f7bd3bd8d4881c72f3b466 Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix problems when building with -no-feature-processUlf Hermann2017-09-121-1/+1
|/ | | | | | | | | | | Guard the QProcess includes, modernize some ifdefs, exclude tests and examples that don't work without processes, and use QT_CONFIG(process) rather than QT_BOOTSTRAPPED as discriminator where we are actually checking for QProcess support. Also, don't try to build linguist and designer without QProcess. Change-Id: I4e1c7485a96ff02f2f6241113add35e44dc54b1d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Qt Designer Examples: Brush up to C++ 11Friedemann Kleint2017-06-2623-64/+49
| | | | | | | | Use nullptr, member initialization, QOverload, etc. Task-number: QTBUG-61184 Change-Id: I45061c506dad72d5f495f480b3e61f4d1c0599d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* MultipleInheritance: Improve code and documentationKai Koehne2017-06-264-7/+8
| | | | | | | Task-number: QTBUG-61419 Change-Id: I858027db3ca83a4fe41a576919acbb408db35cff GPush-Base: 8abb03b0d84a3a94f7db41e010f69955488ea893 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>