profile/ivi/qtbase.git
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>
12 years agoAdd clear() to QPointer for QWeakPointer compatibility.
Stephen Kelly [Wed, 30 May 2012 13:52:21 +0000 (15:52 +0200)]
Add clear() to QPointer for QWeakPointer compatibility.

Change-Id: I9efc162bf56775c7ebcff4e3b79a997edc4ceaeb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMake font fallback list for common script locale aware
Jiang Jiang [Wed, 30 May 2012 14:43:05 +0000 (16:43 +0200)]
Make font fallback list for common script locale aware

Even in common script we may need to have a preferred font list
(which font should be used for CJK codepoints, Chinese, Japanese
or Korean? Since the codepoints they cover may overlap.) Adding
current default language into the pattern in that case will give
a better recommendation for the fallback list if the system have
configuration files like that.

Change-Id: Idbc7f7b0cf24108d6cc255a1add0b29b730588c0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFix some gcc warnings
Konstantin Ritt [Thu, 31 May 2012 02:46:20 +0000 (05:46 +0300)]
Fix some gcc warnings

These are:
"enumeral and non-enumeral type in conditional expression",
"comparison of unsigned expression >= 0 is always true",
and "address requested for 't', which is declared 'register'"

Change-Id: Ia9bab2e1e2c212a2889197e8dd5f7295dda9dadd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMark tst_qfreelist as parallel-safe
Rohan McGovern [Thu, 31 May 2012 07:08:51 +0000 (17:08 +1000)]
Mark tst_qfreelist as parallel-safe

This autotest appears to be parallel-safe.

Change-Id: I12f9202633941e9339de0709353efb2b41df4fa1
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoFixed compile on Windows without precompiled headers
Rohan McGovern [Thu, 31 May 2012 06:12:57 +0000 (16:12 +1000)]
Fixed compile on Windows without precompiled headers

Added missing header.

Compile failure is only reproducible when precompiled headers are
disabled.

Change-Id: I0fb2e51b3352ebad3b7b5b58898347605b8d5090
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoFix QFileDialog crash on show with the GTK style.
Morten Johan Sorvig [Thu, 31 May 2012 07:19:49 +0000 (09:19 +0200)]
Fix QFileDialog crash on show with the GTK style.

Call createWinId on modal_widget to make sure
it has a valid QWindow.

Change-Id: Ieaec2bcaceb2ac28032cb42e5f8bcaf7a33828ca
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemove all references to X11 session management
Donald Carr [Thu, 31 May 2012 02:12:32 +0000 (02:12 +0000)]
Remove all references to X11 session management

There is no session management currently implemented for the xcb QPA
backend. Update the build system to reflect this.

Change-Id: I3486de5741f1fb7e09330ca142b8235a84d3b91d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMigrate tslib to new plugin format
Laszlo Agocs [Thu, 24 May 2012 10:41:36 +0000 (13:41 +0300)]
Migrate tslib to new plugin format

Also rename the binary and avoid crashes when tslib initialization
fails.

Change-Id: Ia7ccf7c997e1b1484bd475626ca16c9a9642466e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoset OUTDIR for consistency with config.test
Donald Carr [Thu, 31 May 2012 20:50:25 +0000 (20:50 +0000)]
set OUTDIR for consistency with config.test

We depend on this being set correctly set in device_config.prf

Change-Id: Iee69c5ce35af26f9ecd6edacdd70e13ae4a9aa90
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoGet rid of MSVC compiler warnings from QVector code
Friedemann Kleint [Thu, 31 May 2012 14:48:22 +0000 (16:48 +0200)]
Get rid of MSVC compiler warnings from QVector code

Change-Id: I39b849721f3ba790c4a9197d69ac48e98cc2f5bd
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove debugging code from QVector
Jędrzej Nowacki [Thu, 31 May 2012 07:49:26 +0000 (09:49 +0200)]
Remove debugging code from QVector

It was depending on internals of Q_ASSERT

