Commit Graph

2523 Commits

Author SHA1 Message Date
Jędrzej Nowacki
08863b6fda Refactor QVariant handlers.
QVariant implementation is based on delegation to a handler. The handler
has rather simple construction, it is a set of function that implements
a switch statement over known types and redirects calls to a right
method of an encapsulated types instance. Unfortunately after qt
modularization project, it is not easy to use types directly from
different modules, as they can be undefined or completely unaccessible.
Which means that each module has to implement own handler to cooperate
correctly with QVariant. We can suspect that list of modules known to
QVariant will grow and it is not limited to GUI, Widgets and Core,
therefore it would be nice to have an unified, from performance and
source code point of view, way of working with handlers.

This patch is an attempt to cleanup handlers. Keynotes:
- Each handler is working only on types defined in the same module
- Core handler implements handling of primitive types too
- Custom types have an own handler
- Each handler is independent which means that dispatch between handlers
  is done on QVariant level
- Handlers might be registered / unregistered using same interface

Change-Id: Ib096df65e2c4ce464bc7a684aade5af7d1264c24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-04 14:25:25 +01:00
Jørgen
7929a910c4 Export QOpenGLTextureCache
because it can be useful outside QtGui. The function
QOpenGLTextureCache::bindTexture gives a very convenient way to get a
texture from an image.

Change-Id: I2e22c0a3a8f1f307d0b558280043f726e3d8093a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-04 08:00:28 +01:00
Denis Dzyubenko
e570cad9d7 Deinlined QLocale::operator==
Some time ago this was a blocker that didn't allow to refactor QLocale
implementation due without making binary incompatible changes. Deinlining those
functions for Qt5, it shouldn't be performance critical code path.

Change-Id: I6cb19e32188a2df223d04be0c613a6176ad8d118
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-04 06:01:33 +01:00
Denis Dzyubenko
01674860ac Marked QUuid as Q_MOVABLE_TYPE in the metatype system.
Change-Id: I3d343b71294ad5640636694d1a079ea9dcca6348
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-01-04 06:01:33 +01:00
Frederik Gladhorn
edbd3d6a94 Add virtual destructors to accessible interfaces.
Change-Id: I60a6033911757f86c70f06c2d8d4240d2332b4cf
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
2012-01-04 04:27:02 +01:00
Denis Dzyubenko
e3e234b5eb Fixed static assert in qvariant template magic
CallConstructor<T, /* CanUseInternalSpace = */ false> is called when we need to
construct an object that couldn't be fit in qvariantdata, meaning either it is
not a POD type (Q_PRIMITIVE_TYPE), or it is simply too large to fit there.

Change-Id: Ied122b4a6f600e14312a8d515f5b3e91214a94f1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-04 00:32:44 +01:00
Bradley T. Hughes
7a597e6c43 Make QCocoaEventDispatcher inherit from QAbstractEventDispatcher
... instead of QEventDispatcherUNIX. The Cocoa dispatcher does not use
any of the facilities of the UNIX dispatcher, and it reimplements every
virtual method already (with the exception of flush(), which just needs
an empty implementation).

Change-Id: I24aefd169888946afac7800192a0f96770787718
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-03 22:02:20 +01:00
Frederik Gladhorn
9ea608cb54 Use meta object to get string rep of QAccessible::Role.
Change-Id: I69320b69ea13ebc594575277e39d30a066df61fd
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-03 19:27:17 +01:00
Richard Moore
82f9ad6295 Always load the openssl configuration.
This change makes Qt load the default openssl config always, not just
when compiled with OPENSSL_LOAD_CONF. This means that facilities like
openssl engines (and their configuration) are usable. An alternative
would be to call OPENSSL_config(NULL) ourselves, but that's exactly
what the OPENSSL_add_all_algorithms_conf does for us.

Task-number: QTBUG-16018
Change-Id: I4cda701f82627e0541b6225009f4e1249aec9d47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-03 15:12:24 +01:00
David Faure
053676a80e QStandardPaths: add GenericCacheLocation.
Much like DataLocation = GenericDataLocation + domain + appname,
this makes CacheLocation = GenericCacheLocation + domain + appname.
This way a framework library can have an application-independent cache
(like ksycoca).

Change-Id: I6a8c47ff85b7d5c68b594cc8b071a752d96b029d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-03 15:11:03 +01:00
Pekka Vuorela
bff6cf7b5b QLineEdit to use Qt::ImhSensitiveData input hint on password echo modes
Change-Id: I6922e41e7e57563f1190f46e0890b71e5c4b7ef4
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-03 14:58:06 +01:00
Holger Hans Peter Freyther
991b91ce57 directfb: Refer to the right class in the error message
Change-Id: I41d0b95092d16bc3a643fca903c68be82813dad6
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-03 11:23:35 +01:00
Yuchen Deng
c0542c607b Build fix if using '-no-stl' configure option
MSVC2010SP1:
error C3861: 'wmemcpy': identifier not found

Change-Id: Ib28edb5e38d691635c56dac846134e1c88c3f312
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-03 09:35:04 +01:00
Stephen Kelly
39f3ee8a5d Close bracket in documentation.
Change-Id: Iabc7c6a9f5554450e766dc63f518595871a3abb7
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-02 18:19:36 +01:00
Robin Burchell
d4514b63c7 Remove support for dnotify QFileSystemWatcher.
Inotify has been available in Linux for some ~6 years now, 7 when Qt 5 will
actually be released, so I'd say it's safe to remove this fallback path now,
particularly as the autotest notes that it's broken.

Change-Id: I49dbb161d4765d63e92f512a6375323c7d37ccbe
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-02 18:19:36 +01:00
Robin Burchell
9fbfddfe8a Merge integrity support into unix.
Similarly to ec9ea7f3e8, the code in unix
(non-Linux/OS X) is actually the same as for integrity, so merge the
conditionals together to save duplication.

This should have the side-effect of unbreaking Qt 5 on integrity wrt
the new QStandardPaths introduction, which was not added to the integrity
block.

Change-Id: Ib512fa781f5ceb240069888ce6958c9af2990d37
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-02 18:19:36 +01:00
Jiang Jiang
5295aab4e6 Fix crash in positionInLigature
Check boundary of pos before accessing attributes.

Task-number: QTBUG-23104
Change-Id: I0bc93dbe320badc65acc75bb59b27f481e69b93e
Reviewed-by: Eskil
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-01-02 16:43:02 +01:00
Stephen Kelly
f29e55448b Change the default value of QSortFilterProxyModel::dynamicSortFilter
The value is changed to true. It is a common bug that developers expect
this proxy model to reflect the source model when the source changes.
That requires setDynamicSortFilter(true), so we change the default to
optimize for the common case.

Change-Id: I9bf7efdbda10309fa77aed9391c33054aaae4a29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-02 16:43:02 +01:00
Samuel Rødal
a23a5487eb Send ApplicationActivate and ApplicationDeactivate from QtGui.
Instead of only from QApplication in QtWidgets, as we need these events
for example in QDeclarativeApplication.

Task-number: QTBUG-21573
Task-number: QTBUG-23331
Change-Id: I0c960bd1c7911d306d274a6e9a1838f158235ed0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2012-01-02 15:08:19 +01:00
Holger Hans Peter Freyther
16696ce493 corelib: Introduce Q_ALLOC_SIZE and use it on qMalloc and friends
GCC 4.3 introduced the alloc_size attribute to hint the compiler
that allocated memory will be returned, inform the compiler which
parameter holds the size of the allocation.

Change-Id: I8734868f6bd19e201abdacd0a1b0fb80a27883c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-02 15:08:19 +01:00
Robin Burchell
fb7404e569 Implement (and unit test) simple QVarLengthArray::first()/last().
Pure syntactical sugar, to match up with what the other container
classes offer.

Change-Id: I0f97de011923d9d204cca0fa906b059dc5054a89
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-02 15:08:19 +01:00
Robin Burchell
467a000089 Remove Symbian support from src/corelib/io/.
Change-Id: I52c2a58396e03f29ca478de34c914535c7ae1012
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-02 15:08:19 +01:00
Denis Dzyubenko
5a3b08e994 Do not unconditionally define QT_BEGIN_MOC_NAMESPACE
Qt5 modules are supposed to be in a namespace, but if the namespace definition
is hidden in a macro, then moc doesn't know about it and generates invalid
moc_xx.cpp that cannot be compiled due to usage of classes outside of their
namespaces - e.g. in qtjsondb we have QtAddOn::JsonDb::Foo class, but the
moc_foo.cpp expects to find that class in the global namespace instead.

Fixed it in QtJsonDb to define QT_BEGIN_MOC_NAMESPACE="QT_USE_NAMESPACE
QT_ADDON_JSONDB_USE_NAMESPACE", however we need to ensure qglobal.h doesn't
re-define that macro back.

Change-Id: Ic8407f50c11d2d787167ad2f92457aa3ec126d45
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-02 13:33:11 +01:00
Robin Burchell
8cb0ef0793 Inline some methods in qgrayraster.
gray_conic_to, gray_cubic_to and gray_line_to were all single line wrappers
around their equivilent gray_render counterparts, with an additional lie of
error handling that never actually happened.

Since this doesn't really do anything except confuse the reader, let's ... not
do it :)

Change-Id: Id5d86c49174acb92514b628a70bd32d6c6640a5d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-02 12:53:34 +01:00
Frederik Gladhorn
1323eebfbf Remove env var to enable accessibility on linux.
Usually we don't have a plugin for this on linux anyway.
But if we do, we should actually allow it to interface with the
system.
When using AT-SPI the plugin can detect if it should be active.
Other plugins can fall back to using an env var if really needed.

Change-Id: Ic9dcfa305e7cdafbf4a93bcc2dc9a0fcd9b9a7a2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
6a1ee9667f blitter: Base QBlitterPaintEngine on QRasterPaintEngine
The original intention was to identify a clipping bug, it turns out
that during a ::begin() (and systemChanged) we should forward the
QPaintEnginePrivate state to our proxy engine.
Instead of using the proxy-pattern subclass rasterengine and
specialize the paths we are able to accelerate using the blitter
interface. This will avoid similiar problems in the future. I have
no performance measurement to show which of the two approaches is
faster/slower.

Change-Id: I39bff11b32b1fe20284c7e8df60050de5991bb6e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
ca1921ffe9 blitter: Group code by functionality in header and cpp file
* Group code responsible for tracking the render pipeline state
  to check if we can easily accelerate it
* Code that will call into the QBlittable
* Code that will lock the QBlittable before calling into raster

Change-Id: I862e242d59805de5094ed363b486afcdbc23ff78
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
cef3eb5211 blitter: Fix the 'solid' detection for the brush in case of fillRect
A default QPainter will set a QBrush with Qt::NoBrush BrushStyle, the
current code detects this as a non solid fill and all calls with fillRect
and a color will not go through QBlittable. Check for Solid or NoBrush
style. Manually verified that a p.fillRect(rect, Qt::red) goes through
the accelerated path now.

Change-Id: Ic0d98030e94f5d11abbe61628fbf71d1e08219c2
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
feb6211dfb blitter: Move state updates into new methods
Create updateCompleteState(QPainterState*) so we don't need to
call into the paintengine, move all state methods into the
QBlitterPaintEnginePrivate class.

Change-Id: If30fdcc3f63755e0443bced7d9d9fb993d4ec2b7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
e02749fe7e blitter: Move the definition out of the class
Cosmetic change to remove four spaces of indention from some of the
deeply nested methods.

Change-Id: I67fdd0ab722b7c7c67c4da7a0a0bd86459751700
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
3ec27f827e blitter: Kill the isBlitterLocked variable of the QBlitterPaintEngine
It starts with being initialized wrongly, the call to buffer() will
lock the data while we think it is not locked, it can also get out of
sync by someone calling buffer() again. Remove the variable and
check with the QBlittable if we need to lock the resource into memory.

