Commit Graph

5951 Commits

Author SHA1 Message Date
Olivier Goffart
7f85fb4654 Allow types with a comma in Q_PROPERTY
This allows for example properties with QMap<Foo, Bar>

[ChangeLog][QtCore] Types in the Q_PROPERTY macro can now contain commas
(for example, QMap<Foo, Bar>)

Change-Id: Ibf5c8c9cf20a7c8b3dfec9e891fb8a9ca1bdba7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-12 11:36:32 +00:00
Marc Mutz
e593891b15 Add qHash(QSizePolicy)
Size policies can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtWidgets][QSizePolicy] Added qHash(QSizePolicy).

Change-Id: Id219f47ac6cb236efdd73cad7b892c8efd034d5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-06-12 07:48:24 +00:00
Friedemann Kleint
d0f64542c8 Output registered enumeration names in QCOMPARE.
Produces output:

FAIL!  : tst_qquickwindow::cursor() Compared values are not the same
   Actual   (clippedItem.cursor().shape()): ForbiddenCursor
   Expected (Qt::ArrowCursor)             : ArrowCursor
   Loc: [tst_qquickwindow.cpp(1465)]

Change-Id: I8a9dfa099a6011cbe0c07da683d4be3d07e22d5d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-06-12 07:48:22 +00:00
Ivan Komissarov
9a029c9de4 Fix sizes QStorageInfo returns for invalid drives
Zero is a legitimate size to be returned by bytesFree/bytesAvailable
functions, so change those functions to return some 'invalid' size
in case of an invalid drive.
This is also consistent with the original version from the Qt Systems
framework.

[ChangeLog][QtCore][QStorageInfo] Fixed sizes returned for invalid drives.

Task-number: QTBUG-45724
Change-Id: I312fba521fdf8d52d7a0ac0e46cacca625775e80
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-11 16:13:49 +00:00
Friedemann Kleint
56d62345ad Fix less-than comparison for QStandardItem and QSortFilterProxyModel with invalid data.
Previously, QStandardItem::operator<() returned true when both
items had invalid data. With MSVC in debug mode (checked
iterators/STL), this triggered an assert in
tst_QStandardItem::sortChildren() since that verifies
that !(b < a) when a < b:

Debug Assertion Failed!
Line: 3006
Expression: invalid operator<

Introduce a stable sort order for invalid items such that
other items are always less than invalid items and comparing
invalid items returns false (indicating equivalence).

Change-Id: Ica0f0d9f001c86973b1941dbcc1faf282e4c47df
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-11 13:29:23 +00:00
Friedemann Kleint
0b8cb39d34 Diaglib: Output window/widget state(s).
Change-Id: I0f27027c95ed70a0b2992c58df7e12eddfad17e3
Task-number: QTBUG-46416
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-11 07:55:08 +00:00
Giuseppe D'Angelo
92cda94742 QSslSocket: move default cipher, EC and default CA APIs to QSslConfiguration
QSslConfiguration is better suited for these APIs. The ones
in QSslSocket that already have a counterpart have been deprecated.

[ChangeLog][QtNetwork][SSL/TLS Support] Most of the QSslSocket
functions to deal with ciphersuites, certification authorities
as well as elliptic curves have been deprecated in favor of the
corresponding counterparts in QSslConfiguration.

Task-number: QTBUG-46558
Change-Id: I1de03379efcbcab931c20e876e252769fe4279e0
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2015-06-11 04:18:37 +00:00
Friedemann Kleint
898ce1dcf5 networkselftest: Fix handling of the smbclient process.
When the server could not be reached, the test previously,
produced:

FAIL!  : tst_NetworkSelfTest::smbServer() 'smbclient.waitForFinished(5000)' returned FALSE. ()
-   Loc: [tst_networkselftest.cpp(992)]
QWARN  : tst_NetworkSelfTest::smbServer() QProcess: Destroyed while process ("smbclient") is still running.

Fix this by:
- Using QStandardPaths::findExecutable to locate the binary instead
  of test-wise starting it.
- Add a function to ensure process termination.
- Pass a timeout argument to smbclient and pass an interval
  depending on it to waitForFinished(), which should prevent
  having to kill the process in most cases.
- Add proper error message

Change-Id: I1cbc76ca69aec7d1e0e880685bed54b0ba7f21c7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-10 12:50:12 +00:00
Friedemann Kleint
4fe332f543 Fix leaking of link in tst_QFileInfo::canonicalFilePath().
Give the link a name containing time stamp and ensure
it is deleted.

Change-Id: I846c58095acbcd92e7daccfd43a69dd97e95e7b0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-10 10:06:17 +00:00
Friedemann Kleint
bf440c18bb Fix return value of QWindowsFileSystemWatcherEngine::removePaths().
Previously, the path was removed from list returned (indicating failure
to remove) only when the thread's list was empty
(last file in directory). Move the statement up so that removal
happens when it is found in thread's list.

Task-number: QTBUG-46449
Change-Id: Ib79199c731f79357b0e5c17636254fbeb3a754a0
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2015-06-09 09:50:35 +00:00
Jake Petroules
d0d0ee4ed7 Fix build on 32-bit OS X.
Change-Id: I5f01cb2a5a34a7a2a0c8f0571d50698bd46be733
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-06-09 08:51:10 +00:00
Dmitry Shachnev
657a8cf5be Remove exec bits from files that should not be executable
Change-Id: I66f49c6db82eadc3b11cc9b1cf01375e9596a8e6
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-06-07 22:50:19 +00:00
Friedemann Kleint
eb926dc31f QSwipeGestureRecognizer: Allow for small direction changes.
When trying to do a straight right/left/up/down swipe, a minimal
change in the other direction caused to the gesture to be canceled.
Introduce a threshold for checking such to prevent this.

Task-number: QTBUG-46195
Change-Id: I3e199f2ec0c81d23a16073b1f5b8fff004958239
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-06-07 20:10:12 +00:00
Lars Knoll
19ed646bce Make the test pass on high res mac displays
Change-Id: I05f156faae85abe11edc954dd358ddfcfd320c74
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:30 +00:00
Lars Knoll
83eb09d591 Wait for the window being active before sending it events
Change-Id: I2f5d6e37e630d70c4ba3ae81e807a89c447c8b26
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:25 +00:00
Lars Knoll
3658b62781 Fix the autotest on Mac
Don't hit the scrollbar with the mouse click

Change-Id: Ie82d8c5c058df9a482e7d5de2fe40681572f19ad
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:01:16 +00:00
Lars Knoll
73cc3db4d5 Fix qgraphicswidget::initStyleOption autotest
make sure it'll work with the new mouse handling as well.

