Commit Graph

3878 Commits

Author SHA1 Message Date
Mathias Hasselmann
50e2db6a75 Add first/last accessors to QMap
QMap explicitly sorts its entries by key value. For an ordered container
it's (often?) useful to access the first or last entry, for instance to
quickly compute the next key of the mapping. The first entry is easily
accessible by the STL begin() method, but for accessing the last entry
pretty ugly iterator arithmetics must be applied: *(end() - 1). With
their first() and last() accessors the container classes QList and
QVector provide a much nicer method of accessing extrema, so for
consistency this syntactical sugar also should be applied to QMap.

Change-Id: Ibd544acbad8c3ac16f12a1e74362207ea1694375
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-09-08 16:13:16 +02:00
Sergio Ahumada
2346ae1675 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
2013-09-07 16:18:32 +02:00
Marcel Krems
730bc064a0 Forward QGraphicsView::mouseDoubleClickEvent
Do the same as in mousePressEvent.
Otherwise it is not possible to handle the event
in one of the graphics views parents.

Task-number: QTBUG-8061
Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-09-06 23:21:18 +02:00
John Layt
94a7576658 QDateTime - Change debug output to ISO Format
Change the debug format from Qt::TextDate to a more detailed ISO style
format including better time spec output.

[ChangeLog][QtCore][QDateTime] The debug datastream is now an ISO-like
format instead of Qt::TextDate

Change-Id: Iddbb8199c3bfbf7bca845482617e7a85da43259d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-06 18:08:56 +02:00
Stephen Kelly
15a17323ed Make the automatic 1arg and 2arg metatype macros work with namespaced Qt.
Change-Id: I64aa3cacd0cf57235ad43f089716765b384ef412
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 16:18:37 +02:00
Stephen Kelly
2ff15ff065 Fix the automatic declaration of smart pointer types.
Before this patch,

 qRegisterMetaType<QSharedPointer<double> >("QSharedPointer<double>")

without a metatype declaration fails to compile, whereas it works
with Qt 5.1 (ie, before commit e9a69c3ba9)

Change-Id: I9408f711c9df810ff29b879b7696dab81c1160f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-06 16:18:32 +02:00
John Layt
61b56a89a1 QDateTime - Clean up Qt::DateFormat formatting and parsing
Clean-up the implementation of toString() and fromString() methods in
QDate, QTime and QDateTime code to be more consistent in ISODate and
TextDate behavior, especially when handling TimeSpec.

Reformat some code so all methods are consistent in appearance and
function to make maintenance easier.

This changes some corner-case behavior in TextDate and ISODate, but
this either fixes bugs or makes the behavior match the documentation.

Change-Id: I457aa1d7cd4f448cd9f8a2e80ec635f3cb98e58c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-06 01:53:11 +02:00
John Layt
35af88b37e QDateTime - Switch to using the QLocale date formatter
Switch the implementation of toString() methods in QDate, QTime and
QDateTime to use the QLocale formatter, and remove the now redundant
QDateTime formatter.

Change-Id: Ie4f17c8a6e31acde3ce066f19835bb2b83351ce8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-05 23:20:09 +02:00
John Layt
dd488bb7a4 QLocale - Improve date formatter
Modify the QLocale date formatter to be consistent with the QDateTime
date formatter and able to replace the QDateTime formatter in a
subsequent change.

Fix the treatment of negative years.

The internal QLocale::timeZone() has been replaced by the
QDateTime::timeZoneAbbreviation() to ensure the correct tz for the
date/time is used rather than always the current system default.

Change-Id: I2ef26700856e2e69b979069226aa504ecbb50071
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-05 23:20:09 +02:00
Oswald Buddenhagen
50a8a5e795 add QProcess::InputChannelMode
this enables forwarding standard input from the parent process.

Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-09-05 21:17:44 +02:00
Oswald Buddenhagen
fba0a30791 add QProcess::Forwarded{Output,Error}Channel
Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 21:17:39 +02:00
Stephen Kelly
239fe290ad Center the QColumnView on-screen, in case that helps avoid the test failure.
Task-number: QTBUG-32927
Change-Id: Icf0301d583b2ca6e2e099a19eb1f91feac1fb975
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-05 15:26:44 +02:00
Stephen Kelly
f69ace7341 QVariant: Make it possible to extract a QObject* from a wrapper without conversion.
Change-Id: I3a054d87d12e08d72dd4c77b6d467dc63f9a2231
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 13:01:46 +02:00
Stephen Kelly
d1a8623ecb QVariant: Don't crash when doing user-defined conversion to QObject*
The destructor of the ConverterFunctor calls unregisterConverter. If
the instance is static (as it is in qmetatype.h), then this method
can be called after the QGlobalStatic has already been destroyed.

Change-Id: I33b70734cbe09dfa888e887280c349e43ad1b855
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-05 13:01:39 +02:00
Oswald Buddenhagen
40925fe74a fix warnings - qprocess needs a qcoreapp instance
Change-Id: Icf36c2e76595d8f2ed470da13e78c465cfa962f9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
78d6c9c002 remove redundant forwardedChannels() test
forwardedChannelsOutput() actually tests forwarding. also having the
older test only eats CPU cycles.
rename the new test to the old name for clarity.

Change-Id: I16a326c8692bb594d7df7897bc53d31b23c66d90
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
4028f54213 make error reporting in forwardedChannelsOutput test more useful
Change-Id: I0350ddfd6740d2a2cd3e0f49220cdaa83b854abf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Oswald Buddenhagen
60f8b2f4d0 micro-optimization/-clarification
close stdin and let the process finish right away instead of first
waiting for a reaction (which is not supposed to come) and then
finishing.

Change-Id: Ifcf200eead5ed95217843e105f9d2dbb5398d646
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 11:18:59 +02:00
Giuseppe D'Angelo
9fc2c729b4 Make tst_qalgorithms compliant with the Standard
§24.4.1 [iterator.traits] of N3337 makes it *mandatory* to define the
various types

    std::iterator_traits<Iterator>::{value,pointer,...}

for any given iterator.

§24.4.1.2 makes it enough to define them within our iterator class.

Change-Id: I1305c8392d224889b09395e30ecc77b194020a15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-05 09:48:22 +02:00
Stephen Kelly
3f6ed5566f Revert "Implement move-ctor and move-assignment-op for QScopedPointer"
This reverts commit 5b9006bbdb.

Also revert "Doc: Enable documentation for QScopedPointer's rvalue ref functions"

This reverts commit 5f8416ec65.

Adding a move contructor to QScopedPointer makes no sense, because moving
means 'escaping the scope', which breaks the fundamental point of
QScopedPointer.

Change-Id: I4ac1b108bf199af6e436fa1629aa2d3b93c27724
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-05 08:20:19 +02:00
Corentin Jabot
5a02d30a78 Add an advisory interruption mechanism to QThread.
To ease interruption of long running tasks, a new method
QThread::setInterruptionRequested() can be called.
The task can check QThread::isInterruptionRequested()
and act upon it by stopping itself.

These methods are designed to replace the use of a global variable
and other hacky ways to stop a task running in another thread.

