profile/ivi/qtbase.git
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>
12 years agoQSqlTableModel::removeRows(): don't emit extra beforeDelete
Mark Brand [Mon, 6 Feb 2012 16:02:32 +0000 (17:02 +0100)]
QSqlTableModel::removeRows(): don't emit extra beforeDelete

Qt 5 seems like a welcome opportunity to stop emitting this
spurious beforeDelete signal.

Change-Id: Ib8628343ca9b8fdd85c154a206c7e2bf2c4c9dc1
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoDon't allow cd'ing to above root.
Jonas Gastal [Mon, 30 Jan 2012 00:57:56 +0000 (22:57 -0200)]
Don't allow cd'ing to above root.

Task-number: QTBUG-23893
Change-Id: Ifc6e22f135a1f6bff7c0fa8bef3ea7e1042ae819
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
12 years agoQSqlTableModelPrivate::ModifiedRow guard private data
Mark Brand [Mon, 11 Jul 2011 12:41:00 +0000 (14:41 +0200)]
QSqlTableModelPrivate::ModifiedRow guard private data

Even though ModifiedRow is not part of the public API, guarding its
data helps make clear the intended patterns of use.

"op" and "primaryValues" are read-only after construction.

setValue() encourages maintainers to let ModifiedRow manage the
"generated" flags of the record.

The primeInsert() signal still exposes the actual record, including
the "generated" flags, which is the justification for recRef().

Change-Id: I16d1610a8f9233af78b90662b08706b48ea19c41
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModelPrivate: deduplicate field stripping logic
Mark Brand [Mon, 6 Feb 2012 22:41:27 +0000 (23:41 +0100)]
QSqlTableModelPrivate: deduplicate field stripping logic

Change-Id: Ic969a192644e84d78558da0f19e588033e4af43d
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoFix src/concurrent/concurrent.pro
Bradley T. Hughes [Tue, 7 Feb 2012 07:08:04 +0000 (08:08 +0100)]
Fix src/concurrent/concurrent.pro

First, heed the warning from qmake and add load(qt_module) to the
top of src/concurrent/concurrent.pro

Second, qtconcurrentversion.h is in src/concurrent, not src/xml

Change-Id: If4fc55ac2fe21c093023b377195ed82a54d8c963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoUse Q_OS_WINCE instead of Q_WS_WINCE
Andreas Holzammer [Tue, 7 Feb 2012 13:23:50 +0000 (14:23 +0100)]
Use Q_OS_WINCE instead of Q_WS_WINCE

Window system defines have been deprecated,
so use Q_OS_WINCE instead.

Change-Id: I52059d0f854fe783ac20610ab248800c3e1e827c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix compilation with QT_NO_PRINTER.
Andreas Holzammer [Tue, 7 Feb 2012 09:19:43 +0000 (10:19 +0100)]
Fix compilation with QT_NO_PRINTER.

Change-Id: Iacfa47b8d384461ce08202a9a8e1642288cbe1e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoChange WId to be a quintptr.
Jonathan Liu [Tue, 7 Feb 2012 12:12:36 +0000 (23:12 +1100)]
Change WId to be a quintptr.

Fix compilation with MinGW-w64: Use quintptr instead of
unsigned long as WId needs to be able to cast to
HWND which is a 64-bit pointer on Windows 64-bit.

Acked-by: Samuel Rødal <samuel.rodal@nokia.com>
Change-Id: I7bbe83ce02b739eb04218ca4b6b478509347d515
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix include of resource file.
Andreas Holzammer [Tue, 7 Feb 2012 12:44:09 +0000 (13:44 +0100)]
Fix include of resource file.

The file was moved, but got never renamed.

Change-Id: I4f13d87976cf35a1e14b9a8c178050332f45b7ee
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix compiler warnings in accessible code.
Friedemann Kleint [Tue, 7 Feb 2012 15:35:53 +0000 (16:35 +0100)]
Fix compiler warnings in accessible code.

- Add missing return value.
- Remove unused static functions.