Change-Id: I3dfc0ae0438135a30961f36808dbfc3e663a5538
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix crash in QStringBuilder when concatenating data-less QLatin1String
Chris Adams [Thu, 31 May 2012 04:00:48 +0000 (14:00 +1000)]
Fix crash in QStringBuilder when concatenating data-less QLatin1String

Previously, the append functions in QConcatenable in the QStringBuilder
dereferenced the data() pointer of the argument QLatin1String without
performing null check.

Change-Id: I629f19fbce3113f1f80f4272fa7ae34e1dbc6bee
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMove implementation of QObject::senderSignalIndex() to QObjectPrivate
Kent Hansen [Mon, 28 May 2012 09:14:20 +0000 (11:14 +0200)]
Move implementation of QObject::senderSignalIndex() to QObjectPrivate

In preparation of changing the implementation to return an index in
the signals-only range, not all-methods range.

Change-Id: Ib743a4bc9da27ad776ade262b215ebf988e7ab28
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix To-Do in qstatemachine (use QObject::senderSignalIndex())
Kent Hansen [Mon, 28 May 2012 09:21:04 +0000 (11:21 +0200)]
Fix To-Do in qstatemachine (use QObject::senderSignalIndex())

Change-Id: Id8a541878918f27a34595ff297d0f41b79275a96
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMove evdev to platformsupport
Girish Ramakrishnan [Thu, 31 May 2012 04:38:22 +0000 (21:38 -0700)]
Move evdev to platformsupport

Also wraps various string literals with QLatin1String.

Change-Id: Ia0681bfae00006d9e9ad51f05d0e0d0f45cf2cec
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
12 years agoFix tst_qlistwidget::fastScroll test case
Miikka Heikkinen [Thu, 31 May 2012 08:58:18 +0000 (11:58 +0300)]
Fix tst_qlistwidget::fastScroll test case

tst_qlistwidget::fastScroll fails if the mouse cursor happens to be
over the tested widget, because that causes an item to highlight,
resulting in unexpected region of widget to be painted. Fixed by
forcing the mouse cursor off the widget before the test.

Task-number: QTBUG-24299
Change-Id: I8f45541feda44681179d43eda67d970d5fea4e40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove the unnecessary comment about operator== not being necessary
Thiago Macieira [Fri, 25 May 2012 09:51:48 +0000 (11:51 +0200)]
Remove the unnecessary comment about operator== not being necessary

The mysterious comment was just suggesting that they weren't
necessary. Turns out the comment is wrong: they are necessary for
non-strict iterator modes.

Task-number: QTBUG-25063
Change-Id: I20ada17035642ee656c431d6bf2152a5243cecdb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMove the sub-architecture feature to better places in qmake
Thiago Macieira [Wed, 30 May 2012 12:44:39 +0000 (14:44 +0200)]
Move the sub-architecture feature to better places in qmake

Instead of saving the ability of the compiler to produce SSE2, AVX,
Neon, etc. code in .qmake.cache (Unix) or qconfig.pri (Windows), move
everything to qmodule.pri. Accordingly, move the DEFINES += settings
to qt_module.prf instead of qt.prf.

This allows us to re-use these settings in other Qt modules (other
than qtbase), if necessary. Though currently the extra compiler
definitions are found only in src/gui/gui.pro. They can be moved
elsewhere when it becomes necessary.

As a side-effect of this change, some other flags are moved from
.qmake.cache to qmodule.pri (on Unix). The flags that are getting
moved should probably be moved anyway.

Change-Id: Ibc3ab0111e148d81870772f9357273660aa93417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix the confusion caused by the QT_ALWAYS_HAVE_xxx macros
Thiago Macieira [Wed, 30 May 2012 12:43:06 +0000 (14:43 +0200)]
Fix the confusion caused by the QT_ALWAYS_HAVE_xxx macros