Change-Id: I17622dd60d2262078210e7e4294ad6c53a6dc179
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-05 08:20:18 +02:00
Tor Arne Vestbø
eb614cf7e7 Don't assume processEvents(WaitForMoreEvents) will process timers
The WaitForMoreEvents flag only guarantees that we will process _some_
events -- either if they are in the event queue already, or by sleeping
and then waking up to process an event. This event might be a system
event, not the timer firing, so a single call to processEvents() is
not enough to guarantee that the timer has fired. Instead we do a
Q_COMPARE with a timeout, where we continiously process events until
we see that the timer fired.

Change-Id: I5dc04377f04190f3505be22e877af73d11b7547d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-05 02:32:57 +02:00
Paul Olav Tvete
b855e57804 Fix layouts with expanding items with maximum size
Layout items with a Preferred size policy would be treated as fixed
size if they were in the same layout as an Expanding item (or one with
a stretch factor).

This occurred e.g. if a layout was configured similar to this:
1. One item with ExpandFlag/stretch but with a maximumSize set,
   e.g. (100x100).
2. Another item with 'just' GrowFlag, and a maximum size bigger than
   its  size hint.

If the above layout was resized to e.g. (200x50) it would cause the
expanding item to correctly get the size (100x50), but the 'growing'
item would not stretch beyond its size hint.
Instead, it would distribute space around both items, behaving as if
the 'growing' item was fixed'.

The expected behavior is to continue to grow the 'growing' item after
the expanding item has reached its size limit.

Task-number: QTBUG-33104

Change-Id: Ie410653d905f7ca4d702528dafb269f30a0e4f61
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-09-04 15:09:47 +02:00
Richard Moe Gustavsen
8b7a8efe66 QPluginLoader: add 'staticPlugins' function
Currently there is no API to extract the meta data
from static plugins. This is needed in e.g QtDeclarative
for loading static module plugins.

This patch moves the 'staticPlugins' function from
QLibraryPrivate into QPluginLoader, and makes it public.
As such, we now also export QStaticPlugin.
Since an application developer cannot do much with raw
metadata, we add a new function
QStaticPlugin::metaData() that returns the QJsonObject
for the plugin. The old metaData function is
renamed 'rawMetaData'.

Change-Id: Idb0bf9ad8ebb13340565512e1998b26e762a357e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-04 09:38:35 +02:00
John Layt
5ec1c7727b QDateTime - Add api for Time Zone Abbreviation
Add a new method to return the time zone abbreviation for the current
time spec.  For LocalTime this is the abbreviation returned by mktime.

This new method will later be used in changes to the date formatter
and QTimeZone.

Note this change does not implement WinCE support.

[ChangeLog][QtCore][QDateTime] Add method timeZoneAbbreviation() to
return effective time zone abbreviation.

Change-Id: I265a5e96c72eb7236974f80f053f1fb341e3c816
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-03 14:31:06 +02:00
Friedemann Kleint
835a7bc0a0 Skip tst_QGraphicsProxyWidget::popup_subwidget on Windows.
Task-number: QTBUG-33213
Change-Id: I1c8daa3a859f9d0d760054f1d8934abd84f62f0d
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-09-03 12:48:03 +02:00
Andrew Knight
a2643e2b17 Fix test compilation when QT_NO_CURSOR is defined
The implicitConstruction() test case will fail to compile if QCursor is
unavailable.

Change-Id: If26743995505a48da648a2fa2a498debec91c933
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-03 12:05:59 +02:00
Andrew Knight
cd582f8410 Add QT_NO_PROCESS guards in tests where they are missing
A handful of tests lack QT_NO_PROCESS guards, making them non-compilable
on Qt builds with no QProcess support. This commit does not change
QProcess-specific tests, which should be left out of the build using the
.pro file mechanism.

Change-Id: Iac8562428abc1f59ccbb23bf5c3a919785e41f12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-03 08:42:24 +02:00
Thorbjørn Martsum
0bcfa3d5d9 QHeaderView - add maximum section size
When we auto resize it is handy to be able to limit the maximum
size (just like the minimum size).

[ChangeLog][QtWidgets][QHeaderView]A maximumSize for sections
has been introduced. The maximum section size is by default
the largest possible section size which in Qt 5.2 has been
limited to 1048575 pixels.

Task-number: QTBUG-4346

Change-Id: Ida9cbcc11bd5c4498e319df2e6379c69a7033c04
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-02 16:26:21 +02:00
David Faure
8f4b6f1cd1 item delegates: fix clicking on tristate checkboxes.
QCheckBox cycles through the 3 states, but item delegates didn't
do that.

Change-Id: Iad1e464341033ca357925fe8064f53bb584459f4
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-02 16:26:21 +02:00
Sergio Ahumada
0a3eb0fe44 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-09-02 16:26:21 +02:00
Andrew Knight
3097129192 Fix remaining use of QTEST_NOOP_MAIN
QTEST_NOOP_MAIN was removed in Qt 5, but was still in the source of the
QProcessEnvironment auto test.

Change-Id: I0048c330c9d4e99c46192cc05ffd3b77d404fb6d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-09-02 14:59:02 +02:00
Andrew Knight
a05a3f6550 Remove qguieventloop from auto tests if network is unavailable
This test relies on network support.

Change-Id: I8918a7fe2f411fcaa2e4300486b8a66c63898221
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-02 14:59:02 +02:00
Andrew Knight
2e75cd55db Remove qopengl auto test when Qt is not configured with OpenGL support
Change-Id: Id2fbf9308c5dbce5e7778f0d841cc8bda784a80f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-02 14:59:02 +02:00
Morten Johan Sørvig
8fc97fdfc7 Revert Mac event loop changes.
"Make QGuiApplication::exec() run within NSApplicationMain()"
"Make Qt process native and timer events on Cocoa applications"
"Cocoa: Fix QFontDialog, QColorDialog auto-tests"

This reverts commits
1e14762b8d
e4b2a0b4ba
df7944e7d7

Change-Id: I80b65b5ee0297b090f807bd420664233dfc44f7b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-02 13:07:35 +02:00
Oswald Buddenhagen
a1133b215a add QProcess::nullDevice()
Change-Id: I15273fa3f3ba323a835350153f2a20404f12420b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-30 21:16:55 +02:00
Thorbjørn Martsum
2c916d47ef QTreeView - fix next focus when there is no current index
Before we went through non hidden indexes, but we never considered
the visual order. This patch fixes that issue.

Though it was wrong before, it probably never was a big problem
since it was unlikely that the tree (on logical index 0) was
swapped or hidden, but

658e42e77a

makes it more likely that problems with wrong focus could occur.

Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-30 21:07:46 +02:00
Olivier Goffart
b49327145e QMetaMethod::invoke: compare the QMetaType id of the return types
Since Qt5, the QMetaObject do not contains the string name of the
builtin types, but only the QMetaType id. QMetaMethod::typeName
convert back from the id to the string. But if the type is aliased,
the string of the main type is returned.

This was the case for example for qint64 which is transformed to
"qlonglong".

This causes a regression in QMetaType::invoke when trying to invoke a
method which return an aliased type, since the string comparison would
fail.

Fix the problem by also comparing the metatype id.

Changelog: QMetaMethod::invoke: Fix return of aliased meta type

