profile/ivi/qtbase.git
11 years agoQNX: Move qpa-based mkspecs out of the unsupported directory
Sean Harmer [Tue, 4 Sep 2012 09:42:23 +0000 (10:42 +0100)]
QNX: Move qpa-based mkspecs out of the unsupported directory

RIM is committed to supporting Qt on its platforms and the port works
well.

Change-Id: Id6bfea2dbc178800adad89d436ce31c40d3eb652
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agofix QT_{BEGIN,END}_INCLUDE_NAMESPACE mixup
Oswald Buddenhagen [Mon, 3 Sep 2012 14:50:53 +0000 (16:50 +0200)]
fix QT_{BEGIN,END}_INCLUDE_NAMESPACE mixup

Change-Id: Id25b6aa56681b5bb5989472a96128789c0c4e73a
Reviewed-by: hjk <qthjk@ovi.com>
11 years agoAuto test for 'qmake -project' use case.
Rafael Roquetto [Fri, 10 Aug 2012 15:21:30 +0000 (17:21 +0200)]
Auto test for 'qmake -project' use case.

Change-Id: Ifb6d64828ba1cb42fd64299438b7eec302112edf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoFix indentation.
Morten Sorvig [Wed, 15 Aug 2012 11:27:32 +0000 (13:27 +0200)]
Fix indentation.

Change-Id: I0e53df9e1903c8cdc79d50c16cfe7f90ae6e1d6f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoQWizard/Win: Fix vista helper cache state invalidation
Jonathan Liu [Tue, 4 Sep 2012 05:30:21 +0000 (15:30 +1000)]
QWizard/Win: Fix vista helper cache state invalidation

If the cached state is not dirty and the instanceCount is zero, when the
instanceCount is incremented the cached state will not be correct. To
fix this, reset the cached state to dirty if the instanceCount is
incremented from zero.

Change-Id: Ic49eef7f83b1289a939f998817b1b2b5f5a2a45f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agographicsview: use std::sort instead of qSort
Robin Burchell [Sun, 2 Sep 2012 10:18:14 +0000 (12:18 +0200)]
graphicsview: use std::sort instead of qSort

In almost all cases, std::sort is wildly faster than qSort - but especially in
the case where the input data is already sorted. in some stress tests which ran
through the index with a lot of items, this commit provides huge speedup (684ms
down to 10ms for painting 15001 empty items on the provided benchmark), for me.

Task-number: QTBUG-11022
Change-Id: I5551f8e320c33ba13d464bf22047a665c81f3b74
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
11 years agoDoc: fix yet more errors reported by qdoc
aavit [Mon, 3 Sep 2012 11:45:33 +0000 (13:45 +0200)]
Doc: fix yet more errors reported by qdoc

Change-Id: I67ac081ce95235912784bbbc347dd8f80fdebbde
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
11 years agoQNX: Tidy up QMAKE_LFLAGS in qnx mkspecs
Sean Harmer [Mon, 3 Sep 2012 13:50:33 +0000 (14:50 +0100)]
QNX: Tidy up QMAKE_LFLAGS in qnx mkspecs

We do not need to include -lang-c++ more than once in QMAKE_LFLAGS*
variables. The fact that this was not appearing more than once was due
to QMAKE_LFLAGS being overwritten (rather than appended to) in
qcc-base-qnx.conf and a weird coincindence in qmake's code to dedupe
libraries passed in to QMAKE_LFLAGS. The deduping was working based
upon options beginning with "-l", including the -lang-c++ option here.

Change-Id: I983f216c0e362a9fe6a924074c5d84aaa659a14f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoGenerate includes for Qt containers used as auto-metatypes.
Stephen Kelly [Mon, 3 Sep 2012 10:55:38 +0000 (12:55 +0200)]
Generate includes for Qt containers used as auto-metatypes.

Otherwise the containers might be forward declared in the moc file,
and when the moc file is compiled in a standalone translation unit,
the full definition of it would not be available. This results in
odd compile errors, so instead generate the includes if required.

Change-Id: Ie01c5a5d45314daad0b00dec03b3e1e18cdbae64
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoremove handling of QMAKE_FILETAGS
Oswald Buddenhagen [Thu, 16 Aug 2012 19:20:02 +0000 (21:20 +0200)]
remove handling of QMAKE_FILETAGS

it was unused for a decade. and broken, of course.

Change-Id: I9713d595d95c5b074ef96dfe9b1c314b9198bd7e
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoremove unnecessary QMAKESPEC fallback code
Oswald Buddenhagen [Thu, 16 Aug 2012 09:43:48 +0000 (11:43 +0200)]
remove unnecessary QMAKESPEC fallback code

QMAKESPEC is now always set

Change-Id: Ib3f7356a9260d42315747095e28db6604b2dcfe9
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoremove pretenses of manual dependencies
Oswald Buddenhagen [Tue, 28 Aug 2012 13:28:44 +0000 (15:28 +0200)]
remove pretenses of manual dependencies

now that "make depend" actually works again, just clean out the gunk.

Change-Id: Ia1858a2474c9a4544ae16c53349aa7ae09e0c685
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agounbreak "make depend" for shadow builds
Oswald Buddenhagen [Tue, 28 Aug 2012 13:27:31 +0000 (15:27 +0200)]
unbreak "make depend" for shadow builds

Change-Id: Ib79ba79e41cfeac9350852395b03c331dc4fe2a3
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agounify c*flags in the hand-written makefiles somewhat
Oswald Buddenhagen [Tue, 21 Aug 2012 16:02:35 +0000 (18:02 +0200)]
unify c*flags in the hand-written makefiles somewhat