Change-Id: I350375011138d1b4c2c48c100b7b30b8ea2ae460
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
24c88ebcde blitter: Use CapabilitiesToStateMask as a class member
Move the bit helper functions into CapabilitiesToStateMask as they
are only used in this class, allocate the class as part of the
QBlitterPaintEnginePrivate, shorten the name as well.

Change-Id: If22ddd117a9789cd98edb08f23fd0ffabb17d5a5
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
1180de6d98 blitter: Style changes to the code
Spend some bytes for spaces after comma and keywords. This should
now mostly follow the Qt style guidelines.

Change-Id: I3298c8d41d40ab5b0153a33d44b1b607a2edca8e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Holger Hans Peter Freyther
9a17df0090 raster: Fix typo in a function argument
Change-Id: I903e1245667680f43414414bb0b4bfaa6240ea04
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-02 10:44:00 +01:00
Bradley T. Hughes
4e1ad49998 Make QTimer::singleShot use Qt::PreciseTimer for lower timeouts.
CoarseTimers are worst in their first firing, so we prefer a
PreciseTimer for something that happens only once. If the timeout is
too big, we use a CoarseTimer anyway (current threshold is 2000ms).

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: I30b20acf506e442cd58126abfe3a4d70fc13b075
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-02 10:44:00 +01:00
Bradley T. Hughes
6fc9820d2a Change QTimerInfo (UNIX) to keep the interval in milliseconds.
The API passes the interval as an int, there's no reason to convert
it to a timeval struct. This also prepares for changing the UNIX
timer code to support the different timer types.

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Ie3cc1ae8f1be6a9ad3f1766051642cbf3e614418
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-02 10:44:00 +01:00
Bradley T. Hughes
2bbf9befd8 Add Qt::TimerType argument to QAbstractEventDispatcher::registerTimer()
... and deprecate the old registerTimer() functions. The new pure-
virtual registerTimer() breaks source-compatibility. Subclasses cannot
be instantiated anymore, since the pure virtual function signature has
changed.

QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a
struct with timerId, interval, and timerType members. This is a source
incompatibility that should only affect subclasses of
QAbstractEventDispatcher, which will need to pass 3 arguments to the
TimerInfo constructor instead of 2. If the subclass used QPair<int,int>
instead of the TimerInfo typedef, the QPair<int,int> declarations will
need to be replaced with TimerInfo.

Call the new registerTimer() function with the type from
QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher
to reimplement the new virtual function. The type argument is unused at
the momemnt, except to ensure that registeredTimers() returns the type
each timer was registered with. Implementations for the various
dispatchers will be done in separate commits.

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-02 10:44:00 +01:00
Bradley T. Hughes
ef60ed1c9d Add Qt::TimerType and the QTimer::timerType property
The timer type will control the accuracy of the timer. By default, all
timers are CoarseTimers, which allows for +/- 5% interval adjustment.
PreciseTimers will not have any interval adjustments, VeryCoarseTimers
will have intervals adjusted to full second resolution.

Use QTimer::setTimerType() or the QTimer::singleShot() overload to
specify the type.

QObject::startTimer() now takes a Qt::TimerType argument which defaults
to Qt::CoarseTimer. QBasicTimer::startTimer() gets an overload that
takes a Qt::TimerType argument. The argument is unused for now, since
the QAbstractEventDispatcher interface needs to change (done in a
separate commit).

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: I3100da5aa1fe17ec30b8644897d0fe6ec4a07f52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-02 10:44:00 +01:00
David Faure
05ca21411e Handle -1 (Invalid Key) and Qt::Key_unknown gracefully in encodeString.
Previously they would fall into the unicode handling and return very
strange values.

Change-Id: I62a53894c0983bf53fd79f924b40a6fd3ba02993
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-02 09:04:12 +01:00
Sergio Ahumada
dce0563b27 Unbreak cross-compilation to ARM.
v8snapshot is not required to build V8

Change-Id: I75f728a1237acaac9d3a10a87673fb2b6dd2dc91
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-01 15:17:22 +01:00
Robin Burchell
69a44f9cfc Change event posting to use a QVector.
This provides a ~10% improvement to the newly introduced QCoreApplication
event_posting_benchmark (a simple synthetic benchmark of creating a bunch of
events, posting them, and sending the queue).

before:
********* Start testing of QCoreApplicationBenchmark *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : QCoreApplicationBenchmark::initTestCase()
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000":
     0.82 msecs per iteration (total: 53, iterations: 64)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"10000":
     8.6 msecs per iteration (total: 69, iterations: 8)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"100000":
     84 msecs per iteration (total: 84, iterations: 1)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000000":
     874 msecs per iteration (total: 874, iterations: 1)
PASS   : QCoreApplicationBenchmark::signal_slot_benchmark()
PASS   : QCoreApplicationBenchmark::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of QCoreApplicationBenchmark *********

after:
********* Start testing of QCoreApplicationBenchmark *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : QCoreApplicationBenchmark::initTestCase()
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000 events":
     0.781 msecs per iteration (total: 100, iterations: 128)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"10000 events":
     7.8 msecs per iteration (total: 63, iterations: 8)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"100000 events":
     75 msecs per iteration (total: 75, iterations: 1)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000000 events":
     774 msecs per iteration (total: 774, iterations: 1)
PASS   : QCoreApplicationBenchmark::event_posting_benchmark()
PASS   : QCoreApplicationBenchmark::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of QCoreApplicationBenchmark *********

Change-Id: Ibf56d9526b0a8cbaf171008da4104bb457628172
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-12-30 21:58:10 +01:00
Jonas M. Gastal
231369eb04 Make qDecodeDataUrl return bool.
Change-Id: I23b9fed39af7bea6c171b35e10bd72c424bd903e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-29 16:20:45 +01:00
Sergio Ahumada
78c27380c6 Fix printerPaperSize and some tst_qprinter test failures
Removing QEXPECT_FAIL accordingly.

Task-number: QTBUG-22296
Task-number: QTBUG-22562
Change-Id: I128a78897722cc067168ee50dbcbfc7537abdfcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-29 13:18:20 +01:00
Stephen Kelly
fb9b5d65d8 Enable variadic macros if building in c++0x mode.
Change-Id: I40d1f1f64ad31a299ccad9258f70e9bf3255c3cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-29 03:20:53 +01:00
Jonas M. Gastal
7dffcf8a74 Clarifying the flow of signals on QNetworkAccessManager.
Task-number: QTBUG-22858

Change-Id: I07eaecebf17e73f9c3148465d8970ca7672a900c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-28 16:12:56 +01:00
Robin Burchell
c559edd76b Remove non-const getters marked for elimination.
These all have consted overloads, so there's no need for them.

Change-Id: I3d4f63b8eb8f1b7df7fa772d6172e0a954184d24
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-27 23:38:26 +01:00
Robin Burchell
7f32f6d682 Merge QTextDocumentFragment::toHtml() overload per Qt 5 comment.
Change-Id: Ic8850684c2298b996354e27cc96ad6486d7a3679
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-27 18:37:10 +01:00
Stephen Kelly
38d640ae67 Fix typos parametter -> parameter.
Change-Id: I0ebb3658477a1afdc1af5f4f6f64f12dc20ace56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-27 15:57:36 +01:00
Stephen Kelly
6bb0fe08d8 Increase the value of the UserRole for the ItemDataRole enum.
For future proofing. No need for it to be so small.

Change-Id: I8a0c734f87671881f114922ada7c5bc9524de19b
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-27 15:57:36 +01:00
Stephen Kelly
636aebb823 Replace a pseudo-virtual slot with a virtual method.
Change-Id: I5d0e1e54e0d3d441b71b7594bc14e872512cc937
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-27 15:57:36 +01:00
Jonas M. Gastal
d17b56f42b QLocalSocket shouldn't emit disconnected if it isn't connected yet.
Task-number: QTBUG-22082
Change-Id: I2e1dae133f50a232d4be3ff63cafaf1b417b286c
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-27 14:17:35 +01:00
Sami Rosendahl
b9acd85b2f Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray extraction
QDBusArgument QByteArray extraction operator and QDBusDemarshaller that
implements the extraction do not check the type of the extracted value.
When extracting a QByteArray when the value actually is e.g. a struct of
mixed types the byte array extraction will crash as it attempts to extract
the struct data as a fixed array.

The fix adds DBus type checks to QDBusArgument byte array extraction
operator implementations.
The checks invalidate extracting arrays of other types than bytes to a
QByteArray that worked with the unchecked implementation. The rationale
for this restriction is
1) extracting a QByteArray to a variant checks already that the array
   element type is byte
2) Results of extracting arrays of types wider than a byte to a QByteArray
   are architecture-dependent making such code inherently non-portable.

Task-number: QTBUG-22840
Change-Id: Ie20f2adc06c697a68055c803215fb408568fdd90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-25 21:58:57 +01:00
Sami Rosendahl
b4398dc4e3 Fix crash in QDBusDemarshaller QStringList extraction
QDBusArgument QStringList extraction operator and QDBusDemarshaller that
implements the extraction do not check the type of the extracted value.
When extracting a QStringList and the value actually is e.g. an array of
bytes the string list extraction will crash as it interprets the bytes as
char pointers.

The fix adds DBus type checks to QDBusArgument QStringList extraction
operator implementations.
The checks are as permissive as possible provided crashes are avoided.

Task-number: QTBUG-22840
Change-Id: I4b67d75b59c5052d939f3a69f3e92dabdb3bdd6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-25 21:58:57 +01:00
Sami Rosendahl
8f19f14274 Fix crash in QDBusDemarshaller basic string-like type extraction
QDBusArgument string extraction operators and QDBusDemarshaller that
implements the extraction do not check the type of the extracted value.
When extracting string-like basic DBus type that actually is e.g. an
integer the string extraction will crash as it blindly attempts to use the
integer as a pointer to char.

The fix adds DBus type checks to QDBusArgument string type extraction
operator implementations.
The checks are as permissive as possible provided crashes are avoided.
Previously supported functionality of extracting an object path or type
signature to a string type is retained.

Task-number: QTBUG-22840
Change-Id: I29be1ae592658ca268c65ed692e1d42619d52280
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-25 21:58:57 +01:00
Holger Hans Peter Freyther
03b6cb9345 v8: Build V8 for FreeBSD
For FreeBSD the libexecinfo port needs to be installed and linked to, all
tests execute and pass.

%uname -a
FreeBSD qt-ppa 8.2-STABLE FreeBSD 8.2-STABLE #4: Sun Oct 30 20:43:37 UTC 2011     ich@freebsd:/usr/obj/usr/src/sys/GENERIC  amd64
%./tst_v8
********* Start testing of tst_v8 *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : tst_v8::initTestCase()
PASS   : tst_v8::eval()
PASS   : tst_v8::evalwithinwith()
PASS   : tst_v8::userobjectcompare()
PASS   : tst_v8::externalteardown()
PASS   : tst_v8::globalcall()
PASS   : tst_v8::cleanupTestCase()
Totals: 7 passed, 0 failed, 0 skipped
********* Finished testing of tst_v8 *********

Change-Id: Ia8198128126c2931807c7fb872c15baad47022e1
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-23 23:21:03 +01:00
Holger Hans Peter Freyther
1cb96a6809 v8: Change the selection of Operating System
Instead of doing "I want Linux and do it by selecting Unix and
discarding everything not implementing the Linux ABI". Select the
other operating system first and have a catch all Linux/Unix anchor.

!symbian is left inside as it does not hurt right now but could probably
be removed before Qt 5.0.0.

Change-Id: I731d8349e4f9c0ac33d547523f0a0f422e994e54
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-23 23:20:49 +01:00
Jørgen Lind
57d2306f44 Link to X and Xrender libs in glxconvenience
Change-Id: I54b2704be678f2c3b9ab8d24d044977c9c01e98e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-23 15:21:27 +01:00
Jan-Arve Saether
a203debb0b Fix regression, make sure hit testing work on windows again.
The previous code did not make much sense

This regressed due to 74c9f9d83f

