summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-051-1/+2
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| * QRandomGenerator: add system() and global()Thiago Macieira2017-10-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now,this does really nothing. This commit is just to allow us to transition the other modules (besides qtbase) to use the syntax that will become the API. I've marked three places to use the system CSPRNG: 1) the QHash seed 2) QUuid 3) QAuthenticator I didn't think the HTTP multipart boundary needed to be cryptographically safe, so I changed that one to the global generator. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ecf1938bd8ff61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-10-266-217/+87
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-246-217/+87
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| | * MinGW: Globally define WINVER and _WIN32_WINNT to enable Windows 7 APIOrgad Shaneh2017-10-192-2/+1
| | | | | | | | | | | | | | | Change-Id: I637b33ba6d05f40486d8da927ae5cc5148299348 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * QHostInfo: Make getaddrinfo() mandatoryThiago Macieira2017-10-182-169/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All systems must implement it by now. If there's any system still without it, that means it has no IPv6 support, so they can disable QtNetwork entirely. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support is mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I3868166e5efc45538544fffd14d8c28046f9191b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-162-46/+44
| | |\ | | | | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | | * QHostAddress::setAddress - fix an overload taking SpecialAddressTimur Pocheptsov2017-10-131-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It must detach, otherwise it overwrites all QHostAddresses that were sharing a given QHostAddressPrivate. This overload was introduced in 5.8 and probably as a result broke some pre-existing code, that previously was using a conversion and the correctly working setAddress. Conveniently, QHostAddress::clear() does: d.detach(); d->clear();, exactly the first thing we do in other overloads of setAddress. Task-number: QTBUG-63764 Change-Id: I63c36e877c9358d3ff26ba1f2e4adf35b771f426 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Doc: Remove unsupported systems out of QNetworkDatagram's listThiago Macieira2017-10-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't support Windows versions prior to 7 nor Windows CE anymore. Change-Id: I638cf58bfa7b4e5fb386fffd14ea930155d67689 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | QNetworkInterface: Use ranged-for in postProcessMårten Nordheim2017-10-261-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ranged-for loops instead of a normal for-loop with iterators. Change-Id: I13ba2001b7eb0fff1a0d9474f615a81d02af62f0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | QNetworkInterfaceManager: use ranged-for in interfaceFrom*Mårten Nordheim2017-10-261-12/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | Also replace the long template names with auto. Change-Id: Idfaf4493266cf251e85cbf23bcd6bfe74b713cf0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QHostAddress: add more classification functionsThiago Macieira2017-10-173-21/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QHostAddress] Added isGlobal(), isLinkLocal(), isSiteLocal(), isUniqueLocalUnicast(), and isBroadcast() classification functions to complement isLoopback() and isMulticast(). Change-Id: I3868166e5efc45538544fffd14d8fca6e9042c04 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-10/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | QNetworkInterface: don't include addresses from inactive interfacesThiago Macieira2017-10-141-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incidentally, we can fix a typo. [ChangeLog][QtNetwork][QNetworkInterface] Changed allAddresses() to not include addresses found in inactive interfaces, matching the user expectations of this function. If those addresses are needed for some purpose, the application will need to call allInterfaces() and obtain the addresses in each interface. Task-number: QTBUG-51922 Change-Id: Iaf4157b7efa2416d898cfffd14d969c963ec0a2a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Stop including net/if.h from qplatformdefs.hThiago Macieira2017-10-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | I need to include linxx/if.h from elsewhere and these two files conflict by defining the same types (struct ifreq, struct ifmap, struct ifconf, etc.) Change-Id: I0a103569c81b4711a649fffd14eb2f6dbbef83b6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-269-178/+92
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | Refactor QNetworkAddress not to keep a full QHostAddressThiago Macieira2017-09-254-60/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHostAddressPrivate is one QString and 24 bytes, allocated on the heap, which is WAY too heavy for something that fits into 8 bits. So instead of storing the expanded netmask inside QNetworkAddressEntryPrivate, we store the simple prefix length and calculate the mask only if asked. Change-Id: Ie05c6480d8a44fda817ffffd14d9ad4707aa8a92 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | QNetworkInterface/Windows: solve 11 year old puzzle about Win32 APIThiago Macieira2017-09-251-59/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I introduced QNetworkInterface in Qt 4.2, I didn't understand the relationship between the prefix list and the unicast address list in the IP_ADAPTERS_ADDRESSES structure. Turns out, there isn't a (direct) one and the actual solution didn't come along until Windows Vista, adding the prefix length to each address. Change-Id: I6a556cca551116d77c7edf43f9c651dacb75348f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | QNetworkInterface: complete removing pre-Vista supportThiago Macieira2017-09-251-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 2589111dc039b30350714f632222bcc565aa34b5 removed the dynamic function search, but did not remove the offsetof checks. Change-Id: Ibd2b5263f7de551f47fe137dbe1a1b7b7cd71934 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-064-17/+15
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * Convert features.socks5 to QT_[REQUIRE_]CONFIGStephan Binner2017-09-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | The sources were already added conditionally in the project file since 179fe5981fa. Change-Id: I0baaec2e772f3e596d311c1973b9745aa2b80423 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Convert features.ftp to QT_[REQUIRE_]CONFIGStephan Binner2017-09-063-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | QUrlInfo is used only by the FTP implementation, so it uses the same conditionals. Change-Id: Ia15abf44d2a538e90b792a31c65926cc9e16aecf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Merge dev into 5.10Frederik Gladhorn2017-09-024-32/+121
| |\ \ | | | | | | | | | | | | Change-Id: I5fb5e7e6e57bb5db6fcb1f670f7f6cbc8def2d60
| * | | QHostAddress: remove our own sockaddr_in6Thiago Macieira2017-08-301-32/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IPv6 is required now. Change-Id: I209fcd5dbc2b4e5381cffffd14df2694bd5a92c8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | QHostInfo: adapt to glibc 2.26 no longer requiring us to res_initThiago Macieira2017-09-221-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the announcement[1] - The GNU C Library will now detect when /etc/resolv.conf has been modified and reload the changed configuration. The new resolver option “no-reload” (RES_NORELOAD) disables this behavior. Since glibc can do it, we don't have to call res_init before every single getaddrinfo() call. And since we don't need to call res_init, we don't need to load libresolv.so at all, until we need res_ninit. We won't do it even if the user configured "no-reload" in /etc/resolv.conf or RES_NORELOAD in the res variable -- let's assume that it is the intent, like when /etc/resolv.conf is known to never change. [1] https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html Change-Id: I3868166e5efc45538544fffd14d738d40c375fd1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-193-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-192-3/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-314-32/+121
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Fix crashes with libproxy+webkitgtk: it's not threadsafeThiago Macieira2017-08-272-25/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm getting crashes in Akonadi processes due to libproxy. I don't have direct evidence that this was caused by a threading condition, but it's clear from the source code of libproxy that the plugins it runs for expanding PAC scripts are not thread-safe. To overcome this problem, we only run libproxy functions in one thread only. #0 0x00007f745f0ac1d8 in JSC::HeapTimer::timerDidFire() () at /usr/lib64/libjavascriptcoregtk-4.0.so.18 #1 0x00007f745f0ac287 in () at /usr/lib64/libjavascriptcoregtk-4.0.so.18 #2 0x00007f748e5ae9c5 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0 #3 0x00007f748e5aed88 in () at /usr/lib64/libglib-2.0.so.0 #4 0x00007f748e5aee1c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0 #5 0x00007f7494f4268f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5 #6 0x00007f7494eeb35a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5 #7 0x00007f7494d1b31a in QThread::exec() () at /usr/lib64/libQt5Core.so.5 #8 0x00007f7494d1fd2e in () at /usr/lib64/libQt5Core.so.5 #9 0x00007f74913174e7 in start_thread () at /lib64/libpthread.so.0 The pacrunner implementation of libproxy uses libdbus-1 which (officially) is thread-safe, but experience tells that it has problems. Since it is not running a JS engine, we don't need a thread, but we do need to lock around it. Change-Id: I84e45059a888497fb55ffffd14d2f638f21e807d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QHostInfo: Remove Darwin refusal to use getnameinfo(3)Thiago Macieira2017-08-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This #if has been there since 0248ec4054b (Oct 2005), presumably due to bugs reported after the Qt 4.0 release (the first containing QHostInfo). Any macOS issues with getnameinfo() have long since been gone. I've confirmed that it works on 10.9, 10.10, 10.11 and 10.12, so I'm dropping the #ifndef. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support will be mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I320d9d2f42284a69a4cbfffd14dd5bf479e5f678 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QNetworkInterface: Fold the test for if_nameindex into the config testThiago Macieira2017-08-241-5/+0
| | | | | | | | | | | | | | | | No need to make workarounds for Android in the .cpp source. Just let it fail (if it still has to fail). Change-Id: Iaf4157b7efa2416d898cfffd14d94ebcb4d979be Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Deprecate and remove the unused bearer support in QNetworkProxyThiago Macieira2017-07-212-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hasn't done anything since at least Qt 5.0. It's possible it was only used in Symbian, which we removed before the 5.0 release. This only served to make the tst_QNetworkProxyFactory test slow. [ChangeLog][QtNetwork][QNetworkProxy] The functions related to QNetworkConfiguration are deprecated. They've performed no action since Qt 5.0, so code using them can safely stop doing so. Change-Id: I84e45059a888497fb55ffffd14d31b7c2978a04e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QNetworkInterface: Remove dynamic finding of Windows Vista functionsThiago Macieira2017-07-171-48/+10
| | | | | | | | | | | | | | | | | | We no longer support Windows XP (or Vista, for that matter). We can directly link to those functions. Change-Id: Ie9104b1dca6fc2a626399778e68b04e9f8a9d5af Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | winrt: Enable network proxy supportOliver Wolff2017-06-241-1/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkProxy] Setting of network proxies is now supported on UWP. Task-number: QTBUG-45495 Change-Id: I71fed57910197760334f8e7d2aeac36c4e0d4f51 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Fix some qdoc warnings for 5.10Friedemann Kleint2017-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix comments for QRandomGenerator. src/corelib/io/qprocess.cpp:453: warning: Cannot find 'startDetached(...)' in '\fn' bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid) src/corelib/tools/qstringiterator.qdoc:122: warning: Cannot find 'QStringIterator(...)' in '\fn' QStringIterator::QStringIterator(QStringView string, QStringView::size_type idx) src/corelib/global/qrandom.cpp:902: warning: Can't link to 'QRandomGenerator' src/sql/kernel/qsqlerror.cpp:123: warning: Unknown command '\other' src/network/kernel/qhostinfo.cpp:296: warning: Unknown command '\other' src/gui/kernel/qplatformcursor.cpp:97: warning: Cannot find 'QPlatformCursor::OverrideCursor' specified with '\enum' in any header file src/network/access/qnetworkreply.cpp:307: warning: Can't link to 'QNetworkAccessManager::setRedirectsPolicy()' src/network/access/qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::RedirectsPolicyAttribute' Change-Id: Ibc2455b1b657716dfb6192615738dc7f924dbab3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-191-6/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Doc: Tweak documentation about a default QHostAddressKai Koehne2017-06-121-6/+10
| | | | | | | | | | Change-Id: I78deb7156900a3a0e79890062a40752b5d2561c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Document QHostAddress::swapKai Koehne2017-06-121-0/+8
| | | | | | | | | | | | Change-Id: I0f47ffeb1a7dbda7dadbd78b2ea04167c42a503d Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add swap and move operator to QHostInfoJesus Fernandez2017-05-162-0/+26
| | | | | | | | | | | | | | | | | | | | Also mark as shared-come-qt6, [ChangeLog][QtNetwork][QHostInfo] Added swap() and move operator. Change-Id: I8f422868f0487a37aeba3bc74685dc4912e9b3a4 Coverity-Id: 168204 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add a few std::move in functions accepting slotsOlivier Goffart2017-04-291-2/+2
|/ | | | | | | | This allows the use of move-only function objects Task-number: QTBUG-60339 Change-Id: If3595fca338cf7f3039eb566cc02e4e73cd04c86 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-133-4/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-062-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Remove the last remaining non-SSL use of QMutexPool in QtThiago Macieira2017-03-031-1/+2
| | | | | | | | | | | | Task-number: QTBUG-59164 Change-Id: Idd5ceba1eba34cb78c46fffd14a734735991f4fb Reviewed-by: David Faure <david.faure@kdab.com>
* | Network: Use canonical license headersKai Koehne2017-02-283-15/+21
| | | | | | | | | | | | | | | | | | Replace outdated LGPL21 with LGPL license header. Use GPL-EXCEPT for all autotests. Also use canonical contact url. Change-Id: I6e5cc8a4285569c4f862730a980f492b8a933a72 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Use static initialization for QBasicAtomicsMarc Mutz2017-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed static QBasicAtomicInt at function scope will be dynamically initialized. It will still be zero-initialized, but at least GCC adds guard variables for such objects. When using aggregate initialization, the guard disappears. Amends 04d6495bf773a6bb0d4fa6980df22d3b81a605b0. Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make some atomic counters zero-basedMarc Mutz2017-02-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of static storage duration that is not zero-initialized takes up space in the DATA segment of the executable. By making the counters start at zero and adding the initial value afterwards, we move them over to the BSS segment, which does not take up space in the executable. Wrap atomics used across function boundaries into small functions, to avoid code duplication and to increase readability. Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-301-4/+11
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network-chat/peermanager.cpp src/widgets/util/qsystemtrayicon.cpp src/widgets/util/qsystemtrayicon_qpa.cpp src/widgets/util/qsystemtrayicon_win.cpp src/widgets/util/qsystemtrayicon_x11.cpp Change-Id: I1c026df83818c0ccaf956980370e7522960627db
| * qnetworkproxy_mac - fix proxyAutoConfigCallbackTimur Pocheptsov2017-01-261-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have an invalid pointer dereference in our callback. Apple's docs are quite ambiguous, whatever we receive in our callback's 'client' parameter is our PACInfo, not clientContext's address. That's what we pass to CFNetworkExecuteProxyAutoConfigurationURL: "clientContext - A stream context containing a client info object and optionally retain and release callbacks for that object." This 'client info' is our PACInfo struct with 2 pointers. Now in a callback, 'client': "The client reference originally passed in the clientContext parameter of the ..." So apparently we should read this as "client info originally passed in ...." Otherwise incorrect cast results in invalid pointer (apparently the value of retain/release/copy pointers we carefully set to 0) and a crash on dereference. Task-number: QTBUG-56747 Change-Id: I89378f1582679638cd29a36c563e506d8f5af518 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QHostAddress: add missing op!=(SpecialAddress, QHostAddress)Marc Mutz2017-01-262-0/+14
| | | | | | | | | | | | | | | | | | The equality operator was supplied, but this one was missing. [ChangeLog][QtNetwork][QHostAddress] Added op!=(SpecialAddress, QHostAddress). Change-Id: Iad9c55fa0ee7a8e97d5e4ea4be0605b8b74649d1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2017-01-262-2/+22
|\ \