Commit Graph

17335 Commits

Author SHA1 Message Date
Marc Mutz
d432d17f83 QPainterPath: replace a use of QList<QRectF> with a QVector
QList<QRectF> is horribly inefficent, and this is just implementation,
so we're free to change it.

Change-Id: I7b28a2093efb5826b55c172f48a81cb9c2472e5a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-26 22:01:54 +01:00
Friedemann Kleint
ca4b9f624a QtCore: Fix MSVC 64bit warnings about conversion from size_t to int.
warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data

Change-Id: I9be380cbb7bed4cd95515074c7cad7e41a511dc9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-25 20:56:43 +01:00
Friedemann Kleint
356838cd7d Improve error reporting in selftests of testlib.
Output the file name and fix line number to be 1..n.

Change-Id: I3ba7f84b99ce3664bc3e403b230307511b15fe1f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-25 20:56:32 +01:00
Adam Majer
f6d8afd26d Doc: Correct typos in QModelIndex::internalId() documentation
Change-Id: Iea2fd83764711889b828997d56b9f7dcdbdd75fb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-25 17:20:39 +01:00
Martin Gräßlin
f1ee10f81a Prefer QPA implementation in qsystemtrayicon_x11 if available
In order to have the possibility to provide a custom QSystemTrayIcon
implementation in the platform theme instead of the X11 xembed based
one, the qpa implementation needs to be called. This was not possible
as qpa and x11 implementation were compile time mutual exclusive.

This change moves the qpa implementation in the shared part and the
methods in qsystemtrayicon_qpa just delegate to them. In addition the
_x11 part tries to create a QPlatformSystemTrayIcon through the
platform theme and if that succeeds the implementation prefers the qpa
variant and delegates to the same methods.

Change-Id: I6b33acac63524a77ebdce39af6eb74666f8c7561
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-25 14:33:00 +01:00
Thiago Macieira
de1d5d2e39 Bump Qt version to 5.4.0
Change-Id: I9eea1d2e383aff7eec4817b17c098a6fcc03e041
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-20 09:23:55 +01:00
Thiago Macieira
0ed63f0a2b Add the option of using decltype() in Q_FOREACH
This should allow more compilers to use the shorter & simpler version of
the macro.

Change-Id: Ibd2bf20f479b707a7806d0265a5580ebfc2e7733
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-19 20:45:33 +01:00
Thiago Macieira
c35a3f5190 Redo the Q_FOREACH loop control without GCC statement expressions
It's possible to do without them, which probably makes the number of
supported compilers a lot bigger: they just need to support decltype()
or __typeof__.

That includes the Intel compiler. The old code was also apparently
working, but no one had realized the old workaround for some old version
was still in place.

The loop overhead is more or less the same. I have not done benchmarks,
but inspection of the generated assembly shows more or less the same
number of instructions.

Change-Id: I32d499c84a6ddd19d994b49f17a469acb5c3a3f1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-19 20:45:33 +01:00
Thiago Macieira
9592b98b55 Mark the QArrayData alloc/dealloc functions as nothrow
Throwing is handled at a higher level.

Change-Id: I573e4ded135b61e35fbe6e188be09acf449911fc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-19 18:50:35 +01:00
Frederik Gladhorn
6aa09bbce5 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/android/qandroidplatformtheme.h

Change-Id: I541bd3069df3ab54c7942d5f4a9e155e3b6566a0
2014-02-18 14:19:36 +01:00
hjk
21fbca97a8 Fix typo in model/view docs.
Task-number: QTWEBSITE-560

Change-Id: I2b7a6f28ac41bacbfd2603feb8b786c31d3769e3
Reviewed-by: Tero Kojo <tero.kojo@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-02-18 10:10:09 +01:00
Thorbjørn Martsum
f4044e853c QHeaderView - do simple section move/rotate in moveSection
It is in nearly all cases much faster (in our benchmark it is
about a factor 8) - and it also makes the code more readable.

