summaryrefslogtreecommitdiffstats
path: root/examples/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Fix feature dependencies for sharedmemoryMorten Sørvig2 days1-1/+1
| | | | | | | | | The sharedmemory example depends on systemsemaphore as well. Change-Id: I0937e6429589f715ec446ac1337e21cb23cdf92b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
* Android notification example: Correct connect statementsAxel Spoerl2024-04-041-2/+2
| | | | | | | | | | | | The example breaks building 6.7 with examples on Android, due to QObject::connect() to a lambda without context object. Add context object. Fixes: QTBUG-123989 Pick-to: 6.7 6.6 6.5 6.2 Change-Id: Id3994e577a8a676220ac8d9f95d01c054839c143 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: add core-private to use private permissions APIAssam Boudjelthia2024-03-251-0/+1
| | | | | | | | | Amends 7fa6d09ca20b27b8350e6e26040372ba70e6244d. Pick-to: 6.7 6.7.0 6.6 6.5 Fixes: QTBUG-123353 Change-Id: If79498d28b890772f23963621e6e7bd263a56aca Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* CMake: Add deployment API to our examplesAlexandru Croitor2024-03-2215-135/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Projects were modified using the tool at: https://git.qt.io/alcroito/cmake_refactor A couple of examples had to be adapted manually, due to them including more than one app per example subdirectory. The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were removed. The install(TARGETS) calls were modified according to our documentation snippets for qt_generate_deploy_app_script. A qt_generate_deploy_app_script call was added for each executable target. Note that the deployment step will be skipped in the CI for now, because we enable QT_DEPLOY_MINIMAL_EXAMPLES and thus QT_INTERNAL_SKIP_DEPLOYMENT, and also because standalone examples are not enabled yet, and deployment is disabled for in-tree (so no-standalone-example) prefix builds. The install(TARGETS) calls for each example will still run, installing the examples into an installed_examples directory, that will not be archived by the CI. Pick-to: 6.7 Task-number: QTBUG-102056 Task-number: QTBUG-102057 Change-Id: Ida389bbad41710b2ae5da4d95e2d85be9e0cd9ce Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake: Use qt_internal_add_example for bindablepropertiesAlexandru Croitor2024-03-111-1/+1
| | | | | | | | | | | bindableproperties is the actual project, not a subdirectory with separate examples. It should use qt_internal_add_example. Pick-to: 6.6 6.7 Task-number: QTBUG-90820 Task-number: QTBUG-123096 Change-Id: I409d20e035956e6c236f84721b3c6882893cd547 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Correct license for examples filesLucie Gérard2024-03-0725-25/+25
| | | | | | | | | | | | | | Example takes precedent over build system file type. According to QUIP-18 [1], all examples file should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: Id348a89884bb309b96abb31077f14a51086b5d0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Assign a category to Contiguous Cache ExampleKai Köhne2024-02-191-0/+1
| | | | | | Pick-to: 6.6 6.7 Change-Id: I98e62adce63df7e940d96cd50dcb243366dca216 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Android: request POST_NOTIFICATIONS permission for Android NotifierAssam Boudjelthia2024-02-063-0/+14
| | | | | | | | | | Android 13 and above requires the notification permission "android.permission.POST_NOTIFICATIONS" to be requested at runtime. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-121668 Change-Id: I38512ffc07c1a3ffe7cddffa937b98332f172d15 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: fix style extraction when set to noneAssam Boudjelthia2024-02-061-4/+0
| | | | | | | | | | | If extract_android_style meta data is set to none currently the app still tries to extract full stlye and crashes. If this option is set no style data should be extracted after this patch. Pick-to: 6.7 Fixes: QTBUG-121667 Change-Id: I764e1eb6a582073196f991ca930d245d17a1f7e5 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: remove redundant comments from notifier example manifestAssam Boudjelthia2023-12-221-5/+1
| | | | | | | Task-number: QTBUG-115020 Pick-to: 6.7 Change-Id: I29cd7a45f85bc85f6f12b135287b9eb868a7bc44 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Doc: Fix documentation issues for Qt CoreTopi Reinio2023-12-192-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix template arguments in \fn signatures for Qt::compareThreeWay() functions. * Fix template arguments in \fn signatures for QDebug::operator<<() functions. * Fix \sa links to specific overloads of QSpan functions. * Fix \sa links to specific overloads of QFileInfo::fileTime(). * Remove references to 'Custom Type Example' (example has been removed). * Fix linking to 'JSON Save Game' example. * Fix references to 'Queued Custom Type' example. * Fix linking to QCryptographicHash::Algorithm. * Fix linking to Qt Qml module. * Fix undocumented parameters in qHypot(). Pick-to: 6.7 Change-Id: If9eb9978a14e147f003672a682972b319454c311 Reviewed-by: Luca Di Sera <luca.disera@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* examples: update local fortune example to use transactionSamuel Gaist2023-12-042-12/+5
| | | | | | | | | | The local version of the fortune server and clients were not using the transaction paradigm yet. This patches fixes it and makes the example in line with the network version. Pick-to: 6.6 6.5 Change-Id: Ieb68f67e2921f46acd682f81dfa5dc5b040c88f5 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Rework documentation of the serialization converter exampleEdward Welbourne2023-11-015-59/+140
| | | | | | | | | | | | | | | | | | | The documentation was previously code-heavy and short on exposition, while focusing almost entirely on the CBOR converters. Prune most of the CBOR code quotes, shuffle some snippet markers, add and remove others and rewrite the main text. Shift focus to the base-class for converters and how it's used by main(). Retain relative focus on the CBOR converters, as they are relatively full-featured hence illustrate more than the others do, and replace the sequence of single-line sections about the others with a section collecting all into a table and saying some general things about them. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I8d41f25c165eb1a7ba20cb68aee6ab6b2fd050f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Eliminate duplicate overrides of Converter methods in exampleEdward Welbourne2023-11-0112-82/+21
| | | | | | | | | | | | | | | | | The Out-only converters shouldn't need to implement loadFile(), as it shouldn't be called - a converter is not used for input unless it says it supports input. At the same time, provide the "ground state" implementations for optionsHelp(), outputOptions() and probeFile() to save the trivial implementations the need to duplicate one another. In the process, make the handling of loadFile()'s outputConverter more consistent among those that do implement it. Always set outputConverter if it's initially null (the caller does assert this). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I856d12c791d1f8e0accdb7dd1412d493117b2302 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move Converter class, in eponymous example, to a file of its ownEdward Welbourne2023-11-014-22/+27
| | | | | | | | | | There's more details coming and it's good hygiene anyway. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ief3acf6e508bc93eaa8490f6c49300b25c1d3556 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Break out the list of available converters to a static methodEdward Welbourne2023-11-012-10/+20
| | | | | | | | | | | | | Mostly to pave the way for moving the class code to a file of its own, but this incidentally saves the need to std::as_const() every use. Moving the underlying object to a local static of a private method also saves the need for heap allocation (which was leaked). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I30f4bf3c46d39e04d0ac4e3e9ba431945ebb9193 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Replace confusing member variable with a predicateEdward Welbourne2023-11-014-4/+7
| | | | | | | | | | | | | | | | | | | The Converter class, in the eponymous example, had a null member variable that wasn't a nullptr - it pointed to an instance of NullConverter - so that other converters could test whether a Converter * they'd been passed was null (in the sense of pointing to a NullConverter). This, however, was susceptible to misreading - I misread one such comparison as a nullptr check and thus thought it redundant with an earlier actual nullptr check. To spare future readers similar confusion, replace the public static member variable with a protected (since only other derived classes need it) static predicate, to at least give the reader a clue that this is using the word null in a class-specific sense. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I1e4f494b303d1bf90107f8c6fa3a4a22f6d81b90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename Convert Example to Serialization ConverterEdward Welbourne2023-10-302-4/+4
| | | | | | | | | | | | The old name didn't say what sort of thing it was converting; and our guidelines for examples discourage using the word Example in the title. Also reword the description of the tool in the command-line parser and an assertion. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I6f52f5227362b4b807c8aabfd2103287af42bca0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Convert fprintf(stderr, ...); exit(EXIT_FAILURE); to qFatal(...)Edward Welbourne2023-10-307-91/+62
| | | | | | | | | | | | The serialization conversion example used raw C's way to abort on error; change to using Qt's way of doing the same. Likewise, convert the various other uses of fprintf(stderr, ...) to qWarning() and of printf(...) to qInfo(). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ia8821d3c20f58f71c106028ec422ad473c11e164 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Make Converter::saveFile() consistently error on unexpected optionsEdward Welbourne2023-10-301-1/+4
| | | | | | | | | | Have the text dumper do the same as all the others, instead of ignoring unknown options. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I3c1dcbeda19e679be562110e44c5f566dfcc79ce Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QueuedCustomType example: use QThread::requestInterruptionVolker Hilsheimer2023-10-273-19/+2
| | | | | | | | | | | | | Drop the home-made solution with mutex and bool (which could have been an atomic, but we have had a ready-made solution in QThread for a long time). Pick-to: 6.5 6.6 Change-Id: Id213a021f0ae94215afb28ff874fcb597dd1e6f9 Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Ed Cooke
* Rename the JSON Save Game Example to Saving a Game to FileEdward Welbourne2023-10-201-1/+1
| | | | | | | | | | | Partly because it also saves to CBOR, but also because our guidelines say to avoid using "Example" in the title. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Id858475a6b0474228cfe8044e188cc763f56e3a8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Split VariantOrderedMap out of Converter's header in exampleEdward Welbourne2023-10-168-15/+31
| | | | | | | | | | Although used mostly in the same files, they're separate types, so define them in separate places. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I9e64b382ad48f9a74e432ccd49b6f5fcc9316da3 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Remove unused Map alias for VariantOrderedMap in convert exampleEdward Welbourne2023-10-161-2/+0
| | | | | | | Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ic82f7961df5f7a5bb0cd6cc113e4019508e58f47 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Local Fortune Server Example: Allow specifying the server nameRym Bouabid2023-10-063-21/+77
| | | | | | | | | | | | The server used to hardcode the name while the client allows the user to specify it. The server's UI is adjusted to let the user first specify the server name he wants to listen to and second stop listening to the current server. Task-number: QTBUG-117064 Pick-to: 6.6 6.5 Change-Id: I80fc976151ead7a181fbc32080597277bc515313 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Bindable Properties exp: Revisit documentationRym Bouabid2023-10-051-1/+2
| | | | | | | | | | Remove "Example" from the title. Add \examplecategory Data Processing & I/O Fixes: QTBUG-114689 Pick-to: 6.6 6.5 Change-Id: I695df195819cc371d404c4c5f01a0c4830d9c438 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Shared Memory example: Add \examplecategory Data Processing & I/ORym Bouabid2023-10-051-0/+1
| | | | | | | Fixes: QTBUG-108858 Pick-to: 6.6 6.5 Change-Id: I66e1f92eb25ec1377c1f927e767cebaeb3ef5fec Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Wait conditions exp: Add \examplecategory Data Processing & I/ORym Bouabid2023-10-051-0/+1
| | | | | | | Fixes: QTBUG-108860 Pick-to: 6.6 6.5 Change-Id: I2ccf20f42d5abaa22e2daf4c8e7777ff903d947e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Semaphores example: Add \examplecategory {Data Processing & I/O}Rym Bouabid2023-10-051-0/+1
| | | | | | | Fixes: QTBUG-108859 Pick-to: 6.6 6.5 Change-Id: I0fecf50e95c351564e7e41142cd3d385c4d1d867 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Mandelbrot example: Add \examplecategory {Data Processing & I/O}Rym Bouabid2023-10-051-0/+1
| | | | | | | Fixes: QTBUG-108861 Pick-to: 6.6 6.5 Change-Id: Ie622a94072e243eb5d3f6c162e490884d4cdd0f2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Remove Custom Type Example and Custom Type Sending ExampleRym Bouabid2023-10-0415-484/+1
| | | | | | | | | | | | | | | | | | | | | The whole Q_DECLARE_METATYPE part is superfluous in these two examples, as QVariant works with any type as long as it is copy-constructible. And QVariant will call the equivalent of qRegisterMetaType, so that doesn't need to happen, either. Showing how to integrate the type with qDebug is fine in theory, but also a repetition of content that can be found in other places. Given that there isn't much else being shown in these two examples, it's better to remove them from examples and move them to manual tests. Some parts of "Custom Type Example" were used as snippets in other documentations under qtbase/src/corelib. So, they were added in customtypeexample.cpp file in the snippets folder. Fixes: QTBUG-117001 Pick-to: 6.6 6.5 Change-Id: I45b16338912e3f7394cbb5169642bd31af32d5e1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Doc: QtCore: Fix documentation issuesTopi Reinio2023-10-023-3/+3
| | | | | | | | | | | | | | | * Fix references to Wait Conditions Example, Semaphores Example, and MIME Type Browser Example as they were renamed. * Rename 'Shared Memory' example as its title clashes with the title of another page (sharedmemory.html). src/corelib/global/qfloat16.cpp: * warning: Invalid '\relates' (already a member of 'qfloat16') Pick-to: 6.5 6.6 Change-Id: Ia28be8e3882a7ad1fadcdbd50a657705d58526bd Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Revamp Queued Custom Type Ex: Revisit the documentationRym Bouabid2023-10-022-3/+3
| | | | | | | | | | Remove "Example" from the title. Add \examplecategory {Data Processing & I/O}. Task-number: QTBUG-117147 Pick-to: 6.6 6.5 Change-Id: Ieaab75dedb60329dcdcbbcfe6e2ad360df4d98df Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Queued Custom Type Ex: Declare stopProcess() as a methodRym Bouabid2023-10-021-3/+1
| | | | | | | | | | | Declare stopProcess() as a method because it's used in the connect() overload taking a pointer-to-member-function, so it doesn't need help from moc. Task-number: QTBUG-117147 Pick-to: 6.6 6.5 Change-Id: Iaa1c02de82cffdea455af520c37dc0e6e6861443 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Queued Custom Type Ex: Add const when applicableRym Bouabid2023-10-023-12/+12
| | | | | | | Task-number: QTBUG-117147 Pick-to: 6.6 6.5 Change-Id: I2fe342fa585f8c1203fa64d2a9ceabc07070cc77 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Queued Custom Type Ex: Fix includesRym Bouabid2023-10-025-10/+28
| | | | | | | | | | | | Fix includes order and add the needed ones to avoid transitive includes. Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that should not be used in the examples. Task-number: QTBUG-117147 Pick-to: 6.6 6.5 Change-Id: I6caa0a59f2ab4dfec6fb558a0896c27b05b6a5db Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Deduplicate code in setup of serialization convertersEdward Welbourne2023-09-281-82/+49
| | | | | | | | | | | | | | | The setup of the input and output converters is fairly complex but was made harder to read by nearly-duplicating its logic for input and for output. Break out into a separate function to make clear what parts differ between the two and what parts don't. In the process, allow the search for a named converter to continue past a match that doesn't support the needed direction, on the off chance of a name collision. Make an error message more articulate in the process. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I2a9de8b406c538098076f388fc8a1980b91fe16b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Revamp Local Fortune Client/Server Ex: Update the QDataStream's verRym Bouabid2023-09-262-2/+2
| | | | | | | | | ... from Qt5.10 to Qt.6.0 Task-number: QTBUG-117036 Pick-to: 6.6 6.5 Change-Id: I47983b74d1001fa2e2cd278edda3d78430b97b45 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Local Fortune Server Example: Revisit the documentationRym Bouabid2023-09-262-2/+3
| | | | | | | | | | Remove "Example" from the title. Add \examplecategory {Connectivity}. Task-number: QTBUG-117064 Pick-to: 6.6 6.5 Change-Id: I53c106f3429d5fe31ca7a8e8b821e4c1cafdda64 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Local Fortune Server Example: Declare sendFortune() as a methodRym Bouabid2023-09-261-4/+3
| | | | | | | | | | | | | | | Declare sendFortune() as a method because it's used in the connect() overload taking a pointer-to-member-function, so it doesn't need help from moc. Q_OBJECT is not needed anymore as the "Server" class doesn't contain signals and slots anymore. Use Q_DECLARE_TR_FUNCTIONS Macro to allow tr() calls. Task-number: QTBUG-117064 Pick-to: 6.6 6.5 Change-Id: Id197cb4c9f9df2102b769d028d8a0cae91e5c492 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Local Fortune Server Example: Fix includesRym Bouabid2023-09-263-10/+10
| | | | | | | | | | | | | | | | Fix include order to respect the Coding Conventions. Add needed includes to avoid Transitive includes. Remove uneeded classes. Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that should not be used in the examples. Task-number: QTBUG-117064 Pick-to: 6.6 6.5 Change-Id: Ie98d4fbddb18d5578e2651bdb4850527ff984582 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Local Fortune Client Example: Revisit the documentationRym Bouabid2023-09-262-3/+5
| | | | | | | | | | Remove "Example" from the title. Add \examplecategory {Connectivity}. Task-number: QTBUG-117036 Pick-to: 6.6 6.5 Change-Id: I3103669d1613e9832190b00cbe13f34ca5683ae1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Subscription example: Cretae QString using a Literal operatorRym Bouabid2023-09-221-8/+10
| | | | | | | | | | | Create QString at compile time using the literal operator""s instead of using pointer to characters. This way, no conversion or allocation will occur at runtime. Task-number: QTBUG-117425 Pick-to: 6.6 6.5 Change-Id: I2a19d4fe1150aad7908d0c2a7215099bc0814e8d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Subscription example: Fix includesRym Bouabid2023-09-221-1/+2
| | | | | | | | | Add needed includes and remove uneeded includes. Task-number: QTBUG-117425 Pick-to: 6.6 6.5 Change-Id: Iec4cc7a862aa164742e502f33447fa939dfb53ae Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Bindable Subscription ex: Cretae QString using a Literal operatorRym Bouabid2023-09-221-8/+10
| | | | | | | | | | | Create QString at compile time using the literal operator""s instead of using pointer to characters. This way, no conversion or allocation will occur at runtime. Task-number: QTBUG-117422 Pick-to: 6.6 6.5 Change-Id: I92eed0a371bf6383ddb1e938646029f1c24242bf Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp Bindable Subscription ex: Fix includesRym Bouabid2023-09-223-5/+4
| | | | | | | | | | | | | Reorder the includes following the coding conventions. Remove unneeded includes. Add needed includes to avoid Transitive includes. Task-number: QTBUG-117422 Pick-to: 6.6 6.5 Change-Id: Iaf2b939bc160312de8aa4035da03b648cf76f17d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp MIME Type Browser Ex: Revisit documentationRym Bouabid2023-09-221-1/+2
| | | | | | | | | | Remove "Example" from the title. Add \examplecategory {Data Processing & I/O}. Task-number: QTBUG-117146 Pick-to: 6.6 6.5 Change-Id: I6004f6708299886d6423325a551a9fd03a4a57df Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp MIME Type Browser Ex: Replace QObject by Q_DECLARE_TR_FUNCTIONSRym Bouabid2023-09-221-1/+2
| | | | | | | | | | When declaring MimetypeModel class, use Q_DECLARE_TR_FUNCTIONS Macro instead of Q_OBJECT as we only need to call tr() functions. Task-number: QTBUG-117146 Pick-to: 6.6 6.5 Change-Id: Ic7afd4a806d57ba2a651ebe129f3a91f35764354 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp MIME Type Browser Ex: Fix includesRym Bouabid2023-09-224-19/+10
| | | | | | | | | | | | Fix include order to respect the Coding Conventions. Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that should not be used in the examples. Task-number: QTBUG-117146 Pick-to: 6.6 6.5 Change-Id: Iba7a4726180ec97d9654ed3b934baca8c1df0b5c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revamp MIME Type Browser Ex: Fix too long linesRym Bouabid2023-09-221-6/+8
| | | | | | | | | Fix code lines that do not respect the 100 characters limit rule. Task-number: QTBUG-117146 Pick-to: 6.6 6.5 Change-Id: I9833e9a25a09833b3e0384c95af8a422d5aa4582 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>