Change-Id: Ia4374623257863edca706a1c3d8b565d0c6bd4c1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-23 13:40:12 +01:00
Bradley T. Hughes
ae8c61db21 Finish removing Qt3 support
Remove the (-no)-qt3support options from configure, and remove the last
remaining references to Qt3Support, QT3_SUPPORT, and
QEvent::ChildInserted.

The compatibilityChildInsertEvents() tests in tst_QObject and
tst_QWidget have been renamed to childEvents(), which is a more
appropriate name.

Change-Id: Id0b45e9b177efcc8dceee8c9ed8afafedeeace2f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-23 11:59:11 +01:00
Sune Vuorela
ef03396072 QCryptographicHash: allow to hash the content of a QIODevice
This adds a new function (and tests) to give the possibility of doing a
QCryptographicHash of a QIODevice, like a QFile or whatever people
needs.

It is a quite handy overload in many cases.

Change-Id: I22fd272f05571844641b3daefcc6746be4e5c7c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-22 19:47:47 +01:00
David Faure
eff09a2794 Fix for -Werror -Wshadow
qevent.h:792:49: error: declaration of 'device' shadows a member of 'this' [-Werror=shadow]

Change-Id: Iccb7e79dd97d55b17fbd4dfaf3503b9e251adcfc
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-22 18:07:34 +01:00
Jędrzej Nowacki
1dc86cbe85 Remove redundant template parameter from QMetaType's internal classes.
Filter doesn't have to be a parameter because we always use
DefinedTypesFilter.

Change-Id: I19b8eb47a4c50e290cf712f909aaead8fdc94cd9
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-22 16:29:14 +01:00
Shane Kearns
4954f71648 Fix http authentication to a different realm on the same server
This is a regression caused by the NTLMv2 authentication patch.
I have manually tested NTLMv2 authentication against MS IIS and reverting
these two lines does not break it.

Task-number: QT-5209
Change-Id: I64159cbe468e1a7f834f8726fd0c9d4ab4c54b38
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-22 16:10:33 +01:00
Jędrzej Nowacki
ee0a997bcd Fix movablity of QVariant.
After 8fd64d22ac (Make usage of internal
QVariant space.) change QVariant started to "inherit" movablity from
interned type.

This change fix it by interning only movable type in QVariant and by
using external allocation for not movable ones.

Obviously, this change has negative impact on QVariant it self, but
after it, QVariant will behave a lot nicer with our containers.

Change-Id: Ibffc95833918f65be737f52d694ee81a2036c412
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-22 16:09:34 +01:00
Shane Kearns
a7b99151f4 Fix race in http connection channel
When authentication is cancelled, close the channel instead of the
underlying socket.
The previous behaviour could result in further requests being sent
on the closed socket, which caused errors in case of https over a proxy.

Change-Id: I3dbfc164de4fb29a426c06acaac8f29b9da1d705
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-22 15:56:08 +01:00
Shane Kearns
d24aad8289 Don't fetch credentials from cache following a failed proxy authentication
Add variable to QAuthenticatorPrivate for tracking failure
Track authentication success/failure in http proxy socket engine
Track authentication success/failure in http connection channel

Task-number: QTBUG-22875
Change-Id: Id5d39e839428271ad687e9da12fbbdea9c478f4f
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-22 15:56:00 +01:00
Shane Kearns
2cc78885b0 Handle plain socket write errors in SSL
When an ssl socket is closed during connecting, and it is using a proxy
then it is possible for the plain socket to be in pending close state
when transmit() is called.
As errors were not handled, this caused the socket (and https request)
to "hang".
It now propagates the error from plain socket.

Change-Id: I6fb86815a2a63e197cea582f4b153e487543477c
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-22 15:55:21 +01:00
Shane Kearns
96cda705dc Fix for assertion failure
Change-Id: I97b9ecc37e938a3050793fc746288243a1cb40b7
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-22 15:55:00 +01:00
Shane Kearns
058fb94aff Fix faulty logic in http connection pipelining
The code which prevents pipelining of requests when authentication is
in use had || where && should have been used.
Also check for blank user with a password.

Change-Id: Ic278cedd370c9d81377f49a0af43aef415cb49ad
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-22 15:49:14 +01:00
Jędrzej Nowacki
56f154c747 Allow QMetaType to register information about movability
We need that information to perform some optimizations in QVariant.

Change-Id: Id9a1716e49e4cedd17cd09a32fea4ff003ef61f2
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-22 13:20:40 +01:00
Harald Fernengel
d868c9945a Remove QT_NO_STL_WCHAR hack
We don't support gcc 2.95 any more.

Change-Id: I842f1f8ac64b9006516c104add0991830ac9a46a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-22 13:20:40 +01:00
David Faure
c02ca6752a Fix handling of invalid modifiers in QKeySequence.
When decoding a string don't assume valid modifier strings. If a
modifier string is unknown return Qt::Key_unknown instead of skipping
the modifier.
Currently 'Win+a' is decoded to 'A' but should be Qt::Key_unknown.

Change-Id: I1c82031159a8b3c19924a7c9e991bc6b1f90d617
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-22 13:20:40 +01:00
Harald Fernengel
500fd52232 Use strlen() inline whenever possible
This allows us to benefit from compile-time optimization

Change-Id: I63dfde3758fcb0ff919fdc0418df1b7586da0b2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-22 13:20:40 +01:00
Morten Johan Sorvig
40cfdf30fa Enable Mac style on Mac OS X.
Add styles/qmacstyle_mac back to the build, modify
qstylefactory to load it on Q_OS_MAC.

Move helper functions from platforms/mac to
qmacstyle_mac.mm. QMacStyle should now be self-
contained and not rely on anything from platforms/mac.

Change-Id: I68fe40bb7f88c01269968bffd9579b7f3b932d4c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-22 13:20:40 +01:00
Martin Petersson
08845d3531 QNetworkAccessManager: fixed foreach copy of host address
Change-Id: I50cb113fb3c803fc5b13c74b3f7ad1fc4283065b
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-22 11:43:55 +01:00
Jonas M. Gastal
755fe9da1d Add ToS option to sockets.
Creates a new SocketOption called called TypeOfServiceOption that can be
used with the existing setSocketOption method to set the ToS byte in a
socket socket. This is done only for unix systems because windows
doesn't support directly setting the ToS/DSCP byte:
http://support.microsoft.com/kb/248611
http://blogs.msdn.com/b/wndp/archive/2006/07/05/657196.aspx

Change-Id: Idf9da2dd8307ac7057982fbfdf9e4e9ebe366780
Task-number: QTBUG-6221
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-22 11:43:55 +01:00
Peter Hartmann
86f5b78394 SSL: fix build with -openssl-linked for OpenSSL 0.9.8*
OpenSSL's SSL_ctrl() always took a "void *" argument as 4th parameter,
since at least version 0.9.7.
I have no idea why we had "const void *" in there.

Reviewed-by: Richard J. Moore <rich@kde.org>
Task-number: QTBUG-23132
(cherry picked from commit 4db91cbd6147e40f543342f22c05b7baddc52e5a)

Change-Id: Ie570e1cc59b72f13d3e6f3ed6fc1892444a63743
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-12-22 11:43:55 +01:00
Jørgen Lind
e6ee1848a3 Disable logging in xcb
The logging groves and modifies a vector.. It should at least be a
linked-list. but anyway, it shouldn't be enabled by default

Change-Id: Iaebb1158eea1c907e31e9606b143c0318a189dd1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-12-22 10:01:16 +01:00
Morten Johan Sorvig
1b51079e48 Mac: Add temporary solution to fix app deployment.
Look for the the platform plugin in "../Plugins" first.
When deployed inside an app bundle this path will
point to the plugin directory inside the app bundle.

Change-Id: I362981a9e0ca9a3e69396b033a571d0b4e2bf78a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-22 02:28:09 +01:00
Jan-Arve Saether
f718728567 Do not crash in the windows accessibility bridge
If the object did not have a QAccessibleInterface subclass it would
crash in the windows accessibility bridge.

Change-Id: I931d69466a5a74a87f1c1c577fb1c918dcc8accf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-22 00:47:03 +01:00
Martin Petersson
54c487cdd2 QNetworkAccessManager: delay IPv4 or IPv6 based on getaddrinfo order
Instead of always delaying IPv4 when we have both Ipv4 and IPv6 we
should use the order we get from getaddrinfo to descide which one
that should be delayed.

Task-number: QTBUG-23066
Change-Id: Ibe8c4d7000abd6e57fe8c6afac8a4a843e17ff27
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-12-22 00:47:03 +01:00
Friedemann Kleint
bc8f25c7e6 QTestlib: Make QImage comparison more verbose.
Introduce a specialization for qCompare(QImage,QImage) that
checks isNull, size and format and outputs verbose messages.

Check isNull, size similarly for QPixmap.

Add an autotest:
- Add test to cmptest and make it a GUI application since
  QImage requires QGuiApplication.
- Make testlib/selftests capable of running X11-GUI applications
  by passing DISPLAY.
- Ignore stderr output for cmptest
- Add test data

Change-Id: I2b29c7822fbeedf2b22c90889739ed7ff859ce92
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-21 22:59:28 +01:00
Friedemann Kleint
5d4acbab0e QTestLib: Fix QFINDTESTDATA for Windows.
- Scan the parent directory of the executable if it is located
  in a 'Debug' or 'Release' directory
- Report with native separators in the log.
- Use the QString::arg() overloads with several string parameters.

Change-Id: I5ea84411e12978f8f958a0bce3ae10da44cc4e3f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-21 22:59:13 +01:00
Stephen Kelly
9c67364708 Convert macros to functions.
Change-Id: I43f4188d1c33cd5a07eb7a12bf3343af7e6a211f
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-21 19:58:14 +01:00
Stephen Kelly
8c207a46e6 Port to list(APPEND)
Change-Id: I198622270324eea62dd5ad6343fdf7c89e736e6c
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-21 19:57:58 +01:00
Stephen Kelly
ad14089179 Remove misleading and incorrect information from dropMimeData docs.
It is not the responsibility of the view to insert data into the
model after a dropMimeData call.

Change-Id: Ib2dedddb3239af0e2bf722a28081c68677e6b2af
Reviewed-by: David Faure <faure@kde.org>
2011-12-21 17:40:15 +01:00
Stephen Kelly
bec40ee055 Fix style in cmake macros files.
Change-Id: I2806ce63f5948dde9c582740bc2f070900987fb5
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-21 17:40:01 +01:00
Stephen Kelly
c76f938fe1 Connect to the moved signals in the header view.
Change-Id: I6954f77ad7d02970f562abcbaf4e733c6d43ead5
Reviewed-by: David Faure <faure@kde.org>
2011-12-21 17:39:36 +01:00
Stephen Kelly
930bcb266c Fix whitespace consistency.
Change-Id: Ia5debce8e5be4e9c67e1ef303e136816ab55bf90
Reviewed-by: David Faure <faure@kde.org>
2011-12-21 17:39:25 +01:00
Robin Burchell
a09fdd91cf Fix -tickcounter in qtestlib.
HAVE_TICK_COUNTER is supposed to be set (if possible) from cycle_p.h, so
guarding cycle_p.h's inclusion with HAVE_TICK_COUNTER ensures it will never be
set.

Change-Id: I6313d0a2efd47c89522623e8e7b3f505489ded90
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-21 07:50:30 +01:00
Jason McDonald
bf4177e9db Remove mention of Trolltech in installation path.
Task-number: QTBUG-19653

Change-Id: Ic92e0bb4980af53568efe77ebc72e048ee5a32d7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-21 01:17:37 +01:00
Robin Burchell
e5f84ebf01 Merge QReadWriteLock constructor overloads per Qt 5 comment.
Change-Id: I3b569b1240a0bc5b2589de353dbf62c175472448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-20 20:47:13 +01:00
Stephen Kelly
341b62d308 Add missing connections.
Unit tested in next commit.

