Commit Graph

10213 Commits

Author SHA1 Message Date
Morten Johan Sorvig
9c6066fce6 Mac: Set minimum version to 10.7 for clang-libc++
Clang's libc++ does not support 10.6.

Add mac-minimum-version.conf which sets the version
to 10.6. Set the version to 10.7 in the clang-libx++*
mkspecs.

Change-Id: I494d0d24b0d73d9395e9d5406c8c63c9af87f8cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-10-24 01:39:45 +02:00
Sergio Ahumada
048d28a674 test: Remove QSKIP from tst_QSettings::fileName()
Change-Id: I24ed2d182faff989f62f192246ebf95ca492c10d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-24 01:39:06 +02:00
Sergio Ahumada
cdd75e9e4b test: Remove QSKIP from tst_QClipboard::copy_exit_paste()
Change-Id: Ib64680dbd966940c56ab089ff1b7727b237fdaee
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-24 01:39:04 +02:00
Sergio Ahumada
cd0c6d69fa test: Rename test case name TestQtJson -> tst_QtJson
This allows us to follow test naming convention which should start
with "tst_"

 Before:
  TestQtJson::initTestCase()

 After:
  tst_QtJson::initTestCase()

Change-Id: Id83ccc324776399184c3665565eb8d045bfee2e2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-24 01:39:02 +02:00
Sergio Ahumada
ead0e0029a test: Fix tst_QDir.equalityOperator()
On Fedora 17 /sbin/ is a symlink now, so this test fails there.
Using /usr/ instead.

Change-Id: Ie35902fc093101191bdbf33324e20835d1da1528
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-24 01:39:01 +02:00
Mitch Curtis
b016597db8 Return invalid datetime when calling addMSecs with invalid QDateTime.
This is in line with what QTime::addMSecs and QDate::addDays do, for
example.

Change-Id: I902112486727f74f669a97bde6c42028e0838f8d
Reviewed-by: Jon Severinsson <jon@severinsson.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-24 01:38:58 +02:00
Mitch Curtis
8310533975 Improve QTime test coverage.
Change-Id: If47de3dc047ac4f8a4a1498cf225e03bbbf4110e
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jon Severinsson <jon@severinsson.net>
2012-10-24 01:38:56 +02:00
Mitch Curtis
6a7a08b4a8 Improve QDate test coverage.
Some statements could not be tested, such as default cases of switches
where all possible cases are already handled and some statements where
the system locale is used.

I also removed some statements that would never be reached and hence
will never be able to be covered by tests.

Change-Id: I8ea3071f66d942d986e65708732af6751d36b5e3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-24 01:38:54 +02:00
Mitch Curtis
7cbdac1362 Clarify assert on use of const char* as TestData type in tests.
Currently all C-style strings used as data types in QTest::addColumn
will assert at runtime with, e.g.: "expected data of type
'const char*', got 'QString' for element 0 of data with tab 'blah'".
This patch makes it clear that C-style strings are disallowed.

Change-Id: Iadbb8f10e16607de95c7adb43d9ff3310aac6738
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-24 01:38:51 +02:00
Mitch Curtis
811bf4da67 Output leading zeroes for yyyy date formats in QLocale::toString().
Converting the date 1 January 0001 to a string in the format
"dd MMMM yyyy" currently results in the string "01 January 1", but it
should be "01 January 0001".

Task-number: QTBUG-27287
Change-Id: Ia025da7343d1c36aaee34c47c6db551a6e89595f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-24 01:38:49 +02:00
Friedemann Kleint
d1ad991bee Fix valgrind warning in QTriangulatingStroker.
Initialize all member variables including m_invScale, which
was uninitialized.

Change-Id: Id581b1db9411b2f945281e17b7a0407c746761f8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-24 01:38:39 +02:00
J-P Nurmi
4835a87fe3 Add QStyleAnimation::updateTarget()
For example a paused "default button" animation might want to update
the target to get "non-default button" looks meanwhile the animation
is paused.

