Commit Graph

3931 Commits

Author SHA1 Message Date
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
Friedemann Kleint
97378dc70e Re-enable tests tst_qgraphicsproxywidget, tst_qgraphicswidget.
Task-number: QTBUG-25294
Task-number: QTBUG-20778

Change-Id: I6b6e19e812d5527465c6162e2df2e4807cf160da
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-07-24 22:16:58 +02:00
Sergio Ahumada
509ed01c85 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-07-24 15:09:38 +02:00
Kevin Ottens
288e50227d Add the RFC2822Date format
QDateTime can now be converted to strings compliant to RFC 2822.
Additionally, it supports RFC 850 and RFC 1036 during parsing.
By having them all together, all type of dates found in exchanged
messages on the internet (including USENET) get supported.

Change-Id: I771066c23f409d20b31b7d802f37852ea68ca2a0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-24 15:02:35 +02:00
Friedemann Kleint
77833b90c8 Fix crashes when invoking toVariant() on empty QJsonValue objects.
Change-Id: I51cd114e862c6fad564484e990348f324ad56ab9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-07-24 10:56:07 +02:00
Allan Sandfeld Jensen
36e6376755 Support RGBA image format
Support the byte-ordered RGBA format which is used by OpenGL, and many
endian neutral byte formats.

Task-number: QTBUG-32201
Change-Id: I77cffb4c30c69545fa96ded2f537b2ebd9351acb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2013-07-23 16:30:06 +02:00
Frederik Gladhorn
084c5b3db7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp

Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
2013-07-23 11:18:11 +02:00
Stephen Kelly
782ed5eebb Don't check for the existence of private include directories.
Some packagers don't want to install the private headers.

Check the existence of private headers only if the 'Private' component
is specified when finding the package.

Task-number: QTBUG-32466
Change-Id: I1fdbfb25e8ce485cd051564b937f766b2733741a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-22 15:41:45 +02:00
Ivan Komissarov
16579e5b84 Prevent QLineEdit from emitting edited signal (QTBUG-27347)
edited() signal should not be emitted when QValidator fixups
text in a lineedit.

Change-Id: Iccef45c4b858a65fd5097dc9e5033cefb09ad889
Reviewed-by: David Faure <david.faure@kdab.com>
2013-07-21 15:52:24 +02:00
Thiago Macieira
b02eb3b436 Ensure that the user codecs are listed in QTextCodec::availableCodecs
Codecs registered by creating new QTextCodec instances should be listed
there.

Task-number: QTBUG-32500
Change-Id: I56c00e0d6bbfef55a6cbd571bcf9aa2cf333ef3a
Reviewed-by: David Faure <david.faure@kdab.com>
2013-07-21 07:30:48 +02:00
Thiago Macieira
d040681b6f TestLib: align the colons so the "actual" and "expected" align too
Before:
FAIL!  tst_testcase::testcase: Compared values are not the same
   Actual   (actual): F0O
   Expected (expected): FOO

Now:
FAIL!  tst_testcase::testcase: Compared values are not the same
   Actual   (actual)  : F0O
   Expected (expected): FOO

Change-Id: I6f0768e4ef53e065b85a56879cecbad06fa34aef
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-07-21 03:01:06 +02:00
David Faure
d5d07f26f6 QUrl: let StripTrailingSlash remove multiple trailing slashes
Change-Id: Ic4c8f70bb729630d9110ed6766dd9e40f9ab4d80
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-20 21:04:29 +02:00
David Faure
0f062f42b9 QUrl: add fileName() method. Complements QUrl::RemoveFilename.
Change-Id: Ieda43364214c3b7aee43040e176e29ad48c14271
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-20 21:04:16 +02:00
Simo Fält
bd1dc60d65 Expect tst_QEasingCurve::setCustomType() failing on 32 bit Ubuntu 11.10
Currently tst_QEasingCurve::setCustomType() is always failing on CI
when ran on 32 bit 11.10 Ubuntu.

Task-number: QTBUG-32432
Change-Id: Iaf346c14985f14716692fe996714b7040fb70930
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-20 11:21:51 +02:00
Thiago Macieira
9d0ff90760 Make QUrl store the first bad IPv6 character in the error string
Change-Id: I9a0a521ff5c3188ba6f862e2b91369cb61787359
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:08:16 +02:00
Thiago Macieira
9063119268 Make QIPAddress::parseIp6 return the first bad character
In case of undetermined error, returns end.

