profile/ivi/qtbase.git
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>
12 years agoQDateTime: Store Julian Day as qint64
John Layt [Thu, 25 Aug 2011 06:54:16 +0000 (07:54 +0100)]
QDateTime: Store Julian Day as qint64

Store the QDate Julian Day number as an qint64 instead of uint32 to
enable support for dates before 2 January 4713 BCE.  This changes the
possible date range to be approx 2.5 Quadrillion BC to 2.5 Quadrillion
AD. A qint32 was not used as it only covers 5 million BCE to 5 million
CE which does include Geological or Astronomical time.

The effective supported date range is currently 4800 BCE to 1.4 million
CE due to restrictions in existing conversion formulas.  The effective
range will be extended later with new formulas.

Change-Id: Ib4345369455b31d4edae8c933b7721e76414e914
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse $CFG_ARCH even if src/corelib/arch/$CFG_ARCH does not exist
Bradley T. Hughes [Sat, 4 Feb 2012 12:43:37 +0000 (13:43 +0100)]
Use $CFG_ARCH even if src/corelib/arch/$CFG_ARCH does not exist

Recent commits in src/corelib/arch have removed empty directories,
which cause configure to assume that the architecture is not supported.
This assumption is wrong, due to changes in
src/corelib/thread/qbasicatomic.h to include the correct QAtomic*
implementation based on compiler pre-defined macros instead of the
architecture found by configure.

Change-Id: I026958fb9af8af62e295e68a4643c37ac9395dc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMinGW: Fix warnings.
Friedemann Kleint [Fri, 3 Feb 2012 14:29:13 +0000 (15:29 +0100)]
MinGW: Fix warnings.

- Special #define to access HB seems no longer necessary
  (it was causing about mismatching DLL import attributes).

Change-Id: I57cc7d57b12a67c1d549b053db81e1f198f87786
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoImprove sysroot handling with regards to configure tests.
Simon Hausmann [Fri, 3 Feb 2012 09:03:26 +0000 (10:03 +0100)]
Improve sysroot handling with regards to configure tests.

Some configure tests try to link programs, which when compiling against
a sysroot _does_ require the --sysroot= argument in order to find crt0.o.

This patch uses the existing pattern of using the export SYSROOT_FLAG
in the missing linking tests.

Change-Id: I063849c814f393d5f88de1b486ce9035b9f7bf65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoBring qmetaobjectbuilder in sync with moc
Kent Hansen [Thu, 2 Feb 2012 13:20:24 +0000 (14:20 +0100)]
Bring qmetaobjectbuilder in sync with moc

qmetaobjectbuilder should generate meta-objects of the same version
as moc; in the future, when the moc version is bumped, QMOB has to
be adapted at the same time.

QMOB was generating version 4 meta-objects. This patch makes it
generate version 6 (the current version). This also fixes a bug with
using qt_static_metacall with QMOB (setStaticMetacallFunction()); it
was already using the version 6 qt_static_metacall signature, which
isn't compatible with version 4.

Also add tests that ensure that the QMOB-generated meta-object works
with real objects; in particular we want to test the codepaths in Qt
that check for version >= 4.

Change-Id: I64a151ea5c947a6f8b7a00e85a39866446c735e9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoAdapt QtDBus to QVariant property type change
Kent Hansen [Fri, 3 Feb 2012 12:41:56 +0000 (13:41 +0100)]
Adapt QtDBus to QVariant property type change

Commit 00c8984b4e48b2a7eadfee6c3cd0cbb19f586118 changed other parts
of Qt to use QMetaType::QVariant, not 0xff, as the type for QVariant
properties. QtDBus should check for that type, and also use it for
QDBusVariant properties.

Change-Id: I21d81b59754ae44889766877a4c5066466b46d86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoBring QtDBus meta-object generator in sync with moc
Kent Hansen [Fri, 3 Feb 2012 08:24:56 +0000 (09:24 +0100)]
Bring QtDBus meta-object generator in sync with moc

QtDBus's meta-object generator should generate objects of the same
version as moc; in the future, when the moc version is bumped,
QtDBus's meta-object generator has to be adapted at the same time.

Since QMetaObjectPrivate and related flags reside in qmetaobject_p.h,
QtDBus can just include the header instead of duplicating code.
qmetaobject_p.h also defines the meta-object revision QtDBus should
be targeting.

QtDBus was generating version 3 meta-objects. This patch makes it
generate version 6 (the current version). Since a new field was
added to QMetaObjectPrivate in revision 4 (signalCount), the
generator had to be adapted. In particular, the signal definitions
need to come before other methods (as they do with moc), since
there are functions in QObject that rely on that (e.g.
computeOffsets()).