Change-Id: I7a7139fd71bce879b3ee4d9e26e30d2ca63da69e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agofix assignment of MSVCPROJ_TARGET
Oswald Buddenhagen [Thu, 16 Aug 2012 10:01:43 +0000 (12:01 +0200)]
fix assignment of MSVCPROJ_TARGET

i'm only guessing what was intended here.

Change-Id: I72bfa3b5fad63f5b144d34762152e4dd851197ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoCleaner support for window flags in QCocoaWindow
Gabriel de Dietrich [Fri, 6 Jul 2012 11:39:31 +0000 (13:39 +0200)]
Cleaner support for window flags in QCocoaWindow

Window flags were not properly forwarded to the platform window
instance. Particularly in the use cases found in QtQuick desktop
components.

Change-Id: Ibeadfee7de95ba497e9c0f765acee77c84884466
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
11 years agoUse QStringList::join(QChar) overload where applicable [QtSql]
Marc Mutz [Fri, 18 May 2012 18:00:23 +0000 (20:00 +0200)]
Use QStringList::join(QChar) overload where applicable [QtSql]

This is an automated change performing the following replacements:
                    join\("(.)"\) -> join('\1')
  join\(QLatin1String\("(.)"\)\)  -> join(QLatin1Char('\1'))
  join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1'))

Change-Id: Ie395d82d17710683968d006d22de313ef49dc6e5
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
11 years agoClarify QDateTime documentation re timeSpec conversion.
Mitch Curtis [Mon, 3 Sep 2012 13:26:39 +0000 (15:26 +0200)]
Clarify QDateTime documentation re timeSpec conversion.

Clarify the documentation for setTimeSpec, toTimeSpec, toUTC and
toLocalTime, to be clear on which ones return the same point in time,
and which one simply changes the timezone.

Change-Id: Ic47dd8876ea733f1df0f64eca5bdf00d04f8d0d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoNeed #include <string.h> to use memcpy
Shawn Rutledge [Wed, 18 Jul 2012 13:02:01 +0000 (15:02 +0200)]
Need #include <string.h> to use memcpy

Caused a compile failure in qtmultimedia.

Change-Id: I73652d93848c2005c0132d24bb0d269e7b450396
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
11 years agoconfigure: Fix infinite loop displaying config.summary
Jonathan Liu [Mon, 3 Sep 2012 10:54:33 +0000 (20:54 +1000)]
configure: Fix infinite loop displaying config.summary

Displaying config.summary sometimes results in an infinite loop because
the loop condition only checks that failbit and badbit are not set.
The eofbit may be set with failbit and badbit not set.

Change-Id: I209480fbf114365fd4fdf1289c988a386f9f2562
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoFix docs of qAbs to have the correct function signature.
Jan-Arve Saether [Mon, 3 Sep 2012 08:13:34 +0000 (10:13 +0200)]
Fix docs of qAbs to have the correct function signature.

Change-Id: I984032dc58387ae8f28318beeb053af28ccc8885
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agofix a mismatch of using QT_NO_NETWORKPROXY
Jing Bai [Mon, 3 Sep 2012 08:23:34 +0000 (10:23 +0200)]
fix a mismatch of using QT_NO_NETWORKPROXY

To fix a compile error when QT_NO_NETWORKPROXY is defined.

Change-Id: If0433387cff2e6574fe24721a0ce2bfc41b0eb47
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoQStandardPaths should still work without desktop service
Jing Bai [Mon, 3 Sep 2012 08:14:38 +0000 (10:14 +0200)]
QStandardPaths should still work without desktop service

To fix a compile problem when QT_NO_DESKTOPSERVICES is defined.
We should enable QStandardPaths on Mac even without desktop service,
since it doesn't rely on desktop service and it is used in other files.

Change-Id: I29267ebfe81b79c598043f8287fd2bb419573570
Reviewed-by: David Faure <faure@kde.org>
11 years agoQDBusPendingCallPrivate: save 8 bytes on 64-bit archs
Marc Mutz [Fri, 24 Aug 2012 09:00:07 +0000 (11:00 +0200)]
QDBusPendingCallPrivate: save 8 bytes on 64-bit archs

Moved waitingForFinished out from between two large-type variables to
save eight bytes per QDBusPendingCallPrivate on 64bit platforms.

Many a mickle makes a muckle.

Change-Id: I5612ad8bb907c6770be0245e667bdb2add30d38b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQDBusPendingCall: remove unneeded volatile qualification
Marc Mutz [Fri, 24 Aug 2012 09:00:07 +0000 (11:00 +0200)]
QDBusPendingCall: remove unneeded volatile qualification

The variable waitingForFinished is only ever read under mutex protection, so
a volatile qualification isn't necessary.

Change-Id: I17ce3fbfb090c8ae5e43dd2a93e4f48810dbbff3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQDBusPendingCall: add a missing QWaitCondition::wakeAll() call
Marc Mutz [Fri, 24 Aug 2012 08:27:02 +0000 (10:27 +0200)]
QDBusPendingCall: add a missing QWaitCondition::wakeAll() call

In QDBusConnectionPrivate::waitForFinished(), threads that see
pcall->waitingForFinished == true go to sleep on
pcall->waitForFinishedCondition, but there was no call to
waitForFinishedCondition.wakeAll() anywhere in the code, so add it.

Change-Id: I8d068dc0cc4f20786eb40fd7e2bb9840d8b70c7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQStringList::join: add an overload taking a single QChar
Marc Mutz [Fri, 18 May 2012 16:38:25 +0000 (18:38 +0200)]
QStringList::join: add an overload taking a single QChar