Change-Id: Ia2d567e618b77b0fa3532ee6c335cbdf5e496241
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:00:52 +00:00
Lars Knoll
71388c37d2 Clean up the qgraphicsscene autotest
Change-Id: I8950a3eb9792dff90ed64cd3bf1d572745b05886
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-06 12:00:32 +00:00
Friedemann Kleint
d7f15e67f9 Manual touch test: Add gestures.
Add command line options for
- Grabbing gestures
- Suppressing mouse and touch events

Add gesture events to the log.
Add a hierarchy of gesture classes storing the parameters
of finished gestures with drawing functionality and
implement for pan and swipe.

Task-number: QTBUG-46195
Change-Id: I019fe5b60116316a54e11b2c30e1d34f5e72bcf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-06-06 06:26:39 +00:00
Oswald Buddenhagen
d32f47b703 fix usage of wince scope
Fix style issues along the way.

Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-05 10:29:10 +00:00
Simon Hausmann
80bc743406 Fix tst_qglobalstatic on OS X
OS X has an unreasonably low default for the maximum number of open
file descriptors (256). The unit test creates about 200 threads and each
thread in Qt creates at least two file descriptors (pipe), so the test
cannot execute.

Change-Id: I656367bca6d0a40fb1edb8c72914304db0f429ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-04 05:56:16 +00:00
Allan Sandfeld Jensen
f04ed82ca2 Font definitions with different style names are not equal
Since we added font matching by style name, the style name is not just
a derived property and should not be ignored in comparisons.

The QFontDef::exactMatch comparison is left unchanged, since it tests
if a loaded font matches a requested one.

Task-number: QTBUG-30851
Change-Id: I4187c5b993815001f35bcf24dc449059bfdcba6f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-06-03 14:00:07 +00:00
Allan Sandfeld Jensen
8f760808e0 Fix premul conversion from ARGB32 to A2RGB30 formats.
When a premultiplied alpha changes value because it is rounded to fewer
bits the premultiplied colors may need to be recalculated with the new
value. Otherwise the color will both be wrong and potentially invalid.

Change-Id: I9ec74a22aac73cd7ffab04e180cf2bf35bb4c315
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-06-03 12:01:26 +00:00
Simon Hausmann
e2f66f9215 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qwindowspipereader.cpp
	src/corelib/io/qwindowspipereader_p.h
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/plugins/platforms/xcb/qxcbconnection.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/tools/qmake/tst_qmake.cpp
	tests/manual/touch/main.cpp

Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
2015-06-03 10:23:56 +02:00
Simon Hausmann
21674735cc Rename QTextStream::readLine(QString *, qint64) into readLineInto
As discussed on the development mailing list, the new overload is ambiguous
and breaks source compatibility. Therefore this function that is new in 5.5
shall be called readLineInto.

Change-Id: I2aecb8441af4edb72f16d0bc6dabf10cdabf32e2
Reviewed-by: Jan Kundrát <jkt@kde.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-03 04:27:22 +00:00
Friedemann Kleint
cd0bed6d71 Polish and stabilize tst_qtooltip.
- Implement init() and cleanup() to verify that
  no top level widgets are leaked.
- Position widget in tst_QToolTip::task183679() and set
  window title.
- Remove hardcoded wait in tst_QToolTip::whatsThis()
  and use a find function within QTRY_VERIFY().
- Rearrange and clean code a bit.

Change-Id: I0b1ad88444fc9441c1071a2527f75de1f68ea9e5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-02 18:51:25 +00:00
Friedemann Kleint
6fba3c1904 Stabilize tst_qtouchevent.
- Use QTRY_COMPARE() in touchBeginWithGraphicsWidget.
- Change raw event translation tests to wait for the
  window to become active to avoid WM positioning issues.
- Blacklist the raw event translation tests on Linux.

Task-number: QTBUG-46266
Change-Id: I73aae375ee279a518a2a083d0ce8919cce474cb3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-01 13:39:13 +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
Olivier Goffart
71c85c554a moc: Fix crash parsing invalid macro invocation
When invoking a macro with less argument than it expect, we would
crash trying to access the vector of arguments from the invocation
as we are trying to substitute an argument.

(Note that we do not show an error in case of argument mismatch
because ithat might happen parsing valid code as moc's c++ parser
is not 100% accurate (that was QTBUG-29331))

Task-number: QTBUG-46210
Change-Id: I3f08d7f5049e593a5bdc02a594ea63cadf66e7a4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-05-30 08:37:11 +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
Friedemann Kleint
0c5befa129 Reanimate test gui/kernel/qtouchevent/tst_qtouchevent.
Add CONFIG += testcase to the .pro file which was missing.
The test thus was never executed by make check and left to
rot.

Fix up code:
- Remove module includes.
- Introduce explicit constructors taking parent object
  for helper classes, removing calls to setParent().
- Ensure test does not leak objects by converting pointers
  to stack variables or introducing QScopedPointer, verify
  by checking for an empty window list in cleanup().
- Simplify code by removing unneeded variables.
- Split up conditions in QVERIFY().

Fix tests:
- Show windows were required when events are sent to
  QWidget::windowHandle().
- Invert the conditions checking whether touch events are
  accepted by widgets since widgets no longer accept them
  by defaults in Qt 5 after
  e50416066c.
- XFAIL multiPointRawEventTranslationOnTouchPad()
  which started to fail at some point in Qt 5.
- Mark as insignificant on OS X due to crash.

Task-number: QTBUG-46266
Change-Id: I6676d021afb015411a24d97d9b8f7c327d4d3c3f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-29 16:36:48 +00:00
Friedemann Kleint
4964c89540 tst_QDockWidget::restoreDockWidget: Add QSKIP for XCB.
The positioning test has been observed to fail on X11.

Change-Id: I58727126a8742de93ec203e9992a9ae1b454f731
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-29 15:20:00 +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
Timur Pocheptsov
5449589b7c tst_QApplication - quitOnLastWindowClosed (fix for OS X)
Two (?) tests can fail: what they actually try to test is that our application
quits on the second single shot timer (2 s. timeout) and not on the first one
(timeout 1 s.) - on the first timeout we either ignore event, or we still have another
window and should not quit yet, on the second timeout we actually do quit the app.
The test checks this in a quite fragile way, counting the number of timeouts for the third  100 ms
timer. It looks like on OS X (VM-only) there is some delay (~500-600 ms) before we receive the
first timeout so the count is always 14 or less, making the test to fail.

Change-Id: I9e8728e6c956025d91528f4195982767a5d3d320
Task-number: QTBUG-46164
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-05-27 15:26:27 +00:00
Friedemann Kleint
9749ddeb4b Remove test other/baselineexample.
baselineexample.pro is missing CONFIG += testcase, so,
make check succeeds without doing anything. The test seems
to connect to some network server to retrieve baseline images,
but that infrastructure apparently no longer exists.