The QT_ALWAYS_HAVE_xxx macros are gone: they were hard to use and not
defined properly. It indicated that the compiler was producing code
that required that particular instruction set, so we could use it in
our code unconditionally. Instead, let's use the GCC-style __SSE2__
and __ARM_NEON__. MSVC does not generate the __SSE2__ macro, so let's
do it for the compiler. Also, define __AVX__ and the macros for the
technologies leading to it when we manage to detect an /arch:AVX build
(currently not possible, see note in the header).

ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all
uses of the intrinsics are either in specially-built files, protected
by runtime checks, or they are unconditional (qstring.cpp). So we only
use the intrinsics when the compiler was instructed to generate code
for that instruction set anyway.

Change-Id: If8382f30422cee0e5831d051b003acf036824abf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoOverhaul the qsimd_p.h: rename macros and update conditionals
Thiago Macieira [Wed, 30 May 2012 12:38:16 +0000 (14:38 +0200)]
Overhaul the qsimd_p.h: rename macros and update conditionals

The QT_HAVE_xxx macros are replaced with QT_COMPILER_SUPPORTS_xxx.
They indicate that the compiler supports those intrinsics, but not
necessarily that they can be used right now.

ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all
uses of the intrinsics are either in specially-built files, protected
by runtime checks, or they are unconditional (qstring.cpp). So we only
use the intrinsics when the compiler was instructed to generate code
for that instruction set anyway.

Change-Id: Ie58eebbc0518ad1d5420a85174fd84153bb9abaa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix int-long mismatch in device discovery
Laszlo Agocs [Thu, 31 May 2012 05:52:58 +0000 (08:52 +0300)]
Fix int-long mismatch in device discovery

Change-Id: I506fc206e68d57b67524cedf99896db1cff1694f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoPrevent evdevkeyboard file opening from failing
Laszlo Agocs [Thu, 31 May 2012 05:53:24 +0000 (08:53 +0300)]
Prevent evdevkeyboard file opening from failing

On many systems the device nodes will not be writable normally. There
is no reason to open for writing in any case. Also switched back to
non-blocking I/O.

Change-Id: I9290e6b1ce7e3bc6cb0e75069b3968f647ffbeee
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoAdd QObject parent parameter to constructors
Girish Ramakrishnan [Thu, 31 May 2012 05:20:04 +0000 (22:20 -0700)]
Add QObject parent parameter to constructors

Also drop the explicit keyword in constructors with multiple
args since it has no effect on multi-arg constructors.

Change-Id: I48af6ede6cc968c52720c6107cadf3aa4dbfc7f7
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoQtPrintSupport: Add CUPS printsupport plugin
John Layt [Wed, 9 May 2012 22:47:14 +0000 (23:47 +0100)]
QtPrintSupport: Add CUPS printsupport plugin

Move CUPS code around to create a new CUPS printsupport plugin, this
fixes QPrinterInfo for CUPS which depends on the plugin to work.

It QT_NO_CUPS is defined then the plugin is not built and only Print
to PDF is supported under Linux.

* Move unused genericiunixprintersupport plugin to start new CUPS
  printsupport plugin
* Split QPdfPrintEngine to create QCupsPrintEngine
* Remove LPR related code from QPdfPrintEngine
* Move CUPS specific code from plugin base class to derived CUPS class
* Remove forcing CUPS print engine to use PDF mode as PDF is now Native
* Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to
  QCUPSSupport
* Remove qprinterinfo_unix as no longer used
* Remove all QT_NO_LPR uses

There is now no CUPS specific code left in printsupport/kernel except
QCUPSSupport which is needed for the dialogs.

Task-number: QTBUG-23060

Change-Id: Ie8fa4512a2424edc8943068e0fa9fb714cc42db9
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
12 years agoInclude qobject_p.h from qmetaobject_p.h
Kent Hansen [Sun, 27 May 2012 19:57:54 +0000 (21:57 +0200)]
Include qobject_p.h from qmetaobject_p.h

Needed for QObjectPrivate::Connection. Since it's a nested class,
it's not possible to merely forward declare it.

Change-Id: Ie2ad1b3972df5433cdb49ee443f053ba2d613779
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDon't call metaObject() redundantly
Kent Hansen [Sun, 27 May 2012 20:23:50 +0000 (22:23 +0200)]
Don't call metaObject() redundantly

