profile/ivi/qtbase.git
12 years agoUnset _NET_WM_USER_TIME_WINDOW before destroying the window
Jan Arne Petersen [Fri, 24 Feb 2012 17:05:06 +0000 (18:05 +0100)]
Unset _NET_WM_USER_TIME_WINDOW before destroying the window

Otherwise metacity was crashing when a QWindow was destroyed immediately
after being activated, because metacity was trying to select events
(XSelectInput) for the already destroyed m_netWmUserTimeWindow.

Task-number: QTBUG-24492
Change-Id: Iedbe7bdd6b26110ca8bec6f33525209ae551ffd5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoTake into account input shaping in findRealWindow
Albert Astals Cid [Wed, 22 Feb 2012 09:33:09 +0000 (10:33 +0100)]
Take into account input shaping in findRealWindow

In previous commits we took into account bound shaping, but X also
supports input shaping, so make sure it's inside both input and bounding
shaping to consider the position as inside a window

My tests show that when unset Bound Shaping and Input Shaping return the
rectangle of the window itself, so we need to be inside both of the
rectangle sets to consider the position as a dragabble position for the
window

Change-Id: I77973e51168d2a6d274d166f29f32e1bc02c32c3
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agomake default_pro.prf advertize dynamically created .qmake.cache
Oswald Buddenhagen [Thu, 1 Mar 2012 13:34:48 +0000 (14:34 +0100)]
make default_pro.prf advertize dynamically created .qmake.cache

moving the detection of .qmake.cache to the qmake startup had the side
effect that a suddenly popping up cache would not be picked up by
nested projects any more.
this is not supposed to work in the first place, but the syncqt hack for
building against non-installed modules relies on it. until we have
cleaned that up properly, we need a way to notify qmake about the
appearance of the cache file.

Change-Id: I450646b936e3bb2ef2ed3aba05df58e521ccdc61
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoFix tst_qregexp with QStringBuilder
Olivier Goffart [Tue, 28 Feb 2012 09:01:24 +0000 (10:01 +0100)]
Fix tst_qregexp with QStringBuilder

Change-Id: I1ac2a5c9ea5657ad2916465b77271e3d53c67cde
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRevert "Don't render glyph with FT with fetchMetricsOnly"
Jiang Jiang [Thu, 1 Mar 2012 13:40:21 +0000 (14:40 +0100)]
Revert "Don't render glyph with FT with fetchMetricsOnly"

Report https://bugs.webkit.org/show_bug.cgi?id=79561 shows that
this commit will cause significant slow down in text handling
operations. Though the exact reason is unknown we should revert
it first and find out the reason later.

This reverts commit 692064bcfd116c2f3a2b30572e511ee68c6a0531.

Change-Id: I16a56c3093bdfa2119ab6a6e9049ef2925468e29
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoRemove ARMFPA support and Q_DOUBLE_FORMAT detection
Bradley T. Hughes [Fri, 24 Feb 2012 09:52:11 +0000 (01:52 -0800)]
Remove ARMFPA support and Q_DOUBLE_FORMAT detection

Remove the -armfpa option the config.tests/unix/doubleformat*
detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT
has been removed as well.

Rationale: ARM FPA with GCC does not work with EABI. Qt currently
does not support compiling without EABI, making ARM FPA an
impossibility. It is unknown whether other compilers provide ARM FPA
support with EABI. Support for ARM FPA can be re-added in the future
should the need arise, but since ARM VFP is available for ARMv5 and up,
we should encourage implementors to instead use soft-floats or VFP.

Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAllow using multi fontengine in QTextLayout with QRawFont.
Pierre Rossi [Mon, 16 Jan 2012 16:40:21 +0000 (17:40 +0100)]
Allow using multi fontengine in QTextLayout with QRawFont.

This change enables us to instantiate a QFontEngineMulti that takes
the raw font's font engine as its primary engine but can use fallback
engines based on the platform. Since this can be quite expensive, we
defer the query for fallback families' names until it's needed and
we cache the resulting multi font engine.

Change-Id: I390dbc1cb2fe61d56867f29a03f313eb3eb49dc3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoAdd support for QRawFont in QTextLayout.
Pierre Rossi [Fri, 16 Dec 2011 18:26:40 +0000 (19:26 +0100)]
Add support for QRawFont in QTextLayout.

The purpose of this change is to allow shaping complex
text while using QRawFont.
This is needed for WebKit so that we can switch to
using QRawFont everywhere and be more in line with
what other WebKit ports do.
Since this change slightly bends the aim of QRawFont,
let's reserve this for internal use for now.

Change-Id: I5ec0881f50ce288350bd277570cb5f1fb70c355c
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoWindows: Use correct drop data in processDrop().
Friedemann Kleint [Thu, 1 Mar 2012 14:40:25 +0000 (15:40 +0100)]
Windows: Use correct drop data in processDrop().

Fix Qt Designer Drag & Drop.

Change-Id: Iabed622efc5e23080f7a91b8d9e433e2c0cee063
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoCocoa: Implement QPlatformTheme:palette()
Morten Johan Sorvig [Thu, 23 Feb 2012 07:50:28 +0000 (08:50 +0100)]
Cocoa: Implement QPlatformTheme:palette()

Causes a new test failure in QGraphicsProxyWidget::updateAndDelete,
expand the EXPECT_FAIL to cover that one as well.

Change-Id: If9da757206445d17510c4fac82a559de7b8c0563
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoUse QSystemError for QDnsLookup windows backend
Shane Kearns [Fri, 24 Feb 2012 13:07:24 +0000 (13:07 +0000)]
Use QSystemError for QDnsLookup windows backend

The OS provides the error string in this case.
This gives more information to the developer seeing a generic
error.

Change-Id: Ia03642982f3513ee5a8a9fa98d918e948f8d97a5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoFix buffer overrun crash running MSVC2010 win32 Qt on win64
Shane Kearns [Thu, 23 Feb 2012 15:57:15 +0000 (15:57 +0000)]
Fix buffer overrun crash running MSVC2010 win32 Qt on win64

