profile/ivi/qtbase.git
12 years agoTest posted events in tst_QEventDispatcher with various flags
Bradley T. Hughes [Mon, 6 Feb 2012 15:09:18 +0000 (16:09 +0100)]
Test posted events in tst_QEventDispatcher with various flags

Add QEventLoop::ProcessEventsFlags test data for
tst_QEventDispatcher::sendPostedEvents() to test that posted events are
sent when waiting for events and when not waiting.

Change-Id: I99f9eb121d0b1ded725e19c5233922fc0a6b81e4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoRun tst_QEventDispatcher with the GUI event dispatchers as well
Bradley T. Hughes [Mon, 23 Jan 2012 07:52:13 +0000 (08:52 +0100)]
Run tst_QEventDispatcher with the GUI event dispatchers as well

Since some GUI event dispatchers are complete reimplementations and do
not build on the corelib ones, we want to run the same tests with the
other dispatcher.

Since this is a GUI test now, we need to make sure to drain system
events queued during application startup to make sure we can reliably
run the test functions.

Change-Id: I4905db70bc8f8584c4ef1f4d767824040281452c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoAdd tst_QEventDispatcher to tests/auto/corelib/kernel
Bradley T. Hughes [Mon, 23 Jan 2012 06:49:04 +0000 (07:49 +0100)]
Add tst_QEventDispatcher to tests/auto/corelib/kernel

This will test the event dispatcher in corelib for proper timer and
posted event handling. The test makes sure all of the necessary virtual
functions are implemented and working as expected.

This test doesn't test socket notifiers or Win32 event notifiers, as
these are already covered in existing tests.

Change-Id: I5540ffc4e6d7f97bcd6c3725d7e74c0ab9c97015
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoMove all usages of Relation enum values to QAccessible::relations()
Jan-Arve Saether [Thu, 9 Feb 2012 10:20:34 +0000 (11:20 +0100)]
Move all usages of Relation enum values to QAccessible::relations()

Next step is to remove navigate(), but that has to be done in
qtdeclarative first.

Change-Id: I01ea1386c092446be04cc19d0f70adf53f094adc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoForce -fPIE on ELF if Qt is built with reduced relocations
Olivier Goffart [Sun, 29 Jan 2012 12:54:19 +0000 (13:54 +0100)]
Force -fPIE on ELF if Qt is built with reduced relocations

Put in qconfig.h whether qt is compiled with reduced relocations.

When using -Bsymbolic-functions (enabled by default on Qt)
but not -fPIE, the comparison of the function pointers fail
because the addresses are different in Qt, and in the executable.

Hence we now enable -fPIE by default on qmake, and force a compilation
error when it is not enabled and built with reduced relocations.

Done-with: Sune Vuorela <sune@vuorela.dk>
Change-Id: Ib3fdba06fab6e8a93b75b4c6cf16cc973ab335db
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoHandle TouchCancel in gui and widgets
Laszlo Agocs [Thu, 9 Feb 2012 12:39:40 +0000 (14:39 +0200)]
Handle TouchCancel in gui and widgets

Change-Id: I31739840348d88ae408ac1aae2399f6328ccdd43
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoEscape Dependencies of precompiled header right.
Andreas Holzammer [Fri, 10 Feb 2012 09:37:07 +0000 (10:37 +0100)]
Escape Dependencies of precompiled header right.

Change-Id: I847c85250b78a934bd29e09250d209d9ef412f7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove no longer needed ifdef Q_OS_WINCE.
Andreas Holzammer [Thu, 9 Feb 2012 16:43:42 +0000 (17:43 +0100)]
Remove no longer needed ifdef Q_OS_WINCE.

There is now an implementation to qt_pixmapFromWinHICON.
So use it for Windows CE too.

Change-Id: Ie2f3cacd4be9209e33d49e53703c5abc95d98d09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAdd qt_pixmapFromWinHICON again for Windows CE.
Andreas Holzammer [Thu, 9 Feb 2012 16:39:31 +0000 (17:39 +0100)]
Add qt_pixmapFromWinHICON again for Windows CE.

qt_pixmapFromWinHICON is used by qfileiconprovider
and qwindowsstyle. So use this one from Qt 4.8.
Also put functions of qguifunctions_wince in here,
because this was splitted.

Change-Id: I00ffb9d66a84884f7338648982e516ca016b9bd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoClean up qguifunctions_wince includes.
Andreas Holzammer [Thu, 9 Feb 2012 16:31:21 +0000 (17:31 +0100)]
Clean up qguifunctions_wince includes.

There are leftovers from Qt 4.8 in regards of the
qguifunctions_wince. The parts which where needed
in widgets have been taken over into qwidgetsfunctions_wince.

Change-Id: I737684a7f56ba356df89c1be77ab776bca034ae9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove SVG specific tests and testdata from QIcon.
Toby Tomkins [Tue, 7 Feb 2012 04:08:53 +0000 (14:08 +1000)]
Remove SVG specific tests and testdata from QIcon.

SVG support is now handled in QtSvg. Previously this test code would
normally be skipped when testing qtbase. This code is only executed
when testing qt5 with QtSvg enabled. This code will be moved to QtSvg.

Task-number: QTBUG-22360

Change-Id: I7372012469f9c0f9b7d3851a0ae696f8f935ba10
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd support for xlib backend X Event filters
John Stanley [Tue, 7 Feb 2012 08:59:40 +0000 (03:59 -0500)]
Add support for xlib backend X Event filters

Change-Id: Id1e7995f98395de748ce47a27365e4bdd564ea49
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoFixed qlibrary unittest to work on mac
Kurt Korbatits [Thu, 9 Feb 2012 02:55:30 +0000 (12:55 +1000)]
Fixed qlibrary unittest to work on mac

- Changed unload_after_implicit_load() to use full path
- Turned off app_bundle