Change-Id: Ic5d16bab5fc56ad24f19da25f73f9b844ce11d3f
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:08:08 +02:00
Thiago Macieira
6130bb22e7 QUrl: Uppercase the version number in IPvFuture
We don't know what it might be used for. The RFC for URI says it's an
HEXDIG, and since we uppercase all other HEXDIGs already (in
percent-encodings...).

Change-Id: I56d0a81315576dd98eaa2657c0307d79332543a5
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:07:02 +02:00
Thiago Macieira
3d77406e27 Make the URL Recode function to fix bad input in FullyDecoded mode too
So far, this function hasn't been used for input coming in from the
user, so it wasn't necessary. But we may want to do it, or we may
already be doing it accidentally somewhere that isn't triggering the
failed assertions during unit testing.

So let's be on the safe side and allow it. And test it too.

Change-Id: Ib63addd8da468ad6908278d07a4829f1bdc26a07
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:06:34 +02:00
Thiago Macieira
b60cac3602 Fix IPvFuture use in QUrl
We have no idea what it might contain, but test it anyway to make sure
it works. Turns out there were a few bugs the unit tests have now
caught.

Change-Id: I0a6c868365feec31c2360b3c341c8ca6944f4352
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:06:16 +02:00
Thiago Macieira
393865be2a Fix QUrl parsing of IPv6 hosts with encoded colons
Registered names and IP addresses can only contain unreserved
characters (letters, digits, dots, hyphens, underscores) and the
colon, which is a gen-delim. For registered names and IPv4 addresses,
we can simply use the default config -- if anything that remains
percent-encoded, it means it's not a valid hostname anyway.

For IPv6, we just need to decode the colon.

Change-Id: If8083d47f6e5375f760e7a6c59631c89e4da8378
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-20 05:06:11 +02:00
Thiago Macieira
53bcd63061 Make the Mach-O size checking a little more robust
It's not necessary to check at every point if we know the minimum file
size: it must contain at least the header, one segment (__TEXT) and one
section (qtmetadata). Most files have more than one segment and more
than one loader command, so this check does not mean we can eliminate
the checks further down.

Also be more resilient against corruptions in the header data: check not
only the additions, but the values themselves. For example, an offset +
size addition could be smaller than the file size when the addition
overflows in 32-bit. Another thing is that the cmdsize fields could be
corrupt too.

Change-Id: I7968a769c1cbe9150270c91823cafc4f8f833876
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-07-20 02:09:41 +02:00
Thiago Macieira
62d636a666 Add a Mach-O decoder to the QPluginLoader
We already had an ELF decoder, which helped us greatly to find the
metadata and that catches most Unix systems (Solaris, QNX, HP-UXi, and
all of the free Unixes). On other Unix systems, aside from Mac OS X,
we simply scanned the entire file for the signature. On Windows, even
without a COFF-PE decoder, we use a LoadLibrary trick to load the
plugin without loading the dependent libraries. In most cases, that
works.

Unfortunately, on Mac OS X we didn't have a decoder and nor could we
do the file scan: because Mac OS X binaries could be fat binaries, we
wouldn't know which architecture's signature we had found.

No more. This adds a full Mach-O decoder to QtCore. It is also capable
of finding the boundaries of the architecture's binary, but that
functionality is disabled since all Qt 5 plugins have plugin metadata
sections.

Change-Id: I2d5c04c5ecf024864b8a43f31ab6b7e6c5eae9ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-20 02:09:26 +02:00
Thiago Macieira
bfc5bb09c4 Ignore or suppress warning and debug messages in tst_QLocalSocket
The one in tst_QLocalSocket::writeToClientAndDisconnect just needed
proper ordering: that's what waitForDisconnect is for. At the same time,
we need to make sure we get the same message from all three
implementations of QLocalSocket::waitForDisconnect (and without the
useless space at the end).

Change-Id: I21364263cf908df022df814a6a39fcb5783e84e6
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-07-20 00:22:07 +02:00
Thiago Macieira
674e79416f Fix incomplete override of QIODevice::open in QProcess and QLocalSocket
The rule for a new override is that it must still work if the old
implementation is called. The catch is that any class that derives from
QProcess and isn't recompiled will still have QIODevice::open in its
virtual table. That is equivalent to overriding open() and calling
QIODevice::open() (like the tests).

