Commit Graph

4826 Commits

Author SHA1 Message Date
Friedemann Kleint
efde205586 Use new plugin system in qtbase.
- AccessibleWidgets
- Windows printer support
- Examples

Change-Id: Icc162bd7fc284b3c76d9966210f983728085c743
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-27 13:28:21 +01:00
Jędrzej Nowacki
6df396286a Simplify QMetaTypeSwitcher.
We do not need to distinguish between different types in the switcher.

Before this patch it was not possible to overload
DelegateObject::delegate with a pointer type. Now it is fixed.

Change-Id: Icd73a53e73e5e66b1b6f6407ba4e0f79e584d930
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-27 13:19:00 +01:00
Stephen Kelly
184c9e346e Optimize space for the QEventLoopQuitLocker.
Use a union and a type enum instead of three pointers.

Change-Id: I02b11733a4f2e95099064fa9325497d4e04ac615
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-27 12:57:30 +01:00
Jędrzej Nowacki
beab403d9f Reduce QtCore lib binary size by around ~3KB, by removing template code
Reusing a template is much better then creating a new one, even if it
should inline the same code.

For some reason replacing T* by void* force gcc to remove a few bytes
per template instantiation too, it is not really significant, but it
alows us to simplify the code.

Benchmarks don't show any regressions.

Change-Id: I4fdf1e4dc311b23021eb5758605602937d05b183
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-27 12:57:02 +01:00
Olivier Goffart
df055acc81 Fix selftests while using QStringBuilder
Change-Id: I6dcd830b96023765447c9683fd95209d4312fb1b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-27 12:49:38 +01:00
Olivier Goffart
ec739707d7 Remove deprecated usage of QKeySequence from qguivariant
The implicit conversion operators are deprecated.

Change-Id: I0e94c0671413da1ab58c6c7b8bb31614e2696409
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-02-27 12:49:33 +01:00
Olivier Goffart
96cfca6151 Remove usage of deprecated QAbstractItemModel::setRoleNames
Change-Id: If41bf0d6d50969156269c67a15e006d38edc8e1f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-27 12:48:57 +01:00
Olivier Goffart
b58631ce47 Don't use deprecated QAbstractItemModel::reset()
Change-Id: Idf9971668a372a12ba319d954c35e157d8a08bd1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-27 12:48:48 +01:00
Jędrzej Nowacki
51f2a0c331 Cleanup usage of QVariant::Type.
QVariant::Type is marked as obsolete. It is not possible to get rid of
it completely, in a source compatible way, but at least we can remove it
safely from a method arguments list.

Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-27 12:47:52 +01:00
Stephen Kelly
1a49a529ee Remove more support for unsupported GCC versions.
Change-Id: I827c9f982a7d7d20913b99c8fdaf98437a0a73db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-27 12:45:31 +01:00
Toby Tomkins
472b06d63a Skip unstable qlineedit autotest on Ubuntu 11.10.
Task-number: QTBUG-24518

Change-Id: Ia271a820613c1f8a885779eddd20e261716afc6d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-27 09:10:25 +01:00
Toby Tomkins
35ef771d5a qfiledialog2: Skip test that is passing on CI and failing otherwise.
Task-number: QTBUG-23602

Change-Id: Id5dfb85956048c60849d865161212b0764e8f250
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-27 08:08:50 +01:00
Kurt Korbatits
efb5a3a52e Changed qnetworkreply unittest to return correct code
- Changed waitForFinished() to return correct return code

Change-Id: Ic6b0dfa195254783a2106011c4a108d907d73557
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-27 04:19:28 +01:00
Marc Mutz
2a771cef4a QFlags<>: let the compiler generate copy ctor/op=
The user-defined copy constructor and
copy-assignment operators were 100% equivalent
to the ones the compiler would generate, so
let the compiler generate them (so we reap
move constructors, too, even though they're
not needed on this class).

Change-Id: Iecdd579fa5a819d083ec9b2f25734ddba85515e6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-26 23:43:10 +01:00
Oswald Buddenhagen
e34ee31270 remove fallback re-initialization of TARGET after parsing project
we already initialize it before parsing a project. if a project is daft
enough to clear TARGET, it does not deserve differently than breaking.