Change-Id: I075e1d1a96756e5e9a2bf53b5479094f7d87883d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-18 09:54:59 +01:00
Sarunas Valaskevicius
13040043b2 Emit updateBlock signal in QTextDocumentLayout
updateBlock is part of the interface of QAbstractTextDocumentLayout
however QTextDocumentLayout implementation is not invoking it.

This commit adds similar behavior to QTextDocumentLayout as the
QPlainTextDocumentLayout (QtWidgets) has by implementing the missing
functionality.

[ChangeLog][QtGui][QTextDocumentLayout]
Emit updateBlock signal in QTextDocumentLayout.

Task-number: QTBUG-36743
Change-Id: I7f812d4d5d7c2148393ee672fb0db6c0b2e73783
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-18 00:28:16 +01:00
Leena Miettinen
d5b0f1763f Doc: add CLI options for QGuiApplication
Task-number: QTBUG-36579

Change-Id: Ib9376ecfe98f8d5e26c4f9be783a022faa9d3046
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-17 22:20:12 +01:00
Jani Heikkinen
072f9cf888 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-02-17 20:43:28 +01:00
Sergio Ahumada
817c4be91f Remove qSort usages from network tests
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I31a701d8e17673edcb9bb7c32e6e6a87812a7fbc
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-02-17 19:31:01 +01:00
Alessandro Portale
ce46593e25 Android: Build fix for "-no-widgets"
This fixes compilation of Qt for Android when configured with
"-no-widgets". One good use-case for that configure switch is
that QtSvg loses the dependency to QtWidgets.

Change-Id: I8a645d9fee6ce0467ff0b5d1d62531b7c6272aab
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-02-17 18:46:15 +01:00
Thiago Macieira
83b1eaad44 Make a URL with absent authority be different from one with an empty one
This partially reverts 5764f5e6ea and
fixes the problem differently.

After this commit, "file:///foo" is still equal to "file:/foo", but
"foo:///foo" becomes different from "foo:/foo", as it should be.

Task-number: QTBUG-36151
Change-Id: Ia38638b0f30a7dcf110aa89aa427254c007fc107
Reviewed-by: David Faure <david.faure@kdab.com>
2014-02-17 18:13:42 +01:00
Allan Sandfeld Jensen
2e20d82de4 Optimize generic bilinear interpolation using SSE2
The drawing code currently only optimizes the bilinear interpolation
under specific conditions that allows the optimizations used there.

The patch adds a SSE2 version of the fallback 4 pixel interpolation.

Change-Id: I4e8a2ba6cb44647105a9b24e38b3ab755a435050
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-17 16:48:54 +01:00
Martin Gräßlin
824f080468 Allow QPlatformSystemTrayIcon to create the QPlatformMenu
In case the QPlatformTheme does not provide a QPlatformMenu the
QPlatformSystemTrayIcon is not able to forward the menu because the
QPlatformMenu pointer passed to updateMenu is always null. Providing a
QPlatformMenu in the QPlatformTheme implementation should not be a
requirement for having the menu in the system tray icon. There are
cases where no QPlatformMenu should be created by the theme, e.g. if
the X11 implementation of QSystemTrayIcon gets provided by the xcb
plugin.

The change adds a virtual method to QPlatformSystemTrayIcon to create
a QPlatformMenu. This method is called from the QPA implementation of
QSystemTrayIcon if the QMenu's platformMenu is not present. Thus the
system tray icon is able to provide a custom implementation of the
menu. This gets installed through a new internal method in QMenu to set
the platform menu. It creates the required connections and sync the
state to the QMenu to the newly created QPlatformMenu.

Last but not least QPlatformMenu is extended by a method to create a
QPlatformMenuItem. The default implementation delegates to the platform
theme. This allows to provide the menu item implementation for the
system tray icon without providing the QPlatformMenuItem through the
platform theme.

