Commit Graph

5376 Commits

Author SHA1 Message Date
João Abecasis
c67efb6506 Fix invalid read, detected by valgrind
Commit 3fe1eed0 changed the QVERIFY in line 1354 to QCOMPARE. This was
done to work around a (not yet understood) compiler issue. That however
was wrong, as char pointers in QCOMPARE are assumed to point to
'\0'-terminated strings and will get dereferenced.

In this case the intent was to compare the actual pointer values, as the
pointers point past the end of the array and should not be dereferenced.

Explicitly casting to (void *) and using QCOMPARE will not only keep the
intent, it will hopefully also provide meaningful output on failures. As
such the fix was applied throughout the test.

Change-Id: Ib0968df492ccc11d7c391bb69037cd7241e55493
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-15 23:01:13 +01:00
Debao Zhang
801832b8a3 QSharedPointer: remove two emtpy functions.
As the comments says:they are broken by design, and replaced with other
functions. The purpose of their existence is for BIC with Qt4.5.

Change-Id: I9453f816a7b7c6812499b89b7c60f0fd99dea27c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-15 23:01:01 +01:00
Stephen Kelly
e640c3bcfe Make more of QDBus bootstrapping-ready.
The DBus metatype system and marshaller is required for determining
the dbus-signature of built-in Qt types, for example QPoint.

Change-Id: I8860ab3b88827aeb8063dfb79c4a9b28c0a20c0f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-15 19:36:01 +01:00
Marc Mutz
43a176804f QPlatformSurface: add missing virtual dtor
Change-Id: Ia7630cf33380badfe4ec7bdb59a9b86320257978
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-03-15 10:25:27 +01:00
Giuseppe D'Angelo
c005c75080 QRegularExpression: support for QString overloads
Added support for QString overloads taking a QRegularExpression.

Change-Id: I8608ab0b66e5fdd2e966992e1072cf1ef7883c8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-15 00:37:56 +01:00
Stephen Kelly
2c944d6b9d Add QByteArray overload for the QLatin1String ctor.
This increases source compatibility when QT_NO_CAST_FROM_BYTEARRAY
is used.

Change-Id: Ie1a1cfa8acac2fa91aa8f217d91e22289be8b38f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-14 21:46:55 +01:00
Stephen Kelly
ded80cfc8a Make some DBus classes bootstrapping-ready.
Change-Id: Ib7611fb0bf8e226a36064a100280e1ab7a0e159d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-14 20:00:00 +01:00
Stephen Kelly
b05139b2dc Add an overload to Moc to allow reading from a QIODevice.
This allows external code to provide the input data, such
as a bootstrapped version of qdbuscpp2xml.

Change-Id: I163062efc6495b3ab92573f94523967a67601191
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-14 19:59:53 +01:00
Stephen Kelly
08c1cb5c5a Fix warning about unused parameter.
Side effect of 3bb9024952

Change-Id: Idd6127832c4af26d3e1dad7b4994001b05bc2be8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-03-14 16:03:17 +01:00
Marc Mutz
d9a3041a5d QDirIterator, QDataStream: remove virtual dtor
These two classes are not meant to be polymorphic,
and have no other other virtual functions besides
the destructor, so remove the overhead of the
vtable completely.

Change-Id: I08b93898312c2fbbe4db92d4f1c444c6417fe19a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-14 16:03:17 +01:00
Olivier Goffart
6ec0823fd1 Remove QTEST_NO_SPECIALIZATIONS
We don't support these compiler anymore

Change-Id: I0eb73535b6c11703299430e5fc24c8e17fed1653
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-03-14 14:21:01 +01:00
Marc Mutz
cd27535ca0 QtNetwork: make some constructors explicit
This is a semi-automatic search, so I'm
reasonably sure that all the exported ones
have been caught.

Change-Id: Ia00eb9194a5f64002bd7e7b894abf6333d1b825e
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-14 12:37:30 +01:00
Giuseppe D'Angelo
08790636f2 QRegularExpression: QMetaType and QVariant support
Removed the Q_DECLARE_METATYPE in favour of first-class support
inside QMetaType and QVariant.

Change-Id: I904236822bfab967dc0fbd4d4cc2bcb68c741adc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-14 10:53:24 +01:00
Marc Mutz
b8112c8526 QtGui: make some constructors explicit
This is a semi-automatic search, so I'm
reasonably sure that all the exported ones
have been caught.

Change-Id: I5b122db2498dbb2aee50c7ad95c67e708aade45b
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-03-14 08:04:12 +01:00
João Abecasis
91248b0f3b Silence 'narrowing conversion' warning in test
Seen with gcc 4.6:

tst_qarraydata.cpp: In member function 'void tst_QArrayData::grow()':
tst_qarraydata.cpp:1445:29: error: narrowing conversion of 'i' from
'size_t {aka long unsigned int}' to 'int' inside { } [-fpermissive]