When loading dnsapi.dll as a plugin, we experience crashes because
the calling convention is not specified.
The default is _cdecl, but __stdcall (via the WINAPI macro) should
be used for windows APIs.
Mismatched calling convention results in corruption of local variables,
probably because the stack pointer is incorrect and SP offsets are
used in optimised builds rather than frame pointer offsets.

Since the library has been available since Windows 2000, I don't
think that we need to load it dynamically.
(Unlike the unix version where it isn't part of the LSB)

Also checked that the current release of mingw works.

Task-number: QTBUG-24227
Change-Id: I37c0a6aa0c133799c2a6dd9391ca1435ba2539ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQBoolBlocker: make constructor explicit and disable copying
Marc Mutz [Thu, 1 Mar 2012 07:33:15 +0000 (08:33 +0100)]
QBoolBlocker: make constructor explicit and disable copying

Change-Id: If294eff3f84f837ed554c572527d46a89660de9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSet texture parameters before allocating the texture.
Gunnar Sletta [Thu, 1 Mar 2012 10:59:03 +0000 (11:59 +0100)]
Set texture parameters before allocating the texture.

Some drivers use this as a hint to decide on weither to preallocate
mipmap memory or not.

Change-Id: I2fd438a9625b658c7f30fe39a9d63ba5396f9679
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoqmake-test: Fix jom/nmake handling on Windows.
Friedemann Kleint [Thu, 1 Mar 2012 09:37:58 +0000 (10:37 +0100)]
qmake-test: Fix jom/nmake handling on Windows.

The test fails if MAKEFLAGS is set up for jom since the test
always uses nmake. Remove MAKEFLAGS from the process environment.

Change-Id: Idaed3cc964832b83c282a59fc5257572c520b882
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoAdd support for _NET_ACTIVE_WINDOW on xcb
Jan Arne Petersen [Tue, 28 Feb 2012 09:54:34 +0000 (10:54 +0100)]
Add support for _NET_ACTIVE_WINDOW on xcb

Use a _NET_ACTIVE_WINDOW client message instead of xcb_set_input_focus
for activating toplevel windows on xcb.

According to the Extended Window Manager Hints the right way to activate
a top-level window is using _NET_ACTIVE_WINDOW (when it is supported by
the WM). Other approaches like calling xcb_set_input_focus should be
avoided when possible, since the WM cannot intercept them.

Change-Id: I9be4901f56cbcfb563baf73ccd71ff17a9bdc1d2
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoSkip the network SSL test on Windows.
Friedemann Kleint [Thu, 1 Mar 2012 08:38:45 +0000 (09:38 +0100)]
Skip the network SSL test on Windows.

For SSL, this would require an OpenSSL library to be installed.

Change-Id: I2a320e7faf40ef925c90dbe539f912e4a8fc13fc
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoAdded QPlatformScreenBuffer
Jørgen Lind [Wed, 15 Feb 2012 16:08:20 +0000 (17:08 +0100)]
Added QPlatformScreenBuffer

And moved the pageflipper into its own file

Done with: Paul

Change-Id: I0af34075ce8673a66025cb761c0fe4ff6c0ab0fe
Reviewed-by: Jason Barron <jason.barron@nokia.com>
12 years agoCodeCoverage: Exclude all header files from intrumentation.
Caroline Chao [Wed, 29 Feb 2012 08:21:03 +0000 (09:21 +0100)]
CodeCoverage: Exclude all header files from intrumentation.

Currently only a small fraction of all the headers are included since only
the headers found in the pro file folder are included.

This is confusing and arbitrary. With this change all the headers are now
excluded from the instrumentation.

Change-Id: If4322421f3b3e5fcd45f006421690eaa6bf645e0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qchar unittest to check return from QFINDTESTDATA
Kurt Korbatits [Thu, 1 Mar 2012 03:18:21 +0000 (13:18 +1000)]
Changed qchar unittest to check return from QFINDTESTDATA

- Changed qchar unittest to check string QFINDTESTDATA
  returns is not empty.

Change-Id: Idb3997aaa5d5220272915c1e2538175205b3d6e8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed qlocale unittest to install subprogram syslocaleapp correctly
Kurt Korbatits [Thu, 1 Mar 2012 03:33:40 +0000 (13:33 +1000)]
Fixed qlocale unittest to install subprogram syslocaleapp correctly

- It was trying to install syslocaleapp sub program as TESTDATA
  instead of an application.

Change-Id: I2117d11335bc2fd37a8ccc9a03b0337382f0177f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qdir unittest remove() to check actual file removed
Kurt Korbatits [Thu, 1 Mar 2012 02:57:37 +0000 (12:57 +1000)]
Changed qdir unittest remove() to check actual file removed

- Changed remove() test to check the file just removed is gone.

Change-Id: I0b6c176e624134402b5547866064f436ce063f16
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qlogging unittest to install subprogram
Kurt Korbatits [Thu, 1 Mar 2012 02:46:34 +0000 (12:46 +1000)]
Changed qlogging unittest to install subprogram

- Added install of app sub program so it works from install directory

Change-Id: Ia83643519752a3cbb59d6da2aed132d683a94bee
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed qdir unittest rename() test to skip if run as root
Kurt Korbatits [Wed, 29 Feb 2012 23:06:13 +0000 (09:06 +1000)]
Fixed qdir unittest rename() test to skip if run as root

- subtest not valid if run as root so added a check and skip

Change-Id: Iae993e20f272f9303a75062ef00d22b49df5e84a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoQRegExp: fix \i \I \c \C \p \P escape sequences
Giuseppe D'Angelo [Wed, 29 Feb 2012 00:02:53 +0000 (00:02 +0000)]
QRegExp: fix \i \I \c \C \p \P escape sequences

Those escape sequences have a special meaning in the XML Schema 1.1
regular expressions, but not in Perl-compatible ones.

An escape sequence that has no special meaning should match the
escaped character itself; this patch fixes QRegExp's behaviour in
that regard (previously, it added a character class matching
nothing).

Change-Id: I983f923baa7c2ec19938b96353f3a205e6c06d58
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSHA-2 code does not compile on FreeBSD
Holger Hans Peter Freyther [Wed, 29 Feb 2012 00:01:01 +0000 (01:01 +0100)]
SHA-2 code does not compile on FreeBSD

The code fails to compile with the below error:
qcryptographichash.cpp:55: error: conflicting declaration 'typedef quint64 uint64_t'
/usr/include/sys/types.h:99: error: 'uint64_t' has a previous declaration as 'typedef __uint64_t uint64_t'

FreeBSDs types.h defines the used defines. Maybe it would be less
ugly to switch the code to quint*, or use a define to do so, or to
have basic os detection for stdint.h, not to include sys/types.h.

Change-Id: Ic62ae4b742c1123b4b7e17158d216374e609f59f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoAdd support for XCode 4 into qmake
Andy Shaw [Thu, 26 Jan 2012 21:36:42 +0000 (22:36 +0100)]
Add support for XCode 4 into qmake

This adds support for XCode 4 into qmake and also indirectly fixes a
couple of problems that are relevant for XCode 3.2 too

Task-number: QTBUG-17247
Change-Id: I722470ad1854bd740cbbd28ff4956057a0e1906b
Reviewed-by: David Forstenlechner <dforsten@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
(cherry picked from commit b5871311457ca97816c0abbb8b935570bbfb657c)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoWindows - fix getsockopt calls for narrower than int options
Shane Kearns [Mon, 20 Feb 2012 18:48:10 +0000 (18:48 +0000)]
Windows - fix getsockopt calls for narrower than int options

Windows unhelpfully writes to only one byte of the output buffer
when getsockopt is called for a boolean option. Therefore we have
to zero initialise the int rather than initialising to -1 as was
done before.
This in general only works for little endian architecture, because
the word would look like 0x01000000 on big endian. So I have added
some compile time asserts in the assumption that windows is always
little endian. This is ok for comparisons with 0/false, but not
comparisons with true or nonzero values.
In the case of IPV6_V6ONLY, it is documented as DWORD (unsigned int)
but on some windows versions it is returned as a boolean triggering
the warning. I removed the warning, as the conversion to int works on
both LE and BE since it is only compared with zero.

Task-number: QTBUG-23488
Change-Id: I3c586d1ada76465fc045a82661f289920c657a4c
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
12 years agoRemove qhash_faster.
Robin Burchell [Tue, 28 Feb 2012 20:04:53 +0000 (21:04 +0100)]
Remove qhash_faster.

It's not faster under _any_ metric than the new algorithm, and it loses a lot of
spread which is a bad thing.

Change-Id: Ic87258f1c887822ffea1cb1517355564fabc3c26
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoCopy Qt 4's QString hash algorithm.
Robin Burchell [Tue, 28 Feb 2012 19:56:14 +0000 (20:56 +0100)]
Copy Qt 4's QString hash algorithm.

We must do this the same way we do all other hash algorithms for fair
comparison, as otherwise, the call to the PLT unfairly penalises
QHash<QString>'s results, as it's in a different shared object.

Change-Id: I69c891f5a97dcccdfcfbdbf32796f86242a42963
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMove data generation to initTestCase() method and store the results.
Robin Burchell [Tue, 28 Feb 2012 19:49:35 +0000 (20:49 +0100)]
Move data generation to initTestCase() method and store the results.

Per the comments on Ie4100a1ca4dbe7bf1cd73de883a9854377ac2f5e, having Q_ASSERT
was not a good idea, and data functions can't really handle
QVERIFY/QCOMPARE/etc, so do this in initTestCase instead.

Change-Id: I19e61dec7fe415bb1fa0f53a2920d99b8c7c8ea7
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoAdd test data for string forms of numbers.
Robin Burchell [Tue, 28 Feb 2012 19:49:25 +0000 (20:49 +0100)]
Add test data for string forms of numbers.

Similar to the UUID benchmark, but won't have any non-numerical characters.

Change-Id: I7487c97cab96fd53c180fe12061e7be3ca96e883
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoAdd a test using lots of similar strings.
Robin Burchell [Tue, 28 Feb 2012 19:49:19 +0000 (20:49 +0100)]
Add a test using lots of similar strings.

This attempts to emulate a dictionary usecase of sorts, done in code to avoid
bloating the git repository by adding an actual word list.

Change-Id: I878bc4af8877ba780ee699932f240c0d9c8ff12c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDon't use deprecated QWheelEvent::delta()
Morten Johan Sorvig [Mon, 27 Feb 2012 12:03:47 +0000 (13:03 +0100)]
Don't use deprecated QWheelEvent::delta()

Replace with pixelDelta() and angleDelta().

Change-Id: Ie4b8b6fd39a5f8a28433554000940faef2f2542c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRemove Mac qDebug ifdefs.
Morten Johan Sorvig [Tue, 28 Feb 2012 11:37:55 +0000 (12:37 +0100)]
Remove Mac qDebug ifdefs.

Make qDebug work again with the new logging framework.

Change-Id: Ib88a83182429636b274d6284933d5ea00db7279c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRefactor the QPA dnd interface.
Friedemann Kleint [Wed, 22 Feb 2012 09:58:28 +0000 (10:58 +0100)]
Refactor the QPA dnd interface.

- Give QPlatformDrag a synchronous drag() function returning
  the Qt::DropAction
- Move the base functionality for asynchronous event handling
  to the platformsupport library as QBasicDrag (extendable base class
  handling drag icon and providing new virtuals)  and QSimpleDrag
  (sample implementation for drag within the Qt application).
- Change the Windows implementation accordingly.
- Change XCB to be based on QBasicDrag.
- Clean up QDragManager.

Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoQFileSystemModel autotest fixes
Miikka Heikkinen [Wed, 29 Feb 2012 13:21:24 +0000 (15:21 +0200)]
QFileSystemModel autotest fixes

For some reason, hiding files via executing "attrib +h filename"
process didn't work realiably, so changed the file hiding to be done
via Windows native API.

Also changed the test to use QTemporaryDir to simplify temporary
directory handling a bit.

Task-number: QTBUG-24291
Change-Id: I4f02b16e2f9105bcf5e6c5bf136f55434a26e2f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agonetwork cookies: check "example.com" != "example.com."
Shane Kearns [Tue, 28 Feb 2012 14:53:42 +0000 (14:53 +0000)]
network cookies: check "example.com" != "example.com."

Only test code change, we already have the correct behaviour

Task-number: QTBUG-20001
Change-Id: I2296f405f47f9c8d15796e69f9d1854063e38d6a
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoFix the include dir used by the CMake config files.
Stephen Kelly [Wed, 29 Feb 2012 16:00:04 +0000 (17:00 +0100)]
Fix the include dir used by the CMake config files.

I missed this one in 018e78575c6f7f5a90b41274468a26b09b909443

Change-Id: I194b96d2b1a64025ddb17fe2ed81566838555e13
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove internal class QVolatileImage.
Laszlo Agocs [Wed, 29 Feb 2012 10:28:03 +0000 (12:28 +0200)]
Remove internal class QVolatileImage.

This made sense only for Symbian where there was a special
CFbsBitmap-based backend present and it was used from the
Symbian-specific VG and GL pixmap implementations.

The generic version is merely a useless wrapper over QImage and is not
in use anywhere in the codebase.

Change-Id: I1dabe22dfb8cbbc35dce8e22703a3aff810fb5f9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix a double-release when loading NIB files
Jamie Kirkpatrick [Tue, 28 Feb 2012 15:22:49 +0000 (16:22 +0100)]
Fix a double-release when loading NIB files

Change-Id: I0c2c2a932b433a84e136da8e262739951a1d8c6e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoMake QJsonPrivate::String compile on big endian platforms.
Jason Barron [Mon, 27 Feb 2012 21:19:39 +0000 (22:19 +0100)]
Make QJsonPrivate::String compile on big endian platforms.

Was missing a variable declaration and an explicit cast.

Change-Id: I4f0fb9c3d9b8472adf0d91036442adc1fe255c7e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix tests of QMimeDatabase.
Friedemann Kleint [Fri, 24 Feb 2012 13:18:08 +0000 (14:18 +0100)]
Fix tests of QMimeDatabase.

- Use temporary directories to avoid instabilities
  due to remains of previous failed tests and locked
  directories.
- Replace SRCDIR by QFINDTESTDATA(), reference only
  the freedesktop.org.xml contained in the Qt source
  tree by $$QT.corelib.sources.
- Improve some error messages, test suite instructions
  for Windows.

Change-Id: Idee8e3767ef0a8299df3bdaaac20334164878db0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoQPlatformTheme: Add virtual destructor.
Morten Johan Sorvig [Wed, 29 Feb 2012 13:20:11 +0000 (14:20 +0100)]
QPlatformTheme: Add virtual destructor.

Change-Id: I78aab57cc16ef4542bfb88c81dd6a9d8b4c4d853
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoSkip test tst_QTextScriptEngine::thaiWithZWJ on Windows.
Friedemann Kleint [Wed, 29 Feb 2012 07:31:41 +0000 (08:31 +0100)]
Skip test tst_QTextScriptEngine::thaiWithZWJ on Windows.

Change-Id: I9286ae8b1200b2d6638d1257a872450a9886fce0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoFix build of QImageReader tests with QT_USE_QSTRINGBUILDER.
Stephen Kelly [Wed, 29 Feb 2012 11:50:23 +0000 (12:50 +0100)]
Fix build of QImageReader tests with QT_USE_QSTRINGBUILDER.

Change-Id: I789d99d0741bc178d2d7fd82558edc684eb6daf8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix build of QWizard tests with QT_USE_QSTRINGBUILDER
Stephen Kelly [Wed, 29 Feb 2012 11:49:00 +0000 (12:49 +0100)]
Fix build of QWizard tests with QT_USE_QSTRINGBUILDER

Change-Id: Id276cdb9b84c61bf75a5bde149142f39f52f563e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRemove Mac/QPA collision breaking library linkage
Donald Carr [Thu, 23 Feb 2012 21:07:42 +0000 (21:07 +0000)]
Remove Mac/QPA collision breaking library linkage

Prior to this change, explicitly passing -qpa to configure breaks compilation on Mac. This is due to a false dichotomy between MAC/QPA

Change-Id: I52cacf96ae8d8d203787f9bbade417f2c55ab3f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdded helpful notice in configure about how to enable the xcb plugin.
Samuel Rødal [Wed, 29 Feb 2012 07:34:57 +0000 (08:34 +0100)]
Added helpful notice in configure about how to enable the xcb plugin.

This should make it less confusing for people building Qt 5 on Linux.

Change-Id: I3aa7151f790587d5944c837d701b1b1b580b4bc3
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoCleaned up examples/opengl/cube/cube.pro, removed message()
Rohan McGovern [Tue, 28 Feb 2012 06:07:07 +0000 (16:07 +1000)]
Cleaned up examples/opengl/cube/cube.pro, removed message()

It's arbitrary and confusing to put a message(OpenGL support is enabled)
in this one OpenGL example and no others, especially since the message
is output during configure.

Change-Id: I7b55868d10c288f3459a7fda594fea1e6f45bf9a
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoRemove unused selftest data file.
Jason McDonald [Tue, 28 Feb 2012 04:57:29 +0000 (14:57 +1000)]
Remove unused selftest data file.

The private git history shows that the test program associated with this
data file was missing from the original commit and was never
subsequently added.

Change-Id: I3401724ac04168158a48eb06436db83d3557711f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoQHeaderView - remove sectionCount variable
Thorbjørn Lund Martsum [Mon, 27 Feb 2012 09:56:42 +0000 (10:56 +0100)]
QHeaderView - remove sectionCount variable

A previous patch ensures that we have exactly one section in a Span.
( see SHA : b800d8b94a7861ecf8853621f6556fca186fb5b7 )

Therefore we no longer need the sectionCount variable. We have
assess to it through the sectionSpan.count.  To keep this patch
quite simple the variable sectionCount has been changed to a
function returning the count value.

Change-Id: Ibc419eafa38ab64b08f93074cb6ae4b8518995f6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoAdd support for QT_NO_SIGNALS_SLOTS_KEYWORDS
Stephen Kelly [Wed, 22 Feb 2012 15:36:52 +0000 (16:36 +0100)]
Add support for QT_NO_SIGNALS_SLOTS_KEYWORDS

QT_NO_KEYWORDS can be used for example to ensure that foreach can
not be used, but Q_FOREACH must be, that slots must not be used but
Q_SLOTS must be, etc.

Typically they are used to avoid symbol conflict with other
libraries that may use the same keywords (I think boost uses
signals).

For 3rd party libraries, it makes sense to use Q_SLOTS and Q_SIGNALS
instead of slots and signals, so that downstreams can still choose
to use QT_NO_KEYWORDS in their code.

The most convenient way to enforce that currently is to define
QT_NO_KEYWORDS when building the 3rd party library. However, that
has the inconvenient side effect of making foreach, forever and emit
not usable within the library implementation.

This patch makes it possible for the 3rd party library to use
QT_NO_SIGNALS_SLOTS_KEYWORDS to exclude signals and slots without
affecting whether the other keywords can be used in the library
implementation.

Change-Id: If1e16a4fa384bd3a2ddd737143499f8b587bc4f8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoQRingBuffer: make constructor explicit
Marc Mutz [Tue, 28 Feb 2012 21:52:41 +0000 (22:52 +0100)]
QRingBuffer: make constructor explicit

This is a private class, but it's so close to
the classical Stack(int) example for explicit
that I just have to make this ctor explicit,
too:

   QRingBuffer rb = 0; // oops: meant '*rb'

now no longer compiles.

Change-Id: I7d58c1f08c1b14d14930426159c5c8db71b4cf4d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoActivate replacements when installing .pc files for win32
Hib Eris [Wed, 8 Feb 2012 12:52:01 +0000 (13:52 +0100)]
Activate replacements when installing .pc files for win32

Change-Id: Iaacbe8528bdbe1c1fca60ae8c94625e951f14554
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQPair: don't copy-initialise 'first'/'second' in the default ctor
Marc Mutz [Tue, 28 Feb 2012 21:09:48 +0000 (22:09 +0100)]
QPair: don't copy-initialise 'first'/'second' in the default ctor

Why would we want copy-initialisation if we can
have the default constructor?

Change-Id: Id2de36d42ef9f63793ff4e3ec36202d3f2bf5f30
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoDe-duplicate platform-dependent paths
Hib Eris [Wed, 8 Feb 2012 15:13:42 +0000 (16:13 +0100)]
De-duplicate platform-dependent paths

Change-Id: Ifee9f05fc8d924877f24edfddb0dc5e324a29080
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQPair: remove user-defined copy assignment operator
Marc Mutz [Tue, 28 Feb 2012 21:06:36 +0000 (22:06 +0100)]
QPair: remove user-defined copy assignment operator

The compiler-generated copy assignment operator is fine,
and the user-defined one prevents the compiler from
synthesising a move assignment operator.

Change-Id: I044104a2fd4d7522a910d5c2a68d11dabeca99c4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoImplement missing replacements when installing .pc files for win32
Hib Eris [Wed, 8 Feb 2012 12:36:28 +0000 (13:36 +0100)]
Implement missing replacements when installing .pc files for win32

This implements replacements for win32 makefile generators similar
to the replacement functionality in unix makefile generators.

To enable Makefile code generation for replacements in win32 makefile
generators, you must set QMAKE_STREAM_EDITOR to e.g. sed.

When building for win32, sed is normally only available in the
mingw/msys build environment and when cross compiling on unix.
In these cases QMAKE_STREAM_EDITOR is set to sed in qmake.conf.

For other win32 build environments QMAKE_STREAM_EDITOR is not set
in qmake.conf and the replacements Makefile code is not generated.

Change-Id: Ie5de5d517eafaeaa2544f1e972aec3fe11d0a6f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodon't abuse $$fromfile() for inspecting entire projects
Oswald Buddenhagen [Tue, 21 Feb 2012 20:50:29 +0000 (21:50 +0100)]
don't abuse $$fromfile() for inspecting entire projects

a project can rightfully expect a sane environment. $$fromfile() does
not necessarily provide that. so instead use include() with a target
namespace.

Change-Id: I8d6d30ab1b760d4930c9b4453bc92f8f8ad0b0ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agolook for mkspecs in the project root, not next to every project
Oswald Buddenhagen [Thu, 23 Feb 2012 16:16:03 +0000 (17:16 +0100)]
look for mkspecs in the project root, not next to every project

qmake would look for mkspecs/ in the directory containing the current
project file. this makes completely no sense with recursive projects:
a) nobody would make per-project specs and b) specs meant to be global
would not be found.

