Commit Graph

23552 Commits

Author SHA1 Message Date
Marc Mutz
1d8b6597a3 QGraphicsWidget: micro-optimization
Pass a temporary QVector instead of a named variable. Apart from less function
calls, it also makes the code C++11-ready (enables move semantics).

Change-Id: Ia7d3bed8aeae48453f96dc3c979f7ae394a5a26d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-30 15:01:10 +00:00
Marc Mutz
5335e6a558 QWidget{Text,Line}Control: reserve() a vector
Reduces reallocation overhead.

Change-Id: Ibbb5d6257f78e7f9668b8c7f17aa498f6d4994d3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-05-30 15:00:40 +00:00
Sérgio Martins
88875becb7 QStateMachine: Use QSet::intersects() instead of QSet::intersect()
It's much faster.

Change-Id: I2b5024259cfa993775aafea56a898d5d15eed347
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-30 15:00:00 +00:00
Marc Mutz
87d57d1994 Fix users of QTextLayout::additionalFormats to use the new API
QTextLayout::additionalFormats setters and getters using QList<FormatRange> have
been deprecated; port to the QVector versions.

Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp
to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find
it otherwise.

Change-Id: Ibab6589df057f02377d895079b56395859e3401e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-05-30 10:56:24 +00:00
Sérgio Martins
9eff0dd19d QSet: Introduce intersects().
The pattern "mySet.intersect(other).isEmpty()" has been spotted in
the wild and in Qt codebase. intersects() is much cheaper because it
bails out as soon as we find one common item and doesn't do any
allocations.

[ChangeLog][QtCore][QSet] Added intersects().

Change-Id: I44a350dc4cdb9deb835a23eee99fc99d6ca24c82
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-30 07:15:24 +00:00
Sérgio Martins
fda08f3971 QHash: Add a findNode() overload that doesn't calculate hash
Needed for QSet::intersects() for optimization purposes. No need
to calculate the hash when we already have it.

Change-Id: I247602bb0558ca8d1fb8333de9d5f339146c576d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-30 07:15:12 +00:00
Richard J. Moore
21ec751cdc Remove unsafe random seeding fallback path.
OpenSSL should automatically seed the random number generator, and the
current fallback code does not offer strong guarantees. It should
never actually be used, so let's remove it entirely.

Change-Id: I9a0a70345fe8df5913871bcac644623b687aea01
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2015-05-29 21:34:29 +00:00
Simon Hausmann
aff3f7f767 Fix QIODevice::errorString() and other places where we expose errno
Commit e486d69133 changed the behavior of
QString::fromLocal8Bit(const QByteArray &) to preserve embedded null
characters. The embedded null character from qt_error_string()'s buffer is not
something we want to preserve, it is merely a safe guard. Therefore let's strip
it away.

Change-Id: Iceac91551f51a1036a942ff30d246baea7a6fd7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-29 14:47:58 +00:00
Marc Mutz
c0ddd5fa12 QTextLayout: replace a use of an inefficient QList with QVector
The QTextLayout::FormatRange is larger than void* and thus should not be held in
QList. Use a QVector instead.

Other parts of Qt already hold FormatRanges in QVectors, so this also makes
handling FormatRanges more consistent.

To avoid ugly names for the getter which doesn't overload on return type alone),
rename the set of function to format (from additionalFormats).

[ChangeLog][QtGui][QTextLayout] Added QVector-based alternatives setFormat(),
format(), and clearFormat() to setAdditionalFormats(), additionalFormats(),
and clearAdditionalFormats(), resp.

