profile/ivi/qtbase.git
12 years agoFixed compile error in eglfs plugin due to narrowing conversion.
Samuel Rødal [Wed, 6 Jun 2012 06:13:53 +0000 (08:13 +0200)]
Fixed compile error in eglfs plugin due to narrowing conversion.

qeglfscursor.cpp:300: error: narrowing conversion of
‘((const QRectF*)r)->QRectF::left()’ from ‘qreal’ to ‘const GLfloat’
inside { }

Change-Id: Ic4273828ad361ffac5a68068372bf400d468fb38
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoTest if the device is grabbed in some of the evdev plugins
Laszlo Agocs [Wed, 6 Jun 2012 11:09:41 +0000 (14:09 +0300)]
Test if the device is grabbed in some of the evdev plugins

Even though they target embedded devices, the touch and tablet plugins
are very often used on desktop, under X, for development and
experimenting. However the X.org drivers like to grab the input
devices, resulting in getting no events when reading
directly. Inspired by evtest, we show a warning from now on in this
case so the user has a clue what's going on.

Change-Id: I19474f1fcc5163f2601e7000aaee0cce54f99367
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agostatemachine: Make delayed event posting work from secondary thread
Kent Hansen [Mon, 4 Jun 2012 19:51:04 +0000 (21:51 +0200)]
statemachine: Make delayed event posting work from secondary thread

postDelayedEvent() and cancelDelayedEvent() are marked as thread-safe
in the documentation. Unfortunately, they didn't actually work when
called from another thread; they just produced some warnings:

QObject::startTimer: timers cannot be started from another thread
QObject::killTimer: timers cannot be stopped from another thread

As the warnings indicate, the issue was that postDelayedEvent()
(cancelDelayedEvent()) unconditionally called QObject::startTimer()
(stopTimer()), i.e. without considering which thread the function
was called from.

If the function is called from a different thread, the actual
starting/stopping of the associated timer is now done from the
correct thread, by asynchronously calling a private slot on the
state machine.

This also means that the raw timer id can no longer be used as the
id of the delayed event, since a valid event id must be returned
before the timer has started. The state machine now manages those
ids itself (using a QFreeList, just like startTimer() and
killTimer() do), and also keeps a mapping from timer id to event
id once the timer has been started. This is inherently more complex
than before, but at least the API should work as advertised/intended
now.

Task-number: QTBUG-17975
Change-Id: I3a866d01dca23174c8841112af50b87141df0943
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoQSqlResult: replace virtual hooks with virtual functions
Mark Brand [Tue, 5 Jun 2012 11:50:03 +0000 (13:50 +0200)]
QSqlResult: replace virtual hooks with virtual functions

Instead of virtual functions which would have broken binary
compatibility, virtual_hook() was used to implement the virtual
functionality. Now, since the step to Qt 5.0 allows breaking
binary compatibility, we take the opporunity to simplify the code
using real virtual functions.

SetNumericalPrecision --> setNumericalPrecisionPolicy()
NextResult --> nextResult()
DetachFromResultSet --> detachFromResultSet()
BatchOperation --> execBatch()

Task-number: QTBUG-25252
Change-Id: Idd3a870f876d8b8a7457559d5f31ec2073786a75
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
12 years agoRemove insignificant_test for tst_qwindow on Mac OS X
Bradley T. Hughes [Wed, 6 Jun 2012 09:31:41 +0000 (11:31 +0200)]
Remove insignificant_test for tst_qwindow on Mac OS X

tst_QWindow::positioning() still fails on Mac OS X, and it does so in
several places. Skip this test for now as it causes isActive() to fail
as well. With positioning() QSKIP()ed, all the other test functions
pass:

Totals: 19 passed, 0 failed, 1 skipped
********* Finished testing of tst_QWindow *********

Task-number: QTBUG-23059
Change-Id: I58d036120c0121f515813cd20955ab3b82f81fe1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoDo not build eglfs QPA when cross compiling for QNX
Sean Harmer [Tue, 5 Jun 2012 09:35:34 +0000 (10:35 +0100)]
Do not build eglfs QPA when cross compiling for QNX

Commit 2a1b50d67c1f2f4c5bd5efe048080989db37f44f introduced a dependency
on evdev for eglfs which QNX does not provide. QNX also has a dedicated
QPA plugin so the eglfs plugin is not needed there.

It is not possible to use the -device configure defaults approach as
it is not cross-platform.

Change-Id: I2d151f16cf1a9576a0b0b528f0e9c17834c66e91
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoCocoa: do not send multiple window activation events
Bradley T. Hughes [Wed, 6 Jun 2012 07:25:01 +0000 (09:25 +0200)]
Cocoa: do not send multiple window activation events

When switching the active window within the same application, Cocoa
sends us an NSWindowDidResignKeyNotification for the old activated
window, then an NSWindowDidBecomeKeyNotificationfor the newly activated
window. Our handling of this would first set Qt's active window to zero,
then immediately reset it afterwards. Avoid this by checking the key
window when handling the deactivation event, and don't set the active
window to zero if a new window has become active.

Task-number: QTBUG-24322
Change-Id: I8719fc501049eeaaebb75e9ea03261b2209458b6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdded QScreen::setOrientationUpdateMask().
Samuel Rødal [Tue, 5 Jun 2012 12:17:24 +0000 (14:17 +0200)]
Added QScreen::setOrientationUpdateMask().

It might be too expensive to always have an accelerometer sensor
running, so introduce API so that the application has to explictly ask
to get the orientation updates it's interested in.

Change-Id: Ib7dc5ad8807718409f744ebef53f4476aa05175d
Reviewed-by: Ian Monroe <ian.monroe@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com>
12 years agoCocoa: Fix QCocoaBackingStore::flush on 10.8
Morten Sorvig [Fri, 25 May 2012 09:36:03 +0000 (11:36 +0200)]
Cocoa: Fix QCocoaBackingStore::flush on 10.8

The call to displayRect works on 10.7 but does not
update the pixels on screen on 10.8. Many Qt windows
do not update properly.

