summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix connect statement in terminal sampleSamuel Gaist2016-12-061-1/+1
| | | | | | | | This patch corrects the connect statement used to show the settings dialog. Change-Id: I6318e18f7a281d8ddb118ef1f1d2d18e86df9b22 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Replace remaining 0 to nullptr in the examplesDenis Shienkov2016-06-2411-11/+11
| | | | | | | Change-Id: If867000fe1101c58bc9d48e3794536e46cde6fec Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Add remaining 'Q_DECL_OVERRIDE' to the examplesDenis Shienkov2016-06-233-6/+6
| | | | | | | Change-Id: Ib9590b862413e66189b9f2fde9297af374981b4d Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Add 'explicit' keyword where possible to the examplesDenis Shienkov2016-06-208-8/+8
| | | | | | | | Change-Id: I7338288caf0d3fcb1ecd52d0e6724aa51c108505 Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Use auto in more casesDenis Shienkov2016-06-155-7/+7
| | | | | | | Change-Id: Id4fd74d4d45b28ddc60de6308386728a0eda8bb7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Replace remaining foreach with range-based forDenis Shienkov2016-06-152-2/+4
| | | | | | Change-Id: I1fe4be17d8e998ba25ecb6dde53f487eacd2b128 Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-1912-2/+34
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6a4c3e446633e6f142b87c268096b1bdc1598a62
| * enable build of master and slave examplesOswald Buddenhagen2016-04-281-1/+1
| | | | | | | | | | Change-Id: I0680e485a0c3ecde410a090204f192ece66fa6c4 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
| * add example installsOswald Buddenhagen2016-04-2811-0/+33
| | | | | | | | | | Change-Id: Iadcc0afaae8a54f10a587f0b2f37db128d7ea02d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
| * remove most pointless CONFIG+=orderedOswald Buddenhagen2016-04-281-1/+0
| | | | | | | | | | Change-Id: I3d0c3cc192c3da07dfcd59f64a7c61864fe20ad8 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Replace 'Q_FOREACH' with the range-based 'for'Denis Shienkov2016-05-135-7/+11
| | | | | | | | | | | | Change-Id: I057267982ac946ce1ec863a79120cd21cd563c4b Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Unify license header usage.Antti Kokko2016-02-0235-535/+1130
| | | | | | | | | | | | | | | | | | Updated license headers to use new BSD header instead of LGPL3 one (in those files which will be under BSD) Change-Id: Ifd29dab2fcb32b7f7f37430f59e9dc50d1fc8766 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* | Unify license header usageAntti Kokko2016-02-029-45/+45
|/ | | | | | | | Updated FDL license. Change-Id: I1165e025a7f9f3628d0bc25553b48d27384413ca Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Doc: minor link issueNico Vertriest2015-10-131-2/+2
| | | | | | Change-Id: I3dc7dcd60e66b36f0e9913760e80df798e52da80 Task-number: QTBUG-43810 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Use the new signal/slot syntax everywherev5.6.0-alpha1Denis Shienkov2015-09-028-66/+52
| | | | | Change-Id: Ia9868d010106abbfeb8f8d24e84adf37de879991 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Use the permanent status message in Terminal exampleDenis Shienkov2015-08-032-10/+24
| | | | | | | | | ... because earlier was used the temporal message which disappeared in case of moving of the mouse cursor on the menu. Change-Id: I7a7cb10120ffdd242a76e91ec08554db69e0f959 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-256-72/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/serialport/qserialport_unix.cpp src/serialport/qserialport_unix_p.h src/serialport/qserialport_win.cpp src/serialport/qserialport_win_p.h src/serialport/qserialport_wince.cpp src/serialport/qserialport_wince_p.h Change-Id: Ibb917652b132e66fbb90f437bf762c1094911dc0
| * Doc: Fix the examples pageTopi Reinio2015-01-202-47/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The group page listing all the examples defined also a \page name, which caused the generated page to contain no examples. Also correct the group name for Command Line Enumerator Example, and move the qtserialport-examples.qdoc to the correct location. Change-Id: I6ebfbe1c49d2a44e4ed631f22027659ba43ceb8d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
| * Do not close closed device in Terminal exampleDenis Shienkov2014-12-041-1/+2
| | | | | | | | | | | | | | | | | | | | When opening is fails, the QSP himself close a device. Thus, we do not need to close device in Terminal example again, because it caused emmiting of the QSP::NotOpenError and to showing of additional messagebox. Change-Id: Id8aa3f3b835fd7d4187bdf83c1d6584d5fd541f7 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Add scroll area to Enumerator exampleDenis Shienkov2014-12-011-4/+8
| | | | | | | | | | | | | | | | | | When a system has many serial ports, the last of them are not visible on the screen, because a widget has a big height. So, it is reasonable to add scrolling of all serial ports info. Change-Id: Ic13b58fba38a17d6f5142476bca501a0d26ec76d Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Translate serial port settings of Terminal exampleDenis Shienkov2014-12-011-11/+11
| | | | | | | | | | Change-Id: Ica127147999eaecc3d03189cfa9cd893115b846c Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
| * Allow to setup custom device in Terminal exampleDenis Shienkov2014-12-012-10/+25
| | | | | | | | | | | | | | | | | | Terminal example allows to select only available devices which are received from QSPI. Now it is possible to enter and to open of any custom device. Change-Id: I83172a346cb5dc0e20c217957133e9e3e506d8a4 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* | Update copyright headersJani Heikkinen2015-02-1345-270/+270
| | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I35f551de8408a2eb6a0f39df1f09d90c8084a7c0 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Drop the Qt4 supportDenis Shienkov2014-10-2310-55/+10
|/ | | | | | | | Now QtSerialPort can be built for Qt5 only. QtSerialPort for Qt4 is developed in a separate branch. Change-Id: Iaaa95fb7cb0aedbfc1b17ed11717fff8f9c126a0 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Update license headers and add new license filesAntti Kokko2014-09-0935-630/+350
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I08685205169cdd4b49a651ed98f36ba1e6c1bb29 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-1210-47/+76
|\ | | | | | | | | | | | | Conflicts: examples/serialport/examples.qdoc Change-Id: If79f2f140e72f0a499f8e61e3897848f454a5042
| * Doc: Edited example documentation.Jerome Pasion2014-07-1410-48/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | -added information about how to run the example by including a file from qtbase/doc/global -edited summary sections -added \brief. -removed image captions. Our Qt 5 CSS files don't handle them. Task-number: QTBUG-33597 Change-Id: If3293aa9d98b662f20af2af7030b0ab0fb1e8401 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | Doc: rename the end file for serialport docsThiago Macieira2014-07-251-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This page has been showing up in the master Qt docs as http://qt-project.org/doc/qt-5/examples.html, which is way too generic. The current practice is to add the module: \page qt3d-examples.html \page qt3d-examples-placeholder.html \page examples-graphicsview.html \page examples-graphicsview.html \page bluetooth-examples.html \page nfc-examples.html \page qtquick-codesamples.html \page qtexamplesandtutorials.html \page examples-layouts.html \page examples-draganddrop.html \page examples-threadandconcurrent.html \page examples-sql.html \page examples-xml.html \page examples-statemachine.html \page examples-animation.html \page examples-gestures.html \page examples-activeqt.html \page qdeclarativeexamples.html \page declarative-cppextensions-reference.html \page declarative-cppextensions-qgraphicslayouts.html \page examples-serialport.html \page qtwebkitexamples-index.html Change-Id: Ib272f6380cb694ad4acfc24a248266805cef05a8 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix the serial number display in the terminal exampleDenis Shienkov2014-04-301-3/+7
| | | | | | | | | | | | The display code was left out in commit 959775c41683033adbd99faab7e3d70e0009c143. Tested using FTDI device on Windows 8 with Qt5 and then on Windows 7 with Qt4. Change-Id: I9f665b2826ba03877346b25a569ca89b6a3dc4af Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Remove the noisy comments from the terminal exampleLaszlo Papp2014-04-022-15/+0
| | | | | | | | | | | | | | If anything, this should be made clear in a different way, like proper variable names, inline convenience functions for naming, example documentation extension, and so on. This is also consistent with the other examples not using "water can" comments. However, these comments mostly add noise to the code without much benefit as far as I can tell. Change-Id: I9c4121d91ca2671d44c08cf986232422f136a785 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Set the port settings before open in the examplesLaszlo Papp2014-03-1710-269/+16
| | | | | Change-Id: I946a3f1d3a64a9b8c0d901347aa8ff5959ebc601 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Swap the open and configure error reporting in the terminal exampleLaszlo Papp2014-03-071-2/+2
| | | | | | | | | | | It seems they were accidentally misplaced, and it was not caught by anyone while testing and using this example. Although, I have seen users doing this mistake on Stack Overflow, so I was wondering where they would get the idea from. It is possible they have done such mistakes due to a copy/paste operation from this old example. Change-Id: Iaa25ae47c5f161856930801611a3dc7ff0aa3b0a Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Add API for querying the serial numberLaszlo Papp2014-03-023-2/+13
| | | | | | | | | | | Thanks go to Massimo Callegari for the initial patch and the request to remind us again. Thanks also go to Denis and Sergey for working on the windows serial number parser. Task-number: QTBUG-31981 Change-Id: I60d882280f481eb99d275e0a9c81da50292b1c61 Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-02-111-1/+1
|\ | | | | | | | | | | | | Conflicts: src/serialport/qserialport_win.cpp Change-Id: Ib00a645c6660a3c81dbc9e159110f7bfc392ea36
| * Fix the creaderasync example name in the qdoc fileLaszlo Papp2014-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change eliminates the following warnings when using "make docs": /home/lpapp/Projects/qt/qt5/qtserialport/examples/serialport/doc/creaderasync.qdoc:28: warning: Cannot find file 'creader/creader.pro' or 'creader/creader.qmlproject' /home/lpapp/Projects/qt/qt5/qtserialport/examples/serialport/doc/creaderasync.qdoc:28: warning: EXAMPLE PATH DOES NOT EXIST: creader It is also visible that the example is unreachable on the following documentation page: http://qt-project.org/doc/qt-5/examples.html Change-Id: I09f1532fcff6b1f7bfc5c4857bd14252aceb2eb3 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* | Fix some typos in documentation.Jeff Tranter2014-01-302-2/+2
|/ | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I185458e162d115eac25326d239b851b5e14ed5cf Reviewed-by: Laszlo Papp <lpapp@kde.org>
* creadersync: do not return successful read for empty dataDenis Shienkov2014-01-081-1/+1
| | | | | | | | | | | In case of handling of the TimeoutError it is necessary to check on existence of the read data (for this concrete implementation of the example). Otherwise the application always return the TimeoutError even if a data was successfully read. Change-Id: I2437461f2ed2806bb7d7e16deb6925df035f62a1 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Improve data receiving in creaderasync exampleDenis Shienkov2014-01-031-1/+1
| | | | | | | | | | Received data should be accumulated at each triggering of readyRead() during wait timeout. Otherwise application may print out only last portion of received data. Change-Id: Ib4d72f70e333298bae31c0eb95d7639b5c4d177d Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Drop the empty data check in favor of proper error code handlingLaszlo Papp2013-11-251-2/+5
| | | | | | Change-Id: Iad0f2c58a4f52daebd02a71fd7b404cb283602dc Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Replace the silly empty output with a reasonable "N/A" placeholderLaszlo Papp2013-11-242-8/+19
| | | | | | Change-Id: Iad5076e9a192f5a07e41314d286bc02e46ea92c8 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Do not handle "no data available" as error in the timeout handlerLaszlo Papp2013-11-211-3/+3
| | | | | | Change-Id: I132a668f1eca2d7a1ac353b6e088b7b07d4e2e12 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Remove the standard input copy/paste issue from the QIODevice documentationLaszlo Papp2013-11-202-2/+2
| | | | | | Change-Id: I03d4be1bf7fd5670c563484759eda670c9a0cb75 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Add a new simple and command line async reader exampleLaszlo Papp2013-11-107-1/+339
| | | | | | Change-Id: I4142d187c3ad37d1e7f5219df3d50679a9f35a8e Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Define QStringLiteral when undefined (e.g. Qt 4)Laszlo Papp2013-11-061-20/+20
| | | | | | | | | | | | This will allow us Qt 5 style coding. QLatin1String replaced everywhere where it works for Qt 4 and 5, namely: the direct literal passing. Note that the "standard" typo has also been fixed in this commit as the line had to change anyway, so it is not much of an additional noise. Change-Id: I8b7e4fe5f337441000bd3d8f58db528fdd0e175b Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
* Add a new simple and command line async writer exampleLaszlo Papp2013-11-057-1/+371
| | | | | | Change-Id: I8f33126de5c78da9a4a0dbddd16eecde7044f0c5 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Disable QNX buildAndreas Holzammer2013-10-311-1/+1
| | | | | | | | | Nobody tested the serial port and it does not compile as CRTSCTS is not defined. Lets disable it until its fixed. Change-Id: Ifc032194773b166a7fd9502f5d7f518019d80c7c Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Fix the broken example qdoc keyword valueLaszlo Papp2013-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | The "cwritersync" example has been introduced in commit 9f8f2d6dc6f38b54a91f4a3d7ebf4285891005d3, and the "creadersync" example has been introduced in commit ccdf42d9d10a32ccdd4a12c643130ffdea498552. Initially, the "cwritersync" example was called "cwriter", but then it got renamed to reflect the functionality more explicitly based on its name. Having that renaming done, I had to sync up the writer and reader terms everywhere, but this instance has been accidentally left out. It is not intentional to have this name, so this is a bug. This is a somewhat critical bugfix because it may trigger the example unavailable from the main example page. Thereby, a useful example could become useless for the end users. Change-Id: I0f483ea037fc76a362f1d174b521075e8e9b0a3a Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Fix a typo in the message printed to the stdout (creadersync)Laszlo Papp2013-10-281-1/+1
| | | | | Change-Id: Ide7ab7b0841977f1132d243c82206edd85cc699a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Close the standard input right after reading to avoid duplicate callsLaszlo Papp2013-10-281-3/+1
| | | | | | Change-Id: Idd4b5bf996d57f0cd22a30496af3841f7d5a806a Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Add a new simple and command line reader exampleLaszlo Papp2013-10-255-1/+174
| | | | | | Change-Id: I69c05be5db564888986925d943aff32221f5b310 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>