Change-Id: I17234bd8bcf8c05f8bd786feff0cf8f860430e82
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-02-17 16:47:05 +01:00
Tor Arne Vestbø
6aef733a7a Fix glyph cache type logic after 97c187da3c
The setting of the default format of Raster_A8 was mistakenly
moved down to below the override of Raster_RGBMask.

Change-Id: I52ee19180471c6f5c8d6824ee35f8d39632c9d94
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-17 16:44:39 +01:00
Konstantin Ritt
8e57ad1a27 Respect the QTextBlock's character formats in itemization
This fixes regression introduced in f864bdaf59
(in resolveAdditionalFormats(), formatIndex(si) returned an invalid
block format index due to non-empty specialData->resolvedFormats)

Task-number: QTBUG-36759

Change-Id: I4da13d2edaf1987bcd85b2ef326e9d22345eb8f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-17 16:43:58 +01:00
Giuseppe D'Angelo
ba56beaea4 Docs: properly tag QtAlgorithms functions as deprecated
Turns out that \obsolete means "Qt3Support", while the correct tag
is \deprecated.

Change-Id: Id9896893f3078a0d516bd8751bce0b2df441509d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-17 15:37:42 +01:00
Frederik Gladhorn
dbafabb019 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/global/qglobal.h

Change-Id: I03d8b6e07135056baaa1d97c3c63fbe8b25583d9
2014-02-17 11:39:16 +01:00
Shawn Rutledge
70f4bf1a48 QPlatformDialogHelper: change ButtonRole flags to ensure 32-bit size
0x80000000 is too big for a signed 32-bit int, so the compiler ends
up choosing a 64-bit number.  Then it will not be the same size as
the parallel enum QDialogButtonBox::ButtonRole, which does not have
these extra flags.  By making EOL be the same as InvalidRole and
changing Reverse to 0x40000000, we don't need to use 0x80000000 at
all, so again the compiler can choose a 32-bit representation
for both if appropriate.  EOL is used as a terminator in the
static const int buttonRoleLayouts table and therefore as a terminator
in arrays returned from QPlatformDialogHelper::buttonLayout().
It's internal API so it's OK to change in a minor release, but
QtQuick.Dialogs is also looking for the EOL now, so we should avoid
changing it again if possible.  This is mainly for efficiency and
for avoiding surprise data type conversions when casting from one
enum to the other.

Change-Id: Ia7b7ce43c8f929d09dd999769e9b7114f695e9a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-17 11:24:40 +01:00
Frederik Gladhorn
8958611fa7 doc: fix grammar
Change-Id: Ic2e5fd40e3d3bd7b42d5fd6492286770ffe244f3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-17 11:17:03 +01:00
Sergio Ahumada
f5f00e69a0 tst_qfont: Fix small typo
Change-Id: I7e007202b0cc80a1808831ebcf46ae7ec0866828
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-17 10:40:33 +01:00
Fabian Bumberger
00b96399e6 [QNX] Don't deactivate windows focus
When the focus changes, screen sends a focus deactivated change for the focus window.
Depending on the order, this might deactivate the window focus completely. This
for example leads to problems with QComboBox.

Change-Id: Ia57f061a765c1f971d86d941b17f573ce9221ae1
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-02-16 20:21:59 +01:00
Fabian Bumberger
0827f0bd66 Refactor the handling of the navigator swipe down event
The navigator swipe down event is not mapped to a platform panel event any more.
Instead the NavigatorEventHandler is exposed through the QPlatformNativeInterface.

Change-Id: I6d29bba011849da5210f6f4d595e3c2e0c021449
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-02-16 20:21:43 +01:00
Richard J. Moore
ddbbf2b4a7 Increase the number of concurrent DNS lookups.
Modern websites use around 15 hosts on average so the limit of 5 DNS
looks meant that most non-trivial sites have to wait for at least one
unneeded round trip.

Task-number: QTBUG-30866
Change-Id: I584dd46c247e0413b2ed88dd66f111cff08ff987
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-16 19:14:59 +01:00
Lars Knoll
6de515aea2 Remove a not required whitespace when writing JSON in compact format
Task-number: QTBUG-36682