The desired meta-object is already stored in a local variable.

Change-Id: I40c7840f07f5dbd67110e2f7d5bb618cbb269047
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDon't call metaObject()->method() redundantly
Kent Hansen [Sun, 27 May 2012 20:21:23 +0000 (22:21 +0200)]
Don't call metaObject()->method() redundantly

The desired method is already stored in a local variable.

Change-Id: Ibf0078813c7aebc83604b9c7ad9a8b6c596c5c65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoeglfs: allow cursor to be created without a context
Girish Ramakrishnan [Fri, 25 May 2012 23:30:00 +0000 (16:30 -0700)]
eglfs: allow cursor to be created without a context

Textures are now created and uploaded on demand on first render()
call where we are guaranteed to have a current GL context.

Change-Id: I352c876dd1d8b7ed73536de21fa2880cdc6bdb60
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMake fontconfig default font locale aware
Jiang Jiang [Wed, 30 May 2012 14:27:09 +0000 (16:27 +0200)]
Make fontconfig default font locale aware

Application default font should be locale aware in fontconfig db
as in other font databases. We use a hack to obtain the system
default language parsed by fontconfig and use that to find out
the preferred font for a given language (such font list is edited
by fontconfig from fonts.conf in FcConfigSubstitute() process).

Change-Id: I99bb8dd29d2dde2c8019ed8e77f5bfc09ddf3ca5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoRemove QCursor::handle
Girish Ramakrishnan [Wed, 30 May 2012 18:26:53 +0000 (11:26 -0700)]
Remove QCursor::handle

This used to be the Qt/Embedded's QCursor handle implementation.

Change-Id: I31b8ed44ac9325defcb13d887949d9536a262be8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQCursor: Remove doc of obsolete functions
Girish Ramakrishnan [Wed, 30 May 2012 17:46:02 +0000 (10:46 -0700)]
QCursor: Remove doc of obsolete functions

These functions don't exist in QPA land.

Change-Id: I50c0588cf03ed64878c8ed864dc18a7558b20156
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoremove QT_NO_SOUND and QT_NO_RASTERCALLBACKS
Tasuku Suzuki [Wed, 30 May 2012 20:31:33 +0000 (05:31 +0900)]
remove QT_NO_SOUND and QT_NO_RASTERCALLBACKS

These two defines are not used.

Change-Id: Iec4ae95a8a2222d3c6e9f35b08954cf30aa15bda
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQPA tablet event support
Laszlo Agocs [Wed, 23 May 2012 12:07:39 +0000 (15:07 +0300)]
QPA tablet event support

Should be sufficient to allow implementing the actual functionality in
xcb/cocoa/windows to match the Qt 4 level of tablet event support.

Task-number: QTBUG-25864
Change-Id: Iebcca256dfba841d8976b58fda1b76026d3133a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoRemove QRegion::handle
Girish Ramakrishnan [Thu, 31 May 2012 01:35:11 +0000 (18:35 -0700)]
Remove QRegion::handle

This function is unavailable in QPA land (it currently returns
the QRegionPrivate as the handle()).

Change-Id: I4e81e29d4546a4737c1aaab4ee1fb97e28a473f5
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemove QFont::handle
Girish Ramakrishnan [Thu, 31 May 2012 01:30:04 +0000 (18:30 -0700)]
Remove QFont::handle

This function is unavailable in QPA land.

Change-Id: I43bb95d64e3abaa2fbcd8de07ca39c1d28f46f42
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoWindows: Add ANGLE support.
Friedemann Kleint [Wed, 23 May 2012 13:07:06 +0000 (15:07 +0200)]
Windows: Add ANGLE support.

- Add QWindowsEGLContext usable for ANGLE and Windows CE.
- Add QWindowsEGLStaticContext containing the display
  for resource cleanup.
- Add EGLSurface to QWindowsWindow.
- Add a -angle option specifying the path to the external
  ANGLE installation to configure, add libraries to
  the mkspecs.