This is a workaround found by trail and error
without fully understanding the underlying issue.
I would like to have this in place until we can
determine the cause of the bug.

Change-Id: I1ecee745f42a93ded4f651cc8ad51963f250e78d
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFix compilation when configured with -no-widgets
Kent Hansen [Tue, 5 Jun 2012 06:56:00 +0000 (08:56 +0200)]
Fix compilation when configured with -no-widgets

printsupport plugins need QtPrintSupport (which needs QtWidgets).

Change-Id: I8cc9cc15abd19c95b8d4bac26dfd17d027bbfa96
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoExport QPlatformIntegrationFactory to make it usable outside of QtGui.
Balazs Kelemen [Tue, 5 Jun 2012 14:19:10 +0000 (16:19 +0200)]
Export QPlatformIntegrationFactory to make it usable outside of QtGui.

QPlatformIntegrationFactory can be used to load a platform plugin dynamically.
It can be useful for an external platform plugin that want to define some
behaviour on it's own and use the default plugin for the rest. We are going
to implement such a plugin in WebKit for the test infrastructure to tweak
the platform backends in order to provide more platform independent layout
test results.

Change-Id: Iaaabe1cbc173a03132d83474faa7858aead4cae0
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFixed QJsonObject::find()
Denis Dzyubenko [Mon, 4 Jun 2012 16:52:36 +0000 (18:52 +0200)]
Fixed QJsonObject::find()

The function returns mutable iterator on the object that can later be passed to
e.g. erase(), hence it should detach() to be consistent with
QJsonObject::begin() which also detaches.

Change-Id: Id79e8e012fd5469e06b68fbc9eecb7c6848ce9c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agonormalize the process arguments to Normalization Form D on mac
Konstantin Ritt [Wed, 11 Apr 2012 08:00:55 +0000 (11:00 +0300)]
normalize the process arguments to Normalization Form D on mac

QFile::encodeName() does this for us + simplifies the code a bit

Change-Id: Id2ca2615e20408229dd021c26587fefd60365352
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDo not set an action on native submenu items on Mac
Pasi Matilainen [Mon, 2 Apr 2012 10:38:03 +0000 (13:38 +0300)]
Do not set an action on native submenu items on Mac

On Mac, clicking on a submenu entry triggers QMenu::triggered(QAction*)
signal, which is unexpected, and also closes the submenu, which does
not match platform behavior. This happens because native submenu items
have an action set, so fix it by not setting the action.

Task-number: QTBUG-16738
Task-number: QTBUG-10706
Change-Id: I6819999e5af35e6acab1aec035d5d85445189f11
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoRemove support for Qt 4 style plugins
Lars Knoll [Sat, 2 Jun 2012 03:42:13 +0000 (05:42 +0200)]
Remove support for Qt 4 style plugins

The new plugin format allows us to avoid loading the plugins in
all cases. Remove the old format, as we could get bad behavior
with the old format if Qt would try to dlopen a Qt 4.x plugin.

Change-Id: I2193e6874d6cca3c0b12298c2b9beb4105a42fd5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUpdate of the plugin documentation
Lars Knoll [Sun, 27 May 2012 01:04:44 +0000 (03:04 +0200)]
Update of the plugin documentation

Moved the plugin overview from qtdoc to qtbase. Updated
the docs to describe the new plugin mechanism.

Change-Id: I1b92d5099aeaa3a166c1f7698176d811d47c3392
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove references to QtSharedPointer::InternalRefCount
Thiago Macieira [Wed, 23 May 2012 16:34:38 +0000 (18:34 +0200)]
Remove references to QtSharedPointer::InternalRefCount

This class does not exist, is not needed and has never been published
in a released version of Qt.

It existed during the development of QSharedPointer, when internal
reference counting (also known as intrusive counting) was a goal. That
goal was abandoned when use with forward-declared classes was
preferred.

Change-Id: If3a5a29c07fc71e2001d6ba64b90ddd241ab8ae3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoGeneralize common device properties out of Raspberry Pi spec
Donald Carr [Thu, 31 May 2012 03:18:26 +0000 (03:18 +0000)]
Generalize common device properties out of Raspberry Pi spec

Change-Id: I58cc9c9219bf3e9ed8e7401cb66f968306d7bfc9
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoeglfs refactor: Query screen and format info from hooks
Girish Ramakrishnan [Fri, 1 Jun 2012 19:18:45 +0000 (12:18 -0700)]
eglfs refactor: Query screen and format info from hooks

This allows boards to customize what they really work best for
without having to set environment variables.

Change-Id: Ib40c3a870ade568f66e37e621a8abc6b17e39411
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoeglfs refactor: Move egl initialization to the integration
Girish Ramakrishnan [Fri, 1 Jun 2012 19:04:35 +0000 (12:04 -0700)]
eglfs refactor: Move egl initialization to the integration

Change-Id: If2c870538c742fd034fb9e5c115e4ac0bd8e2e03
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoVerify the surfaceType before activating the GL context
Holger Hans Peter Freyther [Tue, 29 May 2012 13:23:25 +0000 (15:23 +0200)]
Verify the surfaceType before activating the GL context

Verify that the surfaceType() of the QPlatformContext is of type
OpenGLSurface before making the context active. Make it possible
to get the QSurface from a QPlatformSurface, make QPlatformWindow
use that to access the QWindow. Remove the setSurfaceType call from
the eglfs plugin as this hiding a problem.

Change-Id: I08906da052e066bb1f1f042030643c6389ab17d7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoUse QPointer instead of QWeakPointer.
Stephen Kelly [Wed, 30 May 2012 11:53:24 +0000 (13:53 +0200)]
Use QPointer instead of QWeakPointer.

The use of QWeakPointer for tracking QObject pointers is to be
deprecated.

Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove useless "QT += widgets"
Kent Hansen [Tue, 5 Jun 2012 12:36:41 +0000 (14:36 +0200)]
Remove useless "QT += widgets"