This overload avoids the needless heap allocation that the traditional
overload incurs due to the implicit QChar -> QString conversion
involved there.

In order to share the implementation between the two overloads,
QStringList_join now takes the separator as a (Char*,int) tuple
instead of as a QString.

Change-Id: I92961f13a3f19099de2a6e2df9f4789a12fc83a0
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoRename MAC_CONFIG_TEST_COMMANDLINE to MAC_SDK_FLAG
Danny Boelens [Tue, 24 Jul 2012 15:05:08 +0000 (17:05 +0200)]
Rename MAC_CONFIG_TEST_COMMANDLINE to MAC_SDK_FLAG

The Mac OS X SDK is the only thing that variable is
used for, so give it a name that better fits its use.

Change-Id: Ifd9866bc19edda0e9f0bcb17270eb26a8849401e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoRemove the package macros from qglobal.h
Thiago Macieira [Tue, 28 Aug 2012 14:47:56 +0000 (16:47 +0200)]
Remove the package macros from qglobal.h

It's the wrong place to have these.

Change-Id: I3b716317ba02ea2baf0f7053c8b16128e4c88e17
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoChange SChar to metatype id 40.
Stephen Kelly [Fri, 31 Aug 2012 15:08:04 +0000 (17:08 +0200)]
Change SChar to metatype id 40.

This fills the gap left by QWidgetStar, making the sequence
between FirstCoreType and LastCoreType contiguous, which some
benchmarks assume to be true anyway.

Change-Id: I2d5d202b6246a9065fdf77f325a4a04279dbe4b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoCommand-line-only examples should not build as .app bundles on OSX
Shawn Rutledge [Thu, 30 Aug 2012 12:51:06 +0000 (14:51 +0200)]
Command-line-only examples should not build as .app bundles on OSX

It's confusing when you double-click it and nothing happens.

Task-number: QTBUG-26976
Change-Id: I50c5625a41881bdbcbf29001197ed15da4ee0a28
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
11 years agofix docs
Frederik Gladhorn [Wed, 29 Aug 2012 17:45:16 +0000 (19:45 +0200)]
fix docs

Change-Id: Id57b7932afb89fe9d3f4f6e6c3b558265475d77b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agodoc: fix example link
Frederik Gladhorn [Wed, 29 Aug 2012 15:34:45 +0000 (17:34 +0200)]
doc: fix example link

Change-Id: Ie0235281c3a4d5e5dadc6e5823bbf722b7ca411f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agoFix doc errors in QScreen.
Jason Barron [Fri, 31 Aug 2012 07:53:39 +0000 (09:53 +0200)]
Fix doc errors in QScreen.

- Ensure all args are documented
- Remove signals from \sa tag
- Ensure return values are documented

Change-Id: I1db111d082ee47f046598695bc3fa53d67798333
Reviewed-by: aavit <qt_aavit@ovi.com>
11 years agoQWizard/Win: Fix incorrect cached state after all wizards destroyed
Jonathan Liu [Sun, 2 Sep 2012 14:11:57 +0000 (00:11 +1000)]
QWizard/Win: Fix incorrect cached state after all wizards destroyed

If a QWizard is shown when Aero is enabled, the current visual style is
cached in a static member of QVistaHelper. The cached state is updated
by QVistaHelper when it receives WM_THEMECHANGED or
WM_DWMCOMPOSITIONCHANGED events from Windows.

If all QWizard instances are destroyed, there are no instances of
QVistaHelper to receive these notifications and update the cache. If
Aero is now disabled, the cached current visual style in QVistaHelper
isn't updated. If a wizard is now created and shown, a large black
rectangle is shown in the titlebar.

A static instance count is added so that when no wizards are running,
the cached state is not used.

Task-number: QTBUG-27004
Change-Id: Iefe4c8552388280219c9726418ed7476b8ebb15a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoFix MinGW-w64 GCC 4.6.3 compilation
Jonathan Liu [Sat, 1 Sep 2012 06:13:25 +0000 (16:13 +1000)]
Fix MinGW-w64 GCC 4.6.3 compilation

Several IShellLibrary constants and the COMDLG_FILTERSPEC struct are
already defined in newer versions of the MinGW-w64 headers.

Change-Id: I614b35c835123484aeeb4e61e0bae24261584da0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoPrivate slots should be named starting with _q_
Sergio Ahumada [Fri, 31 Aug 2012 21:48:30 +0000 (23:48 +0200)]
Private slots should be named starting with _q_

This is to reduce the risk of collisions with signals/slots in user classes

 q_updateFocusObject(QObject *object) => _q_updateFocusObject(QObject *object)
 q_checkFocusObject(QObject *object)  => _q_checkFocusObject(QObject *object)
 q_connectFocusObject()               => _q_connectFocusObject()
 emitActivated(QPlatformSystemTrayIcon::ActivationReason) => _q_emitActivated(QPlatformSystemTrayIcon::ActivationReason)

Change-Id: I148913f1e24a80fe5cacfd737d1b455b805cfced
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agoqpa: incorrect rendering when stretching and clipping
Julien [Thu, 30 Aug 2012 07:21:01 +0000 (09:21 +0200)]
qpa: incorrect rendering when stretching and clipping

When using QBlittable with SourceOverScaledPixmapCapability, rendering
through clipAndDrawPixmap is incorrect when stretching: source pixmap
rectangle has to be corrected using scaling factor.