Initial-patch-by: Jabot Corentin <corentinjabot@gmail.com>
Task-number: QTBUG-24207

Change-Id: I5f80b1efb6996da7c5d70aa3720f7801c9e4c6af
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoMake tst_qnetworkdiskcache parallel-safe
Rohan McGovern [Thu, 31 May 2012 03:02:17 +0000 (13:02 +1000)]
Make tst_qnetworkdiskcache parallel-safe

Use a QTemporaryDir for a unique test cache directory for each process,
rather than a fixed path.

Change-Id: I64df8422d01282bbc108e942947c1b55368bd941
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoImproved stability of tst_qstatemachine, mark as parallel-safe
Rohan McGovern [Thu, 31 May 2012 02:47:32 +0000 (12:47 +1000)]
Improved stability of tst_qstatemachine, mark as parallel-safe

tst_QStateMachine::postEventFromOtherThread() assumed that 10,000
iterations of the event loop in a separate thread could always be
completed successfully within the default QTRY_COMPARE timeout.
This may be false if the CPU load is already high - such as when running
other tests concurrently.

Decrease the iteration count.

Change-Id: I780523f73c0c16fa0b2ab3201b2b0affdebc198d
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoMake tst_qtextstream parallel-safe.
Rohan McGovern [Thu, 31 May 2012 01:16:10 +0000 (11:16 +1000)]
Make tst_qtextstream parallel-safe.

Write to a QTemporaryDir instead of the test's build directory.

Change-Id: Ib65a0d58fbdf8caf8f2cb7002aeed1ce34742183
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoMarked tst_qtemporaryfile as parallel-safe
Rohan McGovern [Thu, 31 May 2012 00:39:58 +0000 (10:39 +1000)]
Marked tst_qtemporaryfile as parallel-safe

This test failed a parallel stress test, but seemingly only because it
writes to its own build directory.  This should not interfere with other
running autotests.

Change-Id: I27a2f31e32a5b8157ef1082cf0e939bcc0c61c70
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoMarked tst_qfile as parallel-safe
Rohan McGovern [Thu, 31 May 2012 00:39:58 +0000 (10:39 +1000)]
Marked tst_qfile as parallel-safe

This test failed a parallel stress test, but seemingly only because it
writes to its own build directory.  This should not interfere with other
running autotests.

Change-Id: I80e548fdb0e915ebe86dcd2205537cb6fee09cff
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoEliminate a warning in unsigned integer comparison
Jiang Jiang [Wed, 30 May 2012 09:47:18 +0000 (11:47 +0200)]
Eliminate a warning in unsigned integer comparison

The length we cast is from int QTextEngine::length() so it's safe
to do so.

Change-Id: I60fdbcb5a96c99b767093102a30e97951ef5b6ea
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFix digiflip example build.
Janne Anttila [Thu, 24 May 2012 12:12:55 +0000 (15:12 +0300)]
Fix digiflip example build.

digiflip examples depends on qtwidgets, let's link to it also.

Change-Id: I4f4434c747d143942909797491153a4f358e6fef
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix typo in temporary filename
kb [Wed, 30 May 2012 05:15:38 +0000 (07:15 +0200)]
Fix typo in temporary filename

The configure script uses the bash $"..." string internationalization
syntax; this generates an error in other shells.
Since this feature is only used in one place it is likely a typo.

Change-Id: I076a785c3901b04175b8669e32c55989385720e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQDoc: Remove fatal exit when not finding an index directory.
Casper van Donderen [Wed, 30 May 2012 12:46:28 +0000 (14:46 +0200)]
QDoc: Remove fatal exit when not finding an index directory.

QDoc would exit with exit code 1 when an index directory is not found,
this behaviour was probably a bit too strict.

Change-Id: If62fe1aeac4392002fa7419f6abcb62ed41c2beb
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoAdd hard float-abi support to Raspberry Pi spec
Donald Carr [Wed, 30 May 2012 21:24:30 +0000 (21:24 +0000)]
Add hard float-abi support to Raspberry Pi spec