Change-Id: Iad55659554b64ee34655640d606153f058a8cd05
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-13 23:55:30 +01:00
David Faure
7786d15e93 Port file-flushing code to QFileDevice.
This fixes auto-flushing in the future QSaveFile class.

Change-Id: I6e84388070d5b9af9d326f5092ec9b55fd98cd05
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-13 01:38:19 +01:00
João Abecasis
e104fe7266 Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes 2012-03-12 23:52:36 +01:00
Lars Knoll
d5098f2802 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp

Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
2012-03-12 21:03:49 +01:00
João Abecasis
e57e2f3e32 Fix QString:mid and midRef, again
In commit 75286739 it was assumed that negative positions shouldn't
influence the size of the returned substring. That however changes
behaviour that was depended on even inside Qt.

With this change, the old behaviour is reestablished.

A negative value of n is still taken to mean "all the way to the end",
regardless of position, and overflows are still avoided.

Change-Id: I7d6ed17cc5e274c7c7ddf0eb0c3238e1159ec4f6
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-12 19:53:59 +01:00
Jørgen Lind
b5b41c1834 Remove redundant wayland stuff from QtBase
Config checks are done in the module.

We pick up the pkg-config stuff also in the module. There shouldn't be a
need to do this in configure anyway

Change-Id: I9ef73760511c6b684c6cd5dd13e7e581c588e7aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-12 17:33:15 +01:00
Friedemann Kleint
502673ab3a Re-add the Systray example.
Remove its dependency on QtSvg by converting the icons to
(optimized) png files.

Change-Id: If63257938dc816d7ab76a3042b9ac88ef3d51b07
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 17:33:15 +01:00
Friedemann Kleint
cf36e571ee Windows: Implement QWindowsIntegration::queryKeyboardModifiers()
Use code from Qt 4.8.

Change-Id: I32d220e04d13ee1e692c0c58268b827bcf519dc7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 17:33:15 +01:00
Friedemann Kleint
6e278b8688 Implement QSystemTrayIcon for Windows.
No longer base the implementation on a QWidget which is not
necessary when all that is required is a message window listening
to task-tray messages. Export a service function creating a message
window from the Windows native interface and use that.

Task-number: QTBUG-20978

Change-Id: I01d0faeac777df4eee802c51d2bc722fce814080
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 17:33:15 +01:00
Jørgen Lind
53c97f83b4 Don't define QT_NO_CORESERVICES on all platforms. That's just annoying
Change-Id: Id814bd0956b97c84ff0e6fcae8e5f22394c433e7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-12 17:33:15 +01:00
Jørgen Lind
10e4904995 Fix the QMAKE_LIBS_WAYLAND variable
This variable is there for documentation, but its not being used anymore.
There are two libraries from wayland, libwayland-client and
libwayland-server. Add two variables that will be picked up in the
QtWayland module.

Change-Id: I16219092a4ed2e48080921ce39f61192b6abb711
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-12 17:33:15 +01:00
Debao Zhang
db390d46c3 Move the auto test of QPixmap::grabWidget() from QPixmap to QWidget
Change-Id: Id565fa1eb8fe13c62a93a5afa39a5701ce7b20ea
QPixmap::grabWidget is deprecated, which calls QWidget::grab() at present.
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 17:33:15 +01:00
Giuseppe D'Angelo
9f266efa8f QRegularExpression: add error strings for translation
Added the error strings from PCRE to be picked up by lupdate,
to enable translations.

Change-Id: Iaeabde5d7a17f9a0273511e0741e67a097d23a98
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-12 17:33:15 +01:00
Sean Harmer
75218e08ab Do not add -rpath-link directives with no library path
Doing so works fine on Linux as g++ version there silently ignores
this. However, the qcc toolchain for QNX barfs.

Change-Id: Ia236910adc09dc1653e4169e20476b69c2de62ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-12 17:33:15 +01:00
Marc Mutz
edea0e1917 tst_exceptionsafety_objects: add virtual ~AbstractTester
GCC complained about undefined behaviour when
deleting subclasses of AbstractTester through
pointers to AbstractTester, and it's doing so
correctly...

Change-Id: Ie641281d8aafe32c5c9784e8aa39672ff0b699c7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-12 15:37:40 +01:00
Frederik Gladhorn
7738f96f09 Add documenation about QAccessibleStateChange event.
Change-Id: Iea34d71d71a6dd58f761722ce20ae8ec2b81ae58
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 15:34:18 +01:00
Frederik Gladhorn
ca737f566b Use QAccessibleEvent in test.
Change-Id: I4f9c0f503543caa5704a29c8ccd7c4134b455625
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 15:34:06 +01:00
Marc Mutz
d5a85940f7 QDBusError: add assignment operator from QDBusMessage
There's an implicit constructor for this conversion,
so there should be an assignment operator, too,
as an optimisation.

Change-Id: I1d1646cbafdea5a4f80b11b011a8940b65a9fb9f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-12 15:23:13 +01:00
Marc Mutz
6c2695d677 QtDBus: make some constructors explicit
This is a semi-automatic search, so I'm
reasonably sure that all the exported ones
have been caught.