Change-Id: Ibdf3ae0dc833d97eba64298715eb88c70408fff6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoFixed qsharedpointer unittest to run from installation directory
Kurt Korbatits [Thu, 9 Feb 2012 01:51:44 +0000 (11:51 +1000)]
Fixed qsharedpointer unittest to run from installation directory

- Only run invalidConstructs() tests if not cross compiled

Change-Id: If99fccdf9bca339507ca60c49aa89dc35c535d3d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd socketOptions flags to QLocalServer
Andrew Stanley-Jones [Mon, 6 Feb 2012 17:36:06 +0000 (18:36 +0100)]
Add socketOptions flags to QLocalServer

QLocalServer had no way to set socket options
that more complicated servers require. The
first set of options allow setting of access
control on the sockets.

Change-Id: If4268c66462fc2e6cf1e70b1d5f56c76d2c69228
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
12 years agoUpdate docs for QAccessibleEvent.
Frederik Gladhorn [Thu, 9 Feb 2012 10:21:18 +0000 (11:21 +0100)]
Update docs for QAccessibleEvent.

This class completely changed,
the old docs were still around.

Change-Id: Ice7b106b33ffc60f45f7af1b4f44dc01462ee0da
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoImprovement to font database cleanup
jian liang [Sat, 4 Feb 2012 11:53:54 +0000 (19:53 +0800)]
Improvement to font database cleanup

This patch do the following things:

1) Call QFontDatabasePrivate::free() to clean up font database before
destroying the platform integration object. This is to prevent object leak
which is allocated by platform plugin.

2) Allocate FontFile structure for each font registered in windows
platform to prevent double free of FontFile structure.

3) qt_registerFont() will release the old handle of the registered font
and replace it with the new handle. This is to prevent FontFont structure
leak.

Change-Id: Ib5ca20c695e1e365689fd8554f7caff6ee77a0b1
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agomake locateSyncProfile() a "tad" less convoluted
Oswald Buddenhagen [Mon, 23 Jan 2012 14:04:53 +0000 (15:04 +0100)]
make locateSyncProfile() a "tad" less convoluted

Change-Id: I261b6c6b42bed576edb8a1d8420da19d34bd87a1
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoCompile fix QWindowsMobileStyle
Andreas Holzammer [Thu, 9 Feb 2012 07:41:25 +0000 (08:41 +0100)]
Compile fix QWindowsMobileStyle

Change-Id: Idb3f8b3cb19b0ed1f49245fa7e43f26f6faa174d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQHeaderView - minor bug in visualIndexAt
Thorbjørn Lund Martsum [Fri, 3 Feb 2012 19:02:46 +0000 (20:02 +0100)]
QHeaderView - minor bug in visualIndexAt

This fixes a minor bug in VisualIndex triggered when calling
resizeSection with size 0 (but not hideSection).

It is mostly cosmetics - however hopefully there will soon
be a minor refactoring and there is really no need to make
strange code to keep a semantic bug.

However it is also doubtful to make a semantic change
while refactoring.

Change-Id: Ide153e421fd7a634062cb74867f4a49da4bf9cd6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoDont build printer support for Windows CE.
Andreas Holzammer [Tue, 7 Feb 2012 09:07:48 +0000 (10:07 +0100)]
Dont build printer support for Windows CE.

Windows CE has no printing support, so we
can disable this.

Change-Id: I0ec83dff2d045de56d613cd676e9eb290145bf41
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agocompile without rtti
Oswald Buddenhagen [Thu, 9 Feb 2012 17:47:37 +0000 (18:47 +0100)]
compile without rtti

no point in it

Change-Id: Id6ad95c197095131c6c100afe37b3d48adb157d1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove pointless include paths
Oswald Buddenhagen [Thu, 9 Feb 2012 17:43:14 +0000 (18:43 +0100)]
remove pointless include paths

we rely on a syncqt'd tree anyway

Change-Id: I23b288b98a5e9289993b058f7dce02e19564c67a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoproperly enable stl via qmake instead of hacking compiler flags
Oswald Buddenhagen [Thu, 9 Feb 2012 17:41:21 +0000 (18:41 +0100)]
properly enable stl via qmake instead of hacking compiler flags

Change-Id: I2c037c9a28043afe53167a766bce7c9d09b8f3a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agobuild with QT_NO_GEOM_VARIANT
Oswald Buddenhagen [Thu, 9 Feb 2012 17:40:26 +0000 (18:40 +0100)]
build with QT_NO_GEOM_VARIANT

saves us some pointless code

Change-Id: I24e4fe4107f44ab579c0f951551c4138713a749f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoadd missing errno.h include
Oswald Buddenhagen [Wed, 8 Feb 2012 09:55:49 +0000 (10:55 +0100)]
add missing errno.h include

it was masked by the precompiled header

Change-Id: I9ba7b0faa716cfa6844b9a9f81fa2a3aa67f5da4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove bizarre magic from precompiled header
Oswald Buddenhagen [Wed, 8 Feb 2012 09:21:28 +0000 (10:21 +0100)]
remove bizarre magic from precompiled header

it doesn't serve any puropse (any more?) and it breaks the mingw build.

Change-Id: I02a5e7502586e7e9f5956991498ff602eff66e81
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoconsolidate Read* options
Oswald Buddenhagen [Mon, 30 Jan 2012 14:29:56 +0000 (15:29 +0100)]
consolidate Read* options

this brings some clarity which combinations are actually possible, which
allows for some optimization later on.

Change-Id: I930027e426c5f9abea8d21eb1ebaa39bd29787b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoIntroduce QScreen::grabWindow(), deprecate QPixmap::grabWindow().
Friedemann Kleint [Thu, 9 Feb 2012 12:46:28 +0000 (13:46 +0100)]
Introduce QScreen::grabWindow(), deprecate QPixmap::grabWindow().

WId can be local to a screen.

Change-Id: I09ca71313836a34dbf33289b254c80207a956bb1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAllow customization of qDebug output at runtime
Kai Koehne [Fri, 3 Feb 2012 08:35:22 +0000 (09:35 +0100)]
Allow customization of qDebug output at runtime