Change-Id: I1bed28bdb5f84e61605972713a20359cc6deeaa6
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoCompile with clang when C++11 support is enabled
Bradley T. Hughes [Tue, 29 May 2012 05:32:47 +0000 (07:32 +0200)]
Compile with clang when C++11 support is enabled

text/qtextdocument_p.cpp:1070:43: error: non-constant-expression cannot
be narrowed from type 'int' to 'quint32' (aka 'unsigned int') in
initializer list [-Wc++11-narrowing]
text/qtextdocument_p.cpp:1070:43: note: override this message by
inserting an explicit cast

Change-Id: I16127aef2171324135b5c0c2ac611b8b4f03d7b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agodirectfb: Allocate a special surface for OpenGL
Holger Hans Peter Freyther [Tue, 29 May 2012 17:14:43 +0000 (19:14 +0200)]
directfb: Allocate a special surface for OpenGL

Allocate an RGB16 surface when we need to use OpenGL, set the
custom DSCAPS_GL for this EGL mode. The broadcom hardware would
allow us to use ABGR but we have some issues with the QSurfaceFormat
to select the right kind of surface.

Change-Id: I0fff7906154f3d7afb35b2b5d2bb91510cf3aa4d
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoRecord the sub-architecture (CPU features enabled in the compiler)
Thiago Macieira [Sat, 31 Dec 2011 22:40:49 +0000 (20:40 -0200)]
Record the sub-architecture (CPU features enabled in the compiler)

If the system's compiler has extra features on top of the base
settings enabled or if the mkspec or $CXXFLAGS variable included some,
record them.

This will allow us to choose whether or not to use our own special
compilers, based on whether the system default compiler contains it or
not.

Change-Id: I87cada9fab4cfa58846a831d0a7c7b50d8fa87fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoImprove the architecture-detection mechanism
Thiago Macieira [Tue, 27 Mar 2012 17:43:45 +0000 (14:43 -0300)]
Improve the architecture-detection mechanism

For the Unix part, this now obeys the -v option, printing the full
command-line it used to compile, allowing testers to identify why
something went wrong.

Unfortunately, it requires a full compilation cycle, instead of just
preprocessing. Just one more among the many on Unix, but maybe a
noticeable slow-down on Windows.

Change-Id: I654b70d99887e04c96731a5b91be9ad555e4d8fe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoImplement QVector with QArrayData interface.
Jędrzej Nowacki [Thu, 26 Apr 2012 10:06:17 +0000 (12:06 +0200)]
Implement QVector with QArrayData interface.

Change-Id: I109f46892aed2f6024459812d24922b12358814d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix text decoration width rounding
Jiang Jiang [Thu, 24 May 2012 13:40:16 +0000 (15:40 +0200)]
Fix text decoration width rounding

width passed in qreal should be set with setWidthF instead of
setWidth, otherwise the fractional part is lost.

Also remove the raster paint engine hack that has been removed in
Qt 4.8, it's no longer needed.

This fixed the drawUnderline and drawRightToLeft auto tests in
tst_qglyphrun.

Change-Id: Iace46fc27ff156c07fb4d08a145269fad36e9fdb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQDoc: Add support for 'all subfolders' in dependant modules.
Casper van Donderen [Wed, 30 May 2012 08:44:04 +0000 (10:44 +0200)]
QDoc: Add support for 'all subfolders' in dependant modules.

It is now possible to use '*' when specifying the 'depends' qdocconf
variable, this will automatically load all index files found in
subdirectories of the index dirs.

Change-Id: I94b140df27da8d987824005a1dcf2a9348d5cd9e
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoQDoc: Force writing \n before a snippet in DITAXML.
Casper van Donderen [Tue, 29 May 2012 13:42:01 +0000 (15:42 +0200)]
QDoc: Force writing \n before a snippet in DITAXML.

Previously the snippet text would be indented, which causes an XSLT to
render the first line of a snippet at the indentation level of the .dita
file.