Change-Id: Iab37829f98ef8f2258a30aed60e95aa114379b7e
Reviewed-by: David Faure <faure@kde.org>
2011-12-20 19:02:54 +01:00
Robin Burchell
189f944a0d Remove unused QPicture::detach_helper() private method.
QPicture doesn't need this for quite a long time now, so get rid of it.

Change-Id: Ie575f32555deb130f7b27e11a7617fb2b3dc4e43
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-20 16:18:27 +01:00
Robin Burchell
43aef6f8d2 Remove non-const QMovie::cacheMode().
There's a const QMovie::cacheMode(), so having this makes no sense.

Change-Id: I0b6f20055fcbb28f3a21a8bc303f82543592c9c6
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-20 16:18:27 +01:00
Harald Fernengel
2532ddc48b make QString::fromLatin1 partially inline
This allows us to benefit from compile time optimizations when calling
strlen()

Change-Id: If6694117e613a012fce97f8664e6b43005d255de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-20 16:18:27 +01:00
Robin Burchell
2992db14e7 Remove unused qInitResourceIO() method.
Was effectively removed in 4.x's 2e7d5def1fdabb5949fbffc629da500aa2bb78d7, but
couldn't be removed due to it being exported.

Change-Id: I5061f50deaeae7f53e8b688633e377095b4463c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-20 16:18:27 +01:00
Robin Burchell
ab9ce77e09 Remove qt_image_id() and qt_image_colortable().
Both of these have been unused at least as far back as Qt 4.5 according to git
log -p.

Change-Id: I381024cb1621fbfdb806a62e1cc55ce13219ef17
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-20 14:38:10 +01:00
Pekka Vuorela
b652cc8d20 Adapt from input context mousehandler to input panel in QLineEdit
Change-Id: If14d0cc18188da1dbc8b152fa2fa9583ff03b3bc
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Pekka Vuorela
a1743e4681 Remove input context action support from editors
Relying on obsolete QInputContext API.

Change-Id: I954ccf57204cbb24ff5cec622384fa3b9932a079
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Pekka Vuorela
34cb690163 Adapt from QInputContext interface to QInputPanel
Change-Id: I4143c3b516e7b0e46c706b8a6560bca9d8951572
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Frederik Gladhorn
a730a2b196 Add destructor to QPlatformFontDatabase.
Virtual functions deserve a virtual dtor.

Change-Id: I71b7ae3b7fb0aa1553a37a90dce6270740d49e32
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-20 12:57:38 +01:00
Alan Alpert
cb9b7ceffb Revert "Revert "Add QObject::objectNameChanged(con... signal""
This reverts commit 9b17557f3b.

Justification: Temporary commit, see JIRA task.
Task-number: QTBUG-22985
Change-Id: I3df9eb5fdbdc133349dca5e192dcfcc9e758626c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-20 11:15:21 +01:00
Olivier Goffart
8754bf03f5 Better error reporting in case of connection failure.
Use Q_STATIC_ASSERT_X give a better error message.
If C++11 is used, you get the string in the error.
Else, clicking on the QStaticFailure error still shows you the
string in the qobject.h source code)

And report better failure if the return types do not match.
(Without the static assert, you would still have a compilation error,
but in an unrelated place, with no reference to the actual connect()
call. The error was thrown from the virtual call
QSlotObject::call, without saying where it was instantiated)

Previously the error was relying on the existence of a type inside
CheckCompatibleArguments, but the Q_STATIC_ASSERT requires a bool
(hence the introduction of CheckCompatibleArguments::value)

There also was a typo in the return value of
AreArgumentsCompatible::dummy that made that code not work, and that
error not be reported.
(Instead, the error was reported when QObjectSlot::call is instantiated)

Specialization of AreArgumentsCompatible for the void type have been
added because if the return value of a signal or slot is void, the
connection should work.

Change-Id: I5a93ec787ce2a4b94a26630ca31d5001cd294e4d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-20 09:15:41 +01:00
Jason McDonald
85a77cd5c8 Retire QTest::pixmapsAreEqual().
QTest::pixmapsAreEqual() was left in the Qt4 API for compatibility with
some old tests written for Qt3.  QCOMPARE() is the preferred way to
compare QPixmaps and provides superior diagnostic output when a
comparison fails.

This commit removes QTest::pixmapsAreEqual() from the testlib API and
replaces the last few remaining calls with QCOMPARE.

Change-Id: I051c0e7d3bda072855fcd262d82e8e540619233b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-20 06:17:42 +01:00
Stephen Kelly
1749fef3c5 Remove declaration which is exported from QtGui.
Fixes static build.

Change-Id: I6f82ded7bf6cb3b72b0ef987e781c7e8f9ed932b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-19 23:04:38 +01:00
David Faure
8707c09fcd Fix QDir::removeRecursively so it doesn't follow symlinks to directories.
Critical bug... Good thing I had backups of my $HOME.

Change-Id: I43b3a80786c946b0aec797036c1164d436d521f8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-19 20:48:16 +01:00
Shane Kearns
9ffd69a6a6 Fix regression in user-agent setting of http proxy in a QNetworkRequest
Modifying the proxy causes a detach(), so the socket is still using
the unmodified proxy.
Changed this to setProxy() the modified one back to the socket.

Test case tst_QNetworkReply::httpProxyCommands()

Change-Id: I448c2f2ab43ce8d78bc6edb8261599bf67372676
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-19 19:08:57 +01:00
Laszlo Agocs
2edada763a Update the touchscreen plug-in.
Now works with bcm5974: Added manual contact tracking for drivers that
do not report a tracking id and fixed abs limit querying to use
ABS_MT_* instead of ABS_*.

Fixed reported area: The incoming point was the top-left point instead
of the center which was incorrect.

Added pressure support.

Tracking of event type has been removed as handleTouchEvent no longer
needs it.

Broken debug prints have been removed.

Changed udev auto-detection to pick only /dev/input/event*.

Fixed multiple released state reports with some drivers.

Name and capabilities are now set properly for the QTouchDevice.

Change-Id: I8f026c9a14465bfb6d567f4dcf36c5c03f843868
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-19 17:29:10 +01:00
Olivier Goffart
87679491cb Do not call QueuedConnection slot on partialy destroyed object
This is a regression introduced in Qt 4.8
When QApplication::processEvents is called from a destructor, it is
possible that pending events would still be called on the already
destroyed subclass.
Prevent that by using the same pattern as in QMetaObject::activate

Change-Id: Ida50db07ae089264402dafcde7a41a066479d08b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-19 14:06:12 +01:00
Friedemann Kleint
bbc098ab9f Windows: Remove Window from list before calling DestroyWindow.
Change-Id: Ifef99d9e4e46f0450cecf8ecba18ce79ebec3e8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-19 12:27:45 +01:00
Olivier Goffart
92464faea9 Q_STATIC_ASSERT: fix C style cast
Else tst_moc::oldStyleCasts will fail if one add STATIC_ASSERT in
some headers included by moc generated files

Change-Id: I29ae64c14f10c889137fde36bb14c8ce047d5244
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-19 12:27:45 +01:00
Frederik Gladhorn
74c9f9d83f Accessibility: childAt returns interface
childAt used to return an integer.
Return an interface instead.

Not requiring a direct child to be returned allows optimizing
by bypassing iterating through the hierarchy of accessibles.
For QtQuick this is the only sensible way of implementing this.

The bridges are still responsible for finding the top-most element.

The default implementation in QAccessibleObject is sufficient
to return direct children. The implementation in
QAccessibleApplication is therfore no longer needed.

Change-Id: Id7100dd5bcc3a98de516a7f4a12eaaa41cb46d26
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 12:27:45 +01:00
Stephen Kelly
7e12d2d30f Change a slot into a virtual method.
Implements a BiC Qt5 TODO.

Change-Id: Ie7dc32d954335019166dbd78d8b01ef79e2ad5c2
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-19 10:42:26 +01:00
Stephen Kelly
c023f5600a Remove plugin related variables from the CMake files.
It doesn't currently have any effect and needs to be re-thought
anyway.

Change-Id: I6e620ca5b341264bbf5279a19e8f25af8fa7d396
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-19 10:42:02 +01:00
Jędrzej Nowacki
31d8ecfe3b Make QMetaTypeInterface POD.
QMetaTypeInterface has to be POD because it is constructed in a static
array. Constructors in POD types are not allowed so we will use a macro
instead.

Change-Id: Iab9ae776dfe4dcd7148558f02d6181c5917aa5c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-19 10:21:16 +01:00
Chris Meyer
e75e4421cd Enable option to see filename extension in Mac save dialog
Many Mac OS users expect to have the option to see the file extension
of the file being saved in the save dialog. This patch enables that
option.

Change-Id: I7713bcef16b6f43135b382c7107f306009c7a0a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 09:55:24 +01:00
Chris Meyer
b13f630c81 Add check to make sure qApp exists before using
Check for qApp before using. I'm aware that this is in commented
out code right now; but I wanted to make sure it doesn't
accidently slip back in without this check so I'm submitting
this patch. It caused problems at shutdown in 4.8.

Change-Id: I1c2358ab94f8b698e5519b3e0f988fb5cdd653fa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 09:53:42 +01:00
Jason McDonald
e299832dbf Avoid confusing method overloading in QTestTable.
The private class had two append() methods, one appending a column and
one appending a row.  Use more meaningful names instead of overloading
orthogonal operations.

Change-Id: I97e0268d6cb289694557846f244fe770cf980aaf
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-19 04:43:38 +01:00
Robin Burchell
3992c1cb15 Remove note about Maemo5-reserved enum values, and renumber appropriately.
With the ABI/API break, we can afford to do this.

Change-Id: Iaf318a56d572679322fde0448556eaa4242842d1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-18 15:15:21 +01:00
Robin Burchell
eada3449b9 Remove widget attribute orientation values from Qt:: enum.
These were only actually implemented on Symbian, thus, they aren't too useful,
apart from confusing developers when they don't work.

Removed per the discussion on:
http://lists.qt-project.org/pipermail/development/2011-December/000860.html

Change-Id: Id097cb392a3d964364adbe51a72a22927b9c382c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-18 15:15:12 +01:00
Friedemann Kleint
51fb43b37f QSortFilterProxyModel: Fix warnings about unused variables.
Introduced by 4ebceaba39.

Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>

Change-Id: I81985c4121db5f6abd832f64ef412646daec6259
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-16 19:10:47 +01:00
Joerg Bornemann
d1a671b698 extract QWindowsPipeReader from qlocalsocket_win.cpp
The code for reading named pipes can now be used in
other places as well.

Change-Id: Id734617a3927e369491a6c5daf965169ceb01f74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-16 15:14:12 +01:00
Morten Johan Sorvig
ac0e35c8c7 Cocoa: Accept mouse clicks that activates windows.
Events for mouse clicks that active windows are by
default suppressed. Qt needs to see all events in
order to properly close popup windows.

Wether or not the event should be sent to the
target needs to be implemented later on - in the
QWidget world this is controlled by WA_MacNoClickThrough

Change-Id: I4b96d33978ed2b3cb793f52bb5b6fef234190a00
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-12-16 14:57:04 +01:00
Stephen Kelly
211e434a05 Move proxy and selection models to QtCore.
Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-16 13:00:57 +01:00
Martin Petersson
9bc4b56656 QNetworkAccessManager: delay IPv4 connection with Happy Eyeballs
Incase we have both IPv4 and IPv6 available after the host lookup
we should delay the connection attempt to IPv4.

Task-number: QTBUG-23066
Change-Id: I8c0177cf125c9daae314ada73cacef790a39b856
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-16 11:22:52 +01:00
Jason McDonald
f4ccbc2868 Avoid qDebug in verbose benchmark test output.
Use QTestLog::info() rather than qDebug() to output informational
messages from testlib.  Source file and line are deliberately omitted as
they would come from testlib rather than from a test program.