Change-Id: I98f4fe5ef8a508fda90e408df2781a944eb99a60
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-27 14:11:22 +00:00
Joerg Bornemann
42b7a7c609 Fix crash due to QTreeView accessing deleted model indexes.
QTreeViewPrivate::updateScrollBars depends on a correctly set up
viewItems vector. If a delayed layout is pending, we must call
QTreeViewPrivate::executePostedLayout before accessing any stored model
indices.

Task-number: QTBUG-45697
Change-Id: I55fcbaf81f225b26181c2cf739283740b85dd16a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-27 14:04:41 +00:00
Olivier Goffart
02f6b21bbc QMetaType: Fix compilation with non default constructible Q_GADGET
Do not try to automatically register the meta type for Q_GADGET that
are not default constructible.
This fixes a source incompatibility in the function pointer syntax
of QObject::connect when such types are used as an argument of a signal.

Task-number: QTBUG-45721
Change-Id: I3065f6d57bc1f37e16988d2dee99118de250ca56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-27 10:51:10 +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
Caroline Chao
a8dda3b8b0 Tests: Use blacklist for failing tst_qwidget tests
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The tests blacklisted have been found using CI builds logs.

Change-Id: Iffc9043654a9dcd97d55e262011c8daff6f4e60f
Task-number: QTBUG-25300
Task-number: QTBUG-45502
Task-number: QTBUG-46325
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-05-26 11:59:02 +00:00
Joerg Bornemann
80c8d324b3 take process name into account for QLockFile's pid clash resolution
To cover the situation that the process ID got reused, the current
process name is compared to the name of the process that corresponds
to the process ID from the lock file.
If the process names differ, the lock file is considered stale.

[ChangeLog][QtCore][QLockFile] Detection of stale lock files got more
robust and takes the name of the process that belongs to the stored
PID into account.

Task-number: QTBUG-45497
Change-Id: Ic3c0d7e066435451203e77b9b9ce2d70bfb9c570
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-05-26 11:01:14 +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
Thiago Macieira
bd1f5b268a Make sure we don't call dbus_connection_can_send_type on too old libdbus
This function was introduced alongside the support for Unix file
descriptors, so it's a good indicator of whether Unix FDs are
supported. Ever since dbus_minimal_p.h, however, DBUS_TYPE_UNIX_FD may
be defined even if the system libs don't support it.

In order to fix this issue, I had to fix what was apparently a merge
conflict resolution mistake and remove the #ifdef around the test. Doing
the latter is a good idea due to moc being unable to find <dbus/dbus.h>.

This was tested with both linked and dynamically-loaded libdbus-1.

Task-number: QTBUG-46199
Change-Id: I66a35ce5f88941f29aa6ffff13dfb4b5438613a3
Reviewed-by: Jani Vähäkangas <jani.vahakangas@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-05-26 07:20:35 +00:00
Olivier Goffart
75af24a2d1 QMetaType: Do not automatically register types that derives from a Q_GADGET
Otherwise the type is registered with the wrong name

Change-Id: I68ec3a05e2528816626e648b46ccc9d70b004866
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-23 15:42:51 +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
Friedemann Kleint
06de0da1e8 Make warnings of QIODevice more verbose.
Include class name, object name and file name when available.
For the bug in question:

QIODevice::read: device not open

becomes

QIODevice::read (QTcpSocket, "QFtpDTP Passive state socket"): device not open

Adding a static function also makes it easier to set a breakpoint
and find the culprit.

Task-number: QTBUG-46112
Change-Id: Ic181d8ab292912d1acbcc3cb84d9679fe4842ca0
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-05-23 08:59:20 +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
Simon Hausmann
6a72afa5f7 Blacklist tst_qwindow tests that are failing on Ubuntu 14.04
This should allow us to make the rest of 14.04 enforcing

Change-Id: I37f6751e8b966b047d1bd2e49ba9482e5846acb1
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2015-05-22 14:24:32 +00:00
Friedemann Kleint
9d9450f5f9 Add CONFIG += testcase to test qglobalstatic.
Otherwise, make check does nothing, always succeeding.

Change-Id: I0fe04697e02ab0f33cd9aebb550777e200c70804
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-22 04:37:52 +00:00
Friedemann Kleint
b0a1a134c2 Add debug operator for QTouchDevice.
Produces:
QTouchDevice("", type=TouchScreen, capabilities=Position|Area|NormalizedPosition|MouseEmulation, maximumTouchPoints=10)

Remove operator from manual test.

Change-Id: I6b792665031902d5f822c80807a400a334c27526
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-05-22 04:36:41 +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
Oswald Buddenhagen
8175e31bda remove now redundant tests
the functionality is now covered by the qmakelib test.

Change-Id: Id627f573fb247ff3b86558509e27b6a9862c1a59
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:37 +00:00
Oswald Buddenhagen
5ddc16b5df add qmake evaluator test
Change-Id: I31b95daede5edef245dd1ba447f2937a0db34232
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:34 +00:00
Oswald Buddenhagen
ef50e244cd split parser test initialization
the idea was to speed up optimized msvc compilation, but it didn't help.
still, it's better structured that way.

Change-Id: I4b2108d02a47ef8ef704b0b542b0f281bff20165
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:32 +00:00
Oswald Buddenhagen
48c38aae10 move parser test to a separate file
for better structure.

Change-Id: I16bd1ca245640e92ffe167241a5a565e7a550e1d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:30 +00:00
Oswald Buddenhagen
f37381e292 add autotest for ProString
also adds documentation, which is kind of a sanity test. ehm.

Change-Id: I6b520e8b505a2bfbb1e376fa72be0f140227a3a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:08 +00:00
Oswald Buddenhagen
a3fac53864 add parser tests for use of 'else' after bad conditionals
Change-Id: I9885f629a2f6511574eebd81896a1d9f258e55cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-20 18:11:05 +00:00
Oswald Buddenhagen
79de60f38b silence MSVC warnings about using TS() without parameters
Change-Id: I23264dcabc02b89441fa47c890fc662e9a41f7ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:03 +00:00
Thiago Macieira
9269dcc8ed Fix compilation of QContiguousCache::operator=
freeData() takes a Data*, not a QContiguousCacheData*.

Task-number: QTBUG-45783
Change-Id: I96d7ac38dac24b418138ffff13d7fdf09b1d6b07
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-05-20 17:23:33 +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
Erik Verbruggen
67d255f183 QStateMachine: empty the whole internal queue before external queue
If the internal queue contained multiple events, but the first one did
not select any transitions, the external event queue would be checked
before the remaining events in the internal queue.