Change-Id: Iead8d07277f83ca5ccbf463f1cdb1c8210459d56
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoKMS platform plugin: Introduce default cursor for better usability.
Samuel Rødal [Wed, 30 May 2012 06:10:08 +0000 (08:10 +0200)]
KMS platform plugin: Introduce default cursor for better usability.

Similar to the default cursor in eglfs, not having it makes it hard to
interact with Qt applications using the evdevmouse plugin.

Change-Id: I9638267c7d790d91b66620e4a82d86f299061922
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoeglfs: keep context active only during flush
Girish Ramakrishnan [Sun, 27 May 2012 05:34:29 +0000 (22:34 -0700)]
eglfs: keep context active only during flush

The OpenGL context needs to be current only while flushing
the backing store.

Change-Id: I4d6a10f22bcfe04f35a14a690180237f6c691829
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoAdd minimalegl QPA platform plugin
Girish Ramakrishnan [Sun, 27 May 2012 16:27:57 +0000 (09:27 -0700)]
Add minimalegl QPA platform plugin

The EGLFS platform plugin was originally meant to be an example
and thus to be kept simple. However, EGLFS is becoming more
and more complex with the addition of hooks for board support,
cursor integration, built-in evdev support etc.

minimalegl is a new platform plugin that intends to follow
the original intentions of EGLFS.

The code is an adaptation of EGLFS as of f913859f8

Change-Id: I3d4cf84cde380cdcc7e0e8bfefff4df6be731b8d
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agodirectfb: Allow a window subclass to allocate a different kind of surface
Holger Hans Peter Freyther [Tue, 29 May 2012 14:18:02 +0000 (16:18 +0200)]
directfb: Allow a window subclass to allocate a different kind of surface

A subclass of QDirectFbWindow might need to allocate a window with
different surface flags. This is the case for the DirectFB EGL plugin
and QSurface::OpenGLSurface type of surfaces. Add createDirectFBWindow,
make it virtual and call it from the platform integration classes. Add
an assert to verify that this method is only called once. Remove the
pre DirectFb 1.1 code as it was never really tested.

Change-Id: Icf3d262f40bca70e376043935eeb292958f6df5d
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix compile error in eglconvenience
Girish Ramakrishnan [Wed, 30 May 2012 04:01:14 +0000 (21:01 -0700)]
Fix compile error in eglconvenience

Change-Id: Ic20d890a9c59e21a5f0c81f961074ab02083a266
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoMarked tst_qprocess as parallel-safe
Rohan McGovern [Wed, 30 May 2012 03:46:27 +0000 (13:46 +1000)]
Marked tst_qprocess as parallel-safe

This autotest appears to be parallel-safe.  It fails our parallel stress
test, but only because it writes to its own build directory.  This
should not interfere with other autotests.

Change-Id: Ie99dde24edc0fda0c8ec4352a6e44abb7cbc54f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agodirectfb: description.surface_caps was already assigned conditionally
Holger Hans Peter Freyther [Tue, 29 May 2012 14:01:24 +0000 (16:01 +0200)]
directfb: description.surface_caps was already assigned conditionally

We have already assigned this flag in case the IDirectFBSurfaceLayer
has the capability of premultiplied alpha. Do not set it unconditionally.

Change-Id: Id5f9bd6bdfa29dc9cd35d913b61fb55c09f54864
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoevdev: Cleanup mouse and keyboard plugins
Johannes Zellner [Fri, 25 May 2012 23:42:55 +0000 (16:42 -0700)]
evdev: Cleanup mouse and keyboard plugins

Remove fallback event0 device usage. All available devices should be
detected automatically from DeviceDiscovery either through udev or the
static fallback discovery method. This also removes the never used 'key'
argument, which was pulled over from Qt4.

Change-Id: Iffe8bd80f0770664024019a220cbbc6f98843340
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoQtConcurrent: Remove QMutex kept for BC reasons.
Morten Johan Sorvig [Thu, 24 May 2012 08:12:19 +0000 (10:12 +0200)]
QtConcurrent: Remove QMutex kept for BC reasons.

Task-number: QTBUG-25052