Change-Id: I0c1c0de850504c8dff20a5ae724cc868d9f983f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-16 16:56:10 +01:00
hjk
9de2853a94 Remove automated generation of dwarf index
The index is only helpful if the version of GDB to
create it uses the same version as the GDB version
that consumes it. Outside the "local development"
scenario this happens only by conincidence, still
we add ~3.6% to the debug library size and face
maintenance issues like QTBUG-34950.

We also don't see the same performance benefit anymore
with recent versions as we did when the feature was
added, so it's best to not create the index anymore.

People who need it, still can add it manually, or
by the 'gdb-add-index' tool that comes with recent
versions of GDB, or trust their distributors to
set up indexes matching their runtime environment.

Task-number: QTBUG-34950
Change-Id: Id4c79fa51fea9622b0891bd9b9b395b948ecb157
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-02-16 15:41:30 +01:00
Mandeep Sandhu
62f01d581b QDnsLookup: Add support for custom DNS server
Implemented the use of the new QDnsLookup property "nameserver".

On the Linux platform, we can specify both IPv4 and IPv6 addresses
for the nameserver.

On Windows since we are using DnsQuery_W(), which does not have a
way of accepting IPv6 addresses, passing IPv6 nameserver address
is not supported.

On OSX/BSD platforms, specifying IPv6 addresses for nameserver
require access to the __res_state_ext structure which is in a
private header of libresolv (this header is different for BSDs and
OSX). If this feature has to be enabled in the future, we have to
figure out a way to access this struct by either accessing the
private header or by specifying one of our own. Currently, I'm
disabling it till such a solution is arrived at.

Nameserver support on different platforms:

  Platform   |      IPv4     |     IPv6
-------------+---------------+---------------
  Linux/X11  |   supported   |  supported
-------------+---------------+---------------
  Windows    |   supported   |  not supported
-------------+---------------+---------------
  OSX        |   supported   |  not supported
-------------+---------------+---------------
  WinRT      | not supported |  not supported
-------------+---------------+---------------
  Others     |   supported   |  not supported
             |  (not tested) |
-------------+---------------+---------------

Task-number: QTBUG-30166
Change-Id: Iedbddf15b9a62738ce4c2cfa0fce051514d64766
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-16 11:46:20 +01:00
Jørgen Lind
44ee7984fc QOpenGLTextureBlitter: fix source rect when origin is top left
This fixes the issue that the blitter required sometimes the
texture wrapping to be repeat

Change-Id: I86150d008422facf9040873b0983b0e44be9ad24
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-16 11:06:40 +01:00
Jørgen Lind
937a4f5443 QOpenGLTextureBlitter: Remove Origin location for the Target rect
The Origin for Target rect was deemed a confusing concept. The current
implementation would translate the target rect to the coordinate system
specified. However, the order and "direction" of the vertices would
always be the same. So drawing a texture in for one target rect defined in
one coordinate system would paint the texture the same way as it would
when a texture was drawn for a target rect drawn in the "opposite"
coordinate system. The point with this was that if you wanted to "flip"
the texture you would specify that with the source coordinate system.

However, this approach breaks on different levels, such as QRect has functions
which expects a top left coordinate system (ie. top() and bottom()).

In the end Qt uses a top left coordinate system, hence QWindow specifies
a top left coordinate system, and hence the api becomes easier if it is
not possible to define the coordinate system of the target viewport.

Change-Id: I7dd59b3718380876e87a4bff88381d7a1c7d58c1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-16 11:06:19 +01:00
Jørgen Lind
6fbef080a0 QOpenGLTextureBlitter: add some autotests
Change-Id: I07a4847a19908c1a6d7fb02649b306dfa0148f49
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-16 11:06:00 +01:00
Thiago Macieira
579526cfec Make the printing of complex Unicode in a QString prettier
This also has the advantage of not requiring the use of the locale
codec. Quite an advantage if you're debugging the locale codec. But it's
mostly so that we don't get question marks that hide the difference we
were trying to locate.