In Qt 5.0, QProcess::start() called QIODevice::open directly, not the
virtual open(), so there's no expectation that a user-overridden open()
be called. With that in mind, simply fix QProcess::start to not call the
virtual open at all.

Similarly with QLocalSocket, the calls to open were always non-virtual.

Task-number: QTBUG-32284
Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-20 00:22:03 +02:00
Thiago Macieira
4a7e37b0a3 Add a test for QLocalSocket::open
This should have been done in the commit that introduced open
(953255abab), but was missing.

Change-Id: I1c2de4ad5fa42aa5b90646e7d4d7d1b1570a0f87
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-20 00:22:00 +02:00
Friedemann Kleint
83ee168cbb Fix compilation of the tst_qnetworkreply benchmark test with QT_NO_SSL.
preConnectEncrypted_data() is called by preConnect_data().

Change-Id: I9a3fad294d88e4cb4d2f6132cf7a87945373bb7d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-19 14:16:42 +02:00
Gatis Paeglis
8609a63297 Add manual test for UNC paths
Change-Id: I25949b6fb04dc4bb976f4daea96cbab2897e15af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-19 10:10:19 +02:00
Mitch Curtis
5ec344cc77 Make *ItemBoundingRect modes work with custom shapes.
Currently, calling
QGraphicsScene::items(QPointF(0, 0), Qt::IntersectsItemBoundingRect) or
QGraphicsScene::items(QPointF(0, 0), Qt::ContainsItemBoundingRect)
will exclude items whose shape does not contain QPointF(0, 0). This is
because QGraphicsSceneIndexPointIntersector::intersect() also checks if
the point is contained within the shape, instead of just checking
if it is contained within the bounding rect.

Task-number: QTBUG-19036

Change-Id: Ie701af2a5694d40cf9b3c9c19adbb09a53a4e398
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-07-16 20:42:01 +02:00
Alberto Mardegan
9b8b6c7db8 Fix QDBusAbstractInterface::isValid() for peer connections
Do not attempt to lookup the service owner on peer connections (it will
fail).
Make QDBusAbstractInterface::isValid() return a sensible result on peer
connections, instead of always returning false.

Task-number: QTBUG-32374
Change-Id: I1b02feaffb3b255188f8d63306f89f5034a32f22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-16 18:32:14 +02:00
Friedemann Kleint
8493f5d6a3 Detect popup window correctly in modal window blocked handling.
Task-number: QTBUG-32433

Change-Id: Ida8f6237a383311bc2e231de90fd54b90ebd1508
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-16 16:28:11 +02:00
Friedemann Kleint
aab50ad061 QGuiApplicationPrivate::updateBlockedStatus(): Recurse over children.
Task-number: QTBUG-32242

Change-Id: Ia43257a998507b9a367f41dc2395ab92cc89a118
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-16 16:28:11 +02:00
Friedemann Kleint
915f4d8c95 API-cleanup: Add QPlatformFontDatabase::registerAliasToFontFamily().
Unexport free function qt_registerAliasToFontFamily() and
Make it a static member of QPlatformFontDatabase instead.

Change-Id: I1df49a8e37a24b3961f92288d67b6f1108a7d520
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-07-16 16:02:51 +02:00
Sergio Ahumada
d309574c03 tst_QIcon: Fix availableSizes() and task223279_inconsistentAddFile()
Copy some needed files into a local folder when QtWidgets is not
available.

Task-number: QTBUG-31993
Change-Id: I93b65bda198c22a60e979c119de8de683a78bb53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-15 16:28:25 +02:00
Sergio Ahumada
83de0910c1 test: Mark tst_QNetworkReply::backgroundRequestInterruption() as XFAIL on OS X 10.8
Task-number: QTBUG-32435
Change-Id: Ibc4495126b066c17e6a4477f403677b9fc9da453
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-15 16:21:15 +02:00
Sergio Ahumada
a0640d328f test: organize tst_qnetworkreply .pro file a bit
- Don't run this test in parallel
 - Remove redundant QT=-gui
 - Place the insignificant_test marks together