Task-number: QTBUG-33222
Change-Id: Iec7b99dcbf7b23eb818de74f413e4451ce510ac4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-08-29 17:03:41 +02:00
Gabriel de Dietrich
df7944e7d7 Cocoa: Fix QFontDialog, QColorDialog auto-tests
The new Cocoa event dispatcher made apparent some deficiencies in the
way the dialog helpers were being hidden. In particular, we would not stop
a dialog helper's modal loop when closing the dialog, resulting in the
auto-tests hanging. Also, since the QApplication event loop is runnig with
[NSApp run] in the stack, the previous workarounds are no longer needed.

Task-number: QTBUG-24321
Change-Id: Ifba713c286638d78a699c319a15683d09714f06f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-08-29 12:44:24 +02:00
David Faure
5eb91476f1 tst_qthreadpool: fix flaky test I introduced in last commit
(dacf9961da)
In order to see 2 active threads, we must check activeThreadCount() before
the runnable finishes.

Change-Id: I1a48b41e0c1fd81a65d915b9bd1e741ff267ed2b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-29 10:25:01 +02:00
Thorbjørn Martsum
6ee9baf044 QLinkedList - extend the auto test.
This extends the QLinkedList auto test. This is copy paste
with small edits from the QList auto test.

Change-Id: I5bce7ee304998d1c7258f11b2f31a7fb87706936
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-29 08:16:44 +02:00
John Layt
ad77048d1f QDateTime - Extend fromMSecsSinceEpoch API
Add convenience methods for fromMSecsSinceEpoch() and
fromTime_t() to enable direct creation of other time specs
than LocalTime without the overhead of unncessary conversions.

For example instead of:
  QDateTime dt = fromMSecsSinceEpoch(12345).toUtc();
the following saves two conversions:
  QDateTime dt = fromMSecsSinceEpoch(12345, Qt:UTC);

This will improve the performance of the new QTimeZone class.

[ChangeLog][QtCore][QDateTime] Added convenience methods for
fromMSecsSinceEpoch() and fromTime_t() to take time spec to be used in
returned datetime.

Change-Id: I133635bfe3d35ee496a287257e13b2d600225a38
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-08-29 00:32:08 +02:00
John Layt
13c16bbd06 QDateTime - Improve and expose Qt::OffsetFromUtc
The Qt::OffsetFromUtc TimeSpec was made public in Qt 4.4 but the access
methods were never made public in the apidox effectively meaning the
feature was never used.  The implementation was also incomplete and
inconsistent.

This change cleans up the implementation and exports new public API for
using the TimeSpec using new method names consistent with the new
QTimeZone support.

This change increases the QDataStream Version number for Qt 5.2 to 15.

The behavior of one constructor has changed slightly to be consistent
with the rest of the feature, but this behavior was never documented.

[ChangeLog][QtCore][QDateTime] Fully implement support for Qt::TimeSpec
of Qt::OffsetFromUTC, added new methods for offsetFromUTC(),
toTimeSpec(), and toOffsetFromUTC().

Task-number: QTBUG-26161
Task-number: QTBUG-29666

Change-Id: If3cc7fc9778ca2b831644408ae749448d5975a3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-08-28 19:08:14 +02:00
Friedemann Kleint
e9c771d6cc Stabilize tst_qmenubar.
The test was re-using a main window and menu bars for all tests,
clearing and repopulating them. Rewrite the code to be able to
use menu bars and windows on the stack separately for each test.

Change-Id: I13ab31b26b70bc8537e8d8ab164051b3197cd68e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-28 15:50:28 +02:00
Peter Hartmann
627a394fb7 network test settings: support newer FTP server versions
... which are used by the new test server image.

Change-Id: I72ffa73d3e254b278fb9063d32b633b156bd3ec0
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-28 12:45:34 +02:00
Thorbjørn Martsum
fd871694e7 QButtonGroup - add buttonToggled signals
QButtonGroup emits signals on clicked, pressed and released for
buttons in the group, but for some (insuffienct) reason it did
not emit anything for toggle (the only signal that it didn't emit
anything for).

This patch changes that, by adding handling of that signal to
QButtonGroup.

Task-number: QTBUG-14857

Change-Id: I88bcd7b060b78c7ff05ea1adf7baaddfe6d463be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-08-28 12:15:43 +02:00
Frederik Gladhorn
190fa97c83 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	examples/widgets/doc/src/addressbook-fr.qdoc

Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
2013-08-27 22:51:09 +02:00
Paul Olav Tvete
f3c019649b Test layout engine fundamentals
Done with Jan Arve

Task-number: QTBUG-33104

Change-Id: I8319748536d448d1c37a26527ced53156d8c2f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-08-27 22:00:48 +02:00
Friedemann Kleint
78d7192338 Close menu on 2nd click on QMenuBar.
Task-number: QTBUG-32807
Change-Id: I0c3c25c6acf92bc30c1bcfc09003209b572ec777
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Friedemann Kleint
5bb4817142 Center widgets using UpdateWidgets in tst_qwidget.
Try to stabilize doubleRepaint and others, try to get them away
from taskbar areas.

Change-Id: Icae8da575999afccb314edafd7deb16446e3d1c2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-27 19:12:06 +02:00
Peter Hartmann
2109965a4e QTcpSocket auto test: rely on IMAP port, not SMTP port
The new test server image will not have a SMTP service installed, and
the network self test does not check for that either.

Change-Id: I1063777832148e184de4ddf21d9154364f644e1e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-27 19:12:06 +02:00
Peter Hartmann
5cb6260a36 QNetworkReply auto test: Skip tests failing due to Squid issues
This test works with no Qt version (4 or 5) when testing with the
Squid (HTTP proxy) version deployed on the new test server image.

Task-number: QTBUG-33180
Change-Id: If244526a4baed9f3836dade007fe0f15649a8f86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-27 19:12:06 +02:00
Sean Harmer
a70c0ad1d1 Add operator[] to QVectorND classes
Change-Id: Ia786d4fab64da974bb60f24c05325925d42a1e70
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-08-27 17:50:40 +02:00
Mitch Curtis
507f1889e2 Add QJsonValue::toInt().
It's a nice feature to have.

MSVC also complains about using doubles to create enum values, so
the ugly workaround is:

enumValue = MyEnum(qRound(json["myEnumValue"].toDouble()));

[ChangeLog][QtCore][QJsonValue]Added QJsonValue::toInt().

Change-Id: I1a200b912abf66b2e96390b1980caff26cfa2685
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-27 08:01:29 +02:00
Thorbjørn Lund Martsum
934f062203 QAIV - Fix scollbars with ScrollPerPixel to scroll 1 pixel.
The documentation says that we scroll one pixel

Quote:
"QAbstractItemView::ScrollPerPixel  (value 1)"
"The view will scroll the contents one pixel at a time."

However until now Qt has tried to be smarter than the
documentation, but is actually getting in the way of the user,
where a manual set value to setSingleStep will continuingly
be overwritten (on e.g resize).

This patch ensures the behavior described in the documentation
for the vertical headers - and leaves the control to the user.

[ChangeLog][QtWidgets][QAbstractItemView]  QTBUG-7232 - In ItemViews
scrollbars will now by default only scroll 1 pixel when scrollMode
is set to scrollPerPixel. That is it will (when scrollMode is
scrollPerPixel) do what is stated in the documentation, and no
longer automatically adjust the scrollbars singleStep. The user
can now control that value.

Task-number: QTBUG-7232

Change-Id: I8a61d3100be65d0c4ee32aad58caed019aa2669c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-26 09:40:59 +02:00
David Faure
404598b613 Long live QCommandLineParser!
The QCommandLineParser class provides a means for handling the command line options.