[ChangeLog][QtTest] QtTest now prints an escaped version of QStrings
that failed to compare with QCOMPARE. That is, instead of converting
non-printable characters to question marks, QtTest will print the
Unicode representation of the character in question.

Change-Id: I44c1ef3246b188c913dacd3ca4df02581356ea41
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-16 06:54:18 +01:00
Thiago Macieira
19c7098251 Add the rest of the non-volatile members of std::atomic to QBasicAtomic
[ChangeLog][QtCore][Atomic support]Added more operations to the atomic
classes, including operator T(), operator=(T), operator++,
operator--. For the QAtomicInteger, bit-manipulation operations are
also provided, both in operator and in fetchAndXxxYyyyyy modes.

Change-Id: I39c07be74e15e0a48f9e931f4342b182004dee1a
Reviewed-by: David Faure <david.faure@kdab.com>
2014-02-16 05:12:47 +01:00
Thiago Macieira
634f82f1f1 Add a testAndSet overload to the atomics that returns the current value
This is extremely useful, since the most common action after a failed
compare-and-swap is to loop around, trying again with the current
value as found in memory.

Code currently written as:
    do {
        Type value = atomic.load();
        ...
    } while (!atomic.testAndSetRelaxed(value, desired));

Becomes:
    Type value = atomic.load();
    do {
        ...
    } while (!atomic.testAndSetRelaxed(value, desired, value));

In most CPU architectures, the value that was found in memory is known
to the compare-and-swap code, so this is more efficient than the
previous code. In architectures where the value is not known, the new
code is no worse than before.

The implementation sometimes modified an existing function, sometimes
it added a new one, depending on whether more registers were needed in
the assembly (like ARMv6-7), the code became more complex (ARMv5), the
optimizer failed (C++11), or it was just plain equivalent (MIPS).

Change-Id: I7d6d200ea9746ec8978a0c1e1969dbc3580b9285
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-16 05:12:26 +01:00
Thiago Macieira
fb30a3dd7c Initial support for the Intel Compiler 14.0 on OS X
ICC 8 and 9 are positively ancient. I doubt anyone is using them for
Qt, let alone Qt 5. ICC 11 through 13 haven't supported OS X.

ICC now masquerades as Clang, so we need to let qmake and
qcompilerdetection.h know about it.

Change-Id: If0d2bd8b6a4a45250c15c9472c062effc76f17de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-16 05:12:09 +01:00
Thiago Macieira
0da7a4c4af Work around ICC 14 bug: __attribute__((deprecated)) with text
Apparently it doesn't like the text.

Change-Id: If8e14df84f0d9915018eac94df16bf1b679155e0
Reviewed-by: Keith Gardner <kreios4004@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-16 05:12:06 +01:00
Thiago Macieira
1e43b64a7a Centralize the merging toFloat conversions
The QByteArray version was missing the overflow check that the other
versions had.

Change-Id: I03cd92e5e5a84c038bee1f1ee217e93e9d9a675a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-16 05:11:18 +01:00
Marc Mutz
c0791ac76e Add qHash() overloads for floating-point types
This implementation is based on GCC's implementation of std::hash<FP>, but only
to the extent of checking for zero before hashing the bits. The bit hasher is
the Qt one; I didn't even look what GCC uses.

The check against 0.0 is mandated by the requirement to have
  \forall x,y: x == y => qHash(x) == qHash(y)
which would be violated for x = 0.0 and y = -0.0 if we only hashed the bits.

Implemented out-of-line to avoid potential FP-comparison warnings, as well
as to be able to use the file-static hash() functions, which gets inlined
unlike qHashBits(), which cannot be.

[ChangeLog][QtCore][QHash/QSet] Allowed to use float, double and long double
as QHash/QSet keys.