Change-Id: Ie04a561b43c91c3b2befb3cac2981821f84d5f77
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-29 14:00:10 +00:00
Sérgio Martins
db54498fd1 Mark two member functions const
Change-Id: I42266689ccac2d0234eb0b047d2dc949e6f59196
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-29 08:05:33 +00:00
Alex Trotsenko
ac4b28ce4d QRingBuffer: merge indexOf() overloads
Change-Id: Icfed4a29bc2ac95b3e0300eb4579751fe7e57e77
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-28 13:45:47 +00:00
Tor Arne Vestbø
5471413522 Add shared implementation of a NSAutoreleasePool wrapper to qglobal
We have at least 5 different (but equal) implementations of a wrapper
in Qt, and some code uses explicit NSAutoreleasePools. Having a shared
implementation lets us clean up things a bit and makes it easier to
reason about which pools are actually needed.

Change-Id: I2fd8eefc3ae7308595ef9899b7820206268362a5
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-27 18:45:29 +00:00
Tobias Koenig
5f21aa22fb Haiku: Fix reported geometry of platform window
Report the proper window geometry and adapt the
geometry parameters of expose events to be relative
to the window coordinate system.

Change-Id: Ifb32b2663fdf41df0c9783e76e0ebc5e5cf978a3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-05-27 08:41:25 +00:00
Sérgio Martins
6764e1b646 QStandardPaths: Use QDir::listSeparator() instead of ifdefs
Change-Id: I1783ce7bcbaabb4920166440e2ed0b41d6daa7aa
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-27 08:07:15 +00:00
Sérgio Martins
35175b8fa5 Introduce QDir::listSeparator()
Qt should help abstract such platform differences.
This ifdef is proliferating in user code (seen a few times
in KDE) and even in Qt code (qstandardpaths.cpp).

[ChangeLog][QtCore][QDir] Added listSeparator().

Change-Id: Icad082a51c8efd5d63f7af9bbaedbe4bc15b8937
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-27 08:07:09 +00:00
Marc Mutz
16b95b65a6 Q*GlyphCache: de-inline dtor and export vtable
The destructor is the first virtual method. By not defining it
out-of-line, we provoke multiple copies of vtables, not all of
which can be merged by the linker. If the linker fails, RTTI
such as dynamic_cast and catch-blocks involving the type will
not work.

Additionally, QFontEngineGlyphCache was not exported, and
therefore also not its vtable, making it impossible for
users outside of QtGui to get a unique RTTI for the class.

Change-Id: Ib265945934216bb609629431eb4c71996d4fd39d
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-26 17:51:47 +00:00
Marc Mutz
10d53a3f0e Add qHash(QKeySequence)
Key sequences can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtGui][QKeySequence] Added qHash(QKeySequence).

Change-Id: I3cf896292459897d66198d96dfcdba1a39bdafce
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-05-26 17:51:42 +00:00
Giuseppe D'Angelo
d1de6c521e QVector: add const first/last getters
Convenience to avoid annoying detaching (instead of using at()),
especially on temporary vectors (returned by functions or so).

[ChangeLog][QtCore][QVector] Added the convenience constFirst
and constLast functions.

Change-Id: If61b1f0096f6a7a1c9074340e237cc2376ce3d18
Task-number: QTBUG-46026
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-26 15:21:21 +00:00
Alex Trotsenko
ee336c2096 QAbstractSocket: remove unused member
Change-Id: I0fa3d9e1b00f38a1b04dddd09ec8c04199ad1f34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-05-26 10:14:43 +00:00
Alexander Volkov
59cc316620 Allow horizontal scrolling with a mouse wheel for QListView
Convert vertical wheel events to horizontal for two cases of
the items layout when vertical scrolling is impossible:
1) TopToBottom flow with wrapping
2) LeftToRight flow without wrapping

Do it only for pure vertical events to avoid a mess for such
devices as touchpads or Apple Mouse.

[ChangeLog][QtWidgets][Important Behavior Changes] Allow
horizontal scrolling with a vertical mouse wheel for QListView.

Task-number: QTBUG-37007
Change-Id: Ie2525153fa7b443d27ca08cc5f5d4d7ecdb8c183
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-05-26 08:04:57 +00:00
Sérgio Martins
8458b4054a QWidgetWindow: Avoid using global static non-trivial type.
Don't initialize it before main, instead, do it whenever
QWidgetWindow::handleTabletEvent() is called, which is seldomly.