Change-Id: Ibb854a40f38a8971e7233b1f34a83056e6a9d827
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-23 12:51:41 +02:00
Morten Sorvig
ee0dbed4db Enable HiDPI mode for retina displays.
Change-Id: I3b62ec9c3bf5e53c6ec056b95c52cfeb6ce5b61f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-23 12:43:24 +02:00
Friedemann Kleint
0a6691027d Fix warning about missing return value in XCB native interface.
Change-Id: If311211076c05ed8d0fb62a9ff1129b93a813850
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-23 12:28:55 +02:00
Friedemann Kleint
202ac1cbe7 QProcess: Include program in destructor warning.
Change-Id: Ib6870d2b161197fdeab7fe5140ac4757c79f478e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-23 12:28:23 +02:00
Miikka Heikkinen
32cbcca911 Stabilize tst_qfontdialog test case.
The delayed quit signal used as failsafe to ensure exit from event
loops interfere with later test if the test case works normally,
as closing the last toplevel window will also exit the event loop.

Fixed by stopping the quit timer if nested application exec loop
is exited.

Change-Id: If87655f1f28f50e27a64f3430c9f65bb3ab7dd70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-10-23 12:03:50 +02:00
J-P Nurmi
7abf623443 QStyleAnimation: fix threaded rendering
Change-Id: I00875adf2e4b157a3f8b0b99e5280b1275635026
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-23 11:41:47 +02:00
Thomas McGuire
2e21332476 Blackberry: Fix applicationFilePath() for unpackaged executables
Not all executables originate from a BAR package, for example unit
tests.
Make those use the fallback code for finding the application file path.

Change-Id: I5603f329bbe74e37d319ddd190f72bc6f64e1a5c
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-23 11:31:17 +02:00
Giuseppe D'Angelo
bbda968a0a Fix QRegExpValidator::validate docs about the pos parameter
The code sets it to input.length() iff the regexp doesn't
match the string, while the docs say it's *always* set.

Therefore, make the docs match what the code does and
add a simple test to enforce it.

We're not changing the code to match the docs because

1) it's better to stay conservative (we don't want
to break existing behaviour);

