Commit Graph

120 Commits

Author SHA1 Message Date
Simo Fält
e5785d6322 Fix network tests relying on troll.no
Replacing old troll.no domain with qt-project.org domain. Using troll.no
doesn't work anymore.

Change-Id: Ic6fa71b044d1adbdc66c875b47bfdc256a2afc8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-13 13:25:26 +01:00
Sergio Ahumada
699ba50744 QtNetwork tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: If1cc5fafddc41ed19dd818caf294c69cd4969216
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-02-25 16:47:13 +01:00
Frederik Gladhorn
9033977d39 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/global/qglobal.h
	src/corelib/tools/qstring.cpp
	src/gui/image/image.pri
	src/gui/image/qimage.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/eglfs/qeglfshooks_stub.cpp
	tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp

Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
2014-01-20 18:18:59 +01:00
Kai Koehne
278152fffd Replace win32-g++ with mingw scope
Commit 773dd01 introduced a general mingw platform scope, which
is cleaner and more flexible than matching the spec name.

Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-17 12:08:24 +01:00
Sergio Ahumada
fa907401e9 test: tst_qhttpsocketengine requires `private_tests' set
Otherwise you get:

  undefined reference to `vtable for QAbstractSocketEngine'

when -developer-build is not used.

Change-Id: I444140736a6bf736894dc12a20f6a4d48af2678e
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-01-15 16:18:47 +01:00
Oswald Buddenhagen
882bf3475c expand tabs and related whitespace fixes in *.{cpp,h,qdoc}
the diff -w for this commit is empty.

Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-13 22:46:50 +01:00
Simon Hausmann
d776937df9 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-12-23 22:44:13 +01:00
David Faure
13c246ee11 QAbstractSocket: fix setReadBufferSize from readyRead slot.
In a slot connected to readyRead, if the app detects that the
buffer size is too small and increases it, it expects that
readyRead() will be emitted again.

setReadBufferSize() doesn't re-enable the socket notifier when
calling from within readyRead, and readyRead itself was missing
the code to do it.

Change-Id: Ia00a3066ad3ba09d5cfae0716adc5691ae96c3fa
Done-with: Thiago
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-20 09:30:05 +01:00
Frederik Gladhorn
3f3be55835 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/gui/kernel/qplatformtheme.h
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
	tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp

Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
2013-12-16 16:59:33 +01:00
Peter Hartmann
aa3eaf9d2e QUdpSocket auto test: disable Socks5 over UDP for new test server
... because they fail on the new test server. This commit can be
reverted once the Socks5 socket engine is fixed.

Task-number: QTBUG-35490
Change-Id: I85635d4b44d26168d40a56b7a121693297564f0f
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-12-10 15:14:22 +01:00
Oliver Wolff
1efe5d4b41 WinRT: Fixed compilation of network autotests and benchmarks
Change-Id: Id689f199cfb22dce231cec36faba57ab958b1bac
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2013-12-06 15:06:47 +01:00
Kai Koehne
326e9c8962 Remove trailing space from QDebug stream
It's unexpected that all messages generated by the stream version
of qDebug and friends have a trailing space. It also makes switching
to categorized logging (which only supports the stream version) difficult,
since all autotests checking for debug output would have to be adapted.

Task-number: QTBUG-15256
Change-Id: I8d627a8379dc273d9689f5611184f03607b73823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-06 13:33:10 +01:00
Sergio Ahumada
2346ae1675 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
2013-09-07 16:18:32 +02:00
Andrew Knight
cd582f8410 Add QT_NO_PROCESS guards in tests where they are missing
A handful of tests lack QT_NO_PROCESS guards, making them non-compilable
on Qt builds with no QProcess support. This commit does not change
QProcess-specific tests, which should be left out of the build using the
.pro file mechanism.

Change-Id: Iac8562428abc1f59ccbb23bf5c3a919785e41f12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-03 08:42:24 +02:00
Peter Hartmann
2109965a4e QTcpSocket auto test: rely on IMAP port, not SMTP port
The new test server image will not have a SMTP service installed, and
the network self test does not check for that either.

Change-Id: I1063777832148e184de4ddf21d9154364f644e1e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-27 19:12:06 +02:00
Pasi Petäjäjärvi
ea14a63083 Include sockLib header to enable usage of socket functions on VxWorks
Functions normally found from <sys/socket.h> are available on VxWorks
from <sockLib.h> header.

Change-Id: I2263ec40ba9f37bc95755b633fb43d66ceb2777c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-08-06 11:00:23 +02:00
Frederik Gladhorn
084c5b3db7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp

Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
2013-07-23 11:18:11 +02:00
Thiago Macieira
bfc5bb09c4 Ignore or suppress warning and debug messages in tst_QLocalSocket
The one in tst_QLocalSocket::writeToClientAndDisconnect just needed
proper ordering: that's what waitForDisconnect is for. At the same time,
we need to make sure we get the same message from all three
implementations of QLocalSocket::waitForDisconnect (and without the
useless space at the end).