QCoreApplication provides the command-line arguments as a simple list of strings.
QCommandLineParser provides the ability to define a set of options, parse the
command-line arguments, and store which options have actually been used, as
well as option values.

Done-with: Laszlo Papp <lpapp@kde.org>

Change-Id: Ic7bebc10b3f8d8dd06ad0f4bb897c51d566e3b7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 21:33:39 +02:00
Thorbjørn Martsum
c35b55f076 QLinkedList - fix insert with iterator when the list is shared.
Before a call to erase on a shared instance would imply that the
item was inserted into the shared data (i.e all instances)

Change-Id: I655ccf04b1ad9bf82e6bfade58929538fa7df000
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
97f867212f QList - fix insert with iterator on shared instance
This patch ensures correct detach when insert with an iterator is
called on a shared instance (i.e same behavior as QVector)

Change-Id: Id660eacd3cc7b633456dfa989997bbad747e1df2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
ea25495703 QLinkedList - fix erase with iterator when the list is shared.
Before a call to erase on a shared instance would imply that the
item was removed from the shared data (i.e all instances)

This patch improves the behavior to detach and erase the item
specified by the iterator (i.e same behavior as QVector)

Change-Id: Ib3cfb5363c86b400886c80b75b0c20ca854ce801
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
5fc13cc06a QList - fix QList::erase when the list is shared
Before calls to erase on a shared instance would in release mode
imply that items were removed from the shared data (i.e all instances).
In debug mode it would assert.

This patch improves the behavior to detach and erase items
specified by the iterator(s) (i.e same behavior as QVector)

Change-Id: I89b69446cb1ffd43a98402b7ab1ec9a59bceb8e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
a5c7a9032e QMap - fix erase with iterator when the map is shared
Before a call to erase on a shared instance would imply that the
item was removed from the shared data (i.e all instances)

This patch improves the behavior to detach and erase the item
specified by the iterator (i.e same behavior as QVector)

Change-Id: Ia44db84fc1388d92308bf0d2b32539ac4d53850b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
Thorbjørn Martsum
93ffb81df6 QHash/QSet - fix QHash::erase when the hash is shared
Before a call to erase on a shared instance would imply that the
item was removed from the shared data (i.e all instances)

This patch improves the behavior to detach and erase the item
specified by the iterator (i.e same behavior as QVector)

Since QSet uses QHash it improves QSet the same way.

Change-Id: I850b1efcf7bdfc85ceddb23128b048af95f75063
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 15:36:30 +02:00
David Faure
dacf9961da QThreadPool: fix counting of waiting threads
QTBUG-21051 has a testcase where activeThreadCount() could actually
end up at -1 (converted to an autotest in this commit).
The reason was: start() calls tryStart() which returns false due to
too many active threads (reserveThread() causes this), so it calls
enqueueTask() - which actually wakes up the waiting thread, but
it didn't decrement the number of waiting threads.

Note that tryStart() is "if I can grab a waiting thread, enqueue task and wake it"
while start(), in case tryStart() fails, wants to "enqueue, and then if I can grab
a waiting thread, wake it". This is why enqueue shouldn't wake; waking must happen
only if we can grab a thread (d->waitingThreads > 0).

Task-number: QTBUG-21051
Change-Id: I3d98337103031c9bdf0bf365295f245be0c66aa7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-24 13:09:46 +02:00
Thiago Macieira
7c2a418857 Add unit test to ensure %3A in a path isn't decoded to ':'
QUrl("http%3A%2F%2Fexample.com") has only a path of
"http%3A%2F%2Fexample.com". In Qt 5.0 and 5.1, the %3A would get decoded
to ':', which in turn makes the URL invalid (colon before first slash).

Found via discussion on the interest mailing list.

Change-Id: I7f4f242b330df280e635eb97cce123e742aa1b10
Reviewed-by: David Faure <david.faure@kdab.com>
2013-08-23 21:39:23 +02:00
Andy Shaw
1baf293548 Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformTheme
Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is
really only for the native dialogs then the SnapToDefaultButton hint is
moved as it has relevance for all dialogs

Task-number: QTBUG-32631

Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-23 08:42:35 +02:00
Stephen Kelly
48f332f802 Add more comparisons to narrow down error case.
Task-number: QTBUG-32927

Change-Id: I83d6def83c37febd8cd83676bff9d74f364ecfad
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
2013-08-22 19:14:03 +02:00
Olivier Goffart
8a96679493 moc generated code should compile with QT_NO_KEYWORDS
Don't use the 'emit' keyword in the moc generated code for properties
with MEMBER

Task-number: QTBUG-33094
Change-Id: I5a0950e9c7a0dee347a6a6c79098e3e7d4776014
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 16:03:28 +02:00
Olivier Goffart
2bd40c53ef moc: Fix related objects containing itself
This may happen when we have namespaces and the qualified name is used
to scope an enum.

Task-number: QTBUG-32933
Change-Id: Ic4923bbfb138387bae1e3694172661ace8342089
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 16:03:28 +02:00
Olivier Goffart
c20b358703 moc: Issue a warning instead of an error when macro argument mismatch
moc's C++ is not 100% accurate, so better process the invalid macro with
a warning rather than an error.

Such errors occurred in the QSKIP macro with variadic arguments since
that macro is defined conditionally.
It is also causing problem in boost header (cf task QTBUG-29331)

Task-number: QTBUG-29331
Change-Id: Ice6a01b675286540d6470c8e36920b7efd39b540
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-22 07:11:33 +02:00
Thiago Macieira
c374f4441a Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-08-22 02:04:39 +02:00
David Faure
1de1470189 QUrl: Use decoded mode by default for individual getters/setters.
This fixes the wrong value for path() and fileName() when a
path or file name actually contains a '%'.

userInfo() and authority() are not individual getters, they combine
two or more fields, so full decoding isn't possible (e.g. username
containing a ':').

[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now
defaults to decoded mode in the getters and setters for userName,
password, host, topLevelDomain, path and fileName. This means a '%'
in one of those fields is now returned (or set) as '%' rather than "%25".
In the unlikely case where the former behavior was expected, pass PrettyDecoded
to the getter and TolerantMode to the setter.

Change-Id: Iaeecbde9c269882e79f08b29ff8c661157c41743
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:44 +02:00
David Faure
f874a5dd8b QUrl: fix host(FullyDecoded), it shouldn't trigger EncodeUnicode.
Change-Id: I9a62d5eb8b099b659cfcfc591c983b3d73ca9569
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:33 +02:00
David Faure
e8bc599a74 tst_qgraphicsproxywidget: fix memory leak
Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-21 23:49:59 +02:00
Sergio Ahumada
7978cef796 tests: Make the QT assignments more explicit
Remove unused 'QT -= gui' and replace some others with
'QT = core ...'

Change-Id: I2d14fae963afc21dbd21a4acdbba2c30cdf8fa61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-21 19:05:52 +02:00
Stephen Kelly
8074693425 CMake: Allow specifying a TARGET in invocations of macros.
Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros:
Allow specifying a TARGET in invokations of macros., 2013-02-26)
from cmake.git.