Change-Id: I1a7f49afdefaaf2b4330bf13b079b61344385ea0
Task-number: QTBUG-46059
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-19 08:03:46 +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
Olivier Goffart
35a125971c Fix QtPrivate::IsQEnumHelper<void>
Change-Id: I1633ef128212a6b99b66129f13e0b4d5ea46644d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-05-17 09:13:18 +00:00
Timur Pocheptsov
1485c2f3fa tst_QDialog::snapToDefaultButton - tune the test for OS X
QCursor::setPos with Cocoa integration is calling CGEventPost. Some time is required
before the cursor position is really set, so we can not immediately call QCOMPARE.

Change-Id: I83a4c13f06ec151a4b9ab18c83de1eb5247ea9cc
Task-number: QTBUG-45553
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
2015-05-15 09:39:41 +00:00
Caroline Chao
1842322b2b Tests: Remove EXPECT_FAIL in tst_QWidget::widgetAt()
The test is marked as XPASS in CI. This change follow 201bf9e673.

Change-Id: I0938b1417f792aa88fc1b40c08e7cd810e7d22f7
Task-number: QTBUG-22326
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-15 09:33:40 +00:00
Gabriel de Dietrich
629f5a46d5 moc: Generate qt_static_metacall for creatable-only gadgets
Prior to this, moc would not generate the function unless the
gadget class had a property or a non-constructor invokable.

Change-Id: Ic020ea5f8f59702f5e9e194a46e26850e53e5cfe
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-13 12:08:57 +00:00
Gabriel de Dietrich
d6efc6b543 moc: Fix type for gadget's CreateInstance metacall
An error similar to the one below would be emitted
by the compiler on the moc generated file:

error: assigning to 'QObject *' from incompatible type 'Gadget *'
       if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;

Change-Id: I75ae7bd6c46d20db2d47a80eaa08aae302d7d6c8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-05-13 12:08:54 +00:00
Caroline Chao
78a1090821 Tests: Remove tst_QHostInfo::abortHostLookupInDifferentThread() test
This test has been initially blacklisted. However it is racy by design
and cannot be fixed. Removing it.

Change-Id: I6c386a12e54d8a382f17c4fc033428f56eb03f02
Task-number: QTBUG-23837
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-05-13 11:21:14 +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
Allan Sandfeld Jensen
ba323b04cd Optionally apply orientation on QImage read
Make it possible to read images with EXIF orientation automatically
applied. This was originally implemented without opt-out in Qt 5.4, but
reverted. Here it is implemented as opt-in for JPEG, and opt-out for TIFF
to keep behavioral consistency.

The EXIF support for JPEG was written by Rainer Keller.

[ChangeLog][QtGui][Image plugins] An option has been added to
QImageReader to enable automatic application of EXIF orientation.
This behavior was default in Qt 5.4.1, but reverted in Qt 5.4.2.

Task-number: QTBUG-37946
Task-number: QTBUG-43563
Task-number: QTBUG-45552
Task-number: QTBUG-45865
Change-Id: Iaafd2519b63ede66ecc1f8aa4c7118081312b8f5
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-05-12 09:25:11 +00:00
Laszlo Agocs
d33edcfe37 Fix the qscreen manual test for separate X screens
It is fully possible to show a window on all the connected screens
even when the screens are not virtual siblings, i.e. they do not
form one big desktop. When X is configured to use a separate screen
for each physical screen, it becomes essential to do setScreen()
either directly or via QDesktopWidget in case of widgets. The original
code attempting to call QWindow::setScreen() cannot succeed since there
is no QWindow available before the widget is shown. This is easy to
work around.

The app now works identically in all cases.

Change-Id: I519ca0c0109c68aac2f2d4e6972d14b55767b403
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-05-12 08:58:52 +00:00
Christoph Schleifenbaum
52c122e616 Improve QListView scroll bar calculation.
When both scroll bar's policies are set to ScrollBarAsNeeded, make sure
the scroll bars are shown if needed and not show if not. Even the corner
case, where one scroll bar's visibility depends on the other, is handled
properly.

Task-number: QTBUG-45470
Change-Id: I11d6ccf7c0b51644a5ce2d5c3fc59e2e4812755d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
2015-05-10 07:45:23 +00:00
David Faure
cca5cce205 Use ItemIsUserTristate instead of ItemIsTristate in table & list tests.
ItemIsTristate only makes sense in tree widgets, where it triggers the
auto-tristate behavior between parents and children.

Change-Id: Idfa8bb5d0b9c63fe450115fb58d088929e11c7ff
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-05-09 10:01:41 +00:00
David Faure
f1bfc4266b Don't overwrite applicationName if already set.
My commit 6c973dee2c broke the case where setApplicationName
is called before the QCoreApplication constructor.
Fixed and added autotest.

Task-number: QTBUG-45283
Change-Id: If7bdb0d82be50b50a95a04027f5f9d7143c1a7ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-05-09 10:01:33 +00:00
Giuseppe D'Angelo
1ac1ae05f5 QDialogButtonBox: prevent crashes on deletions in slots
As usual, user code connected to signals emitted from Qt may destroy
an object's internal status while a signal is being emitted.

Guard a bit QDialogButtonBox signal emissions to prevent
crashes in case the button or a dialog get deleted from a slot
connected to clicked(). Also, be sure to emit the corresponding
accepted/rejected/etc. signal.

Change-Id: I7b1888070a8f2f56aa60923a17f90fb5efef145c
Task-number: QTBUG-45835
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-05-09 08:41:23 +00:00
Allan Sandfeld Jensen
1fce111809 Merge remote-tracking branch 'origin/5.4' into merge5.5
Conflicts:
	src/corelib/global/qglobal.h
	src/corelib/io/qnoncontiguousbytedevice_p.h
	src/gui/image/qjpeghandler.cpp
	src/network/access/qhttpthreaddelegate_p.h
	tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
	tests/auto/widgets/widgets/qmenubar/BLACKLIST

Change-Id: I01de8c1c28efcedfd7953d05025f54802dc08ab3
2015-05-08 13:26:44 +02:00
Thiago Macieira
3545ef4121 Autotest: Check if this D-Bus library knows about file descriptors
Because if it doesn't, then calling dbus_type_is_fixed or is_basic may
result in a failed assertion.

 process 16304: arguments to dbus_type_is_fixed() were incorrect,
 assertion "_dbus_type_is_valid (typecode) || typecode ==
 DBUS_TYPE_INVALID" failed in file dbus-signature.c line 345.

Change-Id: Idf715b895bac4d56b4afffff13db2ed71b1516a5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-05-08 09:04:23 +00:00
Caroline Chao
201bf9e673 Tests: Remove EXPECT_FAIL in tst_QWidget::widgetAt()
The test is always marked as XPASS in CI.

Change-Id: I629bdec6f038cd8b6208fc4db61c67a9ea003b2e
Task-number: QTBUG-22326
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-05-08 05:33:28 +00:00
Giuseppe D'Angelo
a34e9ebc1b QLineEdit: show the clear button if it gets enabled after setting a text
We were fetching "lastText" too late, and setting the opacity
of the clear button to 0.