consequently, we look for a project root when starting qmake and use
only that directory.
if .qmake.cache is found/set, we assume that to be the project root.
otherwise, we search for mkspecs/ the same way we search for the cache -
just to up until we find one or hit the root. if we are shadow-building,
search the build dir as well.

Change-Id: Ie66b189a40c21203d956e681cbef44a89f98cd17
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agofactor out code to install default mkspec
Oswald Buddenhagen [Fri, 24 Feb 2012 19:32:08 +0000 (20:32 +0100)]
factor out code to install default mkspec

Change-Id: I15f371df7bc24cd85c1c0924d1929da4dc3db16d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoAdd a new qmake feature to support OpenGL ES 1 apps
Jason Barron [Thu, 9 Feb 2012 08:51:24 +0000 (09:51 +0100)]
Add a new qmake feature to support OpenGL ES 1 apps

This is a convenience to make it easy for applications to simply add:
    CONFIG += opengles1
To their .pro file to link against OpenGL ES 1.1 instead of OpenGL ES V2

Change-Id: I48605f5f69f83d99cfb2ad6dbb4b318d41e00128
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake the CMake files work with directory overrides.
Stephen Kelly [Mon, 27 Feb 2012 15:45:27 +0000 (16:45 +0100)]
Make the CMake files work with directory overrides.