Change-Id: I21364263cf908df022df814a6a39fcb5783e84e6
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-07-20 00:22:07 +02:00
Thiago Macieira
674e79416f Fix incomplete override of QIODevice::open in QProcess and QLocalSocket
The rule for a new override is that it must still work if the old
implementation is called. The catch is that any class that derives from
QProcess and isn't recompiled will still have QIODevice::open in its
virtual table. That is equivalent to overriding open() and calling
QIODevice::open() (like the tests).

In Qt 5.0, QProcess::start() called QIODevice::open directly, not the
virtual open(), so there's no expectation that a user-overridden open()
be called. With that in mind, simply fix QProcess::start to not call the
virtual open at all.

Similarly with QLocalSocket, the calls to open were always non-virtual.

Task-number: QTBUG-32284
Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-20 00:22:03 +02:00
Thiago Macieira
4a7e37b0a3 Add a test for QLocalSocket::open
This should have been done in the commit that introduced open
(953255abab), but was missing.

Change-Id: I1c2de4ad5fa42aa5b90646e7d4d7d1b1570a0f87
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-20 00:22:00 +02:00
Peter Hartmann
f4714459a8 QTcpSocket bind() auto test: return instead of QSKIP
... because SkipSingle was removed in Qt5, and a QSKIP would result in
the SSL tests not being executed.
This can be reverted once QTBUG-29972 is fixed.

Change-Id: I3663ee52f00c3f4391ce78cf63bd444656d79cb3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-04-05 10:56:43 +02:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
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>
2013-03-16 20:22:50 +01:00
Friedemann Kleint
eccef8c936 Fix warnings about overloaded virtuals in tests (CLANG).
Change-Id: I2f96073c4aaf4b11221b98cc6c7031b253a3b45c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-03-12 09:16:42 +01:00
Friedemann Kleint
d8e767e928 Fix warnings about unused field variables (CLANG).
Change-Id: I488ad18eb0389d1e9b8b695b7a02eca47bee687e
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Laszlo Papp
80af204297 Return -1 as the API documents it for socket issues
Task-number: QTBUG-30024
Change-Id: I51498e6d74ab139134abfb94f35647e995319ee8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 12:19:08 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Shane Kearns
7e91b5a2bc Fix incorrectly disabled autotest
One of the IPv6 autotests was always disabled instead of being disabled
only when the system has no IPv6 support.

Change-Id: I34dffbeae6ba85a706bfeb0cc4750a4514b73a65
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-01-11 14:01:10 +01:00
Stephen Kelly
330ad41b7d Network: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ifdce72af844901665c4ebab11507216ba5f00fc1
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 18:19:28 +01:00
Stephen Kelly
4319f698c8 Remove metatype registration of built-in types.
As they are built-in, they are effectively registered at compile-time
already.

Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 16:15:37 +01:00
Joerg Bornemann
000025ca1e speed up tst_QLocalSocket::readBufferOverflow
Ifdef out waitForBytesWritten on Windows.
See comment in source.

Change-Id: I7a2268d2634c2524cd8291c72dd9708e430e314e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 15:59:57 +01:00
Sergio Ahumada
704a4e4747 test: Don't fail if the network test server is not set up
Not having access to a network test server is not a failure per se
but rather an enviromental condition not met at run-time.

Change-Id: Ie7d10ca5fbf2df45fb1fd1ac19718c9fae855c03
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-25 14:10:04 +02:00
Joerg Bornemann
b5d55f3a35 fix flakiness of tst_qlocalsocket::processConnection
QSystemSemaphore is persistent after a crash and we'd have to toggle the
Open/Create flag. Waiting for the server being available by trying to
connect is much more reliable.

Change-Id: I510814cef189b43658911f8ade3cf831ae6c7e58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-25 10:19:48 +02:00
Joerg Bornemann
c54a2dca16 tst_qlocalsocket: get rid of QtScript dependency
Removing the lackey executable that needs QtScript to be built.
This was a qscript bastard that was able to run a client and a server
script. It's replaced by a C++ version with the same functionality.

Nice side effect: the two second wait per test row could be removed.
The client executable is now waiting for the server to be created.

Task-number: QTBUG-24142

Change-Id: I135b75abf6620d3b0af50dc226ea8c81c2bf4149
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-10-19 02:43:05 +02:00
Joerg Bornemann
07c95ad7f3 typo fixed in tst_QLocalSocket::verifyListenWithDescriptor_data
Change-Id: Ic549c8fa7f98052a45b391d6a9bfef3d2557c709
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-10-02 08:06:11 +02:00
Joerg Bornemann
d3c24d241e remove tests/auto/network/socket/qlocalsocket/example
The programs in the example isn't used in the test.
Examples should be in the right directory and be of a certain
quality.