Change-Id: I82c2aea7dab4af4424fb57e12f78d07a0374457e
Task-number: QTBUG-45518
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-07 22:24:25 +00:00
Thiago Macieira
36d6eb721e Require -fPIC instead of just -fPIE for -reduce-relocations
GCC 5 combined with a recent binutils have a new optimization that
allows them to generate copy relocations even in -fPIE code. Clang has
the same functionality when compiling an executable with -flto. We need
to let the compilers know that they cannot use copy relocations, so they
need to use really position-independent code.

Position independent code throughout is not really required. We just
need the compilers to use position-independent access to symbols coming
from the Qt libraries, but there's currently no other way of doing that.

Task-number: QTBUG-45755
Change-Id: I0d4913955e3745b69672ffff13db5df7377398c5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-07 19:42:43 +00:00
Allan Sandfeld Jensen
b64e87f2ed Blacklist task256322_highlight on OS X
The test keeps failing. The approach of sending mouse move events is
inherently fragile due to the use of QCursor::setPos and the expectation
that that produces the correct sequence of mouse move events.

Change-Id: I07ec75460b70c27152e8775deffcb77fa9328d0c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-07 19:25:18 +00:00
Erik Verbruggen
eb4bf7df60 QStateMachine: Fix transition ordering.
When there are conflicting transitions, a transition that is nested
deeper (i.e. more specific) has priority. If two transitions have the
same nesting level, the one that comes first in the document order gets
priority.

Before this patch, only the document order was considered.

Change-Id: I58f188c270cabe2c386a783ceef7a0a955105425
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-07 15:37:17 +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
Caroline Chao
934e14127b Tests: Remove insignificant for tst_QGraphicsProxyWidget
The failing test has been blacklisted in 3ed6f74fb2.

Change-Id: I5a2defd839e2f98690fc8cea9ff18e7503caf0de
Task-number: QTBUG-25294
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-05-05 12:46:05 +00:00
Caroline Chao
96527f74e2 TestCase: Also check main source path when looking for test data
This is for example useful when looking for a possible BLACKLIST
file while doing a shadow build.

Add autotests for blacklist.

Change-Id: I41d3939d31d21d10187fefcb82604736d911b6ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-05 07:06:52 +00:00
Giuseppe D'Angelo
3287e7a68a QGraphicsWidget: call normal "setParent" when setting a parent
QGraphicsWidgetPrivate::init had a special code path for setting
the item's parent. For some reason that code path caused the
ItemChildAddedChange notification not to be sent to the parent
element, which is wrong. Instead use the "normal" path, which is
what the QGraphicsItem constructor does anyhow.

Change-Id: Iad84cae05d797022a45977d35ca00c80c17c306a
Task-number: QTBUG-45867
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2015-05-05 05:02:51 +00:00
Simon Hausmann
862cceb6d2 Merge "Merge remote-tracking branch 'origin/5.5' into HEAD" into refs/staging/dev 2015-05-04 13:58:47 +00:00
Erik Verbruggen
c07f5b801b QStateMachine: add internal transitions.
The behavior of "external" and "internal" transitions is identical,
except in the case of a transition whose source state is a compound
state and whose target(s) is a descendant of the source. In such a case,
an internal transition will not exit and re-enter its source state,
while an external one will.

[ChangeLog][State machine] Added support for internal transitions.

Change-Id: I9efb1e7368ee52aa2544eb84709a00ae3d5350d3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-04 12:49:28 +00:00
Erik Verbruggen
bd15b23987 QStateMachine: cache expensive calculations.
As nothing changes in the state machine when selecting transitions for
events and then calculating the exit- and entry-sets, some calculations
can be cached.

The exit set for a transition was calculated multiple times. First in
removeConflictingTransitions, where the two loops would each calculate
them multiple times. Then secondly in microstep(), which would calculate
the exit set for all transitions.

Transition selection, exit set calculation, and entry set calculation
all calculate the transition domain and effective target states for
transitions.

Change-Id: I217328a73db2f71e371eb5f60a0c7b222303f0ca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-05-04 12:49:22 +00:00
Valery Kotov
a5890fbcd8 qnetworkreplyfileimpl: set attributes if file was sent
Set status code and status text if file was sent with reply.