Change-Id: I38cec4afb860f17e9f8be7b67544e58b330f8fff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-16 00:18:32 +01:00
Marc Mutz
d24cceebf2 QFont: add missing qHash overload
The properties that make up the hash value are chosen to be the same as those
that make up QFontDef's op<() and op==(). Indeed, the implementation for QFont
simply delegates to the one of QFontDef, which has been added for this purpose,
but may prove useful in its own right down the line.

The code would greatly benefit from a qHash(qreal) implementation. Lacking
this, the patch uses multiplication with 10000 and qRound64() to convert
the one floating-point property used in the hash to an integer. This is
probably the right thing to do anyway, to avoid epsilon problems.

[ChangeLog][QtGui][QFont] Added qHash overload for this class.

[ChangeLog][QtCore][QHash] Allowed QFont to be used as a key in QHash/QSet.

Change-Id: I2c1cb5d9da53e26cb2c0f1a7c357731e73eea78e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-16 00:18:32 +01:00
Marc Mutz
6afc34a72f tst_qsignalblocker: simplify test
This test can assume that the QObject::signalsBlocked property works as
advertized, so just check signalsBlocked() in repsonse to QSignalBlocker
manipulations.

Change-Id: I99e4ef9c4ed05c3840233d92a587636d2d78f59a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-02-16 00:18:32 +01:00
Eskil Abrahamsen Blomfeldt
8d721b3c56 Android: Add enablers for listening to activity results
When you launch an activity through an intent,
data can be provided back from the activity when it has finished
using onActivityResult() in the activity which launched it.

This is okay for applications, since they can easily create their
own activities, but does not work for libraries that need to
use intents. There is no listener API for activity results which
allow external classes to eavesdrop.

In order to support launching intents from third-party or add-on
libraries, we provide a low-level way to hook into the activity
result event. The corresponding public API will be added to
QtAndroidExtras.

Change-Id: I89417f485e2c0e69028dcccc7c155788346a7417
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-02-15 22:25:36 +01:00
Kai Koehne
c9cdbcb12f Add const overload for QLoggingCategory::operator()()
Change 85e57653 caused a compile error for code that does

  Q_DECLARE_LOGGING_CATEGORY(cat);
  //..
  qCDebug(cat()) << // ...

error: C3848: expression having type 'const QLoggingCategory' would lose
some const-volatile qualifiers in order to call 'QLoggingCategory
&QLoggingCategory::operator ()(void)'

This is a regression from Qt 5.2. Fix the error by adding a const version
of operator()().

Change-Id: I2fb04f2e155962adee0f98089fc5a159000bef56
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-15 21:57:43 +01:00
Friedemann Kleint
0bb6b65c56 Exclude widgets without associated QWindow in QApplication::shouldQuit().
Task-number: QTBUG-35986

Change-Id: Ibeb425fe054af163b86b2142028b3ea744cb9820
Reviewed-by: David Faure <david.faure@kdab.com>
2014-02-15 21:15:35 +01:00
Kai Koehne
7d86eeb9d2 Revert "Logging: Don't use for loop in qCDebug macros"
The use of if {} else {} in the macro causes compiler warnings
about "ambiguous 'else'" if qCDebug is used in an if / else without brackets.

Revert to the for loop, but make the variable name less likely
to clash.

This reverts commit bab5f5873680aa3c5a22d94da112aafd2b0b53d3.

Task-number: QTBUG-36605
Change-Id: Ie4b075b63b83b7f8a2ad61437b7bf3e6a6c0177a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-15 21:15:26 +01:00
Oliver Wolff
553c6416bb WinRT: Added socket engine implementation
Added basic functionality to socket for WinRT. Even though not
all auto tests pass yet, this patch can be seen as a foundation
for upcoming work in this area. Reading from and writing to TCP
socket works and one can listen for tcp connections.

Change-Id: Id4c25ba1c7187ed92b6368c785c4f62837faded7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-02-15 10:50:12 +01:00