summaryrefslogtreecommitdiffstats
path: root/examples/network
Commit message (Collapse)AuthorAgeFilesLines
* fix usage of wince scopeOswald Buddenhagen2015-06-051-2/+2
| | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Example: Removed the code to handle 'num_entries' info.Venugopal Shivashankar2015-03-094-29/+10
| | | | | | | | | | The Google Suggest API doesn't return the 'num_queries' anymore. Had to remove code related to 'num_queries' entry so that the suggestion list shows up. Task-number: QTBUG-42817 Change-Id: Ic918d1c86840fa4c1e18f32a984f5a9dd911261d Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-1593-279/+279
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* examples: migrate to QString::asprintfMarc Mutz2015-02-123-16/+10
| | | | | | | | Not that many, if any, uses of sprintf here were idiomatic Qt, but that's for another commit. Change-Id: Ic34470d9799942f786770ba9541b29c34d67c6f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-11109-559/+559
| | | | | | | | | | | | | | | | | | 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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Remove traces of the Maemo platformTor Arne Vestbø2015-02-046-711/+0
| | | | | | | Change-Id: I6b551de331aa0386ea53d8e96f50b669777d2d69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fix compiler warning in securesocketclient exampleKai Koehne2014-10-301-1/+1
| | | | | | | The warning was introduced in a133cea2 . Change-Id: Ia8180b6c7d83f57cba79519bf4c0e3bf97966c16 Reviewed-by: Richard J. Moore <rich@kde.org>
* Use exising host / port for securesocketclient exampleKai Koehne2014-10-301-2/+2
| | | | | Change-Id: I321622b393ea1f452805299d74a28d12270b2238 Reviewed-by: Richard J. Moore <rich@kde.org>
* Do not add invalid configurations to bearermonitorLorn Potter2014-10-271-0/+3
| | | | | | | | | If the list of configurations takes time in the backend, the defaultConfiguration will be invalid at this time, but will be updated by the backend. Change-Id: I2886a8f6c569c993814172ccaa46e4bb5ba5e0d6 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* SecureSocketClient: Show general connection errorsKai Koehne2014-10-232-4/+11
| | | | | | | | | | | So far the example didn't show any errors when the connection to the server couldn't be established (e.g. because the host/port number was wrong, but also because the SSL handshake already failed). The fix shows a modal error dialog in this case. Change-Id: Ia517bf79c5fb2ccdb1edabded28f86759f3e6dcf Reviewed-by: Richard J. Moore <rich@kde.org>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-1514-24/+24
| | | | | | | | | | | | | | | | | | Q_DECL_OVERRIDE (which expands to 'override' for supported compiler) helps to declare the intent (that it is an overridden function) and force compilation error when there is no such virtual function in the base class. The examples should show the best practice of having it, as it may save the programmer quite some time in case of change of API or typo in the function name or arguments. This change was done automatically with clang-modernize -add-override -override-macros And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Use the new unified toolbar implementation in examples on OS X.Jake Petroules2014-05-121-0/+4
| | | | | Change-Id: Ica3476d16a4baab1f75e253eb406505f88018d47 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Use QCommandLineParser in example dnslookup.Friedemann Kleint2014-03-152-55/+136
| | | | | | | | | | | Show how use QCommandLineParser with additional parameter checking for custom options and positional arguments. Also explain how to display help in GUI applications. Change-Id: I03513e09b7dd5b150259593da0af2ef2a281cab2 Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-072-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| * Doc: corrected link/example errorsNico Vertriest2014-01-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | Update pro files after move gestures folder Update snippet statements Corrected path in imagegestures.pro Task-number: QTBUG-34749 Change-Id: Icc19908914e36507e412ab63bf0cc2809aa48e17 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-134-6/+6
| | | | | | | | | | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | WinRT: Fixed compilation of bearermonitor exampleOliver Wolff2013-12-062-6/+6
| | | | | | | | | | Change-Id: I761ad1d85d97d7746d826225f03f95c2f04f8b88 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | Examples: Add support for custom nameserver to dnslookupMandeep Sandhu2013-11-071-1/+12
| | | | | | | | | | | | | | | | | | Updated dnslookup example to take an optional nameserver argument for doing DNS lookup against a specific nameserver. Task-number: QTBUG-30166 Change-Id: I9f46f9f766b56f770d2c8372e3bfad5c71023c73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-114-10/+0
|\| | | | | | | Change-Id: Ib8cfeee7d9ca15e8ad520e428b72c200827a8628
| * Remove warnings about examples not running in the Qt SimulatorTor Arne Vestbø2013-10-094-10/+0
| | | | | | | | | | | | | | The Qt Simulator is no longer supported with Qt 5. Change-Id: I0f98351d482dd0554ea0754746d56f94ee6bf22f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | WinRT: Don't build the network-chat exampleAndrew Knight2013-09-261-1/+1
|/ | | | | | | | | WinRT doesn't support QProcess, so the network-chat example shouldn't be built there. Change-Id: I7885a992d3b8baffd5530c694063140535240f07 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-09-162-2/+0
|\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
| * examples: remove unused static const variablesMarc Mutz2013-09-142-2/+0
| | | | | | | | | | | | | | They cause warnings on Clang. Change-Id: If599303f4a00c2a24f0a7c369299f3ea6fe7fc91 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Remove qSort usages from qtbase examplesGiuseppe D'Angelo2013-09-141-1/+3
|/ | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I68dec0cb6efa1f164ba9f1671b55332ee4ad2e23 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Fix paths for a number of examplesv5.1.0-beta1Topi Reinio2013-05-082-2/+2
| | | | | | | | | | Modularized example paths are defined in module-specific .qdocconf files. This change fixes \example command for a number of examples to be relative to those paths. This way, the manifest files will have a correct project path for each example. Change-Id: I6d3dba34a1eb04a2bc294520102e232ccd0f0ba2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix network/torrent example to work on Qt 5Topi Reinio2013-04-044-36/+31
| | | | | | | | | | | | | | | | | | This change fixes two issues in the torrent example: - Correctly use a query constructed from the announce url to fetch the list of peers (using QUrlQuery). - Reimplement QAbstractSocket's connectToHost() and disconnectFromHost() which are virtual in Qt 5, instead of of using the protected connectToHostImplementation() / disconnectFromHostImplementation() slots. Also removes a warning about deprecation of QHttp class as it's no longer used in this example. Task-number: QTBUG-30329 Change-Id: I9230cd2204bfc1a66f2ea3e98940b09681df250e Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-1615-128/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Check for network module when building according examplesOliver Wolff2013-02-211-0/+2
| | | | | | Change-Id: Id17ba13988e37fa583948f4861b44bb1f05bf375 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-18107-107/+107
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-211-1/+1
| | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix typo in docs.Richard Moore2012-12-211-1/+1
| | | | | Change-Id: I608fbf5751bf1fa819d9fe10e159fa2a9c5e238d Reviewed-by: hjk <qthjk@ovi.com>
* clean up example project files, mostly wrt QT+=widgetsOswald Buddenhagen2012-12-1710-21/+10
| | | | | | | | | move QT+=widgets (and printsupport) statements before the install statements, and de-duplicate some cases. also move some TARGET assignments to a more conventional place. Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Hardcoded url to RFC3174 QTBUG-28500Nico Vertriest2012-12-111-1/+1
| | | | | | | Corrected in torrent.qdoc Change-Id: Idb1bf1ed869c0db80e557832a61d6eb28585c77a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Added documentation for the examplesVenugopal Shivashankar2012-12-1115-33/+118
| | | | | | | | | | | - Moved documentation for the Qt XML, Qt Widgets, Qt Concurrent, and Qt Network examples from qtdoc. - Grouped the documentation pages under relevant groups - Fixed \snippet paths Task-number: QTBUG-27515 Change-Id: I43c22a679e2eefbb48e3cd5893aa2afd3d905863 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix compile with -DQT_NO_DRAGANDDROPMontel Laurent2012-12-051-0/+6
| | | | | Change-Id: Ic7b42ae164f913f270c8350c2de6ce35f0be8c2a Reviewed-by: David Faure <david.faure@kdab.com>
* Move Network Examples from qtdoc to qtbaseEskil Abrahamsen Blomfeldt2012-12-0414-0/+14
| | | | | | | | | Move the main example overview and use the \group tag convention to make the list update automatically. Change-Id: Ib2cc8cf7def9a7f3dce6b7ed6d4958771cbdf5cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Threaded fortune server example: update the screenshotGiuseppe D'Angelo2012-12-011-0/+0
| | | | | | | | It didn't match the reality any more (now it shows an IP address as well as the chosen port). Change-Id: I7b942313ad5246a72186e3b9c93e54af8ab7a5ae Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix memory leak when error reportedMontel Laurent2012-12-011-0/+4
| | | | | Change-Id: I0c4c0baed8f2a734b3986b0d446cd58df705f7e4 Reviewed-by: David Faure <david.faure@kdab.com>
* centralize and fixup example sources install targetsOswald Buddenhagen2012-11-2919-61/+20
| | | | | | | | | | | | | it's confusing for the users if the examples' project files contain code to install their own sources. also, this constitutes an enormous code duplication, and lots of mistakes. consequently, automate it. more or less as a side effect, this also removes the entirely meaningless target installs in subdirs projects. Task-number: QTBUG-28184 Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9 Reviewed-by: hjk <qthjk@ovi.com>
* Add \brief to the examples.Eike Ziller2012-11-2914-14/+14
| | | | | | | | | That is used by qdoc to generate brief descriptions for the example manifests. Change-Id: I142a6d3259f90d0c9990033b3c36e139062ac343 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: hjk <qthjk@ovi.com>
* delete .desktop files of examplesOswald Buddenhagen2012-11-2816-176/+0
| | | | | | | | | they were added without an explanation, and they can't be particularly useful (because they contain hard-coded paths and refer to non-existing icons). Change-Id: I27e2c35375e28645b0c03449ddc7ac7017da5943 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$examplehjk2012-11-2619-37/+37
| | | | | | | | This makes the structure of the examples after an 'make install' similar to the one in a 'developer build'. Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Use organization name "QtProject" in examples.Friedemann Kleint2012-10-164-8/+8
| | | | | Change-Id: Ibbe9517ccf81d25eccbdff98f7cfe8ff6ec485d2 Reviewed-by: hjk <qthjk@ovi.com>
* Use QStringList::join(QChar) overload where applicable [examples]Marc Mutz2012-09-232-15/+15
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I1d0c9782cc1522d937b930531720e32d4c8f7ce8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-22107-752/+752
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Move opengl/wid/net example docs to proper folders.Frederik Gladhorn2012-09-2129-0/+1129
| | | | | | Change-Id: I846439a9cf7ad965ed27a00f98dbc4ff97abe73b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* examples: Mark ctor's as explicitSergio Ahumada2012-09-172-2/+2
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: Ida9f9c2f0c8608c35b0137b2512a6747afd69515 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Command-line-only examples should not build as .app bundles on OSXShawn Rutledge2012-09-032-0/+2
| | | | | | | | It's confusing when you double-click it and nothing happens. Task-number: QTBUG-26976 Change-Id: I50c5625a41881bdbcbf29001197ed15da4ee0a28 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* change http example default URL to http[s]://qt-project.orgJeremy Katz2012-08-231-2/+2
| | | | | | | This example used to refer by default to qt.nokia.com. Change-Id: Iecb682d0deb6270da91baf26897d44b16b39d09e Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Doc: Fix broken return codes for a few examplesGeir Vattekar2012-08-154-4/+4
| | | | | | | | This reverts remnants of 79747d38987ce42adc510be0c5bb1565f55fd3d6. Task-number: QTBUG-25571 Change-Id: I1dbf64cfcba889fb0c70ceaeeeffad8334a8aab1 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>