Change-Id: Ie6acadc5c1d06538449262ffd8486e8de573b931
Task-number: QTBUG-45581
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-05-04 11:20:40 +00:00
Simon Hausmann
7f8719e663 Merge remote-tracking branch 'origin/5.5' into HEAD
Change-Id: I487a4b7c05687a10c498ac219c31367d4db6fbc0
2015-05-04 13:19:31 +02:00
Friedemann Kleint
315b359bc1 QFileDialog: Stabilize tests.
The init()/cleanup() code in tst_qfiledialog and tst_qfiledialog2
currently differs and fails to clean up the settings file
since it only removes the legacy settings under the Qt group
and instantiates a new QFileDialog while the QSettings class
is still in scope. Also, it has no means of clearing the
setLastVisitedDirectory(), which causes the
tst_QFiledialog::completer() and tst_QFiledialog::history() tests
to interfere, leaving the settings in an invalid state.
tst_qfiledialog2 does not use QStandardPaths::setTestModeEnabled(().

- Ensure the last visited URL is always clean by
  making QFileDialogPrivate::setLastVisitedDirectory()
  static and calling it from init().
- Introduce a cleanupSettingsFile() function to the tests that
  cleans both groups and call it from initTestCase() and cleanup()
  to ensure a clean state.
- Add QStandardPaths::setTestModeEnabled() to tst_qfiledialog2.

Fixes sporadic test fails when executing
tst_QFiledialog::completer() and tst_QFiledialog::history()
in a sequence.

Task-number: QTBUG-45764
Change-Id: I24de3caabf77be067b385d64ff11b7a07fe12b72
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-01 06:03:10 +00:00
Konstantin Ritt
a37daf99ad [DiagLib] Sync QChar enums
These values were added as part of upgrading to Unicode 7.0

Change-Id: Ib208828a7685ba4f89f0e2f06033f74c8ff13532
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-05-01 05:35:46 +00:00
Allan Sandfeld Jensen
041cbe4b38 Add missing RGB32 <-> RGB30 convertions
Completes the inplace converters so that we can rely on inplace
conversions to succede as long as the image depth is the same.

Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 19:27:39 +00:00
Allan Sandfeld Jensen
68faf3a9bb Fix QImage format after inplace conversion
Some inplace conversions would not set the requested image format in
the returned image, due to the same conversion being used for several
destination formats.

This patch ensures all inplace conversions return the right format,
and adds testing infrastructure to easily test iterate over all formats
so that they all can be tested.

Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 15:26:26 +00:00
Allan Sandfeld Jensen
52ddfb36c8 Fix two errors in RGB30 conversions
The one converters from RGB30 was misplaced in the method table, and
the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake
when alpha was 2.

Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-30 10:00:21 +00:00
Frederik Gladhorn
631eb12dd2 The qpluginloader machtest needs Q_AUTOTEST_EXPORT
Doing a build on OS X without -developer-build fails.

Change-Id: I49c178ab2428177d9dd94f84620595a4bc132244
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-30 06:32:23 +00:00
Morten Johan Sørvig
795400d1e5 Clean up qt_on_cocoa manual test.
Focus the test on embedding QWindow: Remove the
NSToolBar code. Use standard NSApplication startup
code. Use winId() to access the NSView instead of
QPlatformNativeInterface (which is gui-private).
Rename Window -> RasterWindow.

Change-Id: Ie98cb73020d2721743bb665b89b17f07f2bf984b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-30 05:04:07 +00:00
Rainer Keller
518f886b61 Revert "Rotate images according to Exif orientation"
Due to a behavior change.

This reverts commit 9157087334.
This reverts commit 16c32c6dfb.

Task-number: QTBUG-37946
Task-number: QTBUG-45552
Task-number: QTBUG-43563
Change-Id: Idf8df7d8f22465e8f6b51acb68993ac97208b184
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-29 17:36:43 +00:00
Marko Kangas
0abf5ec7c4 Add support to set text/uri-list mimedata via setData()
Fixed issue that text/uri-list mimedata got from QMimeData::data()
was corrupted after setting it back via QMimeData::setData()

Change-Id: I2377523a9286519402ab9127ed7f3fa66e39a679
Task-number: QTBUG-45486
Reviewed-by: David Faure <david.faure@kdab.com>
2015-04-28 12:46:35 +00:00
Allan Sandfeld Jensen
f15d6c3fa9 Preserve QImage metadata in image transforms
Some QImage methods were not preserving image metadata, or only
preserving some of it. This adds the missing parts and adds a test for
metadata.

Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-28 12:42:12 +00:00
Caroline Chao
1576f62eaf Tests: Use blacklist for failing tst_qfilesystemwatcher tests
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The tests blacklisted have been found using CI builds logs.

Change-Id: I34374ed7269f941c330c65d97fe083c83d3df461
Task-number: QTBUG-33574
Task-number: QTBUG-30943
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-28 12:35:21 +00:00
Simon Hausmann
1b4ce37371 Blacklist task258920_mouseBorder on Mac
The test keeps failing, perfectly when run singly btw. However the approach of
sending mouse move events is inherently fragile due to the use of
QCursor::setPos and the expectation that that produces the correct sequence of
mouse move events.

Change-Id: I12ba1afcfd3fab965b8f93d5def48b435fd2ff33
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-04-28 06:11:07 +00:00
Liang Qi
1c8451bdbb Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/tools/qdoc/tree.cpp
	tests/auto/gui/painting/qcolor/tst_qcolor.cpp

Change-Id: Iaa78f601a63191fa643aabf853520f913f2f0fdc
2015-04-27 21:36:32 +02:00
Jacek Całusiński
0635b1a69d Moc: test if superclass list is not empty before accessing first()
Accessing QList().first() with an empty superclassList caused assertion
fail. Added check to fix it.

Change-Id: I1aff35e0d267fc0e670beadba1bd196b175a4da8
Co-authored-with: Olivier Goffart <ogoffart@woboq.com>
Task-number: QTBUG-45790
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-27 16:14:17 +00:00
Caroline Chao
411a3490fd Tests: Blacklist tst_QHostInfo::abortHostLookupInDifferentThread
Remove the insignificant_test CONFIG option in favor of a BLACKLIST
file. This test has been found failing on OpenSuse in CI.

Change-Id: Ibc6af3c30277fec7e422e8bbeccd9437de2a61ce
Task-number: QTBUG-23837
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-04-27 11:52:25 +00:00
Friedemann Kleint
4bafef9890 QMainWindow::restoreDockWidget(): Fix positioning of floating docks with native decoration.
Use QWidget::move() to position floating dock widgets.
Add a test for QMainWindow::restoreDockWidget().

Task-number: QTBUG-45780
Change-Id: I945917728a663916e8c225b9d3d2a75fa508d68f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-26 13:15:57 +00:00
Richard J. Moore
00f0a4119c Add the ability to prefer the cipher preferences specified by the server.
Currently the cipher preferred by the client will always be used for SSL
connections. This change makes it so that by default the ciphers
specified by the server will be used (like the Apache SSLHonorCipherOrder
option). This behavior can be disabled using a new SslOption.

[ChangeLog][QtNetwork][QSslSocket] QSslSocket will now default to using
the cipher preferences of the server socket when used as an SSL server.
This can be disabled using the QSslConfiguration.

Change-Id: I2d16d10145cf88a7412f30ef960d87024777de1c
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2015-04-25 12:10:50 +00:00
Caroline Chao
cf5e3f37f4 Tests: Blacklist task260974_menuItemRectangleForComboBoxPopup
On OS X 10.10. This test in tst_QComboBox is currently failing in CI.

Change-Id: Ie326f79a900c3ae926c7ebe5bb5880dd422cee60
Task-number: QTBUG-45531
Reviewed-by: David Faure <david.faure@kdab.com>
2015-04-24 13:43:06 +00:00
Allan Sandfeld Jensen
71203b1f0e Fix overflow in rgb30 gradient tests
The tests were trying to access one pixel outside of the image.

Change-Id: Ieabdefbbdb76bb736214a0495bec72c881b27d2c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-24 09:03:48 +00:00
Oswald Buddenhagen
3378aa45c2 fix distclean targets
this makes the distclean targets work throughout qt.
the dreaded confclean target is aliased to distclean.

Task-number: QTBUG-8202
Task-number: QTBUG-20566
Change-Id: I7ac8e3b5b0110825dc93e4fa885281db91c6cf83
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-23 19:16:57 +00:00
Allan Sandfeld Jensen
f657ecdc5d Fix inplace double mirroring on odd sized images
The QImage inplace mirroring method, failed to handle the middle line
when mirroring both ways (rotate 180). In both other mirroring cases
the middle can be left untouched, but in this case it needs to be
mirrored half way.

To make the logic simpler, double mirroring will now mirror half the
lines instead of half of every line.

Change-Id: Iaa1f1e1c3f7dedfb78891fc93207f6d0c64bcafe
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-23 10:14:48 +00:00
Friedemann Kleint
c3737573ce uic: Delay the setting of QPushButton::default.
For the property to take effect, the button must have its
parent set. This might not be the case when a container like
for example QTabWidget is involved. Move the setting of the
property to the bottom of setupUi.

Task-number: QTBUG-44406
Change-Id: Ic2013865a020986475fa28f2e3805c63d4de8ed0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-23 09:59:51 +00:00
Friedemann Kleint
6545404afa Windows: Fix QLockFile hanging when file cannot be created.
Return QLockFile::PermissionError when file does not exist, preventing
the stale file detection logic from triggering.

Add Windows-only autotest trying to create a lock file in
a system folder guarded with checks for elevated processes
and UAC virtualization.

Task-number: QTBUG-45631
Change-Id: I1790f8f925660f6bf1df94c2ced901e6ec57cbb0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-04-23 09:59:43 +00:00
Friedemann Kleint
1f2ce78f16 tst_QFileSystemWatcher: Improve diagnostics.
Add a special signal spy that records the time and path received
to obtain information on what triggered it for the flaky
cases where more than the expected signals were emitted.

Task-number: QTBUG-30943
Change-Id: I67510ce5e8e19b49c0ca41457f8357b720cade76
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-23 09:59:38 +00:00
Allan Sandfeld Jensen
63d5a42b59 Revert "Remove separate SSE4 unpremultiply function"
Could causedSSE4 instructions to be used on non SSE4 machines
in cases when qUnpremultiplywas not inlined.

This reverts commit 964ccc5853.

Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919
Task-number: QTBUG-45741
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-23 09:25:28 +00:00
Caroline Chao
6535912add Tests: Remove tst_QGraphicsIten::sorting from the BLACKLIST file
The test tst_QGraphicsIten::sorting is blacklisted but always passing.

Change-Id: I69bbd4b4bbe227267e16ab5558ddabe7d2c0b1b3
Task-number: QTBUG-41342
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:50:50 +00:00
Caroline Chao
5a3a59b1c1 Tests: Blacklist tst_QGraphicItem::ensureUpdateOnTextItem
On OS X 10.10. This test is currently failing in CI.

Change-Id: I1b3a33b404c915e83c5e4fa0a7af69d1b941d93c
Task-number: QTBUG-41342
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:50:47 +00:00
Friedemann Kleint
3e42eeeec1 Improve tst_uic.
- Make the version regexp a member variable, avoiding repeated
  construction.
- Use QVERIFY2() with error message for opening files.
- On failure, try to locate the standard diff tool and produce
  diff output for comparison, which should make for example
  copyright header changes much easier.

Task-number: QTBUG-44406
Change-Id: Ic759899c1da3394e3eb0cee7b1c722f0945714d3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-22 10:23:53 +00:00
Erik Verbruggen
9ff550807d Remove unused private field from test.
Change-Id: I6f991f35a035ed9ff28ff8548b647916db85db39
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2015-04-22 10:16:32 +00:00
Liang Qi
aed5a71683 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/gui/painting/qdrawhelper.cpp
	src/plugins/platforms/xcb/qxcbnativeinterface.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/plugins/platforms/xcb/qxcbwindow.h
	src/testlib/qtestblacklist.cpp
	src/tools/qdoc/node.cpp
	src/tools/qdoc/node.h
	tests/auto/gui/painting/qcolor/tst_qcolor.cpp

Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
2015-04-22 09:25:54 +02:00
Lars Knoll
d3d10cf23d Improve error handling in qtestlib
Dump a stack trace on Linux if the process crashes. This will give us
much better log output in the new CI system. In addition, create a
watch dog thread, that kills the test if the test function times
out (ie. hangs)

Implementations of the stack trace dumping for Mac and Windows
are still pending.

Change-Id: I65426c5afe290a0a2019b881436a0c278f1cafaf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-21 16:19:09 +00:00
Friedemann Kleint
cba5556953 Skip tst_QFiledialog::directoryEnteredSignal() depending on side bar entry count.
The test relies on having at least 2 entries, which is not always the
case.

Change-Id: Ief812c598409fe829edb930e563740e5f2213580
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-21 11:11:41 +00:00
Marc Mutz
05d1693793 Add qHash(QMatrix) and qHash(QTransform)
QMatrix and QTransform can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtCore][QMatrix] Added qHash(QMatrix).
[ChangeLog][QtCore][QTransform] Added qHash(QTransform).