This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be
used from the specified target when running moc.

Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
ee50096830 Populate INTERFACE_LINK_LIBRARIES property in the cmake files.
This is new in CMake 2.8.12 and replaces the old properties
matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>.

Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
74a153e4b8 Add debugging output to randomly failing test.
The result at

 http://thread.gmane.org/gmane.comp.lib.qt.ci-reports/12118

shows an unusual value. The expected output is

 QDEBUG : tst_QColumnView::scrollTo() last= 0  ; HorizontalOffset=  -256
 QDEBUG : tst_QColumnView::scrollTo() last= -256  ; HorizontalOffset=  -512
 QDEBUG : tst_QColumnView::scrollTo() last= -512  ; HorizontalOffset=  -768
 QDEBUG : tst_QColumnView::scrollTo() last= -768  ; HorizontalOffset=  -1024

Change-Id: I8db091f4390cb1a41547d44ca966d172ac278e1a
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Peter Hartmann
fcd212e7ba QNetworkReply auto test: adapt to new session life time
... supported on the new test server. Once the new server image is in
place, we can only allow for the new life time hint of 300 seconds.

Task-number: QTBUG-33040
Change-Id: Id6ad9983789cc6badf3fc2f6628bf79379988201
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-21 14:48:04 +02:00
Frederik Gladhorn
c8ca300e49 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/src.pro

Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
2013-08-21 11:03:18 +02:00
John Layt
2f2a799f3d QDateTime - Fix tests to correctly restore time zone
The unit tests were caching the original TZ value to restore later
after testing with different TZ values.  The problem is reading TZ will
return a null value if no override TZ value is set, and if you then set
the TZ to null the system assumes UTC and not the system time zone.
Instead we need to unset TZ if it was null to start with.

Change-Id: Ib0625b1712e565f9fdfa99e2ffe1e5d74f059354
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 01:20:01 +02:00
Oswald Buddenhagen
b4c0d9166e change reporting of missing files
use the new parser flags to report all i/o errors directly.

as a notable side effect, the "WARNING" prefix is gone (even though
it is still treated like that, which is mildly insane to start with).

Change-Id: I084375d5e7a3314ae763795f7c318804a9fb84b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-20 22:56:12 +02:00
David Edmundson
725bdc3fd2 Fetch StandardKey shortcuts from QPlatformTheme
This allows platforms to dynamically alter their keyboard
shortcuts, for example if they are user-configurable on that
platform. Current behavior remains the same.

QEvent previously used the hardcoded values in QKeySequencePrivate so
this was modified to use QKeySequence::keyBindings().

In order to keep the speed of QEvent's former binary search, we moved
this code to QPlatformTheme::keyBindings(), making it faster for all
keyBinding lookups.

As we now need to search by StandardKey instead of by shortcut the list
is reordered and a test is changed to reflect that.

Change-Id: Iefb402fbbe8768be2208ce036f3c2deed72dcc6c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-20 22:22:21 +02:00
Rohan Garg
e2322c885f Extend QStyle API with a SH_Splitter_OpaqueResize styleHint
Currently the default for QSplitter::opaqueResize is hard coded,
which is less than ideal. Instead this should be provided as a
style hint via QStyle so as to give a more uniform look to all
applications.

Change-Id: I5711811f7b672e36aafcd292ed320308570a0390
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-20 20:09:20 +02:00
Frederik Gladhorn
cbb4a88262 Skip tst_QGraphicsProxyWidget::deleteProxyForChildWidget on Win
This tests crashes a lot lately.

Task-number: QTBUG-29684

Change-Id: I6892238dc071f050b0208dd5b4843629fa707347
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-20 17:59:39 +02:00
David Faure
2ccf995725 tst_qgraphicsproxywidget: skip crashing test on Mac/Windows.
Created QTBUG-33067 for tracking the issue, after some debugging.

Change-Id: Iaf5556db2e0858e40a7cf6c9dbbe7e6fd6120bac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-20 17:59:27 +02:00
Simo Fält
d91afa1558 QtBase: Skip some tst_qwidget steps in Ubuntu 11.10
Same steps keeps failing on Ubuntu 11.10 without valid reason.

Task-number: QTBUG-30566
Change-Id: Ic7bf65496ff9ad9c4fdef42a30b808aa2c45a1e5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-19 14:24:28 +02:00
Giuseppe D'Angelo
76f32cadb2 Fix QGraphics(Ellipse)Item autotest
Change-Id: I6d5d702e97a0186979bd3bdcd0526d53afeecbd8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-19 14:24:28 +02:00
Giuseppe D'Angelo
a45d8edb6c Fix QPointF::division autotest
Change-Id: I567c1252b63aff4273bf15c0d52817f058ea0703
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-19 14:24:28 +02:00
Sergio Ahumada
b0b754632e test: Skip some more qsslsocket flaky tests [part 2]
Task-number: QTBUG-29941
Change-Id: I28e71f952fcade6ab0aa76db71a1e2f408952830
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-16 17:08:24 +02:00
Frederik Gladhorn
e727855476 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-08-16 16:02:19 +02:00
Corentin Jabot
0d8ba7e349 QThreadPool - Add method clear() to remove queued QRunnable.
QThreadPool::clear() method removes all queued QRunnable.

When a large number of long-running tasks are queud in a
QThreadPool its destruction, which calls waitForDone(), can
be quite long.
QThreadPool:clear() removes (and deletes when appropriate)
all QRunnable that have yet to be started from the queue
enabling a faster interruption.

Change-Id: Ie5d6028ad3cfe7e439d1db068c8d0936ff818db9
Reviewed-by: David Faure <david.faure@kdab.com>
2013-08-16 15:43:53 +02:00
Thorbjørn Martsum
f633bc7f7f QHeaderView - reduce memory usage
Though the worst case memory usage was improved in
b800d8b94a the best case usage changed.

Since best case is the same as worst case in Qt5, we should
use as little as possible, which this patch ensures.

We reduce the memory usage from 3 to 2 ints per section - which is
half of worst case in Qt4. There seems to be no bigger cost in
performance doing that. The recalcSectionStartPos is still very fast.

This patch limits the maximum section size to (2^20) ~ 1.000.000 pixels.

This alleviates
Task-number: QTBUG-32325

Change-Id: I9b7530030a31b4e35cf1ca9e32c6b936f5ea9790
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-16 05:34:18 +02:00
J-P Nurmi
bff78163f6 QHeaderView::paintSection(): fix visible index handling
Sections may be hidden => QStyleOptionHeader::position must reflect the
state seen on the screen. Otherwise styles will give wrong visual
results.

Task-number: QTBUG-32203
Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-15 11:37:27 +02:00
Frederik Gladhorn
5c23199d4e Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	mkspecs/macx-xcode/Info.plist.app
	mkspecs/macx-xcode/Info.plist.lib
	qmake/doc/qmake.qdocconf
	src/corelib/global/qglobal.h
	tests/auto/other/exceptionsafety/exceptionsafety.pro
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
2013-08-14 09:06:31 +02:00
Christian Strømme
c8d9b17367 Fix crash in QProcess::waitForStarted() on Unix.
Invoking waitForStarted() on a QProcess before or after an unsuccessful
call to start() (e.g., with an empty command), would execute FD_SET with
an invalid file descriptor and cause the process to abort.
The bug can be reliably reproduced on OSX.

