summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Disable some tests and examples when --no-widgets is specifiedJędrzej Nowacki2012-03-192-3/+6
| | | | | | | | There are many tests, examples that depends on widgets. This patch disables some of them if Qt is configured without widgets. Change-Id: I5460dadca736c54221874adcd518a7021725d90a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove all QWS centric examplesDonald Carr2012-03-1537-3192/+0
| | | | | | | | Change-Id: I1bd9c40c7cc70e088a23283d1c3e89d12c1c5f7d Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Use QRect::united(), QRect::unite() is deprecated.Sergio Martins2012-03-142-2/+2
| | | | | Change-Id: Ia7aac74596c2f251c96fecf157d2aa4a935cf602 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix icon suffixes in systray example.Friedemann Kleint2012-03-131-3/+3
| | | | | Change-Id: If464befa88f26a881557724b4fc175f0a82c90b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Re-add the Systray example.Friedemann Kleint2012-03-129-1/+467
| | | | | | | | Remove its dependency on QtSvg by converting the icons to (optimized) png files. Change-Id: If63257938dc816d7ab76a3042b9ac88ef3d51b07 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* examples: compile w/QT_NO_CAST_FROM_BYTEARRAY, at least on UnixMarc Mutz2012-03-085-9/+9
| | | | | | | | This is all pretty straight-forward, adding .constData() or using QString::fromLatin1() instead of QLatin1String(). Change-Id: I984706452db7d0841620a0f64e179906123f3849 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* examples: use QVector<QPointF> instead of QList<QPointF>Marc Mutz2012-03-082-7/+4
| | | | | | | | | | | QPointF is in the category of types for which QList is needlessly inefficient (elements are copy-constructed onto the heap and held through pointers). Use a vector instead. This is consistent with the QPainter API. Change-Id: Id0e910c067a60d12fbc175e7ee7da824834be374 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Example build fix.Jędrzej Nowacki2012-03-071-0/+0
| | | | | | | | | | buttontester.pro has to be renamed to mousebuttons.pro because it lives in mousebuttons subdirectory, to which examples/widgets/widgets.pro is pointing by SUBDIRS variable. Change-Id: I04bbd85713321337fbe8cbccfa6284f12b677279 Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* add widget mousebuttons example 'mousetester'.Rick Stockton2012-03-065-0/+321
| | | | | | | | | | This is an xev-like program. A user clicks a mouse button inside the Window, and the program displays (a) the "raw" button number; (b) the corresponding Qt::MouseButton name; and (c) the type of mouse Event. Task-number: QTBUG-24112 Change-Id: I8a76ff37b5b85639f662706072cc4a2ce490754b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* add strategy support to sqlbrowser exampleMark Brand2012-03-063-79/+200
| | | | | | | | | | | Several useful options added to context menu. Also added yellow background for unsubmitted changes. Change-Id: I132cd4498a5fb7275ea10c0497910aba99c06a2b Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-041-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| * QEvent (and subclasses): make ctors explicitMarc Mutz2012-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Do this regardless of whether the event subclass is public API or only used in examples. Examples are examples, used by others as templates or even copied verbatim, so they should also follow sound engineering rules. Anyway, there's only one in examples/... Change-Id: I586ff16407a956c9e89288fdd4377eed73f45c0f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Change bugreports.qt.nokia.com -> bugreports.qt-project.orgSergio Ahumada2012-03-021-1/+1
| | | | | | | | | | Change-Id: Ia795098f24cf358b15067f54cd08dff0bd792bc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Cleaned up examples/opengl/cube/cube.pro, removed message()Rohan McGovern2012-02-291-9/+0
|/ | | | | | | | | It's arbitrary and confusing to put a message(OpenGL support is enabled) in this one OpenGL example and no others, especially since the message is output during configure. Change-Id: I7b55868d10c288f3459a7fda594fea1e6f45bf9a Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Use new plugin system in qtbase.Friedemann Kleint2012-02-2719-28/+33
| | | | | | | | | - AccessibleWidgets - Windows printer support - Examples Change-Id: Icc162bd7fc284b3c76d9966210f983728085c743 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix compilation of examples with QStringBuilderOlivier Goffart2012-02-253-5/+5
| | | | | | | | | | | | 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>
* examples: compile w/o openglMarc Mutz2012-02-248-13/+20
| | | | | | | Fixes remnants of an automated QtGui -> QtWidgets port. Change-Id: I31f63bdd6ae71aee8e70b20e24def30e0eafb725 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-2428-219/+23
| | | | | | | | 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>
* Move QtConcurrent into its own moduleLars Knoll2012-02-0510-5/+11
| | | | | | | Task-number: QTBUG-20892 Change-Id: I614500aafb6428915509983608bbb0ade4e4f016 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Exclude helloconcurrent when QtConcurrent is not configuredSamuli Piippo2012-02-051-1/+2
| | | | | | | Task-number: QTBUG-23874 Change-Id: I374a08ce947e804ebb1da08c413e340e4719d9d0 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix the chart itemview exampleGiuseppe D'Angelo2012-02-032-2/+3
| | | | | | | | | | | Commit 054a4aa7dddacbe31778c5c5e9ffc9d41f803353 (being a SIC) breaks QAbstractItemViews that used to override the dataChanged(QModelIndex, QModelIndex) method, so this change updates the dataChanged signature accordingly. Change-Id: I632b6625c12dcb09abcb737ea2648efeeedeee8e Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Improve QSurface / QWindow API a bit and use that to avoid errorsGunnar Sletta2012-02-021-0/+2
| | | | | Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d Reviewed-by: Samuel Rødal <samuel.rodal@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>
* Moving tiff image format support and libtiff out of qtbaseaavit2012-01-312-2/+2
| | | | | | | | | | The tiff plugin and bundled libtiff is moving to the qtimageformats project on Gerrit. Task-number: QTBUG-23887 Change-Id: I4c848232fdccddd7e7f54215f9eaa78dc4c3a53d Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Symbian specific code from qtbase.Xizhi Zhu2012-01-313-8/+0
| | | | | Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* 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-301180-1181/+1144
| | | | | | | | | | 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>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove support for the MNG file format and the bundled libmngaavit2012-01-254-4/+3
| | | | | | | | | | | | | The MNG file format is generally abandoned, and libmng has been unmaintained for several years. The MNG plugin and bundled libmng has been moved to the qtimageformats project on Gerrit. Task-number: QTBUG-21869 Change-Id: I946432347014ffde2b72307a5f8b166ca5553602 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Made window orientation API more flexible.Samuel Rødal2012-01-242-31/+26
| | | | | | | | | | | | | | | Previously we only had QWindow::setOrientation() which was a hint about the orientation the window's contents were rendered in. However, it's necessary to separate between the orientation corresponding to the window buffer layout and orientation of the contents. A game for example might typically want to use a landscape buffer even on a portrait device. Thus, we replace QWindow::orientation() with QWindow::reportContentOrientationChange() and QWindow::requestWindowOrientation(). Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-234-6/+2
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Id689fdb78727abafba033bed7b0402e2cf27aba1 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231143-1143/+1143
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QPA/windows example: Fix positioning for virtual desktops.Friedemann Kleint2012-01-201-0/+4
| | | | | | | Position window within screen geometry. Change-Id: Id931f386c9ef5564887a2f54b71921f062320f54 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QDir::convertSeparators()Lars Knoll2012-01-191-1/+1
| | | | | | | | | This method has been deprecated since Qt 4.2. QDir::toNativeSeparators() replaces it since then. Change-Id: I49e6e1bfd50f26aa30134e599ee82067709549a7 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: João Abecasis <joao.abecasis@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>
* Update year in Nokia copyright headers.Jason McDonald2012-01-1013-13/+13
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove execute permission from files that don't need it.Jason McDonald2012-01-10218-0/+0
| | | | | Change-Id: Ib92875289cdd9831f35301c566fb567acc725bb6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.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>
* Removed QApplication::setInputContext()Pekka Vuorela2012-01-0510-987/+0
| | | | | | | | Obsoleted by platform input context. Setting a custom QInputContext wouldn't work properly anymore. Change-Id: I966573a82fdd7530544878513a655eae7b3ad67b Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051175-1183/+1183
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Change the default value of QSortFilterProxyModel::dynamicSortFilterStephen Kelly2012-01-023-4/+1
| | | | | | | | | | The value is changed to true. It is a common bug that developers expect this proxy model to reflect the source model when the source changes. That requires setDynamicSortFilter(true), so we change the default to optimize for the common case. Change-Id: I9bf7efdbda10309fa77aed9391c33054aaae4a29 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Added multi-screen support to hellowindow example.Samuel Rødal2011-12-063-9/+36
| | | | | Change-Id: I025de342952bffeffa0705eb4cfcf869f32241cc Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Added rotation animation to paintedwindow example.Samuel Rødal2011-12-013-23/+141
| | | | | | | This serves as a useful test case for the QScreen orientation API. Change-Id: I009ebd8b6d345453620420d84f3ff9d2d2e2663e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Polish the HelloWindow example.Friedemann Kleint2011-11-283-3/+7
| | | | | | | | - Add window menu (enabling the close button on Windows) - Query threaded Open GL capability. Change-Id: I938f154e242dba584e2f597ac44294ab5d3b7141 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added command line argument to make hellowindow example single window.Samuel Rødal2011-11-211-19/+25
| | | | | | | | Useful when testing on embedded platforms with no support for multiple top-level windows. Change-Id: I212ca69c3f5d5d338e860169b14e3f9f3951712b Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Compile fix for Mac OS X 10.7 with 10.6 sdkAndy Shaw2011-11-181-2/+2
| | | | | | | | | | | | | Since it is an example it is cleaner to just include the header file as it will be available on other platforms anyway. Also ensured that the Qt includes were first before the system ones. Task-number: QTBUG-22641 Merge-request: 1462 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> (cherry picked from commit 4fffdabc948ff6afc6008d4cb723a6a2e10eef79) Change-Id: I4fffdabc948ff6afc6008d4cb723a6a2e10eef79