Change-Id: I078fa29a4dccef9af8798792d06d51835b4b8934
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-15 13:49:59 +02:00
Frederik Gladhorn
1190863fc0 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f
2013-07-15 10:36:59 +02:00
David Faure
a7bc4e8494 QUrl: add NormalizePathSegments to UrlFormattingOptions
This is a bit like QDir::cleanPath(), but for URL paths.
The code is shared with QDir::cleanPath(), by extracting the common parts
it into a helper, qt_normalizePathSegments().

Change-Id: I7133c5e4aa2bf17fba98af13eb5371afba64197a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-13 17:11:59 +02:00
Thorbjørn Martsum
659f62981f QVarLengthArray - check if iterators arguments are valid (in debugmode)
This add checks on iterators on insert and erase.

Change-Id: I41d96e038d74668cc1df10b6d42cde4b82f8a696
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-12 16:15:44 +02:00
Thorbjørn Martsum
012d3750e7 QSet - check if iterator argument is valid (in debugmode)
This adds a check on erase that the iterator is from the set.

Change-Id: I9f4e127d53a5b1f5f8c70652604f1f5574c73688
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-12 16:15:44 +02:00
Thorbjørn Martsum
1c0a924a2e QHash - checks if iterator argument is valid (in debugmode)
This checks if the iterator argument in erase is valid in debug mode.

Change-Id: I8768f4263d1464ff78986a1a30702e210e561dc1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-12 16:15:44 +02:00
Thorbjørn Martsum
ca3d8411b2 QList - check if iterators arguments are valid (in debugmode)
This adds a check of the iterator values in erase and insert.

Change-Id: I78403dcbd24fd7c6beb86d3c827a8e233963e770
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-12 16:15:44 +02:00
Thorbjørn Martsum
578fc87dff QVector - check if iterators arguments are valid (in debugmode)
This adds a check of the iterator values in erase and insert.

Change-Id: I28e660153dbfc5f0054a5b25cba2c5725c678a81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-12 16:15:44 +02:00
Thorbjørn Martsum
d24aa28b4c QMap - check if iterator arguments are valid (in debugmode)
This patch adds a debug-tests in erase, insert (with hint)
and insertMulti (with hint) that ensures the iterator-argument
is valid (and e.g not from another map)

Change-Id: I7920131bc9712543183cabf13c7603bd0e12880d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-12 16:15:44 +02:00
Friedemann Kleint
7e7c689c34 Fix domain in manual test qhttpnetworkconnection.
Task-number: QTBUG-32390

Change-Id: Ic56640087d1f07edeca5f5fc36acac9dddc79c73
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2013-07-12 12:41:30 +02:00
Friedemann Kleint
b72a32b05d Remove Nokia-domains in commented-out test code.
Task-number: QTBUG-32390

Change-Id: Ida7d54aba9cde5c472ff6bb2696d1201ba4f2199
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-12 12:41:30 +02:00
Friedemann Kleint
0b9c942f3d Use QFINDTESTDATA in tst_qfontdatabase.
Change-Id: I851dbe18cd3ba9a07ddac71d23e04f5211b2db17
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-07-11 17:29:39 +02:00
Friedemann Kleint
bf42eacc7f Windows font database: Resolve aliases for extra fonts.
Ensure QFontDataBase::hasFamily() deals with aliases.

Task-number: QTBUG-31689

Change-Id: Ia59bfcb93362ac9343c6d30dab1091a4db482dfa
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-07-11 17:29:39 +02:00
Sergio Ahumada
3ef6cf060e Merge branch 'stable' into dev
Conflicts:
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/json/qjsonwriter.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm

Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
2013-07-11 16:42:01 +02:00
Friedemann Kleint
7b9d6cf844 Stabilize tst_qguiapplication.
Introduce QScopedPointer for windows or instantiate them on the
stack to prevent leaks. Tile all windows within virtual
screen to ensure they don't influence each other and are not
in the taskbar area.
Move cursor away from windows in modalWindow-test.

Change-Id: I40343e9f72263e22bdf2560448d7efcc915d17cb
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-07-11 10:56:49 +02:00
Mitch Curtis
5ec3b2826b Test password mask delay and characters on Mac.
Task-number: QTBUG-31498

Change-Id: Iab4a56b94364e3db78070aca40c629f9398ffbb7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-07-11 10:56:49 +02:00
Thiago Macieira
eb5749e8d9 Bugfix QDesktopServices on Windows
It was doing tricks with URLs that it shouldn't be doing... including
running QDir::toNativeSeparators on a URL.