Since upgrading to Qt 5 forces a recompile there
are no longer inline versions of the acquire/release
functions in play.

Change-Id: I6ce6abe0f16f810891f32c7e8c5c94726e5de873
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRemove the MacMainWindow example.
Morten Johan Sorvig [Thu, 24 May 2012 09:39:26 +0000 (11:39 +0200)]
Remove the MacMainWindow example.

setUnifiedTitleAndToolBarOnMac will not be supported
on Qt 5, which removes the point of having this example.

The replacement for setUnifiedTitleAndToolBarOnMac
will be a NSToolBar wrapper in the MacExtras module,
and this example will probably re-appear in some form
there.

Change-Id: I46d5e70a7c45625d9334911bb48059e86f05282d
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMake popup windows show on the correct desktop.
Morten Johan Sorvig [Fri, 25 May 2012 05:44:22 +0000 (07:44 +0200)]
Make popup windows show on the correct desktop.

Set NSWindowCollectionBehaviorFullScreenAuxiliary
for Qt::Popup windows. This will make them show
on the same desktop as their parent full-screen
window.

Change-Id: Ice1bd50976ef0cd66b01a683a43e08e782573153
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix compilation for QT_NO_CONTEXTMENU in QtWidgets
Tasuku Suzuki [Mon, 28 May 2012 00:31:00 +0000 (09:31 +0900)]
Fix compilation for QT_NO_CONTEXTMENU in QtWidgets

Change-Id: I05b23504549c0156ba5e72144674f843149932c0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoqmake can not process project file with UTF-8 BOM
Debao Zhang [Tue, 22 May 2012 16:55:03 +0000 (09:55 -0700)]
qmake can not process project file with UTF-8 BOM

Project file contains UTF-8 BOM can't processesed by qmake and will
cause subtle errors.

Task-number: QTBUG-25848
Change-Id: Id69ed38c6be63a29fa3792a631cb8cb0ac176148
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQTBF: fix the mandatory line breaks not being set in some cases
Konstantin Ritt [Tue, 29 May 2012 02:38:28 +0000 (05:38 +0300)]
QTBF: fix the mandatory line breaks not being set in some cases

e.g. for the text "Aaa bbb ccc.\r\nDdd eee fff." the \r\n wasn't treated
as a hard line break or as a line break opportunity, ever.
Quite ancient bug...

Change-Id: I8d8497c55a3a4d51c27de99ccfe1e31f3bf4de77
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoIntroduce QUnicodeTools
Konstantin Ritt [Tue, 29 May 2012 02:15:53 +0000 (05:15 +0300)]
Introduce QUnicodeTools

Add QUnicodeTools namespace and rename qGetCharAttributes to initCharAttributes;

Make it possible to disable tailoring globally by overriding
qt_initcharattributes_default_algorithm_only value
(useful for i.e. running the specification conformance tests);

This is mostly a preparation step for the upcoming patches.

Change-Id: I783879fd17b63b52d7983e25dad5b820f0515e7f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRe-generate the Arabic joining tables from UCD 6.1.0
Konstantin Ritt [Wed, 23 May 2012 16:02:28 +0000 (19:02 +0300)]
Re-generate the Arabic joining tables from UCD 6.1.0

Some names were fixed to meet their values in the Unicode data files (e.g. Zain -> Zhain);
Some other names were added as a value alias (Nya -> Noon) or deprecated
but retained as a value alias for BC (HamzaOnHehGoal -> TehMarbutaGoal);
Newly assigned Arabic characters were mapped into respective joining types and classes)

Change-Id: Ic4b4a6baf70f51fb5936f74fe9a173b8790dda11
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove QUpdateEvent from the public headers
Lars Knoll [Sat, 26 May 2012 10:05:02 +0000 (12:05 +0200)]
Remove QUpdateEvent from the public headers

It's only used internally in qwidget, so it might as well
live in qwidget_p.h.

Task-number: QTBUG-25070, QTBUG-25373
Change-Id: I87770e0b49253b4bdebe90ce84dd42448d6175bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>