summaryrefslogtreecommitdiffstats
path: root/examples/network
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Alexandru Croitor2020-02-1123-26/+159
|\
| * Regenerate examplesAlexandru Croitor2020-02-0423-26/+159
| | | | | | | | | | | | Change-Id: I04b2adbe370ffea81d7787ad90e4ae69d2c165cb Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QSpinBox: remove deprecated signal valueChanged(const QString &)Vitaly Fanaskov2020-02-101-1/+1
|/ | | | | | Task-number: QTBUG-81845 Change-Id: I91148cac553f63b44968337ccc121e7376ee4465 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-291-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * Replace most use of QVariant::type and occurrences of QVariant::TypeOlivier Goffart2020-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I made a clazy automated check that replaced the use of QVariant::Type by the equivalent in QMetaType. This has been deprecated since Qt 5.0, but many uses were not yet removed. In addition, there was some manual changes to fix the compilation errors. Adapted the Private API of QDateTimeParser and QMimeDataPrivate and adjust QDateTimeEdit and QSpinBox. QVariant(QVariant::Invalid) in qstylesheet made no sense. But note that in QVariant::save, we actually wanted to use the non-user type. In the SQL module, many changes were actually reverted because the API still expects QVarient::Type. Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-2449-329/+337
|\| | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * Build the securesocketclient example for other SSL backendsMårten Nordheim2020-01-141-1/+1
| | | | | | | | | | Change-Id: I06b8361c116d2ae2aa2a64f63ac90b6ff1982008 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
| * QNetworkReply: deprecate the 'error' getterTimur Pocheptsov2020-01-135-6/+6
| | | | | | | | | | | | | | | | | | | | To disambiguate &QNetworkReply::error expression. [ChangeLog][Deprecation Notice] QNetworkReply::error() (the getter) was deprecated; superseded by networkError(). Task-number: QTBUG-80369 Change-Id: I545f963788bce0800c9e0f0c94d5f1029946effe Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * QAbstractSocket: deprecate 'error' member-functionTimur Pocheptsov2020-01-103-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The one that is a getter for the last error found. This is to disambiguate the expression '&QAbstractSocket::error'. Introduce a new member-function socketError as a replacement. [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the getter) is deprecated; superseded by socketError(). Task-number: QTBUG-80369 Change-Id: Ia2e3d108657aaa7929ab0810babe2ede309740ba Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Cleanup network examplesChristian Ehrlicher2019-11-0645-318/+326
| | | | | | | | | | | | | | | | | | | | | | Cleanup network examples: - use nullptr - use member-init - adjust includes - use new-style connects Change-Id: I80aa230168e5aec88a1bc93bbf49a471bfc30e7b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeSimon Hausmann2019-10-171-2/+2
|\| | | | | | | Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
| * Prepare for deprecating the QDesktopWidgetSona Kurazyan2019-10-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QDesktopWidget is marked as obsolete in docs, but it is not yet completely deprecated, some of its methods are still in use. Replace uses of the following methods marked as obsolete: - QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen() - QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry() - QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry() Task-number: QTBUG-76491 Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-116-23/+22
|\| | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-144-7/+7
| | | | | | | | | | | | | | | | Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * SecureUDPServer example: use std::unique_ptr instead of QSharedPointerMarc Mutz2019-05-152-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason the code used QSharedPointer is that it used QVector to hold a collection of them, and QVector infamously cannot hold move-only types such as std::unique_ptr. Fix by using std::vector<std::unique_ptr> instead. Also, pass the objeccts into non-sink functions by raw pointer instead of shared_ptr. As a drive-by, replace clear-following-iterate by the for-exchanged pattern. Change-Id: I605fbb98af840c1b93eab9e65c07defd6e7b39e1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-1423-48/+48
|\| | | | | | | | | | | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
* | Fix compiling of examples on AndroidSimon Hausmann2019-06-1223-19/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | Fix linking of examplesSimon Hausmann2019-06-1219-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide add_qt_gui_executable() as function in our public API that takes care of automaticWinMain linkage. We can use this in the future to encapsulate similarplatform-specific behavior and adjustments, such as module generation onAndroid. In order for the examples to see the function in Qt5CoreMacros, three more additional fixes were required: * Do the build_repo_end() call _before_ attempting to build the examples, as we need the build_repo_end() to include QtPostProcess and complete the creation of all the target config files. Otherwise the find_package() calls in the examples see something incomplete. * Add more QT_NO_CREATE_TARGET guards * Always call find_dependency on the dependencies, regardless of the target creation mode. This way a find_package(Qt5 COMPONENTS Widgets) will still load Qt5CoreMacros. Change-Id: I03ce856e2f4312a050fe8043b8331cbe8a6c93e6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Allow to build examples as standalone projectKevin Funk2019-06-0523-415/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create CMake config files which can be used from the very same CMake project. These CMake config files simply do not create any targets, controlled via the QT_NO_CREATE_TARGETS. This patch also allows to build qtbase.git:examples as a standalone project, against an already-built Qt. Ran this: ag -s "QT " examples -l -0 | xargs -0 -n 1 .../util/cmake/pro2cmake.py --is-example Task-number: QTBUG-74713 Change-Id: I44cce5a4048618b30f890c5b789592c227a8b47d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-033-15/+29
|\| | | | | | | Change-Id: Ide5b3408bfefca410323cf26b810b44c06d3a227
| * HTTP example: use std::unique_ptr instead of QScopedPointerMarc Mutz2019-05-152-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the QFile factory there to actually return the payload in a unique_ptr instead of falling back to a raw pointer. The use of a unique_ptr member requires that the destructor be out-of-line, since QFile is only forward-declared in the header file. This is good hygiene, so do it for ProgressDialog, too. Change-Id: Idb6ed327f9592526bb7d0d5b2cfbffe9f08f3eea Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Torrent example: Replace the last Java-style iterator with STL onesMarc Mutz2019-05-231-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scope a previous iterator variable better so we can re-use 'it' as the iterator name. Change-Id: I46d239ad2d3646168408d1ef29ed74fd07bc663f Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-033-32/+28
|\| | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * Torrent example: replace a QMultiMap with a sorted vectorMarc Mutz2019-05-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | This came about trying to remove the Java-style iterator. It was used to iterate in reverse order, something QMap can't do, easily, due to lack of rbegin()/rend(). Instead of writing ugly loops, use a vector of pairs, fill it, sort it, then iterate over that one in reverse. Change-Id: I09c8a2732a0699fff4c497778745523e20d348a1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Torrent example: add missing qAsConst()Marc Mutz2019-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | The function is const, but the d-pointer doesn't propagate it (raw pointer), so we need the qAsConst() even here. Change-Id: I9d2e1f7715abb3dc67a87cdadaa7ded971b15848 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Torrent example: rewrite some very convoluted codeMarc Mutz2019-05-241-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code iterated over the peer list, inserting active peers into a QSet, curiously not stopping to search for clients if it had already determined the peer to be active. It then iterated over the peers again, storing the indexes of the peers it had determined to be active in the first loop, in a QList. It _then_ iterated over the index list, in reverse, calling removeAt() on the peers list. <sean parent>That's a remove_if!</sean parent> The twist is, that only some maximum number of inactive peers should be removed, just enough to bring the number of peers below a predefined number. To solve, use a lambda that keeps track of the number of times it has returned true, returning false once the count drops to zero. We can't use a mutable lambda here, since the STL algorithms are allowed to copy the predicate as many times as they wish, and, indeed, remove_if is commonly implemented by calling find_if. But the standard guarantees exactly one application of the predicate per element, so we can assume that we're not called again on the same element, and therefore keep a reference to an external count. With this, what was a horrible mess becomes a single call to remove_if. Also change a while(--n) c.removeFirst() loop to a single call of range-erase. Change-Id: I6c6a54a1805e5b376800e1116e7aec643e95e4e1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Torrent example: replace Java-style iteration with STL iteratorsMarc Mutz2019-05-231-5/+5
| | | | | | | | | | | | | | | | Java-iterators are going to be deprecated. Change-Id: I2e6353f3fd9e2ddaf0767e7f6cea713249d9591e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Migrate Windows system libs to external dependenciesJoerg Bornemann2019-05-081-1/+1
| | | | | | | | | | | | Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Regenerate more projects that are using uicAlexandru Croitor2019-05-235-9/+59
| | | | | | | | | | | | | | Amends fa21d29b7506e21db8a433e117aebb9f3c724f03 Change-Id: I54d9cca77122d61016e06c4057949747b19472bb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Rerun pro2cmake on projects that use .ui filesAlexandru Croitor2019-05-223-5/+11
| | | | | | | | | | | | | | Task-number: QTBUG-75875 Change-Id: I95109b07fc4a6e09fe7911a21fc5f27f2c895d77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-1619-68/+79
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-193-6/+3
| |\ | | | | | | | | | Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
| | * Add cmdline feature to qmakeJoerg Bornemann2019-02-183-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * | QtBase: compile examples with QT_DISABLE_DEPRECATED_BEFORE=0x050d00Christian Ehrlicher2019-02-132-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Replace deprecated functions to be able to compile examples with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Change-Id: If6b8de31f526320d6a0e2a20bb5f8e26c77f2353 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Fix some deprecation warnings in examplesFriedemann Kleint2019-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | googlesuggest.cpp:163:36: warning: ‘void QTreeWidgetItem::setTextColor(int, const QColor&)’ is deprecated: Use QTreeWidgetItem::setForeground() instead [-Wdeprecated-declarations] xbeltree.cpp:187:34: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations] imageitem.cpp:114:21: warning: ‘void QGraphicsItem::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] xbelreader.cpp:143:48: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations] xbelgenerator.cpp:103:55: warning: ‘bool QTreeWidget::isItemExpanded(const QTreeWidgetItem*) const’ is deprecated: Use QTreeWidgetItem::isExpanded() instead [-Wdeprecated-declarations] xbelwriter.cpp:90:55: warning: ‘bool QTreeWidget::isItemExpanded(const QTreeWidgetItem*) const’ is deprecated: Use QTreeWidgetItem::isExpanded() instead [-Wdeprecated-declarations] xbelhandler.cpp:97:50: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations] node.cpp:180:60: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] node.cpp:181:64: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] chip.cpp:82:81: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] chip.cpp:84:40: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] chip.cpp:108:93: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] roundrectitem.cpp:65:42: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] roundrectitem.cpp:97:51: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] roundrectitem.cpp:105:34: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] splashitem.cpp:82:57: warning: ‘void QPainter::drawRoundRect(int, int, int, int, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] robot.cpp:116:53: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] robot.cpp:176:49: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] robot.cpp:200:49: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] mandelbrotwidget.cpp:120:41: warning: ‘const QMatrix& QPainter::matrix() const’ is deprecated: Use transform() instead [-Wdeprecated-declarations] composition.cpp:344:47: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] composition.cpp:346:46: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] colorswatch.cpp:89:34: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] mainwindow.cpp:81:62: warning: ‘void QTreeWidget::setItemSelected(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setSelected() instead [-Wdeprecated-declarations] puzzlewidget.cpp:172:35: warning: ‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations] spreadsheet.cpp:191:37: warning: ‘QColor QTableWidgetItem::backgroundColor() const’ is deprecated: Use QTableWidgetItem::background() instead [-Wdeprecated-declarations] spreadsheet.cpp:198:32: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] spreadsheet.cpp:203:24: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] spreadsheet.cpp:238:47: warning: ‘QColor QTableWidgetItem::backgroundColor() const’ is deprecated: Use QTableWidgetItem::background() instead [-Wdeprecated-declarations] spreadsheet.cpp:249:38: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:494:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:509:56: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:513:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:527:56: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:531:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:545:56: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:549:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:563:55: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:567:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:581:55: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:585:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] spreadsheet.cpp:599:55: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations] starrating.cpp:91:46: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations] document.cpp:341:36: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] document.cpp:342:39: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] document.cpp:343:36: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] norwegianwoodstyle.cpp:88:39: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] norwegianwoodstyle.cpp:89:39: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] norwegianwoodstyle.cpp:188:52: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] norwegianwoodstyle.cpp:264:56: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations] plugindialog.cpp:128:49: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations] tetrixboard.cpp:361:74: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] tetrixboard.cpp:408:32: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] tetrixboard.cpp:412:31: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] mandelbrotwidget.cpp:120:41: warning: ‘const QMatrix& QPainter::matrix() const’ is deprecated: Use transform() instead [-Wdeprecated-declarations] Change-Id: If0afabbc35ef25f127f211c11699011d4ae4ae65 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * | Network examples: cleanup foreach usageChristian Ehrlicher2019-01-0613-56/+69
| | | | | | | | | | | | | | | | | | | | | | | | Replace deprecated foreach macro with range-based for loop Change-Id: I0d1f2cfd557d02ccc48b41b3fea137baa2962fc1 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Fix usage of QGuiApplication::set/resetOverrideCursorChristian Ehrlicher2018-11-051-3/+3
| |/ | | | | | | | | | | | | | | | | Replace all occurrences of QApplication::set/resetOverrideCursor with the QGuiApplication::set/resetOverrideCursor since it's a static function of QGuiApplication. Change-Id: Ic898ab50a7ad4ed2bc9c6acb26cf4a979c2f82af Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* / CMake: Add more examplesTobias Hunger2019-03-2623-0/+510
|/ | | | | Change-Id: I7a8a3fd0a844a518592957fe07c6e707dd452d5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix builds without DTLSAllan Sandfeld Jensen2018-10-091-6/+2
| | | | | | | Change-Id: Ic7215c7aa0bf6f7b37ae34649d809f2e1e1ee95b Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* DTLS server - use the proper TLS configurationTimur Pocheptsov2018-08-101-0/+1
| | | | | | | | | The one we had before was invalid and we ended up with defaultDtlsConfiguration which has peerVerifyMode == AutoVerify. Change-Id: I5b9ceb027e90189325c1d8fd0db37d1b212ebbc8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Document DTLS examplesTimur Pocheptsov2018-08-0913-27/+255
| | | | | | | | Task-number: QTBUG-68070 Change-Id: I2b08322049005b02f1ed680bee21992ade16813a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Document the DTLS APITimur Pocheptsov2018-08-092-0/+73
| | | | | | | Task-number: QTBUG-68070 Change-Id: Ifd08ecb7c2c1a6dc352952a10ad56259bd1ecf10 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Examples: Revamp LoopbackAndre Hartmann2018-07-303-41/+45
| | | | | | | | | | | | | * order and sort includes * use functor connect * use nullptr * use member init * added sanity check for nextPendingConnection() * small cleanup here and there Change-Id: I72c6758b5fedea0937a1f2cb9031cb7203f5d955 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QDtls - use conventional namesTimur Pocheptsov2018-07-272-7/+7
| | | | | | | | More Qt-style and more natural, also, shorter names. Change-Id: I97bd68a8614126d518a3853027661435dc4e080d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDtls - refactorTimur Pocheptsov2018-07-262-7/+7
| | | | | | | | | This patch renames rather awkward 'remote' into more conventional 'peer' (similar to what we have in QAbstractSocket). Change-Id: Ifc45e538b8adf9cc076bd7aee693277829fd94dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* DTLS client - improve the exampleTimur Pocheptsov2018-07-102-13/+26
| | | | | | | | | | | | - Remove redundant pingTimer.start() call (timer is not a single shot timer and already started before this point in code). - Use connected UDP sockets to show that it can work with QDtls. - Replace (translated) string concatenations with formatted strings and 'arg' where needed. Change-Id: I8dba54f43464a718062cd897d24f89b75b99f2a4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-0212-12/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Doc: Add missing full stops in briefsPaul Wicking2018-06-2112-12/+12
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Add a secure UDP client exampleTimur Pocheptsov2018-06-2211-1/+1173
| | | | | | | | | | | | | | | | | | | | | | | | A simple application that establishes DTLS connection(s) and sends/receives datagrams. Class DtlsAssociation is essentially a QUdpSocket|QDtls pair: it initiates a handshake, handles timeouts and errors. After establishing an encrypted connection it sends messages to the server and processes responses. Task-number: QTBUG-67596 Change-Id: I92d481b7dfd2459e6a93c754b338a2e897a7feaf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Add a secure UDP server exampleTimur Pocheptsov2018-06-2111-1/+1212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a simple DTLS server, implemented with QUdpSocket, QDtlsClientVerifier and QDtls. The server is configured to use PSK only (it has no certificate/key). The server uses a single QUdpSocket socket and de-multiplexes UDP datagrams internally (thus it can work with several clients simultaneously). Future update will probably add more options (like configuring with certificate/key, etc). For now - it's as minimalistic and simple as possible. Task-number: QTBUG-67596 Change-Id: Ic7d18dbab6dbcc9ed44c82e69a2b364df24aa256 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>