Change-Id: Id77bd1295efb3387fa54c379eb9c882cdc5b88bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-10-02 08:05:48 +02:00
Joerg Bornemann
1cf6bbfcf1 make tst_QLocalSocket::listenAndConnect faster
Replaced qWait/QCOMPARE with QTRY_COMPARE.

Change-Id: Ic534443c187f791c75fe9528251bf47e54f33eed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-02 08:05:45 +02:00
Kai Koehne
f052ee467d Fix MinGW/gcc warning about NOMINMAX being redefined
Commit 5230d62fe added a #define NOMINMAX, which conflicts with a
NOMINMAX definition in the MinGW headers. Just use the same definition
as in MinGW to fix the gcc warning.

Change-Id: Ib21dd323ebbdca5d143e394c7631303e0c72541a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-26 10:08:59 +02:00
Jonas M. Gastal
4920090da0 If accept fails, stop accepting new connections and emit error signal.
Task-number: QTBUG-24778
Change-Id: I6c5b685b3f861a0fafc1475c41bb35cede17d712
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-26 04:03:51 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
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>
2012-09-22 19:20:11 +02:00
Leonard Lee
b41bd2b08d Remove old troll test servers' references.
Replaced with qt-project.org test domain.
The connectToMultiIP auto test is still disabled due to lack of test infrastructure.

Task-number: QTBUG-23294

Change-Id: Icf01aabb0ae503291abdda4e8f773f8e0a08931a
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-10 09:37:59 +02:00
Sergio Ahumada
10ed50002c test: Check for null string comparison
Do not compare a QString to QString(). Instead use the .isEmpty() method.

Change-Id: I8bb5e64563bf173abe7288bb9e35375bee1fe445
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-05 03:03:02 +02:00
Sergio Ahumada
64d22311d8 Doc: Fix spelling errors
Change-Id: Ibae8d10183f6b15a16b1499daa2df8802dbb014e
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-08-17 22:45:27 +02:00
Marc Mutz
fb07ce50ae tst_QUdpSocket: Remove unneeded ./ in application name printing
Reported-by: Shane Kearns <shane.kearns@accenture.com>

Change-Id: I12f2a23b98c3b0161a2961a9117c196cd7d72a6d
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-15 15:01:07 +02:00
Marc Mutz
9e96c4a315 Fix "might be used uninit'ed" warning
GCC 4.8 warns:

  main.cpp:165:60: warning: ‘type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                               app.arguments().at(3).toInt());
                                                            ^

Change-Id: Ib0f6847031437b588e14c6708fdddea5fd474b58
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-15 15:01:01 +02:00
Stephen Kelly
dbe4b45f9b Remove some dead code wrapped in Q_WS_QWS.
Change-Id: Ie1ee8c4af603b924abe40145041357981d174445
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-03 11:24:28 +02:00
Martin Petersson
b8453b6fe3 QtNetwork: Handle FD_CLOSE on Windows
We need to handle FD_CLOSE separately on Windows as this will be sent
only once. When we get FD_CLOSE we need to check if there is more data
available for reading. It there is this might indicate that there is
another FD_READ that we need to handle after the FD_CLOSE. So in this
case we will manually create another close event.

Task-number: QTBUG-19409
Task-number: QTBUG-25386
Change-Id: Ie19906bc3f64fb6a85a508a5ab12caac5d70ccdb
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-01 18:12:34 +02:00
Thiago Macieira
672b5b7ab6 Set the Qt API level to compatibility mode in all tests.
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-01 15:37:46 +02:00
Marc Mutz
79b742b7e0 QtNetwork: use nullary version of qRegisterMetaType<T>("T")
Using the nullary version has the advantage that multiple calls
during a program run are much more efficient, since an inlined
atomic is used to store the result. It also ensures that
Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T")
will happily register anything. So I've added the macro where it
was missing, or moved it to a central place when it existed
hidden.

In tst_qnetworkreply, this became a bit tricky, because a private
header is conditionally included, so moved the Q_DECLARE_METATYPE()
into a conditional section, too.

Change-Id: I71484523e4277f4697b7d4b2ddc3505375162727
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-25 19:32:41 +02:00
Sergio Ahumada
59339941e0 Fix some spelling errors
Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-07-11 14:52:37 +02:00
Bjoern Breitmeyer
32db7de207 fixed unittest builds for wince
removed printsupport tests for wince as there
is no print support on wince and removed the special
handling for wince from 4.8 on some tests as the dependent
modules are not part of qt base anymore

Change-Id: I4ffb22da11f98beee1013f775cb5ce4b936d3211
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 21:14:09 +02:00