Check the QT_OUTPUT_PATTERN environment variable in the default
message handler to customize the output of messages. Following
place holders are right now supported:
 %{message}, %{type}, %{file}, %{line}, %{function}

The original cleanupFuncinfo was written by Thiago Macieira.

Change-Id: I6ad25baaa0e6a1c9f886105d2a93ef3310e512a9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoInitializes seqDumpPos on qiodevice.cpp
Nick Ratelle [Fri, 6 Jan 2012 17:19:27 +0000 (12:19 -0500)]
Initializes seqDumpPos on qiodevice.cpp

This was spotted by RIM static code checking team. seqDumpPos is a dummy
variable which is only used on sequential mode. It is used as a
simultaneous storage area of both pPos and pDevicePos when in sequential mode,
to keep both in sync. They just suggested that it would be a good practice to
initialize the variable, since it does not have any side effect, and there's
not much value on not doing it.

Change-Id: I8138729eb31df5779c91b368c2cfaecd39788f29
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
12 years agoAdd event type for TouchCancel.
Laszlo Agocs [Thu, 9 Feb 2012 10:25:46 +0000 (12:25 +0200)]
Add event type for TouchCancel.

Change-Id: Id8b68e5cb19a2a325139e3241647cc36581cf6f8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoPreserve weight and style request for multi font engines
Jiang Jiang [Wed, 8 Feb 2012 16:28:13 +0000 (17:28 +0100)]
Preserve weight and style request for multi font engines

So that fallback fonts can pickup the weight/style requested instead
of using the weight and style of the primary font.

Change-Id: Ia592e079cad61334f21e0453412b198a900bb6b6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoMake "nmake check" pass for corelib tests in Windows.
Miikka Heikkinen [Thu, 9 Feb 2012 09:31:01 +0000 (11:31 +0200)]
Make "nmake check" pass for corelib tests in Windows.

- Marked four tests insignificant due to failures, these need to be
  fixed later and then re-enabled:
  - tst_qfilesystemwatcher
  - tst_qsettings
  - tst_qlibrary
  - tst_qsharedpointer
- Skipped one invalid case (tst_QCoreApplication::argc())
- Ifdeffed around vsprintf issue in MSVC (tst_QByteArray::qvsnprintf())

Task-number: QTBUG-24157
Task-number: QTBUG-24146
Task-number: QTBUG-24128
Change-Id: I4db957a65fbf0093f5ae3dc1a04d792492818104
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoVarious documentation fixes ported from 4.8
Teemu Katajisto [Wed, 8 Feb 2012 11:42:41 +0000 (13:42 +0200)]
Various documentation fixes ported from 4.8

Selected documentation fixes for qtbase from 4.8 commit
40fb4750910e23d3e7128ca8e0f1c5920b05bd5a

Task-number: QTBUG-8625
Task-number: QTBUG-19808
Task-number: QTBUG-1231
Task-number: QTBUG-21073
Task-number: QTBUG-8939
Task-number: QTBUG-20399
Task-number: QTBUG-20944
Task-number: QTBUG-22095
Task-number: QTBUG-11278
Task-number: QTBUG-15653

Change-Id: Ia4f59fce7c85f04b6da953a3988f705d9d9a658a
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoTake into account shaping in findRealWindow
Albert Astals Cid [Tue, 7 Feb 2012 14:48:51 +0000 (15:48 +0100)]
Take into account shaping in findRealWindow

It can happen that there is a window covering all the screen but it is shaped
to only take part of the screen. If that happens, besides the condition of
   QRect(attr.x,attr.y,attr.width,attr.height).contains(pos)
we also need to query the server for its region rectangles and make
sure the cursor is inside one of those rectangles. If that does not happen
we have to return 0 so the hierarchical xcb_query_tree_children xcb_query_tree_childrenntinues

Change-Id: I67327672e3d854d064190b55a07bd56ade4dfddb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFixed tst_qfileinfo::group crash if getgrgid fails
Rohan McGovern [Wed, 8 Feb 2012 05:03:34 +0000 (15:03 +1000)]
Fixed tst_qfileinfo::group crash if getgrgid fails

QVERIFY2 and gracefully fail with an error message, rather than
crashing, if getgrgid() fails.

Change-Id: I82a7290f83208486577988cc831d5d3cba20f98e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoEliminate a warning
Jiang Jiang [Mon, 6 Feb 2012 12:05:21 +0000 (13:05 +0100)]
Eliminate a warning

Change-Id: I984821d90df272b85d02c6ee0db5a89174d80873
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoReplace Q_WS_WINCE against Q_OS_WINCE.
Andreas Holzammer [Thu, 9 Feb 2012 08:55:09 +0000 (09:55 +0100)]
Replace Q_WS_WINCE against Q_OS_WINCE.

Window system Macros where deprecated so use
Q_OS_WINCE for now. This code will need
some refactoring, but this is the first
step to it.

Change-Id: I5876b80ee45d4b38ac63fc7d51e775dc70bbd485
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFixed tst_qobject::property for clang
Rohan McGovern [Wed, 8 Feb 2012 06:56:38 +0000 (16:56 +1000)]
Fixed tst_qobject::property for clang

The test was failing at:

  QCOMPARE(property.userType(), qMetaTypeId<CustomType*>());

The CustomType* metatype was not registered before this part of the
test.

qMetaTypeId<T> will register the metatype for T before returning it if
it is not yet registered, while QMetaProperty::userType() returns 0 if
the metatype is not yet registered.  However, the order of evaluation of
these two expressions in the above statement is technically undefined.

Apparently, gcc evaluates the arguments in order from right to left,
allowing the test to pass, while clang evaluates the arguments in order
from left to right, causing the test to fail.

Change-Id: I5059556e860cec29b57c31e4e26f46cf9e6055da
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoQSqlTableModel::insertRecord(): clean up after failed setRecord()
Mark Brand [Tue, 7 Feb 2012 23:45:47 +0000 (00:45 +0100)]
QSqlTableModel::insertRecord(): clean up after failed setRecord()