Change-Id: I7b479bba4d3d553c6fa846d8d5ea2c29a8ef42b8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-16 02:43:46 +01:00
Jason McDonald
8c2727ac18 Switch off signal dumper when testing is completed.
Previously, if the signal dumper was switched on with the -vs
command-line switch, it would never be switched off again.

Change-Id: I192e188010471525723fad0844ff33e9482128ea
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-16 02:43:46 +01:00
Kim Motoyoshi Kalland
6506e0a6ee Improved path filling performance in the raster paint engine.
Convert bezier curves to polylines before rasterizing with gray
raster.

Change-Id: I353debd4338f2a3ce2fa1cfa1bff9dd2e36f05ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-16 00:51:47 +01:00
Morten Johan Sorvig
7b874b7fc4 Cocoa: Update geometry on window move.
Call [QNSView updateGeometry] directly. We can't
got through the frameDidChange notification since
we are not actually changing the QNSView frame.

Rename frameDidChangeNotification -> updateGeometry
sine it now handles updates from two different sources.

Change-Id: I848e558294093cd51d97778734b5cf872435266a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-15 21:04:27 +01:00
Morten Johan Sorvig
140579cb3e Cocoa: Don't set window size in propagateSizeHints
Unless QWindow:baseSize returns a valid value.
Setting the size caused lots of window geometry
instability in Creator.

Change-Id: Iab45e88b47207db900c7655c217959391d84a1bb
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-15 21:04:27 +01:00
Morten Johan Sorvig
c13b223979 Cocoa: Add version check for convertRectToScreen.
convertRectToScreen was added in 10.7, use
convertBaseToScreen on 10.6

Change-Id: Ica1ee0f62e1fc9b0d5ccf463419496684da779b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-15 21:04:27 +01:00
Robin Burchell
81d55783bb Rename QEventDispatcherQPA to QUnixEventDispatcherQPA.
This removes confusion when we add a Linux-specific QPA dispatcher, and is
technically more accurate, as QEDQPA was not 'the' QPA event dispatcher in the
first place.

Change-Id: I2a41d425f284522ee76ef86782d5eb2bdd805120
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-15 21:04:27 +01:00
Robin Burchell
ec9ea7f3e8 Merge integrity support into unix.
Since integrity was pulling in all the same code (except the glib-in-QT_CONFIG
branch), we can just merge this in.

This shouldn't break integrity unless they somehow magically inject glib into
QT_CONFIG without actually having glib, but the removal of redundancy makes this
worthwhile.

Change-Id: I527b5e60bea4452fdca5eedfe729214f16519234
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-15 21:04:27 +01:00
Joerg Bornemann
0330036631 QLocalSocket/Win: eliminate checkReadyRead()
Change-Id: I459c0ba42d3e5b0da57884f5cdfc6f44a11600f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-15 19:17:04 +01:00
Joerg Bornemann
3ccd626429 QLocalSocket/Win: make emitReadyRead timer persistent
This saves us from creating a single shot timer every time we emit
readyRead and eliminates the parallel pendingReadyRead flag.

Done-with: ossi

Change-Id: I1de7f07b83b583b9d60dd8862d6a9f7865b5b891
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-15 19:17:04 +01:00
Joerg Bornemann
abccefa4a8 QLocalSocket/Win: fix behaviour on broken pipe
We must not close the QIODevice, if we detect a broken pipe.
We still can have data in our read buffer that can be read by the user.

Autotest: tst_QLocalSocket::threadedConnection

Change-Id: Ibe823c006516acb27f51a06ca0bbe5555dbd88f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-15 19:17:04 +01:00
Robin Burchell
1431679fb5 Remove Symbian support from /src/corelib/kernel/.
Change-Id: Ic4a1b4f074d2ffd4cdfcb44e47c9bfccc2378760
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-15 17:20:03 +01:00
Thorbjørn Lund Martsum
f405a57fa1 QHeaderView - remove stupid if
Not only is this extra if unnecesary - it is confusing.
oldSize is different from size.
(otherwise we would have returned less than 10 lines above)

Change-Id: Ie911414f679df2be7b5c8bc2670225d46e986b32
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-15 15:39:24 +01:00
Thorbjørn Lund Martsum
3bb0c88de8 QHeaderView - no big update work if updates are disabled
There is no reason to find out where to update the headerview
if updates aren't enabled.  Another approch I considered to skip the
whole calculation and just call update. I seriosly doubt that this
calculation and update of a particular QHeaderView rect will normally(*)
be faster than just updating everything.

However to be safe I have done the conservative fix.

(*) Normally but with many/fragmented spans in the headerview.

Change-Id: Ia812a747ee825653db0345cdc34f9d2f7155ea01
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-15 15:39:24 +01:00
Robin Burchell
f9516e4c8e Split timer handling out of QEventDispatcherUnix.
This makes it easier to see the guts of the unix event dispatcher, and to
experiment with it.

Change-Id: I715bb68c4de6798e10bc55304a128b88e0249c63
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-15 13:33:31 +01:00
Bradley T. Hughes
317ee62d44 Remove unused ownObjectName field from QObjectData
This field isn't used at all in qtbase, nor in any of the qt5
submodules.

Change-Id: If57d389935593f797818506a220c6a3cc04b6078
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-15 13:33:04 +01:00
Bradley T. Hughes
2561ab5841 Remove QT_JAMBI_BUILD code
Change-Id: Ic9231b11293af4352f11cf075893175f0c9a471f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-15 13:28:09 +01:00
Bradley T. Hughes
0501c9d8f1 Correct sizeof(QObjectData) after out-of-order cherry-picks by Gerrit
Commits a6ae75f92a and
6f0f9f6928 were cherry-picked in the wrong
order (despite the dependencies shown in Gerrit), causing the
QObjectData::unused bitfield to be too large.

Change-Id: I65acaa8b507f7f6f2c5735f45bd0ad8343abea54
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-15 08:17:49 +01:00
Jason McDonald
a925226d44 Remove Qt5 comment from qsignalspy.h.
The removed comment refers to a task in a bug tracker that no longer
exists.  The comment also mentions making (part of) testlib use Qt's
regular binary compatibility mechanisms, which is desirable in the long
term but not in scope for Qt 5.

Change-Id: I6f23a9a2c8a84e30afe2aeb5c53ea93c25ba6f11
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 08:15:13 +01:00
Jason McDonald
95cb93dc59 Fix incorrect function name in assertion.
Change-Id: I3eb8e7afe3f7ca514dd4839e603612b56c7d8082
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 08:15:08 +01:00
Jason McDonald
a3109c8b0b Remove QTest::qt_snprintf() from testlib API.
This was an internal function that used to act like qsnprintf() but also
filtered unprintable characters out of the test output.  The filtering
has been moved somewhere more appropriate and this function is no longer
used by testlib.

Unfortunately, the function was exposed in the public API due to its
former use in the implementation of a public macro.

In the unlikely event that any code outside testlib calls this function,
the call should be replaced by calling qsnprintf(), which comes from the
QtCore/QByteArray header.

Change-Id: Iddc17b4361d16ebddd19346ae7d1064951dd7738
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-15 08:02:36 +01:00
Giuseppe D'Angelo
be6b29f001 Fix typos in QObject::(dis)connect warnings
For some strange reason "Object::method ..." was printed, without
the leading Q.

Change-Id: I10b99e8aa8730e4020d15b3e04a01004bade76c3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-15 05:48:27 +01:00
Jason McDonald
dc98d58562 Improve QTest::keyClick documentation.
Make it clear that the delay is applied before each key-click is
simulated.

Change-Id: Id100f1f2db1a5b1651c3046905719d7eb06ec1a0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 01:57:57 +01:00
Jason McDonald
5b413852dd Update documentation of QTEST_MAIN macro.
Update the docs to describe the behaviour that resulted from moving the
traditional Qt widgets into a separate library from the rest of GUI
classes.

Change-Id: Ibd0ef05cc871b8f5a6700e421aa41bdf64c1210b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 01:57:53 +01:00
Jason McDonald
c45f9c7761 Improve QCOMPARE for QStringList
After establishing that both lists are the same size, there is no need
to calculate the minimum of the list sizes.  Also, use sizeof() instead
of hard-coded values when calling qsnprintf().

Change-Id: I2396cf3f941770229e1cef6422aeddbe549c51fc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 01:57:48 +01:00
Bradley T. Hughes
c4e36728bc Disable warnings when building mkv8snapshot
Like in commit 5341cf7831, do not enable
warnings when building V8 code.

Change-Id: I447db52d546b50aea1c3afc88db7ce6923a5e310
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-14 23:26:15 +01:00
Morten Sorvig
f950a0f0c0 Make QCocoaWindow independent of NSWindow.
QCocoaWindow now gets resize events from QNSViev
and does not require a NSWindow. QWindow instances
can now be inserted in NSView hierarchies. This is
useful for Qt-as-a-plugin use cases and is needed to
implement QMacNativeWidget for Qt 5.

Change-Id: Ia95ea9c22a15a3e62d1e6543466cff07390c70a2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-14 23:26:15 +01:00
Morten Johan Sorvig
f295ef1a4b Cocoa: Add window debug output
Add logging for setGeometry/setVisible/propagateSizeHints.

Change-Id: I3590caed586d36f789dd67b1951e8152f923a407
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-14 23:26:15 +01:00
Friedemann Kleint
3b2d99a5c8 QIBusPlatformInputContext: Fix a crash in tst_qinputpanel::update.
Change-Id: If50c442958b6f25f17325f7792bb3f882e4b13e7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-14 23:26:15 +01:00
Friedemann Kleint
56c4ddfdf6 QPlatformDialogHelpers: Reduce dependency on QDialog.
For each QDialog-derived class, introduce a Q[X]Options class
containing the options of the dialog. An instance is shared
between the QDialog (or dialog desktop component) and the
helper.

Change-Id: Ibabf508a4b9eaea25615638a47a4c1b8f93c019e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-14 21:49:33 +01:00
Thorbjørn Lund Martsum
f86007175d QHeaderView::ResizeToContents slow hide fix
I have been a bit confused about what QHeaderView::ResizeToContents
does good. It only sizes depending of the visible part.

However in hide it goes crazy and checks calculates size hints
for every row. At first I considered to solve it in QTableView.
It could be made to calculate the maximum height of the maximum
screen - however I decided not to touch it since I was not
certain that it wouldn't have any unexpected side effects.

Therefore I instead made this patch which is more simple and seems
to be safer. The logic is that when a QHeaderView is hidden we actually
only want to recalculate sizes if the headerview has a visible parent.

Task-number: QTBUG-14234