Task-number: QTBUG-32958
Change-Id: Id25b7781168489281645e21571361ca1a71d43e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-13 19:48:15 +02:00
Ivan Komissarov
252bad7c58 Add useful signals to QTabBar and QTabWidget
In this patch we introduce tabBarClicked and tabBarDoubleClicked to get
a finer grained information on the user interaction with the tab bar.

Done-with: kevin.ottens@kdab.com

Change-Id: I7be76a556ca09186e98f2e076fe2512d6c5e6773
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-13 19:28:31 +02:00
hjk
3c2c9649eb RCC: Make auto-test pick up the right binary
Change-Id: I30f42d40c69789eb1e292ab6bd1cf2c09d81b11b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-13 17:24:49 +02:00
Sergio Ahumada
983fa9b5cb test: Skip some more qsslsocket flaky tests
Task-number: QTBUG-29941
Change-Id: Iaf1c4834ef36db284464184639a1ab00928510cf
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-08-13 17:08:13 +02:00
Stephen Kelly
dfde98db52 Make the QItemSelectionModel test widgets-independent.
Change-Id: I695afe535ff291bc98f43185469a434cd9178926
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-13 16:34:16 +02:00
Tor Arne Vestbø
3ca9c39610 Add auto-test for running the QEventLoop test with the GUI dispatcher
Follows a similar include-pattern as the qguieventdispatcher test.

Change-Id: Ie8669a5bc155abd6687e81526f2b95d0d19b009e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-12 14:27:57 +02:00
Tor Arne Vestbø
126c1b4b41 Don't assume Q_OS_UNIX means we support QEventLoop::X11ExcludeTimers
A QCoreApplication may run a different event dispatcher, such as the
QEventDispatcherBlackberry, and QGuiApplications will have the GUI
dispatcher provided by the QPA plugin, such as QCocoaEventDispatcher.

Neither support X11ExcludeTimers.

Change-Id: Id5ea1c7dd74a127e13fa4d2eaa9a1bd2715a9dbb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-12 14:27:50 +02:00
Stephen Kelly
efc43ae83d Add some debugging information to diagnose bug.
Task-number: QTBUG-32927

Change-Id: I7d0a1ad9eeb63ac0ec28483106f42109ed1a834c
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-12 13:51:01 +02:00
Sergio Ahumada
be5225cace test: Mark tst_QFileSystemWatcher::watchFileAndItsDirectory() as XFAIL
This is a flaky test on Windows 8 64-bit, so marking it as
XFAIL if it is expected to fail.

Task-number: QTBUG-30943
Change-Id: Idd276f80b54fcd5cf295a7e1adebcf0020eaa8ca
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-08-11 00:33:50 +02:00
Sergio Ahumada
d6522b70ad test: Skip some flaky tests, but only if they are expected to fail
Task-number: QTBUG-29941
Change-Id: Ieca736c26711fa292855b3281229282628dce608
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-10 22:31:42 +02:00
Thiago Macieira
73251f22f3 Add a Qt-API style QStandardPaths::setTestModeEnabled
QStandardPaths::enableTestMode has a verb in the imperative ("enable")
as the core word in the name. That indicates an action. The function
should not have had a parameter.

Instead, add a Qt-style setXXXEnabled function.

[ChangeLog][QtCore][QStandardPaths] QStandardPaths::enableTestMode is
deprecated and is replaced by QStandardPaths::setTestModeEnabled.

Change-Id: Ib26ad72d7c635890d2cb22ae9d44cbda08a6f17c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-08-09 21:25:24 +02:00
Sergio Ahumada
0352c74755 test: Mark tst_QGlyphRun::drawMultiScriptText2() as XFAIL
This is a flaky test on OS X 10.8, so marking it as XFAIL if it is
expected to fail.

Task-number: QTBUG-32690
Change-Id: I0665c7474bb62c4c0a70e4b93cc977e3dbf1e150
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-09 16:28:34 +02:00
Sergio Ahumada
6a56fd3069 Merge branch 'release' into stable
Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
2013-08-09 12:38:19 +02:00
Frederik Gladhorn
c98943b4cd Expect fail font family mismatch in the right place
This fixes 4ca4fb93f6
where the fix was right, just in the wrong place.

Change-Id: I3cde24624e3789870f1c16ccb92f78f7fc567fd5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-08-08 17:57:05 +02:00
Friedemann Kleint
bff5100177 Add clearButton-property to QLineEdit.
Based on addAction-API.

Change-Id: Ie6c3d2d728b23a85cdd80428c92ee8208ae0a65c
Done-with: Kevin.Ottens@kdab.com
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-08 12:55:48 +02:00
Albert Astals Cid
23214c815e Revert c3f485c525
It has been discovered it changes the behavior of qdbuscpp2xml
resulting in builds of some apps breaking. Even if the
behavior is more correct, such behavior change in a stable branch is
not acceptable

Change-Id: I1d79104ebf11c3f48c84f109be2926af96cddae7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-08 09:22:29 +02:00
J-P Nurmi
737abb8a5e QComboBox: fix item activation via completer
Task-number: QTBUG-31146
Change-Id: I64291f397d80bf934152f63e629810540abf466e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-08-08 05:58:31 +02:00
Sergio Ahumada
f8ce891d22 test: Mark tst_QSettings::ctor() and tst_QSettings::rainersSyncBugOnMac(native) as XFAIL
Mark some tests as expected failures on OS X 10.8

 - tst_QSettings::ctor(native)
 - tst_QSettings::ctor(ini)
 - tst_QSettings::ctor(custom1)
 - tst_QSettings::ctor(custom2)
 - tst_QSettings::rainersSyncBugOnMac(native)

Task-number: QTBUG-32655
Change-Id: I54928d991a8ccf300b40747feaa6fda9d124781b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-08 00:34:16 +02:00
J-P Nurmi
cffd1633b2 Fix QCompleter::activated(QModelIndex)
When falling back to the completion prefix, make sure to also pass an
invalid index to activated().

Change-Id: I6b282a01c95492466890632b77837bcc96eb038a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-08-07 18:21:23 +02:00
Jędrzej Nowacki
82e976d52c Remove exception safety tests
During Qt Contributor Summit 2013 we agreed that we will not support
exception safety anymore.

http://comments.gmane.org/gmane.comp.lib.qt.devel/12004

Task-number: QTBUG-32642
Change-Id: If57917fe8af45e787e215431c94579bc86fc7683
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-07 13:36:18 +02:00
Tor Arne Vestbø
e6218ecfb5 Improve tst_QFileInfo::compare() test, but mark as QEXPECT_FAIL on Mac
As Qt still thinks that all UNIX filesystems are case sensitive, which
is not the case for eg Mac, where they might be both, as well as for
mounts of other filesystems.

Change-Id: I07b8550685bfa17ac407c20ac991dc54df040942
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-07 12:45:13 +02:00
Dario Freddi
5885b8f775 qobject: Do not destroy slot objects inside a lock
This prevents deadlocks in case the destructor re-enters.
(Example: a functor containing a QSharedPointer of a QObject)
This also fixes a leaked slot object in disconnectHelper.

Change-Id: Ia939790e3b54e64067b99540974306b4808a77f2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-07 12:42:45 +02:00
Bernd Weimer
bf7129af97 Fixed tst_qgl for fullscreen platforms
Replaced show() with showNormal().