Change-Id: Ic9f314144bd3ccf4b59b9cb3f0d79f8d6f97a824
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoRemove leftover show() prototype.
Andreas Holzammer [Wed, 8 Feb 2012 15:04:34 +0000 (16:04 +0100)]
Remove leftover show() prototype.

In Qt4.8 this was declared in qwidget_wince.cpp. It
was for auto maximizing. This would need to go
into lighthouse if needed. This fixes the Windows CE
compile.

Change-Id: I6fe8361f745e16d9e8053ab58eb76ead0b22d261
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQSqlTableModel::setRecord(): improve handling of field mapping
Mark Brand [Tue, 7 Feb 2012 23:16:46 +0000 (00:16 +0100)]
QSqlTableModel::setRecord(): improve handling of field mapping

-Only use fields where generated flag is set to true.

-Require all fields to map correctly. If fields don't map, that is a
sign of a programming or user error.

Change-Id: Ie8474393005de6c9926b4e46985d62b194eafde2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel::insertRecord(): correct documentation
Mark Brand [Tue, 7 Feb 2012 23:40:51 +0000 (00:40 +0100)]
QSqlTableModel::insertRecord(): correct documentation

Change-Id: I35680f842a650493cf530c0b74894e2b45aa3c6e
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoDon't link shell32 for Windows CE.
Andreas Holzammer [Wed, 8 Feb 2012 09:52:01 +0000 (10:52 +0100)]
Don't link shell32 for Windows CE.

Windows CE normally don't come with a shell32,
so its better to don't use it.

Change-Id: I7198b5fadb0dfe37d1321800371110b7b407f577
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFixed qstandardpaths unittest to handle being run as root
Kurt Korbatits [Thu, 9 Feb 2012 01:27:15 +0000 (11:27 +1000)]
Fixed qstandardpaths unittest to handle being run as root

- testCustomRuntimeDirectory test skips if run as root

Change-Id: Idcc2a1db5d8a96b2ec0248b8b1c392fffc0b2e11
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoFixed qdir unittest to handle being run as root
Kurt Korbatits [Thu, 9 Feb 2012 01:15:32 +0000 (11:15 +1000)]
Fixed qdir unittest to handle being run as root

- Added checks to see if running as root and skip as needed

Change-Id: I4f94d5bfe511c6dfda315854b7cd1f64efe6e4f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoFixed qfile unittest rename() failing as root
Kurt Korbatits [Thu, 9 Feb 2012 00:36:08 +0000 (10:36 +1000)]
Fixed qfile unittest rename() failing as root

When run as root was able to move file to /etc directory but was
expecting a failure.

Change-Id: Ic2ac5506253f2a3395ed56e88a856542bf82ad6d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoUpdate note about metatype fully defined requirement.
Stephen Kelly [Wed, 1 Feb 2012 11:58:31 +0000 (12:58 +0100)]
Update note about metatype fully defined requirement.

There is now public API to re-allow forward declared types
as metatypes.

Change-Id: I6c956ea2dc96f66eccfcfa81fcbb833b58b58d61
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
12 years agoMake selftest.pri more readable/maintainable.
Jason McDonald [Fri, 3 Feb 2012 05:56:26 +0000 (15:56 +1000)]
Make selftest.pri more readable/maintainable.

Change-Id: Ic5a74beebb718df4cce5a9b02cdfd6f6d4cec97d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove float selftest
Jason McDonald [Fri, 3 Feb 2012 05:43:28 +0000 (15:43 +1000)]
Improve float selftest

Correct a bug in the test and use unique names for data rows.  The bug
was that the test assumed that QCOMPARE for float values 100001 and
100002 would fail, but it actually succeeds.  QCOMPARE for floats uses
qFuzzyCompare(), which succeeds if the numbers differ by no more than
1/100,000th of the smaller value.  Thus QCOMPARE(100001, 100002) passes,
while QCOMPARE(99998, 99999) fails.

Change-Id: Ia35d3126c2e3ebe91d64daa309048514a365d9fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove unused test results from testlib selftests.
Jason McDonald [Fri, 3 Feb 2012 05:02:08 +0000 (15:02 +1000)]
Remove unused test results from testlib selftests.

Some of the subtests are only run with plain-text output format.  For
those subtests, the other output formats were unused and gradually
becoming out-of-date.

Change-Id: I4c10f7f5bab2d2cc7d2d2ad641fbf5d4df02b798
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd data tag names to datetime selftest.
Jason McDonald [Fri, 3 Feb 2012 03:03:10 +0000 (13:03 +1000)]
Add data tag names to datetime selftest.

Change-Id: I73a0faab06df99521a48f106d93dd7b9a620148d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Add selftests for skip and fail inside cleanupTestCase().
Jason McDonald [Fri, 3 Feb 2012 00:22:13 +0000 (10:22 +1000)]
testlib: Add selftests for skip and fail inside cleanupTestCase().

Change-Id: I9bbe774c3259338d452cd1eb1a6f37a85db15921
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed tst_selftests on OSX 10.7
Rohan McGovern [Wed, 8 Feb 2012 04:06:18 +0000 (14:06 +1000)]
Fixed tst_selftests on OSX 10.7

Our OSX 10.7 test machines send a SIGILL rather than a SIGSEGV to a
process which attempts to dereference a null pointer.

Change the "crashes" test to dereference an invalid pointer with a
value slightly greater than 0 so that we get the same crash behavior on
all (unix) platforms.

Change-Id: I700a2c7d654a9468af5e5996010a258695ed2ae5
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAvoid advancing animations outside the animation "tick"
Gunnar Sletta [Wed, 8 Feb 2012 09:16:37 +0000 (10:16 +0100)]
Avoid advancing animations outside the animation "tick"

We have logic to prevent animations from starting in the middle of
an animation as a result of a previously slow frame. This was
based on current time, not the animation driver time and would
cause severe jumping when custom animation drivers were being used.