Change-Id: I16935e223d4f9879257e7be026fee0215b9dde22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-25 08:12:52 +00:00
Tor Arne Vestbø
decd18536c Ensure that CONFIG += plugin_bundle will create Mach-O bundles on OSX/iOS
The makespec inits QMAKE_LFLAGS_PLUGIN to the same as QMAKE_LFLAGS_SHLIB,
which will create a dynamic library by passing -dynamiclib. The advantage of
creating a proper bundle (MH_BUNDLE) instead of a dynamic library (MH_DYLIB)
is that bundles can be unloaded completely by the host application.

Change-Id: I03b39b704c09213f40a4cb84f5794bf6b3669fc0
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-05-24 11:46:14 +00:00
Tor Arne Vestbø
34adfc1372 qmake: Place Info.plist in correct location for plugin bundles
Like application bundles on OSX, the plugin bundle has its Info.plist
in the Contents directory.

Change-Id: I216fa79857924beb0e9c5fcc4a8d06b197a3f383
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-24 11:46:07 +00:00
Tor Arne Vestbø
5926d7422e iOS: Clean up style in Objective-C message signatures
- Space between class/instance signifier
 - No space between return type and message name
 - No space in message arguments

Change-Id: Ie25e0be3c134586c44bb82bf7075f6eb153388a9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-05-24 11:45:56 +00:00
Lars Knoll
66050f2ac8 Make event delivery from testlib synchronous
Directly process events delivered from testlib in QGuiApplication. The
old code put these events into the QPA event queue leading to race
conditions with plugins delivering native events from a secondary
thread.

Change-Id: I5646b1014f681593d487c9d1e65053ba06206411
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-23 11:38:24 +00:00
Lars Knoll
b0992b5998 Fix autotest on xcb and make it significant again
Change-Id: Ia7c0fb715a66b8d865481a73e16dcd0d3bdf4988
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-23 11:38:18 +00:00
Lars Knoll
cf5f961064 stabilize qwidget autotest
These changes are required to make event delivery from
test lib synchronous.

Change-Id: I8f7093a2bfe01dfa1b0315620d672e7346a7a23a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-23 11:38:10 +00:00
Marc Mutz
b5af68d978 Make QSystemError const-correct
Change-Id: I8688d6ebd9c4773136e2303cddf96ad997b0cfae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-23 04:14:34 +00:00
Lars Knoll
35a161212c Fix blacklisting
The test fails on all ubuntu versions, not only 14.04 as far
as I can tell.

Change-Id: I1e204f68bbb791eef25338f0ed007942a2eb22ff
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-22 17:51:37 +00:00
Lars Knoll
c200ef633e Fix table view test
The resizeColumnsToContents test would fail on some machines, as the
requested 40 pixels where to small to accommodate the header size hint
as well. Raising it to 60 pixels helps make the test pass.

Change-Id: I2a5026fd18425e236849a1cef25ba8d899c7ae5a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-22 17:51:31 +00:00
Kai Uwe Broulik
05cd8d3bfe qiosintegration: Set PasswordMaskDelay
This may introduce a privacy issue, however, there does not seem to be a
way to disable this behavior on iOS - there would probably be a setting
if they considered that an issue - so we might as well do the same.

Change-Id: I7a5a6552c36d69b98064b50875562f586b10c0ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-22 12:51:23 +00:00
Shawn Rutledge
01d78ba86a Android: generate QTabletEvents for stylus devices such as the S Pen
For example the Galaxy Note series of devices.  This makes possible
drawing applications which handle stylus events differently from touch
or mouse.  As on any other platform, if the application does not accept
the QTabletEvent, a QMouseEvent will be synthesized.
Also fix the tablet manual test to show larger circles on hidpi devices.