This allows us to create correct CMake config files when Qt is
configured with directories outside of the prefix (which Qt allows),
and also allows us to use correct values when a 'longer' relative
lib directory is used such as lib/x86_64-linux-gnu.

Change-Id: I6f88255a23752dc5b84cb20ce13fdeeee9d5ad51
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoCompile SHA-2 code on systems without stdint.h
Bradley T. Hughes [Tue, 28 Feb 2012 08:25:20 +0000 (09:25 +0100)]
Compile SHA-2 code on systems without stdint.h

stdint.h is a C99-ism, which isn't available everywhere. The sha.h
header tells us we need 4 typedefs. Add these to qcryptographichash.cpp
before including sha.h and comment out the stdint.h include in sha.h.

Change-Id: I1ede9569fa7eaa84de3befeb3c58cc6a05aa522c
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoSkip QLocale test on Windows, improve process handling.
Friedemann Kleint [Tue, 28 Feb 2012 11:35:48 +0000 (12:35 +0100)]
Skip QLocale test on Windows, improve process handling.

- Skip the failing windowsDefaultLocale() test.
- Improve the handling of the subprocess, locate
  the binary in initTestCase instead of repeatedly searching it.
- Make all applications console/non-app bundles.

Task-number: QTBUG-24543

Change-Id: I79dfaa3320cd5698f02e74a3fe53477d4a79d4fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRename remaining references to QInputPanel
Pekka Vuorela [Thu, 23 Feb 2012 15:27:53 +0000 (17:27 +0200)]
Rename remaining references to QInputPanel