Change-Id: I6c727bc27d72a00e84b676ae3c169024bdb2d929
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-26 13:23:49 +01:00
Olivier Goffart
3688fac040 RemoveRef should not remove the const
This does not fix anything, because AreArgumentsCompatible already
do all the type checks.
But it make RemoveRef consistant with std::remove_reference

Change-Id: Ic42c872356172d7f5ea10de050254b5d10e50a6e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-26 13:23:49 +01:00
Marc Mutz
5f65d8ea25 QFixed: make constexpr
Make most QFixed{,Size,Point} members constexpr.
See f3141c58ba for rationale.

Change-Id: I0b44f59bb768e1f79c57e1c9a0dc67afb515e03f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-26 13:23:49 +01:00
Marc Mutz
3e4a3bafb6 QFixed{,Size}: reformulate some functions in a constexpr-friendly way
The main change is the addition of a new constructor
that passes its argument into 'val' verbatim. In order
to disambiguate it from the existing QFixed(int)
constructor, it takes a second 'int' argument. This
is too ugly for public API, so it's private, and only
used by static QFixed fromFixed(int), which is the
existing named constructor with the same semantics.

The rest of the changes simply reformulate their
operations in terms of fromFixed().

This makes them ready to be constexpr'ed.

Change-Id: I2a3813d62bd4124064755de6b00526a60fc82c1d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-26 13:23:49 +01:00
Giuseppe D'Angelo
47525e6896 uic: remove unused QRegExp #includes
QRegExp is not used, so they're unnecessary.

Change-Id: I3480bcbe013a0bf15e2ee4fa30862fe035820eea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-26 11:58:25 +01:00
Marc Mutz
7679fcfeb5 QPrinterInfo: remove unused variable
Change-Id: I1a3db07e7fe25066a6b13ca41854566ccb1298df
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-26 11:58:16 +01:00
Olivier Goffart
5cc1a87250 Remove usage of deprecated QRect::unite
Change-Id: I1920da995fde6ff2a8b2e3facddeee6e3c17b44c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-26 11:39:40 +01:00
ABBAPOH
4f4491e0b6 Fix doc according to current method signature
Change-Id: I23d0f7a88f4c092c1e7cd2742fdf6e6f68ad485a
Reviewed-by: David Faure <faure@kde.org>
2012-02-26 10:40:14 +01:00
Olivier Goffart
ffa072655d Fix compilation of examples with QStringBuilder
In sub-attack an interview, one can't make two implicit conversions at
once, so explicitly convert to the right type.

The change in the torrent example is required because of
https://codereview.qt-project.org/16168 (commit 9491272)
But in that case, using a QByteArray is better anyway.

Change-Id: Ieed22ac7f0d700d5ba5d1e70af3db4dd6c139c8f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-25 21:30:45 +01:00
Marc Mutz
d91add71e7 QSslError: fix wrong #endif placement
This would break a namespaced Qt when QT_NO_DEBUG_STREAM
was in effect. Unlikely to hit, but nevertheless fixworthy.

Change-Id: Ie2a4cf4334a6a610c84233ab1ca89b928386c91a
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-02-25 15:28:11 +01:00
Jonathan Liu
bc8bc6018e Fix MinGW configure bootstrap
Makefile.mingw was using the test command which requires sh.exe. This
adds support for bootstrap using cmd.exe instead.

Change-Id: Ieb67843170d2745ce119cc8feaa5433aa82fd7d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-25 15:28:11 +01:00
Oswald Buddenhagen
f5a03eec2d process variable assignments with tabs as well
Change-Id: If3caa4094aa9d8caefc9829bfea44426d59477d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-25 15:28:11 +01:00
Shane Kearns
e0acf65043 configure - fix detection of MSVC compiler in x64
x86 processes get redirected to the 32 bit area of the registry,
while 64 bit processes access the registry in raw form.
Added the registry paths for 64 bit processes to see the 32 bit
registry keys for MS visual studio. (Wow6432Node)

This problem was revealed when we stopped including configure.exe
as a binary checkin to git. Running configure in an x64 compiler
environment results in creating an x64 configure.exe