[ChangeLog][Android] stylus devices such as the S Pen generate
QTabletEvents

Task-number: QTBUG-38379
Change-Id: Ib594f453b8403cc06aa4e440a76f07afa3bac38c
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-05-21 05:17:38 +00:00
Alex Trotsenko
e227b8ecf6 Deinline QRingBuffer class
Reduce the size of .text section in QtCore by 4.5KB and in QtNetwork
by 26.5KB.

Change-Id: If7998776166b9681c1e4b24c51d40444aa996d7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-20 13:49:00 +00:00
Friedemann Kleint
f81dda39dd Manual touch test: Draw touch points.
Draw touch points as dots and mouse points as circles
to be able to verify High DPI scaling.

Change-Id: I2293adbcc726391f0d9e156935d609b957432029
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-05-19 11:05:41 +00:00
Tor Arne Vestbø
e124ad54b8 Allow RESOURCES to contain standalone files and collections of files
Standalone files are added by using RESOURCES += file.txt, while
collections of files are defined as collection.files = f1.txt f2.txt
and then added using RESOURCES += collection. For collections a prefix
can also be set using collection.prefix = /foo. The standalone files
are not prefixed.

Change-Id: I8236808238414da05e744f799a1bb15a72f4a46f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-05-18 15:49:56 +00:00
David Schulz
59840faacf Respecting correct text interaction flags when setting text cursor.
Currently the text cursor is hidden when a cursor was set using
setTextCursor on a widget with a widget text control and the interaction
flag TextSelectableByKeyboard. The documentation indicates that this is
incorrect behavior.

Change-Id: I624a470617f15d09f5772213016e552a5149424c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-18 05:55:27 +00:00
Marc Mutz
ea92ee8e15 QList: partially revert ab8366b592
That commit removed the user-defined copy constructors,
under the assumption that this would be ok for these
non-exported classes. But the change is still BiC,
because it turns the iterators into trivial types,
which changes the way they are passed into functions
by value.

So, delay the change until Qt 6.

Change-Id: I8065ff1ff78f5722505328447f2496777d1e8957
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-17 09:12:37 +00:00
Timo Jyrinki
03281150b9 Add environment variable support for testability library use.
Add the option to load the testability library based on whether
an environment variable QT_LOAD_TESTABILITY is set, in addition
to the current "-testability" flag.

This improves the use of testability library together with the
autopilot functional testing tool.

Task-number: QTBUG-32974
Change-Id: I6abf2c004cbff2ce0aff44e24a99bcc8188a52ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-15 11:47:21 +00:00
Frederik Gladhorn
ec93ea4a6f Fix building tst_QPluginLoader on OS X, non-devel builds
QMachOParser is defined in the private header that only gets included in
developer-builds. Thus ifdef its usage out, not just the header
inclusion.

Change-Id: I1e0059787be6eb70bd1661c7814e69eee7c5b2ee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-13 06:15:28 +00:00
Alexander Volkov
77e0090995 QMouseEvent: add constructor which takes the source as a parameter
Simplify the code by passing the source of a mouse event
directly to the constructor instead of setting it by
QGuiApplicationPrivate::setMouseEventSource().

Change-Id: I1774cf39a211d36d3adf0ff30f3bd2fb7c5fb429
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-05-12 10:17:40 +00:00
Olivier Goffart
ac1b6c0145 Add QMainWindow::GroupedDragging DockOption
If this setting is enabled, the entire group of docked tabs will
be draggable by the title bar of the group and and individual dock
can be dragged by dragging the tab.

When tabs are detached, the docks that are contained are reparented to
a QDockWidgetGroupWindow.

[ChangeLog][QtWidgets][QMainWindow] Added GroupedDragging as a DockOption
which allow users to drag all the tabs together when dragging the
title of a QDockWidget which is tabbed with others.

