Commit Graph

3828 Commits

Author SHA1 Message Date
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
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
Frederik Gladhorn
241eca33ed Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-27 09:28:04 +02:00
Friedemann Kleint
7ed024226f Add painting of points to the QTabletEvents manual test.
Change-Id: I48f2eeec3d25bc92ed8a594a6a673da6231b04c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 21:06:44 +02:00
Friedemann Kleint
d849f3332f tst_qfilefialog: Fix leaking temporary directories.
The test currently leaks 2 directories QFileDialogTestDir,
QFileDialogTestDir4SelectFiles in /tmp.

Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-06-26 05:46:19 +02:00