Change-Id: I747d37d10c78af6ad00322d5bd8d29c6b343828c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix QLibrary autotest for Windows
Miikka Heikkinen [Tue, 28 Feb 2012 10:58:02 +0000 (12:58 +0200)]
Fix QLibrary autotest for Windows

The libraries were built into wrong directory in Windows. Fixed it so
that the libraries are built into debug and release directories like
the test executable.

Also fixed QMAKE_CLEAN statement, which was using incorrect separator.

Task-number: QTBUG-24151
Change-Id: Iade656af5f83ef2b79c2b9c4177df4a16b2f6821
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoInitial import of the Blackberry QPA plugin for Qt5
Sean Harmer [Thu, 19 Jan 2012 20:10:43 +0000 (20:10 +0000)]
Initial import of the Blackberry QPA plugin for Qt5

This is dependent upon the following Change Id's:

I5ebcffb7153f4216d69921d4818051e6b3d14d8a
Iec065f528f5edd848be580807a607488dc2e401f

Change-Id: I234e3c4272d7474d8f8e20fc4fea20d95c829cb5
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agosimplify loop over modules
Oswald Buddenhagen [Fri, 24 Feb 2012 18:20:00 +0000 (19:20 +0100)]
simplify loop over modules

the earlier done topological sort already removes duplicates and only
works with lower-cased names anyway, so we can remove the overhead here.