Change-Id: Ia6e7f34587090de5019f9ca9cb82a44e7cf495e5
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-08-07 09:01:36 +02:00
Frederik Gladhorn
4ca4fb93f6 Expect fail broken font family from QFontDatabase on OS X 10.8
Change-Id: I682d58350427975a692b523095c1c38e1891663f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-08-07 00:31:57 +02:00
Tor Arne Vestbø
9a061a0a2c Remove unused member in QEventLoop auto-test
Change-Id: Icd6a09402c3cf14286f4ba1f8f4c99ac483ec1a3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-06 22:04:11 +02:00
Sergio Ahumada
08d3b0165a test: Mark tst_QRawFont::fromFont() as XFAIL
Mark some tests as expected failures on OS X 10.8

 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=0, writingSystem=0)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=0, writingSystem=5)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=0, writingSystem=1)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=1, writingSystem=0)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=1, writingSystem=5)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=1, writingSystem=1)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=2, writingSystem=0)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=2, writingSystem=5)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=2, writingSystem=1)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=3, writingSystem=0)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=3, writingSystem=5)
 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=3, writingSystem=1)

Task-number: QTBUG-32654
Change-Id: I46d64852ccb751824a2eff68513389baa52c1baf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-06 22:04:11 +02:00
Pasi Petäjäjärvi
ea14a63083 Include sockLib header to enable usage of socket functions on VxWorks
Functions normally found from <sys/socket.h> are available on VxWorks
from <sockLib.h> header.

Change-Id: I2263ec40ba9f37bc95755b633fb43d66ceb2777c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-08-06 11:00:23 +02:00
Sergio Ahumada
79d7fd924e tst_qfilesystemmodel: increased test's permitted runtime
This test has recently timed out a few times on OS X test runs, with
no relevant changes to account for the timeout.

Task-number: QTBUG-27890
Change-Id: Ia24f7812ed2a0b3eac51847a7dacbc9f225b48b8
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-06 08:30:20 +02:00
Friedemann Kleint
9ce12cc8de Add side widgets to QLineEdit via QAction.
Add QLineEdit::addAction() overloads,
allowing for a variable number of icons or user-defined
widgets.

Change-Id: Id298f18c2f47cc998170357e65cc6098df851aab
Done-with: Kevin.Ottens@kdab.com
Reviewed-by: Thomas Zander <zander@kde.org>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-06 08:19:38 +02:00
Andreas Aardal Hanssen
8fce4e97ba Fix double transform for items ignoring parent transformations.
Previously, the topmost untransformable's scene transform, which
includes the item's position and local transformation, was used to
determine the item's anchoring position. This position was then
passed on to be multiplied by the item's transform again. This
works fine for toplevel untransformable items that don't have any
transform set at all, but those who do would have their transforms
applied twice - one to determine the anchoring position, and again
to transform the item itself. Since only translation transformations
can affect the first operation (the anchoring pos), this bug only
applies to items that set ItemIgnoresTransformations and use a
local transform that includes translation.

Task-number: QTBUG-21618
Change-Id: I772d52d59dfd9f242d0140632a87e9c68dfe0ea1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-08-05 20:15:53 +02:00
Liang Qi
55e22cfe0e OSX: Make machtest compile on 10.9
Added the compiler options, we need the info of sdk.

Task-number: QTBUG-32715
Change-Id: I70612f36a16e0ab5025194a10ce399822e159c7c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-05 17:58:24 +02:00
Tor Arne Vestbø
12571cc095 Fix tst_QFile::caseSensitivity on OS X
By not assuming that the file system is case insensitive. OSX supports
both.

Change-Id: I11a4ac4cdff97b97b183dd319757a42ae14bb52d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-05 17:20:13 +02:00
Tor Arne Vestbø
d66d912c53 Fix tst_QCompleter::directoryModel() on OS X
By not assuming that we have the '/Developer' directory at the root
of the file system. 'Users' is less likely to be removed/deprecated.

Change-Id: I659bdb67cfb1ed2f73bc643ba4afe1f1f89d5bc5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-05 16:53:17 +02:00
Eskil Abrahamsen Blomfeldt
3b12fa2c04 Fix clean-up code in Android autotest script
If the files directory is not world-readable as well as
writable, the "rm *" command will fail because it cannot list
the files to delete.

Task-number: QTBUG-32079
Change-Id: Idb32a2be3184b9ffc43d011136fcc6f2a2a01756
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
2013-08-05 14:53:18 +02:00
Eskil Abrahamsen Blomfeldt
d05ce9c61e Android: Enable script to run single autotest
To make it easier to debug failures, adds the "testcase"
commandline option, which takes the name of the test to
run and then just runs this single test.

Change-Id: Ib202bb2a5dac889b6691f9c4d0620b3e0941cf3d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-08-05 14:53:06 +02:00
Sergio Ahumada
13d7823ef7 tests: Enable some itemmodels tests that don't depend on Qt Widgets
Make qabstractproxymodel and qidentityproxymodel build and run
even if -no-widgets is used since they don't depend on Qt Widgets.

Change-Id: I48bc2f6a78812b1bf0083f76c6a4e106f4e38650
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-05 13:26:15 +02:00
Thiago Macieira
c615dcc441 QUrl: do not decode "#" in fragments
For some time, we've assumed that the URL specification had a mistake in
that it didn't allow the "#" character to appear decoded in the
fragment. We've gotten away with it so far.

However, turns out that the CoreFoundation NSURL class doesn't like it.
So we have to be stricter.