Change-Id: I0271cacc2a01b33209c4d9d2d958ad89924f8951
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFix QFile autotest not to require elevated privilege to pass
Shane Kearns [Wed, 1 Feb 2012 13:57:24 +0000 (13:57 +0000)]
Fix QFile autotest not to require elevated privilege to pass

The open test case tests opening a device path on windows.
As this requires privilege elevation, the test fails when running
nmake check from a console.
As the CI machines appear to run tests with admin privileges, first
check opening the device using the windows API. If that succeeds, then
opening using QFile should succeed. If that fails, the opening using
QFile should fail.
(Since Windows vista, members of the "administrators" group do not run
at elevated privilege all the time. The user needs to opt in via a
UAC prompt or "run as administrator". This is similar to using the
sudo command on unix)

Ran the test as administrator and normally. Now passes in both cases.

Change-Id: Ibd7682eceb61e35d4912fa0392df536f4331f6ed
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoAdd missing subdirectory test.
Stephen Kelly [Tue, 7 Feb 2012 09:56:38 +0000 (10:56 +0100)]
Add missing subdirectory test.

Change-Id: If59f124ce8be520c8c8692ac4f1400552749557b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoAdd special casing for static modules.
Stephen Kelly [Thu, 2 Feb 2012 21:40:30 +0000 (22:40 +0100)]
Add special casing for static modules.

QtUITools is a static library, so we need to mark that in its
CMakeConfig.cmake file.

Change-Id: I4e3684f7c62f4af28956a6e8f58edce7724f50dd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFixed jagged lines when drawing scaled image with raster engine.
Kim Motoyoshi Kalland [Tue, 7 Feb 2012 12:52:41 +0000 (13:52 +0100)]
Fixed jagged lines when drawing scaled image with raster engine.

Task-number: QTBUG-24055

Change-Id: I97a0bf3711e1b4423e2c76ec907c9e2a57522ff9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemoved image format specific template functions in raster engine.
Kim Motoyoshi Kalland [Fri, 13 Jan 2012 11:07:11 +0000 (12:07 +0100)]
Removed image format specific template functions in raster engine.

Simplified the raster engine by treating image formats in a more
generic way and removed some unused code.

Change-Id: Ib3979a1a6e3e6f17c5002248545779ec36fff7c9
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoUse the QNX implementation of mkdtemp for win and wince.
Andreas Holzammer [Mon, 6 Feb 2012 17:36:32 +0000 (18:36 +0100)]
Use the QNX implementation of mkdtemp for win and wince.

There is no mktemp for Windows CE, nor mkdtemp. So use the
implementation for QNX for Windows CE too, to simplify
the implementation use it for windows too.

Change-Id: Icddaf474a2d696752d8f9774fb4f033454e34e83
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agofix memory leak of QLibraryPrivate
jian liang [Sun, 22 Jan 2012 14:38:49 +0000 (22:38 +0800)]
fix memory leak of QLibraryPrivate

this commit is aimed to fix QTBUG-4341. now QFactoryLoaderPrivate's
destructor will call unload() to QLibaryPrivate object which will destory
the plugin's root instance if its refcount reach zero.

Task-number: QTBUG-4341
Change-Id: I3cd3e071b34271bf5802ab09f6c125beda5e9844
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoEnsure that posted events are sent by Q*Application::processEvents()
Bradley T. Hughes [Mon, 6 Feb 2012 15:13:45 +0000 (16:13 +0100)]
Ensure that posted events are sent by Q*Application::processEvents()

Commit b7ca6a81dbf6a2b96c8f04b856372050618e60c0 removed a call to
sendPostedEvents() that deemed unnecessary. Unfortunately, it is
necessary, as shown by the
tst_QScriptEngine::processEventsWhileRunning() test in the QtScript
module. Re-add the call, but only when not waiting for more events.

Change-Id: I648d66dd3ba484ad9e9a93fc03a9792cca5035c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoCodeCoverage: Save coverage data in QTestLog::stopLogging()
Caroline Chao [Mon, 23 Jan 2012 11:55:21 +0000 (12:55 +0100)]
CodeCoverage: Save coverage data in QTestLog::stopLogging()