Change-Id: I5285685b129770498eb3e4fd5f4556e41225a595
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-05-12 10:07:20 +00:00
Bjoern Breitmeyer
84be950e98 Fixing the build of the SIMD support for WEC2013.
Change-Id: Ib0dd8d34f0a5d68acb1efbc37680165e7d7933bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Roth
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-12 09:10:46 +00:00
Giulio Camuffo
1f03520a20 Add a way to filter window system events
This change introduces the class QWindowSystemEventHandler
which can be used to hook into QWindowSystemInterfacePrivate to
filter and dispatch window system events.
One use case is to intercept key events from the underlying system
in QtCompositor and feed them into the xkbcommon state, and to modify
the events based on the resulting state.

Change-Id: I829eb7d960420135990fb0f6db54c14eea3e8e48
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-05-12 07:17:25 +00:00
Martin Smith
5891f90846 qdoc: Update documentation of \qmlabstract
The \qmlabstract command was missing from the qdoc user manual, and
qdoc was still allowing the \abstract command to be used for marking
up the abstract of a scientific paper. The \abstract command is now
made a synonym of \qmlabstract, and they are both added to the qdoc
user manual.

Change-Id: I003ac50b8dabbf037f18d9ea3e6d88a12d69bf5f
Task-number: QTBUG-46003
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-05-12 05:57:33 +00:00
Alex Trotsenko
ada8f1985d Check the maximum size of a QByteArray more precisely
Also document that the QByteArrray::MaxSize takes a trailing '\0' into
account.

Change-Id: I89e9a0d1a80a49b33efbac16ff7aa2a98f0e5670
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-11 07:32:40 +00:00
Olivier Goffart
bf06924f3f Documentation: Show an example for each overloaded signal
The new connection syntax is a bit tricky to use, when the signal or
the slot is overloaded, because one must explicitly cast to the
correct signal type.

This patch adds an example to the documentation of each overloaded
signal. The example shows how to do the cast to the correct signal
type.

Change-Id: Ifc9f28d05c2ae126a674d2ca5887935fc59cd83b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-10 08:06:45 +00:00
Friedemann Kleint
82c3e9edc2 Manual QScreen test: capture screen changes.
- Make the subject of the Property watcher settable.
- Embed it into a QMainWindow with menu and
  listen to the screen changed event, setting
  the new screen with a message about the position.
- Remove hash, close obsolete windows by iterating
  over the top levels looking for the screen.

Change-Id: I4ed1122bab7c0cd9676d63995ce85a44719f4ba6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-05-07 13:04:41 +00:00
David Faure
cd90182e67 QStandardItem: add user-tristate and auto-tristate getters/setters
and deprecate isTristate()/setTristate() which isn't specific enough.

This matches the changes to the flags themselves.

Change-Id: I0ba592af340cb81fc9f4d483569844fe8d7510c3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-05-07 09:50:59 +00:00
David Faure
ae8406d82f Deprecate ItemIsTristate in favor of ItemIsAutoTristate.
This makes the behavior much more clear. You can get a tristate checkbox
just by setting the CheckStateRole to PartiallyChecked, no tristate flag needed.

The flag, on the other hand, enables the automatic-tristate behavior in
QTreeViews (and only there), hence the new name for it.

Change-Id: I18d292a8b8294c863eab806f3874d15dfb72556c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-05-07 09:14:18 +00:00
Marc Mutz
87155a8d65 Add qHash(QRegExp) and qHash(QRegularExpression)
QReg*Exp*s can be compared for equality,
so qHash should be overloaded, too.

There was a (poor) private implementation of qHash(QRegExpEngineKey)
already, which has now been replaced with a better one (the old one
didn't take into account all the fields that make up equality,
producing unnecessary collisions).

[ChangeLog][QtCore][QRegExp] Added qHash(QRegExp).
[ChangeLog][QtCore][QRegularExpression] Added qHash(QRegularExpression).

Change-Id: I1d22fbcc0508018a3f94b4c24571b13ba6e07df2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-05-05 13:59:31 +00:00