[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no
longer decodes %23 found in the fragment to "#" in the output of
toString(QUrl::FullyEncoded) or toEncoded()

Task-number: QTBUG-31945
Change-Id: If5e0fb37bae84710986c9ca89bd69ec98437cd63
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-08-04 04:48:35 +02:00
Thiago Macieira
7b964c77fa Make sure that QUrl::FullyDecoded mode uses U+FFFD for bad UTF-8
It's a good practice to always replace bad UTF-8 sequences with the
replacement character. It could be considered a security issue too.

Change-Id: I9e7d72e4c4102cdb8334449b5e7f882228a9048f
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-08-04 04:48:13 +02:00
Thiago Macieira
1fa5ea7a6a Remove fully-decoded QUrl user info and authority sections
Those sections contain more than one components of a URL, separated by
delimiters. For that reason, QUrl::FullyDecoded and QUrl::DecodedMode do
not make sense, since they would cause the returned value to be
ambiguous and/or fail to parse again.

In fact, there was a comment in the test saying "look how it becomes
ambiguous".

Those modes are already forbidden in the setters and getters of the full
URL (setUrl(), url(), toString() and toEncoded()).

[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no
longer supports QUrl::FullyDecoded mode in authority() and userInfo(),
nor QUrl::DecodedMode in setAuthority() and setUserInfo().

Change-Id: I538f7981a9f5a09f07d3879d31ccf6f0c8bfd940
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-08-04 04:48:05 +02:00
Thiago Macieira
993bbb4d4b QUrl: update our understanding of the encoding of delimiters
The longer explanation can be found in the comment in qurl.cpp. The
short version is as follows:

Up to now, we considered that every character could be replaced with
its percent-encoding equivalent and vice-versa, so long as the parsing
of the URL did not change. For example, x:/path+path and
x:/path%2Bpath were the same. However, to do this and yet be compliant
with most URL uses in the real world, we had to add exceptions:
 - "/" and "%2F" were not the same in the path, despite the delimiter
   being behind (rationale was the complex definition of path)
 - "+" and "%2B" were not the same in the query, so we ended up not
   transforming any sub-delim in the query at all

Now, we change our understanding based on the following line from
RFC 3986 section 2.2:
   URIs that differ in the replacement of a reserved character with
   its corresponding percent-encoded octet are not equivalent.

From now on, QUrl will not replace any sub-delim or gen-delim
("reserved character"), except where such a character could not exist
in the first place. This simplifies the code and removes all
exceptions.

As a side-effect, this has also changed the behaviour of the "{" and
"}" characters, which we previously allowed to remain decoded.

[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no
longer considers all delimiter characters equivalent to their
percent-encoded forms. Now, both classes always keep all delimiters
exactly as they were in the original URL text.

[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no
longer decodes %7B and %7D to "{" and "}" in the output of toString()

Task-number: QTBUG-31660
Change-Id: Iba0b5b31b269635ac2d0adb2bb0dfb74c139e08c
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-08-04 04:47:33 +02:00
David Faure
672fcbe9c6 QMimeDatabase: Fix handling of duplicate mimetype definitions (2/2).
7721c3d27c fixed the case where two similar definitions are in the same
directory. This commit fixes the case where two similar definitions are
in different directories, both in the search path (GenericDataLocation).

If the file extension gives us the same mimetype twice, there's no conflict,
i.e. no reason to fallback to determination from contents.

Change-Id: I72c56004b6d5e88964159e53ec160ce8b06c2264
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-03 14:44:12 +02:00
Jake Petroules
e440b35bb3 Update Info.plist templates to use the current standard plist format.
Change the version number to 1.0, and use the public doctype.

Change-Id: I9b071c80c410c31c38813c4447edd7b186226fab
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-08-02 05:42:37 +02:00
Simon Hausmann
3745b0ca12 Fix application font population on OS X
This patch fixes two issues that prevented the application font related tests
of tst_QFontDatabase from passing:

* The code for creating the font descriptor after the registration of an app font
  with file name using CTFontDescriptorCreateWithAttributes must create a dictionary
  with kCTFontURLAttribute as key and the CFURLRef pointing to the on-disk file as
  value. Unfortunately the code mixed up keys and values in the dictionary.

* Registration of app fonts within QFontDatabase itself on Windows and Fontconfig
  platforms works by QFontDatabase calling addApplicationFont on the platform db
  after calling populateFontDatabase(). It assumes that addApplicationFont on the
  platform db is capable of registering the font right away. This part was also
  missing from the Mac implementation and this patch implements it by moving the
  common registration code from a CTFontDescriptorRef out into a separate method,
  called from populateFontDatabase() as well as addApplicationFont().

Task-number: QTBUG-23062

Change-Id: Ide5e6bf277d99f3cab50ee0d4631cc3fba6d0d45
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-07-31 07:54:01 +02:00
Albert Astals Cid
c3f485c525 Expose invokables that are not slots in the xml
Without it the invocations were working but were not listed on introspection

Change-Id: Ie62f7dc3577f52b6888ddebf0392fdf51f2845d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-30 20:34:11 +02:00
Nils Jeisecke
cf3e435299 Cocoa: Make sure that resizeEvent is invoked after calling resize
The QWindow::resizeEvent documentation states that resizeEvent
is invoked after the windowing system has acknowledged a
setGeometry() or resize() request.

The Cocoa plugin however did set the platform window geometry
immediately so that the qnsview's updateGeometry returned too
early.

Task-number: QTBUG-32706
Change-Id: I1f359ab368833d174ab6740f4467b0848c290f13
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-07-30 17:24:15 +02:00
Bernd Weimer
983e921c54 Fixed QTextStream "stdin" auto tests
On some platforms (like BlackBerry) qDebug doesn't write to stderr,
so we directly write to stderr with fprintf.

Change-Id: Ib86211c98cf4da1fa2dbea4600a78e2013dc1a5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-30 09:56:40 +02:00
David Faure
cfb5dfb7e8 moc: add unittest for --ignore-option-clashes
Based on tst_Moc::frameworkSearchPath().

Change-Id: I4f44f98d62acc1a2a92739cceba731dcb5f661b6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-07-30 09:36:25 +02:00
Bernd Weimer
cebac1ae2f Avoided zero devision in cube root approximation
Halley's method to get a better approximation is omitted, if it
would include a devision by zero (INFINITY/NaN is worse).

Change-Id: Ida09326e2b5892d7cb21bcb956631c289e5b56ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-29 19:29:15 +02:00
Peter Hartmann
af96c6fed9 QHttpMultiPart: fix data corruption in readData method
When readData() is called repeatedly, we need to keep track which
part of the multipart message we are currently reading from.
Hereby we also need to take the boundary size into account, and not
only the size of the multipart; otherwise we would skip a not
completely read part. This would then later lead to advancing the
read pointer by negative indexes and data loss.

Task-number: QTBUG-32534
Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-07-29 18:08:59 +02:00
Allan Sandfeld Jensen
de8567991f Fix fillRect on RGBA8888 images
The fill color was not correctly converted before being filled into
RGBA8888 images. This patch adds a function with convertion and
adds tests for it to tst_qpainter.

Change-Id: If8b0e6db38b2794a60301842e25f377eb7216796
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-07-29 16:10:53 +02:00
Simo Fält
456a4740cc Mark tst_exceptionsafety as insignificant
We're rolling back exception safety support

Task-number: QTBUG-32642
Change-Id: I25f20b554a93f25d00cca19b3e308d6cc8fe85e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-29 05:19:12 +02:00
Giuseppe D'Angelo
5b9006bbdb Implement move-ctor and move-assignment-op for QScopedPointer
It makes sense for a QScopedPointer to be movable, for instance
for allowing instances to be returned from a function.
Ownwership of the managed pointer is still tied to one (and one only)
QScopedPointer instance.

Moreover, a move assignment operator makes sense as well, as it
implementing the equivalent of

  this->reset(other.take());

only when other is a rvalue and not a lvalue (so either it's a temporary
or it's getting explicitly moved in with std::move).

This makes QScopedPointer API's a bit closer to std::unique_ptr's one.

Task-number: QTBUG-29754
Change-Id: If1ac0c688327a67af4ad5b7ad45b439b022ed1c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-28 23:09:10 +02:00
Sergio Ahumada
06b6061b43 test: Remove insignificant mark from tst_qfilesystemmodel
Tests are passing nowaways on OS X.

Task-number: QTBUG-27890
Change-Id: I6a0a881ece844ef931cb8af51b58d33c40be4d2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-26 14:47:47 +02:00
David Faure
1aa4ad46e4 QUrl: add matches(url, options) method.
Change-Id: I534f494aecc48cc2accfcfcb692f35046250b493
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-26 04:47:18 +02:00
Simo Fält
34d2abe309 Fix for tst_qundogroup autotest in shadow build
Added full path to src dir for testdata.

Task-number: QTBUG-32535
Change-Id: I38e96216e9a016869151adf0ae995e068b8b5354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-25 11:32:29 +02:00
Simo Fält
651a03b0dd Fix for tst_qundostack autotest in shadow build
Added full path to src dir for testdata.

Task-number: QTBUG-32536
Change-Id: I5ef215d451a6407c277d2c98f21ffc35a8657e28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-25 11:32:19 +02:00