Currently when tests are crashing, aborting or hanging, their status are
reported with a status "Unknown" because SaveCoverageTool is never called
for them. The status of the test given by the coverage tool should be the
same as the one reported in the log output when the test is run. This change
will allow more accuracy in the status reported.

Add QTestResult::setCurrentAppname and QTestResult::currentAppname.
To retrieve the name of the current application running.

Task-number: QTQAINFRA-460

Change-Id: Icc476dc2d6cb28185e5447f1e79da6a8a31cad54
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCompile with -no-freetype.
Friedemann Kleint [Tue, 7 Feb 2012 08:10:51 +0000 (09:10 +0100)]
Compile with -no-freetype.

Fix breakage introduced by
3f75fb8d8f25af5b79b71ae74f453a2b220a11ce.

Task-number: QTBUG-24091
Change-Id: I322bbab382a5e375dccd4273c70a0ed8b525d125
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoDetect incompatibilities in repeated type registration
João Abecasis [Mon, 30 Jan 2012 13:50:04 +0000 (14:50 +0100)]
Detect incompatibilities in repeated type registration

QMetaType used to register a typeName and factory functions for
creation/destruction of objects. While it would be possible for a single
type name to be registered matching different actual types and memory
layouts, there was little that could be done about it.

Now that QMetaType is tracking type information with a direct impact on
data layout and ABI (size and type flags) it is important that we check
and detect binary incompatibilities as early as possible.

[Such incompatibilities could arise from type name re-use (technically,
ODR violations) or, more commonly, as version mismatch between different
shared libraries or plugins.]

Only type size and flags are checked as function pointers to inline and
template or otherwise non-exported functions could trivially differ
across translation units and shared libraries.

When registering typedef types, a check is made to ensure the same name
doesn't get registered as different types.

Change-Id: I8211c3de75d4854ce8fafdb620d3a931c206e0c3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoRemove QMetaType::unregisterType().
Jędrzej Nowacki [Fri, 3 Feb 2012 11:54:25 +0000 (12:54 +0100)]
Remove QMetaType::unregisterType().

The function hasn't been working properly. It was not well tested, for
example it is undefined how QVariant should behave if it contains an
instance of an unregistered type.

Concept of unregistering types was inspired by plug-in system, but in
most supported platforms we do not unload plug-ins.

Idea of type unregistering may block optimizations in meta object
system, because it would be not possible to cache a type id.
QMetaType::type() could return different ids for the same name.

Currently QMetaType::unregisterType() is not used in Qt.

Change-Id: I878b6e8d91de99f9bcefeab73af2e2ba0bd0cba0
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoAlign QVariant::UserType and QMetaType::User
Jędrzej Nowacki [Mon, 30 Jan 2012 11:21:43 +0000 (12:21 +0100)]
Align QVariant::UserType and QMetaType::User

There is no point in keeping separate values which should mean the
same.

QVariant::UserType was used also to construct a valid, null QVariant,
containing an instance of unknown custom type. The concept was strange
and useless as there was no operation that could be done on such
QVariant. Therefore it was dropped.

Please note that the patch slightly changes behavior of different
functions accepting a type id as parameter. Before QVariant::UserType
was an invalid type from QMetaType perspective (id 127 was not assigned
to any built-in type), but QMetaType::User points to the first registered
custom type.

Change-Id: I5c7d541a9affdcdacf53a4eda2272bdafaa87b71
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agotst_qnetworkreply: remove no such signal warnings
Martin Petersson [Mon, 6 Feb 2012 14:42:19 +0000 (15:42 +0100)]
tst_qnetworkreply: remove no such signal warnings

The QNetworkReply finished signal does not have a bool parameter.

Change-Id: I87bd0410545f7a2fc2ab63cca90548f0585bf7a0
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
12 years agoFix error in qgraphicsanchorlayout1 autotest.
Jason McDonald [Tue, 7 Feb 2012 04:09:10 +0000 (14:09 +1000)]
Fix error in qgraphicsanchorlayout1 autotest.

QTest::ignoreMessage() cannot be called when creating test data rows,
but rather must be called when executing a row.