Change-Id: I314d341ad0db4e9d4bbf353a9537c9422ad8a54b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-12 15:22:30 +01:00
Donald Carr
431eb30e9e Remove stale references to Qtopia
Change-Id: Idd9b5fae8f6a0273636a878325e82e5664a40d43
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-03-12 13:14:05 +01:00
jian liang
86dd454461 Delete QPlatformDragPrivate object in QPlatformDrag's destructor
Change-Id: Ib722df14123b24ca044f6e0846aa1435c7e0e201
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 13:14:05 +01:00
Mark Brand
cdc9422c2e QSqlTableModel::indexInQuery: fix inserted row accounting
Commit b979956ec4 introduced a
distinction between rows that have a pending INSERT operation and
rows that have already been inserted in the database but still are
in the change cache. Both cases are rows that are not in the underlying
query. Unfortunately, we overlooked a case where the point of the test
is whether the row is in the query.

Change-Id: I0f58bed232d9336fed6e67c3d140fd580ec35868
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-12 13:14:05 +01:00
John Tapsell
4c0de07a0e Harfbuzz GPOS hinting- do not consider a subtable to be invalid if it is just empty
Considering a subtable to be invalid when it was empty meant that it
returned an error causing all further hinting to be aborted.  This means
that we get no hinting in certain cases with certain fonts.

Change-Id: I840c016dc85935b4f2c4373c66a79b4bd8b3a30d
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-12 13:14:05 +01:00
Stefan Hundhammer
21c98e52c5 Line up underlines if fallback fonts are used (QTBUG-21832)
Change-Id: Icecc514f6c47c0576af8cabd39cdc0987f8d93fa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-12 13:14:05 +01:00
Jason McDonald
c4342ddea0 Fix indentation of QWaitCondition autotest.
No functional changes - cosmetic change only.

Change-Id: I7332eaab31720776c70a7ef813d55db44bab83f7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 13:14:05 +01:00
Jason McDonald
3d8e3421a5 Remove MSVC 6 workaround from QtConcurrent.
MSVC 6 is not supported by Qt 5.

Change-Id: I2aef026eb2ad6a68cd9bcddcf6578cb1a019b21c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 13:14:05 +01:00
Jason McDonald
074508c2ca Remove gcc 3.x-specific code from QtConcurrent and its tests.
Change-Id: I4dd0ce50b70a47a0a00f4c7ec18077a1bcbe5705
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 13:14:05 +01:00
Andrew den Exter
4dfeb18758 Add a movable type declaration to QGlyphRun.
Allow it to take advantage of QList optimisations for pointer types.

Change-Id: Iddbb9741efef43604e38fc3eeb08b522c0414e21
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-12 13:14:05 +01:00
Sergio Ahumada
0a14ddfacb qdoc: Fix closing 'table class="generic"' tag
Change-Id: I251ed6d4e5788b0816211e06f33ace03d2fa14e8
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-12 13:14:05 +01:00
Debao Zhang
a5c1ffedb8 Convert xlib plugin to new format
Change-Id: I00418a1eb7bf944ec360dbbb1f61f7703f3ecd37
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 13:14:05 +01:00
Morten Johan Sorvig
cff24b9fd5 Remove Mac multiple-arch support.
Change-Id: Iaad361301e4772c3d8be6186da88e494cb234801
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-12 13:14:05 +01:00
Morten Johan Sorvig
31043e6b8d Cocoa: Fix accessiiblityPerformAction
Remove hardcoded pressAction();

Change-Id: Ie02e3f2f88a2cd311aec1b39daa160efb3b2b617
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-03-12 13:14:05 +01:00
Sean Harmer
9a81e37107 Rename blackberry QPA plugin to QNX
Changing the naming scheme from Blackberry to QNX in line with pattern
of using platform names.

Change-Id: I048a6a18010bc932311d63c8dde19ccab97894c8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2012-03-12 13:14:05 +01:00
Frederik Gladhorn
61692bfefe Remove QAccessible2::TableModelChange.
This was never a good idea since it has issues:
It doesn't really work with more than one update without
the client fetching the data. The same is unlikely to work reliable
since it involves two ipc roundtrips.

Instead we should have an extended QAccessibleEvent that contains
the data so that the bridges can decide how to pass on the data if
needed.

Change-Id: Iaf6b74f49586f7155909a6fe1a17137b71b31175
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 13:14:05 +01:00
Debao Zhang
4eeb07d886 Move tst_qprinter.cpp to QtPrintSupport
QPrinter and QPrinterInfo belong to QtPrintSupport.

Change-Id: I0c146e0c717be365e752c1eaf7dbe6765fb72da2
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 13:14:05 +01:00
Debao Zhang
57cf7c8a1b Clean up some auto tests of gui
These unit tests do not depent on QtWidget.

Change-Id: I95526125c563885c0531da7ebfee06bca9a87b1c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 13:14:05 +01:00