Also, this logic would trigger multiple animation runs per frame,
which is very bad for performance, so this change introduces a
threshold of 50ms to compensate for that. 50ms because that is
triplebuffer limit.

Change-Id: I1c7ebac30060e849d03c14d62411c2b953854d98
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoFix compile with QT_NO_OPENGL.
Andreas Holzammer [Wed, 8 Feb 2012 13:54:54 +0000 (14:54 +0100)]
Fix compile with QT_NO_OPENGL.

Change-Id: Icade54a6e3b43fdc9c151efbc25adcef6b7e41d6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoIntroduce Q_DECLARE_OPAQUE_POINTER
João Abecasis [Tue, 31 Jan 2012 16:35:00 +0000 (17:35 +0100)]
Introduce Q_DECLARE_OPAQUE_POINTER

To hide the IsPointerToTypeDerivedFromQObject monstruosity :-)

Documentation for Q_DECLARE_METATYPE and qRegisterMetaType was updated
to mention requirements on registered types and how they can be
circumvented for pointer types with the new macro.

Change-Id: If83b037a8e2f28761eb903525e87008107298801
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoBuild with QT_NO_CAST_FROM_BYTEARRAY
Stephen Kelly [Wed, 8 Feb 2012 00:35:19 +0000 (01:35 +0100)]
Build with QT_NO_CAST_FROM_BYTEARRAY

Change-Id: I9069b61c6247bdff323e2e5e93b70e42c3504201
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoFix compilation of Menubar for Windows CE.
Andreas Holzammer [Wed, 8 Feb 2012 10:06:21 +0000 (11:06 +0100)]
Fix compilation of Menubar for Windows CE.

Use QApplicationPrivate::getHWNDForWidget for getting
the HWND for Widgets. The Menubar needs refactoring,
but the API for native Menubars is not in place yet,
so fix it temporarily.

Change-Id: I090cca99d19aa881c2f41b54005a65f3ae67ae68
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAdd missing include of qdrawutil.h
Andreas Holzammer [Wed, 8 Feb 2012 10:14:22 +0000 (11:14 +0100)]
Add missing include of qdrawutil.h

Change-Id: Ifda1e3a0fbe1ee3431374722878d5cde86ef3916
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agorealpath(X,0) IS supported on QNX.
Nick Ratelle [Tue, 24 Jan 2012 22:26:13 +0000 (17:26 -0500)]
realpath(X,0) IS supported on QNX.

Adds check for Q_OS_QNX to force
QFileSystemEntry QFileSystemEngine::canonicalName() use realpath(X, 0) on QNX
as well.

Change-Id: Id0a32277e6d043753c42101c91a393ebedb48a0a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed CustomDashLine drawing bug.
Samuel Rødal [Mon, 6 Feb 2012 17:19:46 +0000 (18:19 +0100)]
Fixed CustomDashLine drawing bug.

The bug was caused by attempting to stroke an empty subpath. If there
have been no line-to's emitted we should not try to join the start and
end of that line segment.

Task-number: QTBUG-23248
Change-Id: I38b7e955ed6683f8fc25f9551e93b4f472c022bf
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
(cherry picked from commit 593947ba70188df3d33efe031fab2fd255faa8b9)

12 years agoUse qgetenv instead of getenv.
Andreas Holzammer [Wed, 8 Feb 2012 13:50:28 +0000 (14:50 +0100)]
Use qgetenv instead of getenv.

Use the Qt Version because platforms
like Windows CE don't support getenv.

Change-Id: I95ca4d7194e09889ab228af80e679a3c34479e41
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoTreat pointers to QObject derived types in QVariant specially.
Stephen Kelly [Fri, 30 Dec 2011 12:18:24 +0000 (13:18 +0100)]
Treat pointers to QObject derived types in QVariant specially.

It is possible to do this for example:

QVariant v = QVariant::fromValue<MyCustomQObject*>();
QObject *object = v.value<QObject*>();

This means that if a QVariant contains a pointer to a QObject
derived type, third parties can extract a QObject* and use its
properties without knowing the concrete type.

This is a source compatible change.

Change-Id: Iee9a9437e99cc2f40d1a4bfea47275482ef7161f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMac: Fix compilation with -qtnamespace
Kai Koehne [Wed, 8 Feb 2012 08:59:02 +0000 (09:59 +0100)]
Mac: Fix compilation with -qtnamespace

Change-Id: I85559b6698103eef865464a355d9b00012dcbd5f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQSqlTableModel::setRecord(): emit dataChanged() consistently
Mark Brand [Mon, 6 Feb 2012 15:05:53 +0000 (16:05 +0100)]
QSqlTableModel::setRecord(): emit dataChanged() consistently

Previously, if any fields in the supplied record could not be matched
with a column in the target table, dataChanged() was supressed for all
columns for OnManualSubmit. This is not good because it prevents other
views from noticing the fields that *do* change.

It's simplest and probably more efficient just to emit
dataChanged() once for the whole row. Fewer signals need to be
processed and in typical cases much or all of the row is likely to
be changed anyway.

Change-Id: Ib56bf9a18e51b9cb85771acefcb2bf26e295a54e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQSqlTableModel::setRecord(): do not try to detect value changes
Mark Brand [Mon, 6 Feb 2012 14:03:25 +0000 (15:03 +0100)]
QSqlTableModel::setRecord(): do not try to detect value changes

In an apparent attempt to be economical with emitting dataChanged()
and submitting SQL to the databse, setRecord() compares each field
value of the record with the old value, taking action only when
a difference is detected.  Several complaints against this code are:

-The comparision does not work on float type.

-It is really up to the application and database to decide this. The
model should make few assumptions. The application has the option to
omit fields from the record that should be ignored.

-The current behavior seems to assume that the "old" values are the
current state of the database, but the database may have changed since
the model was last refreshed.

-The code compares the value from record(), which probably
corresponds to the EditRole, with the DisplayRole value from data().