Change-Id: Ic958c4e5c15dd53a48479099b6b07803af6cb789
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix error in qcssparser autotest.
Jason McDonald [Tue, 7 Feb 2012 04:16:21 +0000 (14:16 +1000)]
Fix error in qcssparser autotest.

QTest::ignoreMessage() cannot be called when creating test data rows,
but rather must be called when executing a row.

Change-Id: Ifceaff4c5a7f1b6408ec57196298e3f3038910c9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake syncqt ignore qsystemdetection.h and qcompilerdetection.h
Bradley T. Hughes [Mon, 6 Feb 2012 15:31:52 +0000 (16:31 +0100)]
Make syncqt ignore qsystemdetection.h and qcompilerdetection.h

Remove the #if 0'd blocks and instead add these headers to
sync.profile's @ignore_for_include_check, as documented at

http://wiki.qt-project.org/Creating_a_new_module_or_tool_for_Qt#other_fields

Change-Id: I3bd6e8cb21eca139fdca10fe970eeaf2e4e77c24
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoCompile MSVC2008
Jan-Arve Saether [Mon, 6 Feb 2012 10:07:56 +0000 (11:07 +0100)]
Compile MSVC2008

Change-Id: Ie89ec4095e8865dbc4781bff0db70f35d239664e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFixed typo in QOpenGLContext warning message.
Samuel Rødal [Mon, 6 Feb 2012 15:43:39 +0000 (16:43 +0100)]
Fixed typo in QOpenGLContext warning message.

Change-Id: I967279f4b4875ae80ce45744d559fc7380bc0125
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoDestroy the QWindow children in destroy() instead of close()
Laszlo Agocs [Mon, 6 Feb 2012 14:58:15 +0000 (16:58 +0200)]
Destroy the QWindow children in destroy() instead of close()

When closing a window, destroy() ensures a setVisible(false) call only
for the window itself, not for other windows parented to it. With the
new quit lock ref feature this breaks code that creates a fake root
window parented to the main, visible window. (for example the
xcomposite backends of qtwayland do this)

Such apps do not anymore exit after closing their window because the
children do not receive a deref due to setVisible not getting called.
(At that point. It would get called after exiting the event loop but
that never happens due to the refcounting)

Change-Id: I124737c80ad59600ddc79261100f3904af0f410d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove dependency on QFSFileEngine
João Abecasis [Sat, 4 Feb 2012 23:50:25 +0000 (00:50 +0100)]
Remove dependency on QFSFileEngine

The code was hard-wired to use QFSFileEngine to determine platform
preference for file system case sensitivity. In this case it is cheaper
to use private API and directly access the information in
QFileSystemEngine.

This change is also necessary because file engines are being dropped
from the public API.

Change-Id: I5015d5fdb3979af9ff2d114084053ad06220d834
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoInline information about FS case sensitivity
João Abecasis [Sat, 4 Feb 2012 23:46:08 +0000 (00:46 +0100)]
Inline information about FS case sensitivity

As far as Qt is concerned, this information is static and depends only
on the platform. By moving the definition to the header we allow the
information to be directly used by the compiler, forgoing the need to
export the function to interested users.

Change-Id: I43de585391d41204d3c3560ac6e65e5a88aee11c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoFix memory leak of QFontEngineBox object
jian liang [Sun, 5 Feb 2012 15:09:36 +0000 (23:09 +0800)]
Fix memory leak of QFontEngineBox object

Delete QFontEngineBox object in QFontDatabase::load() if the object can not
be used.

Change-Id: Ifb055809703fb6be92f41fd56658198df30837fd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoAdd missing header in kernel.pri
Jędrzej Nowacki [Fri, 3 Feb 2012 16:00:38 +0000 (17:00 +0100)]
Add missing header in kernel.pri

qobject_impl.h file was missing.

Change-Id: I1701808595933c2462cbc8151961cf9bf9791b64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd distance field generation functions from Scenegraph
Jiang Jiang [Mon, 6 Feb 2012 13:07:35 +0000 (14:07 +0100)]
Add distance field generation functions from Scenegraph