These .pro files have TEMPLATE=subdirs, so there's no reason to be
adding libraries here.

Change-Id: I0fb0a44107710ee746d354106d0c46006958ee62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAvoid string-based lookup of signals
Kent Hansen [Mon, 4 Jun 2012 06:37:55 +0000 (08:37 +0200)]
Avoid string-based lookup of signals

Resolving signals by member function is preferable.

Change-Id: I2a47a27bc780c4c3c29cf472f9f063c910e20c18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQNX: Implement QQnxScreen::nativeOrientation()
Kevin Ottens [Fri, 25 May 2012 09:14:11 +0000 (11:14 +0200)]
QNX: Implement QQnxScreen::nativeOrientation()

Provide a proper version of nativeOrientation(). We use the screen
physical size as reported by the device to determine its native
orientation.

Change-Id: I45b593b0d62436529f89050e98e10b8c9463b6b9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoIntroduce nativeOrientation() to QPlatformScreen
Kevin Ottens [Fri, 25 May 2012 08:30:52 +0000 (10:30 +0200)]
Introduce nativeOrientation() to QPlatformScreen

Now QPlatformScreen has a nativeOrientation() method which default
implementation return Qt::PrimaryOrientation. Its purpose is to return
the native orientation of the device (e.g. when the device logo is right
up).

Only the QPA backend can know for sure what this native orientation is,
so allow QPA backends to override it with a finer result.

Change-Id: I3bef14acb6b8568e64398ff919d9cb4461a2c9cc
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoWrite test to confirm QStateMachine calls connectNotify().
Mitch Curtis [Fri, 1 Jun 2012 12:31:12 +0000 (14:31 +0200)]
Write test to confirm QStateMachine calls connectNotify().

Task-number: QTBUG-16628
Change-Id: I77535fcb9a6ae306df8ccd670ee1bfc32721d66a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoQDoc: Look for template and include() under installdir.
Casper van Donderen [Tue, 5 Jun 2012 11:58:31 +0000 (13:58 +0200)]
QDoc: Look for template and include() under installdir.

The installdir will now also be used to search for include() qdocconf
variables and the stylesheet.

Change-Id: I388392114fd5a8d57bab0b71699b30e4a6ddd46e
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoCorrectly locate files with relative paths
Lars Knoll [Fri, 4 May 2012 09:21:49 +0000 (11:21 +0200)]
Correctly locate files with relative paths

QUrl("relativefilename").toLocalFile() changed behavior
and now returns an empty string if the scheme is not set.
Setting the scheme to "file:" in setSource would however
break some other assumptions in the code about relative
url's.

Task-number: QTBUG-22416
Change-Id: I1b3fcbef81f6e356935ec426903989e783ce9a78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix Mac support for glyph scaling
Jiang Jiang [Mon, 4 Jun 2012 17:38:10 +0000 (19:38 +0200)]
Fix Mac support for glyph scaling

Change-Id: I9ac9da86c38e9313c6219b8049e46b6b58fa6731
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoMake QIODevice::seek() return false for sequential files.
Mitch Curtis [Tue, 29 May 2012 10:01:24 +0000 (12:01 +0200)]
Make QIODevice::seek() return false for sequential files.

Task-number: QTBUG-18173
Change-Id: Ie3a96d3a6f60995b8ba7823153778869d0c2dc58
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoconfigure: Auto-detect and enable C++11 support if available
Bradley T. Hughes [Tue, 29 May 2012 05:10:09 +0000 (07:10 +0200)]
configure: Auto-detect and enable C++11 support if available

Enabling support for C++11 adds CONFIG+=c++11 to the Qt build. Projects
using Qt can check for C++11 support using contains(QT_CONFIG, c++11) in
their .pr[iof] files.

The QMAKE_CXXFLAGS_CXX11 and QMAKE_LFLAGS_CXX11 qmake varibles contain
any arguments the compiler needs to enable C++11. CONFIG+=c++11 adds
these arguments to the build.

Support for clang, g++, and the Intel C++ Compiler for Linux are
included in this commit.

Change-Id: Id77f86d7ad4d5c740b890446a40b105879a0d327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodirectfb: Compile with C++11 support enabled
Bradley T. Hughes [Tue, 5 Jun 2012 06:18:41 +0000 (08:18 +0200)]
directfb: Compile with C++11 support enabled

qdirectfbblitter.cpp:146: error: narrowing conversion of 'srcRect.x()'
from 'qreal' to 'int' inside { }
qdirectfbblitter.cpp:152: error: narrowing conversion of 'rect.x()' from
'qreal' to 'int' inside { }

The same error exists for calls to y(), width(), and height() at both
locations.

Change-Id: I14f165a6a1cab9502e157e798157b835faf2300f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQDoc: search for example projectPath for manifest.
Casper van Donderen [Mon, 4 Jun 2012 15:29:53 +0000 (17:29 +0200)]
QDoc: search for example projectPath for manifest.

Previously qdoc would automatically use the first .pro/.qmlproject file
found, now it explicitly searches for a .pro/.qmlproject file with the
name of the example.

Change-Id: I2552e529bd3d1b724d3b4286d98d664edbbabcf2
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agotst_qtoolbutton: stabilize and improve failure message
Rohan McGovern [Tue, 5 Jun 2012 04:24:18 +0000 (14:24 +1000)]
tst_qtoolbutton: stabilize and improve failure message

Allow for a little more leeway in timers.

Task-number: QTBUG-26004
Change-Id: I59936d0f675b7f734e04b3f5e63631c74ca4f163
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoAdd StartDragVelocity to style hints
Laszlo Agocs [Mon, 4 Jun 2012 11:18:32 +0000 (14:18 +0300)]
Add StartDragVelocity to style hints

This will be used by Flickable in combination with the drag distance
to improve the drag start detection logic.

Change-Id: Ica30042ef3d15041d857b07fa4173dde3d3f900f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoExpose the plugins meta data in the plugin loader
Lars Knoll [Sun, 27 May 2012 09:38:36 +0000 (11:38 +0200)]
Expose the plugins meta data in the plugin loader