Change-Id: I44fc39af9e94662717e1c8cfb0ddb87d2f597935
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomoc: Only generate IndexOfMethod for signals.
Olivier Goffart [Sat, 25 Feb 2012 19:48:56 +0000 (20:48 +0100)]
moc: Only generate IndexOfMethod for signals.

moc is currently generating code to convert from a pointer to member
function of a slot or signal to its index.

The idea was that it could be usefull for slots to have the new syntax
do the same as the old one (connecting signal index to slot index). But
in practice, the new syntax do not use the IndexOfMethod for slots.

Also, it does not work for all the slots (no Q_PRIVATE_SLOT,
no static slots)

So since it is not used, and that it would take room in the binaries to
generate all the code to get the index of slots, we remove it.

If ever we need it, we can still add it later.

Change-Id: Ia417e3e524d7915ca86433ea86c66ac2b299c81a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoconfigure: fixed qconfig.h symlink warnings
Rohan McGovern [Tue, 28 Feb 2012 05:02:01 +0000 (15:02 +1000)]
configure: fixed qconfig.h symlink warnings

configure was unconditionally attempting to create two symlinks to
qconfig.h: include/Qt/qconfig.h, and include/QtCore/qconfig.h.

include/Qt doesn't exist any more, so this would always cause a
"No such file or directory" warning.  Remove that one.

include/QtCore/qconfig.h is usually created by syncqt now, so this would
cause a "File exists" warning.  Make that one conditional.

Change-Id: I8c6244dcbcf9765444f0d5c40c91a0ca192ecbcb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQDomNode: don't needlessly call virtual functions
Marc Mutz [Mon, 27 Feb 2012 23:11:28 +0000 (00:11 +0100)]
QDomNode: don't needlessly call virtual functions

Commit 4dabe78387d10495f9f6d0a7395f2ba3c80432bd changed
these functions from virtuals to inlines that check the
return value of the remaining virtual function nodeType().

However, two of the functions call nodeType() more than
once, which we know will return the same result each time,
but requires a compiler with interprocedural optimization
capabilities to figure out by itself.

So instead of repeatedly calling nodeType(), call it once
and store its return value in a temporary, and use the
temp for further comparisions.

Change-Id: Idbeafb7fd93d275d475218c6df2ad7fdc9162cc5
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoRemove stale QWS considerations from configure
Donald Carr [Thu, 23 Feb 2012 19:33:48 +0000 (19:33 +0000)]
Remove stale QWS considerations from configure