Since we may use distance field text rendering in raster, these
functions need to be moved from declarative to QtGui.

Change-Id: I158bc3bae02b5590ae812f06ad7a78a5914bcb9e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoComplete split of QtConcurrent.
Friedemann Kleint [Mon, 6 Feb 2012 12:45:03 +0000 (13:45 +0100)]
Complete split of QtConcurrent.

- Fix exports.
- Fix tests.

Acked-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I2df923ba74b468f5ee09b3a48ae3d09920751365
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoSilence syncqt warnings for atomic implementation headers
Bradley T. Hughes [Mon, 6 Feb 2012 10:42:27 +0000 (11:42 +0100)]
Silence syncqt warnings for atomic implementation headers

Most of these headers are either forwarding headers, or we explicitly
stop syncqt so that it doesn't generate class includes for the atomic
implementation. Either way, syncqt doesn't see the QT_END_* (and
sometimes not QT_BEGIN_*), which this commit fixes.

Change-Id: Icc8da6f384f38b1ff4eb265c731ce2f2ed92a1a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoChange #include "qlogging.h" to <QtCore/qlogging.h> in qglobal.h
Bradley T. Hughes [Mon, 6 Feb 2012 10:31:12 +0000 (11:31 +0100)]
Change #include "qlogging.h" to <QtCore/qlogging.h> in qglobal.h

This silences the warning from syncqt:

QtCore: WARNING: qtbase/src/corelib/global/qglobal.h includes qlogging.h
when it should include QtCore/qlogging.h

Change-Id: I64bd92898190031eb0d3d1dfa5ba5bc56db01c00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMove compiler detection from qglobal.h to a separate header
Bradley T. Hughes [Sat, 4 Feb 2012 13:20:32 +0000 (14:20 +0100)]
Move compiler detection from qglobal.h to a separate header

qcompilerdetection.h is included from qglobal.h, and does all Q_CC_*
and compiler feature detection.

Change-Id: Idd06054e172ef6fa73774e26fa38753996c4161b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMove operating system detection from qglobal.h to a separate header
Bradley T. Hughes [Fri, 3 Feb 2012 19:26:24 +0000 (20:26 +0100)]
Move operating system detection from qglobal.h to a separate header

qsystemdetection.h is included from qglobal.h, and does all Q_OS_*
detection

A side-effect of this change is that QT_BEGIN_HEADER and QT_END_HEADER
started being defined on Mac OS X, which ends up breaking the build
in some cases. Since QT_BEGIN_HEADER and QT_END_HEADER have been
defined to nothing in the past, even on Mac OS X, change these 2
to be unconditionally defined to nothing.

Change-Id: Ibc8a0aa2207664741c25627d7621e006c2ce80d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoWindows XP style: Fix warnings wrt retrieving HANDLE from 0-window.
Friedemann Kleint [Mon, 6 Feb 2012 08:38:48 +0000 (09:38 +0100)]
Windows XP style: Fix warnings wrt retrieving HANDLE from 0-window.

Exclude invisible top level dialogs for whom a native
dialog is being shown from top-level search.

Change-Id: Ia94599905457d81d342c14d09ad0b0fc89ec4ab1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove QAccessible::FocusChild, add focusChild()
Jan-Arve Saether [Thu, 19 Jan 2012 13:20:54 +0000 (14:20 +0100)]
Remove QAccessible::FocusChild, add focusChild()

Also cleanup (reduce) all implementations of navigate() in order
to make the final removal of navigate smoother.

Change-Id: I2c216db8f5b2e40afcce8f859fc775053adc2fe3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoAdd accessible role Terminal.
Frederik Gladhorn [Sat, 21 Jan 2012 19:27:07 +0000 (20:27 +0100)]
Add accessible role Terminal.

Forward ported from Qt 4.

This is used to mark the role of VTs, terminal emulators.
Needed in order to know about the special editing behavior.
In order to make for example KDE's Konsole accessible this is required.

reviewed-by: jan-arve sæther <jan-arve.saether@nokia.com>
(cherry picked from commit 8ca33c6f1643ab5e89699fbf8b80bfaae108b1e5)