add a metaData() method to QPluginLoader so that
applications can query the plugins meta data without
having to load the plugin.

Change-Id: Ic3ebb35fd3c403926326e8dd1de4176b0c48dbef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMake touch operating better on some touchpads
Laszlo Agocs [Sat, 2 Jun 2012 16:04:00 +0000 (19:04 +0300)]
Make touch operating better on some touchpads

Some MT protocol capable touchpads do not provide
ABS_MT_TOUCH_MAJOR. The calculation for touch area was meaningless in
this case and resulted in a very small area not playing nice with apps
like fingerpaint.

Change-Id: Ibe472e22e5e792059fd594f54be9be8b75287730
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix QTemporaryFile::open() failing after remove().
Mitch Curtis [Wed, 30 May 2012 09:55:28 +0000 (11:55 +0200)]
Fix QTemporaryFile::open() failing after remove().

If a QTemporaryFile is constructed using a template file path,
the path is generated in QTemporaryFileEngine::open() and then
filePathIsTemplate is set to false. If remove() and then open()
are called on the same QTemporaryFile, the path is not regenerated.
This change ensures that if the file path was generated, it will be
generated again in the scenario above.

Task-number: QTBUG-2557
Change-Id: I718ceb89daa9a9d46fdbe811fecc3d57d6dc08c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMake QString("inf").toFloat() return inf instead of zero.
Mitch Curtis [Wed, 30 May 2012 14:56:20 +0000 (16:56 +0200)]
Make QString("inf").toFloat() return inf instead of zero.

Currently, QString::toFloat() returns 0 (and sets ok to false) if you
try to convert "inf". This is because inf is greater than QT_MAX_FLOAT
and there is currently no check to handle inf.

Task-number: QTBUG-8629
Change-Id: I498daf4a7a6f880f928461fca628fcaf7d1d6d08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agoImprove the QTextBoundaryFinder autotests a lot
Konstantin Ritt [Thu, 31 May 2012 09:46:18 +0000 (12:46 +0300)]
Improve the QTextBoundaryFinder autotests a lot

The existing tests has been retained, the new ones has been added.

Change-Id: I12ae1b4e63dde46f3b14a7c1423c13d5881d4507
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRename QVector::realloc and QVector::free.
Jędrzej Nowacki [Mon, 21 May 2012 12:41:54 +0000 (14:41 +0200)]
Rename QVector::realloc and QVector::free.

These names were confusing and conflicting with standard C memory
management functions.

Change-Id: I6efe20665d2ec7ad3e00f3a806cc1843a57374d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQProcess: Add accessors for program and arguments.
Christian Kandeler [Wed, 23 May 2012 09:00:04 +0000 (11:00 +0200)]
QProcess: Add accessors for program and arguments.

Task-number: QTBUG-24550

Change-Id: I1ce26e584e39b0b58b1c9f78d8027b2479f2d92c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQDoc: Use the correct DITAiXML for table col/rowspan.
Casper van Donderen [Mon, 4 Jun 2012 09:39:10 +0000 (11:39 +0200)]
QDoc: Use the correct DITAiXML for table col/rowspan.

Change-Id: Id5443b4428a5f0b6b9fee92efcf2fd1ae19c0d19
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoThe QFontEngineFT files are not built into QtGui anymore.
Thiago Macieira [Wed, 30 May 2012 10:24:30 +0000 (12:24 +0200)]
The QFontEngineFT files are not built into QtGui anymore.

These files are only built into QtPlatformSupport, so the Q_GUI_EXPORT
macro is now wrong. Remove it.

Additionally, since these files are built into QtPlatformSupport, the
windows platform plugin does not need to build them again.

To-Do: move the files to src/platformsupport/fontdatabases

Change-Id: I9d69b97ca25ee52ab627cfa633f43b277acc5e05
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoAdd QDeferredDeleteEvent
Bradley T. Hughes [Mon, 14 May 2012 11:27:28 +0000 (13:27 +0200)]
Add QDeferredDeleteEvent

Use this to store the loop-level counter needed by QCoreApplication
when determining when it is safe to delete an object.

This removes the hack to hijack the QEvent::d pointer (even though
the pointer is unused).

Change-Id: I91c0b1aa00235ec6e13feb30bf928e56d2f80026
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMigrate fontconfig config test to unix scope
Donald Carr [Mon, 4 Jun 2012 17:15:57 +0000 (17:15 +0000)]
Migrate fontconfig config test to unix scope

Fontconfig has no X11 dependency and is of broader use to us than the X11
context. The test should also disambiguate whether fontconfig support is
successfully detected or not.

This change also removes a false X11 dependency from the freetype test.

Change-Id: I68a596aa06f614a64163772fe29a09edba119a81
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoAllow 24:00:00 for ISO dates in QDateTime::fromString().
Mitch Curtis [Mon, 4 Jun 2012 14:59:46 +0000 (16:59 +0200)]
Allow 24:00:00 for ISO dates in QDateTime::fromString().

ISO 8601 section 4.2.3 states that "The end of one calendar day [24:00]
coincides with [00:00] at the start of the next calendar day", so
fromString() was updated to account for this.

Task-number: QTBUG-25387
Change-Id: I391db0da755dbc822ba0820c302a2c10391e1f3b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoReplace QTEST_APPLESS_MAIN with QTEST_MAIN in tests using QProcess
Rohan McGovern [Tue, 5 Jun 2012 04:03:35 +0000 (14:03 +1000)]
Replace QTEST_APPLESS_MAIN with QTEST_MAIN in tests using QProcess

QProcess requires an application object to be created in order to work
correctly on Windows.

Task-number: QTBUG-26023
Task-number: QTBUG-26024
Change-Id: Ifa90946262bc7e2a7df6b6aad54e10b54473fc97
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoIntroduce gcc machinedump considerations to build system
Donald Carr [Thu, 31 May 2012 21:58:32 +0000 (21:58 +0000)]
Introduce gcc machinedump considerations to build system