Remove all reference to QWS/EMBEDDED in configure script

Remove legacy qws config tests

Change-Id: I09ed3d82bdda0fd0f9da87634d0cd1b7457a782b
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoresolve relative spec paths already on the command line
Oswald Buddenhagen [Fri, 24 Feb 2012 11:11:51 +0000 (12:11 +0100)]
resolve relative spec paths already on the command line

this is way more predictable than resolving it later.

Change-Id: I0ce27977b795bde9235e1d51d6f2d0d917f2398c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomove .qmake.cache search to Option
Oswald Buddenhagen [Thu, 23 Feb 2012 16:05:28 +0000 (17:05 +0100)]
move .qmake.cache search to Option

this is a one-time operation which depends only on the invocation, so
this new home is much more appropriate.

Change-Id: I11ef30a8227afed06e58e64e65809dba25e81567
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agodon't look for features in PrefixPath
Oswald Buddenhagen [Wed, 22 Feb 2012 18:33:53 +0000 (19:33 +0100)]
don't look for features in PrefixPath

it's generally redundant with DataPath which we already look into.
this is consistent with where mkspecs are looked for.
i don't think anyone will notice this "loss" ...

Change-Id: Iab7c35cc22ba53e1005f26b5d85d41cf4dafad07
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoscope context saving more minimally
Oswald Buddenhagen [Fri, 3 Feb 2012 17:28:54 +0000 (18:28 +0100)]
scope context saving more minimally

no point in saving the context when we are not actually modifying the
current context.

Change-Id: Id6f51a163e86bdf402aa0713737b655db68e7ee8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoFix QSettings autotest fails under Windows
Debao Zhang [Sat, 25 Feb 2012 02:11:16 +0000 (18:11 -0800)]
Fix QSettings autotest fails under Windows

The Windows registry and INI files use case-insensitive key.

This is a side effect of 1d01bc1e83560cb2fc4f9f7f00762ffa5134448a

Task-number: QTBUG-24145
Change-Id: I862bddae68ef27569e6ffa901f98ca107d3f300b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoQComboBox: Use platform theme hint to determine popup geometry.
Friedemann Kleint [Mon, 27 Feb 2012 16:09:43 +0000 (17:09 +0100)]
QComboBox: Use platform theme hint to determine popup geometry.

Change-Id: I1f81be1394455715c5dfcd2d426758c4c7cd91fc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoQSqlTableModel: unify code for cache-clearing before select
Mark Brand [Tue, 14 Feb 2012 21:26:43 +0000 (22:26 +0100)]
QSqlTableModel: unify code for cache-clearing before select

The code in submitAll() had the same goal as the code in select,
so it has been unified. The new code in select() avoids sending lots
of dataChanged() signals for rows that are going to be removed
by QSqlQueryModel anyway.

Change-Id: Ic22e038223720185e47ed0cc573147745ecc8fc9
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoconfigure: fixed stray output from endian.test when not verbose
Rohan McGovern [Tue, 28 Feb 2012 05:16:09 +0000 (15:16 +1000)]
configure: fixed stray output from endian.test when not verbose

The output of building and running config.tests are generally silent
unless -verbose is passed to configure.

However, there was one place in endian.test where a check for $VERBOSE
was missed, leading to confusing output like:

    Creating qmake. Please wait...
    rm -f endiantest.o
    rm -f *~ core *.core
    rm -f endiantest
    rm -f Makefile
    rm -f endiantest.o
    rm -f *~ core *.core
    rm -f endiantest
    rm -f Makefile

Change-Id: Idabe85f2b188ed9da713392d116d4d2853be2189
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQSqlTableModel::isDirty(): simplify and improve logic
Mark Brand [Wed, 15 Feb 2012 14:02:05 +0000 (15:02 +0100)]
QSqlTableModel::isDirty(): simplify and improve logic

Change-Id: Ic1332befa9078a94f872e38ff779e5b4cec7c100
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agorestore previously non-working disabled test
Mark Brand [Thu, 16 Feb 2012 12:25:41 +0000 (13:25 +0100)]
restore previously non-working disabled test

Change-Id: I419863a681f7be96cb855a274c68eaea25efebcb
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agotestlib: Improve the silent logging mode
Jason McDonald [Mon, 27 Feb 2012 06:31:03 +0000 (16:31 +1000)]
testlib: Improve the silent logging mode

Previously the silent logging mode suppressed passes, skips and internal
testlib info messages, but did not suppress debugging output, making it
hard to see the fails in a noisy test.  This commit changes silent mode
so that it suppresses all output except test failures and fatal errors,
making silent mode truly useful for seeing just the important test
output.

This commit also adds a selftest to verify the behaviour of silent mode.

Change-Id: I75420aead03682306210746a87e2a3b608b58fc6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Remove commented-out code from plain text logger.
Jason McDonald [Mon, 27 Feb 2012 04:01:47 +0000 (14:01 +1000)]
testlib: Remove commented-out code from plain text logger.

Change-Id: Ica2e294d1f08cac4697d037dbc2803012e0ba58a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake accessible interfaces private for Qt 5.0
Jan-Arve Saether [Thu, 23 Feb 2012 22:09:06 +0000 (23:09 +0100)]
Make accessible interfaces private for Qt 5.0

Since we're not yet confident if they serve their purpose well enough,
we have decided to make them internal so that we are free to tune them
later

Change-Id: Id79d154e0537aca07303afea5d057cfcb0773384
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFix divide by zero when glyphWidth is 0
Jiang Jiang [Mon, 27 Feb 2012 08:51:46 +0000 (09:51 +0100)]
Fix divide by zero when glyphWidth is 0

Change-Id: Ic0108b76b8d73cc977f8d64e036a65cb93db4684
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoPrevent stack corruption when using OpenGL Core Profile
Sean Harmer [Sat, 18 Feb 2012 20:05:53 +0000 (20:05 +0000)]
Prevent stack corruption when using OpenGL Core Profile