Change-Id: I186ab6afa95aed43022f2bb7c36e3fd008355d9b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-14 18:18:59 +01:00
Aaron Kennedy
eeade8bf9c Update V8 to match current patchset
Change-Id: Ib3a093129b1f8bbe66fc870af8871dea3f58c081
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-12-14 15:39:43 +01:00
Aurindam Jana
cd44813bae Update V8
Update V8 with fix for Issue 1853
(http://code.google.com/p/v8/issues/detail?id=1853)

Change-Id: I10f652228ab1421b280b433eb2a59aeb83a7699f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-14 13:19:03 +01:00
Laszlo Agocs
3064c1bc8c Remove redundant touch processing in QtGui and widgets.
The duplicated hash tables in QGuiApplicationPrivate and
QApplicationPrivate are now unified into one single hash table in
QGuiApplicationPrivate. This also reduced the number of lookups.

The extra processing needed to keep the touch points' first/lastPos
values in sync is now done only once, in QGuiApplication. This
eliminates the performance penalty (for widget-based apps) that was
introduced during the QPA migration.

As an added bonus the patch adds support for touch events arriving
simultaenously from multiple devices. This was broken before: As there
is no guarantee that two devices/drivers will not send touch points
with the same ID, using structures with only the ID as key is
wrong. The proper key is composed of the device ID (that is, a
QTouchDevice pointer) and the touch point ID.

The exported internal function qt_translateRawTouchEvent() has been
removed. This function cannot work properly in the QPA world: It
injected touches into the widget subsystem (QApplication) only which
is wrong, and would result in half-filled touch events due to not
routing the injected data through QGuiApplication. Autotests using
this function are migrated to
QWindowSystemInterface::handleTouchEvent().

Change-Id: I7632781d77f9e0ac4626fd7c9933511c94492156
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-14 13:17:19 +01:00
Bradley T. Hughes
14d9a2b06c Remove QAlphaPaintEngine::drawImage()
It was not a proper reimplementation of QPaintEngine::drawImage(), which
takes 4 arguments, not 3 as declared in QAlphaPaintEngine. Remove the
code, since it is not being called.

Change-Id: Ia125a9c7e8a2e05ec2ca11b859c01ccbf4d55af5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-14 09:27:04 +01:00
Jason McDonald
2395a3c897 Remove incorrect information from QCOMPARE documentation.
The documentation stated that QStringList objects would be compared
starting from the end of the lists.  The implementation in qtest.h
actually starts at the beginning of the list, and always has done since
qtestlib became part of Qt.

Change-Id: I056f584564d46402ba23fc6a89c801cb5c3c6262
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-14 09:27:04 +01:00
Morten Johan Sorvig
876b2d06f7 Cocoa: Use new 10.7 mouse wheel API.
Silence "deprecated" warnings. Use the old API
on 10.6.

Change-Id: I0cfa3a083108618023b491589a85ddfc268f990b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-14 09:27:04 +01:00
Michael Brasser
a9ad8886fe Fix possible jump in animation timer.
When starting new animations with existing animations running, ensure
we force an update to the timer first, so that the new animations can't
mistakenly start with a very large delta.

This fixes tst_qdeclarativeanimations::alwaysRunToEndRestartBug failure
on slow machines.

Change-Id: Ida4e5dcf0ff792e6bfe0d244b6e969d04d0b20fa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-14 02:16:40 +01:00
Jędrzej Nowacki
3ed0a23323 Add specialization for QTypeInfo<void>
QTypeInfo uses sizeof which is illegal operation for void type.

Change-Id: Idf43551bdfafbb76e32f4f2785af5f4291981e73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-13 16:36:33 +01:00
Debao Zhang
7694599ef9 Fix Memory leak related to Content Menu
From Qt4.7 on, the contextmenu of
QTextEdit/QPlainTextEdit/QLineEdit/QLabel/QMainWindow etc using
QMenu::popup() instead of QMenu::exec(), but the
setAttribute(Qt::WA_DeleteOnClose) does not work, as QMenu::close()
isn't called when the menus disapper. And this causes a memory leak.

This is a side effect of b7af368e86874d71ffc9071c9ef009814d6a3467

Task-number: QTBUG-22817
Task-number: QTBUG-19592
Change-Id: I4c2c3edb3f63ce914b7b57cd0fbcec20488c8315
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-13 16:36:33 +01:00
Bradley T. Hughes
d308797d00 Finish removing virtual child integers
Finish the work started by commit
beb72b2fbf. This silences warnings found
by -Woverloaded-virtual.

Change-Id: Ic6f5e77e324463ade8349f23f272b41b509d87e4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-13 14:54:09 +01:00
Johannes Zellner
8757aaaf2f Fix debug output in eglfs with QEGL_EXTRA_DEBUG enabled
Change-Id: I615a953b52184d01c5b1b78d1cff283f94c458d9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 13:58:56 +01:00
Kim Motoyoshi Kalland
d52fd497f6 Improved performance of large text when parts are outside view.
Avoid generating paths for the parts of the text that are outside
the viewport in the raster paint engine.

Task-number: QTBUG-22687
Change-Id: I06159bc4c1aa82a07606f4b2f0336cb25dfd56d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-12-13 11:11:58 +01:00
Bradley Smith
0553ab9127 Fix QPA xlib plugin handling of setParent(0).
Dereference of the parent argument did not check for nullptr. For
example, the hellogl example would crash. Now if the parent
argument is null, the screen's root window is used.

Change-Id: Ib06181c9ab9794d577722f1c1dd5ee92e4edaee5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 11:11:58 +01:00
Jason McDonald
d702da7482 Add missing assertion to QAbstractTestLogger.
If passed an empty string, QAbstractTestLogger::outputString() would
crash, so add a QTEST_ASSERT to make the cause of any crashes more
obvious.

Change-Id: I00afe2e73120b87e211f858402d441f345dddd08
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-13 07:41:27 +01:00
Rohan McGovern
9f592dbd60 testlib: fixed actual, expected order in QTest::compare_helper
These two parameters were written in the opposite order in the
function's declaration and definition.  Harmless to the compiler,
but confusing to developers and reviewers.

Change-Id: I1d4cb0a41b465b5f918daa76756677fe0cfe0a59
Reviewed-by: Jason McDonald
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-13 05:19:08 +01:00
Michael Brasser
5d00ae3b69 Stop animation driver in the appropriate place.
Calling stop from restartAnimationTimer was incorrect (it was initially
added as a fix after the introduction of QAnimationDriver, but this is
a better location for the fix).

Change-Id: I2507096b846ada061e36a9ece6aa814d801ddd53
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-13 02:24:03 +01:00
Michael Brasser
30a4d9bc99 Only call profiler callback once per animation tick.
Change-Id: I369afdf34ded2c6327ce36cdb80fab51bf89a1b5
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-12-13 02:23:55 +01:00
Michael Brasser
08d378d933 Cleanup pause timer handling in QUnifiedTimer.
The animationTimer is now only used for pauses, so can be renamed to
pauseTimer, and directly queried for whether it is active.

Change-Id: I3d9319b6ee76158e875ab43657126a0aa0a1cf2e
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-13 02:23:47 +01:00
Michael Brasser
3bd3b82a2f Fix possible jump in animation timer.
If both a stop and start happen within an event loop, ensure they are
processed in order.

Based on a patch from Charles Yin.

Task-number: QTBUG-22865
Change-Id: I6131bd43a6ba5ad4fa37c863a9f4598bf2ac0e01
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-13 02:23:42 +01:00
Stephen Kelly
309cdc358e Move QAbstractItemModel into a separate directory.
Change-Id: Ib505520dd5b52743634befbf3f148d7f8c21ec44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-13 02:23:42 +01:00
Thorbjørn Lund Martsum
4465fdd166 Compile fix - qxcbconnection.cpp (‘Display’ was not declared)
To avoid getting
qxcbconnection.cpp:89:29: error: ‘Display’ was not declared in this scope

Platform linux - configured with
./configure -nokia-developer -nomake examples -nomake demos -nomake tests -no-gtkstyle -no-v8

Change-Id: Ief7315bb8aa67c6454cdeddb1c02e60ea79801b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 00:44:09 +01:00
Robin Burchell
a3b3cfe3b8 Use QVarLengthArray in QXcbConnection.
There's no need in using a QList here, since it's never passed around anywhere;
the reference counting is just unnecessary overhead.

Change-Id: I92107c69f7338acc396e2ac4a69123c6a2becaed
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 00:44:00 +01:00
Stephen Kelly
23ab6a726a Add the .exe suffix to executables on Windows.
Change-Id: I257bb7d62ae18ea529df6b10694fcf25eedc83f4
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-12 19:10:34 +01:00
Frederik Gladhorn
2e02aaf24c Make QApplication::type() set by QGuiApplication.
QApplication::type used to be static and set by the
QApplicationPrivate constructors.

In QCoreApplication we have the new application_type that should take its place.
QApplication::GuiServer is deprecated (since it doesn't have any functionallity
any more with QWS being removed).

This change prepares QStyle to be called from a QQuickCanvase based application
that does not inherit the QWidget version of QApplication.

Change-Id: Ifbe992e25f1e5821fa047b6eb915f75fa675ab97
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-12-12 17:28:24 +01:00
Rohan McGovern
1b6b1358bf v8: give sensible error message if v8 sources are not checked out
A common error for developers attempting to build qtbase for the first
time is to miss cloning the v8 submodule.

Let qmake check for existence of the sources so we get a sensible error
at qmake time, rather than a relatively inscrutable error at make time.

Change-Id: I70b478e63c962263dac4f2ddccb377b4c9777ceb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-12 17:27:19 +01:00
Laszlo Agocs
91b48208f5 Add touchEvent() virtual to QWindow.
Unlike keyPressEvent(), mousePressEvent(), etc. the touch events had
no equivalent so one had to fall back to reimplementing event() or
using an event filter. This is now corrected by introducing
touchEvent(). Touch events are finally becoming a first-class citizen
in Qt 5.

Change-Id: Ia2044030154fd5b1b5384f08a3cb1749b798435f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-12 17:27:19 +01:00
Stephen Kelly
0319f13f1a Remove symbian cases from library and plugin loading code.
Change-Id: I381873449b1520152cd2a7aede9c7253e110ef7a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-12 17:27:19 +01:00
Morten Johan Sørvig
82b73ab03a Cocoa: Add autorelease pools.
A couple of cases where we call Cococa APIs without
having an autorelease pool in place surfaced after
removing the global autorelease pool in 1a218a7. 
(This happens when when Qt API is called before 
app.exec() has started the Cocoa event loop.)

Add local autorelease pools to prevent memory leaks.

Change-Id: I0c4be3ff102aaff4539235857f95ab29fdbc9d70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-12-12 17:27:19 +01:00
Robin Burchell
6802e3165e Add QVarLengthArray::length().
This also adds a unit test for length()/count()/size(), since there wasn't one
testing it explicitly.

Change-Id: Ifb7f113aa97beef5f76e5fb246eb38495344b0ad
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Marco Schmidt <Marco.Schmidt@Taugamma.de>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-12 17:27:19 +01:00
Richard Moore
3ac957690c Remove unused member variables from private class.
These aren't used, and so they shouldn't be there.

Change-Id: Id4a08d90836c45c140d811b8eca07756e14c56e5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-12-12 17:27:19 +01:00
João Abecasis
e7a6906da6 Remove template <class T> class QRingBuffer
.. as it is declared and defined in .cpp file but never used.

Change-Id: I7b72daf62712b4ec25717afbe2b7f0792ffa2a85
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-12 17:27:19 +01:00
Friedemann Kleint
c9d6def002 Windows-DnD: Fix cursors.
Re-add pixmaps that were removed from QGuiApplication.

Change-Id: I9936da115e494cf816116159419d40840176afd5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-12 15:38:47 +01:00
Friedemann Kleint
5b7a1ca85b Windows: Fix clipboard test.
Return the QMimeData set on the Ole object if we own it.

Change-Id: I08de0968e04a7356fed1255feb495f7b85e7a6f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-12 15:38:40 +01:00
Bradley T. Hughes
7ac4bf8a40 Silence -Woverloaded-virtual warnings in QRasterPaintEngine
The QRasterPaintEngine::updateState() is not a reimplementation of
QPaintEngineEx::updateState(const QPaintEngineState &state). Rename the
updateState() function to updateRasterState(), and ensureState() to
ensureRasterState(). These names were chosen to match the class name
QRasterPaintEngineState on which these functions operate.

../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengine_raster_p.h:271:10:
warning: 'QRasterPaintEngine::updateState' hides overloaded virtual
function [-Woverloaded-virtual]
    void updateState();
         ^
../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengineex_p.h:202:18:
note: hidden overloaded virtual function 'QPaintEngineEx::updateState'
declared here
    virtual void updateState(const QPaintEngineState &state);
                 ^

Change-Id: Ie9ff0230019b383d53757029c6b2194dfc6a2664
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-12 15:35:54 +01:00
Bradley T. Hughes
c560836263 Silence -Woverloaded-virtual warnings in QBlitterPaintEngine
QPaintEngineEx declares several virtual clip() overloads, but clip()
with no argument does not reimplement any of these. Rename it to
clipData() (to make the name of the return value more closely).

../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengine_blitter_p.h:104:29:
warning: 'QBlitterPaintEngine::clip' hides overloaded virtual function
[-Woverloaded-virtual]
    inline const QClipData *clip(){return raster()->d_func()->clip();}
                            ^
../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengineex_p.h:157:18:
note: hidden overloaded virtual function 'QPaintEngineEx::clip' declared
here
    virtual void clip(const QPainterPath &path, Qt::ClipOperation op);
                 ^

Change-Id: Ifd7c494e2c999d743216cfb4c27a9c3ccf66f2a9
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-12 15:34:14 +01:00
Shane Kearns
f74ff46c7a Fix NTLM authentication with email address
When using "user@dns-domain" for NTLM authentication, the whole string
should be sent as the username, and the domain should be set to an
empty string.
The domain sent by the server is still reflected if the username
does not contain an '@' character.

Manually tested using MS IIS on a domain-joined PC.

Task-number: QTBUG-19894
Task-number: ou1cimx1#949951
Change-Id: Ie1f81172e71cb7cce7b8c909062be990c24aea47
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-12-12 13:34:25 +01:00
Shane Kearns
b830c9cede Fix null pointer dereference in NTLM authentication
If NTLM authentication is required for the URL with an empty path,
then QNetworkAuthenticationCache::findClosestMatch(url.path()) returns 0.
e.g. "http://10.1.2.3".
Return a default constructed credential in this case.

Change-Id: I84ad3b308ee3f74fbbac9ad0f11dbdc66047b50b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-12-12 13:34:11 +01:00
Andrew den Exter
d6fb4463b8 Delay masking the last character in Password echo mode.
If QT_GUI_PASSWORD_ECHO_DELAY is defined in qplatformdefs.h with an
integer value in milliseconds, QLineEdit and TextInput will display
the last character entered unmasked for that delay period and then
mask the character as normal.  If QT_GUI_PASSWORD_ECHO_DELAY is
not defined then the behaviour is unchanged.

Task-number: QTBUG-17003
Task-number: QTBUG-20719
Reviewed-by: Martin Jones
(cherry picked from commit f9e7aee2019d321edd655bfde7de43f20a106971)

Change-Id: If69b384636e3775ad7898b8ffc441011c21abe98
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:40 +01:00
Andrew den Exter
6e0e834e03 Fix TextInput test failures.
emitCursorPositionChanged won't emit cursorPositionChanged if the
cursor position hasn't changed but that doesn't mean the micro focus
hasn't changed, so emit updateMicroFocus changed when
cursorPositionChanged isn't.

Task-number: QTBUG-21017
Task-number: QTBUG-21011
Task-number: QTBUG-20719
Change-Id: I86344621151dbeba0eebc67fbc786a8da76b7021
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:34 +01:00
Andrew den Exter
28165d5446 Move cursorDelegate with the mouse selection of read only text input.
Task-number: QTBUG-20719
Task-number: QTBUG-19109
Reviewed-by: Martin Jones

Change-Id: I2cec51eb5b01dc5750614edf5b39d6a3da661fc6
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:28 +01:00
Andrew den Exter
734033e71d Make it easier to select words at the start of a line.
QTextControl's word selection will only include a word if the cursor
position is past the mid point of the word. This can make it
difficult to select words near the edges of the screen on touch
devices.  For the TextEdit word selection mode select a word ignore
the relative position within a word.

Task-number: QT-5206
Task-number: QTBUG-20719
Change-Id: I77e71e01d8021d66ada785cf894ba876faccefdf
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:13 +01:00
Laszlo Agocs
6f1c4fb342 Store the primary status in the touch point flags.
For some reason the primary bit has previously been encoded in the
touch point state, even though it has nothing to do with the regular
states like Pressed, Released, etc.

The value is now stored in the recently introduced flags member of the
touch points. This also reduces the need for error-prone internal
masking of the state value.

The structure used by QWindowSystemInterface::handleTouchEvent also
becomes cleaner because the primary status can now be set in the flags
member and the isPrimary bool can be dropped.

Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-12 12:28:29 +01:00
Honglei Zhang
67be01ae50 Check driver validity before using it
Even though it is stated in the documentation that the SQL driver must
remain valid during the life time of QSqlQuery, there are users who don't
follow the rule. It's common that the destructor of QSqlQuery is called
after the driver is already deleted. This fix checks the validity of
the SQLite driver before QSqliteResult uses it in destructor.

Task-number: QTBUG-16967
Change-Id: If0f52113f12e14102da1671cd6e12bdaa267114f
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2011-12-12 10:43:44 +01:00
Friedemann Kleint
b9ebb65c77 Revert "Remove unused overload of QTest::qExec."
The overload is used in Qt Creator
(see src/libs/extensionsystem/pluginmanager.cpp).
The use case here is an application whose internal
QObjects can be tested by passing a command line parameter.

For this use case, it is inconvenient to have to allocate
memory and create a char argv[]- array.

This reverts commit ad80d42f8e.

Change-Id: I2a2f91e2840100fd62743f6d03b33005d67b18f8
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-12 10:43:44 +01:00
Bradley T. Hughes
77f41a68b3 Silence -Woverloaded-virtual warnings in QFileDialog
The QPaintDevice::init() virtual, reimplemented in QWidget, is hidden by
these declarations, and clang (and gcc with -Woverloaded-virtual) warns
about this. There is no need to overload the init() name, use more
descriptive names instead.

dialogs/qsidebar_p.h:124:10: warning: 'QSidebar::init' hides overloaded
virtual
      function [-Woverloaded-virtual]
    void init(QFileSystemModel *model, const QList<QUrl> &newUrls);
         ^
dialogs/qfiledialog_p.h:303:10: warning: 'QFileDialogLineEdit::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
         ^
dialogs/qfiledialog_p.h:314:10: warning: 'QFileDialogComboBox::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:330:10: warning: 'QFileDialogListView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:342:10: warning: 'QFileDialogTreeView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
kernel/qwidget.h:682:10: note:
      hidden overloaded virtual function 'QWidget::init' declared here
    void init(QPainter *painter) const;
         ^

Change-Id: I7a317a551b92fde966e61958dcaf25dea94d69b4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-12 08:56:53 +01:00
Jason McDonald
c07b840739 Remove -keyevent-verbose option for autotests.
This option does nothing -- the only function that checks if the option
has been set is never called.  This appears to have been the case ever
since testlib was imported into the Qt repository in October 2005.

Change-Id: I837aa957e2d8bd47c3d1c551f1b94d4374daa25e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 08:50:55 +01:00
Jason McDonald
949aaf9a2a Stop using QTest::qt_snprintf() in testlib.
After the previous commit, QTest::qt_snprintf() is equivalent to
qsnprintf(), so just use that instead.

Change-Id: I89ad6e3749ba5efb1926b0b618a904e8baca9f52
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 06:43:44 +01:00
Jason McDonald
e179afdbb6 Improve definition of QTEST_NO_SPECIALIZATIONS
Remove the part of the definition that applies to gcc versions <= 2.x
as these versions are not supported by Qt5.

Change-Id: Icee6b51ffe78fa30fd7193ef96b6ce0484b8fcae
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 06:43:39 +01:00
Jason McDonald
c5ee721795 Filter unprintable chars out of all test output.
Previously, unprintable characters were filtered out of test output
while the output strings were being formatted by either qt_snprintf() or
qt_asprintf().  Any strings not formatted by one of those functions
weren't filtered at all, and any strings passed more than once would be
filtered more than once.

This commit separates the filtering of output strings from their
formatting, leaving the filtering until just before the strings are
written to the output stream.  For now, the filtering is done by a
protected method of QAbstractTestLogger, but this could easily be
changed to a virtual method in future to allow different filtering
for loggers with different output character sets.

Change-Id: Ia4bb49cd10d37c84af75d2cf58325d27f0e16d99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 05:01:00 +01:00
Stephen Kelly
4c1f5edda6 Clean up includes in QStringListModel.
Change-Id: Idb7167d1206925179fa812b6e3643ed9172f8479
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-12 01:34:15 +01:00
Bradley T. Hughes
6f0f9f6928 Remove QMetaObject guards and deprecate QPointer.
QWeakPointer is superior and preferred.

Remove QMetaObject::addGuard(), QMetaObject::changeGuard(),
QMetaObject::removeGuard(), and QObjectPrivate::clearGuards().

Implement QPointer using QWeakPointer<T> instead. This changes the
behavior of QPointer in 2 ways:

- During destruction of a QWidget. Previously, the destructor of QWidget
would reset all QPointers so that they would return zero when destroying
children. Update tst_QPointer to account for this change.

- When constructing a QSharedPointer to take ownership of an object
after a QPointer is already tracking the object. Previously, the shared
pointer construction would not be affected by the QPointer, but now
that QPointer is implemented using QWeakPoiner, constructing the
QSharedPointer will cause an abort(). Fix tst_QSharedPointer by
removing the use of QPointer in the objectCast() test.

These behavior changes are documented in the QPointer class
documentation and in the changes file.

Change-Id: I92d0276219c076ece7bcb60f6e1b9120ce4f5747
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-10 16:11:48 +01:00
Bradley T. Hughes
a6ae75f92a Don't overload the meaning of QObjectData::wasDeleted
The union in QObjectPrivate of declarativeData and
currentChildBeingDeleted shouldn't use wasDeleted to determining the
meaning of the unioned pointer. Instead, add
QObjectData::isDeletingChildren, set that in
QObjectPrivate::deleteChildren(), and only use the
currentChildBeingDeleted member when the parent's isDeletingChildren is
set.

This solves aborts seen in autotests when widgets are deleting window
children. The abort comes from QWeakPointer on the parent in the child's
close event handler (the abort checks that wasDeleted is not set).

Change-Id: I1a58449159d4a5312aad8ba12e559d05d6c43d93
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-10 16:11:42 +01:00
Thomas Zander
fb8dc15ba6 Fix typo in APIDocs
The name of an enum was slightly misspelled in the API docs, so lets
make sure its now copy-paste friendly.

Change-Id: I5da5230ab29743b63bf238a379891c98ac9d5039
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thomas Zander <zander@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-10 10:19:49 +01:00
Stephen Kelly
d215bdfc52 Make headers safe with QT_NO_CAST_FROM_BYTEARRAY.
Change-Id: I0f9dfee505ebc48d9c586c010ad75877a7387836
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-09 18:31:08 +01:00
Laszlo Agocs
4471e45f74 Remove QWidget dependency from QTouchEvent.
QWidget *widget() is replaced with QObject *target().

Change-Id: Ib2c860480764410cf1527662e89f352ff688b32a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 16:36:00 +01:00
Laszlo Agocs
5da5230ab2 Remove event type parameter from handleTouchEvent.
Requiring platform and generic plug-ins to pass TouchBegin,
TouchUpdate, or TouchEnd is unnecessary. The type can be easily
deduced from the touch point states. In fact handleTouchEvent already
collected the combined point states, it was just not utilized until
now.

Change-Id: Icf3c787fefdebc51609a763bc4286c18a0b6aac2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 16:35:43 +01:00
Bradley T. Hughes
b986131c6d Correctly reimplement QPlatformCursor::pos() in QCocoaCursor
QPlatformCursor::pos() is a const function, the reimplementation should
be as well.

Change-Id: I7e37e41086e3b329dc31ebc060fcb0915771d884
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-09 14:15:37 +01:00
Laszlo Agocs
4222603f8e Extend touch events.
The capability flags indicate which information is valid in the touch
points. Previously there was no way to tell if e.g. the value returned
by pressure() is actually the value provided by the driver/device or
it is just something bogus due to pressure not being supported.

The points' flags return information about the individual touch
points. One use case is to differentiate between touches made by
finger and pen.

Velocity, if available, is now also exposed.

Each touch point can now contain an additional list of "raw"
positions. These points are not reported individually but are taken
into account in some way by the underlying device and drivers to
generate the final, "accurate" touch point. In case the underlying
drivers expose these additional positions, they are made available in
the lists returned by the touch points' rawScreenPosition().

The raw positions are only available in screen coordinates to prevent
wasting time with mapping from global positions in applications that
do not use this data. Instead, apps can query the QWindow to which the
touch event was sent via QTouchEvent::window() and can call
mapFromGlobal() manually if they need local raw positions.

The capability and device type information is now held in a new
QTouchDevice class. Each touch event will contain only a pointer to
one of the global QTouchDevice instances. On top of type and
capability, the new class also contains a name which can be used to
differentiate between multiple touch input devices (i.e. to tell from
which one a given QTouchEvent originates from).

The introduction of QTouchDevice has three implications: The
QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent
need to be changed (to pass a QTouchDevice pointer instead of merely a
device type value), and each platform or generic plug-in is now
responsible for registering one or more devices using the new API
QWindowSystemInterface::registerTouchDevice.

Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 14:15:37 +01:00
Frederik Gladhorn
6651e4fae3 Do not assert on invalid model index.
No need to crash here, just warn.
This will happen when asking a table for out of range indexes.

Change-Id: Ida83604bd587390a3b54fbed68f98dab8038c757
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-09 10:17:55 +01:00
Albert Astals Cid
f5f92c9fe7 Add support for three new X11 keys
New keys are: XF86XK_TouchpadToggle, XF86XK_TouchpadOn and XF86XK_TouchpadOff

Change-Id: I51c0330213def093adf959d4065ee6d7c1f66d76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 10:17:55 +01:00
Stephen Kelly
4ebceaba39 Forward the contents of the parents argument through this proxy.
Change-Id: Ifabc2a7deec8ea045bf9a9f46fb3a97410dd33f2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-09 02:39:06 +01:00
Stephen Kelly
50ef3ae2f3 Notify about moves in the source model more efficiently.
Change-Id: I5ea2a2dddc1b39a3d2b405bda815f42df7c07c75
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-09 02:39:06 +01:00
João Abecasis
f8b290f8cd Remove wacomcfg.h from 3rdparty
The last reference to this file was removed in commit a2337f79.

With the new QPA architecture there is no longer a reason why this
should be needed in qtbase.

Change-Id: I84765eca066fd6bdd1dabac32e866c58a39fe183
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 01:01:01 +01:00
Stephen Kelly
8021e2d5e7 Remove the backwards compatibility signal emissions when moving items.
Change-Id: I29a44835d3397c1dbf37026daf0c5234dae770e0
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-08 23:22:39 +01:00
David Faure
757ef710d8 QTemporaryDir/File: cleanups (static internal function, QScopedPointer)
Change-Id: I61311d151e2ae94a22df58297bbfb7a636a01c4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-08 18:28:31 +01:00
Robin Burchell
ee18d6ea1f Merge QColorDialog::getColor() overloads.
Symbian-specific code was removed as a side effect of the merge.

Change-Id: I01d28b2aa2fef16ce3988382c2b2a0436c46227c
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-08 17:59:55 +01:00
Morten Johan Sorvig
1a218a7ee1 Cocoa: remove autoreleasepool in QCocoaIntegration
This one was far to long lived and would delay
releases until application shutdown.

We might get more "no autoreleasepool in place"
warnings now, these should be fixed by adding local
auto release pools.

Change-Id: Ia7a46ab05fb1937154997d0c47b8899d2a0cef65
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-12-08 12:46:08 +01:00
Robin Burchell
e79b9d6a36 Remove unused QMapData::createData()/node_create() overloads.
Change-Id: I79010e1ecfdfe579d996db65681ab1559598f3ce
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-08 08:51:35 +01:00
Frederik Gladhorn
1e37a053ed Create a class to contain accessibilty enums.
This is needed in order to expose the enums to qml.
Do not inherit QAccessible.

Change-Id: I220a0ea3add2d790e4fa6e93ce3deda762859e1a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-08 08:51:35 +01:00
Kent Hansen
59fb032839 Avoid variable shadowing in qobject_impl.h
Some people like to build their Qt-based projects with -Wshadow
-Werror, and since qobject_impl.h is included from a public Qt
header, their build breaks.

Change-Id: I5d8a5ee1937092149a18c0ff66a723f5bfc9ffc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-08 07:05:54 +01:00
Jason McDonald
ad80d42f8e Remove unused overload of QTest::qExec.
The overload of QTest::qExec() that takes a QStringList is not used
anywhere in Qt's autotests, despite having been in the qtestlib API
since Qt 4.4.

This lack of use most likely derives from the fact that none of the
QTEST_MAIN macros use the overload, and more than 99% of Qt's tests
use those macros to avoid explicitly calling QTest::qExec().

Change-Id: I264b21d7fe1a9f2d565f748cf8bbe32414a73bb0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-08 03:04:55 +01:00
João Abecasis
479fc3e49c Remove ptmalloc from source tree
This malloc-replacement library is marked experimental and disabled by
default. It is also Unix-only.

On linux (GNU C library, actually) ptmalloc graduated to become the
native allocator, according to its webpage (http://www.malloc.de/en/),
making the need to have a copy here significantly lower.

Anyway, there is nothing preventing interested parties from adding this
library to their own setup and very little value in keeping it around in
qtbase.

Change-Id: I2b1c798ca38b59bb767b44d6e5190080ec6ecdf4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-08 01:06:22 +01:00
David Faure
2aea665194 Add "see also" links for QPrinter::{get|set}PageMargins
Change-Id: Ie1ec9cf3740818c71a7afbdec2c99f5fa0e81337
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-07 18:58:43 +01:00
David Faure
ab3c4a06c6 Remove unused include
Change-Id: Idec12079fdc7ad29e780b537577050f01d8d076c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-07 18:58:43 +01:00
Martin Petersson
44bd7c66e2 QNetworkAccessManager: check the buffer size before allocate
The downloadBuffer size should not be larger then the
downloadBufferMaximumSize. I also added a try catch for the allocation
incase we are low on memory, so that we don't crash.

Task-number: QTBUG-23040
Change-Id: Ib9820bc19fc5db994ede20f123f8c167a8d43ff7
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-07 16:27:37 +01:00
Friedemann Kleint
ebfdb73b75 qtbase: Remove QSound.
Which currently causes tests not to compile on Windows
due to missing symbols in QtWidgets (QSound::QSound() ,etc).

Change-Id: I87f0a403e61c3a67f9a758f114e33db1012e33e8
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-07 14:37:41 +01:00
Richard Moore
2757a5fe8c Check we're connected before startClientEncryption()
The docs say this is required, but we don't check it and instead
segfault right now.

Change-Id: I825b00a312a481c5383af127333c0c4698188348
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-07 12:55:28 +01:00
Samuel Rødal
bab5329437 Better handling of GLX / EGL errors.
If context creation fails, try again without a shared context. Added
QPlatformOpenGLContext::isSharing() and
QPlatformOpenGLContext::isValid() to propagate whether the platform
context was successfully created with or without sharing.

Change-Id: I37080b645f531fd207946441057be6d3f6be3f6e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-07 11:15:28 +01:00
Morten Johan Sorvig
77fb1c71bf Accessibility: Add Text::DebugDescription
Useful for debugging QML accessibility.

Change-Id: I814c64bcc4c6b534666adca5865b1588e4d13f44
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-07 11:15:28 +01:00
Lars Knoll
33fe499d47 Remove the hacks for having QxmlStream in core and xml
QXmlStream was moved from QtXml to QtCore for Qt 4.4.
Remove all the hacks that we added to support that move
in a binary compatible way.

Change-Id: Iea348e980b8efce322d5a7510e5b3ab5c3a108ce
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-07 09:33:47 +01:00
Stephen Kelly
dc8fa99b2b Use VERBATIM where needed in macros.
Forward port of fix for http://cmake.org/Bug/view.php?id=12554

Test fails before and passes after.

Change-Id: I7a3ab2369cb3095c63f9e2a3e604088ebdcc2465
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-07 03:17:25 +01:00
Holger Hans Peter Freyther
f091eccf91 directfbegl: Add unimplemented QDirectFbWindow::eglSurface, build fix
QDirectFbScreen needs to have the full QDirectFbCursor definition, include
the header file directly instead of a forward declaration.

Impelement QDirectFbWindowEGL::eglSurface to return the EGLSurface of the
underlying DirectFBWindow.

Change-Id: Ib6765331ffea6e0b5f10f738d9e05320b7f8155f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-06 20:14:10 +01:00
Jyri Tahtela
2711230757 Executing 'make install' did not build mkv8snapshot
During shadow-building it was noticed that executing make install
did not actually build mkv8snapshot and therefore caused an error.

Change-Id: I126cdbaffb85170e25412b93bc99af79ac6f4642
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-06 18:37:54 +01:00
Stephen Kelly
e8f27a71bb Port to CMakeParseArguments from a custom rolled macro.
Change-Id: Ia7bf5046420ee8f2d690d098937a212eb75b07ce
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-06 16:57:16 +01:00
Stephen Kelly
38ca60985e Now that qt5_automoc doesn't exist, this macro is not needed.
Change-Id: I4746ed5ba41fba801599f443d1214e1744807e20
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-06 16:56:18 +01:00
Gunnar Sletta
6ddcdee120 Ask for a context that is likely to be supported.
Most embedded GL chips support 24-bit depth with packed
8 bit stencil, but more rarely 32-bit. Asking for 32
bit means we often fail on other properties to, such as
multisampling.

Change-Id: Ib913d94af0635b09913ff15cff54cc694ba293fc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-06 08:40:25 +01:00
Jason McDonald
7ac3d7c5c1 Remove obsolete autotest parameters.
Previously, autotests silently ignored the -graphicssystem and -qws
parameters so that test-runners did not need to include logic to decide
whether to pass those parameters depending on whether a particular test
was a GUI test or a non-GUI test.

In Qt 5, both of those parameters have been removed from QApplication,
so tests don't need to ignore them anymore as they should no longer be
supplied to any test.

Change-Id: Ic59e38ddfa3303e760645ed1782a211340ce70f2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 05:04:25 +01:00
Jason McDonald
e3640d1bdd Remove TESTED_CLASS/TESTED_FILES comments from tests.
These comments were mostly empty or inaccurate.  Appropriate naming of
tests and appropriate placement of tests within the directory tree
provide more reliable indicators of what is being tested.

Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 02:19:25 +01:00
Bradley T. Hughes
e2d5c06e1a Fix QT_DEPRECATED_SINCE evaluation
QT_DEPRECATED is defined by default by the logic in qglobal.h, but
QT_DEPRECATED_SINCE is evaluated before that definition, making
QT_DEPRECATED_SINCE evaluate to 0, disabling all deprecated code (even
though it shouldn't be disabled).

Fix this by moving the QT_DEPRECATED_SINCE evaluation to after the
evaluation of QT_NO_DEPRECATED and/or definition of QT_DEPRECATED, to
ensure that QT_DEPRECATED_SINCE works as expected.

Change-Id: I57d9f6a3e1859b0057fd4f37bcf2d2cc3dfba230
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-05 23:03:16 +01:00
Bradley T. Hughes
2c9d042476 Re-add QInternal::EventNotifyCallback
This is needed by QtScript, so we need to keep it for now.

Change-Id: Iee6bd7daf7e86a09242523f5aca72ede413a6981
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-05 23:03:03 +01:00
Friedemann Kleint
097a3f4231 qpixmap_win.cpp: Fix typo in format conversion (alpha).
Change-Id: I8abdae5482e94a7f9af494e5d547352431285336
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-05 15:08:25 +01:00
Holger Hans Peter Freyther
7beed86493 v8: Introduce MIPS code for the QML code
Copy and paste the ARM code into the MIPS dir, there is no lithium
support in MIPS right now.

Change-Id: I21491d36da2a4ac4cb6898c47b0e5bd37a733b41
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-05 12:29:42 +01:00
Holger Hans Peter Freyther
30a5928e2a v8: Attempt to fix a typo in the commit message
is resolve -> is resolved

Change-Id: I95a6072be63e353bafdafccc404e90d331a01894
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-05 12:27:58 +01:00