Change-Id: Ic7beb2ae2ee70f2c526c7ec5bf982bec7ba9feda
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoUse available geometry when maximized.
Rafael Roquetto [Wed, 1 Feb 2012 17:09:44 +0000 (18:09 +0100)]
Use available geometry when maximized.

Use the available geometry as a maximized window would fit on the
desktop in the available area (some space is used up by task bar,
system menu, etc.) as opposed to the fullscreen geometry which
would be the entire screen.

Change-Id: Ifa7046c5b13e162727a9b3a54178690c631cc969
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Anselmo L. S. Melo <anselmo.melo@openbossa.org>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoEnable basic gesture support for WEC7.
Miikka Heikkinen [Thu, 2 Feb 2012 14:13:47 +0000 (16:13 +0200)]
Enable basic gesture support for WEC7.

This commit adds basic gesture support to WEC7 Qt builds, which
enables developer to create custom gesture recognizers based on mouse
events.

Note that QTouchEvents are not yet generated in WEC7 Qt builds, so
recognizers based on those cannot be created.

Task-number: QTBUG-22517
Change-Id: Ic6218500b28b78ca8edec3edebd00d84c308a182
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoqmake: Work around MSVC compiler bug.
Friedemann Kleint [Mon, 30 Jan 2012 14:16:50 +0000 (15:16 +0100)]
qmake: Work around MSVC compiler bug.

Disable optimization for getProjectUUID() as it triggers
ASSERT: "&other != this" at qstring.h:720 with -O2.

Change-Id: I51b31d4318ba9be187c186623099171d8f48235b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoreduce cost of checking cache for data() and headerData()
Mark Brand [Tue, 5 Jul 2011 15:27:54 +0000 (17:27 +0200)]
reduce cost of checking cache for data() and headerData()

Assume requested row is usually not cached.

Change-Id: I7727b431cc3841528aa6390400b93b1218773e65
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel::setData(): comment historical idiosyncracies
Mark Brand [Thu, 7 Jul 2011 10:42:07 +0000 (12:42 +0200)]
QSqlTableModel::setData(): comment historical idiosyncracies

Change-Id: I5c4782e18dc7a471dc294a4146db04f1efd3ed2e
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agorefactor QSqlTableModel::setData()
Mark Brand [Thu, 7 Jul 2011 09:52:11 +0000 (11:52 +0200)]
refactor QSqlTableModel::setData()

-move logic out of switch statement
-clear cache more clearly for OnFieldChange
-call setValue() in one place instead of two
-eliminate extra return path

Existing idiosyncracies have been kept for the time
being.

Change-Id: Ia4c5a5fd3e374b53e3c4d870f2ee9d37b5090917
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agorefactor QSqlTableModel::setRecord()
Mark Brand [Wed, 6 Jul 2011 19:10:45 +0000 (21:10 +0200)]
refactor QSqlTableModel::setRecord()

-Do not use setData()
We're using ModifiedRow now so it makes sense to buffer the changes
and submit the row at once. This improves readability and
encourages further haromonization of the editing strategies.

-No longer need temporary change to OnRowChange
Previously, the strategy was temporarily changed from OnFieldChange
to OnRowChange in order to obtain the desired behavior from setData().
Now, since we don't use setData(), we can program the desired behavior
here and don't need this trick.

-Comment historical idiosyncracies/bugs

Change-Id: I6d9e2a69e1571a74c630ad1392e15b60fc0ad3f2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agomerge private and public QSqlTableModel::setRecord()
Mark Brand [Wed, 6 Jul 2011 18:52:06 +0000 (20:52 +0200)]
merge private and public QSqlTableModel::setRecord()

Change-Id: I409bd32f85224db64363688d63fc372d1beaa0d3
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoModifiedRow: use for all edit strategies
Mark Brand [Wed, 6 Jul 2011 07:49:45 +0000 (09:49 +0200)]
ModifiedRow: use for all edit strategies

