summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* Polish the SimpleTreeModel exampleFriedemann Kleint2023-12-066-61/+52
| | | | | | | | | | | | | | | | | | | - Fix/silence most clang-tidy/compiler warnings * unsigned/int comparison * Avoid repeating return / default parameter types * Make functions static/use static invocations * Use string literals everywhere * Use auto * for pointers * Streamline code, use ternary operators * Move constructor parameters * Observe rule of 5 by using Q_DISABLE_COPY_MOVE - Add some bells && whistles, resize properly, expand all Complements 25027444a9b53d61a6257dc5f5ce0ffdb3b06f98. Pick-to: 6.6 Change-Id: I78f48d187981ecabf69a5d4d42715bad026fa9e6 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* EditableTreeModel: Add a testFriedemann Kleint2023-12-063-1/+79
| | | | | | | | Add a test running QAbstractItemModelTester on the model. Pick-to: 6.6 Change-Id: I40c141c7e754ca05234da611534bd65e456be2fb Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Polish the EditableTreeModel exampleFriedemann Kleint2023-12-066-44/+41
| | | | | | | | | | | | | | - Fix/silence most clang-tidy/compiler warnings * unsigned/int comparison * Avoid repeating return / default parameter types * Use auto * for pointers * Streamline code, use ternary operators * Move constructor parameters * Observe rule of 5 by using Q_DISABLE_COPY_MOVE - Add some bells && whistles, resize properly, expand all Change-Id: I1721458ff66dcba123ff3a2cf50e7d15387a4e8b Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Docs: Add stereoscopic example to OpenGL examplesSafiyyah Moosa2023-12-051-5/+10
| | | | | | | | | | | | This fix uses the \ingroup command to add the stereoscopic example to the examples-widgets-opengl group. I also elaborated on the hardware requirements. Fixes: QTBUG-119280 Pick-to: 6.5 6.6 Change-Id: I6d5b992e533b897d84100f0f897aae97ef89290f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* 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>
* EditableTreeModel: Polish TreeModel::setupModelData()Friedemann Kleint2023-12-042-34/+25
| | | | | | | | | | | | - Use QStringView. - Use a list of a pair-like struct to represent the state instead of 2 lists. - Use qsizetype. - Use constLast() to avoid detaching. Pick-to: 6.6 Change-Id: I5ff8a17a4d583a7d2a0a11a52c29b9117280382c Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* SimpleTreeModel: Add a testFriedemann Kleint2023-12-043-1/+78
| | | | | | | | Add a test running QAbstractItemModelTester on the model. Pick-to: 6.6 Change-Id: I6ea5d34308357409b9a13eb0271392c8d171addd Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: PainterPaths-Graphic&Multimedia-Example typo in the documentationJaishree Vyas2023-12-011-7/+4
| | | | | | | | | Changed the brief and some grammatical errors. Fixes: QTBUG-119602 Pick-to: 6.6 Change-Id: Ib64abeb735899b0ae1cee64709ad3d7f8f440d9e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Match descriptive text with code snippetAndreas Eliasson2023-12-012-2/+2
| | | | | | | | | | | | The code snippet reads QDataStream::Qt_6_5. Change the post-descriptive text to match this. Fixes: QTBUG-118907 Pick-to: 6.6 6.5 Change-Id: I3b3d03e9095a6ba6febfb652b3bc7173ed4ccfa4 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* SQL/drilldown example: add new icons and misc cleanupChristian Ehrlicher2023-11-2312-21/+17
| | | | | | | | | | | | Cleanup the drilldown example: - use icons with the current style - remove unneeded QOverload<> - remove some empty lines which don't look good in the documentation - use Q_SLOTS/Q_SIGNALS instead slots/signals Fixes: QTBUG-113696 Change-Id: I62476a8989c0abd1f424d1425cb05489491e2153 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Refurbish the shaped clock exampleMatthias Rauter2023-11-171-21/+34
| | | | | | | | | | | | The shaped clock example has the appearance of the analog clock, which was refurbished with 619ec1a6406a8be7bfa9d96b9e693e7a3323d8dc. This change applies the refurbished design to the shaped clock. Task: QTBUG-118871 Pick-to: 6.6 Change-Id: Ibcfc8e9fb239a1c6f7ea685f6cab1e50b2060a53 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make contextinfo example a manual testLaszlo Agocs2023-11-179-726/+1
| | | | | | Change-Id: I9023016d50e82bba1fa73632cc1409b3d016f352 Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove undocumented embedded examplesLucie Gérard2023-11-1747-3671/+1
| | | | | | Task-number: QTBUG-119117 Change-Id: I7fd104742771e2ce6d4ad7afd66e2beca3b4f672 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Refurbish the clock exampleMatthias Rauter2023-11-133-63/+91
| | | | | | | Fixes: QTBUG-118871 Pick-to: 6.6 Change-Id: I0a1a6444cb381d49adbc39e73d7862c9cfe61dce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix broken capture in hellovulkancubes exampleLaszlo Agocs2023-11-091-1/+1
| | | | | | | | | | | | | Amends 339323b999feed077adecc0afaa215f8caffc043 Capturing a function argument (or any local variable) by address is a bad idea. Fixes: QTBUG-118912 Fixes: QTBUG-118986 Change-Id: I521d319a37f7acd6c66732f5f7d3cf1be4d49029 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Doc: Add HTTP Client example also to Web Technologies categoryKai Köhne2023-11-061-0/+1
| | | | | | | | | | | HTTP belongs to Networking, but also fits well with the scope of Web Technologies - qtnetworkserver is there after all, too. So just add the example to both. Pick-to: 6.6 6.6.0 Change-Id: I588e4e0eefc92ba396fbb21d6f55b33f68332a74 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* 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>
* Examples: remove OpenGL code paths from painting examplesVolker Hilsheimer2023-10-2715-489/+22
| | | | | | | | | | | | | | | | The extra code for using the OpenGL paint engine is significant enough to be distracting from what the examples are supposed to show. If we want to show how to use QPainter on an OpenGL widget, then we can make dedicated and documented examples for that, in the OpenGL category. And we have such examples in the Qt OpenGL module anyway. As is, the examples feel more like manual tests of the OpenGL paint engine; if we need more coverage there, then we can add it there. Change-Id: I7b56ea6d08c02cd0a1050ab03991656a0538498d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@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
* Convert tooltips example to snippetsVolker Hilsheimer2023-10-2714-903/+0
| | | | | | | | | The important bits from the example are ~10 lines of code, no need for building a poor-man's version of a graphics or item view. Pick-to: 6.6 Change-Id: I7874c66765c5b46230c92846ee3de1ee83f47e45 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* standarddialogs: Don't assume QMessageBox::exec() returns clicked roleTor Arne Vestbø2023-10-241-5/+7
| | | | | | | | | | | When adding custom buttons to a QMessageBox the return value of exec() as well as result() is not a StandardButton value, but instead an opaque value, and the documentation says to use clickedButton() to determine which button was clicked. Pick-to: 6.6 6.5 Change-Id: Ib47a218989b4dcb5d51f648bc55bc02399bae602 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* 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>
* Preparations to deprecate QItemDelegateChristian Ehrlicher2023-10-054-17/+17
| | | | | | | | | | | | | QItemDelegate was superseded since Qt4 by QStyledItemDelegate but it took until Qt6.7 to remove the last occurrences in qtbase. - remove unused includes / replace with qabstractitemdelegate.h - replace references in the documentation with QStyledItemDelegate - adjust the examples and tests to use QStyledItemDelegate Pick-to: 6.5 6.6 Change-Id: I246755004ce2d01192a726ca0972106c237df0cc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@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>
* Move Calendar Widget Example to UI Components categoryKai Köhne2023-09-271-1/+1
| | | | | | Pick-to: 6.6 6.6.0 6.5 Change-Id: Iafa05fbfde41dbbf7ddffd667983db9cc1c6e184 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
* Doc: Fix typo in examplecategory commandAndreas Eliasson2023-09-261-1/+1
| | | | | | | | | This resolves (qdoc) warning: Unknown command '\examplecateogry' Pick-to: 6.6 6.5 Change-Id: I52c417bde49ce52089da485d6144f64d636f5a3b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@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>