Change-Id: I1ce925ebe258c9d7e35b68e5ac5c3373f1460c58
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-21 07:28:14 +00:00
Frederik Gladhorn
299350f668 Remove unused function
Change-Id: I2f629ce9a414c822aba20000f36f06a18594c7a3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-04-20 20:07:47 +00:00
Oswald Buddenhagen
4171a98ca5 Merge 5.4 into 5.4.2
Change-Id: Ice194d5e8dcd1003acfc9864620b166699b74a44
2015-04-20 12:25:51 +02:00
Markus Goetz
cff39fba10 QNAM: Fix upload corruptions when server closes connection
This patch fixes several upload corruptions if the server closes the connection
while/before we send data into it. They happen inside multiple places in the HTTP
layer and are explained in the comments.
Corruptions are:
* The upload byte device has an in-flight signal with pending upload data, if
it gets reset (because server closes the connection) then the re-send of the
request was sometimes taking this stale in-flight pending upload data.
* Because some signals were DirectConnection and some were QueuedConnection, there
was a chance that a direct signal overtakes a queued signal. The state machine
then sent data down the socket which was buffered there (and sent later) although
it did not match the current state of the state machine when it was actually sent.
* A socket was seen as being able to have requests sent even though it was not
encrypted yet. This relates to the previous corruption where data is stored inside
the socket's buffer and then sent later.

The included auto test produces all fixed corruptions, I detected no regressions
via the other tests.
This code also adds a bit of sanity checking to protect from possible further
problems.

[ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection

Change-Id: I54c883925ec897050941498f139c4b523030432e
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2015-04-20 08:00:02 +00:00
Nikita Baryshnikov
ad03511256 QDir: fix int overflow
This caused reverse order of session items in qt creator. Introduced
in ba287c55ef.

Change-Id: I5c37ca6a1ef4753b6449eb9e87b4def5ea858677
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-20 07:43:58 +00:00
Marc Mutz
adfe9ea1e0 Add qHash(QVector)
QVectors can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QVector] Added qHash(QVector).

Change-Id: I2aacce55d416abf2492631a504a02c6e8fc4ff1c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:42:03 +00:00
Marc Mutz
f9063758cb Add qHash(QUrlQuery)
QUrlQueries can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QUrlQuery] Added qHash(QUrlQuery).

Change-Id: I626258a938359b49a0cae02012b6cba5ef1fe784
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-20 07:41:56 +00:00
Marc Mutz
5fdc64f566 Add qHash(QList)
QLists can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QList] Added qHash(QList).

Change-Id: I9ad91811f12479764cc17d87192539612ceb0b4c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:44 +00:00
Harald Hvaal
8fb881900c Enable checking for whether the system palette was explicitly set
In order to obey a palette set globally on QApplication, an application
attribute for checking if it's set at all is added.