Previously ModifiedRow was used only for OnManualSubmit and
a seperate buffer and utility methods were used for OnFieldChange
and OnRowChange.

Also, initialization of the edit buffer is done by ModifiedRow
instead of a helper function.

Change-Id: I3316498e5bb10c416138ca14c3a7f8b143c8e544
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoSIC: QLocale: Make QSystemLocale a private class
John Layt [Fri, 27 Jan 2012 20:21:21 +0000 (20:21 +0000)]
SIC: QLocale: Make QSystemLocale a private class

As discussed on list and approved by Lars and Thiago.

Make QSystemLocale private to give us time and space to change it to a
better implementation.

Change-Id: Ifd806972f3996c43a876f544f78c6557ad71cd75
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoSIC: QLocale: Remove base argument from conversion to number api
John Layt [Fri, 27 Jan 2012 19:04:42 +0000 (19:04 +0000)]
SIC: QLocale: Remove base argument from conversion to number api

As discussed on list and approved by Lars and Thiago.

Remove the option to use QLocale to convert strings to non-decimal
numbers as they are not localised and the api is available in QString.

Change-Id: Ib810505ba86fb08ad23571b39f1520e86fde6787
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQString: Make convert to number methods only use C locale
John Layt [Sun, 22 Jan 2012 21:23:50 +0000 (21:23 +0000)]
QString: Make convert to number methods only use C locale

Ensure consistent conversions by not using the system default locale.

Change-Id: I60db9fc4f465c0254f3213419e57d7879aaddd65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMove QtConcurrent into its own module
Lars Knoll [Fri, 3 Feb 2012 13:17:26 +0000 (14:17 +0100)]
Move QtConcurrent into its own module

Task-number: QTBUG-20892

Change-Id: I614500aafb6428915509983608bbb0ade4e4f016
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoExclude helloconcurrent when QtConcurrent is not configured
Samuli Piippo [Thu, 26 Jan 2012 11:53:00 +0000 (12:53 +0100)]
Exclude helloconcurrent when QtConcurrent is not configured

Task-number: QTBUG-23874
Change-Id: I374a08ce947e804ebb1da08c413e340e4719d9d0
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd movability tests for QByteArray.
Jędrzej Nowacki [Tue, 31 Jan 2012 13:16:52 +0000 (14:16 +0100)]
Add movability tests for QByteArray.

QByteArray is declared as movable but it was not tested before.

Change-Id: I4fb636f8705c3fd792a768872206203ee5fd4ddb
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDo not crash trying to load or save QModelIndex.
Jędrzej Nowacki [Fri, 13 Jan 2012 14:12:46 +0000 (15:12 +0100)]
Do not crash trying to load or save QModelIndex.

QModelIndex doesn't have data stream operators loading or saving this
type should gracefully fail.

Change-Id: I6a1a3bab3f83ff4921369a07fdb54ac462eff554
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoReimplement QMetaType::destroy.
Jędrzej Nowacki [Tue, 24 Jan 2012 12:58:04 +0000 (13:58 +0100)]
Reimplement QMetaType::destroy.

New implementation is using QMetaTypeSwitcher, which should reduce
maintenance costs.

Change-Id: Ibb7bb4b9de0e19c081c087d9eebf0c709118d3b4
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoFixes QIconvCodec::convertToUnicode()
Nick Ratelle [Mon, 19 Dec 2011 14:53:35 +0000 (10:53 -0400)]
Fixes QIconvCodec::convertToUnicode()

We need to hang onto the internal state of the utf16 converter
object whenever converting a long string to unicode. This was
failing with the text stream class -- the first read was okay,
but subsequent reads could not be correctly converted to unicode.

Change-Id: I9e2d445d51c9009591bfa7a1765ea2d09ae634a2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQDateTime: Remove Julian Calendar
John Layt [Mon, 9 Jan 2012 20:50:00 +0000 (20:50 +0000)]
QDateTime: Remove Julian Calendar

Convert QDate to only use Gregorian calendar and not Julian calendar
before 1582.  In future the Julian can be used via proper calendar
classes.

Change-Id: I547a3550332057a0ab1be616706630b6afaceffc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>