Change-Id: I7026987f5c47094a4578c0da4ccb67a0241d64bd
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Julien BRIANCEAU <jbrianceau@nds.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
11 years agoProperly reflect format changes in calendarwidget example.
Mitch Curtis [Thu, 30 Aug 2012 12:02:39 +0000 (14:02 +0200)]
Properly reflect format changes in calendarwidget example.

This patch ensures that May 1st and the first Friday of each month also
have their formats updated when the corresponding checkboxes are
unchecked instead of just checked.

Task-number: QTBUG-26936
Change-Id: Ib5f77daf8d9000eeb18663b2e07e4842a70d22b6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agoFix moc generating invalid code for slots with reference types as argument.
Volker Krause [Sun, 2 Sep 2012 14:30:47 +0000 (16:30 +0200)]
Fix moc generating invalid code for slots with reference types as argument.

We can't have T& declared/registered as a metatype (wont compile), but
using it as type for a slot argument is possible. With the recent
introduction of metatype auto-registration we have to make sure that moc
doesn't attempt to auto-register those. Simple types are handled correctly
already, this fixes containers and smart pointers.

Change-Id: Id96857c57d6ebf158a67e9d527c89dc195473b1b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoIntroduce hook for text cursor changes in QTextEdit and QPlainTextEdit
hjk [Tue, 28 Aug 2012 07:33:09 +0000 (09:33 +0200)]
Introduce hook for text cursor changes in QTextEdit and QPlainTextEdit

Currently it is hard for Q{Plain}TextEdit subclasses to keep track
of changes of the text cursor by direct calls to setTextCursor from
arbitrary code. By redirecting the setTextCursor to a virtual
function subclasses get the chance to intercept such calls.

Change-Id: Id92d9c86928b97285b0f5b7b39790442dfac3e50
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agocheckForCodecs is not used when QT_LOCALE_IS_UTF8 is defined
Jiang Jiang [Fri, 31 Aug 2012 14:36:45 +0000 (16:36 +0200)]
checkForCodecs is not used when QT_LOCALE_IS_UTF8 is defined

Change-Id: I3d82863cbd123dbf73eb8f5721ef9294e6365de6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoAdd a task number to ctest_testcase insignification
Rohan McGovern [Fri, 31 Aug 2012 02:50:27 +0000 (12:50 +1000)]
Add a task number to ctest_testcase insignification

Make sure it doesn't get lost.

Task-number: QTBUG-27087
Change-Id: I8b773cfa4b1b9ab5430096c2cff50911e84b73f7
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
11 years agomips: Autodetect MIPS DSP rev1 and rev2 instructionset
Holger Hans Peter Freyther [Fri, 20 Jul 2012 13:03:56 +0000 (21:03 +0800)]
mips: Autodetect MIPS DSP rev1 and rev2 instructionset

Not every MIPS SoC has the DSP extensions, auto-detect them by using
builtin GCC functions. Check for the DSP macros and add the result
for rev1 and rev2 to the cpufeatures.

Change-Id: I3d6c950f170f102514c43b349f9a23ee796d801a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoFind qdoc indexes in relative paths.
Frederik Gladhorn [Wed, 29 Aug 2012 15:34:06 +0000 (17:34 +0200)]
Find qdoc indexes in relative paths.

Change-Id: Ie717e85bfc3d49173d1ae4caf2a01ad6e9b8b625
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
11 years agoUse QString() instead of "".
Frederik Gladhorn [Wed, 29 Aug 2012 11:37:49 +0000 (13:37 +0200)]
Use QString() instead of "".

Change-Id: I42c55344663808b8362e2c9185273a00fc1c70b0
Reviewed-by: Martin Smith <martin.smith@nokia.com>
11 years agoDon't reference widgets/widgets in example doc.
Frederik Gladhorn [Wed, 29 Aug 2012 08:25:56 +0000 (10:25 +0200)]
Don't reference widgets/widgets in example doc.

Change-Id: Ie1fe516f75ca8c1b2233dc6bb2b887b55593e730
Reviewed-by: Martin Smith <martin.smith@nokia.com>
11 years agoDoc: Fix docbuild when not using -developer-build.
Casper van Donderen [Fri, 31 Aug 2012 17:12:36 +0000 (19:12 +0200)]
Doc: Fix docbuild when not using -developer-build.

https://codereview.qt-project.org/#change,33974 only works in the case
of a developer build. Not in a normal prefix build.

Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoFix address book example.
Frederik Gladhorn [Fri, 24 Aug 2012 22:56:36 +0000 (00:56 +0200)]
Fix address book example.

Change-Id: I2e0cb03bb7e9585edf44d4464af17848069337ee
Reviewed-by: Martin Smith <martin.smith@nokia.com>
11 years agoFix graphicsview docs.
Frederik Gladhorn [Fri, 24 Aug 2012 21:45:31 +0000 (23:45 +0200)]
Fix graphicsview docs.

Change-Id: I9438e64dbbc859fc60eb41a1bc664af35b762894
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
11 years agoMoved gui example documentation to the proper location.
Samuel Rødal [Fri, 31 Aug 2012 13:43:49 +0000 (15:43 +0200)]
Moved gui example documentation to the proper location.

Gui example documentation should be in examples/gui/doc/

Change-Id: I3cd196a2bb5d76b6e275f336b29a2ad1811159dd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoDoc: Fix some documentation issues.
Kim Motoyoshi Kalland [Thu, 30 Aug 2012 13:22:59 +0000 (15:22 +0200)]
Doc: Fix some documentation issues.

Change-Id: I21bba7b8a1808cf214cae1b7d3b6b5e41e36e3ba
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoDoc: Add documentation for deprecated function.
Kim Motoyoshi Kalland [Thu, 30 Aug 2012 13:08:52 +0000 (15:08 +0200)]
Doc: Add documentation for deprecated function.