This information is required by qmake when cross compiling for Debian based
multi-arch devices in order to adequately resolve system libraries and
pkg-config information.

Change-Id: If96e677ab27c6f0453889c8f7cc43bdb9016f8b6
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoevdevtablet plugin
Laszlo Agocs [Fri, 1 Jun 2012 07:36:51 +0000 (10:36 +0300)]
evdevtablet plugin

Change-Id: Ie8fbaac929180e6d4c626253c4c20d1b3a9083f5
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoFix parent-children relationship of QWidgetWindows
Debao Zhang [Fri, 1 Jun 2012 11:10:16 +0000 (04:10 -0700)]
Fix parent-children relationship of QWidgetWindows

For a native child widget,
widget->nativeParentWidget()->windowHandle()
should always equal to
widget->windowHandle()->parent()

Change-Id: I2560689d32b0cb2834ed33f96c1c70ef3c14342d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoEnter initial state before QStateMachine::started() is emitted
Kent Hansen [Thu, 31 May 2012 11:33:14 +0000 (13:33 +0200)]
Enter initial state before QStateMachine::started() is emitted

The documentation says that started() "is emitted when the state
machine has entered its initial state", but the implementation
didn't adhere to that.

The consequence is that if you e.g. emitted a signal from a slot
connected to started(), and that signal was used by a transition
from the initial state, the signal would effectively get ignored and
the state machine would remain in the initial state.

Task-number: QTBUG-24307
Change-Id: Ibbeb627d517eaff821d88e256a949eacf6aae350
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFix typos in QState sorting functions
Kent Hansen [Thu, 31 May 2012 10:17:02 +0000 (12:17 +0200)]
Fix typos in QState sorting functions

A QObject can't be a child of itself, so the comparison always
returned false. In practice, this was causing the entry/exit order
of parallel states to be random.

QObject::children() is documented to contain the children in the
order in which they were added, so this fix actually achieves
deterministic behavior.

Task-number: QTBUG-25959
Change-Id: Id3f12d6bfbc249f1d4fed0bafb7d0217093e458e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFix endian detection for wince
Andreas Holzammer [Mon, 4 Jun 2012 11:44:26 +0000 (13:44 +0200)]
Fix endian detection for wince

As the qsystemdetection.h is not included
so Q_OS_WINCE is not defined here, so use
the define from the mkspec.

Change-Id: Ic170725d0da89f0c0e675c62bd2aa5c58803de9f
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQDoc: check if !isNull() before casting prev/next nodes.
Casper van Donderen [Mon, 4 Jun 2012 07:48:05 +0000 (09:48 +0200)]
QDoc: check if !isNull() before casting prev/next nodes.

Change-Id: Ifac095ef0af0b483fbf53c6a18cf3c3130d37710
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoFix touchpads with evdevmouse
Laszlo Agocs [Sat, 2 Jun 2012 20:18:05 +0000 (23:18 +0300)]
Fix touchpads with evdevmouse

evdevmouse only worked properly with real mice, the ABS event handling
was somewhat broken, it wasn't possible to properly move a mouse cursor
with a touchpad due to unwanted jumps. The button handling is also
corrected.

Change-Id: Id04ef65d867a75bcfc54240d192a78224a4481d6
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoReport mouse events when the driver says so
Laszlo Agocs [Sat, 2 Jun 2012 19:55:26 +0000 (22:55 +0300)]
Report mouse events when the driver says so

Generate mouse events in SYN only, when all available data has
been reported.

Change-Id: I74a9e9dd603ee0747b00115fac0405b1c600bdeb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoQWidgetWindow: Fix handleExposeEvent()
Debao Zhang [Fri, 1 Jun 2012 10:36:32 +0000 (03:36 -0700)]
QWidgetWindow: Fix handleExposeEvent()

When the associated widget of QWidgetWindow is visible but its
updates are not enabled, avoid marking the widget dirty.

Task-number: QTBUG-25991
Change-Id: Ibeac4c0dfd3198a5174372331e50628b0d3a480d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agotst_languagechange: increased timeout on Windows
Rohan McGovern [Mon, 4 Jun 2012 00:29:10 +0000 (10:29 +1000)]
tst_languagechange: increased timeout on Windows

This test's runtime significantly varies on separate runs on Windows;
runtimes from 10 to 830 seconds have been observed in CI.

Increase the timeout to restore CI stability.

Task-number: QTBUG-26006
Change-Id: Iba153e65264a177d146b2f3647ec6ba529af7135
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agomake pre-qmake spec evaluation load device variables
Donald Carr [Thu, 31 May 2012 06:13:10 +0000 (06:13 +0000)]
make pre-qmake spec evaluation load device variables

this is needed to correctly resolve the compiler (cf. $$CROSS_COMPILE)

Change-Id: Iaf7266ae464c15e8483780dcf9c970212630a93b
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
12 years agoChange testlib signal dumper hooks to use signal index range
Kent Hansen [Thu, 31 May 2012 19:49:07 +0000 (21:49 +0200)]
Change testlib signal dumper hooks to use signal index range

Another step towards getting rid of the class method offset
computation in QMetaObject::activate().

Since QMetaObjectPrivate::signal() is private API, this also
required adding a testlib dependency on core-private (and
getting rid of the duplicated QSignalSpyCallbackSet struct).

Change-Id: I0d830f35392a6b44fc321c5285877ec0bf437100
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQtWidgets: Make QWidgetWindow disappear when its associate QWidget hides
Debao Zhang [Thu, 31 May 2012 17:39:43 +0000 (10:39 -0700)]
QtWidgets: Make QWidgetWindow disappear when its associate QWidget hides

Task-number: QTBUG-25980
Change-Id: I572eb9dd175121b1f1b6070e1849247000b48961
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoChange QConnectionSenderSwitcher et al to use signal index range
Kent Hansen [Thu, 31 May 2012 19:18:34 +0000 (21:18 +0200)]
Change QConnectionSenderSwitcher et al to use signal index range