Task-number: QTBUG-32311
Change-Id: I5b6f640919956998c00dcf507f931045f21a9e53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-11 10:56:49 +02:00
Sergio Ahumada
fa06a866b9 test: Fix tst_qwindow::positioning() on Ubuntu 12.04
It seems like the left-side menu bar on Ubuntu 12.04 causes some
problems when it is not automatically hidden, which is the case
in the CI machines.

Task-number: QTBUG-31995
Change-Id: I01ff3fe4c09d720b2dd53037c42e59679d8570dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-10 20:06:26 +02:00
Olivier Goffart
d6d9edd7c4 Fix dead lock in the Qt event handling
The deadlock is caused because the QEvent is destroyed while holding the
event list mutex. And the QEvent may have a custom destructor that will
re-enter the event handlng code.

The QScopedPointer that should destroy the event must be created after
the MutexUnlocker.

Regression introduced by commit f9035587b9

Task-number: QTBUG-31606
Change-Id: I6b2cbc2656eacdec61b641886953f00bf5b3ff36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-10 17:57:10 +02:00
Sergio Ahumada
af19cbc8f3 test: Replace QSKIP with QEXPECT_FAIL in tst_qwindow
It is better to mark a test as XFAIL so we get an error whenever
it gets fixed.

Task-number: QTBUG-23059
Change-Id: I0f2f491645c261bf0e735dde6a16d8e90e0b17a0
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-10 17:40:53 +02:00
Thorbjørn Lund Martsum
692e642305 QSizePolicy - add retainSizeWhenHidden
Sometimes it is nice that hiding a widget does not affect the
layout. This patch makes that possible by allowing hidden
widgets to take up space.

Change-Id: Ifbc1cdee0e112950acc025919b98199ea9558db7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-07-10 09:26:31 +02:00
Tor Arne Vestbø
9e2a389fa9 Rename a few QSignalSpy variables to match what they are spying
Makes for more informative debug output when the tests fail.

Change-Id: Ib07dd79452a56413c711394dd72aa37dbb4a70d7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-07-08 23:07:36 +02:00
Sergio Ahumada
184685d317 test: Add 5.1.0 bic data for linux-gcc-ia32
Change-Id: I342fd2332fb8880b872e4b5862a18db4a673260c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-08 21:47:36 +02:00
David Faure
10023de7a8 QUrl: add RemoveFilename to UrlFormattingOptions.
This allows to find the parent directory url using
url.adjusted(QUrl::RemoveFilename).

Change-Id: I1ca433ac67e4f93080de54a9b7ab2e538509ed04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-08 15:20:47 +02:00
David Faure
602c911820 QUrl: add "QUrl adjusted(options)" convenience method.
Change-Id: I5eea3e0dc7b56b88a56d813207b04661b8f05a55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-08 15:20:42 +02:00
Stephen Kelly
dee419f31d Make the CMake tests run sequentially, not in parallel.
Otherwise the output is too intertwined.

Change-Id: I6729727b3afcdcbec58e3fa560587dd1fa08f38e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-08 14:48:03 +02:00
David Faure
67ec78aac1 Fix QUrl::topLevelDomain(QUrl::FullyDecoded)
qt_ACE_do(".co.uk") was returning an empty string because of the
leading dot. Allow leading dots from topLevelDomain, but not from
other calls.

Change-Id: I757d9960708e205d30554cd2bbcf618c8624792b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-06 09:42:27 +02:00
Aleix Pol
691cb20d95 Add API to let applications integrate with the system fonts
This patch does 2 things mainly:
- Adds a QPlatformTheme font type for fixed fonts. It's important
because some OS provide specific monospaced fonts and we want to let
our applications to use the preferred fonts by default.
- Adds a new method and enum to QFontDatabase that expose the font
types that applications might need, so that they can make the
applications use the specific fonts that the system recommends. This
data was already available within Qt through the QPlatformTheme, but
it was not possible to use this data by Qt users. This new method
exposes such data.

Change-Id: Ic194c1e4bc07a70640672afd82ba756b87606985
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-05 17:29:18 +02:00
Joerg Bornemann
3f605c8b45 bail out early in QWinOverlappedIoNotifier::waitForNotified
Calling waitForNotified on an uninitialized notifier will print a
warning and return false. The autotest has been adjusted.

