profile/ivi/qtbase.git
12 years agoFix MSVC warnings about struct/class mismatch for dynamic metaobjects.
Friedemann Kleint [Mon, 21 May 2012 07:39:41 +0000 (09:39 +0200)]
Fix MSVC warnings about struct/class mismatch for dynamic metaobjects.

Change-Id: I263f25161fa1861ca5e7da9440214fd3ba6e944e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoElaborate QUrl::toString() documentation.
Leonard Lee [Fri, 18 May 2012 08:40:29 +0000 (10:40 +0200)]
Elaborate QUrl::toString() documentation.

Change-Id: If2d726e7b4e8d408312fcb138c3dd146926bfd9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoGet rid of ambiguous overload for xgetbv.
Jan-Arve Saether [Mon, 21 May 2012 08:51:18 +0000 (10:51 +0200)]
Get rid of ambiguous overload for xgetbv.

The patch that broke this was assuming the signature of xgetbv was
_xgetbv(int). This lead to that there were no exact match for the
function resolver, thus the ambiguity.

Apparently, the signature of _xgetbv is _xgetbv(unsigned int).
Changing the static xgetbv to uint makes the match exact, thus no more
ambiguity.

Change-Id: I8db95e00a9fef264d7a1f84d02bb929db84e6e5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
12 years agoqdoc: Write <qmlinheritedby> before <qmlinstantiates>
Martin Smith [Fri, 18 May 2012 13:08:23 +0000 (15:08 +0200)]
qdoc: Write <qmlinheritedby> before <qmlinstantiates>

The order of these two elements has been switched
in DITA XML files for QML types. <qmlinheritedby>
now comes before <qmlinstantiates>.

Change-Id: I1a041c087351734d20629336bbc1c136e04d345a
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoInput: evdevmouse plugin cleanup
Johannes Zellner [Thu, 17 May 2012 20:13:57 +0000 (13:13 -0700)]
Input: evdevmouse plugin cleanup

Remove unused code and variables from the evdevmouse plugin.

Change-Id: Id7881bc726b5ffb2fa452e4d4dd082fe70f7ed28
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoMove rarely used QObjectPrivate data to extraData
Martin Jones [Thu, 17 May 2012 07:39:46 +0000 (17:39 +1000)]
Move rarely used QObjectPrivate data to extraData

Move runningTimers, eventFilters and objectName data members to
ExtraData.  Saves 12 bytes per QObject for 95% of use cases
(QObjectPrivate goes from 76B -> 64B).

Change-Id: I5648c89f65a7be3ea51bd703ee8a9dcff6222c3c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoChange QSslCertificate::toText() to return a QString.
Richard Moore [Sun, 20 May 2012 12:31:55 +0000 (13:31 +0100)]
Change QSslCertificate::toText() to return a QString.

A couple of people reviewing the toText() method (which is new in 5.0)
have said that since the string returned is human readable it should
be a QString not a QByteArray. This change follows their advice.

Change-Id: Ibade9a24870805f7fbe2d299abeb9c6e964f0cf4
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAdd the LICENSE.GPL file to the module referenced from license headers
Laszlo Papp [Tue, 1 May 2012 22:34:40 +0000 (01:34 +0300)]
Add the LICENSE.GPL file to the module referenced from license headers

Change-Id: I3821a2679883a8a340acacba24b5ea44607d374e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years ago-device: c01621ec8 broke device feature
Girish Ramakrishnan [Sat, 19 May 2012 17:24:48 +0000 (10:24 -0700)]
-device: c01621ec8 broke device feature

result was never returned by resolveDeviceMkspec

Change-Id: Ibd2f647e5524cdc9dbf4ea06f7b815f9dcc43212
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoCocoa implementation of QPA menu interface.
James Turner [Fri, 4 May 2012 13:16:05 +0000 (14:16 +0100)]
Cocoa implementation of QPA menu interface.

Implement the QPA platform menu interface for Cocoa,
including native menubar support and merging with the
predefined menus created from the bundled .nib. Cleanup
code previously used to maintain the menus, and add
a manual test of the menus code.

Change-Id: Ia99267ddb6485e18e05c540eb32c5aee6cbb85db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFixed unused variable warning in anchorlayout example.
Mitch Curtis [Fri, 18 May 2012 10:46:43 +0000 (12:46 +0200)]
Fixed unused variable warning in anchorlayout example.

Change-Id: I54c6e471531485e33b20b6a6da7f52dab5c3a32a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFixed unused variable warning in chart example.
Mitch Curtis [Fri, 18 May 2012 07:27:48 +0000 (09:27 +0200)]
Fixed unused variable warning in chart example.

Change-Id: I0985ff1b1224b29a394ae2a594aeaa783d650ffa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQPA menu abstraction, originally based on Morten's work
James Turner [Mon, 27 Feb 2012 13:04:45 +0000 (13:04 +0000)]
QPA menu abstraction, originally based on Morten's work

Create a QPA abstraction for native menus, derived from the
Cocoa support in 4.8, but with the expectation to support
other platforms too. Update the QtWidget QMenu and QMenuBar
code to maintain their QPA equivalents if they exist.

Change-Id: Id605de3da8811dc832bf48b35f9107778ad320ff
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFix QtNetwork compilation for -qconfig large
Tasuku Suzuki [Wed, 16 May 2012 20:01:36 +0000 (05:01 +0900)]
Fix QtNetwork compilation for -qconfig large

Change-Id: I231272e59101e9492a7a1edbacab165b96927877
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdding QPlatformTheme support for Blackberry devices.
Sean Harmer [Tue, 24 Apr 2012 10:17:18 +0000 (11:17 +0100)]
Adding QPlatformTheme support for Blackberry devices.

Starting off simple with fonts that follow the Playbook guidelines.

Change-Id: If772f9a20c5e7566543be6bba47b49cdf3bf1524
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agoQNX: Special case z-ordering of the QDesktopWidget window
Sean Harmer [Fri, 18 May 2012 10:13:03 +0000 (11:13 +0100)]
QNX: Special case z-ordering of the QDesktopWidget window