When an OpenGL Core Profile context is requested the function
glGetStringi() is used to query the supported extensions as
glGetString(GL_EXTENSIONS) has been removed in the core profile.

The signature for glGetStringi used in Qt missed off the APIENTRY calling
convention. This results in stack corruption on windows each time
glGetStringi() is called leading to a crash.

Change-Id: Iff62c42e2bb5fc4a5c0561fae97ddc5a8ae3a45e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agodirectfb: Switch to the new style plugins
Holger Hans Peter Freyther [Sat, 25 Feb 2012 11:12:09 +0000 (12:12 +0100)]
directfb: Switch to the new style plugins

The plugin might advertize more keys than supported at runtime. E.g.
the directfbegl key might not be available. I would like to have a
directfb.json.in and then generate the right file or if moc would
pre-process the file...

Change-Id: Ia8ad4e1367c06f5e35d02822d4f830ce1e9dc577
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdd SHA-224, SHA-256, SHA-384, and SHA-512 support to QCryptographicHash
Bradley T. Hughes [Fri, 3 Feb 2012 11:28:13 +0000 (12:28 +0100)]
Add SHA-224, SHA-256, SHA-384, and SHA-512 support to QCryptographicHash

This adds Sha224, Sha256, Sha384, and Sha512 enum values to
QCryptographicHash::Algorithm. The implementation comes from RFC 6234,
http://tools.ietf.org/html/rfc6234, which is added to
src/3rdparty/rfc6234. Only the headers and SHA-2 code is included in
src/3rdparty/rfc6234 (the SHA1, HMAC, and HKDF code is not included).

Change-Id: I85139fd118291f15efc22899a5ddd1cc83810cfb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove use of deprecated conversion from QKeySequence
Olivier Goffart [Sun, 26 Feb 2012 09:56:49 +0000 (10:56 +0100)]
Remove use of deprecated conversion from QKeySequence

Note: UNICODE_ACCEL is Qt3 compatibility and is equal to 0

Change-Id: I808a66772abceb3822d515d69386728264eb1b40
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQHeaderView - minor cleanup in viewportEvent
Thorbjørn Lund Martsum [Thu, 23 Feb 2012 07:24:21 +0000 (08:24 +0100)]
QHeaderView - minor cleanup in viewportEvent

This is an improvement to a previous fix with
SHA e62e71162606fec134600955a89b7e0c34a7840b

We actually never want to call resizeSections if the parent is hidden.
Therefore we can both simplify and improve the code with this patch.

When we do show/hide on parent then the visible status is updated
before we get into this code. I have verified the patch on the code
from:

Task-number: QTBUG-14234

Change-Id: If7bfa3b3813c97b4a545e48423526e9cfe118de4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoDetect QMetaType::QReal from the definition of qreal
Olivier Goffart [Mon, 27 Feb 2012 11:00:07 +0000 (12:00 +0100)]
Detect QMetaType::QReal from the definition of qreal

Instead of relying to complex preprocessor expression that need to be
maintained to be kept the same as in qglobal.h

This aslo fix the case where QT_COORD_TYPE is defined (It is meant to be
defined to float or double, any other type would not make sense)

So now there should hopefully be only one place to change if one need to
adjust the type of qreal

Change-Id: I778312112603173562dbe675ab491b53d6cd2174
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoFix submenu positioning
Miikka Heikkinen [Mon, 27 Feb 2012 11:54:21 +0000 (13:54 +0200)]
Fix submenu positioning

Submenus are now positioned to the correct side of the parent menu
based on layout direction, if there is enough space on screen to fit
the menu. If there is insufficient space, then the menu is positioned
to the other side of the parent menu. In case that also causes submenu
to be partially ofscreen (very wide menu relative to the screen),
then the submenu will be aligned with the screen edge and will overlap
the parent menu. This seems like a lesser evil compared to having
submenu partially offscreen, which could obscure important details
such as checkmarks.

Task-number: QTBUG-23568
Change-Id: I6a9ab2c232713a2ee5a6dde3227c40419d46bd3d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoMake configure.exe only detect each compiler once
Bradley T. Hughes [Mon, 27 Feb 2012 10:21:10 +0000 (11:21 +0100)]
Make configure.exe only detect each compiler once

After commit e0acf6504356f14a6352b16ffed7b59453914863, configure.exe
built with the x64 compiler could detect the same compiler twice,
breaking the -platform detection even when only one compiler is in the
path. Fix this by taking advantage of the CompilerInfo struct ordering
and ignore detection of the same compiler.

Change-Id: I583230520d2e0859196f9d7c8af31adbb981a6ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoremove useless init() function
Oswald Buddenhagen [Thu, 23 Feb 2012 14:26:56 +0000 (15:26 +0100)]
remove useless init() function

it did the same cleanup() did, and they are always called consecutively
anyway (except at start and end where it does not matter).

Change-Id: I4c82024d19d6c670f1f4037d43147a15680614ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomove resetEnvironment() call to cleanup()
Oswald Buddenhagen [Thu, 23 Feb 2012 14:39:23 +0000 (15:39 +0100)]
move resetEnvironment() call to cleanup()

we want to call it even if the test fails

Change-Id: Ie8f3f9d2df5d52990d6b9f9a632e49826278175a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomake qmake test suite a tad more verbose on failure
Oswald Buddenhagen [Thu, 23 Feb 2012 14:38:30 +0000 (15:38 +0100)]
make qmake test suite a tad more verbose on failure

automatically dump the collected output on non-expected return code

Change-Id: Ifda7287869f329c5a6714e6f21aa9c3991e9ee4e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoTestCompiler: split commands from arguments
Oswald Buddenhagen [Thu, 23 Feb 2012 14:35:04 +0000 (15:35 +0100)]
TestCompiler: split commands from arguments

this allows us to temporarily set some extra args without (incorrectly)
instantiating a second TestCompiler (and on the way relying on $PATH for
finding qmake).

Change-Id: Icce5bf7314148ddbe705606f77a26e3362b31f67
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>