Change-Id: I5e3e51ddbf20ccc65abf1833bf23ee5670bd973e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-25 14:04:22 +01:00
Friedemann Kleint
1118f28b86 Fix a crash in QSystemLocalePrivate::uiLanguages().
Use the correct calling convention. Discovered by the mimetype
test in Qt 5.

Change-Id: I79b97325dd69466885a64c238935107bf14e9a0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
(cherry picked from commit bc6e35d94325f4b18caec7ce0824c5beab95cdd7)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-25 14:04:22 +01:00
Olivier Goffart
71660ee565 Fix compilation without QT_DEPRECATED_SINCE
QAbstractItemModel::reset() is deprecated

Change-Id: I2d9aa9fade1660df14945ca11123341fce504050
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-25 12:37:53 +01:00
Teemu Katajisto
e430ddfafc Implement isSharing() and isValid() methods for QCocoaGLContext
Shared resources may have been used when initializing NSOpenGLContext
but QCocoaGLContext did not implement isSharing(). This caused
default implementation to return false always and therefore shared
resource test case failed.

Implemented also another missing method, isValid().

Task-number: QTBUG-23061

Change-Id: Ia912450035b584ea90a02a7d88d6ae531c3cbadf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-02-25 11:43:35 +01:00
Marc Mutz
6ee0135e9d QFutureWatcher: Make constructors explicit
Change-Id: I363665725869993b10985004c1c6441ded435dbc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-25 11:43:18 +01:00
jian liang
bf66eebbc2 Fix to exit of adopted thread watcher in Windows
Don't register the thread handle and QThread object pointer to watch list
for adopted thread watcher thread in Windows. Otherwise the watcher thread
will never exit and can't clean up its own QThreadData and QAdoptedThread
object.

Task-number: QTBUG-23961

Change-Id: Ia84326cf3cfd978d2b003ccc1bb6861db950e899
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-25 08:23:51 +01:00
Marc Mutz
77772f21de compile fix: parse under C++11
See d94ab97b77 for details.

Change-Id: Ifc015be6575bd8f469f257d71fbbf79e07226729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-02-24 22:39:59 +01:00
Marc Mutz
88016d30a0 examples: compile w/o opengl
Fixes remnants of an automated QtGui -> QtWidgets port.

Change-Id: I31f63bdd6ae71aee8e70b20e24def30e0eafb725
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-24 22:39:40 +01:00
Friedemann Kleint
71fe29711f Use new plugin system for SQL drivers.
Change-Id: I1d4db9ecc7e1cbca66674d13748070f4b19d5b8c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-24 22:38:28 +01:00
Friedemann Kleint
5f320e2f97 Use new plugin system for network bearer plugins.
Change-Id: Ic4a28d379033518f75d0e3e449ddf012109ed9ea
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-24 22:38:15 +01:00
Marc Mutz
b1995f2c96 rcc: micro-optimization
Declare a char array instead of a pointer variable.

Change-Id: I2beff815d05b6dc9c35bb0a55d7294189afbf17e
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-24 17:47:56 +01:00
Friedemann Kleint
ed7f78acba Fix tst_qlineedit.
- Fix key handling in QWidgetLineControl according to
  the keyboard scheme returned by the QPlatformTheme,
  remove #ifdefs.
- Do the same in the test.

Task-number: QTBUG-21402

Change-Id: I36d836584e7122309061af72819a4147cadd0a74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-24 16:21:37 +01:00
Hib Eris
219a688ac1 Add TARGET_VERSION_EXT to pkgConfiglibName
The libName that is used in pkgConfig files should include the
TARGET_VERSION_EXT.

This is needed because in Win32MakefileGenerator::fixTargetExt(),
the TARGET_VERSION_EXT is added to the library name.

In Win32MakefileGenerator::processVars(), if TARGET_VERSION_EXT is empty,
it is set to VER_MAJ.

On platforms != Windows, TARGET_VERSION_EXT does not seem to be used.

We probably got away with this so far because pkgconfig files generation
for win32 was just added in 4.8 and nobody uses them yet, and because on
platforms != windows the TARGET_VERSION_EXT is not used.