Change-Id: I37f102d8c1be372ef6cfaf013baa87f9abb0fd5e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix compilation on MinGW.
Friedemann Kleint [Fri, 3 Feb 2012 12:30:03 +0000 (13:30 +0100)]
Fix compilation on MinGW.

- Add missing constant.
- Make FontKey a pair instead of a function-local type which
  cannot be used as template parameter for gcc.
- Fix warnings about redefinition of NOMINMAX and enumeration.

Change-Id: Ie3eb6e5b8dd9cd81210d6e10270ada0158aaf809
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoHandle the 'real' datatype correctly in the SQLite driver
Andy Shaw [Thu, 19 Jan 2012 20:39:30 +0000 (21:39 +0100)]
Handle the 'real' datatype correctly in the SQLite driver

The 'real' datatype should be seen as a QVariant::Double type and not as
a QVariant::String type otherwise it does not get presented correctly
when using a non Qt application to access it.

Test is included for QSqlQuery.

Task-number: QTBUG-16373

Change-Id: Ie323ce49eb95e4d6bb4c3814ba9a957a63f4b259
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
(cherry picked from commit b23631015c23a49e3b4d296ea0a6266bfce3d4f1)
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoFix a typo TypeDefiniton -> TypeDefinition.
Jędrzej Nowacki [Fri, 3 Feb 2012 12:46:24 +0000 (13:46 +0100)]
Fix a typo TypeDefiniton -> TypeDefinition.

If you repeat a typo often enough, it becomes the right spelling.
But 49 times is definitely not enough :-)

Change-Id: I7c0bb29e68e4bff5c67277f9874df8b3ab8b2b54
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoInclude qatomic_cxx11.h for C++11 compilers
Bradley T. Hughes [Fri, 3 Feb 2012 12:38:26 +0000 (13:38 +0100)]
Include qatomic_cxx11.h for C++11 compilers

qatomic_cxx0x.h doesn't exist.

Change-Id: Iac654ecf09a1b890d25fa23625c8c43f2f7f1ecf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove empty src/corelib/arch subdirectories
Bradley T. Hughes [Fri, 3 Feb 2012 08:54:05 +0000 (09:54 +0100)]
Remove empty src/corelib/arch subdirectories

The bfin, integrity, s390, and sh4a directories included an empty
arch.pri, which is not necessary. Remove these directories and arch.pri
files.