Change-Id: If1e76e4ac7f1da5f0362a7774b3341a4fedb31b0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoDoc: Fix wording in \brief section.
Kim Motoyoshi Kalland [Thu, 30 Aug 2012 11:51:51 +0000 (13:51 +0200)]
Doc: Fix wording in \brief section.

Change-Id: I60748a681cce6bd61805376b2a2cd38d2020e68e
Reviewed-by: aavit <qt_aavit@ovi.com>
11 years agoDoc: Remove documentation for removed function.
Kim Motoyoshi Kalland [Thu, 30 Aug 2012 11:04:25 +0000 (13:04 +0200)]
Doc: Remove documentation for removed function.

Change-Id: I3d2b4078f7c442b636e4848048c41f9f8223c98b
Reviewed-by: aavit <qt_aavit@ovi.com>
11 years agoMoved snippets from widgets to gui so that they are found by qdoc.
Kim Motoyoshi Kalland [Thu, 30 Aug 2012 10:56:29 +0000 (12:56 +0200)]
Moved snippets from widgets to gui so that they are found by qdoc.

Change-Id: I3245366c26dfffc6c2eb062e9710460c32e4b8d8
Reviewed-by: aavit <qt_aavit@ovi.com>
11 years agoadd macro wrap for QXmlStream related code
Jing Bai [Wed, 29 Aug 2012 11:48:43 +0000 (13:48 +0200)]
add macro wrap for QXmlStream related code

To fix a compile error when QXmlStream is removed by defining macro,
but it is still used in some files.

Change-Id: I776c799732212b7401767440448248fc7b5dc480
Reviewed-by: David Faure <faure@kde.org>
11 years agoQDoc: Write SHA1 of .qhp to file.
Casper van Donderen [Thu, 30 Aug 2012 11:16:27 +0000 (13:16 +0200)]
QDoc: Write SHA1 of .qhp to file.

QDoc should generate a SHA1 hash of the .qhp file to be able to use that
file as a search index. The idea is that we can use the hash as an
identifier to check if the search index was updated.

Change-Id: Ifd19571bcebf7d735ef452dca6c046a14fedc0e2
Reviewed-by: Martin Smith <martin.smith@nokia.com>
11 years agoauto tests: updated for new QStyle pure virtuals
J-P Nurmi [Tue, 28 Aug 2012 13:33:35 +0000 (15:33 +0200)]
auto tests: updated for new QStyle pure virtuals

QStyle::standardIconImplementation() & layoutSpacingImplementation()
are removed, and standardIcon() & layoutSpacing() made pure virtual.

Change-Id: If8ab6cfef0b639b7973be22dd630ba3e6f39a225
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
11 years agoQXxxStyle: override standardIcon() & layoutSpacing()
J-P Nurmi [Mon, 27 Aug 2012 11:40:30 +0000 (13:40 +0200)]
QXxxStyle: override standardIcon() & layoutSpacing()

QStyle::standardIconImplementation() & layoutSpacingImplementation()
are removed, and standardIcon() & layoutSpacing() made pure virtual.

Change-Id: Ibf43323d0cf6c3b6cec4547afe8e826e120f74ba
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
11 years agoQStyle: make standardIcon() & layoutSpacing() virtual
J-P Nurmi [Fri, 24 Aug 2012 15:27:52 +0000 (17:27 +0200)]
QStyle: make standardIcon() & layoutSpacing() virtual

Removes standardIconImplementation() and layoutSpacingImplementation()
that were added in Qt 4 as a workaround for binary compatibility reasons.

Change-Id: I45292dc6802310d6cda4f443bb7484b061af0138
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agotest: Mark tst_QFile::writeLargeDataBlock() unstable failure as XFAIL
Sergio Ahumada [Tue, 21 Aug 2012 20:17:34 +0000 (22:17 +0200)]
test: Mark tst_QFile::writeLargeDataBlock() unstable failure as XFAIL

The test has one unstable failure on Windows, so mark this with QEXPECT_FAIL

Task-number: QTBUG-26906
Change-Id: I2f6c63ddefecacd224d93f83e6951e961a02a051
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agoDon't set empty CMAKE_TOOLCHAIN_FILE or CMAKE_BUILD_TYPE
Stephen Kelly [Fri, 31 Aug 2012 09:59:30 +0000 (11:59 +0200)]
Don't set empty CMAKE_TOOLCHAIN_FILE or CMAKE_BUILD_TYPE

The CMake Visual Studio 10 generator generates an include() for
the empty CMAKE_TOOLCHAIN_FILE, causing the errors in the bug.

There may be other remaining errors to cause the Windows CMake build
to fail with that generator, but this patch is an improvement
anyway - there is no point in setting empty strings as values for
those variables.

Task-number: QTBUG-27087
Change-Id: I68cce9e3dce07835db5f42777ac02d440f90f967
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoDoc: More fixes of qdoc-reported doc errors
aavit [Fri, 31 Aug 2012 14:39:49 +0000 (16:39 +0200)]
Doc: More fixes of qdoc-reported doc errors

Change-Id: I2dd815c471e56d2c239a63e7c7ad3496af2a585b
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
11 years agoDoc: Fixes for several doc errors
aavit [Thu, 30 Aug 2012 14:18:26 +0000 (16:18 +0200)]
Doc: Fixes for several doc errors

Change-Id: I5be9c8e9ff9c17fae0fbbe468f34439411aca06b
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
11 years agoMake QGraphicsView respect scrollbar policies
Jeremy Lainé [Mon, 30 Jan 2012 06:42:51 +0000 (07:42 +0100)]
Make QGraphicsView respect scrollbar policies