First step towards getting rid of the signal_absolute_index variable
from QMetaObject::activate() (which requires computation of the
class's method offset).

This also required changing the implementation of the public function
senderSignalIndex() so it still returns an index in the full method
range.

Change-Id: I58571eb3c8099ea5b673682872c53875f5ea8c13
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoUse QMetaObjectPrivate::signalOffset() where appropriate
Kent Hansen [Sun, 27 May 2012 20:38:17 +0000 (22:38 +0200)]
Use QMetaObjectPrivate::signalOffset() where appropriate

computeOffsets() was unnecessarily computing the method index, when
only the signal index is needed.

Change-Id: Id682d4447ba283a44cf0ea15cc47bd30edccb57b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoPashto uses Arabic script and is written right to left
Mike FABIAN [Fri, 1 Jun 2012 16:12:46 +0000 (18:12 +0200)]
Pashto uses Arabic script and is written right to left

QLocale::textDirection() was missing Pashto as a
right to left language.

Change-Id: I1623abf711597a26f283a86708dc756696790b7d
Reviewed-by: Lars Knoll
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoeglfs: Create mouse, keyboard and touch handlers by default
Girish Ramakrishnan [Thu, 31 May 2012 05:28:53 +0000 (22:28 -0700)]
eglfs: Create mouse, keyboard and touch handlers by default

Prior to this change, input support for eglfs was loaded as plugins. With
this change, eglfs supports evdev based keyboard, mouse and touch input
out of the box.

The event dispatcher is created in the constructor because the evdev
code creates QSocketNotifiers in the constructor which requires an
event loop.

Change-Id: I4e08f4121b9381ee5b414d0886eae2b8a2925800
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@kdab.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoImplement QXcbWindow::setWindowIcon
Corentin Jabot [Fri, 25 May 2012 10:11:58 +0000 (12:11 +0200)]
Implement QXcbWindow::setWindowIcon

Change-Id: I1908cbef0c20d3725423b559f234bd6d3ddd4167
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoImplement QWidgetPrivate::setWindowIcon_sys()
Corentin Jabot [Sat, 26 May 2012 00:12:06 +0000 (02:12 +0200)]
Implement QWidgetPrivate::setWindowIcon_sys()

 * The widgets icon are correctly set, through the QPA plugins
 * Removing QTLWExtra::iconPixmap that was only used in some platforms
in Qt 4.7, so if that wariable is still needed somewhere, it sould be
declared in the concerned QPA plugins

Change-Id: I85f50726cce3578b66c09c327767111f09935075
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoSimplify the QObject::dumpObjectInfo() implementation
Kent Hansen [Thu, 31 May 2012 18:46:28 +0000 (20:46 +0200)]
Simplify the QObject::dumpObjectInfo() implementation

Use the new signal index-based API.

Change-Id: If44e02e71b718bca5c18c486ca9ab95f836cd0f1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSimplify connectSlotsByName() implementation
Kent Hansen [Thu, 31 May 2012 18:38:40 +0000 (20:38 +0200)]
Simplify connectSlotsByName() implementation

Use the new signal index-based API.

Change-Id: I89263f5366726ef8213e45e5ab6575ebd6eab04a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoavoid redundant tests
Oswald Buddenhagen [Wed, 2 May 2012 09:34:05 +0000 (11:34 +0200)]
avoid redundant tests

tryRun() already implies tryLink() and tryCompile(), so there is no
point in executing the stages separately ...

Change-Id: Id7321efaca474e8c5db2bc246ac26323d8a99e58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQDoc: Don't put ditamaps in index file.
Casper van Donderen [Fri, 1 Jun 2012 07:44:55 +0000 (09:44 +0200)]
QDoc: Don't put ditamaps in index file.

Change-Id: Id3ceb05d3c9c4424b767222850237755080b9879
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoQDoc: Do not put indexNodes in qt.ditamap.
Casper van Donderen [Fri, 1 Jun 2012 07:45:13 +0000 (09:45 +0200)]
QDoc: Do not put indexNodes in qt.ditamap.

Change-Id: I659a3a91aaa6da26f4f739428d79cccfab8ce076
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoQDoc: Use \page title with prev/next links in DITAXML.
Casper van Donderen [Fri, 1 Jun 2012 12:11:42 +0000 (14:11 +0200)]
QDoc: Use \page title with prev/next links in DITAXML.

Change-Id: I260998986752f5c8cc48279c04557c925af1cb14
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agomake syncqt work with MSys Perl and MSVC
Joerg Bornemann [Fri, 25 May 2012 10:52:14 +0000 (12:52 +0200)]
make syncqt work with MSys Perl and MSVC

The common root dir detection was broken, because
of an inconsistent root drive path style:
    <srcbase> = /c/dev/qt/5.0/qtbase
    <outbase> = C:/dev/qt/5.0/qtbase

Now we don't need ActivePerl anymore.
The Perl that comes with msysgit is enough.

After every Perl function call that returns a file path
we need to normalize it to bring it into a form that can
be used by
    - Perl functions that take a path as parameter,
    - C++ sources as include file path,
    - qmake's .pro files as include file path.

Task-number: QTBUG-25912
Change-Id: If1cf56cc7246a9d6535cd3867222f225d1617712
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQtPrintSupport - Cleanup QPrintDialog header
John Layt [Mon, 14 May 2012 20:27:25 +0000 (21:27 +0100)]
QtPrintSupport - Cleanup QPrintDialog header

Move QUnixPrintWidget from the header to the UNIX implementation as
it is not used anywhere else and doesn't need to be exported.

Make the private slots only compile under UNIX, remove the Mac and Win
stubs for them as unneeded.

Add some documentation to the UNIX dialog

Change-Id: I8f30504285df877e17ac8eeace875f666f43d94d
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
12 years agoconfigure: pass -D options through to configure tests
Rohan McGovern [Wed, 30 May 2012 23:44:53 +0000 (09:44 +1000)]
configure: pass -D options through to configure tests

We already do this for -I and -L compiler flags, but not -D.
This caused configure tests to give incorrect results in some cases.

Task-number: QTBUG-25963
Task-number: QTQAINFRA-523
Change-Id: Ib270a1dc67759e36bc439e80ab8136a64c405d26
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix QApplicationPrivate::pickMouseReceiver() crash
Debao Zhang [Fri, 1 Jun 2012 04:26:53 +0000 (21:26 -0700)]
Fix QApplicationPrivate::pickMouseReceiver() crash

When a widget associate with a QWidgetWindow received a mouse event, but
another widget which is not a child of the widget has grabbed the mouse, the
application will crash. As QWidget::mapFrom() only works when mapping from
parent to child.

This is the side effect of SHA: f6c107d799d14bbdb2cb71b8446483541bb0adb5

Task-number: QTBUG-25985
Change-Id: If2e6289e02d6d67c215694f2217221c9c7a0af46
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoDispatch tablet events to widgets
Laszlo Agocs [Thu, 31 May 2012 13:33:07 +0000 (16:33 +0300)]
Dispatch tablet events to widgets

Plus remove some platform-specific tablet leftovers from Qt4.

Change-Id: I376abc38d1fe4c253d8803cf0ce007e2d6c298bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMarked expected failures in tst_qtextlayout on Windows
Rohan McGovern [Fri, 1 Jun 2012 03:54:08 +0000 (13:54 +1000)]
Marked expected failures in tst_qtextlayout on Windows

Task-number: QTBUG-25924
Change-Id: I24a8ab6a695bf76f19e9082e1d8b11d8ec03fc4f
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoAdd private API for working with meta-methods in signal index range
Kent Hansen [Wed, 30 May 2012 12:02:55 +0000 (14:02 +0200)]
Add private API for working with meta-methods in signal index range

Internally, QObject and QMetaObject already leave out non-signal
methods when working with signals. This is possible because the
signals always come before other types of meta-method in the
meta-object data. Ignoring irrelevant methods is faster and can
save memory.

QMetaObject provides internal indexed-based connect() and
disconnect() functions. However, these functions currently take an
absolute method index as the signal specifier, instead of an
absolute _signal_ index. Hence, QMetaObject and friends must convert
from the method index range to the signal index range.

By providing an API that only considers signal indices, clients of
the index-based QMetaObject::connect()/disconnect() can provide the
proper signal index directly. Similarly, for the qtdeclarative
integration (QDeclarativeData hooks) the signal index can be passed
directly. This will eliminate most of the conversions back and forth
between signal index and method index, and some other redundant work
done by qtdeclarative's custom connection implementation.

There are some places where the behavior can't be changed; for
example,  QObject::senderSignalIndex() will still need to return an
index in the method range, since that function is public API.

Changing QMetaObject::connect()/disconnect() to take an index in
the signal range will be done in a separate commit; this commit is
only an enabler for porting existing usage of those functions to
the new behavior.

Change-Id: Icb475b6bbdccc74b4e7ee5bf72b944b47159cebd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQtNetwork: handle raw deflate compressed data in Http.
Martin Petersson [Thu, 31 May 2012 12:42:32 +0000 (14:42 +0200)]
QtNetwork: handle raw deflate compressed data in Http.

For raw deflate compressed data with no zlib or gzip header
we need to call initInflate2 with -MAX_WBITS.

The first call to inflate will asume that the data has a header,
but if that call fails with a Z_DATA_ERROR we can try once more
with changed windowBits incase the data was raw compressed data
without a header.

Task-number: QTBUG-25513
Change-Id: Ib37c286c6da6d5395581717d0e76a0dbd5df289c
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQNetworkReply: Change abort() function into a slot
Jonathan Liu [Fri, 1 Jun 2012 10:40:29 +0000 (20:40 +1000)]
QNetworkReply: Change abort() function into a slot

It is useful for abort() to be a slot for connecting cancel and timeout
signals.

Change-Id: Ib0146d66fffe3f57b683dfbce0863e378b8c076d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdd QEvdev prefix in evdevtouch and update readme
Laszlo Agocs [Fri, 1 Jun 2012 07:17:28 +0000 (10:17 +0300)]
Add QEvdev prefix in evdevtouch and update readme

Now that the code is in platformsupport we need to avoid too generic
names so rename the classes a bit.

Change-Id: I7241aa1a3449be772de369ebd08df01e886dbfa3
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoeglfs: implement hardware cursor for the raspberry-pi
Girish Ramakrishnan [Sat, 26 May 2012 18:52:06 +0000 (11:52 -0700)]
eglfs: implement hardware cursor for the raspberry-pi

The cursor is rendered on a dispmanx layer and moved
around. This approach saves us from having to update the
underlying window each time the cursor moves.

Dispmanx layers cannot be moved to negative coords. As
a result, currently it is not possible to move to a
location less than the hostpot. A future commit will
fix this problem.

Change-Id: Ida5ee961d03a6929860c515e503482756a4913ed
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQNAM - maintain a weak reference to the QNetworkSession
Shane Kearns [Thu, 31 May 2012 15:09:38 +0000 (16:09 +0100)]
QNAM - maintain a weak reference to the QNetworkSession

When handling signals from the session, a pointer is needed.
Also the QNetworkReplyImpl needs to access the manager's session.
So, the manager should have a strong and weak reference.
The strong reference is held during connection establishment.
The weak reference is held all the time, though it will become
null when the session is destroyed in idle.
The non static member function getNetworkSession() is used to
create strong references from the weak reference where required.

Task-number: ou1cimx#1004278
Change-Id: I4b5b36b1d996b98e659d993969006c61b4440c15
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoTrack active network replies without qFindChildren
Shane Kearns [Wed, 30 May 2012 16:08:16 +0000 (17:08 +0100)]
Track active network replies without qFindChildren

For bearer management to work correctly, we need to know when there
are no network replies active. Previously this was implemented
using qFindChildren, but that doesn't work when the user reparents
QNetworkReply.
QtWebkit does this (actually sets parent to 0).
Also the qFindChildren implementation was racy if multiple requests
were finished in parallel. Again, likely to be triggered by webkit
loading page elements.

Task-number: QTBUG-15812
Change-Id: I181a9ba6611c7c4b6fffa2d84fe4029d89e8f596
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoSocket FD are now of type qintptr.
Jonas M. Gastal [Tue, 29 May 2012 20:32:27 +0000 (17:32 -0300)]
Socket FD are now of type qintptr.

This should've been done together with the bulk of other changes in:
bdce61002255b5f8b3213e93175cefdfebfde2cc and
bf7f17060773803f332e8c729a70f47b94243890

Task-number: QTBUG-19004
Change-Id: I6d95a29140c1de5e6800812add9d7882511b909a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoPut Windows NTLM stuff inside consistent preprocessor directives.
Janne Anttila [Thu, 24 May 2012 12:51:48 +0000 (15:51 +0300)]
Put Windows NTLM stuff inside consistent preprocessor directives.

QNtlmWindowsHandles was placed inside Q_OS_WIN in some places and in
other places inside Q_OS_WIN32. It seems that Q_OS_WIN is correct
define everywhere.

In addition placed "InitSecurityInterfaceW" inside L macro to convert
argument to wide characters in WinCE. WinCE GetProcAddress takes
LPCWSTR instead of LPCSTR.

This fixes the QtNetwork build for WEC7, where Q_OS_WIN32 apparently
is not defined. Should it be defined, is another story...

Change-Id: Id309d20c46b66139e2cb2e62349067848d8ebb4e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix a bug in the case conversion code
Lars Knoll [Thu, 31 May 2012 14:43:45 +0000 (16:43 +0200)]
Fix a bug in the case conversion code

Chars that have a case conversion that converts
them into several characters can't be handled
by QChar::toUpper() etc and should get ignored. The code
didn't do that correctly.

Change-Id: I281d122e90bf49187b6449088d2fccef2ef75e86
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove unused isGLWidget variable.
Kim Motoyoshi Kalland [Thu, 31 May 2012 16:31:09 +0000 (18:31 +0200)]
Remove unused isGLWidget variable.

Change-Id: I9d1a0edfce3d13ed56916b7301098aa5fbe0bc40
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd method to set size of QOpenGLPaintDevice.
Kim Motoyoshi Kalland [Thu, 31 May 2012 13:25:02 +0000 (15:25 +0200)]
Add method to set size of QOpenGLPaintDevice.

Change-Id: Iecc72c64dbb5f35ee41bdeb960bc759cd43b8bcb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix the QVector build with C++11 initialiser lists
Thiago Macieira [Thu, 31 May 2012 10:35:39 +0000 (12:35 +0200)]
Fix the QVector build with C++11 initialiser lists

Initialiser lists were not tested before in the QVector rewrite, so
the older malloc call was left behind.

Also, std::initializer_list has const iterators returning const data
and broke the build in a few places where const qualifiers were
missing.

Change-Id: I3c04e58361989aa7438621cda63c7df457d7dad8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMake QVector compile with QT_STRICT_ITERATORS again
Thiago Macieira [Thu, 24 May 2012 14:24:19 +0000 (16:24 +0200)]
Make QVector compile with QT_STRICT_ITERATORS again

Move the iterator classes into QArrayTypedData and add constBegin()
and constEnd() to that class.

I also had to add an operator T*() to the strict iterators, since
there are many places that expect the iterator to behave like a
pointer (including in QVector itself).

Change-Id: Icc5ed56ad47b013664a48eef9d31b5273aecb4e3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoAvoid accessing QObjectPrivate::currentSender directly from QtDBus
Kent Hansen [Thu, 31 May 2012 19:27:47 +0000 (21:27 +0200)]
Avoid accessing QObjectPrivate::currentSender directly from QtDBus

In particular, currentSender->signal is about to be changed from
the method index range to the signal index range (i.e., excluding
non-signal methods). The public senderSignalIndex() function will
still return the index in the method range, so QtDBus will then
continue to work without change. If necessary, QtDBus can afterwards
be ported back to using the internal API again (including the new
QMetaObjectPrivate API for working with methods in the signal range).

Change-Id: I58212e859560a8e241adee99dd2da9ef009d4e5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAllow compare QLatin1String to QLatin1String
Konstantin Ritt [Wed, 23 May 2012 01:10:55 +0000 (04:10 +0300)]
Allow compare QLatin1String to QLatin1String

even if QT_NO_CAST_FROM_ASCII is defined.

Change-Id: I8c4deceedb6f3e3cd5bdf72d6e9d189c509c9ff3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd missing QT_NO_CAST_FROM_ASCII
Konstantin Ritt [Wed, 23 May 2012 00:57:19 +0000 (03:57 +0300)]
Add missing QT_NO_CAST_FROM_ASCII

to QLatin1String's compare operators that takes const char *s or QByteArray.
Such comparison leads to a potential misuse since QByteArray could contain any arbitrary data
in any arbitrary encoding and QLatin1String is used to only contain strings in UTF-8 -
they are just a different beasts aimed for different purposes, and since QT_NO_CAST_*_ASCII
disallow indirect conversions and require the user to know what he's doing,
let's be consistent here too.

Change-Id: I9bf5f326495157db8a6af064d6154961b7861a7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUnconditionally enable Q_OF_ELF for any ELF platform
Pino Toscano [Tue, 15 May 2012 12:57:05 +0000 (14:57 +0200)]
Unconditionally enable Q_OF_ELF for any ELF platform

Just enable ELF stuff on any platform which uses ELF format, instead of a selected subsets of those.

Change-Id: I0753c020c718bc67b4b50c3957fe8dc10afd2c61
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMake tst_qabstractnetworkcache parallel-safe
Rohan McGovern [Thu, 31 May 2012 06:37:44 +0000 (16:37 +1000)]
Make tst_qabstractnetworkcache parallel-safe

Use a unique QTemporaryDir instead of a fixed path for the test cache.

Change-Id: Ib664033a509a6cefd7c323708f80ef595b202178
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>