Change-Id: I11477c185eb411d442144dc682893d0df12d03d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQSqlTableModel::setData(): submit() instead of updateRowInTable()
Mark Brand [Wed, 8 Feb 2012 08:38:05 +0000 (09:38 +0100)]
QSqlTableModel::setData(): submit() instead of updateRowInTable()

Use submit() instead of calling updatRowInTable(). The effect is
exactly the same. Submit() invokes submitAll() which invokes
updateRowInTable(). The cache is purged and select() is called only
on success.

Change-Id: I3de9a3d6acf802ee6594d034a9e261e53637995d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQSqlTableModel::setData(): call dataChanged() before select()
Mark Brand [Wed, 8 Feb 2012 08:35:38 +0000 (09:35 +0100)]
QSqlTableModel::setData(): call dataChanged() before select()

Emit dataChanged() before a possible new select instead of after.
The select reinserts all the rows, emitting signals for that, so
there isn't any point to dataChanged() afterwards.

Change-Id: I698a0d385f97104891343d94cc27e4ecf3a7233c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQSqlTableModel: do not suppress dataChanged() on inserted record
Mark Brand [Mon, 6 Feb 2012 13:04:26 +0000 (14:04 +0100)]
QSqlTableModel: do not suppress dataChanged() on inserted record

Affects setData() and setRecord().

Previously dataChanged() was suppressed when editing an inserted
record, except for OnManualSubmit. The motivation was probably to
allow setData() to be used while handling primeInsert().

Suppressing dataChanged() is not a good idea since views other than
the one which made the change will not know of the change.

It is a terrible idea to call setData() or setRecord() while
handling primeInsert(), so this is now expressly forbidden.
setData() and setRecord() now do nothing and return false if called
while rows are being inserted.

Change-Id: I96738c09a6268704c5626d95b72bfb46378e3242
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQSqlTableModel::setRecord(): use submit for OnFieldChange
Mark Brand [Mon, 6 Feb 2012 22:58:40 +0000 (23:58 +0100)]
QSqlTableModel::setRecord(): use submit for OnFieldChange

submitAll() is supposed to be for OnManualSubmit.

Change-Id: Id0335fe731669bd24e1da72ab4724f88d6f1d905
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agofix msvc 2008 warning about downcasting to bool
Oswald Buddenhagen [Tue, 7 Feb 2012 18:05:27 +0000 (19:05 +0100)]
fix msvc 2008 warning about downcasting to bool

the compiler doesn't have static_assert yet, so we ran into the path
which was not fixed by 10229ae.

use !!() pattern instead of bool() cast, as the latter throws off macx
(see 95d7abb). the other alternative - a c-style cast - would cause
autotest failures (see 92464fa), and would be ugly anyway.

Change-Id: Idbe9a3b60e17ae1f566f938d9b9be04f0c977492
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoQTextEdit cursor position fix when moving left/right with selection
Pasi Matilainen [Mon, 16 Jan 2012 07:10:18 +0000 (09:10 +0200)]
QTextEdit cursor position fix when moving left/right with selection

When text has been selected in a QTextEdit and the left or right arrow
key is pressed, the cursor moves one character beyond the start or end
of the selection, when it shouldn't move past the selection. Fixed by
moving the cursor to the right place when a selection is active.

Task-number: QTBUG-22853
Change-Id: I9ea1863436db98627a6fd041ce554cf10be26493
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
(cherry picked from commit 1b031759ddfdab9703dfecac13f1ed318da3dafe)

12 years agoFix compilation with -Werror -Wshadow
David Faure [Tue, 7 Feb 2012 19:42:37 +0000 (20:42 +0100)]
Fix compilation with -Werror -Wshadow

Change-Id: I2ef8f288415820fa08e5bab8b99a00b1ad0f2988
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse Q_PROCESSOR_* when chosing an atomic implementation
Bradley T. Hughes [Sun, 5 Feb 2012 12:14:23 +0000 (13:14 +0100)]
Use Q_PROCESSOR_* when chosing an atomic implementation

Use the new Q_PROCESSOR_* macros to decide which headers to include in
the atomic implementation. This also removes qatomic_arm.h, which isn't
needed anymore, just select the correct qatomic_armv*.h from
qbasicatomic.h

Change-Id: I954848feafb8c420949d066ffcee1dd2b271e13b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd qprocessordetection.h
Bradley T. Hughes [Sun, 5 Feb 2012 12:10:55 +0000 (13:10 +0100)]
Add qprocessordetection.h

This detects the target processor based on preprocessor #defines,
setting Q_PROCESSOR_${FAMILY} accordingly. Optional
Q_PROCESSOR_${FAMILY}_${REVISION/VARIANT} #defines are also provided,
usually dependent on how the compiler is invoked.

Currently detected families (and variants) include:

ARM (v5, v6, and v7)
X86 (i386 and x86_64, as X86_32 and X86_64 respectively)
IA-64
MIPS (I, II, III, IV, 32, 64)

Other families that currently are not detected, but Qt has (or had)
support for include:

Alpha
AVR32
Blackfin
PA-RISC
PowerPC (optional 64-bit variant)
S390 (and S390X 64-bit variant)
SH (and SH-4A)
SPARC (SPARC V9)

Detection for these is currently commented out, and can
be easily enabled later.

Change-Id: I571f245c189b9d80c7c3a5369ac595a271f37c8b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix QProcess compile for Windows CE.
Andreas Holzammer [Wed, 8 Feb 2012 11:06:49 +0000 (12:06 +0100)]
Fix QProcess compile for Windows CE.

There are no Pipes under Windows CE,
so take out the pipereader.

Change-Id: I3e6afd403ed36e86a8694674f6c4798f1226ff74
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoDisable Assertion messagebox for unittests.
Andreas Holzammer [Tue, 7 Feb 2012 16:34:22 +0000 (17:34 +0100)]
Disable Assertion messagebox for unittests.