The assumption that window creation order implies correct initial
z-ordering is broken when dealing with certain window types. In this
commit we special case the QDesktopWidget's window which maybe created
after normal application windows yet still need to be layered below
them.

Without this fix we may accidentaly activate the Desktop window when the
blackberry navigator service sends an event to activate the window
group. That results in broken focus handling.

Change-Id: I42dfde2efb4a0011e37e7bd2e7c5442590606a24
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agoCompile fix: Do not rely on __cpuidex() for msvc2008
Jan-Arve Saether [Wed, 16 May 2012 12:34:14 +0000 (14:34 +0200)]
Compile fix: Do not rely on __cpuidex() for msvc2008

Since its hard to detect if __cpuidex() is actually available at
compile time, we'll add a function overload that will be chosen if the
intrinsic __cpuidex() is not available.

Note that the QtXgetbvHack that was used for _xgetbv did not really
work (MS compiler will bail out because of ambiguous overloads if the
intrinsic _xgetbv existed).

Therefore, we apply the same workaround for _xgetbv.

Change-Id: Iee3bf8bc6352ba0861b05d779f1f001d4eb013ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agodevice: Allow specifying shortnames for device mkspecs
Girish Ramakrishnan [Tue, 15 May 2012 15:44:13 +0000 (08:44 -0700)]
device: Allow specifying shortnames for device mkspecs

Specifying -device linux-amlogic-8726M-g++ is error prone. With this
change, one can specify any substring of the mkspec names under
devices/ and the first one will be picked.

Change-Id: I7c4522fdaefe4a11e9292f7831075aa766a62c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoSave configuration feedback into config.summary
Girish Ramakrishnan [Fri, 18 May 2012 05:23:50 +0000 (22:23 -0700)]
Save configuration feedback into config.summary

commit d60d98450ada232fc3e8d0c5762a2b7a90beb921 adds the support for
unix configure. This commit adds the same for Windows configure.

Change-Id: Ibcc604154fd7d0d9c6112ae5459d9bb842daf180
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQRegExp: fix usage of uninitialized values
Giuseppe D'Angelo [Fri, 18 May 2012 13:17:25 +0000 (15:17 +0200)]
QRegExp: fix usage of uninitialized values

A (probable) typo was causing the code dealing with anchors
to use uninitialized values. This used to work by chance, but was
indeed detected by Valgrind f.i. when running tst_qregexp --
the indexIn test on anc11 data reported:

    ==3015== Conditional jump or move depends on uninitialised value(s)
    ==3015==    at 0x514B4EA: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1813)
    [...]
    ==3015==  Uninitialised value was created by a stack allocation
    ==3015==    at 0x514B3EB: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1803)

Fixing the code also makes the aforementioned test to succeed.

Change-Id: If7b3e518c1bbfcf12573d2637c33ef2eca27c4d5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoDon't use the deprecated translate() method anymore
Lars Knoll [Thu, 17 May 2012 00:37:23 +0000 (02:37 +0200)]
Don't use the deprecated translate() method anymore

The Encoding argument of QCoreApplication::translate()
is deprecated and source code is always assumed to be
encoded in Utf8. Simply remove the encoding argument
from the generated .ui.h files.

Change-Id: If6c40f6df13abd45a0303c863077972c3d1fb685
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMove QIcon metatype handlers back to QtGui
Olivier Goffart [Tue, 15 May 2012 13:40:58 +0000 (15:40 +0200)]
Move QIcon metatype handlers back to QtGui

QIcon has been moved back from QWidget to QtGui, so the QIcon QVariant
and QMetaType handler can now be moved back to QtGui.
Also we can give back QIcon its old number, allowing to get rid of some
compatibility hack when unstreaming QVariant

Change-Id: I439d5c2987c06ecd619f394407850f678164afb8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoQIcon: move back to QtGui
Olivier Goffart [Mon, 14 May 2012 16:02:16 +0000 (18:02 +0200)]
QIcon: move back to QtGui

 -  Move the files and tests
git mv src/widgets/kernel/qicon* qrc/gui/image/
git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/

 - update the include of QIcon
git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon"
git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon"

 - Adapt QIcon \ingroup documentation
sed -i s/QtWidgets/QtGui/ src/gui/images/qicon*

 - Adapt export macro
sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon*

 - Update .pri and .pro files

 - Remove the use of QStyle::alignedRect by copying its content (and
   adapt slightly

 - Use QGuiApplication::palette() instead of QApplication::palette()

 - Add a hook in QGuiApplicationPrivate to call the
   QStyle::generatedIconPixmap() from QtWidgets

Another commit follows to adjust QMetaType::Icon and move the QVariant
and QMetaType icon handler back in QtGui

Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoMake QCoreApp::translate and related methods use UTF-8
Lars Knoll [Wed, 16 May 2012 21:09:56 +0000 (23:09 +0200)]
Make QCoreApp::translate and related methods use UTF-8

Deprecate the Encoding enum in QCoreApplication and the
trUtf8() methods. Qt now assumes that source code is
always encoded in UTF-8 to be consistent with QString.

Change-Id: Ic62d6947046dee9be0cbd37f2d2f6976b9e572a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed unused parameter warning in hellowindow example.
Mitch Curtis [Fri, 18 May 2012 12:47:00 +0000 (14:47 +0200)]
Fixed unused parameter warning in hellowindow example.

Change-Id: I48ea19b5548a179d8116685fa481c4d1b3804bba
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoFixed unused variable warning in diagramscene example.
Mitch Curtis [Fri, 18 May 2012 10:15:19 +0000 (12:15 +0200)]
Fixed unused variable warning in diagramscene example.

Change-Id: I85cc038602e22c140f0564b15ebcb3872750b162
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoUse QMetaType API directly instead of going through QVariant.
Jędrzej Nowacki [Tue, 15 May 2012 13:42:26 +0000 (15:42 +0200)]
Use QMetaType API directly instead of going through QVariant.

Change-Id: I418ccca7cb6e2aa1ba678e24dd36b39ebecadcbe
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix backingstore crash with QAxWidgets
Miikka Heikkinen [Fri, 18 May 2012 07:55:26 +0000 (10:55 +0300)]
Fix backingstore crash with QAxWidgets

The crash was caused by the fact that backingStore parameter is always
null (there seems to be no call in codebase that uses anything else but
the default values for this function).
Using "store" member variable instead of "backingStore" parameter gets
rid of the crash, and it is how it was in Qt4 - probably the bug crept
in when the paremeter and member variables were renamed in Qt5.

Task-number: QTBUG-25803
Change-Id: I4b1ccf540fddd6baa1dffa7f8165272b54caf238
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoeglfs: hooks can never be null
Girish Ramakrishnan [Thu, 17 May 2012 20:51:51 +0000 (13:51 -0700)]
eglfs: hooks can never be null

e60ca0de6015a8ee16c7be54d0d430252ef525c1 reworked the hooks design.
hooks is initialized with a stub pointer if we don't have a platform
hook.

Change-Id: Ia60facfebd9e4d9c08d237c6d49793efb598130f
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoeglfs: Add support for cursor hotspots
Girish Ramakrishnan [Thu, 17 May 2012 22:53:14 +0000 (15:53 -0700)]
eglfs: Add support for cursor hotspots

Cursor information is now loaded from cursor.json.

Done-with: Johannes Zellner

Change-Id: I093cf8e944d495269973e777d0b444ae4ececee1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqdoc: Report multiple QML property docss
Martin Smith [Fri, 18 May 2012 08:18:57 +0000 (10:18 +0200)]
qdoc: Report multiple QML property docss

Documentation authors sometimes make the mistake of
documenting a QML property more than once. Here, we
refer to cases where a C++ class is documented in a
.cpp file as a QML type. In this context one QML
property might be documented in two qdoc comments,
because the author of the second comment does not
search the file for an existing qdoc comment for
the property before adding the second one. When DITA
XML is generated for this case, the QML type element
will contain two <qmlproperty> elements with identical
id attributes, which is invalid XML. id attributes
must be unique within an XML document.

qdoc now reports an error for this case, indicating
that the QMLN property has been documented multiple
times.

This problem can't occur when documenting QML in a
.qml file because in .qml files, each comment must
appear directly above the thing it applies to.

Change-Id: I3a22650a58371fbda2ac7a5429fc036f41750423
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoAdd test of automated container metatype declaration.
Stephen Kelly [Thu, 26 Apr 2012 12:40:48 +0000 (14:40 +0200)]
Add test of automated container metatype declaration.

Change-Id: Iddaf444ead6d9f0147b9b11452ccea46aa712ba3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMerge two simple version of translate() functions for QT_NO_TRANSLATION
Tasuku Suzuki [Wed, 16 May 2012 19:52:33 +0000 (04:52 +0900)]
Merge two simple version of translate() functions for QT_NO_TRANSLATION

the commit 53a420a4d1a2d845603dd85ce9ce345c6819088e merged translate()
functions. The simple versions need to be merged too.

Change-Id: Ie873483beb8ed0b911ae0568e97b427f4c6b74e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake the windows socket handle non inheritable
Shane Kearns [Tue, 15 May 2012 14:41:01 +0000 (15:41 +0100)]
Make the windows socket handle non inheritable

This is for behaviour consistency with Qt on unix, as well as the
socket close issues described in the task.

Task-number: QTBUG-4465
Change-Id: Ida95650d8a9bd7b5bc3d3926d22e20a6d7eeb30b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix FreeType glyph caching for high resolution
Jiang Jiang [Wed, 16 May 2012 16:14:45 +0000 (18:14 +0200)]
Fix FreeType glyph caching for high resolution

For high resolution or extremely large font sizes, the advance
cached here is likely to overflow, since FreeType returns 26.6
fixed point value and we only take signed char here for advance.

In those cases we should skip caching because there won't be
that many big glyphs after all.

Also move the metrics caching block a bit down to take glyph
embolden and oblique into account.

As a result we also don't need to increase the linearAdvance
size because any linearAdvance less than 128 should fit in
the old 10.6 fixed format.

Change-Id: Ic4920ada49954ce1e0a8673c9f33f30e385e3046
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoQMetaObject::activate() overload that doesn't require a metaobject
Aaron Kennedy [Thu, 17 May 2012 10:08:48 +0000 (11:08 +0100)]
QMetaObject::activate() overload that doesn't require a metaobject

This allows QML to emit signals without having to built lazily created
metaobjects.

Change-Id: If8068fb3cb35d79dc8f3ef79253d9c2eb7c93205
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoAvoid qobject_cast
Aaron Kennedy [Thu, 17 May 2012 10:06:17 +0000 (11:06 +0100)]
Avoid qobject_cast

This is slightly faster, and also avoids accessing the object's meta
object that would cause any lazily created meta objects from being built.

Change-Id: I0a78e09511c120bdbe707a1efc91ba480ab7680c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoEncapsulate the dynamic meta object pointer
Aaron Kennedy [Thu, 17 May 2012 10:02:59 +0000 (11:02 +0100)]
Encapsulate the dynamic meta object pointer

This change allows us to delay creating the actual meta object
until it is actually required.

Change-Id: I1c4a4226bd82fa606b206dd60322f49b49c32463
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoClean up some QT_HAVE_xxx macros in qcompilerdetection.h
Thiago Macieira [Wed, 16 May 2012 15:43:23 +0000 (17:43 +0200)]
Clean up some QT_HAVE_xxx macros in qcompilerdetection.h

We no longer have code doing MMX or 3dNow! on Qt 5, so nothing defines
those macros. If nothing defines them, we don't need to undef
them. Note that the SSE case is a mislabel: the old "SSE" code on Qt 4
wasn't real SSE, it was MMX with some instructions added at the same
time as SSE was added. It's MMX that Windows 64 doesn't support.

As for QT_HAVE_ARMV6, this macro is replaced by the sub-arch detection
in qprocessordetection.h.

Change-Id: Ic3b00e1533e6b4cea32ba7824233de0a5c0fb32b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoBlacklist Apple clang 3.0 and previous support for AVX
Thiago Macieira [Wed, 16 May 2012 11:42:53 +0000 (13:42 +0200)]
Blacklist Apple clang 3.0 and previous support for AVX

In at least one case found in our testfarm, the compiler runs into an
ICE (Internal Compiler Error) compiling the new AVX code. The error it
reported was:

 fatal error: error in backend: Cannot select: 0x7fbf1aa42210: f64 = sint_to_fp 0x7fbf1aa88a10 [ORD=1936] [ID=37]
   0x7fbf1aa88a10: i32,ch = CopyFromReg 0x7fbf19538768, 0x7fbf1a9f2610 [ORD=1936] [ID=27]
     0x7fbf1a9f2610: i32 = Register %vreg38 [ORD=1936] [ID=9]

As is the nature of ICEs, juggling the code around will probably make
it pass. But since I have plenty more AVX changes pending, which make
the code even more complex, it's also very likely that this issue will
happen in other places. For that reason, I choose to blacklist the
compiler instead.

Change-Id: Ide3201f0cc49c7ceb63e966f6de65a8315cbea4b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoRemove parallel flag for qsemaphore because of flaky nature.
Toby Tomkins [Fri, 18 May 2012 05:02:00 +0000 (15:02 +1000)]
Remove parallel flag for qsemaphore because of flaky nature.

The CI system is now using the parallel_test flag to run tests in
parallel. This test has become flaky, or at least more flaky than it
was previously. Mark it to no longer run in parallel.

Change-Id: I47bca3be620a8f648a0eb9c9b9f26d2d925efc01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove optimization flag from QMAKE_CFLAGS
Romain Pokrzywka [Wed, 16 May 2012 23:13:34 +0000 (16:13 -0700)]
Remove optimization flag from QMAKE_CFLAGS

-O2 is already the default optimization level for release builds,
as defined in gcc-base.conf. In addition, it shouldn't be set for
debug builds.

Change-Id: Idd7406b0d135d9579676b389050fd6e5776e722c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoApply compiler platform flags to debug builds as well
Romain Pokrzywka [Wed, 16 May 2012 22:59:00 +0000 (15:59 -0700)]
Apply compiler platform flags to debug builds as well

Compiler flags like CPU architecture and FPU should be set on
QMAKE_CFLAGS instead of QMAKE_CFLAGS_RELEASE, as the latter only
applies to release builds

Change-Id: I2e729a9e413934e904fc2810394e118940b8557f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agotestlib: added missing newline to error message
Rohan McGovern [Thu, 17 May 2012 07:35:35 +0000 (17:35 +1000)]
testlib: added missing newline to error message

Change-Id: I8b205da4d225d99f8505a46d8d78ad302cb2b9e3
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoadd some more widely-used QChar::SpecialCharacter enum values
Konstantin Ritt [Mon, 14 May 2012 15:12:48 +0000 (18:12 +0300)]
add some more widely-used QChar::SpecialCharacter enum values

Change-Id: Iad58f4366ba6cd6da29a268c56c8a4bc4cf0329c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoeglfs: Allow cursor atlas to be specified using an env variable
Girish Ramakrishnan [Wed, 16 May 2012 18:18:09 +0000 (11:18 -0700)]
eglfs: Allow cursor atlas to be specified using an env variable

The atlas it assumed to have 8 cursors per row. All cursors have
to be square.

Change-Id: I7ffbad4662be450b146f84032bb26187894d528f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoeglfs: delete cursor textures in the destructor
Girish Ramakrishnan [Wed, 16 May 2012 18:13:54 +0000 (11:13 -0700)]
eglfs: delete cursor textures in the destructor

Change-Id: I7e86313134c428bacda41f5e5401ebc392ceecd8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoeglfs: remove multiple references to qeglfshooks.h in HEADERS
Girish Ramakrishnan [Wed, 16 May 2012 19:30:58 +0000 (12:30 -0700)]
eglfs: remove multiple references to qeglfshooks.h in HEADERS

ce2b46daea5815df1070463b6bc379e1b4573dae introduced the mistake.

Change-Id: Ifbd276dc24138dfb771d0cb14cb5d18dfa7beb2d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove src/widgets/kernel/x11.pri.
Robin Burchell [Wed, 16 May 2012 08:49:46 +0000 (10:49 +0200)]
Remove src/widgets/kernel/x11.pri.

Presumably, this was set for QSound, which has since moved to QtMultimedia (and
no longer uses nas, anyway).

Configure also no longer seems to have logic for setting nas, as of
4535913c4fb908293f8f1667eff480efc3fadd73.

Change-Id: Ie5b351844bd169ad0548b0d29513adbf6f5d9a12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoturn off exceptions by default where they aren't required
Lars Knoll [Wed, 9 May 2012 16:52:44 +0000 (18:52 +0200)]
turn off exceptions by default where they aren't required

This significantly reduces the size of the generated code
in places where we don't need exceptions.

The -(no-)exceptions configure flag has been removed in the
process, as there is now a fine grained way to control this
on a per module level, and Qt is being compiled without
exceptions in most places.

Change-Id: I99a15c5d03339db1fbffd4987935d0d671cdbc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix cursorToX for right to left text with trailing whitespace.
Andrew den Exter [Wed, 9 May 2012 06:14:34 +0000 (16:14 +1000)]
Fix cursorToX for right to left text with trailing whitespace.

QTextLine::cursorToX returned the line width for cursor positions
outside the width of a wrapped right to left line because the
leading space width was always calculated as 0.

Returning a non-zero width for the leading space does cause
problems for other uses of QTextEngine::alignLine() though
as the textAdvance already doesn't include the leading/trailing
space so subtracting it there double accounts for it.

Task-number: QTBUG-24801

Change-Id: I56cbb139814c32813bebb49de8c045b29154a958
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoQDoc: Generate correct relative paths and links when using -installdir.
Casper van Donderen [Wed, 16 May 2012 12:44:38 +0000 (14:44 +0200)]
QDoc: Generate correct relative paths and links when using -installdir.

This change will generate working links between all modules in qtbase.
Some testing needs to be done on the other modules.

Change-Id: Ic65a9c753f891ac51427ca7c1cdcab13611d2f5b
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoFix bug when destruction fields in QWizard
Carl Schumann [Fri, 11 May 2012 18:40:21 +0000 (13:40 -0500)]
Fix bug when destruction fields in QWizard

Maintain the consistency of QWizardPrivate's two members:
    QVector<QWizardField> fields;
    QMap<QString, int> fieldIndexMap;
during and after calls to QWizardPrivate's
void _q_handleFieldObjectDestroyed(QObject *)
member function.  The failure to maintain this consistency
caused an out of bounds access and core dump in
QWizard's field(const QString &name) member function.

QWizard's field(const QString &name) member function expects
the values in the QMap fieldIndexMap to be indexes into the
QVector fields.  Prior to this change
_q_handleFieldObjectDestroyed only removed the appropriate
entry from the map and erased it from the vector.  It did
not decrement by one all the indexes greater than the index
that was removed from the map and erased from the vector
in the rest of the map.

For example ...
So if initially have the following mapping ...
"field0" -> 0,
"field1" -> 1, and
"field2" -> 2
with fields of size 3. After destruction of "field1" have ...
"field0" -> 0, and
"field2" -> 2
with fields of size 2.
Now attempts to look up "field2" using QWizard::field will
have an out of bounds error and possibly core dump or trigger
an internal Qt assert because an attempt to access
this->fields[2] will be made.   It should be accessing
this->fields[1], but does not because the map is no longer
consistent with the vector.

This change adds a decrement by one for all the indexes
greater than the index that was removed from the map and
erased from the vector.

Task-number: QTBUG-25691
Change-Id: Ia2a41027628a65faec4ecdd5da235ddd19746a57
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoenable the text layout's cache where it is seems to be missed
Konstantin Ritt [Tue, 15 May 2012 17:02:53 +0000 (20:02 +0300)]
enable the text layout's cache where it is seems to be missed

e.g. in QStaticText, the data is used just to get the line's y-position
and re-calculates just after the loop to determine the bounding rect and to draw the text;

in QWidgetLineControl, the data re-calculated over and over while the result
is seems to remain the same; probably the caching is needed here too

Change-Id: I0f7eb291532f63eccb9c5f749daebb73ff90632f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoqdoc: Include QML type name in method quid
Martin Smith [Wed, 16 May 2012 08:47:28 +0000 (10:47 +0200)]
qdoc: Include QML type name in method quid

A case was found where a method inherited from a
QML type marked abstract had the same name as a
method in the inheriting class, and these two
methods received the same quid. This was fixed
by including the QML type name in the guid for
QML methods.

Change-Id: I110eb254b3c6be014cb67fdc5b57b5aa2f575220
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoAdd header qtest_widgets.h, similar to qtest_gui.h, but for QApplication.
David Faure [Tue, 15 May 2012 11:04:39 +0000 (13:04 +0200)]
Add header qtest_widgets.h, similar to qtest_gui.h, but for QApplication.

The current alternative is to define QT_WIDGETS_LIB before including
qtest.h, but this is not convenient/intuitive when using other build
systems than qmake. If one forgets the define, crashes happen when
using QApplication-related code.

Use <QTestWidgets> in one of the widgets autotests, for testing.

Change-Id: Id96be4976723aea3e8a28c9d0d594daab25a6d90
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoPopulate the font database when calling fallbacksForFamily().
Zeno Albisser [Wed, 16 May 2012 14:13:48 +0000 (16:13 +0200)]
Populate the font database when calling fallbacksForFamily().

The Mac platform requires populating the font database to build the
fallback list for font families.

Change-Id: I5bd63cd3c5fa6216c312d439390681f160a716fb
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoAdd focusWindowChanged signal to QGuiApplication
James Turner [Fri, 13 Apr 2012 09:57:43 +0000 (10:57 +0100)]
Add focusWindowChanged signal to QGuiApplication

Required for Cocoa platform menus support, we need a
way to update state after focusWindow() result changes.

Change-Id: Idc573888c3d75bcbff2252e243c4b57b15fc2fcd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoHandle EglDisplay and EglContext in the native interface of eglfs.
Samuel Rødal [Tue, 15 May 2012 06:12:45 +0000 (08:12 +0200)]
Handle EglDisplay and EglContext in the native interface of eglfs.

Change-Id: I793176204f12eea9d915fb7fe489bd3450a283cd
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoAdd eglfs cursor support
Girish Ramakrishnan [Mon, 9 Apr 2012 21:16:19 +0000 (14:16 -0700)]
Add eglfs cursor support

cursor-atlas.png was generated from existing cursor images
(qttools/src/shared/qtpropertybrowser/images/)

Change-Id: Ic4b396590eaec93e14a4b0915b15f735f5b1a5f5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQCoreApplication: No longer hardcode arguments to be filtered out.
Friedemann Kleint [Wed, 16 May 2012 07:39:39 +0000 (09:39 +0200)]
QCoreApplication: No longer hardcode arguments to be filtered out.

On Windows, Unicode command line arguments are re-created from
the original command line filtering out the known arguments.
To avoid having to hard-code all arguments of derived application
classes, keep the original argv-array and use that to verify if
an argument is still present.

Task-number: QTBUG-25724
Change-Id: I5d7bbd9530b1b74e1dcd22a0edc4f323ef687d23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoCorrect a mistake about non-characters in the documentation.
Thiago Macieira [Wed, 2 May 2012 13:37:53 +0000 (15:37 +0200)]
Correct a mistake about non-characters in the documentation.

The Unicode non-characters are 32 characters, from U+FDD0 to
U+FDEF. The code matching these comments was fixed in
9327bc87c3abf58bb471693b5448cd78e3db1b46, but the comment wasn't
fixed.

Change-Id: I5bde0ab9d70c1c6623893de36d31235cbd9fb152
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAdd Visual Studio 11 mkspec
Andreas Holzammer [Wed, 16 May 2012 06:50:55 +0000 (08:50 +0200)]
Add Visual Studio 11 mkspec

This adds the Visual Studio 11 mkspec
and the corresponding changes to configure
and qmake makesystem.

Change-Id: I3a7e82a6f7f90aa0a94dedd493ebaa66bf100923
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoqdoc: Fix some QString usage issues (Krazy warnings).
Friedemann Kleint [Wed, 16 May 2012 09:26:11 +0000 (11:26 +0200)]
qdoc: Fix some QString usage issues (Krazy warnings).

- Avoid single-character constants.
- Use QString() instead of "".

Change-Id: If04eff389e7b6d4a18201365b711708fdf545d00
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoqdoc: Fix warnings about unused variables.
Friedemann Kleint [Wed, 16 May 2012 09:24:11 +0000 (11:24 +0200)]
qdoc: Fix warnings about unused variables.

Change-Id: I2052da55022334362efb5765335f00692f4c65fa
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoRemove duplicate include for the macros.
Stephen Kelly [Mon, 14 May 2012 08:49:55 +0000 (10:49 +0200)]
Remove duplicate include for the macros.

The basic config file includes the macros file already if needed.

Change-Id: I8b03360ce1e9fff4a3be5270f659dbe22fc1b295
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoProperly quote all variables which are paths.
Stephen Kelly [Mon, 14 May 2012 08:47:13 +0000 (10:47 +0200)]
Properly quote all variables which are paths.

This is required if Qt is installed into a directory with spaces.

Change-Id: I1d6874265558d712ac98a3aef670c2934a632ab1
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoAdd a non-implicit copy constructor to QEvent
Thiago Macieira [Wed, 4 Apr 2012 17:25:12 +0000 (14:25 -0300)]
Add a non-implicit copy constructor to QEvent

Copying events is a bad idea but it is permitted, used at least in the
state machine framework and QApplication, which somehow found it
amusing to clone events. We can't forbid it because it would be
source-incompatible with Qt 4, and other ill-advised developer may be
doing this.

In the new copy functions and in the destructor, ensure that the d
pointer is null. We can't copy it if it isn't. The exception is for
DeferredDelete events, which use the d pointer to store the loop level
count. Such value must not be deleted.

In the future, if QEvent::d is used at the QEvent level, make sure to
adapt QCoreApplication::postEvent to store the counter somewhere else.

Task-number: QTBUG-25070
Change-Id: I1f2d3f3cfc891ec216df2e8b7dbe531524d21b26
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAvoid using iconv for text conversion where possible
Lars Knoll [Sat, 12 May 2012 01:33:50 +0000 (03:33 +0200)]
Avoid using iconv for text conversion where possible

Try to use a builtin codec as codecForLocale() if possible
first. Fall back and instantiate the iconv codec only
if that failed.

In addition, make sure we initialize the locale correctly
before we try to setup the codec.

Change-Id: I86d635f9d11e8ff93093f162e79fb37f3d85731b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoLimit the nesting depth of the Json parser
Lars Knoll [Sat, 12 May 2012 10:09:35 +0000 (12:09 +0200)]
Limit the nesting depth of the Json parser

The parser is recursive and too deeply nested json would
cause it to exhaust the available stack space leading to
crashes.

We now abort parsing with a DeepNesting parse error if the
document is too deeply nested. The current nesting limit
is set to 1024, which should be more then enough for any
real JSON data set.

Change-Id: I4adea3fd727149f7342536d73cf4530361a0a3a1
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agoQElfParser: double check section size before using it.
Arvid E. Picciani [Tue, 15 May 2012 10:29:53 +0000 (12:29 +0200)]
QElfParser: double check section size before using it.

In rare cases, if the section is empty, we're reading the whole object
into memory because size -1 = UINT_MAX.

Change-Id: Ibf9a1534159ce626e4f2327536076d0cc1ebf0ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMIPS DSPR2 optimization of routine fetchUntransformedRGB16
Damir Tatalovic [Wed, 4 Apr 2012 15:54:58 +0000 (17:54 +0200)]
MIPS DSPR2 optimization of routine fetchUntransformedRGB16

Change-Id: I109deb969009214c4d81677e127f50120443acd2
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRevert "Temporarily disable -Woverloaded-virtual in headersclean test"
Kent Hansen [Tue, 15 May 2012 07:52:24 +0000 (09:52 +0200)]
Revert "Temporarily disable -Woverloaded-virtual in headersclean test"

This reverts commit a17523805e56511465550a6a93a88b3fc3c8325a

The compatibility overloads were removed in change Icf108a80177155f21bb73c165fb8ab5d4e997bc2.

Change-Id: I4861f281451d66a1aa5f3525eea1773dfef0540e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSupport specifying fallbacks in font request on QPA
Eskil Abrahamsen Blomfeldt [Thu, 10 May 2012 14:50:33 +0000 (16:50 +0200)]
Support specifying fallbacks in font request on QPA

Because the QPA font database would query fallback families inside
findFont(), support for requesting multiple font families in order
of preference (like QFont("Times New Roman, Arial")) did not work,
because the Arial fallback was never attempted. To fix this, we
pass in the queried fallbacks and make sure they are tried before
any platform specific fallbacks.

Task-number: QTBUG-20986
Change-Id: Idb2b717856f013ce2874f00a8debaff60176d2fc
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoQChar: add isSurrogate() and isNonCharacter() to the public API
Konstantin Ritt [Tue, 15 May 2012 17:48:20 +0000 (20:48 +0300)]
QChar: add isSurrogate() and isNonCharacter() to the public API

+ QChar::LastValidCodePoint enum value that supercede the UNICODE_LAST_CODEPOINT macro
replace uses of hardcoded values with the new API; remove leftovers

Change-Id: I1395c9840b85fcb6b08e241b131794a98773c952
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQChar: add missing UCS-4 overloads, get rid of UCS-2 ones
Konstantin Ritt [Fri, 11 May 2012 11:19:44 +0000 (14:19 +0300)]
QChar: add missing UCS-4 overloads, get rid of UCS-2 ones

inline all non-static members to a static ones (declared with QT_FASTCALL),
ushort converts automatically to uint and the conversion cost is minimal.

Task-Number: QTBUG-13052

Change-Id: I189a6f205736766adcd3de2d61cee71f30cc64f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQJpegHandler: add an embedded text support
Konstantin Ritt [Tue, 8 May 2012 11:15:04 +0000 (14:15 +0300)]
QJpegHandler: add an embedded text support

texts for the textKeys are stored each in a separate COM(ment) section
so that the maximum text's size is almost 65KB

Task-number: QTBUG-10568
Task-number: QTBUG-111

Change-Id: I7d693741e10e5d78d497cb0af448160077350bb2
Reviewed-by: aavit <qt_aavit@ovi.com>
12 years agoFix QFile::permissions for long filenames
Shane Kearns [Wed, 2 May 2012 15:46:52 +0000 (16:46 +0100)]
Fix QFile::permissions for long filenames

When qt_ntfs_permission_lookup is used, QFile::permissions failed
for files with long filenames.
Also created a test case for this API, which revealed another bug.

Task-number: QTBUG-25629
Change-Id: I73b7676a9d059c0e782b3f701b2e6bbc92f671ed
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
12 years agotst_QNetworkReply: enable the ioGetFromBuiltinHttp test.
Martin Petersson [Wed, 9 May 2012 12:01:22 +0000 (14:01 +0200)]
tst_QNetworkReply: enable the ioGetFromBuiltinHttp test.

This can be enabled again now. The sender transfer test is still not
re-enabled since the test would take to long to run if sending
enough data to overwhelm the reciever's kernel buffers.

Change-Id: I4056fdca53ec8ebbcc53dfdc814d8bfdbc73f7ce
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
12 years agoQHttpNetworkReply:readBodyFast return early if nothing to read.
Martin Petersson [Wed, 9 May 2012 12:07:32 +0000 (14:07 +0200)]
QHttpNetworkReply:readBodyFast return early if nothing to read.

Incase there is no bytesAvailable on the socket there is no need to
try to read.

Change-Id: Ied9e4b8d86854b356a733fab4948739db206b6ad
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQNetworkAccessManager: Read all from socket on remote host close
Martin Petersson [Wed, 9 May 2012 11:53:46 +0000 (13:53 +0200)]
QNetworkAccessManager: Read all from socket on remote host close

When we get a remoteHostClosed we should try to read everything from
the socket before we close the channel.

Change-Id: Iaa87d79ea16d69735f6ba3e8b3b4a0f86fbd5f73
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoFix cases where functions are called with a drive and no slash
Andy Shaw [Tue, 17 Apr 2012 18:30:54 +0000 (20:30 +0200)]
Fix cases where functions are called with a drive and no slash

When a file is specified on a path that includes a drive letter
followed by a colon but no slash then it didn't always account
for the fact that this refers to the current path on that drive.
This fixes the problems in completeBaseName(), baseName() and
path().  Tests are also added for these three cases and some
others too.

Task-number: QTBUG-25353

Change-Id: I47a197c6af066f532442ad269be57597ec61303a
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoudev: improve device discovery with udev for add/remove
Johannes Zellner [Tue, 15 May 2012 19:43:08 +0000 (12:43 -0700)]
udev: improve device discovery with udev for add/remove

As the udev device tree structure varies between distros and udev
versions, first probe the actual leaf node for device properties.
If leaf does not contain needed properties, walk up the tree to the
next node matching the queried submodule.

Change-Id: I09329d5a76a1a2a797513f4a787cb27fed5293c7
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoprintsupport: set duplex setting correctly to CUPS printer
Teemu Katajisto [Thu, 10 May 2012 08:54:28 +0000 (11:54 +0300)]
printsupport: set duplex setting correctly to CUPS printer

If CUPS printer default is not DuplexNone then setting duplex
to None for printer did not have any effect on duplex setting.

Change-Id: Ifdd82241952c9a63cdf9b53fe787f7503b8049bd
Reviewed-by: John Layt <jlayt@kde.org>
12 years agoUse IF(NOT TARGET ...) before creating imported targets.
Stephen Kelly [Tue, 15 May 2012 12:35:42 +0000 (14:35 +0200)]
Use IF(NOT TARGET ...) before creating imported targets.

Initially we didn't do this because someone could accidentally create
another target of a conflicting name, and used a variable to store whether we
have created the target already or not.

That wasn't adequeate to deal with finding the package in a scope
like a function, so we used a directory property. However, the directory
property is not valid in the same scopes as the defined target. For
example, finding a Qt module in both a directory and a subdirectory causes
a conflict.

As it is already unlikely that a target would be accidentally created with
a name like Qt5::Core, we should simply use the IF(TARGET) form.

Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27
Reviewed-by: David Faure <faure@kde.org>
12 years agoAdd Q_UINT64_C to 64 bit integer literal.
Carl Schumann [Tue, 15 May 2012 19:02:34 +0000 (14:02 -0500)]
Add Q_UINT64_C to 64 bit integer literal.

On some systems prior to this change the code
would not build with the following error reported
by gcc:
error: integer constant is too large for 'long' type

Change-Id: I778bce9a72ccf3a41cdf17883d734082ed3fb4b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoinput: Use UDev or specific device paths
Johannes Zellner [Tue, 15 May 2012 00:04:44 +0000 (17:04 -0700)]
input: Use UDev or specific device paths

Keyboard,mouse and touch plugins using evdev now either
use udev for device discovery or the plugin arguments
for fixed device paths.

Change-Id: I72606ad48c15c55a49724a82f7bc285dd3984c43
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoRestore the QEvent::d pointer to null after we're done using it
Thiago Macieira [Mon, 14 May 2012 12:10:45 +0000 (14:10 +0200)]
Restore the QEvent::d pointer to null after we're done using it

Change-Id: I2fd6ebd80bf47456d74e939d49bff4ac9f199e8b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQElfParser: fix type of sh_size
Pino Toscano [Tue, 15 May 2012 12:40:15 +0000 (14:40 +0200)]
QElfParser: fix type of sh_size

The type of the sh_size field of a section header is either Elf32_Word or Elf64_Xword,
so the type used cannot be qelfword_t (always 32 bits) but qelfoff_t.

Change-Id: Ia380b6823913fee7a96b39f742630ae3a9ca0cb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
12 years agoqdoc: Improve fileToOpen detection for examples manifest
Alessandro Portale [Tue, 15 May 2012 13:30:31 +0000 (15:30 +0200)]
qdoc: Improve fileToOpen detection for examples manifest

When looking for a suitable "fileToOpen", do a case insensitive
file name comparision. So that it also works in this scenario:
  AnExample/anexample.qml

Change-Id: Ic4cd1d59a7a35e534bfd26cd174a3c2ab5383025
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoWindows: Trim filter specification of the native file dialog.
Friedemann Kleint [Tue, 15 May 2012 13:15:34 +0000 (15:15 +0200)]
Windows: Trim filter specification of the native file dialog.

In the event customer code (namely Qt Creator) does not pass a
clean specification (corresponding to 4.8 behaviour).

Change-Id: I8271e3a45bea4bea912fcdf0b7c0aae6c022c6a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoDo not limit mingw mkspec to "win32-g++" only.
kb [Tue, 15 May 2012 04:50:41 +0000 (06:50 +0200)]
Do not limit mingw mkspec to "win32-g++" only.

The Qt configure script and various qmake project files interpret
mkspecs with a win32-g++ prefix as needing special mingw treatment.
This patch corrects one instance of the too-specific "win32-g++"
qmake platform scope and broadens it to "win32-g++*" -- bringing
it in line with the rest of the Qt project files -- thus re-enabling
custom mkspecs for crosscompilation.

Change-Id: I8c5107053ce9e0c499002b1990b492bda0eec52b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoSet QMAKE_DOCS_INSTALLDIR to $$[QT_INSTALL_DOCS] to allow overriding in .pro
Marius Storm-Olsen [Tue, 15 May 2012 07:47:47 +0000 (09:47 +0200)]
Set QMAKE_DOCS_INSTALLDIR to $$[QT_INSTALL_DOCS] to allow overriding in .pro

Normally you want to pass -installdir $$[QT_INSTALL_DOCS] to qdoc by
default. However, if you want to force the generation of URL links to
the documentation, the option cannot be specified.

By setting the QMAKE_DOCS_INSTALLDIR variable in default_pre.prf a
project may override it at will, as for example Qt Creator would do.

Change-Id: Ib31f03acf4e8050cf2dd3aa33f3a10ed027f1df7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix font printing on Windows using the native engine.
Friedemann Kleint [Mon, 14 May 2012 14:57:15 +0000 (16:57 +0200)]
Fix font printing on Windows using the native engine.

- Add HFONT, LOGFONT, trueType as properties of the
  Windows font engine, make it a real Q_OBJECT.
- Query properties in the Windows print engine and use the HFONT,
  LOGFONT there.

Change-Id: I5c35275b32ef6580d7fa15ed83c6e79e33dc3334
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRename QMimeDatabase method for consistency.
David Faure [Mon, 14 May 2012 17:42:10 +0000 (19:42 +0200)]
Rename QMimeDatabase method for consistency.

Name is about mimetype names, while FileName is about, well, file names.

Task-number: QTBUG-25748
Change-Id: I34a9ac1a5fc06dc3e3855365e19c4dc7a1aa2671
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
12 years agoqdoc: Don't include internal QML properties in output
Martin Smith [Tue, 15 May 2012 11:48:29 +0000 (13:48 +0200)]
qdoc: Don't include internal QML properties in output

QML properties marked internal were still appearing in the
the HTML output. Also, the title for QML type pages was not
correct in the help project writer.

Change-Id: Icaad7cefce77a4af70796bc185c99a3035fb17c8
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoQDoc: Use capitalized navtitles in ditamap.
Casper van Donderen [Mon, 14 May 2012 10:15:04 +0000 (12:15 +0200)]
QDoc: Use capitalized navtitles in ditamap.

The auto-generated ditamap used titles like "articles", this now becomes
"Articles".

Change-Id: I32fa6353443aaa66cbfc2b2fea1fea26e3e33684
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoqdoc: Fixed some terminology output by qdoc
Martin Smith [Mon, 14 May 2012 08:08:13 +0000 (10:08 +0200)]
qdoc: Fixed some terminology output by qdoc

There were still a few places where qdoc
generated "element" instead of "type" or
"class" instead of "type." These have been
fixed.

Change-Id: Id75156810212edb468198b6f269e3a91c55ac22c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix include path to fb_base.pri
Girish Ramakrishnan [Sun, 13 May 2012 04:14:17 +0000 (21:14 -0700)]
Fix include path to fb_base.pri

Also fixes a typo in fb_base.pri.

Change-Id: I4fae156640325a7a2894ea0d1fbe96936f190bdb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix QPA files inclusion headers
Girish Ramakrishnan [Mon, 14 May 2012 18:36:08 +0000 (11:36 -0700)]
Fix QPA files inclusion headers

find . -name "*.h" | xargs sed "s/^#\(.*\)_QPA_H/#\1_H/" -i

Change-Id: Ifa96f8cfcb67070a961c7e5f05719b82653a1174
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>