summaryrefslogtreecommitdiffstats
path: root/examples/network
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* qtbase: Add missing example installs and files.Friedemann Kleint2012-07-101-0/+5
| | | | | Change-Id: I071fd862e001b766c9fb13106242edf23a608663 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix compilation of examples with -no-widgetsKent Hansen2012-06-071-1/+1
| | | | | | Change-Id: Ie0e19daf6c6476b5c5130f4930dfa3df92917384 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove useless "QT += widgets"Kent Hansen2012-06-051-2/+0
| | | | | | | | These .pro files have TEMPLATE=subdirs, so there's no reason to be adding libraries here. Change-Id: I0fb0a44107710ee746d354106d0c46006958ee62 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixed unused paramater warning in download example.Mitch Curtis2012-05-221-0/+2
| | | | | Change-Id: I9688ff6a583591f04aa81bb2714c33fc02da77c7 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Fixed "No such signal" error in download example output.Mitch Curtis2012-05-221-0/+3
| | | | | | | | | The signal sslErrors is not defined by QNetworkReply when QT_NO_SSL is undefined. The solution was to add the an ifndef guard around the call to connect so that the signal is only used when it is defined. Change-Id: I9f104ec630ed448af65669b0861df233de5172ac Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtNetwork]Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I94cc301ea75cc689bcb6e2d417120cf14e36808d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix multicast join/leave when binding to QHostAddress::Any.Robin Burchell2012-04-021-1/+1
| | | | | | | | | | | | | | | | | | On OS X and Windows, this was not working, because the socket was being bound in v6 mode (due to ::Any being for dual mode), but the address passed was a v4 address, meaning it took the wrong codepath. Linux, strangely, apparently works anyway. This is fixable in OS X (by using the v6 join path when bound in v6/dual mode), but the same fix doesn't work on Windows, failing with WSAEADDRNOTAVAIL. Don't allow this behaviour, and provide a sane error message telling the user what to do instead. Done-with: Shane Kearns Task-number: QTBUG-25047 Change-Id: Iaf5bbee82e13ac92e11b60c558f5af9ce26f474b Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix compilation of examples with QStringBuilderOlivier Goffart2012-02-251-2/+2
| | | | | | | | | | | | In sub-attack an interview, one can't make two implicit conversions at once, so explicitly convert to the right type. The change in the torrent example is required because of https://codereview.qt-project.org/16168 (commit 9491272) But in that case, using a QByteArray is better anyway. Change-Id: Ieed22ac7f0d700d5ba5d1e70af3db4dd6c139c8f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-242-18/+1
| | | | | | | | remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Test for QT_NO_SSL instead of QT_NO_OPENSSLShane Kearns2012-02-213-5/+5
| | | | | | | | Change the ifdefs in our own code (except openssl backend) to use the new configure flag. Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b Reviewed-by: Richard J. Moore <rich@kde.org>
* Fortune client example - list all IP addressesShane Kearns2012-02-172-18/+28
| | | | | | | | | | | The first IP address on the machine might not be a usable one. Changed the QLineEdit to a QComboBox, and populated it with all IP addresses of the machine, along with the machine names if they are configured. Task-number: QTBUG-13121 Change-Id: I7c443f5ce6efb0d0b525c5abad1671d3dcbba33c Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Reimplement QAbstractSocket::setReadBufferSize() properlyBradley T. Hughes2012-02-022-2/+2
| | | | | | | | | | | | | | | | | This function takes a qint64 argument, not an int argument. peerwireclient.h:119:10: warning: 'PeerWireClient::setReadBufferSize' hides overloaded virtual function [-Woverloaded-virtual] void setReadBufferSize(int size); ^ src/network/socket/qabstractsocket.h:162:18: note: hidden overloaded virtual function 'QAbstractSocket::setReadBufferSize' declared here virtual void setReadBufferSize(qint64 size); ^ Change-Id: I29b67b216147771ff2d662d309d2c31d977e9d3f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
* Add support for DNS lookups using native APIsJeremy Lainé2012-01-304-0/+229
| | | | | | | | | | | | | | | | The QDnsLookup class provides asynchronous APIs for performing DNS lookups. For now, the following lookups are supported: - A and AAAA - CNAME as defined per RFC 1035 - MX as defined per RFC 1035 - NS as defined per RFC 1035 - PTR as defined per RFC 1035 - SRV as defined per RFC 2782 - TXT as defined per RFC 1035 Task-number: QTBUG-10481 Change-Id: I46c1741ec23615863eeca3a1231d5e3f8942495e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3091-91/+91
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2391-91/+91
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixes examples/tests to use qinptr in QTcpServer::incomingConnection.Jonas M. Gastal2012-01-136-6/+6
| | | | | | | | This is a fix for problems introduced by bf7f170. Change-Id: If5dd8e031ef2efea578b3efb188c2e950e1ba41a Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Make QFtp private.Jonas M. Gastal2012-01-1210-600/+0
| | | | | | | | | All references to QFtp in documentation have been removed, QFtp's documentaiton was marked internal. The QFtp example was removed. Task-number: QTBUG-23199 Change-Id: Ifff83cac069fb350e8ebeae63e605850e65c0c30 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Removing QHttp class, its tests and its usage in examples.Jonas M. Gastal2012-01-062-18/+32
| | | | | | Task-number: QTBUG-22750 Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0594-94/+94
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix compilation on HarmattanSimon Hausmann2011-10-211-9/+3
| | | | | | | | Commit 87274e272d2a854563066489e20d019b4e6320de removed the maemo "specific" bearer monitory example .ui file, but the .pro file wasn't updated. Change-Id: I9daa000fe3e4b69789519f53541c106d01748ffd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix FTP example to handle failure to open network sessionShane Kearns2011-10-202-24/+35
| | | | | | | | | | | | | | | | The example code only dealt with successful opening of the session. If the session open failed, the application is stuck because the connect button is disabled. Moved the session open to be part of connection. Handled session open failure by puttin the UI back in the default state where connection button is enabled. Task-Number: QTBUG-9909 Reviewed-By: Miikka Heikkinen (cherry picked from commit 104c22a68c422152ff3cf03eb3615e7826fefbd0) Change-Id: Ifa40fcd8b83c43cda364b3ec5e58f80b539aa244 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QtBase examples: Remove Maemo/Symbian-specific code.Friedemann Kleint2011-10-1844-361/+1
| | | | | | | | | | | | | | | - Maemo/Symbian are no longer supported and QWidget-based examples are no longer supposed to run on mobile platforms, so, remove any Maemo/Symbian or mobile-specific code from source files and profiles. - Remove Maemo/Symbian vibration examples. - Change Q_WS_MAC/WIN to Q_OS_MAC/WIN where appropriate. Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Change-Id: I488a0adadb98934567aa6416206a80465c9c3a81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Merge remote branch 'gerrit/master' into refactorLars Knoll2011-07-062-46/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/opengldesktop/opengldesktop.cpp examples/itemviews/interview/interview.pro examples/mainwindows/mainwindow/mainwindow.pro examples/openvg/README examples/richtext/textedit/textedit.pro examples/tools/undo/undo.pro src/corelib/global/qglobal.h src/corelib/kernel/qcoreapplication.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qmetatype.h src/gui/kernel/qevent.cpp src/gui/kernel/qevent.h src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qpaintengine_raster_p.h src/gui/text/qfontdatabase.cpp src/opengl/qgl.h src/openvg/qpaintengine_vg.cpp src/plugins/platforms/wayland/qwaylandwindow.cpp tests/auto/qmainwindow/qmainwindow.pro Change-Id: I6bfb586740a68379bb99f4612ec993393a5f3234
| * Remove references to demos from docs.Casper van Donderen2011-07-051-32/+1
| | | | | | | | | | | | | | Change-Id: I1ae723af883c305ea64a4e46cc3ce889dd3c021b Reviewed-on: http://codereview.qt.nokia.com/1032 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie