Commit Graph

2076 Commits

Author SHA1 Message Date
Thiago Macieira
cc5e84c878 Avoid overflow in QTime::addSecs with too big a number of seconds
QDateTime::addSecs needs to do something similar, but not identical
because it needs the number of days too. And then there are daylight
savings transitions...

Task-number: QTBUG-47717
Change-Id: I7de033f80b0e4431b7f1ffff13f976f4f5e5a059
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-08-19 22:13:40 +00:00
Giuseppe D'Angelo
ee15bef3ea QRegularExpression: fix matching over QStringRefs
Playing with the offset argument of pcre_exec is not equivalent to
adjusting the pointer to the subject string. In particular, PCRE
can go behind the offset to check for lookbehinds or "transition"
metacharacters (\b, \B, etc.).

This made the code that deals with QStringRefs not matching in behavior
with the corresponding code dealing with QStrings. For instance,

   QString subject("Miss");
   QRegularExpression re("(?<=M)iss");
   re.match(subject.mid(1));           // doesn't match
   re.match(subject.midRef(1));        // matches!!!

Instead, actually adjust the pointer to the subject string so that
the behavior is identical. A broken test that relied on the
equivalence is also removed.

Change-Id: If96333241ef59621d7f5a6a170ebd0a186844874
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-18 14:18:48 +00:00
Joerg Bornemann
734557bb84 tst_qprocess cleanup
Give setStandardOutputFile2 a sensible name, move it to where it
belongs and remove bogus Q_OS_WINCE ifdef.

Change-Id: I5c843e8b6cb626979966f3e61f7a7c720173bb28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-17 08:25:24 +00:00
Joerg Bornemann
507625d984 fix assertion in QProcess/Win
Do not call bytesAvailableInChannel if the source pipe end is
invalid. This is the case when redirecting channels on Windows.
The assertions in bytesAvailableInChannel were triggered whenever
an output process or output file was set and waitForBytesWritten
was called.

Task-number: QTBUG-45548
Change-Id: I225dfea2c5e27e122f75008a3a06d425554e00fe
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-17 08:25:19 +00:00
David Faure
4ccf5c6f4a QMimeDatabase: adapt to changes in shared-mime-info 1.3
The generated xml file is now lowercase.
This was changed in shared-mime-info 3805d0bcf2.
It led to runtime warnings "No file found for ...", which helped notice the bug.

Change-Id: I31f0fc7f0fe8a098c3f79c0bcbeeb1909d2cc05a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-16 13:33:21 +00:00
Thiago Macieira
1ff66a7962 QProcess: Ensure that the stdin buffer is cleared on start()
The buffer may have been left dirty if we were unable to write all the
data to the child process in the previous run. So ensure we clear it
before starting a new one. We already did that for stdout and stderr,
for some reason.

Task-number: QTBUG-44517
Change-Id: I1a800c709d3543699131ffff13c419da3bbffacf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-15 21:59:26 +00:00
Milian Wolff
af3152adee QMimeProvider: Do not crash when globPatterns is empty.
Change-Id: I351a533a1f03ac2e7bdec876b657a80fac60b2ed
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2015-08-12 13:20:20 +00:00
David Faure
e7c17ce788 tst_qmimedatabase: check that QFile::remove() worked.
It failed on Windows due to readonly files copied from the resource,
until adding a setPermission call.

Change-Id: I1d42b53763583aca73d011e0f2bbf061ef6aa891
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-12 09:03:18 +00:00
Eike Ziller
3dcabd8c64 QMimeDatabase: Run more tests on non-XDG/shared-mime-info platforms
On Windows and OS X, where QStandardPaths does not use XDG_DATA_DIRS/
_HOME and shared-mime-info is not installed, the tests that require
additional shared mime info xml files were never run.
Mend that by using QStandardPaths' test mode instead of setting
XDG_DATA_HOME.

Change-Id: I53b75c293c41c4dac63986dcb88972c2b54d5428
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-11 09:22:34 +00:00
Thiago Macieira
644ac04af0 Change how QDebug escapes QStrings in the output
[ChangeLog][Important Behavior Changes] QDebug output for QStrings
changed compared to Qt 5.5.0 to more closely match the output of
previous Qt versions. Like Qt 5.5.0, QDebug will escape non-printable
characters, the backslash and quote characters, but will no longer
escape the printable characters.

Task-number: QTBUG-47316
Change-Id: I52dd43c12685407bb9a6ffff13f62ef68cbc80c5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-06 04:53:38 +00:00
Thiago Macieira
5f1a0cb42a Seed the random number generator before using QTemporaryDir
Otherwise, on some systems (Windows), we'll always create the same dirs.

Change-Id: Id3d5c7bf4d4c45069621ffff13f79ba91e0f974b
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
2015-08-06 04:53:21 +00:00
Alex Merry
8fdd1e3867 QLoggingCategory: fix default severity in Q_LOGGING_CATEGORY macro
[ChangeLog][QtCore][QLoggingCategory] Fixed behavior of default
severity passed to constructor or Q_LOGGING_CATEGORY with regards to
QtInfoMsg, which was previously treated as being more severe than
QtFatalMsg.

This is because the code was using the numeric value of QtMsgType as a
proxy for severity (via the <= operator), but the value of QtInfoMsg is
greater than QtFatalMsg. Instead, the severity ordering must be dealt
with explicitly.

Change-Id: I5f178afc735221b00cb67c2cea4fa964bd9079ce
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-03 14:40:19 +00:00
Joerg Bornemann
edb5f22b0a consistently handle empty program string in QProcess::start overloads
All overloads of QProcess::start will now check whether the program
string is empty and in that case
  - set error to FailedToStart,
  - set errorString to "No program defined",
  - emit error.

Until now only one of the three overloads behaved like this.

As a side effect, start(QString(), QStringList()) will not crash on
Windows anymore.

Task-number: QTBUG-47404
Change-Id: I2f93657204fe3643b1d74a74817843c05fc4a96b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-07-30 05:33:28 +00:00
Olivier Goffart
f01f1943e4 Fix compilation error while instantiating operator<< explicitly
Task-number: QTBUG-47375
Change-Id: Ibd260de88c174c1aa3833a56b153b8b74d337338
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-26 19:14:47 +00:00
Cesar Garcia Naranjo
5c67ce5d6d QTimeZone: Convert fractional timezones properly.
[ChangeLog][QtCore][QTimeZone] Fixed a wrong timezone conversion when
the POSIX timezone rule contains a fractional timezone (e.g. VET4:30).

Task-number: QTBUG-47037
Change-Id: I5d9052929bbcde174614ccf07c329264603e6431
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-21 22:50:39 +00:00
Friedemann Kleint
0e9b51ebac tst_qmimedatabase.cpp: Set write permission on files extracted from resources.
Set QFileDevice::WriteUser on all files extracted from resources. These
are read-only, which is preserved by QFile::copy(). This caused the
deletion of the temporary directory to fail on Windows.

Change-Id: Id99de9160471c38bcec68025c89cfabbe209bdbe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-07-21 13:01:08 +00:00
Friedemann Kleint
26bcc0565f QDir::removeRecursively(): Retry file deletion with write permission set.
On Windows, having read-only files in a directory can cause removal
to fail. When file deletion fails, check on the permissions, set
write permissions and retry.

Split apart code paths by OS in tst_QDir::removeRecursivelyFailure();
deletion of the read-only directory on UNIX should still fail.

Change-Id: I36e54be5229a7b552e90fd5f42722b868fa0b6ee
Reviewed-by: David Faure <david.faure@kdab.com>
2015-07-17 11:06:28 +00:00
Thiago Macieira
3aa5ef2ea9 Disable thread-safe statics for MSVC 2015: they're broken
An object that throws in its constructor cannot be reentered. This
violates both C++11 and C++98. It's also a regression from MSVC 2013.

The unit test is renamed to indicate what it really does, as opposed to
a misleading name that was probably a "thinko" on my part.

Task-number: QTBUG-47224
Change-Id: Ib306f8f647014b399b87ffff13f132436d0578ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-16 08:28:07 +00:00
Thiago Macieira
02418d1aaa Set the state of QTemporaryFileEngine properly prior to reopening
QTemporaryFileEngine does not store the pattern, so it needs to get it
again from QTemporaryFilePrivate prior to reopening the file. It's
possible to lose the pattern when remove() is called on the object.

Task-number: QTBUG-46156
Change-Id: I66a35ce5f88941f29aa6ffff13dfc7f83d4fa3a2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-07-15 04:53:30 +00:00
Sérgio Martins
f61de80e1f QVarLengthArray: Unit-test that clear() preserves capacity
Change-Id: Ib2b798b93ce9a1b77bca09b2a8c27a568ebf8670
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-08 14:22:44 +00:00
Thiago Macieira
d01d08971a Fix the remainingTime() result after the first activation of a QTimer
On Windows, t->timeout was updated only once, at creation time, so the
timer would always show as "overdue" after the first activation.

The timer is updated to indicate the full remaining time during the slot
activation, which is the behavior of the Unix and Glib dispatchers.

Task-number: QTBUG-46940
Change-Id: I255870833a024a36adf6ffff13ecadb021c4358c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-08 03:20:29 +00:00
Nico Vertriest
a7f2af0911 Replace MAC OS X with OS X
Task-number: QTBUG-46374
Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-30 07:33:31 +00:00
Liang Qi
4dd8a63fc1 Merge remote-tracking branch 'origin/5.5.0' into 5.5
Conflicts:
	src/plugins/platforms/cocoa/qcocoafiledialoghelper.h

Manually fixed src/testlib/qtestcase.cpp to return the right type.

Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4
2015-06-27 13:54:35 +02:00
Christian Kandeler
ec8c1dcf14 Make QDir::relativeFilePath() return "." for a path to itself.
The rationale being that the empty string is not a valid path component.

[ChangeLog][QtCore][QDir] QDir::relativeFilePath() now returns "."
instead of an empty string if the given path is the same as the
directory.

Change-Id: Ibcf31904b2ae5edf5639d4c2e5ba234365d347fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-24 15:43:58 +00:00
Oliver Wolff
bf24838c33 Use qthread_win.cpp for WinRT as well
Since of Windows (Phone) 8.1 most of the desktop's thread functionality
is also available, so we might be able to share the code and get rid of
the extra implementation for WinRT.

Task-number: QTBUG-43837
Change-Id: I0ce907cd94899834527f88c70e1e395bafdb14b3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-06-23 05:47:14 +00:00
Thiago Macieira
94e364464e Autotest: make the test pass with the Intel compiler
The Intel compiler defaults to "fast math" mode, which is why those
tests had been failing. So for the test that is trying to check whether
we conform to IEEE strict requirements, turn on strict requirements.

Change-Id: I02f8426b1c8e4241ac10ffff13e8efa224f313b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-19 23:22:34 +00:00
Thiago Macieira
b2be272d35 Make QMetaObject::Connection check its state deeply
Since Connection can be copied, one copy could be used for
disconnecting, but the other's d_ptr wouldn't get updated and would
continue to report as still connected.

This patch fixes that by making it check the internal state. That is
only done after d_ptr is already known to be non-null. Unfortunately,
that is the common path:

  if (connect(sender, &Sender::signal, [] {}))

will call an out-of-line function. I don't see a way out.

Task-number: QTBUG-46213
Change-Id: I66a35ce5f88941f29aa6ffff13dfb45dca68a350
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-19 23:22:33 +00:00
Thiago Macieira
54589f2932 Autotest: Check where global event filters get run
Global (application-level) event filters are supposed to be run only in
the main thread, so ensure that it is the case.

Change-Id: I27eaacb532114dd188c4ffff13d5a17d991b8bd2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-19 23:22:30 +00:00
Marc Mutz
61ca116a2e QTest: Make qExtractTestData() return the created QTemporaryDir
... and enable auto-deletion on it.

This allows users of the function to get rid of their own
cleanup code. They just need to keep the shared pointer alive
for as long as they need it.

Drive-by changes:
- replaced QStringLiterals that were only used as the rhs of op+
- replaced an instance of mid() used as the rhs of op+ with midRef()
- enabled NRVO

Change-Id: I161d39461e020c9e8d473c0810dea2109fe0d62d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-14 15:19:31 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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