Task-number: QTBUG-39800
Change-Id: I26b965e6e18e0e1ca4df03cf343b3527df3636b2
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-20 06:39:31 +00:00
Caroline Chao
848f01f9fb Tests: Use blacklist for failing tests in tst_macnativevents
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The tests blacklisted have been found using CI builds logs.

Change-Id: I1a963bdc24f7657731dc0374a8e2c3cbaa49f126
Task-number: QTBUG-22775
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-17 14:07:14 +00:00
Allan Sandfeld Jensen
964ccc5853 Remove separate SSE4 unpremultiply function
Merges the SSE4 specific unpremultiply with the normal version, and
adds a SSE2 fallback. There was no reason to split the two since
compile time options will ensure the right version is inlined.

Also adds short-cut for 0 and 255 values.

Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-16 19:24:06 +00:00
Laszlo Agocs
f3fad26bc9 Add matching by GL_VENDOR to QOpenGLConfig
This will be essential on Linux, especially Embedded where PCI IDs are
not that useful.

Change-Id: I2fa8ca07236e8aae203e21fe629d12aab092c7fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-16 16:47:43 +00:00
Alexander Volkov
0c28e1ab7a Fix finding the closest active touch point for the pressed touch point
Currently pressed touch point is added to the list of active touch
points in Gui module. It must be excluded from consideration when
we traverse the list.

Task-number: QTBUG-43255
Change-Id: Idddab093b1f6a79122cf18fad7f43bfc93ce7eea
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-16 15:22:36 +00:00
Olivier Goffart
f58e882b75 QLockFile: fix deadlock when the lock file is corrupted
[ChangeLog][QtCore][QLockFile] Fixed a deadlock when the lock file
is corrupted.

Task-number: QTBUG-44771
Change-Id: Ic490b09d70ff1cc1733b64949889a73720b2d0f3
Reviewed-by: David Faure <david.faure@kdab.com>
2015-04-15 21:40:19 +00:00
Allan Sandfeld Jensen
95f694682e Implement radial and conical gradients for rgb64 rendering
Adds the last two missing source types to rgb64 rendering.
Conical and radial gradients. At the same time linear
gradients are moved to a template form to increase code
sharing.

Change-Id: I30fdd0837b0da03e3447683856ebbe4d7f48df6c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-15 19:34:04 +00:00
Allan Sandfeld Jensen
7432c7c08a Cleanup and optimization of qimage smoothscale
Cleaning up smoothscale code. Upscaling is improved using existing
optimized interpolation methods, and downscale is given SSE4.1
optimized versions.

Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-15 11:25:41 +00:00
Robert Griebl
91dfab223a Add support for unregistering of custom meta types.
This patch addresses a specific Qml problem, where the meta types list
will grow indefinitely when unloading and reloading Qml components over
and over (in an failed effort to save memory).

The implementation is not specific to Qml though, but will cater to all
use-cases where registered types may not live until the application's
termination.

Change-Id: Ic0224dcd19aeb559715ef088b22a30509be2456b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-14 23:29:04 +00:00
Allan Sandfeld Jensen
29380121ef Fix RGB30 painting tests
Some tests were failing because the color was not read correctly from
a QImage. To make it possibly to read more accurate colors a pixel
accessor returing QColor has been added.

Some tests also had the wrong order of arguments, confusing dest and src
formats. This has been corrected, so they test what they claim to test.

A test for RGB30 linear gradients is also added.

Change-Id: Ic623ae1b8e0bf7383056b641c6e8230a1d7dd0dd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-13 13:01:45 +00:00
Erik Verbruggen
b2f6406b6f QStateMachine: remove conflicting transitions after selection.
After selecting all (enabled) transitions for a microstep, filter out
any conflicting transition. The actual conflict resulution is done by
ordering the transitions in order of the states that selected them.

For example: if an event would trigger two transitions in a parallel
state where one would exit that state and the other would not, this
filtering prevents the state machine from selecting both states (as this
case is an invalid state of the whole machine).

This also fixes the exit set calculation for parallel states when one of
its substates is exited and subsequently re-entered in the same
transition. Previously, the parallel state was not exited, and
subsequent re-entry was ignored (because it was still active). Now it is
correctly exited and re-entered.

A side-effect of the transition ordering mentioned above is it also
fixes the non-deterministic behavior of which of the conflicting
transitions is taken.

[ChangeLog][QtCore] Fixed an issue where the state machine could end up
in an invalid state when transitions from a parallel state were not
checked for conflicts.
[ChangeLog][QtCore] Fixed a case where a parallel state was not exited
and re-entered when one of its substates was exited and subsequently
re-entered.
[ChangeLog][QtCore] Fixed the non-deterministic behavior of picking a
transition from a set of conflicting transitions.

Task-number: QTBUG-44783
Change-Id: I2ee72b6a2f552077bfa7aa4d369474ab62f4c2f0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2015-04-10 12:59:52 +00:00
Erik Verbruggen
e616bd2641 QStateMachine: fix history state restoration.
When a history state is entered that has an actual saved history (so not
the initial state), the entry set was calculated wrongly in some cases.
See the bug report for the specific case.

The fix is to fully implement the standard, so method names in the
private class are updated to reflect the names as used in the standard.

Note that, as mentioned in the bug report, the algorithm as described in
http://www.w3.org/TR/2014/WD-scxml-20140529/ has a bug. What is
implemented is the fixed algorithm as described in the current working
draft as of Friday March 13, 2015. This draft can be found at:
http://www.w3.org/Voice/2013/scxml-irp/SCXML.htm

[ChangeLog][QtCore] Fixed an issue where a history state restore would
activate too many states, possibly putting the state machine in an
invalid state.

Change-Id: Ibb5491b2fdcf3a167c223fa8c9c4aad302dbb795
Task-number: QTBUG-44963
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-04-10 12:59:20 +00:00
Andy Shaw
34ec0713bb Add a means to set the application icon where supported
On OS X the application icon can be changed at runtime, so this adds a way
to set this via the QPlatformIntegration.

[ChangeLog][OS X] QApplication::setWindowIcon now changes the icon for the
application in the dock.

Task-number: QTBUG-43999
Change-Id: Ice298c0bd52f10f4866f37c6d3f20cf5419b7a1b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-04-10 10:10:25 +00:00
Allan Sandfeld Jensen
60e8519544 Solid and gradients in high color accuracy
This patch updates the internal color precisions of solids and
gradients to 16bit per color. This makes it possible to render
at higher precision on non-premultiplied ARGB32, the RGB30
formats and any other hi-color formats if more are added.

[ChangeLog][QtGui][Painting] Internal precision of solids and gradients
is now up to 16bit per color.

Change-Id: Ieae5468bd6de1f56adfa4cb9fa966faf2ed824fd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-10 09:15:59 +00:00