Change-Id: I85e18d6d0a8a5462e1a5d451613add941d89b5fb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-05 13:37:22 +02:00
Friedemann Kleint
1df4ebe0ef Stabilize tst_QApplication::quitOnLastWindowClosed().
Instantiate widgets on the stack to ensure they are destroyed
when the QApplication instance goes out of scope.
Introduce waitForWindowExposed() to make sure events are in sync.

Task-number: QTBUG-32125
Change-Id: Ia54e2fa9a7c2e279353c4514a6735e326edf35ae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-04 17:18:14 +02:00
Robin Burchell
4fc230ab15 benchmarks: Re-enable QFileInfo build by removing canonicalFileNamePerformance.
QFSFileEnginePrivate::canonicalized has been gone for a very, very long time now
(since d3b152ba1e3cd38dd675c801474105d518bacb44 in Qt 4).

This also fixes a build failure in the code on Windows.

Change-Id: I81f5e0c1d644b1b4d75644626eb394a663535387
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-04 17:00:17 +02:00
Liang Qi
94c8efff8a QtCore: fix the number precision in QJsonDocument.toJson() again
Need to store 17 decimal digits for binary64, IEEE 754 double formats.

Autotest is included. Test cases from TC39 test suite for ECMAScript.

Task-number: QTBUG-31926
Change-Id: I546398f21ea7ff5e40e89fc9de8703f628f55df9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-07-04 16:50:57 +02:00
Friedemann Kleint
6e8dddadd8 Use case insensitive matching for hashes QFileSystemWatcher/Win.
Do not lower case file names to generate hash keys since
QString::toLower() converts some characters with context
which the Windows file system will not.

Task-number: QTBUG-31341

Change-Id: I285bfedef3c1ca9d59083229e61974dd378c72ae
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-07-04 12:54:58 +02:00
Sergio Ahumada
55bf01828a Merge "Merge branch 'release' into stable" into refs/staging/stable 2013-07-04 10:50:27 +02:00
Eskil Abrahamsen Blomfeldt
0d7f22fc67 Make sure libgnustl_shared.so is deployed along with Qt libs
Since configure no longer puts this in $QTDIR/lib, we need to
copy it from the NDK and into the device ourselves.

Task-number: QTBUG-32079
Change-Id: I75ee5f8a00de9a1ba536bcfd857e6b2e7a0e1f6e
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-07-04 10:04:27 +02:00
Eskil Abrahamsen Blomfeldt
3e8783f5bb Make sure activity is closed
If we don't call finish() before crashing the activity, then
the Activity Manager will just restart it.

Task-number: QTBUG-32079
Change-Id: I09623afe545c3f4e8b9be801ccfbe244059b270e
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-07-04 10:04:22 +02:00
Eskil Abrahamsen Blomfeldt
3594fbbce4 Make sure main application library is loaded
We need to also load the binary for the application itself.

Task-number: QTBUG-32079
Change-Id: Ic26d5e6d950d6d18aaa54392c3c84b6deaa56c75
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-07-04 10:04:17 +02:00
Eskil Abrahamsen Blomfeldt
daa28042df Update native functions to match signature in platform plugin
We just pass 1.0 as the scaled density for now, since it shouldn't
make much different to the code being tested.

Task-number: QTBUG-32079
Change-Id: I888c4640e4627f47a2c128d2ce2a41adf4ca3132
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-07-04 10:04:12 +02:00
Oswald Buddenhagen
783181cfc1 make split_value_list() even less sane again
contrary to what one may expect, it's actually *not* supposed to remove
the meta-characters it interprets.

luckily, this function is not used much any more ...

Task-number: QTBUG-31877
Change-Id: I2b60f9b173140da78db2b07b596cc2e5f6e6d555
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-03 21:38:37 +02:00
Oswald Buddenhagen
bc328f8ec3 remove nonsense DEFINES
Change-Id: Ie079c52eb800878983501b9fe2b2f6c27df0cdb1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-03 21:38:37 +02:00
Sergio Ahumada
645637cbdc Merge branch 'release' into stable
Change-Id: I982a86e1b99e3ae629e8c5667bc7bdf9f4018b2e
2013-07-03 18:33:26 +02:00
Oswald Buddenhagen
de54d7bb29 headersclean: process private modules correctly
Change-Id: I51c8ee0db31b35e1d991411fe0b03da6665e9a84
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-03 15:31:13 +02:00
Thorbjørn Martsum
29570d8442 QStyle - tooltip - add wakeDelay and sleepDelay as styleHints
In earlier patches we allowed the user to control the
tooltip duration. However the user still couldn't control
the wake delay and sleep delay.

