profile/ivi/qtbase.git
12 years agoWindows QPA: Compile with QT_NO_CAST_FROM_ASCII, warnings.
Friedemann Kleint [Thu, 2 Feb 2012 13:40:02 +0000 (14:40 +0100)]
Windows QPA: Compile with QT_NO_CAST_FROM_ASCII, warnings.

Change-Id: I75d6a102a6a1fa0b5f8add049442f23d6fd57725
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix unintended source compatiblity break in QSslSocket
Shane Kearns [Thu, 2 Feb 2012 15:51:26 +0000 (15:51 +0000)]
Fix unintended source compatiblity break in QSslSocket

QSslSocket overrides one version of QAbstractSocket::connectToHost.
Since these functions were made virtual, this now hides the other
overloads.
Added a using statement to make the other overloads visible.

Change-Id: Ia48fdc9bd67936c75c25bb24dabd26a723bb7a05
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoVarious documentation fixes ported from Qt 4.8
Teemu Katajisto [Thu, 2 Feb 2012 10:29:54 +0000 (12:29 +0200)]
Various documentation fixes ported from Qt 4.8

Selected fixes for qtbase from 4.8 commit
3826203f744a2147bebf5f088de0d524156f59fd

Task-number: QTBUG-9466
Task-number: QTBUG-7924
Task-number: QTBUG-20355
Task-number: QTBUG-19367
Task-number: QTBUG-14554

Change-Id: I551251dd8a87d7dd837e5927050ffd14bce9a97c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoReimplement QAbstractSocket::setReadBufferSize() properly
Bradley T. Hughes [Thu, 2 Feb 2012 08:05:04 +0000 (09:05 +0100)]
Reimplement QAbstractSocket::setReadBufferSize() properly

This function takes a qint64 argument, not an int argument.

peerwireclient.h:119:10: warning: 'PeerWireClient::setReadBufferSize'
     hides overloaded virtual function [-Woverloaded-virtual]
    void setReadBufferSize(int size);
         ^
src/network/socket/qabstractsocket.h:162:18: note: hidden overloaded
     virtual function 'QAbstractSocket::setReadBufferSize' declared here
    virtual void setReadBufferSize(qint64 size);
                 ^

Change-Id: I29b67b216147771ff2d662d309d2c31d977e9d3f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
12 years agoMove QString <-> NSString conversion to QtCore
Morten Johan Sorvig [Mon, 30 Jan 2012 13:14:04 +0000 (14:14 +0100)]
Move QString <-> NSString conversion to QtCore

Add (private) API to QCFString:
static QString toQString(NSString *)
static NSString *toNSString(const QString &)

Add implementation to qcore_mac_objc.mm. Keep the
mac_cpp since it's used for building qmake as well
as bootstrapping.

Replace usage of NSString conversion functions
in the cocoa and corewlan plugin with QCFString.

Change-Id: I9f34edd5231255aef9d8d6e9a60306174bb279b3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoCall start() even when bearer is not compiled.
Xizhi Zhu [Wed, 1 Feb 2012 21:26:36 +0000 (22:26 +0100)]
Call start() even when bearer is not compiled.

Otherwise, the HTTP request won't be sent if bearer is not compiled.

Change-Id: I9a8171fde6fe5b2db0405b4af6e1d52ac4528502
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoRemove one un-used variant.
Xizhi Zhu [Wed, 1 Feb 2012 19:04:31 +0000 (20:04 +0100)]
Remove one un-used variant.

Change-Id: I325451f2f346cc75f23703118b451b9c7398baea
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoFix qmlscene segfault on startup on Mac OS 10.6.
Morten Johan Sørvig [Thu, 2 Feb 2012 10:02:01 +0000 (11:02 +0100)]
Fix qmlscene segfault on startup on Mac OS 10.6.

Task-number: QTBUG-23982

The platform plugin loader was searching for plugins
in qtbase/bin and would segfault when checking if
the qmlscene binary was a plugin.

Test if "../Plugins" actually exists before setting
it as the platform plugin path.

Change-Id: Ibd887b5c5045d23e3eb62867dc7598e09d3918ad
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agospeed up font enumeration in windows platform
jian liang [Wed, 1 Feb 2012 15:19:46 +0000 (23:19 +0800)]
speed up font enumeration in windows platform

Currently, font enumeration is very slow in windows platform, it will take
several seconds to enumerate all fonts for the first time. This patch
cache the font information queried from font registry, it can
significantly speed up font enumeration.

Change-Id: Ic783877b7f3db3facf24965b0c5d669b22d40c61
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix QString::operator=(QLatin1String) for substrings
Kent Hansen [Wed, 1 Feb 2012 20:08:30 +0000 (21:08 +0100)]
Fix QString::operator=(QLatin1String) for substrings

QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made QString::operator=(QLatin1String) work in that case.

Change-Id: Ie77eabd2f8f036531d67cd8051a7b6305b386ccf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix QTextStream and QDebug operator<< for QLatin1String
Kent Hansen [Wed, 1 Feb 2012 19:47:26 +0000 (20:47 +0100)]
Fix QTextStream and QDebug operator<< for QLatin1String

QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QTextStream and QDebug << operators work in that case.

Change-Id: I94d051ce2ebfb2d2a403b96d25e040c80a54bf7c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix QString(QLatin1String) constructor for substrings
Kent Hansen [Wed, 1 Feb 2012 19:15:24 +0000 (20:15 +0100)]
Fix QString(QLatin1String) constructor for substrings

QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QString(QLatin1String) constructor work in that case.

Change-Id: I4f4f07a956144b7ea4aa9c58a61c755fb99ef1b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix operator==(QLatin1String, QLatin1String) and friends for substrings
Kent Hansen [Wed, 1 Feb 2012 16:37:02 +0000 (17:37 +0100)]
Fix operator==(QLatin1String, QLatin1String) and friends for substrings

QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QLatin1String comparison operators work in that case.

Change-Id: I234ba851e67a6f5cfbb46fb6f0b22623ce40be28
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoPort the Windows atomic implementation to use QGenericAtomicOps
Bradley T. Hughes [Mon, 30 Jan 2012 14:04:06 +0000 (15:04 +0100)]
Port the Windows atomic implementation to use QGenericAtomicOps

First, we do not need to have the QT_INTERLOCKED_REMOVE_VOLATILE(a)
macro anymore either, since the value stored in QBasicAtomicInteger is
not volatile.

Windows provides Interlocked*Pointer() functions in some configurations,
so we provide a partial specialization of QAtomicOps for pointer types.
For integer types, QAtomicOps selects an implementation based on the
size of the type. At the moment, we only support 32-bit types, but it
will be possible to add 64-bit later.

Note that the 32-bit specialization of QAtomicOpsBySize declares the
Type typedef as long, not int, since the Windows Interlocked*() API
takes parameters as longs and long pointers. Since this typedef differs
from the type given to QBasicAtomicInteger<T> by the QBasicAtomicInt
typedef, we need to templatise the _q_value parameter separately from
the other arguments in QGenericAtomicOps.

This templatisation would be necessary to port other architectures, such
as PA_RISC, where we need to have an int[4] array in the atomic type
while the arguments do not need this array.

Change-Id: Id71fa1ae334da2023553cb402b45e6c285f1d344
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agofix gdb_dwarf_index.prf for applications, take two
Joerg Bornemann [Thu, 10 Nov 2011 11:43:51 +0000 (12:43 +0100)]
fix gdb_dwarf_index.prf for applications, take two

Handle the case of an empty DESTDIR.

(cherry picked from commit 122fa6b53c33364a4687919191e55899acb43797)

Change-Id: I0c2eec5736d0944b8ee97abdfa3f1121e7d8db4b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agofix gdb_dwarf_index.prf for executables
Joerg Bornemann [Wed, 9 Nov 2011 17:59:46 +0000 (18:59 +0100)]
fix gdb_dwarf_index.prf for executables

Unlike for libraries, $(TARGET) already contains $(DESTDIR).
Changing to $(DESTDIR) does break the command in that case.

Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 7eb770aed35fee50ff98c12e390dcb02c72b5132)

Change-Id: Idd0f30d52db432062917a1c956c3af73e6c8a6a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRenamed QInputPanel as QInputMethod
Pekka Vuorela [Tue, 24 Jan 2012 15:44:38 +0000 (17:44 +0200)]
Renamed QInputPanel as QInputMethod

QInputMethod better describes what the class is about, input methods
in general, be they panels or just composing input from key events.

Compatability headers added for old name. Not bulletproof but should be
enough to get transition done.

Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoRemove duplicated function from QCocoaEventDispatcher
Bradley T. Hughes [Wed, 1 Feb 2012 13:02:02 +0000 (14:02 +0100)]
Remove duplicated function from QCocoaEventDispatcher

The qt_mac_waitForMoreModalSessionEvents() is identical to
qt_mac_waitForMoreEvents(), except that it passes a different inMode
parameter to [NSApp nextEventMatchingMask]. Change the latter function
to take the mode as a parameter itself, defaulting to the default mode.

Change the dequeue parameter to [NSApp nextEventMatchingMask] from YES
to NO. Having the function dequeue the event, and then immediately
reposting the event is not necessary.

Change-Id: Iba45d41ad3ff4d5721d1068e6d5c78585cb15810
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoDon't include config.tests/unix/openssl/openssl.pri
Bradley T. Hughes [Thu, 2 Feb 2012 08:07:27 +0000 (09:07 +0100)]
Don't include config.tests/unix/openssl/openssl.pri

This file was removed in commit ba9302b8a9b6b50f37987261c1ade9af2ade2d3c

Change-Id: Ib3a70877f6f6848c8cf072faf13da93abbe186f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agofix memory leak of QAccessibleWidget
Jian Liang [Wed, 1 Feb 2012 06:24:00 +0000 (14:24 +0800)]
fix memory leak of QAccessibleWidget

in topLevelObjects() we should use "root->object()" instead of
"w->accessibleRoot()->object() to get the object attached to the
accessible interface. This is because "w->accessibleRoot()"
will create a new QAccessibleWidget(or its subclass) object
and this object is never released.

Change-Id: I34292b467b51d6cc439f0a1a45cd74d5f8a6a5a8
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agotests: do not run benchmarks by default in 'make check'
Sergio Ahumada [Wed, 1 Feb 2012 15:27:17 +0000 (16:27 +0100)]
tests: do not run benchmarks by default in 'make check'

