We want to use "localhost" if the server's address is "any", as some OS
can't send datagrams to "any" (e.g., OS X and FreeBSD).
Change-Id: I1004bc2282e7f930cdb7ed394aa9f4b5a1cfcf82
Reviewed-by: Richard J. Moore <rich@kde.org>
On my Mac Mini, port 5000 is in use, which means the broadcasting test
fails.
Change-Id: Ifb0883263e277f388342430349ea7315d42f324a
Reviewed-by: Richard J. Moore <rich@kde.org>
It was unconditional. Someone forgot to check for IPv6 support before
skipping IPv6 tests.
Change-Id: I7b11528ad02560f0db9defde3c64f76f48a6c1f8
Reviewed-by: Richard J. Moore <rich@kde.org>
With toString(), it was printing "0.0.0.0", which is the same as
QHostAddress::AnyIPv4, making it difficult to tell the two apart.
Change-Id: I4668ec3337c25ddfdc2fa3bbacc83b9d34316b1f
Reviewed-by: Richard J. Moore <rich@kde.org>
Fix indention, add empty line as separator, undef a local macro.
Change-Id: Ie0d8529322f87ca2bdedb9a7f2f4cf9f463a6e12
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Split off default-value check from getSetCheck().
This is in preparation of extracting getSetCheck_data().
Change-Id: I869c34014a92e29a07dc08584a93a4cbba372518
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
There's no reason not to have it, and it allows better debug output.
[ChangeLog][QtWidgets][QSizePolicy] QSizePolicy::ControlTypes is now
introspectable through QSizePolicy's meta object.
Change-Id: Ia274c708f31e735e4605bd4769aa65a9b78d690f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Was including qtest_gui.h instead, for QT_WIDGETS_LIB.
Not a problem in practice, since qtest_widgets.h doesn't
currently add anything on top of qtest_gui.h. But that will
change soon.
Change-Id: I942870cddc7b1ccfda262e2fe26834594336dd0b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
qwindowsprintdevice.cpp:182:85: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
&& DeviceCapabilities((LPWSTR)m_id.utf16(), NULL, DC_PAPERSIZE, NULL, NULL) == paperCount
MinGW DeviceCapabilities is returning an int, although microsoft documents it as returning DWORD.
Change-Id: I3acd76dde0b8b83f8a785ec84e3413115c847cb2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QUdpSocket doesn't support binding to QHostAddress::Any and then joining
an IPv4 multicat group since QHostAddress::Any is really an IPv6 socket
with v6only = false. The test did check this case, but failed to ignore
the warning.
Change-Id: I62d782408319a6e566e0ff1a6081b706ac1f669c
Reviewed-by: Richard J. Moore <rich@kde.org>
With IPv6, you cannot bind to a multicast address. You need to bind to a
local address only. The previous tests either checked this or didn't
check the result of bind().
Change-Id: Ief70887d8988fc1bc4394cf6ff34b5d560e5748e
Reviewed-by: Richard J. Moore <rich@kde.org>
Remove warnings: "assigned but not used" and "uninitialized usage".
Change-Id: I247e1de020e78c35787b8e1e30421174ac232fd5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The previous change (SHA 82c2118c) to provide better
than 1ms accuracy for timers on QNX is not safe.
According to the docs, ClockCycles is not guaranteed to
return consistent information if called from different
CPUs. While this can be addressed by locking the thread
to a single CPU, you wouldn't want to do that here.
On some systems (e.g. BB10) the behavior is extremely bad
since ClockCycles only has 32 bits of precision. This
results in overflows in the calculations making short
timers run very slowly (16ms timers were around 1s). Also
ClockCycles wraps in under three minutes causing even
more problems.
I've talked to the kernel developers and there is currently
nothing that will give you better than 1ms accuracy. An
individual program could use ClockCycles to calculate more
accurate times if they want.
It's not clear to me what benefit one would get with
increased accuracy. Unless I've missed something, these
times are only used to calculate timeouts for calls such as
select. These timeouts will themselves have the same
resolution as clock_gettime provides so the increased
accuracy would appear to be for naught.
Change-Id: Ia38b154ca41949becbd0b8558a9ff4ddd5e01a43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
LOGFONT docs clearly states `lfFaceName` member is a null-terminated
string of length not longer than LF_FACESIZE, including trailing null.
This patch covers two cases at once:
1. If family name is longer than LF_FACESIZE - 1, it would be truncated
and terminated with null, to prevent memory access beyond
the LOGFONT instance.
2. If family name is a fromRawData QString, we don't assume it is
null-terminated either and guarantee trailing null ourselves.
Change-Id: I8f607efc7d0901537a4179e36cc51df94203f08d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
[ChangeLog][QtCore][QThreadPool] Added QThreadPool::cancel() which allows
removing from the job queue a job that hasn't been started yet.
Change-Id: Ib8f1c1f32a34f5eec8338c641d820b928e470164
Reviewed-by: Nick Shaforostoff <shafff@ukr.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Sending 100*8 packets of each type of message is WAY overkill. That's a
stress test without limiting. My Linux system starts reporting EAGAIN on
the socket, so reduce the amount of data sent.
Change-Id: I153f44cf3b91d37526dac580b400114cc80b1769
Reviewed-by: Richard J. Moore <rich@kde.org>
IPv6 has no such thing, so don't try to bind to an IPv6 address to send
broadcasts (even though that works) and it's a poor idea to bind to IPv6
to receive broadcasts. Moreover, skip any IPv6 network addresses
(broadcast() is invalid).
Change-Id: I2829b042c000158565adfd92db682f37d67dacae
Reviewed-by: Richard J. Moore <rich@kde.org>
If you don't have /etc/lsb-release, you'd get
sh: line 0: [: =: unary operator expected
Change-Id: Idb5c79f799879e4d32cd640ef74fb388227f831e
Reviewed-by: Richard J. Moore <rich@kde.org>
It doesn't make sense because there is no command to ask the proxy
server to join a multicast group. At best, we could write a datagram via
proxy without joining, but we definitely can't receive.
Change-Id: Icc6b54572a053fb7821dfca1f4111f2046ff8686
Reviewed-by: Richard J. Moore <rich@kde.org>
384388f2 introduced some checks, and used an assignment in an assert;
that sets off compiler warnings about expressions with side effects
into an assertion. Hence, that code needs to be reworked a bit.
Unfortunately, there's no single define we can use to know if
assertions are enabled or not in Qt, so simply use QT_NO_DEBUG
to enable/disable those checks. The actual "thread" data member
is kept around to avoid break ABI depending on debugging flags.
Change-Id: I8b07e7ff6f81359d6b0653a1d9cc2b720541d1b9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This also unbreaks matching for scripts not covered
by qt_script_for_writing_system().
Change-Id: Iddf015281a57a9dbae2e09f0408359441b020df8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
When looking for engine of non-Common script and lookup in
the font cache failed, first check if we have already loaded that engine
for the same request but different script.
In general, this gives an arbitrary font engine a chance to be re-used
multiple times when request only differs in script, which saves a LOT
of memory (~10MB on my win7, after scrolling the QFontComboBox'es list).
Change-Id: I9c752ce65c27142237a0ed74b33742b6a8d90a24
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Behavior will agree with the docs.
[ChangeLog][QtGui][QWindow] lastWindowClosed will be emitted even if
quitOnLastWindowClosed is not set
Task-number: QTBUG-32956
Change-Id: I7bb269d53894859fee27e171eea7ad472ea86af0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Previously QPlatformScreen was automatically deleting its QScreen
in ~QPlatformScreen(). That means that we cannot use QScreen's
methods when the screen is being removed, because doing so would
call virtual methods of QPlatformScreen. By that point the
QPlatformScreen subclass object does not exist anymore, and we
call the default implementation instead of the subclassed one, or
get a crash for the pure virtual methods. This happens for example
when removing a screen which contains a QWindow with some QML item
using QQuickScreenAttached.
This patch adds a QPlatformIntegration::destroyScreen() function,
which deletes the QScreen and later the QPlatformScreen.
~QPlatformScreen will still delete the QScreen if it was not deleted
with destroyScreen(), so code not ported to the new approach
will continue to work as before, with only a warning added.
Task-number: QTBUG-41141
Change-Id: Ie4a03dee08ceb4c3e94a81875411f6f723273fe1
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This is a temporary measure while the Qt CI system is updated to have
the correct D-Bus configuration. Once it is fixed, this commit should be
reverted, so that we don't run into the situation in which the tests
aren't getting run on some configurations and we never know about it.
Change-Id: I7192d4d95a60dcb63acfa6cc90bfdc58592b0664
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
The order is:
1) own header
2) own private header, if any
3) other headers
Commit f17d7a124f broke the order.
Change-Id: I7225024691db91fd936a057accdad65bacb3f979
Reviewed-by: Richard J. Moore <rich@kde.org>
Gesture events sent to a disappearing tooltip can crash. This can most
easily be seen by scrolling over a tooltip on OSX with a magic mouse
middle scroll gesture.
Task-number: QTBUG-42826
Change-Id: Id5510895f63297ca157e3d24a3f4e3a6034586e8
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Include statvfs.h on all non-Linux and non-Solaris systems.
* Fix type of stat_buf structure on BSD.
Change-Id: I6336503082fafd7f6108cf95c079bdd329d2ea0f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
In case the foundry name was empty and foundry lookup has failed, don't
look for *any* foundry since it does exactly the same as previous call.
Change-Id: I2a81949df06c31e1ae6999a6bbbe973408d4b814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
According to the documentation, the argument is called COPYONLY instead
of COPY_ONLY.
Fixes warning and ensures it works properly.
Change-Id: I643f5ea808aaaf94c3ee666ec39485e84ed38df1
Reviewed-by: Vishesh Handa <vhanda@kde.org>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
The EglDisplay and the Display is normally a PlatformIntegration wide
resource
Change-Id: Ie5382a2a0b34fbe1c506b5134bf581afbd7f5d99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Fixes combo-boxes being too big and some alignment issues
that were not present in Qt4.
See screenshot in JIRA task.
Tested with QT_SMALL_COLORDIALOG too.
Task-number: QTBUG-43501
Change-Id: I2aefb64be1c5f3c4894149d85e1a12c9c0cc3d62
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This reverts commit 8c538d10da.
This patch, unfortunately, do not combine well with another
problematic code producing, as a result, a serious regression.
While the proper/better fix in Cocoa menu not found, I'm reverting
this patch.
Change-Id: I1ff03dbe12805da447cb3cfe3e2f231528bf1a16
Task-number: QTBUG-43471
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
The /home path doesn't exist on Android, so it doesn't work as
a non-writable current dir. Instead we use /data on Android.
Change-Id: Ib779f60822da1bef421a16a00c1030245a8c5b90
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The qtlogging.ini file needs to be detectable by QFINDTESTDATA,
so we put it in a qrc file on Android.
Change-Id: I5fb0217098c56f2b2e99ab8d1642c4a7904b18d1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test requires building a console application first, deploying
this as part of the APK and then being able to execute the
bundled file from the main application. Since IPC is a limited
use case on Android, we just skip this test instead.
Change-Id: Ie68e495ff64b69e7027924291a411b5de0e2da76
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Test requires that tst_qiodevice.cpp is available on file system,
but since we're not able to deploy directly to the file system
on Android and since we want to actually test file system access,
we bundle it in qrc and copy it out during initialization.
Change-Id: Ida2b5bf6f1dcd43bc740a2b9380352bab5eb6c62
Reviewed-by: BogDan Vatra <bogdan@kde.org>