This patch changes that and is the final patch in solving:

Task-number: QTBUG-1016

Change-Id: I5e2c719737634ad7f371ad03691744612472ae70
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-03 05:34:34 +02:00
Stephen Kelly
efb592503a Add a unit test for testing Qt in its install location.
The Qt CI system runs the unit tests after installation, but
with the qmake in the build directory. This means that the
installed content is not unit tested. Add an additional cmake
unit test to test the files in the install location.

The new test is marked insignificant for now until the true
effect on the CI system is known.

Task-number: QTBUG-27315

Change-Id: If9f12e88cfc741946cfabc25dbf789a11a2af4b8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-02 23:08:54 +02:00
Joerg Bornemann
5cfac290ca remove wait calls in tst_QProcess::simpleStart
Instead of calling different wait functions on different platforms,
we use QTRY_COMPARE to check the process state.

Change-Id: I6489cabce9e63f9c8b1036f3cccbf35b52df72e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-07-02 16:33:08 +02:00
Thiago Macieira
c1d65d996b Revert "Fix QUrl::topLevelDomain(QUrl::FullyDecoded)"
This reverts commit e3fa266623b08e837cb4ccc7fe59da243d03dd27

That commit applied a change at the wrong place in the code.

Change-Id: I21e3045a3af14ad2f90c5fe338815c35a2d27ae6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-02 03:26:39 +02:00
Thiago Macieira
7becb8b807 QUrl test: ensure that hostnames with bad non-IDN domains are caught too
Leading and double dots are bad, but trailing dots are fine. The ASCII
part of a hostname is supposed to be LDH (letters, digits, hyphen) only,
but we accept '_' (underscore) as an exception too.

Change-Id: I79957ddec4da78a0e2357fe50c8687db03e1c99e
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-02 02:56:27 +02:00
David Faure
18fe18317a Let qdbusxml2cpp generate code that compiles: no '-' in variable names.
org.freedesktop.Application.xml has
  <arg type='a{sv}' name='platform-data' direction='in'/>

Change-Id: I035436d48ec45da3ccad7dabe01e9cccec17b730
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-01 17:04:26 +02:00
David Faure
170469ef84 Fix QUrl::topLevelDomain(QUrl::FullyDecoded)
qt_ACE_do(".co.uk") was returning an empty string because of the
leading dot. This has always caused issues in KDE code too, where ACE
normalization needs the dot removed, and re-added afterwards.

Change-Id: Id9fcea0333cf55c14d755a86d4bf33a50f194429
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-01 17:04:20 +02:00
Gunnar Sletta
a1f9b2b2b0 Make the test a bit more sane.
Unactivating a window is not really supported, nor has it ever really
been, so activate another window instead. This incidentally
also makes the test work cross platform.

Change-Id: I6e593e9b7972dd5c5038c8d18a42be90bf19248c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-07-01 08:57:52 +02:00
Peter Hartmann
c1ddaf4d21 QNetworkConfiguration: add public member bearerTypeFamily()
... to let the user know whether he is on e.g. Wifi, 2G, 3G or 4G.
In most cases, this is what the user wants to know anyhow, while
e.g. BearerEVDO or BearerCDMA2000 go into too much detail.

Task-number: QTBUG-31828
Change-Id: I244a4473feb40e106cbc08e09afdee07d4ecc8d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2013-06-28 23:05:57 +02:00
Sergio Ahumada
d1a6de21c3 tst_QIcon: Mark availableSizes() and task223279_inconsistentAddFile() as XFAIL
Task-number: QTBUG-31993
Change-Id: I10e39951fb38b950633805a44ea4c0edaf55635e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-06-27 23:14:16 +02:00
Frederik Gladhorn
572200989b Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	mkspecs/features/create_cmake.prf

Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
2013-06-27 13:06:38 +02:00