A messagebox will be shown for an assertion in
debug mode. This introduces a need for user
interaction to proceed the execution of the
unit test. Setting the Report mode to debug,
will only print the assertion to stderr.

Change-Id: If8ae80ea96d6608cba77b9c6ca176f97d1680932
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoFix qlocalsocket autotest
Harald Fernengel [Tue, 7 Feb 2012 08:55:01 +0000 (09:55 +0100)]
Fix qlocalsocket autotest

Lackey is currently not built due to a qscript dependency. Mark the
test as an expected failure, so we can resume testing QLocalSocket
again. See QTBUG-24142

Change-Id: I2642ed30cf7a2068f30f63801c632fea7dae7691
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
12 years agoFixed source composition with opacity in the raster paint engine.
Kim Motoyoshi Kalland [Mon, 6 Feb 2012 13:07:45 +0000 (14:07 +0100)]
Fixed source composition with opacity in the raster paint engine.

Task-number: QTBUG-24075

Change-Id: I2b9263364bf30fb8c914823e80e7ea4a8af26035
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoInitialize dynamic meta object extradata.
Andrew den Exter [Wed, 8 Feb 2012 05:13:22 +0000 (15:13 +1000)]
Initialize dynamic meta object extradata.

QMetaObject::invokeMethod attempts to deference the extradata for
meta objects versions 6 and greater which is causing a crash in some
of the qtquick1 tests.

Change-Id: If5b2ca83b15de2cd558976c6b681dd5457c404d1
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoFix position of a comment.
Jędrzej Nowacki [Mon, 6 Feb 2012 14:08:26 +0000 (15:08 +0100)]
Fix position of a comment.

The comment was wrongly placed. It describes v_cast function.

Change-Id: I2390e4bf1fc19136bbbecbae4be83d5320ca244f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoCode cleanup and micro optimizations in QMetaType.
Jędrzej Nowacki [Tue, 24 Jan 2012 15:06:27 +0000 (16:06 +0100)]
Code cleanup and micro optimizations in QMetaType.

Change-Id: I0fbd713fcdf094f9d13acee855b6dd6986695e0d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDon't include qguifunctions_wince.h in QtCore.
Andreas Holzammer [Mon, 6 Feb 2012 20:24:02 +0000 (21:24 +0100)]
Don't include qguifunctions_wince.h in QtCore.

qguifunctions_wince.h does not live anymore in
QtCore, but instead in QtGui, so do not include
them in QtCore.

Change-Id: I22222ae7045ee0140924197ac583a3bf2e0f3d36
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoMake copy and cut methods work in QAccessibleTextEdit
José Millán Soto [Tue, 7 Feb 2012 10:53:31 +0000 (11:53 +0100)]
Make copy and cut methods work in QAccessibleTextEdit

Correct the implementation of cutText and copyText in QAccessibleTextEdit so
they use cut() and copy() methods of QTextEdit

Cherry picked from Qt 4 - 36202cf8fca822492615d418bd563a40bee4af08

Change-Id: I86a531ed7059b1a928cb8515c2743d4d8b596b36
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFix qmake evaluation of QMAKE_TARGET.arch on msvc2010 x86_64
Giotis Nikos [Mon, 6 Feb 2012 23:32:44 +0000 (01:32 +0200)]
Fix qmake evaluation of QMAKE_TARGET.arch on msvc2010 x86_64

This change is needed because msvc2010 tools have a '\' character at
the end of environment variable VCINSTALLDIR. This variable on msvc2008
does not have this '\' character at its end. Without this change
QMAKE_TARGET.arch on msvc2010 x64 evaluates to x86 instead of x86_64.

Task-number: QTBUG-22686

Change-Id: Ifba833e9361c97568b8b3de9976023e8537b208a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoAdd configure, sync.profile, and header.* to OTHER_FILES in qtbase.pro
Bradley T. Hughes [Wed, 8 Feb 2012 06:36:42 +0000 (07:36 +0100)]
Add configure, sync.profile, and header.* to OTHER_FILES in qtbase.pro

This makes these files easily locatable when using Qt Creator.

Change-Id: Ie0c15ebf2cc7045954713265bf524f2ecf1eea34
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoAdd 'AllButtons' into Qt::MouseButton enum, for use by QML
Rick Stockton [Mon, 6 Feb 2012 16:38:38 +0000 (08:38 -0800)]
Add 'AllButtons' into Qt::MouseButton enum, for use by QML

This allows the QML programmer to set 'acceptedButtons', for a
MouseArea, to accept all buttons with a single value. In
comparison with OR'ing a long list of Qt::MouseButton values,
this is shorter, easier, more clear, and less error-prone.

Task-number: QTBUG-24106
Change-Id: I0259969223c0b44b6ce8ae84aed37d20cb77999b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoRebuild configure.exe.
Friedemann Kleint [Tue, 7 Feb 2012 16:16:55 +0000 (17:16 +0100)]
Rebuild configure.exe.

- Windows configure: make -mp affect the Qt build itself
- Change syncqt default parameters for shadow building
- Moving tiff image format support and libtiff out of qtbase
- Add concurrent to QT_CONFIG also on Windows
- QRegularExpression: configure support for PCRE
- Remove support for the MNG file format and the bundled libmng

Change-Id: I14232ed4bb6bd90bd1d77d657d426108b4a88f47
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix compilation with MinGW-w64
Jonathan Liu [Tue, 7 Feb 2012 08:25:51 +0000 (19:25 +1100)]
Fix compilation with MinGW-w64

Fix compilation with MinGW-w64 with the following changes:
- Include intrin.h to fix __cpuid not declared error
- Include intrin.h before *mmintrin.h headers to avoid extern linkable
  mismatch
- Use quintptr instead of unsigned long to handle LLP64
- Do not declare winuser.h structs already provided with MinGW-w64
- Work around IID_IShellItem being declared but not defined with
  MinGW-w64
- Remove incorrect use of SUCCEEDED macro on pointer