Change-Id: I56f239e389f0ef926030e4c2376cadd92c4f673c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-24 16:21:37 +01:00
David Faure
5ae1caed43 qmimetypeparser: more optimized definition of string constants
Change-Id: I0cbc0fef63814ab037bea66ab35b3aa8b6ec800c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-24 16:21:37 +01:00
David Faure
92f37f00f9 Remove unused toolTip member variable (qt3 leftover)
Change-Id: Ia68fb00afb81a0f521f9fbc3f0dbfc7e43075bbe
Reviewed-by: laurent montel <laurent.montel@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-24 16:21:37 +01:00
Thorbjørn Lund Martsum
12c2a3d852 QHeaderView - fix setOffsetToSectionPosition a bit
It might be silly to have sections with size 0 without using hideSection.
Nevertheless we should still use the principle of least surprise.

It does not make sense that hiding a row 'far' away should affect
the semantics of setOffsetToSectionPosition on lower indexes.

Change-Id: Iaf847eba2ea4d28fc7bcfe3a27d62f432f6f61e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-24 14:55:06 +01:00
Morten Johan Sorvig
5a2efb490b QWheelEvent high-resolution delta support.
Support pixel-based deltas as well as sending
dx and dy values in the same event. Keep source and
behavior compatibility with Qt 4.

New API:
QPoint pixelDelta() const
QPoint angleDelta() const

Deprecate delta() and orientation().

Both pixel-based deltas and combined updates are
necessary for smooth trackpad-based scrolling on
OS X.

Qt 4 compatible behavior is achieved by sending an
extra wheel event in cases where the initial event
has a combined dx and dy update. This extra event
sends dx in delta() and orientation(), with pixelDelta()
and angleDelta() set to null.

Modify the Cocoa implementation to provide pixel
deltas. It is expected that not all platforms can
provide these. Angle deltas will always be available.

Change-Id: I20c10f0df338ddcd6a3f7a4d40949ed5ae3b4795
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-02-24 14:55:06 +01:00
Thorbjørn Lund Martsum
e8952aba29 QHeaderView - change not needed if to Q_ASSERT
This removes an if that should always be false. If it isn't
false we had more logical indexes than sections.

Unless visualIndices and logicalIndices are both 0-sized
(meaning that visual and logical indexes are the same)
then they better have exactly as many indexes as sectionCount.
Otherwise there must be inconsistent data - some logicalindex
would refer to non-existing visual sections or some
visualindeces wouldn't be hit by logicalIndices.

Change-Id: I2dc92f40895438d912bba20612131baf63df4fbe
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-24 14:55:06 +01:00
Marc Mutz
9387a9de6d QMimeMagicRule: declare as Q_MOVABLE_TYPE
Change-Id: I3725696e7369eb59eeb08095ffe0b8aa7537b4f3
Reviewed-by: David Faure <faure@kde.org>
2012-02-24 14:55:06 +01:00
Jan-Arve Saether
cbf2575740 Minor fixes for RelationFlag.
* Document AllRelations
* Assigned new values (starting from 1) for the remaining members of
  the enum.

Change-Id: I55ec197f24ff7d43ff3c0d101edd33b9615f9287
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-24 14:55:06 +01:00
Stephen Kelly
9c92df82dd Remove unused QT_NO_QWS_SHARE_FONTS
Change-Id: I47e8111d6caffd9b45096e52695acaa55945c612
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-02-24 13:20:08 +01:00
Stephen Kelly
5a3496ce88 Remove QT_NO_QWS_MULTIPROCESS
Change-Id: I1d6731dc5268919d0c36d5d27285321742be708f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-02-24 13:20:00 +01:00
Stephen Kelly
de5ebd342f Remove unused define QT_NO_COP.
It used to relate to QCop and QWS, which are no more.

Change-Id: Ie70c64a3a6ef60664009108b79eed7f33ea59f32
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-02-24 13:19:54 +01:00
Stephen Kelly
c470999329 Fix the library names on MinGW.
Change-Id: I6c2008a0e7a07ca0603b8aa9362d31fa4ef7310a
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-24 13:19:44 +01:00