`make check' is intended primarily for running functional tests.
For the most part, it does not make sense to run benchmarks in the same
test environment as the functional tests.

Change-Id: I79f867fdab295bdbd4c4b3c785dfd7ede520022e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAvoid duplicating flags/types in qmetaobjectbuilder
Kent Hansen [Wed, 1 Feb 2012 20:43:22 +0000 (21:43 +0100)]
Avoid duplicating flags/types in qmetaobjectbuilder

Presumably the contents from qmetaobject_p.h were copied
because qmetaobjectbuilder originally lived outside of qtbase,
and private headers could not be included from other modules.
But now we can just include the right headers.

Change-Id: I975df1ea94455f1bf0db1d8024de8f5379fc9fc7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
12 years agoFixed selftests unittest on windows
Kurt Korbatits [Wed, 1 Feb 2012 02:03:59 +0000 (12:03 +1000)]
Fixed selftests unittest on windows

- Needed to add toLower() for compare as c:\ and C:\ was causing
  a failure.

Change-Id: Idd55774d118b7249e88362688166b4f9d9712c7c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoFixed qfile unittest on windows
Kurt Korbatits [Wed, 1 Feb 2012 00:08:33 +0000 (10:08 +1000)]
Fixed qfile unittest on windows

- Changed to set working directory based on subprogram
  stdinprocess's directory location.
- Changed QProcess execution of subprograms to use
  relative paths.

Change-Id: Idbccca635f0f61adba9721bcceeceb0a8a961dcf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd selftest for xpass in a data-driven test.
Jason McDonald [Wed, 1 Feb 2012 04:53:33 +0000 (14:53 +1000)]
Add selftest for xpass in a data-driven test.

Change-Id: I9491d1e17ad31453ec353a11c9efb31522a16459
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove readability of expectfail selftest.
Jason McDonald [Wed, 1 Feb 2012 04:33:42 +0000 (14:33 +1000)]
Improve readability of expectfail selftest.

Rename some of the test functions to improve consistency, and change the
order so that all the xfail tests are together (some new xpass tests
will be added later).

Change-Id: Ice1ac5bf61bc26109bb0d08f72eb74e1a0424101
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd testlib selftest for counting of test results.
Jason McDonald [Tue, 31 Jan 2012 04:07:58 +0000 (14:07 +1000)]
Add testlib selftest for counting of test results.

The test simply generates each possible pair of Pass, Fail and Skip
results.  At present the test simply serves to demonstrate the current
shortcomings of testlib's plain text logging, namely:

* If a test function passes for all data rows, that is counted as one
  pass, but each skipped or failed row counts as one skip or fail.

* Only skipped and failed rows are reported individually in the test
  output. Passed rows are not reported, so it is impossible to see how
  many rows were executed.

* A skip followed by a pass will be reported as an overall pass for the
  test function, but the same rows in reverse order will not report any
  overall result for the test function.

Future commits will attempt to correct these problems.

Task-number: QTBUG-22124
Change-Id: If8c7ea15fc43ba9a1bccd0e881c1efc18e705b25
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qtextbrowser unittest to work from install directory
Kurt Korbatits [Fri, 27 Jan 2012 04:47:54 +0000 (14:47 +1000)]
Changed qtextbrowser unittest to work from install directory

- Changed qtextbrowser unittest to use TESTDATA and QFINDTESTDATA

Change-Id: I0ac7c990640d492d5ec94f5824c022a2b5075103
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qlabel unittest to work from install directory
Kurt Korbatits [Fri, 27 Jan 2012 03:29:07 +0000 (13:29 +1000)]
Changed qlabel unittest to work from install directory

- Changed qlabel unittest to use TESTDATA and QFINDTESTDATA

Change-Id: Ide6755cd79caf91b553fb6b1412da6fbab583720
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoqopenglcontext not checking for null and failing with platform minimal
Kurt Korbatits [Tue, 24 Jan 2012 21:10:47 +0000 (07:10 +1000)]
qopenglcontext not checking for null and failing with platform minimal

- The minimal platform plugin returns null and was causing segfault.

Change-Id: Ied262692f77e9801c3d3451de7f21539f7686ca4
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agopixmap: Add QPlatformPixmap::fromData null check for the image
Holger Hans Peter Freyther [Mon, 23 Jan 2012 13:02:48 +0000 (14:02 +0100)]
pixmap: Add QPlatformPixmap::fromData null check for the image

QPlatformPixmap::fromFile is doing the null check,
QRasterPlatformPixmap::fromData is doing the null check as
well. Add the null check to QPlatformPixmap::fromData as
well. This would have avoided a crash in the directfb plugin.

Change-Id: Ifc904b2df2424e86bf0992d4e28dc256530be02d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix some warnings from clang
Lars Knoll [Wed, 1 Feb 2012 16:04:19 +0000 (17:04 +0100)]
Fix some warnings from clang

One of them was a real error, that could
lead to Data::alloc containing wrong values.

Change-Id: I48315ef6fd59188630107ebbe7bf8dbaa5da689e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoIntroduce QItemDelegate::destroyEditor virtual invoked at editor close
Thorbjørn Lund Martsum [Thu, 15 Dec 2011 15:48:51 +0000 (16:48 +0100)]
Introduce QItemDelegate::destroyEditor virtual invoked at editor close

This provides a stronger mechanism e.g when inheriting QItemDelegate.

It makes some things much easier e.g avoid delete of an editor
and maybe only delete depending on what the editor says itself.

This introduces a new virtual function.

Task-number: QTBUG-2299

Change-Id: I8410f8199775987dbacffd99e4c354fdadcdd21f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoTrivial fix in qjsonobject.h for -Werror=shadow
Jani Uusi-Rantala [Wed, 1 Feb 2012 12:34:52 +0000 (14:34 +0200)]
Trivial fix in qjsonobject.h for -Werror=shadow

There was a few errors coming from other components
using qtbase - error: declaration of 'o' shadows a
member of 'this' [-Werror=shadow].

Change-Id: Ib394f404370f001e68fde8b424cd5fff527d8fe7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMove QPlatformDialogs from QtWidgets to QtGui.
Friedemann Kleint [Wed, 1 Feb 2012 10:01:21 +0000 (11:01 +0100)]
Move QPlatformDialogs from QtWidgets to QtGui.

- Remove dependency of the Windows platform plugin on
  QtWidgets.

Change-Id: Iceb876ba7df46b49966af0fc101816654eedb5c5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoqabstractitemmodel.cpp: Fix warnings.
Friedemann Kleint [Wed, 1 Feb 2012 08:01:31 +0000 (09:01 +0100)]
qabstractitemmodel.cpp: Fix warnings.

Change-Id: I10ef89e2fab31c7f1c9ac67b2234f509fb3f28ab
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoUse QBasicMutex instead of Q_GLOBAL_STATIC QMutex
Olivier Goffart [Sun, 29 Jan 2012 19:32:22 +0000 (20:32 +0100)]
Use QBasicMutex instead of Q_GLOBAL_STATIC QMutex

QBasicMutex is a POD and can be used as a static global object.

in qpicture.cpp factoryLoader is used only once, and under the mutex, so
there is no need for Q_GLOBAL_STATIC for it, it can be a function static

in qhostinfo_unix.cpp the code seemed wrong while compiled with
namespace and QT_NO_GETADDRINFO.  I also could get rid of one include
because it was included earlier.

Change-Id: I3c700203c3e067266c20733f4bda8031446dbb86
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix parsingMode not used anymore, detected by compiler warning
David Faure [Wed, 1 Feb 2012 10:55:35 +0000 (11:55 +0100)]
Fix parsingMode not used anymore, detected by compiler warning

This came from replacing d->parsingMode with parsingMode when moving
the method to the Private class.

Change-Id: I5a025ea1128dacda97d265d401a329dbbbfb0ff7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoAdded WindowOverridesSystemGesturesHint to our window flags.
Gunnar Sletta [Wed, 1 Feb 2012 11:48:13 +0000 (12:48 +0100)]
Added WindowOverridesSystemGesturesHint to our window flags.

Change-Id: I42c3d3e5ef71960d16f85969b66380999fb15922
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoPrevent data loss when an ssl socket is closed by remote
Shane Kearns [Mon, 30 Jan 2012 15:52:27 +0000 (15:52 +0000)]
Prevent data loss when an ssl socket is closed by remote

SSL context was destroyed on disconnect. This makes it impossible to
decrypt buffered encrypted data. So if there is encrypted data in the
receive buffers, then don't destroy the ssl context until the socket is
destroyed.

Task-Number: QTBUG-23607
Change-Id: I16a7b4fa006647ec73049c90cdbc72686696850f
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoRemove Symbian specific code in 3rdparty.
Xizhi Zhu [Mon, 23 Jan 2012 17:45:45 +0000 (18:45 +0100)]
Remove Symbian specific code in 3rdparty.

Symbian specific code in libtiff was added by commit
6ddf09085f1e8a3cc83c4ee0c77c433d26819c35 in Qt4, code in libpng was
added by commit 66fb4038649cfd1d660204bf7c70f99a409ede4f in Qt4, so
they are removed.

Symbian specific code in freetype was copied from upstream, so kept
untouched.

Change-Id: I74f169d9283eefd91ec2e97cbd1b8f03dc449380
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoWindows configure: make -mp affect the Qt build itself
Joerg Bornemann [Wed, 1 Feb 2012 10:19:27 +0000 (11:19 +0100)]
Windows configure: make -mp affect the Qt build itself

Before -mp and -no-mp affected only projects built with Qt.
There was no way to turn off msvc_mp for the Qt build.
Qt projects can add msvc_mp themselves.

Task-number: QTBUG-23929

Change-Id: I08b9ec762c59d2604635d73396044a74f717728c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix QDnslookup build on FreeBSD
Jeremy Lainé [Wed, 1 Feb 2012 08:34:04 +0000 (09:34 +0100)]
Fix QDnslookup build on FreeBSD

Unify the includes for resolver function on unix-like platforms
to avoid build failures on BSD platforms.

Change-Id: I9accd7077d5a319a2c93642e011492d0fc779394
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoExtending the auto test for QHeaderView
Thorbjørn Lund Martsum [Sun, 1 Jan 2012 10:24:04 +0000 (11:24 +0100)]
Extending the auto test for QHeaderView

This is a test that verifies correct behaviour of qheaderview.
It includes test of swapSections, moveSection, rowcount-change,
resizeSection, hideSection and position lookup.

Change-Id: Idc1fe8167f2d95dee5c5b1161cb633cbf9495d17
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQHeaderView - Do not try to remove non-existing section
Thorbjørn Lund Martsum [Thu, 15 Dec 2011 07:11:16 +0000 (08:11 +0100)]
QHeaderView - Do not try to remove non-existing section

The end parameter passed to removeSectionsFromSpans is off by one.
removeSectionsFromSpans can currently handle/ignore it, but it is
still wrong.

Change-Id: I9148bd106504a37a5c8fd72928ab84c669eebcdb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoSQL driver implementation to signal notification sources
Torben Dannhauer [Tue, 24 Jan 2012 20:27:36 +0000 (21:27 +0100)]
SQL driver implementation to signal notification sources

Implements the new notification signal in all QSql drivers which use notifcation.
In qt5 only ibase and psql have a notification implementation.
PSQL differentiates correctly between 'SelfSource' and 'OtherSource' whereas
ibase only signals 'UnknownSource' as a default implementation.

Change-Id: Ifcaa139b7a980ed852cf817b3f93284609360ca7
Reviewed-by: Torben Dannhauer <torben@dannhauer.info>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoInterface definition to provide notifications with a source information.
Torben Dannhauer [Tue, 24 Jan 2012 19:55:37 +0000 (20:55 +0100)]
Interface definition to provide notifications with a source information.

To differentiate between signals of different sources types, this submission adds an enum and extra signal to provide it.

Change-Id: Iad711739c41894e9c74d83072c50ae17edc695f2
Reviewed-by: Torben Dannhauer <torben@dannhauer.info>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoRemove the API duplication from QApplication.
Stephen Kelly [Tue, 31 Jan 2012 11:17:32 +0000 (12:17 +0100)]
Remove the API duplication from QApplication.

The quitOnLastWindowClosed API is present in the base
class QGuiApplication.

Change-Id: Ib2f78e48a198aa835302dcb9a31637a2c3655532
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: David Faure <faure@kde.org>
12 years agoWindows: Fix inclusion of <windows.h>
Friedemann Kleint [Wed, 1 Feb 2012 09:19:07 +0000 (10:19 +0100)]
Windows: Fix inclusion of <windows.h>

- Always use <qt_windows.h> as the last file to be included.
- Remove it from some headers, use Qt::HANDLE instead of HANDLE.
- Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE.
- Add NOMINMAX to qt_windows.h to avoid problems with the
  min/max macros.
- Remove <windows.h> from qplatformdefs.h (VS2005)

Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoAdding a QHeaderView benchmark
Thorbjørn Lund Martsum [Sun, 8 Jan 2012 21:37:01 +0000 (22:37 +0100)]
Adding a QHeaderView benchmark

This is a small QHeaderView benchmark.

It measures visualIndexAt, hideSection, showSecion, moveSection,
insert, remove and trunc rows.

Change-Id: Ibca6a2e130f4ab27d68f51e5e341a78579abd1bf
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoRevert "Put the generated <module>version.h into build tree"
Bradley T. Hughes [Wed, 1 Feb 2012 09:45:51 +0000 (10:45 +0100)]
Revert "Put the generated <module>version.h into build tree"

After discussion with Liang, I'm reverting it as he requested. This change put every header into the SYNCQT.HEADER_FILES twice for in-source builds, and the qtMODULEversion.h header did not include a path component.

This reverts commit 2fbc45b58bba860abf67fb28aa1319c9f4ededaf

Change-Id: Ie84cef19193ce5e49072f1f67a41140d9d2673b8
Reviewed-by: Liang Qi <liang.qi@nokia.com>
12 years agoAccessibility: Use new updateAccessibility() API in widgets.
Friedemann Kleint [Wed, 1 Feb 2012 09:00:06 +0000 (10:00 +0100)]
Accessibility: Use new updateAccessibility() API in widgets.

Change-Id: Id69cc28a54abc675a991f2c657a446f38313ac6e
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoIntroduced BufferQueueingOpenGL capability in platofrm integration
Gunnar Sletta [Tue, 31 Jan 2012 08:14:52 +0000 (09:14 +0100)]
Introduced BufferQueueingOpenGL capability in platofrm integration

Change-Id: Iedb7255862fd3a11aceae0e06e90a5539febc7e7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQtDebug: Include file, line, function information
Kai Koehne [Tue, 17 Jan 2012 15:20:45 +0000 (16:20 +0100)]
QtDebug: Include file, line, function information

Record the file, line, and function where a qDebug, qWarning, qCritical
or qFatal call happens, and make this information available in a custom
message handler.

The patch uses the C preprocessor to replace qDebug, qWarning, ... with
a line that also records the current file, line, and function. Custom
message handlers can access this information via a new QMessageLogContext
argument.

Change-Id: I0a9b89c1d137e41775932d3b1a35da4ebf12d18d
Reviewed-by: David Faure <faure@kde.org>
12 years agoCompile with clang
Morten Johan Sorvig [Tue, 31 Jan 2012 20:06:18 +0000 (21:06 +0100)]
Compile with clang

Add back friend declaration removed in e8105e4.
QListViewPrivate uses QAbstractItemView::
DropIndicatorPosition, which is protected.

Change-Id: Ie9fa9422bf4fb7846637dac24a644d4814cfe622
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
12 years agoEmit QSslSocket::error in case of openssl gives an error.
Jonas M. Gastal [Thu, 26 Jan 2012 13:28:39 +0000 (11:28 -0200)]
Emit QSslSocket::error in case of openssl gives an error.

Create new QAbstractSocket::SocketError value that denotes a error in
the SSL library: SslInternalError
Create QAbstractSocket::SocketError value that denotes a error in data
provided by user cauding an SSL library error: SslInvalidUserDataError

Change-Id: I466a9389d9d7052efd8eddd1a2d6067ba26dfddb
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoQHeaderView - preventing negative section sizes.
Thorbjørn Lund Martsum [Tue, 10 Jan 2012 18:33:14 +0000 (19:33 +0100)]
QHeaderView - preventing negative section sizes.

This patch removes the posibility to call resizeSection
with negative sizes.

Sections with negative sizes affect the other sections,
and it does not seem to have a useful, well-defined semantic.

The length can also become negative - and visualIndexAt
work strange.

Change-Id: I632beb160649fa10e2106314557b8c5a106aa3cf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoChange syncqt default parameters for shadow building
Kalle Juhani Lehtonen [Mon, 23 Jan 2012 07:27:06 +0000 (17:27 +1000)]
Change syncqt default parameters for shadow building

For shadow builds configure creates syncqt script to shadow build
directory tree calling the original syncqt from qtbase source tree.
This wrapped script will add two default parameters when calling
the original script. Both parameters are overridden in
qtbase/mkspecs/features/default_pre.prf and are not needed except by
configure script itself in latter stages where the parameter should be
applied explicitly in shadow build condition branch.

In addition, it adds the qtdir parameter for the forwarded syncqt call to
indicate the location of qt sources for the syncqt. This also will give
correct qmake path for qtmodule-configtests script triggered from syncqt.

Changes are done both for Linux and Windows configure.

Change-Id: I307b2e76c203ee14b849f10ff629f9668da2f223
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd the event loop quitlock feature to QtCore.
Stephen Kelly [Wed, 26 Oct 2011 11:29:51 +0000 (13:29 +0200)]
Add the event loop quitlock feature to QtCore.

A feature of a ref-counted quit (managed by a quit-lock class)
is added to both QEventLoop and QCoreApplication.

This allows, for example, an event loop to quit() when there is
no more work for it to do.

quitOnLastWindowClosed is implemented in terms of the refcount in
QCoreApplication so that jobs can be completed before the
application quits.

Change-Id: I14c8f4e7ee12bbf81a6e5849290d4c8ff37fa110
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoDon't compile UIC with -O2 inside Scratchbox
Tor Arne Vestbø [Tue, 31 Jan 2012 13:24:03 +0000 (14:24 +0100)]
Don't compile UIC with -O2 inside Scratchbox

It makes QEMU crash when running the resulting binary.

Change-Id: I94e5d703205827dea88770336a8c5201e7333486
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoadd virtual destructor to QWindowSystemInterfacePrivate::WindowSystemEvent
jian liang [Fri, 27 Jan 2012 13:08:53 +0000 (21:08 +0800)]
add virtual destructor to QWindowSystemInterfacePrivate::WindowSystemEvent

Add a virtual destructor to
QWindowSystemInterfacePrivate::WindowSystemEvent class. Otherwise, in
QWindowSystemInterface::sendWindowSystemEvents() "delete event" can't
destruct the subclass of WindowSystemEvent properly.

Change-Id: Ic708f4ab61de88cd0015aa6e472d356b2de64583
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQHeaderView - fix to resizeSection patch (Ia812a747)
Thorbjørn Lund Martsum [Mon, 19 Dec 2011 18:37:09 +0000 (19:37 +0100)]
QHeaderView - fix to resizeSection patch (Ia812a747)

A minor simple adjustment to the update-patch for resizeSection.
( http://codereview.qt-project.org/#change,11267 )

We can't just return and ignore that we might needed to call
d->doDelayedResizeSections

Just because the header does not have updates enabled does not
mean that the view hasn't updates enabled - and even in
that situation we actually still wanted to keep this.

(It is only if the parent is not visible we safe can/should
skip this - but I will look into that later)

Change-Id: I771de086a07d1e7612a6bfea132d4d15f277ceb3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQHeaderView::setOffsetToSectionPosition documentation update
Thorbjørn Lund Martsum [Sun, 22 Jan 2012 18:52:58 +0000 (19:52 +0100)]
QHeaderView::setOffsetToSectionPosition documentation update

The documentation has used the word visualIndex for the argument
to this function. That is however very misleading since this
visualIndex is not the same as 'visualIndex' as we have in

visualIndex(int logicalIndex)
logicalIndex(int visualIndex)
or visualIndexAt(int position)

Beside the above a variable name has also been changed from
visualIndex to actualVisualIndex.

Change-Id: I43808adfd7c287a349474ab1e2656c417c8cf3e9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQDir::NoDotAndDotDot is now QDir::NoDot|QDir::NoDotDot.
Jonas M. Gastal [Mon, 30 Jan 2012 13:09:13 +0000 (11:09 -0200)]
QDir::NoDotAndDotDot is now QDir::NoDot|QDir::NoDotDot.

Change-Id: I8ef7782258c2ec02ad2ec2a5d5cab90f53c62aa3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMaliit: Fix enter on VKB not resulting in text input field acceptance
Simon Hausmann [Tue, 31 Jan 2012 11:28:52 +0000 (12:28 +0100)]
Maliit: Fix enter on VKB not resulting in text input field acceptance

Pressing enter on the VKB should result in the emission of the accepted()
for text input fields in QML or the returnPressed() signal in QLineEdit.
In that case the Maliit input server calls our keyEvent method over DBus,
which this patch implements.

Change-Id: I46170c30315adaf21db0e232f53780ccaa67e4bf
Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
12 years agoRename meego to maliit platforminputcontext
Jan Arne Petersen [Mon, 30 Jan 2012 11:42:50 +0000 (12:42 +0100)]
Rename meego to maliit platforminputcontext

Also build the plugin on linux systems with D-Bus. There is nothing
MeeGo or Maemo specific about this plugin or Maliit.

Task-number: QTBUG-22994
Change-Id: Idcccfb01f79166a54c5809741389b29ccac05a15
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoAdd support for cleanup functions for data-constructed QImages
Simon Hausmann [Tue, 31 Jan 2012 12:32:22 +0000 (13:32 +0100)]
Add support for cleanup functions for data-constructed QImages

A QImage can be constructed with a provided buffer, that has to be
kept alive for the live-time of the QImage and all its copies.
Frameworks like CoreGraphics or Cairo offer a similar method of
creating image objects and also offer the ability to provide a callback
function that is called when the image is destroyed.

This patch adds this functionality to QImage by extending the
QImage constructors that take a raw image buffer pointer.

Change-Id: Ia6342408c560ef49b498c9e4664b4602febb0fcd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAllow function types to be registered without workarounds
João Abecasis [Wed, 25 Jan 2012 16:40:24 +0000 (17:40 +0100)]
Allow function types to be registered without workarounds

Commit 4b8ceb41aed352f10d36db5284453f425dbc5f3f added the requirement
that pointed-to types need to be registered when registering pointer
types. Unfortunately, the implementation also affects function pointer
types.

This change whitelists 0, 1, 2 and 3 argument functions as not deriving
from QObject, forgoing the need to workaround details of the type
registration implementation when registering those function pointer
types.

Change-Id: I4d855e9d70a8179a6e31b84623ad5bf063e0d6d8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoRemove many deprecated methods
Lars Knoll [Tue, 24 Jan 2012 21:26:31 +0000 (22:26 +0100)]
Remove many deprecated methods

Remove methods that have been marked as deprecated
before Qt 4.6. Keep others, but inline them
where possible and mark them as QT_DEPRECATED_SINCE(5, 0).

Change-Id: If881821ae095f054b31cc13464f19e2007c20ed7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoMinGW build fixes for QWindowsPipeReader and friends
Joerg Bornemann [Tue, 31 Jan 2012 11:10:45 +0000 (12:10 +0100)]
MinGW build fixes for QWindowsPipeReader and friends

Change-Id: Ie4d6017c6fb918e7796d1a5e8863e9368e4e1894
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWindows: Fix compilation with -qtnamespace
Kai Koehne [Mon, 30 Jan 2012 10:26:27 +0000 (11:26 +0100)]
Windows: Fix compilation with -qtnamespace

Change-Id: Ib006d74299d65e5872a5a524eaa937e127306ec7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoMac: Fix compilation with -qtnamespace set
Kai Koehne [Mon, 30 Jan 2012 08:52:51 +0000 (09:52 +0100)]
Mac: Fix compilation with -qtnamespace set

Change-Id: Id3b9f4e3edf2caeac32c8a44278cdf05a1fc70fb
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agomkdtemp() support for QNX platform
Rafael Roquetto [Tue, 24 Jan 2012 17:14:07 +0000 (18:14 +0100)]
mkdtemp() support for QNX platform

Change-Id: I30feebbbcdbe065e899a048da20ac887d4d48a4f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
12 years agoMoving tiff image format support and libtiff out of qtbase
aavit [Wed, 25 Jan 2012 15:04:51 +0000 (16:04 +0100)]
Moving tiff image format support and libtiff out of qtbase

The tiff plugin and bundled libtiff is moving to the qtimageformats
project on Gerrit.

Task-number: QTBUG-23887
Change-Id: I4c848232fdccddd7e7f54215f9eaa78dc4c3a53d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUse events for accessibility updates.
Frederik Gladhorn [Wed, 11 Jan 2012 15:31:35 +0000 (16:31 +0100)]
Use events for accessibility updates.

The problem with the old updates is that it was impossible
to send details about the update.
For the Linux implementation to work properly with AT-SPI I need to know
which state changed (currently I only get a generic "state changed" event)
or which part of the text was changed for long texts (imagine a word processor sending updates).

This also gives us more options when updating with events generated from not QObject based objects.

Change-Id: If0b6c83c523092565eb48e79f3f6de5a1b905ea8
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoAdd public role names setter to QStandardItemModel
Chris Adams [Mon, 30 Jan 2012 01:04:07 +0000 (11:04 +1000)]
Add public role names setter to QStandardItemModel

This allows QStandardItemModel to be usable in QML without requiring
clients to subclass it.

Task-number: QTBUG-15067
Change-Id: I867fcd8137132affdf21f37a9fa293e855a09a13
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQDirectPainter is gone in Qt5
Lars Knoll [Wed, 25 Jan 2012 11:13:26 +0000 (12:13 +0100)]
QDirectPainter is gone in Qt5

Change-Id: I3ba8985c9c38be978198a4abd58775aa6f525968
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
12 years agoEscape path names in qmake-generated Makefiles.
Andreas Hartmetz [Mon, 30 Jan 2012 21:06:51 +0000 (22:06 +0100)]
Escape path names in qmake-generated Makefiles.

qmake-generated Makefiles since 4.6 (according to bug report) contain
recursive qmake invocations with absolute paths to .pro files, where the
absolute paths are not escaped.

Task-number: QTBUG-11776
Change-Id: I49772c7d9147efea3bb7b9623c61d92aa0bb6857
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemoving bad ###Qt5 note.
Jonas M. Gastal [Mon, 30 Jan 2012 15:02:25 +0000 (13:02 -0200)]
Removing bad ###Qt5 note.

Implementating this would cause massive SC breakage and give little
gain.

Change-Id: I56a6d302fdd0e8b53d1f9154f3eaf9e1ee429f9d
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoRemove Symbian specific code from qtbase.
Xizhi Zhu [Mon, 23 Jan 2012 20:25:30 +0000 (21:25 +0100)]
Remove Symbian specific code from qtbase.

Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove Symbian specific code from QtGui.
Xizhi Zhu [Mon, 23 Jan 2012 19:13:54 +0000 (20:13 +0100)]
Remove Symbian specific code from QtGui.

Change-Id: I450a78863462936d0b18e211763f274b59497109
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix QGuiApplication::topLevelWindows(), introducing allWindows()
Anselmo L. S. Melo [Fri, 27 Jan 2012 10:49:34 +0000 (07:49 -0300)]
Fix QGuiApplication::topLevelWindows(), introducing allWindows()

As discussed on the development mailing list, the window list returned
by QGuiApplication::topLevellWindows() included all QWindows, even the
non top-level ones.
This commit introduces the new method allWindows(), which returns the list
of all QWindows, fixes the list returned by topLevelWindows() and also
introduces tests for both methods.

Change-Id: I761f0fcdec79f83949012c628655ed12cd18572c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove Symbian and Maemo 5 code from QtWidgets.
Xizhi Zhu [Mon, 23 Jan 2012 18:37:27 +0000 (19:37 +0100)]
Remove Symbian and Maemo 5 code from QtWidgets.

Change-Id: I715c0ec70cbad05a6ba9737e49be9da7cbd65bf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQValidator: Don't fallback to C Locale when validating input
John Layt [Mon, 23 Jan 2012 22:34:09 +0000 (22:34 +0000)]
QValidator: Don't fallback to C Locale when validating input

QIntValidator and QDoubleValidator used to accept C formatted input if
the input wasn't valid in the default locale.  This change removes this,
only the default locale is now used.

Change-Id: I8b2d8f9f3849abe3fcb5c12083aae542a76eaf90
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agofix memory leak in QGuiApplicationPrivate
jian liang [Fri, 27 Jan 2012 09:07:18 +0000 (17:07 +0800)]
fix memory leak in QGuiApplicationPrivate

delete app_font object in QGuiApplicationPrivate's destructor

Change-Id: Iad0c5a69e03477f6c93fcf76c58bac001cbdffb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoRemove QIconEngineV2 and fold it into QIconEngine
Lars Knoll [Wed, 25 Jan 2012 12:58:17 +0000 (13:58 +0100)]
Remove QIconEngineV2 and fold it into QIconEngine

Change-Id: Ife590b7639f4aadcfbd4d77ca170285b623c14ae
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoWindows: Fix autotests with -qtnamespace
Kai Koehne [Mon, 30 Jan 2012 11:12:38 +0000 (12:12 +0100)]
Windows: Fix autotests with -qtnamespace

Change-Id: If367429dafc283b3b2d57dab593060055f65659d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoxcb: Check for SHM extension before using it
Uli Schlachter [Sat, 28 Jan 2012 21:35:15 +0000 (22:35 +0100)]
xcb: Check for SHM extension before using it

If we call any xcb_shm_*() function, libxcb will have to figure out
SHM's major number. However, if that fails because the SHM extension is
not available, xcb will disconnect from the server. Obviously, that's
not what we want and must be avoided.

Change-Id: I8eba5ff9e84e0e2017a5c0d88fda4efd0459bd1e
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoxcb: Check for SYNC extension before using it
Uli Schlachter [Sat, 28 Jan 2012 21:47:30 +0000 (22:47 +0100)]
xcb: Check for SYNC extension before using it

If we call any xcb_sync_*() function, libxcb will have to figure out
SYNC's major number. However, if that fails because the SYNC extension
is not available, xcb will disconnect from the server. Obviously,
that's not what we want and must be avoided.

Change-Id: I9a1032e1cfac074a52bafcb0772304bfd423e770
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agotst_qabstractitemmodel does not need QT += widgets
Mark Brand [Fri, 13 Jan 2012 16:05:34 +0000 (17:05 +0100)]
tst_qabstractitemmodel does not need QT += widgets

Change-Id: I6f615f849f77df19129efb82acaae387b17a787b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoChanged qapplication unittest to work from installation directory
Kurt Korbatits [Wed, 25 Jan 2012 01:29:16 +0000 (11:29 +1000)]
Changed qapplication unittest to work from installation directory

- Changed to use TESTDATA and installTestHelperApp()
- Changed to use QFINDTESTDATA instead of currentPath()

Change-Id: Ia24ebc758d5d0fdfcca951500766adefbcf9fe93
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qlibrary unittest to use applicationDirPath()
Kurt Korbatits [Tue, 24 Jan 2012 23:40:10 +0000 (09:40 +1000)]
Changed qlibrary unittest to use applicationDirPath()

- Changed unittest to use QCoreApplication::applicationDirPath()
  instead of QDir::currentPath().

Change-Id: I398f7ea8b4426be85432d0eb3767ef6d59488d0a
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove non existant features from qfeature.h
Lars Knoll [Wed, 25 Jan 2012 11:17:56 +0000 (12:17 +0100)]
Remove non existant features from qfeature.h

This doesn't clean it all up, but at least removes
things that are clearly gone from Qt. We still
have way too many individual feature switches.

Change-Id: I7926ee8cf72567a86257f1e7b0d852f11ff5f4bb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoChanged debug output to option in qminimalbackingstore.
Kurt Korbatits [Mon, 23 Jan 2012 00:35:19 +0000 (10:35 +1000)]
Changed debug output to option in qminimalbackingstore.

- Added QT_DEBUG_BACKINGSTORE environment variable to enable
  debug output. Defaulting to no output if not set.

Change-Id: Id9c369031f946d77605321c8b28ab3378da8fbf9
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRevert "Revert "Blow up earlier when adding test rows without columns.""
Robin Burchell [Fri, 27 Jan 2012 12:41:24 +0000 (14:41 +0200)]
Revert "Revert "Blow up earlier when adding test rows without columns.""

The problem in qmltest has now been fixed by adding a dummy column, so this
should be good to re-add. See qtdeclarative change id
I1bfed663fa7b58d71e0cf898db6bd8ae61dae46b.

This reverts commit 963958b4f62513cbc76fb06920de80f7f906f523.

Task-number: QTBUG-23845
Change-Id: I4b6755d3ea97a4624480cc008d280fc8e33743a6
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agodirectfb: Use QPlatformPixmap::fromFile for Qt resources
Holger Hans Peter Freyther [Mon, 23 Jan 2012 12:49:35 +0000 (13:49 +0100)]
directfb: Use QPlatformPixmap::fromFile for Qt resources

Move to fromFile to load Qt resources for two reasons. The
first is that ::fromData creates a QBuffer on our raw data
and is passing that to the QImageReaders. Right now we there
is a QFile -> QByteArray -> QBuffer transition that wastes
cycles. The other reason is that QPlatformPixmap::fromData
did/does not check if the decoded image is null and might
cause a crash because of that.

Change-Id: I7cb92d84874323e7205ab28883cc0fe9ecca1e27
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUpdate contact address in license headers.
Jason McDonald [Mon, 30 Jan 2012 07:27:40 +0000 (17:27 +1000)]
Update contact address in license headers.

Change-Id: I35bf916087511f26bfeb49ceb3256d9a20fbc1c0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed qstandardpaths unittest to check before using first()
Kurt Korbatits [Thu, 26 Jan 2012 22:26:11 +0000 (08:26 +1000)]
Fixed qstandardpaths unittest to check before using first()

- Added check to testLocateAll() to check count() before calling
  first().

Change-Id: I04e93c1f913972b26c517f2bbd08760f9898cc7a
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qsplitter unittest to work from install directory
Kurt Korbatits [Fri, 27 Jan 2012 02:52:41 +0000 (12:52 +1000)]
Changed qsplitter unittest to work from install directory

- Changed qsplitter unittest to use TESTDATA and QFINDTESTDATA

Change-Id: I5db0fbfb20e6bd0ec169e884f16c1ec819f4e449
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed qicon unittest to use QFINDTESTDATA
Kurt Korbatits [Thu, 26 Jan 2012 23:33:33 +0000 (09:33 +1000)]
Fixed qicon unittest to use QFINDTESTDATA

- Two cases of image.png not being found when run from install directory

Change-Id: I5f20b7a0ea0b120ce06c556b83bc20dd658a4f83
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>