When calculating the maximum height / width which a QGraphicsView can display,
make sure we only take the scrollbars' dimensions into account if their policy
is set to Qt::ScrollBarAsNeeded:

- if the policy is set to Qt::ScrollBarAlwaysOff, the scrollbar will not be
  displayed at all

- if the policy is set to Qt::ScrollBarAlwaysOn, the scrollbar's dimensions
have already been substracted from the available space by
QAbstractScrollArea::maximumViewportSize()

Task-number: QTBUG-14711
Change-Id: If5d24b41dbe7b089abca2bf61ccbd370d4de79a1
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agoUse pkg-config to search for all XCB dependencies
Thiago Macieira [Thu, 30 Aug 2012 20:25:52 +0000 (22:25 +0200)]
Use pkg-config to search for all XCB dependencies

The XCB platform plugin requires several XCB libraries to work. Without
this fix, we get the build error in compileTest only, which is hard to
check.

Change-Id: I6b599f5ad32661e9dc01db11705d702920350cfa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoForce QT_NO_ICONV on win32:!win32-msvc*
Lukas Geyer [Tue, 28 Aug 2012 08:11:10 +0000 (10:11 +0200)]
Force QT_NO_ICONV on win32:!win32-msvc*

This behaviour was changed in Ide9800f6 to suppress
macro redefinition warnings for MSVC, but MinGW
has iconv support and therefore configure does not
set QT_NO_ICONV, which prevents compilation on win32-g++
as QIconvCodec does not support Windows.

Change-Id: Ic3c4ccceb3eaf9542c95b0c27847ca5ab51849b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
11 years agoUse the right getter for the QScreen::primaryOrientation property.
Jason Barron [Fri, 31 Aug 2012 07:31:51 +0000 (09:31 +0200)]
Use the right getter for the QScreen::primaryOrientation property.

Change-Id: I408e4941163cd676133b2e41613162f52b685076
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoFix updating of drag icons.
Friedemann Kleint [Wed, 29 Aug 2012 14:06:05 +0000 (16:06 +0200)]
Fix updating of drag icons.

Try to find a target widget that accepts drops; ignore the event
if none can be found. Split the handleDrag*() functions
to reduce indentation.

Add an autotest.

Task-number: QTBUG-22987
Change-Id: I516ac5f0c002caaf83c52ac16f821246e565230f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
11 years agoFix the name of the arguments of qAtan2 to match std::atan2
Thiago Macieira [Fri, 31 Aug 2012 09:53:34 +0000 (11:53 +0200)]
Fix the name of the arguments of qAtan2 to match std::atan2

There is no change in functionality, just swapping of the names x and y.
The std::atan2 function uses (y, x) in that order, so we should too.

Task-number: QTBUG-27090
Change-Id: I7d4597a6c6909f574c517033f5d49fe17b7a7ead
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoMove the creation of the MODULE_DEFINES variable above the pri file check.
Stephen Kelly [Thu, 30 Aug 2012 11:46:14 +0000 (13:46 +0200)]
Move the creation of the MODULE_DEFINES variable above the pri file check.

The MODULE_DEFINES is also used by create_cmake.prf, whether there is an existing
pri file or not. In the case of QtWebKit at least, there is still a handwritten
pri file present.

Change-Id: I566c32a36aa6b84a455c2785c0da2bae57ea9091
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoReport a FATAL_ERROR if trying to use Qt 5 with CMake < 2.8.3.
Stephen Kelly [Thu, 30 Aug 2012 09:47:53 +0000 (11:47 +0200)]
Report a FATAL_ERROR if trying to use Qt 5 with CMake < 2.8.3.

Change-Id: I76cad71c96a5def170715568e6a16b1168cbb2cd
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoAdd missing QT_{BEGIN,END}_NAMESPACE
Sergio Ahumada [Thu, 30 Aug 2012 21:33:41 +0000 (23:33 +0200)]
Add missing QT_{BEGIN,END}_NAMESPACE

Fix src/network/kernel/qnetworkfunctions_wince.h

Change-Id: Ia59c1e67f9409abb97fce3fcaa3840e0d77c0978
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoHeader contains `signals' - use `Q_SIGNALS' instead!
Sergio Ahumada [Wed, 29 Aug 2012 16:47:39 +0000 (18:47 +0200)]
Header contains `signals' - use `Q_SIGNALS' instead!

Change-Id: I5ee1bfd0ce9c98d64b50cc727d414037fafb91c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
11 years agoDocument the purpose of QDateTimeParser::cachedDay.
Mitch Curtis [Thu, 30 Aug 2012 14:58:47 +0000 (16:58 +0200)]
Document the purpose of QDateTimeParser::cachedDay.

It's useful to know what this member variable is used for, since there
is very little documentation for QDateTimeParser, which makes
maintenance yucky.

Change-Id: I9ecf5aa5ef0b5d778ceb858c323e3bab1ebaa7dc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoDoc: Simplify qtbase qdocconfs.
Casper van Donderen [Thu, 30 Aug 2012 15:51:30 +0000 (17:51 +0200)]
Doc: Simplify qtbase qdocconfs.

We should be using the global qdocconf for the common variables. This
change also allows you to just specify -installdir without using a
templatedir.

Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
11 years agoDoc: Fix various errors
aavit [Thu, 30 Aug 2012 12:25:17 +0000 (14:25 +0200)]
Doc: Fix various errors