Change-Id: Ia21f8e3a1d225cf501e646eacd968bfc744ce0a2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix warnings in input contexts.
Friedemann Kleint [Tue, 7 Feb 2012 15:44:24 +0000 (16:44 +0100)]
Fix warnings in input contexts.

Change-Id: Idbd46b8bfe73015cce98d510992b3bb57c1e1ded
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoAdd the mkspecs dir to the include dirs.
Stephen Kelly [Tue, 7 Feb 2012 09:57:12 +0000 (10:57 +0100)]
Add the mkspecs dir to the include dirs.

Change-Id: If844785d7d3645c33e0fcb1206cc52f8ab644070
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agotestlib: Clear ignored messages after every data row
Jason McDonald [Wed, 1 Feb 2012 06:39:14 +0000 (16:39 +1000)]
testlib: Clear ignored messages after every data row

Previously, ignored messages were only cleared at the end of each test
function, i.e. after all data rows were finished. This meant that if a
data row in a data-driven test function didn't cause all of the expected
messages to be generated, the remaining messages would be carried over
to the next data row.  This would result in errors about missing
messages being associated with the last data row rather than with the
correct data row.

This commit makes testlib check for missing ignored messages after
running each data row rather than only doing so after the last data
row.

This commit also adds a regression test to demonstrate that ignored
messages can no longer be carried over from one data row to another.

Change-Id: Ibee51aa6e96866fbcbcb4acee1a8340a86a6a4ba
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Clear expected failures after every data row.
Jason McDonald [Wed, 1 Feb 2012 05:42:00 +0000 (15:42 +1000)]
testlib: Clear expected failures after every data row.

Previously, expected failures were only cleared at the end of each test
function, i.e. after all data rows were finished.  This meant that if a
data-driven test function called QEXPECT_FAIL and then didn't perform
any further verification steps to trigger the expected failure, the
expected failure would be carried over to the next data row, probably
causing the first verification step in the test function to XPASS (with
a seemingly irrelevant error message) for the next data row.

This commit adds the new function QTestResult::finishedCurrentTestData()
to cleanup after each data row is executed.  This function treats calls
to QEXPECT_FAIL without subsequent verification steps as a test failure.

This commit also adds a regression test to demonstrate that expected
failures can no longer be carried over from one data row to another. If
run against the previous version of testlib, the new test would report a
pass instead of an error.

Change-Id: Ida5c7f080815b0dca9531131fed582b0918334cb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoReorganize evdev plugins
Laszlo Agocs [Sun, 5 Feb 2012 11:32:40 +0000 (13:32 +0200)]
Reorganize evdev plugins

linuxinput becomes evdevmouse. The experimental touch code is removed,
now the plugin's purpose is solely to generate mouse events from
absolute and relative pointer events.  The plugin key is EvdevMouse.

touchscreen becomes evdevtouch. The plugin key is EvdevTouch.

In case keyboard support appears some day, it will fit nicely in the
system by the name of evdevkeyboard or similar.

Some little udev code is moved to platformsupport so it can be shared
between the plugins. This may be extended later if more sophisticated
udev support is needed. N.B. the intention is to keep this as simple
as possible. We are shipping these plug-ins as reference examples, not
as full-featured drivers.

evdev and udev support has configure time tests from now on. This
means the "drivers" (generic plugins) will get built automatically
when the support is available.

Change-Id: Iaf6260b5c2edfb9f25d070d2764466725adc6b4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDo not check isActiveWindow in QAccessibleWidget::state
José Millán Soto [Wed, 18 Jan 2012 17:23:43 +0000 (18:23 +0100)]
Do not check isActiveWindow in QAccessibleWidget::state

QWidget::isActiveWindow() was being checked in QAccessibleWidget::state
to determine if a widget is focusable. As a result, focusable widgets
were reported to be not focusable when the window was not active.

Change-Id: I73c47181ed132a84f0251cb67d0e20912e29a1a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoImproved stability of tst_qsemaphore (especially on mac)
Rohan McGovern [Mon, 6 Feb 2012 04:17:08 +0000 (14:17 +1000)]
Improved stability of tst_qsemaphore (especially on mac)

Timers are not entirely precise; if we ask for a timeout of
10000 milliseconds, we might time out in 9999 instead.
Also, we know the expected elapsed time in each case, so do a fuzzy
comparison against that time.

Previously the test was verifying that the elapsed time was greater than
or equal to the timeout in the case where a timeout was expected, which
means the test would not detect bugs which incorrectly caused the
timeout to occur later than it should.

(cherry picked from qt4 commit 9a2573dc13b3e8df6cd15bef64370ea407480fc7)

Change-Id: I91d0c81f989ab43a3c48f6abbb4c5b28e2b35402
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoImproved stability of tst_qhttpsocketengine
Rohan McGovern [Wed, 8 Feb 2012 00:59:38 +0000 (10:59 +1000)]
Improved stability of tst_qhttpsocketengine

This autotest assumed that various network operations could always be
completed within 5 seconds.  Notably, it assumed that an attempt to
resolve a nonexistent hostname would always result in an error within
5 seconds.  In my testing, it usually takes 4-6 seconds to complete,
but occasionally takes as much as 13 seconds.

(cherry picked from qt4 commit c85faef67b6a7e8fcedb4ce800282d41f5b79ec1)

Change-Id: I982ecf6ebc1bb8ee2184cf5592cb2684474c870b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQSqlTableModel::removeRows(): require valid full range of rows
Mark Brand [Mon, 6 Feb 2012 16:19:19 +0000 (17:19 +0100)]
QSqlTableModel::removeRows(): require valid full range of rows

If an invalid range of rows is specified, it's likely to be a
programming or user error. The old behavior of ignoring out of range
rows seems dangerous and complicates the code.

Also implement the documented behavior of returning false if
changes are unsuccessful for OnFieldChange and OnRowChange.
Previously the return value of submit() was ignored.

Updated and improved documentation.

Change-Id: Iaaf51c6d9a0c8c06fd5d186b4b88358fbeab9936
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>