2) this behaviour mimics what the int/double validators do
(they don't move pos at all).

Change-Id: I958074558de6b0fc5944101c6535fc7e00442ae9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-22 22:42:26 +02:00
Stephen Kelly
6fe8a3d5a1 CMake: Make qt5_use_modules a macro, not a function.
Because qt5_use_modules is a function that does a find package which
finds imported targets, things like this:

 qt5_use_modules(foo Sql)
 if (TARGET Qt5::Sql)
    message("Qt5Sql_FOUND: ${Qt5Sql_FOUND}")
 endif()

will show Qt5Sql as being not found, even though the target is in scope.

Fix that by making it a macro instead.

Change-Id: If314bd5b4d3f769c6c7df5ff2c924eabd16dcc0e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-22 22:42:22 +02:00
Mitch Curtis
4dbf60d672 Fix mistakes in QNetworkAccessManager docs.
Change-Id: I2c797affec9472815003b1a032196c81088e1df6
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-22 22:42:17 +02:00
Julien Brianceau
d8c8057c03 qpa: Fix drawPixmap rendering using CompositionMode_Source in DirectFB
Change-Id: I646bc7054e1aa17dca4f54ddd3d2668c173773d4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
2012-10-22 22:37:40 +02:00
Jan Arve Saether
ebaed02ae6 Remove softkey API, it was only implemented for Symbian.
It is only removed from the documentation for now (I think this should
go in the beta 2).
That should liberate us to be able to change the API if needed for
other platforms that might need a soft keys API.

Once this goes in, the plan is to do the actual cleanup.

Change-Id: I9a7a3eb45597cd013fe3c4bd479ad08a25ef0b9b
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-22 22:27:53 +02:00
Tor Arne Vestbø
d7b087eaac configure: make sure that global shadow doc symlink is always updated
We forcibly overwrite the symlink - in case the source dir changes.

Change-Id: I3986b968f787ea0d250887113a0c223e10038546
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-22 19:36:43 +02:00
Jens Bache-Wiig
087e4bc517 Remove Cleanlooks and Plastique
We have a new style Fusion that will replace these styles.
They will be moved to a separate
module rather than included in platforms that do not need them.

Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-22 19:36:43 +02:00
Jens Bache-Wiig
a0e5d6c1c0 Fix clipping and font problems with groupbox in Fusion style
The groupbox did not take custom fonts into account when calculating
the height of its titlebar. This resulted in clipping issues on
Windows.

Task-number: QTBUG-27655

Change-Id: I7252bc94d2bbb0731b9dbc1caa6cdd2074fdd7ab
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-22 19:36:43 +02:00
Samuel Rødal
b213d5bfa3 Make QPen default to 1-width non-cosmetic.
Use the Qt4CompatiblePainting render hint when painting with QPainter to
treat default constructed QPens as cosmetic still.

The NonCosmeticDefaultPen render hint gets documented as obsolete, since
it was in any case not respected by the raster nor OpenGL paint engine.

Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-22 19:36:43 +02:00
Jens Bache-Wiig
11566de014 Move some icon code from WindowsStyle to CommonStyle
Fusion style only depends on CommonStyle and it seems the autotest
for tst_QFileSystemModel:iconProvider assumes an icon will be
returned from standardPixmap. Since we dont want the icons
to depend on style in this case we should move all this to commonstyle.

Change-Id: I3a26367e5c0aefe2a39838f0c2cadc4f7afad89d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-22 19:36:43 +02:00
Marc Mutz
33d9b9f326 Delete QWhatsThis() and QToolTip()
These classes are not supposed to be instantiated.

QToolTip() already was declared, but not implemented.
This patch just adds Q_DECL_EQ_DELETE for better
diagnostics on C++11.

QWhatsThis() was implemented, but appears to be unused.
Since it was private to begin with, successfully compiling
QtWidgets is a sufficient test.

Change-Id: I698ece8f0eebbcdac7be98456dd42197b758a825
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-22 19:36:43 +02:00
Marc Mutz
500ed6b628 QDateTimeEdit: don't throw off auto-indention
Reformulate #ifdef'ery involving {}s so as not to throw
off auto-indention of code editors due to unbalanced {}s.

Change-Id: I0f9858c78d0b6d923de75ca45c7d65ce3fa53e50
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-22 19:36:43 +02:00
Stephen Kelly
e0ba8fdbce Trim trailing whitespace.
Change-Id: Iee6bb66831f53399e5937eab5704af835979f5c3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-22 19:36:43 +02:00
Stephen Kelly
efc475a996 Fix integer overflow in QSpinBox.
Change-Id: Ic204d42fbdffc44576f7e76132bc53621e836299
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-22 19:36:43 +02:00
Stephen Kelly
d18eb260d7 Use the layout change hint to speed up QItemSelectionModel.
The testcase in the bug report takes 370035 ms to sort the rows with
Qt 4, and 5646 ms in Qt 5 (when using the extra hints to layout*Changed).

That's an improvement of more than 98%.

Task-number: QTBUG-17732
Change-Id: If78f972d80c501e0cb39078228086c4f4ac8a65b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-22 19:36:43 +02:00
Jason Barron
0693082c95 Pass the correct handle to the Windows EGL context constructor.
We should pass the shareHandle here instead of the handle for the
context since that's what it expects.

Change-Id: If851758817057ecc3c3646cba2354becf5a8a839
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-22 17:41:47 +02:00
Sze Howe Koh
8e62d9acfd Doc: Fix small capitalization error for the Qt SQL module header.
The header file is named QtSql, not QtSQL.

Change-Id: Ia3634c80d73f04fd27256f392cfed2068eeb9bc5
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-10-22 08:53:32 +02:00
Frederik Gladhorn
fb2d2c4f72 Emit cursorPositionChanged in private slot.
Since the private slot is already there and used, it might as well
emit the signal and save us one connection.

Change-Id: I899df74c20f8c2b7875a0f9d0a04465c5dc48bde
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-22 08:42:16 +02:00
Frederik Gladhorn
a2b7b42ca4 Bring back accessibility for plain text edit.
This ports 282951bc6c7ddb607fb7ebf61eb8de9acf3da77f
aka Change-Id: If0269a49b9fcd1b3e9fcfd32fac912560df28f21
to Qt 5.

Change-Id: I46f1d4947d90688b598993f76330e2e10aeca950
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-22 08:41:57 +02:00
Marc Mutz
2ec2edc24d normalise signal/slot signatures [QtGui tests]
Change-Id: I42e11de9ef1d8a04b2a8e200afb84f2245f3361a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-22 08:41:27 +02:00
Konstantin Ritt
a89eae8cb4 Fix crash due to memory access violation
The font engine has been re-used without increasing it's reference counter

Task-number: QTBUG-27596
Change-Id: Icd4c3ca131446255ad4a27da8aa9a6c69177212e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-10-22 03:35:39 +02:00
Mitch Curtis
13846e8013 Revert removal of commented out tests in tst_qdatetime.cpp.
Two lines were commented out but were removed with
Ib6ceb1cb7fb4c6eca672495f96d9cfd907853c85. They have been replaced
as expected fails.

Task-number: QTBUG-22833
Change-Id: Ib154a31bffcdc8e43c6ad236df193e99334652c6
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-22 03:21:33 +02:00
Marc Mutz
a438267c84 normalise signal/slot signatures [QtCore tests]
Normalise all signal/slot signatures in tests/*/corelib,
except in tst_QObject, where they might be test data.

Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-22 03:21:01 +02:00
Thiago Macieira
8e82a8e11f Doc: refer to QUrlQuery in QUrl's main doc body
As opposed to the deprecated methods.

Task-number: QTBUG-25628
Change-Id: Ic1b50b1ac1b974cdd2dd9f0151d567227784e547
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-19 20:28:08 +02:00
Sze Howe Koh
d7e8b57d0a Remove the QThread::terminated() signal
The signal is removed from the API; all references to it are removed
from documentation; the unit test that checks for its emission is
modified to listen for QThread::finished() instead.

The QThreadPrivate::terminated flag is also removed, as it served no
purpose other than to trigger the emission of QThread::terminated()

As discussed at http://lists.qt-project.org/pipermail/development/2012-October/007216.html
the signal is not guaranteed to be emitted after every termination,
rendering it useless.

Change-Id: I7b0c45d7889da0d33875545331606f2208ee56fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-19 20:25:16 +02:00
Samuel Rødal
39eaff6773 Remove DRI2/OpenGL code paths from xcb plugin.
These were used to test QtWayland, but there are other options available
for that now. The DRI2 code hasn't been maintained and doesn't even
compile at the moment, so let's just remove it to de-clutter the source.

Change-Id: I7db0f4db82348497b9f4d6c2dcf2e13f3ab14a76
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-19 20:24:11 +02:00
Samuel Rødal
9b2e4cd5a8 Small xcb startup performance optimization.
Prefetch all the extensions, to avoid having to do blocking calls later.

Change-Id: I1527dbf03d76372ec88bc0d5d9f7af18a4cc2a26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2012-10-19 20:24:03 +02:00
Samuel Rødal
cdc2161b6f Made xcb plugin work when the GLX extension is not present.
Change-Id: I9285d7524586ff404206c088019ece33335137d9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 18:11:06 +02:00
Samuel Rødal
7d7f09650c Fixed GCC 3.4 build with sse2 enabled.
With minimal effort we can keep the GCC 3.4 build working.

Task-number: QTBUG-19803
Change-Id: I31611a27b97d5ac426ea857d8f1b656dc6f5377a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-19 18:10:46 +02:00
Konstantin Ritt
9690548113 QFont: Don't invalidate engine unless request has been changed
This makes QFont do a "light" detach when the font attributes data has been changed.
The new test clearly shows that the engine is now shared between
two font instances after changing the kerning attribute.

Change-Id: I59db822f459f02d111686dba7101b98e361fada9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 18:04:36 +02:00
Andreas Hartmetz
bdc115d969 detach() safely in QVector::erase(), and update callers to not detach.
remove() can use non-detaching iterators internally before calling
erase(), which hasn't been exploited so far, so that the detach() in
erase() never actually detached. When using erase() from outside,
you can't do it legally without calling begin() or end() that detach()
before erase() is called.
Now remove() doesn't detach anymore, and detaching in erase() works.
With new tests that fail after changing only the erase() callers
and pass again after fixing erase().

Change-Id: I47c0a9e362dce8628ec566f5437d951755de96c8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-19 18:04:11 +02:00
Gabriel de Dietrich
c4ff5c53ef Mac: Adapt scrollbar fadeout animation for QStyleAnimation
Change-Id: I39f1089e8d6ba1bb412d33aa4ebc0971aba52681
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-19 17:53:26 +02:00