Change-Id: I07503dd379779148b674ab0f806f6eeac5d7d4b7
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
11 years agoFix QScreen::grabWindow() on Windows
aavit [Tue, 28 Aug 2012 13:57:47 +0000 (15:57 +0200)]
Fix QScreen::grabWindow() on Windows

Finish up 94ac17c2ccbe3b3f3671848afda9430be214f8d5

Task-number: QTBUG-26963

Change-Id: I13f52f0a6cf460d525b53338738aecd4b3cf313c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoFix MinGW-w64 TDM64-GCC 4.6.1 compilation
Jonathan Liu [Wed, 29 Aug 2012 12:09:47 +0000 (22:09 +1000)]
Fix MinGW-w64 TDM64-GCC 4.6.1 compilation

This fixes a regression introduced by
f58390e0f495e229d9f2f1301c3a9dec978af9c2 because __MINGW64_VERSION_MAJOR
is the same in older releases of shobjidl.h that do not declare the
IFileDialogEvents interface.

Task-number: QTBUG-24699
Change-Id: I000a5b9baf52363dfdedff2fb29bbe7ab24df5ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoMSVC/OpenGL: Fix warnings about macro redefinition..
Friedemann Kleint [Mon, 27 Aug 2012 09:47:01 +0000 (11:47 +0200)]
MSVC/OpenGL: Fix warnings about macro redefinition..

Introduced by fc41ee4c92ce703f3e4374bf493505a1d847a657 .

Change-Id: I4c924b0b0a38401ab02c3cc4edb7d78dbd9ef356
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoDoc: Fix misc. documentation errors
aavit [Thu, 30 Aug 2012 11:30:51 +0000 (13:30 +0200)]
Doc: Fix misc. documentation errors

Change-Id: I9481ed452922ed5ecd159a8f60d7fbcb3683cec1
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
11 years agoImprove performance of QArrayData::Grow autotest
João Abecasis [Sun, 29 Jul 2012 22:33:18 +0000 (00:33 +0200)]
Improve performance of QArrayData::Grow autotest

Doing element-wise insertions for the full range of the test made
testing under valgrind extremely slow. When a reallocation is detected
we now resize() the container close to capacity(), while verifying this
doesn't unnecessarily re-allocate either.

Change-Id: Idf7015cf390e366fe444e7ca14c904a2d54ff48b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoMake plugintest util work on Windows.
Jason Barron [Wed, 29 Aug 2012 09:10:13 +0000 (11:10 +0200)]
Make plugintest util work on Windows.

Command line apps that use stdout need the CONSOLE subsystem.

Change-Id: Ic220f45119ea70372e27b4a364f7264cc649726d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
11 years agoAvoid a warning from the QNX QPA plugin.
James Turner [Thu, 30 Aug 2012 10:02:25 +0000 (11:02 +0100)]
Avoid a warning from the QNX QPA plugin.

The HDMI display on the Playbook is listed, but (normally) unattached,
and hence generates an error if we attempt to register for events. This
patch avoids the warning; a future change will actually watch for screens
being attached / detached and update the QPlatformScreens and event
registration correctly.

Change-Id: I5a9cc773648d50f657fe1b3611fd42495ca7e836
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
11 years agoQSqlQueryModel: suppress insert and remove signals while resetting
Mark Brand [Wed, 29 Aug 2012 08:14:08 +0000 (10:14 +0200)]
QSqlQueryModel: suppress insert and remove signals while resetting

There is no need to emit signals for inserting and removing rows
and columns while resetting the model. Suppress these signals in
such a way that subclasses can benefit without worrying about it.

Change-Id: I04447c87173be54a7323b97608cdd40ae245b80b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoQSqlQueryModel: fix nested beginResetModel/endResetModel
Mark Brand [Wed, 29 Aug 2012 07:34:41 +0000 (09:34 +0200)]
QSqlQueryModel: fix nested beginResetModel/endResetModel

Follow-up to 83c9ebbd6692cde99ee692e6549c591100f12545.

Consider the case where calls to the reset methods on the same object
are nested as in the following sequence:

  1. beginResetModel()
  2. beginResetModel()
  3. endResetModel()
  4. endResetModel()

In such cases, only the outermost calls, i.e., 1) and 4), should emit
signals.

After 83c9ebbd6692cde99ee692e6549c591100f12545, 1) and 3) emitted the
signals, which is wrong. This is corrected by keeping track of the
nesting level.

Such sequences can come about when a base class calls the begin/end
methods between the calls made by the subclass.
QSqlTableModel::select() is an example of this.

Test included.

Change-Id: Ia62b45cb1abaab00a32bb8357de4a958bcff83e5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agodocs: remove \reimp from non-virtual methods
Mark Brand [Wed, 29 Aug 2012 10:05:06 +0000 (12:05 +0200)]
docs: remove \reimp from non-virtual methods

It seems we need \internal in this case.

Change-Id: I3f290bb0d22f9f3b5d04d27b13a7ef8961b2dd6c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoFix static plugins for classes in namespaces.
Friedemann Kleint [Thu, 30 Aug 2012 09:27:36 +0000 (11:27 +0200)]
Fix static plugins for classes in namespaces.

Breakage introduced by 819d0203e6fd9d27dc4c22e8c3cb8b437998f62a .

Extend QT_MOC_EXPORT to take the unqualified class name
as well for the function names.

Change-Id: I736097b564caa37c522d723780663d03341f9032
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
11 years agoEnsure that printer orientation is preserved
Titta Heikkala [Thu, 9 Aug 2012 07:54:09 +0000 (10:54 +0300)]
Ensure that printer orientation is preserved