Change-Id: I016dcef63e4b9fb4c14cc1fa7b9b91cba2080dbb
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove src/corelib/arch/nacl/* and qatomic_nacl.h
Bradley T. Hughes [Fri, 3 Feb 2012 08:50:45 +0000 (09:50 +0100)]
Remove src/corelib/arch/nacl/* and qatomic_nacl.h

This implementation uses the GCC __sync_* intrinsics, which we do not
need to duplicate after commit 2bbd2262b3974fb4e39341a23e40ffdf1655ebe9
(which added qatomic_gcc.h).

Change-Id: I59b6e4a03e83f58f4145a5ab2bfd635fe9ab686f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove src/corelib/arch/ia64/*
Bradley T. Hughes [Fri, 3 Feb 2012 08:47:29 +0000 (09:47 +0100)]
Remove src/corelib/arch/ia64/*

The out-of-line q_atomic_test_and_set_(int|ptr) functions are no longer
declared after commit 1955353149781a064bc053b86be6e221b159d4ee. They
appear to have never been used either. Remove them.

Change-Id: Ia8dfa1f585f2370091b4fd93aaf98cb10241bf31
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove src/corelib/arch/i386/* and src/corelib/arch/x86_64/*
Bradley T. Hughes [Fri, 3 Feb 2012 08:37:48 +0000 (09:37 +0100)]
Remove src/corelib/arch/i386/* and src/corelib/arch/x86_64/*

We do not want to support out-of-line QAtomic* implementations. Remove
these from the i386 and x86_64 implementations.

Change-Id: Ib6a9614b7b11bf6bccc9054b177357afd83e33e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove src/corelib/arch/avr32/* and qatomic_avr32.h
Bradley T. Hughes [Fri, 3 Feb 2012 08:33:28 +0000 (09:33 +0100)]
Remove src/corelib/arch/avr32/* and qatomic_avr32.h

This implementation uses the GCC __sync_* intrinsics, which we do not
need to duplicate after commit 2bbd2262b3974fb4e39341a23e40ffdf1655ebe9
(which added qatomic_gcc.h).

Change-Id: I2cab86deacad1c37f17f0c5836d9faf2ad366495
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove src/corelib/arch/mips/*
Bradley T. Hughes [Fri, 3 Feb 2012 08:30:38 +0000 (09:30 +0100)]
Remove src/corelib/arch/mips/*

Commit 99fb1bea49c4de5cf3143af59f8c96a92980e58f removed the use of the
old, out-of-line q_atomic_* implementation. Remove these functions from
the library.

Change-Id: I0b239bf779e0545cb5558862e3a40f6e95fdcbd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove src/corelib/arch/arm/*
Bradley T. Hughes [Fri, 3 Feb 2012 08:17:33 +0000 (09:17 +0100)]
Remove src/corelib/arch/arm/*

After commit dc5388e79b71d796c1207681235cf007c39810bd, which removed
support for non-EABI, qt_atomic_yield() and q_atomic_lock are no
longer used. Remove them.

Change-Id: I0f405ae63d7903c222fc2b829887207885be0a03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove #include "qatomic_macosx.h"
Bradley T. Hughes [Fri, 3 Feb 2012 08:22:53 +0000 (09:22 +0100)]
Remove #include "qatomic_macosx.h"

This file was removed in commit 68e5fd9ebc8a3f510e3144e981a0cb358945fb9c

Change-Id: I76671f79432204c28ffa7488871d0eef07cc8dca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix QAbstractItemModel documentation
Giuseppe D'Angelo [Fri, 3 Feb 2012 01:46:26 +0000 (01:46 +0000)]
Fix QAbstractItemModel documentation

Commit 20abd88e711a2dfcbe07925f8902faa45e5110e2 refactored the
supportedDragActions methods, this oneliner adds the necessary \fn.

Change-Id: I373b039138e1cbfe0f28a0aa9eb3b65245f2132d
Reviewed-by: David Faure <david.faure@kdab.com>
12 years agoAdd support for QNX iconv implementation
Rafael Roquetto [Thu, 2 Feb 2012 15:06:05 +0000 (16:06 +0100)]
Add support for QNX iconv implementation

QNX implements the POSIX version of iconv (with non-const function
signatures). However, it is still necessary to link with libiconv, unlike most
cases. Also, its iconv_open does not know how to handle an empty string.

Change-Id: I8654703e46b9c64503aca5521ce7fae1c97d7968
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove QInputContext
Pekka Vuorela [Wed, 1 Feb 2012 07:43:18 +0000 (09:43 +0200)]
Remove QInputContext

This has only been around as compatibility interface for Qt4
but is now replaced by QPlatformInputContext.

Change-Id: I677dbbea46311bf39f6c5ca9dc3fb5009abe924a
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRename qatomic_windows.h to qatomic_msvc.h
Bradley T. Hughes [Thu, 2 Feb 2012 13:23:32 +0000 (14:23 +0100)]
Rename qatomic_windows.h to qatomic_msvc.h

The QT_ARCH_WINDOWS(CE) define(s) aren't used to control which
header to include anymore, so just remove it. We also do not need
the empty src/corelib/arch/windows/arch.pri.

Change-Id: I5400fc852af31907e533d0278540b8cd3da391cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUpdate .gitignore to ignore qmake/qmake_pch.pch
Bradley T. Hughes [Thu, 2 Feb 2012 13:38:28 +0000 (14:38 +0100)]
Update .gitignore to ignore qmake/qmake_pch.pch

This file is generated when building qmake on Windows

Change-Id: I554bb2d32cfeff6791d664a5ca7b3d605db38c77
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake Clang the default makespec on Mac OS 10.7 (Lion) if Clang >= 3.0
Tor Arne Vestbø [Thu, 26 Jan 2012 12:54:07 +0000 (13:54 +0100)]
Make Clang the default makespec on Mac OS 10.7 (Lion) if Clang >= 3.0

Change-Id: Ibeb1db0eca2fb6d843d85c3f48c5f23a81230745
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFixed qsharedpointer unittest on windows
Kurt Korbatits [Wed, 1 Feb 2012 03:33:08 +0000 (13:33 +1000)]
Fixed qsharedpointer unittest on windows

- Use source file location as working directory for externaltests

Change-Id: Ic05259f48eece920b348ccbde9ba80c90dedfdd2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoprocessEvents(WaitForMoreEvents) should return after delivering events
Bradley T. Hughes [Mon, 23 Jan 2012 07:59:27 +0000 (08:59 +0100)]
processEvents(WaitForMoreEvents) should return after delivering events

The Cocoa event dispatcher sends timer, socket, and posted events
correctly, but they are not NSEvents, and as such, they do not cause
[NSApp nextEventMatchingMask] to return. When calling processEvents()
with WaitForMoreEvents, but the EventLoopExec flag isn't set, we want to
interrupt the WaitForMoreEvents.

As a result, We should not call wakeUp() at the top of processEvents(),
otherwise we end up shortcutting other event sources. We also do not
need to call QCoreApplication::sendPostedEvents() directly either in
processEvents(), it's the postedEventsSource job to do that.

The interruptLater mechanism is always run when calling processEvents()
directly (not via exec()), which causes problems when testing
processEvents(). Don't use interruptLater unless the modal sessions
change (which is indicated by the cached session pointer being reset
to zero).

Change-Id: Iec2b49a4f306b2702c979522f12a28d0b5fbd0b4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoUn-guard a QRawFont autotest.
Pierre Rossi [Wed, 1 Feb 2012 16:13:24 +0000 (17:13 +0100)]
Un-guard a QRawFont autotest.

Let's just run this test on all platforms.

Change-Id: Iffec0ddfa8a73fd9e1af1c5ea3b49c337fa8a026
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoDon't include config.tests/unix/openssl/openssl.pri (again)
Bradley T. Hughes [Thu, 2 Feb 2012 11:02:15 +0000 (12:02 +0100)]
Don't include config.tests/unix/openssl/openssl.pri (again)

This file was removed in commit ba9302b8a9b6b50f37987261c1ade9af2ade2d3c.
Commit 8fad23f3261bdcf9bd0e11980ebfc3b00c2469c6 removed openssl.pri from
src/network/ssl/ssl.pri, but not from the qsslsocket autotest.

Change-Id: Ic1a576ee7f0ee3d68471121ba636b94ce7bae455
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoReimplement QIdentityProxyModel::headerData().
Sergio Martins [Thu, 2 Feb 2012 17:00:13 +0000 (17:00 +0000)]
Reimplement QIdentityProxyModel::headerData().

The one in the base class is slower due to parent<->source
mappings.

Change-Id: Ib0b337ef5d4b5b8cd9f6e1d7c5c19a770b53e0e8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoMake QAbstractItemView::itemOptions properly initialize a V4 option
Giuseppe D'Angelo [Thu, 2 Feb 2012 17:48:31 +0000 (17:48 +0000)]
Make QAbstractItemView::itemOptions properly initialize a V4 option

Since the QStyleOptionViewItem now contains the V4 fields, they
must be properly initialized when calling itemOptions.

Change-Id: I1346e6887d2d9a7eb29cc458fa4eede0b815001c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix the chart itemview example
Giuseppe D'Angelo [Thu, 2 Feb 2012 17:40:27 +0000 (17:40 +0000)]
Fix the chart itemview example

Commit 054a4aa7dddacbe31778c5c5e9ffc9d41f803353 (being a SIC)
breaks QAbstractItemViews that used to override the
dataChanged(QModelIndex, QModelIndex) method, so this change
updates the dataChanged signature accordingly.

Change-Id: I632b6625c12dcb09abcb737ea2648efeeedeee8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoBuild with -pedantic
Stephen Kelly [Thu, 2 Feb 2012 20:04:38 +0000 (21:04 +0100)]
Build with -pedantic

Change-Id: I42487099855d2adaecfad0a3147141f88aca1898
Reviewed-by: David Faure <faure@kde.org>
12 years agoAdd typedef for source compatibility.
Stephen Kelly [Thu, 2 Feb 2012 16:15:25 +0000 (17:15 +0100)]
Add typedef for source compatibility.

Change-Id: I73fb90b87db50db40c8a712acb25e0f966bbd5d3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMerge QStyleOption*V{2,3,4} classes together
Giuseppe D'Angelo [Mon, 30 Jan 2012 00:52:34 +0000 (00:52 +0000)]
Merge QStyleOption*V{2,3,4} classes together

In order to keep binary compatibility, Qt 4 introduced V{2,3,4}
classes for QStyleOption subclasses. They're simple, low level
containers for various members with public access (no accessors
required).

In Qt 5.0 we can break BC, so this patch moves the members
from the derived classes into the ``base'' ones.
The ``base'' ones get a version bump matching the highest
version available, and the V{2,3,4} classes become typedefs.

This change can cause problems in code that used QStyleOption
directly, especially QStyleOptionViewItem, because the old V4
fields get default initialization but the QStyle subclasses
detect that the option is a V4 option and expect all fields
to be properly initialized. The fix in such places is to
properly initialize all fields.

Task-number: QTBUG-23522
Change-Id: I2f782da09ca5cc8c4cbafc07448fb0d33153a251
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>