After setting the printer name the initialization is no longer done for
a printer with a name. Instead doReinit() method is called to preserve
the orientation (set with setOrientation() method before calling
setPrinterName()). Before the orientation was changed back to default
when setPrinterName() method was called ignoring the orientation set.

Updated also the autotest because the case:
taskQTBUG4497_reusePrinterOnDifferentFiles() is no longer expected to
fail on Windows.

Task-number: QTBUG-26008
Change-Id: Ia6bc9ae14d79a646e61bfc97652f9f5af90738b3
Reviewed-by: Andy Shaw
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoLogging: Remove mutex for OutputDebugString
Kai Koehne [Tue, 28 Aug 2012 07:22:06 +0000 (09:22 +0200)]
Logging: Remove mutex for OutputDebugString

OutputDebugString seems indeed to be thread safe, at least according
to http://www.unixwiz.net/techtips/outputdebugstring.html . I also didn't
manage to run into any deadlocks on Windows 7 ...

The comment + code was already there (in qcoreapplication_win.cpp) in
the first git commit that imported Qt.

Change-Id: I442e22575558958ef21ab8c6b4cc8b03aee906b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoMake tests/auto/corelib compile on Windows CE
Kevin Funk [Tue, 28 Aug 2012 15:13:42 +0000 (17:13 +0200)]
Make tests/auto/corelib compile on Windows CE

Change-Id: I71987d40ae69d95f645c4c7d26d50add4c799327
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoTemporarily mark ctest testcases as insignificant on Windows
Rohan McGovern [Wed, 29 Aug 2012 06:56:56 +0000 (16:56 +1000)]
Temporarily mark ctest testcases as insignificant on Windows

The deployment of cmake onto Windows test machines caused test failures
with no changes to the code under test.  Mark all the ctest tests as
insignificant until the failures can be fixed.

Change-Id: If0cd4001ae6ec49fd38b9e0f97dd5326fddae433
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agodist/changes-5.0.0: note that QtConcurrent is a separate library these days
Marc Mutz [Mon, 27 Aug 2012 10:59:22 +0000 (12:59 +0200)]
dist/changes-5.0.0: note that QtConcurrent is a separate library these days

Change-Id: Ib8ab6e40d9827697d1061a1b369e150f33d63be9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoFixes possible memory leak in QContiguousCache
Fabian Bumberger [Mon, 27 Aug 2012 21:29:18 +0000 (17:29 -0400)]
Fixes possible memory leak in QContiguousCache

When inserting an item on a position that is already occupied, the destructor of the old item was never invoked.

Change-Id: I01dc4ec9f2da5027284eba94e1a9ad36b062a50d
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQVarLengthArray: C++11-ify insert/erase signatures
Marc Mutz [Thu, 24 May 2012 06:26:46 +0000 (08:26 +0200)]
QVarLengthArray: C++11-ify insert/erase signatures

In C++11, container insert and erase operations take const_iterators
instead of iterators. This is a bug fix compared to C++98, where the
mere lookup step of a lookup-or-insert operation had to be done using
(mutable) iterators, which is particularly worrisome for Qt containers
that are implicitly shared, because of the unneeded detach in the positive
case.

QVarLengthArray is not implicitly shared, but for consistency, the signatures
should be changed here, too. The reason this commit contains only the change
to QVarLengthArray is that this is by far the easiest container. The
implictly shared containers are harder, because detaching invalidates other
iterators (more than the sister STL container would).

Change-Id: Ib3d98360bfe376b782b9d1283c5fa3555e8a719e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoQString::append: add (const QChar*, int len) overload
Marc Mutz [Fri, 18 May 2012 16:58:29 +0000 (18:58 +0200)]
QString::append: add (const QChar*, int len) overload

Both insert and replace have this overload, so one reason to add it
to append(), too, is consistency. But I can also make good use of
this overload in the the new QStringList::join(QChar) overload, so
it's actually useful in its own right.

Change-Id: Iccd48f9cb84831399e4db7e3e78eba25c0ced30d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoDocument how to remove a QGraphicsEffect.
Richard Moore [Sun, 26 Aug 2012 12:34:15 +0000 (13:34 +0100)]
Document how to remove a QGraphicsEffect.

You can remove an effect by setting 0, but this wasn't documented.

Change-Id: I2d86875d8554cb26b4d88b8ce04b4daa9792c5d5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agoFixed the QTreeView expansion/collpasing when animated
Thierry Bastian [Wed, 29 Aug 2012 12:24:40 +0000 (14:24 +0200)]
Fixed the QTreeView expansion/collpasing when animated

If you had a QTreeView with expandable items, if you tried to expand and while
the animation was still running you'd try to collpase the node,
the display would be completely broken: the items below that items would
not be visible any more except for a fraction of a second when expanding
or collapsing it again.
The problem is in the fact that when starting an animation the QTreeView
stores the state before animating. And it does that even if an animation
is already running. So the stateBeforeAnimation becomes AnimatingState and
when the animation finishes, AnimatingState is the state that is restored
breaking the painting.
Unit test is included.

Change-Id: I015212c1ed8962e6df705655099a5660f195caf3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoMade QImage::fill(uint pixel) for RGB888 accept QRgb values.
Samuel Rødal [Tue, 24 Jul 2012 13:23:49 +0000 (15:23 +0200)]
Made QImage::fill(uint pixel) for RGB888 accept QRgb values.

Previously QImage::fill() for Format_RGB888 expected a BGR value
instead of the RGB order defined by QRgb, making it counter intuitive to
use related to the 32-bit formats.

Fixed the QPixelLayout data for RGB888 and changed the byte order of
quint24 based on what the optimized image conversion routines expect.

Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>