Commit Graph

4928 Commits

Author SHA1 Message Date
Ian Dean
5a1c67c657 Fixed iOS compilation issues.
Put MacOS-specific code in #ifdef blocks so that it is not compiled for
iOS.

Change-Id: I303b7dbb63eb298e92351951731868df6a38bffa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-26 17:52:12 +02:00
Eskil Abrahamsen Blomfeldt
f1212ddc62 Revert "Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePosition"
This reverts commit add629d4f1.

The commit caused crashes when laying out some text (e.g. ordinary
Arabic text) with certain fonts (it triggered the assert in
QTextLayout::addNextCluster()). The regressions will have to be
weeded out before the fix can be recommitted.

Change-Id: Iee457f138367d4cf8fcbd2e518271d8eaa95a62c
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-26 17:52:12 +02:00
Honglei Zhang
1509316a37 Fix memory leaks in 64-bits ODBC driver
On 64-bits Windows system, integers and longs are still 4 bytes values.
Several functions that were previously defined with SQLINTEGER and
SQLUINTEGER parameters have been changed where appropiate to use new
SQLLEN and SQLULEN typedefs. SQLGetStmtAttr() is one of these functions.
This fix replaces SQLINTEGER with SQLULEN in appropriate functions to avoid
memory leaks.

Task-number: QTBUG-25256
Change-Id: I744927f42b8578ece60815df360e3b337ebf452a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-26 17:52:12 +02:00
Konstantin Ritt
f3721d7706 get rid of Q_*_EXPORT_INLINE macros
> Girish:
> We should be able to remove the macro completely today,
> just mark all those functions as plain inline.
> With Qt5, we don't have to worry about bc yet.

this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport

Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-26 15:33:00 +02:00
Olivier Goffart
93132154b5 Fix C++11 compilation
Fix compilation with compilers that support user defined literal
(such as GCC 4.7)

Change-Id: I31cd3d2177688f963ab33cf68cd6060a5fb8640f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-26 15:32:34 +02:00
Kevin Krammer
8c59e22538 Create interface for navigator calls and implement for BPS and PPS
Makes QQnxServices available on non-BPS systems by delegating to an interface
which is implemented on systems with BPS using the currenly used navigator API
and on systems without BPS by sending an appropriate message to the navigator's
PPS service interface.

Change-Id: I0e32fb11e6debb7b7b4693c0bc02af4f75ee2162
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-26 15:21:46 +02:00
Stephen Kelly
99a620d2e2 Take account of spanned items in QTreeView when dragging.
Also remove some code which has been unused since it was introduced in
32182d107fa75e5619ecc91a81f50626f429ebe1

Task-number: QTBUG-25140
Change-Id: Ic7053d68d8200f845c1ae330342d27af7275e057
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@digia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-04-26 15:20:30 +02:00
Casper van Donderen
62932faef0 Doc: Use the proper way to find qdoc.
Previously $$QT.core.bins was used to find qdoc, the proper way is to
use qtPrepareTool().

Change-Id: I5d97f5517ae63253ccaf1fb1487034c3a312a074
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-26 15:04:38 +02:00
Casper van Donderen
9f789044d7 Doc: Add "make docs" command for QtXml.
Also fix a typo in the qhp/index URL.

Change-Id: I5774982b15f9de5b59966a2d932307b156eecc7f
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-04-26 14:49:53 +02:00
Casper van Donderen
99e3c08064 QDoc: Disambiguate prev and next links in html source.
Change-Id: Iaa82b9b6de71b577a44eae86eb6847c07d068670
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
2012-04-26 14:12:12 +02:00
Jan-Arve Saether
c10a0c29d3 Map QAccessible::Role to the proper IA2Role.
All enum values after the MSAA-specific roles needs a special
mapping.

Change-Id: I6c77abf09b68d2d3d772937be986d532db2e5292
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-26 11:45:01 +02:00
Sean Harmer
5c882dbb89 Use non-blocking reads on virtual keyboard pps device.
Change-Id: Iad350c948049128f3014a6ad6536ac9dc2ee86d5
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
2012-04-26 11:45:01 +02:00
Sean Harmer
15d4e943ba Fix compilation when debug output enabled on virtual keyboard
Change-Id: I467e9ef624bcd10cb5b61f6f665a7bbb0bb1f57a
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
2012-04-26 11:45:01 +02:00
Thiago Macieira
f6aef23ff1 Ensure that QUrl::{to,from}LocalPath encode/decode properly
Unlike path(), toLocalFile() isn't reporting a URL component, so it
should decode the percent-encoded characters fully. This extra
decoding pass is meant to catch %00 to %1F, %7F and %25 (the percent
sign itself).

It also catches %80 to %FF, which aren't decoded because they don't
form UTF-8 sequences. That means QUrl::toLocalFile() has undefined
behaviour if the path contained non-UTF8 sequences.

Task-number: QTBUG-25459
Change-Id: Iab5a0ba6afcfc4510e297984f2ffc208cedd752b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-26 03:15:22 +02:00
Olivier Goffart
5a6ee590a2 Remove deprecated conversion from QKeySequence to QString
Change-Id: I3844913c16b9d6222f48e66dddc1d680458ffa56
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-26 00:56:40 +02:00
Olivier Goffart
67f58040ea Remove QMetaObjectExtraData and put everything into QMetaObject
QMetaObjectExtraData was added when support for QMetaObject::newInstance
was added. One needed a place to put the pointer to static_metacall in
the QMetaObject.

But as we break binary compatibility, one can change the size of
QMetaObject, and put everything back inside QMetaObject's own structure.
Meaning it is not required anymore to have one QMetaObjectExtraData
instance per QMetaObject anymore.

Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-25 20:19:29 +02:00
Kent Hansen
7b118c6456 Split qobject_impl.h into qobjectdefs_impl.h
This is done to make QtPrivate::FunctionPointer available to the
QMetaMethod declaration in qmetaobject.h (which already included
qobjectdefs.h, since that's where QMetaObject is declared), so that
the new template-based QMetaMethod::fromSignal() function may be
implemented.

The logic for statically generating the array of qMetaTypeId (used by
the template-based QObject::connect()) remains in qobject_impl.h,
since it's not needed for QMetaMethod::fromSignal(). Moreover, moving
that code would introduce a circular dependency, since qmetatype.h
as of commit 1946740446 now includes
qobjectdefs.h.

Change-Id: I36c35041e0c6661c3cf523684177a0b6c19e2d35
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 20:17:18 +02:00
Kent Hansen
28c79d8c0b Add comparison operators == and != for QMetaMethod
This is done in preparation of introducing the
QObject::connectNotify(QMetaMethod) function. Together with the
forthcoming QMetaMethod::fromSignal() function, which returns the
QMetaMethod corresponding to a Qt/C++ signal (member function), the
comparison operators provide an effective way of checking which
signal was connected to.

Change-Id: I2de48628c4884a7174fb8574895f272cb3fe5634
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 20:16:56 +02:00
Thiago Macieira
6624151c6a Don't use the QRegExp methods that modify the object [QtWidgets]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: I44cc44b75b3da10c5ece97cb6315c2c425327dc0
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-25 20:15:32 +02:00
Thiago Macieira
105b231214 Add detection code for AVX2, HLE, RTM and AES to qsimd.cpp
AES is currently not enabled, since we don't use it for anything. The
code is here with the proper detection should we want to in the
future.

RTM and HLE (Transactional Memory Extensions) I'll use soon in the
locking code.

Also rename a few variables to make it easier to read later on.

Change-Id: I800c66d7e1ba86ec037692928d94f53ea5d5868f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
e75b0e8c72 Replace the x86 XGETBV instruction with its opcode bytes
This is a new instruction, present on the SandyBridge architecture and
later. Some older assemblers do not support it and produce:

  {standard input}:225:no such instruction: `xgetbv'

The use of this instruction is protected by a CPUID check (function 1,
ECX bit 27), so we only run it in processors that do support it.

Change-Id: Ife7500c0deaab9539074835a4511e8c19602608e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
dc6d1c6c3f Update the x86 feature-detection code, unifying x86 and x86-64
Most of it is the same for both of them, so let's avoid doing
everything twice. Or more, since we may support x32 soon. For Windows,
use the intrinsics. For GCC, we'd like to use cpuid.h, but it only
exists since GCC 4.3, so we can't.

And properly detect AVX support: it's not enough to detect that the
processor supports them, we also need to check that the OS enabled
support for the 256-bit registers.

Change-Id: Ibb4872cdb774de5701b18c40f4e612330a266214
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
01ee098531 Fix atomics on SPARC
Inspired by
https://bugreports.qt-project.org/secure/attachment/26020/qt_atomic_sparc64.patch

Task-number: QTBUG-22479
Change-Id: Ie3275df96c639d6a75e05f70fe5745aeb34457f9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-25 14:58:36 +02:00
Bradley T. Hughes
d9875f7bff Cocoa: support modal windows
Qt::WindowModal windows and dialogs are shown using [NSApp
beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] as
long as they have a valid parent. Otherwise they are behave as
application modal.

Use the existing modal session support in the QCocoaEventDispatcher
(which was inherited from Qt 4) to support Qt::ApplicationModal
windows and dialogs. Some changes to this code are needed to ensure
proper behavior:

1. Window level modification is now done in
QCocoaWindow::recreateWindow() instead of in QCocoaEventDispatcher.
2. Make interrupt() use [NSApp abortModal] to stop a modal session
(previously we were freeing memory from under Cocoa's feet, causing
tools like valgrind and Instruments.app to complain)
3. Do not remove an item from a list and use a const reference to the
removed item immediately after (minor bug fix).

Also make sure that QCocoaEventDispatcher cleans up any modal sessions
and retained user input events on destruction (otherwise we leave
NSApplication in a weird state, which causes some autotest failures).

Change-Id: Iaeefa025400f324b5348b8c81a40384ef026efb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-25 14:58:36 +02:00
Thiago Macieira
6159870348 Revert QUrl::isRelative to its Qt 4 behaviour
Instead of trying to return whether the URL is relative to something
undefined, let's instead follow what the documentation was saying all
along and what the RFC says about "Relative References".

Change-Id: I32722321a6b36c6e3480669ad769390e4c6f7d1c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-25 14:58:36 +02:00
Jan-Arve Saether
5a09e71fc3 MSAA bridge should not return any IA2-specific roles from get_accRole()
Small cleanup/improvement. This patch just does what the removed ###
says.

Change-Id: I0d16541d2e4b8f948f32734ef0138fde5517932a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-25 12:43:25 +02:00
Jan-Arve Saether
3fef4b4635 Do not map LayeredPane and Terminal to the wrong MSAA role
Microsoft did at some point extend the roles in MSAA with two extra
roles (ROLE_SYSTEM_IPADDRESS and ROLE_SYSTEM_OUTLINEBUTTON).
These are defined in oleacc.h as:
  #define	ROLE_SYSTEM_IPADDRESS	( 0x3f )
  #define	ROLE_SYSTEM_OUTLINEBUTTON	( 0x40 )

This means that LayeredPane will map to ROLE_SYSTEM_IPADDRESS
and Terminal will map to ROLE_SYSTEM_OUTLINEBUTTON, which is
obviously wrong.

We now reserve some valuespace for more roles to reduce the likelyness of
any collisions in the future. Having the reserved area also serves
as a way of indicating the boundary between the "MSAA" enums and other
enums.

Change-Id: Ic67a1a7200382fed3040e69b3e8856376ba642ac
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-25 12:43:25 +02:00
Konstantin Ritt
17ebedf5fc get rid of QT_NO_IMAGE_TEXT switcher
Change-Id: Ie72f907ffb959f629af6a414959348a992c4c941
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-04-25 10:29:56 +02:00
Casper van Donderen
82fcbe9d7d QDoc: Implement -installdir CLI option for module cross-linking.
QDoc needs to know the final location of the installed documentation to
generate correct relative links between the modules. Normally you can
use QLibraryInfo::DocumentationPath for this, but since QDoc gets compiled
during Qt bootstrapping QLibraryInfo is not available yet.
The -installdir option still allows us to specify
QLibraryInfo::DocumentationPath  on the command line.

Change-Id: Ic4729f4daad112f0d175931467cf09cfcf5145a3
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-25 10:29:56 +02:00
Konstantin Ritt
96a165870d support UTF-8 encoded file names in QZip*
Change-Id: Iba0457b55ef9fa3673f78b4d30d018a146e8fb1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2012-04-25 10:29:56 +02:00
Laszlo Agocs
2cbd5906df Update QTest::QTouchEventSequence docs
Change-Id: I2a8f88929f985b1543ec7c223266e8387f0a8a48
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-25 08:16:41 +02:00
Peter Hartmann
314e590d67 QHttpMultiPart: supply new line at the end of the body
... to conform to RFC 2046 (section 5.1.1). Apparently IIS had problems
without the new line.

Task-number: QTBUG-25429
Change-Id: Ia619bbdcebd407b2716bc467323634e4c8d77bcd
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-25 01:57:14 +02:00
Konstantin Ritt
5e66c35a23 optimize QChar::decomposition()
* by not using QString::fromUtf16() as we know for sure that
  the data is 'raw' UCS-2;
* it's safe to avoid a check for > UNICODE_LAST_CODEPOINT
  as GET_DECOMPOSITION_INDEX macro already does a similar check

Change-Id: Ifb660efc51c664d06733ac8ed46d54278520da06
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-25 01:57:04 +02:00
Debao Zhang
6fb0110f97 Using QLatin1String instead of QLatin1Literal
QLatin1Literal is just a typedef of QLatin1String.

Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-25 01:56:56 +02:00
Stephen Röttger
b9790a04ee Fix locale issue on unix systems
QSystemLocale::query() was missing the LanguageId QueryType. Therefore
QSystemLocale::fallbackLocale() was always used as default language,
which reads environment variables in the order: LC_ALL -> LC_NUMERIC ->
LANG. The correct behaviour is to read LC_ALL -> LC_MESSAGES -> LANG.
This leads to problems for users that want to use english language, but
non-english localization features (date, number formats etc.)

Change-Id: I4310537dac8622a3dd79231fbad58e22f20ca262
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-04-24 21:45:00 +02:00
Konstantin Ritt
f948bb3c6c qunicodetables generator: improve the output and the generated code
better memory usage report;
an additional asserts with conditions the implementation is depends on;
a namespace for the internal static data;
styling fixes

Change-Id: Id4048ff6104c56b5f590f9ac6fbf7c0bce79ec47
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-04-24 21:45:00 +02:00
Konstantin Ritt
ba0d752c2d workaround issue where casing diff overflows signed short
there are two such codepoints were added in the Unicode 5.1:
  U+1D79  LATIN SMALL LETTER INSULAR G
  U+A77D  LATIN CAPITAL LETTER INSULAR G
two more of them were added in the Unicode 6.0:
  U+0265  LATIN SMALL LETTER TURNED H
  U+A78D  LATIN CAPITAL LETTER TURNED H
and two more were added in the Unicode 6.1:
  U+0266  LATIN SMALL LETTER H WITH HOOK
  U+A7AA  LATIN CAPITAL LETTER H WITH HOOK

we map them like special cases with length == 1
(note: all are in BMP which is checked explicitly in the generator)

Change-Id: I8a34164eb3ee2e575b7799cc12d4b96ad5bcd9c6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-24 21:45:00 +02:00
Konstantin Ritt
4ca3d4ebab QChar: reduce code duplication by inlining some methods
using templates for toLower()/toUpper()/toTitleCase()/toCaseFolded()
makes the upcoming patches smaller and thus easier to review

Change-Id: Ideb23e8669dbc2fe9ea3f129bf0137e1805ece11
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-24 21:45:00 +02:00
Jan-Arve Saether
fd87a4c7f6 Make NVDA read aloud stuff from a Qt app again.
Previously, NVDA did not read aloud anything from a Qt app.

Change-Id: Ie738e7e7d7acc54f45fab9195adc09bfde930174
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-24 19:41:05 +02:00
Jan-Arve Saether
961d460ecf Fix a regression where events were not delivered on windows
Regression caused by a17907829e

Change-Id: I8a2ca35cf176b4db47f29d848cbc2cd8180596d0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-24 19:38:58 +02:00
Jan-Arve Saether
739579d15a Add QDebug operator<< for QAccessibleEvent
(Keep it internal)

Change-Id: I9e99ccbd16cc595d2aff97a26181e8d8c3d9d7ae
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-24 19:38:04 +02:00
Yan Shapochnik
33a4e3b470 Provide access to RTLD_NODELETE flag on Unix.
Introduce a new QLibrary::PreventUnloadHint to support the
RTLD_NODELETE flag support by dlcompat on Unix platforms.

Change-Id: Ib1327e968a2a888850ad1086a102a143f86c5090
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
2012-04-24 19:37:13 +02:00
Jeff Kehres
0723e14699 Integrate Blackberry Platform Services (BPS) with Qt event loop.
This ensures interoperability between the Blackbery C and C++ APIs
and makes it easier to expose platform services in C++ that are
exposed in BPS - since events from both APIs can be processed on
the same thread.

Change-Id: I7270adc64c26396f66d9126141500d5e58be51e7
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-24 19:36:55 +02:00
Thiago Macieira
77a816c00d Ensure that QUrl::toLocalFile returns decoded paths
QUrl::path() already decodes almost everything, but let's pass the
formatting flag to be sure.

Note: decoding of control characters from U+0001 to U+001F is not
implemented. Non-UTF8 sequences are also not representable.

Change-Id: I9a0ae2282ec3d48cc0e70e5b2d3824fb120709ed
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 19:36:55 +02:00
Thiago Macieira
092118855b Don't use the QRegExp methods that modify the object [QtGui]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: If119e06221ca99e57c5ad1a1d4cc6468e9f68c7b
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-24 19:36:55 +02:00
Thiago Macieira
fd7e1cef9c Don't strip the leading slash of letter+colon paths on Unix
It's perfectly valid to have a path of /c:/a.txt on Unix, so don't
strip the leading slash unless we're on Windows.

Task-number: QTBUG-20322
Change-Id: I721bd0a65b41048bc735d4eaa0d536174164fe64
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 19:36:55 +02:00
Laszlo Agocs
63051701b4 Add flag in testlib to disable committing the simulated touch
Some declarative tests (e.g. 24319) need more fine-grained control
over processing the simulated touch events.

Change-Id: Ib163cfd29254016ea16e8d739ad97369b6ccdc90
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-24 19:36:55 +02:00
Kai Koehne
c0d249019b Allow qDebug output to be configured by qSetMessagePattern()
Add qSetMessagePattern() to configure the default
message pattern. This one can still be overwritten by setting the
QT_MESSAGE_PATTERN environment variable.

Without this method, there's actually no way to change the
default output programatically. Since QT_MESSAGE_PATTERN is
evaluated when the first message arrives, setting it via e.g. qputenv
might have no effect/be too late.

Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 17:12:46 +02:00
Thiago Macieira
4544ec931f Update the QUrl documentation concerning the encoding
Looks like I failed to update this earlier, when the behaviour changed.

Change-Id: Ic020c2a14d4e9153f2bc9d22d943a3a380c0851c
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-24 17:02:23 +02:00
Thiago Macieira
2a683c1f14 Don't use the QRegExp methods that modify the object [QtTest]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: I7c5f5ebf4521c32337c9ea9aeeef50e1e8690bf8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-24 16:38:38 +02:00
Thiago Macieira
29d2aad30a Use the C99 keyword "restrict" in compilers that support it
This allows the compiler to produce better / smaller code due to not
being required to deal with two pointers possibly aliasing each
other. This also enables vectorisation where otherwise the compiler
wouldn't be able to do.

Change-Id: Ie7db3a54a1ba22f87ac5283d5c43905707957549
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-24 16:38:14 +02:00
Thiago Macieira
1765329b8c Mark some functions as always_inline with GCC and ICC.
These functions are too critical to be called. They should always be
inlined.

Change-Id: I698dc6d83e02c323759c6d066f17993340bd53a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-24 16:38:02 +02:00
John Layt
0060b44d70 QLocale: Clean up QLocalePrivate implementation
In Qt4 QLocalePrivate is a struct returned by a d() method.  This will be
unsuitable for the planned change to use ICU and may cause BIC issues.

This change makes QLocalePrivate a class and creates a new struct
QLocaleData to hold the data index.  Further clean-ups are possible
but are left for later.

Change-Id: Ie316a07790f74674a3b520b735dff72695cc4060
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 16:37:11 +02:00
Jędrzej Nowacki
feb736ef27 Cleanup QMetaObject string access.
We do not need operate on raw QByteArrayData, QByteArray gives us
better, stable API, without any performance penalty.

Change-Id: Idf47af2333c3694e81dcd31cd07d1a4720046df7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-24 16:33:47 +02:00
Shane Kearns
6137067fc2 Fix tst_qtcpserver::serverAddress on Mac OSX
While linux returns the local address of dual mode sockets as "::"
i.e. the IPv6 address, OSX returns "::FFFF:0.0.0.0" i.e. the IPv4 address.

In the unix socket engine, treat both of these as candidates for
being a dual mode socket. This should hopefully cover other unixes
which we haven't tested.

Task-Number: QTBUG-25445
Change-Id: If1251018d54da98618223ba538c00ba54ac4cb4e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 15:58:26 +02:00
Martin Smith
20d901a555 qdoc: Further changes to the QML specialization
1.  Body elements to include type, property, method, signal, enum info, so:

qmlDetail to
- qmlTypeDetail
- qmlPropertyDetail
- qmlEnumerationDetail
- qmlMethodDetail
- qmlSignalDetail

2.  Same thing for a section that contains elements specialized for QML, so

qmlDef to
- qmlTypeDef
- qmlPropertyDef
- qmlEnumerationDef
- qmlMethodDef
- qmlSignalDef

Rationale for both items above is that otherwise the body and section
content models would have to be exactly the same for a type, property,
method, etc.

3.  For the import statement use:

<qmlImportModule>
<apiItemName>QtGraphicalEffects</apiItemName>
<apiData>1.0</apiData>
</qmlImportModule>

So we have an element indicating that this is for the import
statement, not an outputclass.  And no need to specialize the elements
inside it as we know from the ancestor (qmlImportModule) what they're
for.
<qmlImportModule> to be specialized from apiDef.

4.  The 'description' section name doesn't need to be specialized further from the API ref. DTDs so

<qmlDesc> should be <apiDesc>

The content model for the 'description' section would be similar to that of a normal DITA section, specialized into apiDesc in the API ref. DTDs, so we don't need to rename it for QML.

5. We need a separate element for the since information.

<qmlSince>
    <apiItemName>QtGraphicalEffects</apiItemName>
     <apiData>1.0</apiData>
</qmlSince>

6.  Public identifier should be like this for a type:

-//NOKIA//DTD DITA QML Type//EN

Not like this:

-//NOKIA//DTD DITA QML API Type Reference v0.1.0//EN

Change-Id: Ie9047965bf32a2e3e9339eb743f2019cb38c88e4
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-24 15:52:54 +02:00
João Abecasis
e92e5fda44 Migrate QString over to QArrayData
Change-Id: Ieadc60523a2bef61a088920576c65c720b11bfb9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-24 13:51:37 +02:00
Markus Rathgeb
e998f971f6 Fix QMutex::tryLock timeout regression (integer overflow)
The timeout given in milliseconds should be converted to a timespec
struct.
To separate the seconds and nanoseconds the milliseconds are first
multiplied to represent the whole value in an int64 variable.
The calculation is done on integers, so we get an overflow if the
milliseconds are bigger then 2148.
If we cast the given value to an int64 we can avoid this problem.

Fix the used cast.

Task-number: QTBUG-24795
Change-Id: I864ae227cf7dda16a6f30aa4db74acc49e20f6eb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-24 12:48:38 +02:00
Niels Weber
8643e1992f Improved detection of libcrypto and libssl.
The previous solution didn't work on systems where the libraries
aren't in the same location.
Now we search for both libcrypto and libssl and load them if their
versions match, even if they are in different directories.

Task-number: QTBUG-25398

Change-Id: I37164638890586947d07670d8a59fc53a84f9c42
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-04-24 12:48:38 +02:00
Friedemann Kleint
5d5d39b369 Windows: Fix for frameless widgets.
Let Qt::FramelessWindowHint take precedence over
Qt::WindowTitleHint (which enforces WS_CAPTION and thus
WS_DLGFRAME).

Change-Id: I2c0248d8a3ee3ed0f04b926acdef3cbeb98ca571
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-24 10:45:40 +02:00
Thiago Macieira
d8ce528400 Remove Qt 5 todo in QVariant: we're not going to change the behaviour
Task-number: QTBUG-25111
Change-Id: I2387767698c402e2bd0ecdfdd6ed41d4a224f1b6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-24 09:20:09 +02:00
Miikka Heikkinen
4e7854e496 Change Windows font database to use qendian.h
Removed the custom BigEndian class and utilized qendian.h functions
instead.

Change-Id: Ieb10f77411404e1524fcedaceffa5b0e333c7429
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-24 09:18:14 +02:00
Thiago Macieira
42e152d5f2 Rename the default organisation from "Trolltech" to "Qt" on Mac
This doesn't seem to be documented -- or if it was, the documentation
has been changed.

Task-number: QTBUG-23269
Change-Id: Ie7aa51aeb251bfaa3d0018fbac4adc9517c97fa0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-23 23:27:25 +02:00
Thiago Macieira
f02e1d6d8e Move QGestureEventPrivate's content to the main class
QEvent now checks that the d pointer is unused.

Change-Id: Ib0aa97d1692ea55324c4c6f133ffdd5a221f1680
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-23 23:26:44 +02:00
Thiago Macieira
d631c31235 Make QStringLiteral and QByteArrayLiteral always return the real types
Up until now, the macros would return an internal type that contained
the pointer to the data. This breaks code that tried to use the macros
with operators, like QStringBuilder but also when writing:

     QStringList() << QStringLiteral("a") << QStringLiteral("b");

This change seems to work fine now and I can also verify that this
works:

     const auto str = QStringLiteral("Hello");

Even though it creates a QString, which is non-POD and non-constexpr.

Change-Id: Iaf82af9bea4245513a1128ea54f9d2d3d785fb09
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-23 23:26:28 +02:00
Martin Smith
5a1fc72696 qdoc: Don't write '...' for empty <apiName>
qdoc now <apiName/>, when there is no name.

Change-Id: I0aa85eef633776f691c9e2238514194cf89b8a8f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-23 19:20:19 +02:00
Martin Smith
a7bc21d010 qdoc: Update qdoc to use QML spec for DITA
qdoc now generates DITA XML from QML docs according
to the QML specialization.

Change-Id: I51d93c2ab3b1deefab9bbedcd2e752f49648809f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-23 19:20:19 +02:00
Simon Hausmann
18f4da0d90 Removed unused QUrlPrivate::clear()
The function is not used anymore.

Change-Id: Idfdc0505358421a866b15e2ad322679a1808e223
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
e9e817accb Use the Q_PROCESSOR_* macros in qsimd.cpp
Change-Id: I7be9b14a24329be32c43603ae87df17328696109
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-23 19:20:19 +02:00
Sean Harmer
fe7c600fab Set thread name on QNX
Change-Id: I4fc786afce2e53676b148332dddd2c84228f7d87
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 19:20:19 +02:00
Giuseppe D'Angelo
a5565bcac0 QTimer: fix typo in singleShot optimization for 0 msecs
The SIGNAL/SLOT/METHOD(x) macros prepend a character between
'0' and '2' inclusive, and not '0' and '3'.

Change-Id: Ibdbf442422925a43f956b2ba70f1f9c6a2812305
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
3da8a33a62 Add missing private headers to testlib.pro
Change-Id: Id927b05374b9e82fbee029258f176223b8b32e90
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
34ea06eaac Move Q_FUNC_INFO to qcompilerdetection.h
Change-Id: Ibc63913f070febe561890e98ef079ca883d9bfc9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-23 19:20:19 +02:00
Thiago Macieira
60c9c69379 Move the QT_STRINGIFY macro to the top of qglobal.h
This will allow me to use them in qcompilerdetection.h.

Also, leave them defined.

Change-Id: I73cb39e3cfcc2463d1d47a856e4a64354ebe743c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-23 19:20:19 +02:00
Mark Brand
83c9ebbd66 QSqlQueryModel::setQuery() don't use deprecated reset()
Previously the method attempted to reset only as a last resort.

Now reset() is deprecated and resetting must happen between emitting
modelAboutToBeReset() and modelReset(). Since this suffices in all
cases to notify views that they must reinterrogate the model, it is no
longer necessary to signal explicitly row removals and insertions
within the scope of the reset.

Additionally, fetchMore() is now called within the scope of the reset
so insert signals do not have to be emitted here either.

This improved handling of resetting in QSqlQueryModel also allows the
cache in QSqlTableModel to be cleared directly at select().

This change may actually allow views to operate more efficiently since
they no longer have to react to separate row removal and insert
signals. Views can avoid pointless deallocation and reallocation
by considering row count only after the reset is finished. The cost is
that the columns and horizontal headers must be considered in the view
at each setQuery() call. In any case, it is not clear that trying to
be smart about this in the model justifies additional complexity.

Tests had to be adjusted where they expected explicit row removal
and insert signals.

Change-Id: I4f7eac1419824361d7d9bdcc6a87092b33e80d7a
Task-Id: QTBUG-25419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-04-23 19:20:19 +02:00
Mark Brand
508a90302b QSqlQueryModel::fetchMore() documentation fix
Change-Id: If046e674abad9c2dcff934a2fdd80d4133e1f4ad
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-23 19:20:19 +02:00
Stephen Kelly
d21f8c157a Build the QNX plugin with -no-opengl enabled.
Change-Id: I776a3eb0d7ada4399b8c191bbfa1e3ed9236b20e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-23 17:04:04 +02:00
Olivier Goffart
ecba58500e Fix compilation of QDesktopServices without deprecated
Change-Id: I9e225d32b3f7db403cf3eea6a277580b4b7410a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 15:39:24 +02:00
Olivier Goffart
55d1f56c28 Fix warning in qobject.cpp
Variable only used in debug mode

Change-Id: I6601ca68c427b909680423ae81802f1ed5cd178a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-23 15:38:09 +02:00
Miikka Heikkinen
e95d94cbbd Windows: Fix QRawFont loading from data.
The implementation for loading QRawFont from data was missing from
Windows QPA plugin.
For freetype font database, just called the parent QBasicFontDatabse
implementation.
For native font database, ported the implementation from Qt 4.8
qrawfont_win.cpp.

Task-number: QTBUG-24197
Change-Id: Ia784d4cbc4f37c925aa49e53d04faf06a7169a73
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-23 15:37:23 +02:00
Casper van Donderen
3a78aabf3f QDoc: Support -indexdir on CLI and depends in qdocconf.
You can now specify a list of modules in the "depends" qdocconf
variable. This stringlist is then used by the -indexdir option to
specify in which directory to search for [depends entry]/[depends entry].index

Change-Id: Icab6dd0133e180ac04365da9605743def6fb754d
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-23 09:45:24 +02:00
Casper van Donderen
8d9cb38a66 Doc: Fix most QDoc errors in QtXml.
Changes:
- XML processing document moved from Qt XML Patterns.
- Moves documentation from /doc/src to /src/xml/doc
- Add new qdocconf file.

Change-Id: I4bc2104714a28905304997e5ff252e662ddf0bee
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-04-23 09:45:24 +02:00
Jonathan Liu
6289636365 Fix unmatched double quote character
Change-Id: I25fb7dac38db2800ce974d40ec275d510f6d47f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-23 09:45:24 +02:00
Kalle Viironen
83c637aa94 Fix bug in qsslsocket peek()
Calling peek() for qsslsocket caused socket data to be copied into
qiodevices buffer and therefore make it unaccessible in qsslsocket.

Cherry picked form 4.8-branch & modified to Qt5 API changes
(int -> qintptr)
Original commits:
commit 621f18955082fc73471e75d1f8c35c2dcd4befeb
Author: Shane Kearns <ext-shane.2.kearns@nokia.com>
commit 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513
Author: Kalle Viironen <kalle.viironen@digia.com>

Task-number: QTBUG-18498
Change-Id: I6be4b19baec2f3197537f5e7b61432040ec84ad2
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-23 09:45:24 +02:00
Stephen Kelly
47617f68cb Make the QNX QPA plugin work with non blackberry.
Change-Id: Id85d18d9f21711e8d53e8e4bfdf39d10e135f593
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-23 07:30:02 +02:00
Kevin Krammer
5c2e560fe9 Send Expose event when top level window becomes visible
Change-Id: I0b45c27fa03bbe073c88ce8d01d9fb283f4051c1
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-23 07:30:02 +02:00
Rohan McGovern
8dea797015 Removed invalid C-style license header from .pro file
/* C-style comments */ cannot be parsed by qmake.

Additionally, Qt Project legal has agreed that .pro files do not need to
be covered by license headers.

Change-Id: Ie4d75ee09c2fc85a2f954ec4a931b36ea9d51d93
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-04-23 04:28:54 +02:00
Michael Brasser
b332a6c1e4 Don't assume QAbstractDeclarativeData::objectNameChanged is available.
Preparation for removal from declarative now that a proper NOTIFY
signal exists.

Change-Id: If0acb73b73d17c49dc8de211d95ecd1e8e80ff1b
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-04-23 01:22:29 +02:00
Thiago Macieira
fcec903da7 Ensure that qXXXdetection.h can be included directly
Those files might have dependency on one another, on qconfig.h and on
early qglobal.h definitions, so ensure that the only correct include
order is that of qglobal.h.

Change-Id: I89098bacaf16353ee8b51604ee885508dc8e201a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 11:19:39 +02:00
Thiago Macieira
f4227a7b86 Make the fallback Q_ASSUME and Q_UNREACHABLE be qt_noop
That way, we can properly add ; after them, and I can use Q_ASSUME in
Q_ASSERT's else condition.

Change-Id: Iad35819fbb06714116b7dd0f952e1c2c89044c72
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:24 +02:00
Thiago Macieira
4d55ba046c Move Q_DECL_{IMPORT,EXPORT,HIDDEN} to qcompilerdetection.h
Mindful of QT_VISIBILITY_AVAILABLE and Q_OS_WIN for GCC: when GCC is
used on Windows (i.e., MinGW or potentially Cygwin), use the declspec
variant so we produce proper DLL imports and exports.

When used on other platforms, rely on configure adding
QT_VISIBILITY_AVAILABLE to qconfig.h, which confirms that the
-fvisibility argument is available. That flag has been available since
GCC 4.0 on ELF targets, but it could be missing on some other targets.

Change-Id: I3dbc0043c1eaee0c469c5b1dc8bf05842fe9cd47
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:20 +02:00
Thiago Macieira
32758d917e Move some compiler macro definitions into the compiler sections
Makes for a couple of cleaner definitions of fallbacks.

Change-Id: I9b1a6f77bab986514e1862ae1f431ea37b89c1b5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:18 +02:00
Thiago Macieira
308ffceea5 Move the compiler-related macros to qcompilerdetection.h
This cleans up qglobal.h a little further and organises things a bit
more.

Change-Id: Ic025e720941cdf59b8a1a0baf515b29f25eba0f1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-21 05:09:14 +02:00
Jan-Arve Saether
45991b0f31 Compile on Windows.
The previous code was trying to sum one pointer with one string
literal...
Using QVarLengthArray should also potentially speed things up a bit,
since it will avoid a malloc if className is small enough (less
than 15 bytes).

Change-Id: I41218babb3030e7e6f9c31fc77e4af1c209ae0a5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-21 05:09:12 +02:00
Stephen Kelly
40fe0721d6 Fix typo in backwards compatibility code.
The patch just submitted to Qt4 is not affected by this.

Change-Id: I3f38f1a56f2a9a2058b2c8ff0a6ee1715be41e85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-21 01:24:05 +02:00
Olivier Goffart
7eebe4e960 Fix compilation with Q_DECL_OVERRIDE
In C++11, the override keyword is placed after the function declaration

Change-Id: I3a079860762f30fa21eb01611c770713f6ba4acb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 22:23:23 +02:00
Aurindam Jana
d8a1899682 QDataStream: Update Version info for doc
QDataStream::Qt_5_0 was modified in
aee1f6cc41
but the documentation was not updated.

Change-Id: I520798a7572b0f21cd275290bcd689e1b686d098
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-20 22:23:23 +02:00
Thiago Macieira
369863efef Don't push unnecessary data to a data stream for QVariant()
Adjust the test because we don't read past the end anymore.

Task-number: QTBUG-25108
Change-Id: I8243f1d5ae79d1256aab2cb1132598a716a7eeeb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-20 22:23:23 +02:00
Shane Kearns
fffc900f78 Windows - "bypass proxy for local..." also affects IP addresses
If the "bypass proxy for local addresses" option is enabled in
the windows proxy configuration, then do not use the proxy for
any IP address in the subnet of any network interface.

As the systemProxyForQuery api is now offering HTTP proxy tunnels
for TCP sockets, this change avoids local ad-hoc network
connections being routed through the proxy.
In the case where the local address was on a different interface to
the proxy server, it may have been unreachable through the proxy.
For example IP over USB or Bluetooth.

Change-Id: I0842732832a7795112be029d923ed168edc008d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 22:23:23 +02:00
Miikka Heikkinen
a941e0c0a6 Windows: Remove fontengine autodetection logic
Always default to native font engine as native fonts now work in
QML applications, too.

Change-Id: Iafa5f6d25a9a3b22f49763f287e4e358216cfc2d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 16:21:31 +02:00
Miikka Heikkinen
4c6d12e6d2 Fix missing Windows native fonts in QML applications
Windows native fonts were not getting rendered because the font engine
was cloned incorrectly for QRawFont, resulting in multi-engine instead
of the specific cloned engine.

Task-number: QTBUG-25410
Change-Id: I08f543e541739ac1b51f96f381ae1bb20b59399a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-20 16:21:08 +02:00
Casper van Donderen
ac090486c4 QDoc: Remove the text around previous and next page links.
Previously we printed "[Previous: <link>] and [Next: <link>]. After this
change we only print the <link>, which should include an icon.

Change-Id: I30d0c7d53b70ec2e537774d57a4ac9af01b26b16
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
2012-04-20 12:46:47 +02:00
Lars Knoll
9ce1acd9e4 Revert "List QtPrintSupport as a dependency of QtPlatformSupport."
This reverts commit 9c7cdce672.

platform support does not and should never depend on widgets
or print support.

Change-Id: I828d1dfc02e7993325cf653ed92100750761eaae
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 12:46:47 +02:00
Friedemann Kleint
6331894524 Fix MSVC conversion warnings in new bytearray code.
Change-Id: Ifc81564daf3fef0d7f08ae8d250ba41d3b1d5b0f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 12:46:47 +02:00
Martin Petersson
a8a5b38b00 QSslSocket: call to ERR_free_strings to free loaded error strings
Since we are calling q_SSL_load_error_strings to load error strings
we should call ERR_free_strings to free the memory again.

Task-number: QTBUG-15732
Change-Id: Ie41291bb0e1434f82025378edfca51930712a8aa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 12:46:47 +02:00
Morten Johan Sorvig
fb8cd418fb Fix crash in QCocoaBackingStore.
QWindow->handle() may be null during construction,
and also during calls to resize(). Get and check
the pointer at each call instead of caching it
in the constructor.

Change-Id: Icd950b55e16fdd2077e3b7fe3c3393d8b89b5903
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 12:46:47 +02:00
Thiago Macieira
80ad5938ea Stop using QEventPrivate::d in QWindowStateChangeEvent
We can add a boolean and avoid using the d pointer (which QEvent now
checks to be unused).

Change-Id: I7367d5410d10ed06441fe9037cac0e3473d62498
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-20 10:50:28 +02:00
Konstantin Ritt
65ae2151c3 mingw: fix a lot of annoying warnings
like "QRect::intersected() redeclared without dllimport attribute
after being referenced with dll linkage" (-fno-keep-inline-dllexport)

Change-Id: Id24e5ee857579ee9f97a60de0ab88ce3db8385cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-20 10:29:14 +02:00
Morten Johan Sorvig
128b7c56b7 Implement QCocoaWindow::setWindowState.
Add window state change notification logic. Send
and expose event in addition to window state change
on window restore since the QWidget logic expects
this.

Modify QCocoaWindow::setVisible to sync up window
state that may have been set on the hidden window.

Refactor NSWindow event observing to use one observer
function for all notifications.

Add window state testing to tests/manual/windowflags
Add delay after showFullScreen in tst_qstatusbar to
wait for the Lion fullscreen transition.

Change-Id: I57c523cedd0644d4181b40d72046fad4fdb09a9c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 10:29:14 +02:00
Eskil Abrahamsen Blomfeldt
ca5918c8b8 Retain bidirectional marks when eliding text
When the text contains unicode markers for bidirectional
text, these will not affect the width of the text, but they
might affects its layout. Thus, we need to retain these
markers in the elided text to avoid the layout of the string
changing when its allocated width changes.

Task-number: QTBUG-3768
Change-Id: I3866c32cd1dcd5fff2b8fa5b25ae89e551531a97
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-20 10:29:14 +02:00
Kai Koehne
d9a1c2dff8 Logging: Change arguments of message handler to avoid conversions
Introduce a new QtMessageHandler that takes QString instead of
char *: This avoids converting to local8bit , only to convert it back
to utf16 for Windows.

The old QMessageHandler is kept for a transition period, but will
be removed before Qt 5.0.

Also fix qEmergencyOut (that is called in OOM situations) to not rely
on the default message handler.

Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 08:37:06 +02:00
Martin Jones
1946740446 Provide versions of qRegisterMetaType() that do not normalize typename.
QML is quite capable of providing typenames in the correct format.
qRegisterNormalizedMetaType() does not normalize the typename, so
avoids the huge overhead.

Change-Id: I96c9a42fe0b5d36ac05a9247f6507dbf9583fa67
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-20 03:39:10 +02:00
Michael Brasser
7e9f7080b7 Minor QObject::receivers() optimization.
Don't lock if there are no receivers.

Change-Id: I922fad10436adeb27aa4f193cc0dcbaa3f0c0f1e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-20 00:32:53 +02:00
Michael Brasser
5533cc9953 Minor QObject::receivers() cleanup.
Return 0 rather than false; remove extra Q_D().

Change-Id: I3dac733c3fae27c76790f09fd6b63356767a0363
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-20 00:32:43 +02:00
Michael Brasser
56d78e5086 Add a receivers callback to QAbstractDeclarativeData.
Change-Id: I767fabd66c7de535db26e779855d21ec5b94e947
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-04-20 00:32:32 +02:00
Andy Shaw
a48d9b52c3 Fix compilation with QT_NO_DEBUG_OUTPUT defined
Change-Id: If96e93c08240e0f626f8e465993b2c38b2cad832
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 00:29:39 +02:00
Konstantin Ritt
8e09e0dc45 QImage: fix declaration of inline methods
Change-Id: If97f423329705dccf98742089362db9eecb55087
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-20 00:29:39 +02:00
Thiago Macieira
a3f90fd44f Remove private classes in QEvent-derived classes.
QEventPrivate doesn't exist, so these classes were technically abusing
the d pointer.

Move the contents of the private classes into the main event classes.

Change-Id: If2e894c1fa05f468221a0b43f3ebdf90769298eb
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 23:42:26 +02:00
Thiago Macieira
5d0da01b54 Mark qt_assert and qFatal as non-returning functions (excpt. MSVC)
This allows the compiler to optimise the code a bit better: since they
don't return, it can assume in the code after the Q_ASSERT that the
condition was true.

MSVC is the exception: with MSVC, we have the CrtDbgReport dialog,
which allows the developer to continue execution, inside the
debugger. Therefore, we can't mark any of those functions as
non-returning because they can, after all, return.

Unfortunately, the Q_ASSERT usually expands to no code in release
mode, so the improvement in code generation happens in debug mode
only...

Change-Id: I4d542d6853cd51c71ffab1d563ed64ef7c419115
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-19 22:15:16 +02:00
John Layt
886aea1250 PrintSupport - Remove Qt5 To-do Messages
Task-number: QTBUG-25085
Change-Id: I4cf3cc4827f5cc0eeade36cfde94472fab3abb92
Reviewed-by: John Layt <jlayt@kde.org>
2012-04-19 22:15:16 +02:00
Shane Kearns
af100dbd7e Abort background requests if policy changes to disallow them
Using the policy change signal from QNetworkSession.
If the new policy disallows background requests and this is a
background request, then generate an error.
This results in a TCP RST on the socket, and a
BackgroundRequestNotAllowedError on the QNetworkReply.

If the reply is already finished, no action is taken.

Change-Id: I4ff5c681a8b7b852727bb95f03664d666f4efe07
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Shane Kearns
a1e961705c Connect usagePoliciesChanged signal to the QNetworkReply
Change-Id: Ibb8ba0b3226e402dfa9a5a1a64faa80702b11dd7
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Shane Kearns
96fe7dad38 Set ConnectInBackground also for http implementation
Change-Id: Id82322250d86f35702036c64d725c9d093046d5b
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-19 19:46:07 +02:00
Kim Motoyoshi Kalland
8aa0be210a Removed legacy pixmap and image cleanup hooks.
Task-number: QTBUG-25114

Change-Id: Id87172665ec15874e293e3891738e6366aef4554
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-19 16:57:08 +02:00
Konstantin Ritt
907909d858 fix qsslsocket build in -permissive mode (assigning const char* to char*)
Change-Id: I76269630ebabdf601c2fcb5f65a8dffbd6cdbc5e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-19 16:44:47 +02:00
Girish Ramakrishnan
0074cc5d34 Fix detection of default platform plugin.
Let configure generate the QT_QPA_DEFAULT_PLATFORM_NAME in
qconfig.h. This allows us to override the platform name
using a configure argument.

This commit adds -qpa <platform> that lets the user specify
the default platform at configure time. Note that the default
platform is not checked against the tree since plugins are
allowed to exist outside the Qt source tree.

In the absence of -qpa argument, configure checks the mkspec
for a variable named QT_QPA_DEFAULT_PLATFORM. This check is
implemented only in the unix configure because it will be primarily
used in custom mkspecs (devices, boards).

If -qpa argument is absent and the mkspec variable is absent,
the default value is determined based on the OS as below:
    Unix - "xcb"
    Windows - "windows"
    Mac - "cocoa"
    QNX - "qnx"

Done-with: Jørgen Lind

Change-Id: I0df31811a1b901a3242bfada1232e596ebda04f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-04-19 16:40:29 +02:00
Bjoern Breitmeyer
14ea50598f Fixed QSimd WindowsCE build
Change-Id: I94de251cf1f283d30f92d0fb9d37a1646765cbdd
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-19 16:27:22 +02:00
Konstantin Ritt
d48f3fc1e7 fix undefined behavior issue on Integrity
in contrast to ::strdup(), qstrdup() allocates memory via new[];
deallocating this memory with free() leads to undefine behavior.

Change-Id: I0692c4bef010c05de547283b00b6c6043ac24c79
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-19 15:58:03 +02:00
Konstantin Ritt
f4d02ecdbf optimize canonicalOrderHelper() for generic case
if there is no need to swap codepoints A and B,
then we proceeding with advance to the next codepoint B
that becomes A, and some next codepoint C becomes B;
in such case we can easily skip the re-calculations for A
by using previously calculated results for B

Change-Id: I5c63589c274acaddf0f6a4cb1e0608d352a0c1b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 15:57:38 +02:00
Konstantin Ritt
73423db31d qwindowsintegration: fix build with -no-accessibility config option set
Change-Id: I2f4080b04f61ec425d41180f0163cebcc745c1b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-19 13:26:51 +02:00
Casper van Donderen
c4e308d3f7 QDoc: Generate index file for DITAXML.
This change moves the fullDocumentLocation function to the generator
base-class and adds generateIndex to the DITAXML Generator.
All function calls to fullDocumentLocation are now handled by the static
function in the base-class which will use the file extension from the
currently active generator (either DITAXML or HTML).

Change-Id: I24ce09c05a63eb5980b1243c58990e7ce9d42036
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-19 13:26:51 +02:00
Thiago Macieira
77cc912590 Don't use QByteArrayLiteral for a non-stored QByteArray
Unless you're creating a QByteArray that you will store, don't use
QByteArrayLiteral. Using it for 1 byte that is always concatenated to
something else is an extreme waste.

Change-Id: Icc29e4c4cb1d0aad1714bdeec8ff41da7c301af9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-19 13:26:51 +02:00
Thiago Macieira
275945f144 Add an assertion to deleteLater() before it modifies QEvent::d
The deferred deletion functionality stores the event loop level
nesting count in the QEvent d pointer. In Qt 4, this d pointer was
not usable because we forgot to add a proper copy constructor and
assignment operator to it, so the deleteLater() process stored the
count here safely.

Since Qt 5 now has non-implicit copy methods, the d pointer could be
used in the future. If QEvent uses it, this assertion will
trigger. Note that it doesn't apply to classes derived from QEvent,
though.

Change-Id: I8600c8e9379921e32aca166bc0a6c0b4c4ed799f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-19 12:14:30 +02:00
Friedemann Kleint
a633d80efe Fix font substitutions.
- Remove remains of platform-specific substitution tables in QtGui.
- Deprecate QFont::removeSubstitution() in favour of
  QFont::removeSubstitutions() (as suggested in the comments).
- Clean up substitution code, remove postfix operator++ on
  iterators and repeated invocation of .end().

Change-Id: I2e82e4ce2dd357d49e4d2b7fd6f95785acfcda95
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 11:07:25 +02:00
Konstantin Ritt
21eb4578e5 replace getenv("HOME") with a "centralized" QDir::homePath()
Task-number: QTBUG-4902

Change-Id: Ie9124de45be2d8e859f8b0aaea246e660145a1c5
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-19 11:07:25 +02:00
Samuel Rødal
197aa9f67f Get rid of warning when building qplatformwindow_qpa.cpp.
This Q_UNUSED was unintentionally lost in 55fa3c189f.

Change-Id: I832ee7c8d46cf66f7b63045015bef181fddebeef
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-19 11:07:25 +02:00
Sean Harmer
4c0289c337 Do not force OpenGL sample buffers on in the qnx qpa plugin
Change-Id: I6af40382102f2163f5ad8606b498a89db420c5d6
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-19 11:07:25 +02:00
Laszlo Agocs
56850d6cd7 Remove internal QClipboardEvent
This class is not in use with QPA.

Also remove useless sending of QEvent::Clipboard from the
QGuiApplication dtor. That event is not (cannot be) handled by the
platform plugins and is not used at all. Perhaps it should be removed
altogether from the public API.

Change-Id: I478b31ff9875a8dfff99bddafd335ab02a5fe477
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-19 11:07:25 +02:00
Jędrzej Nowacki
ff55d64f67 Remove QVariant constructor taking Qt::GlobalColor.
The constructor is wrong, it creates instance of QVariant encapsulating
a QColor instance. QVariant should not implicitly convert data, never.

Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-19 10:09:39 +02:00
Hannu Lyytinen
1267bd82a4 Extend QUDeviceHelper to detect DRM graphics devices.
KMS QPA plugin duplicates udev code needlessly; merging the
functionality here.

Change-Id: I69be8549f1feee298fe28215d491c8ce5de96b18
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-04-19 08:48:18 +02:00
Toby Tomkins
02242a8b01 directfb: Fix namespace compilation.
Change-Id: I55450e0585092f0b052cf6755acc541915c411e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-19 08:17:28 +02:00
Casper van Donderen
0bc02fd0d6 Doc: Prepare for building modular QtCore docs.
This change fixes most qdoc errors in QtCore. There are about 900 left.
The main thing this change does is moving documentation from qtcore from
/doc/src to /src/corelib/doc.
Other issues resolved are mis-use of qdoc commands.

Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-04-19 07:34:53 +02:00
Ian Dean
22042dd769 Change coreservices -> ios
Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files.
Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files.

Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-19 01:57:58 +02:00
Konstantin Ritt
9a7f7b5d34 qdbusxml2cpp: fix build on Windows
bootstrapped process defines QT_NO_LIBRARY but QT_NO_LIBRARY
is not supported on Windows

Change-Id: I353a8690832e292522ed6c39a7e0ca19b0980e01
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-19 01:57:58 +02:00
Jędrzej Nowacki
b3e55fbf4e Do not assert when QVariant is constructed from an invalid type id
That change also fix moduleForType() which was wrongly recognizing
negative ids as belonging to Core.

New tests were added.

Change-Id: I40a5819effb32489a45937011980457387c9f8be
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-04-19 01:57:58 +02:00
Eskil Abrahamsen Blomfeldt
06d4ea6400 Fix memory leak when drawing text in non-common script
When the font engine cache was updated for new parameters, we
would overwrite the cached engine, but not deref the old
cached engine, thus it would never be deleted.

This is manual cherry pick of 44c14470e5b28e45c19d6959b114e063cf3f4d83
from 4.8 branch.

Change-Id: Ice2e555fe380dc9851ef490fa1a6928936ae4c35
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-18 23:26:01 +02:00
Samuel Rødal
197b423e96 Optimized EGLFS backing store a bit.
Avoid expensive image copying when possible.

Change-Id: Ia79919ea7652d7bfdd744198c494c20cb78a0f48
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-18 22:23:53 +02:00
Girish Ramakrishnan
10c88faf79 api: remove QWindow::visible()
The correct api is QWindow::isVisible(). Removing the api
is safe since QWindow is not even released yet.

Only qtdeclarative needed to be fixed with
71c8fe296fe5aa7e79033dd8f5b539852d4276e0.

Change-Id: Ie571ed4802fe89132419e402acdb854446f4578f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-18 21:24:25 +02:00
Stephen Kelly
e8e3049d31 Fix unused variable warning.
Change-Id: I8daa2912e1c26e9e9f6bb77f64eb3e06c6715cce
Reviewed-by: David Faure <faure@kde.org>
2012-04-18 17:28:47 +02:00
Girish Ramakrishnan
21102a71ff api: QGuiApplication::inputMethod should be static
Pretty much all methods in QGuiApplication are static.

Also adds documentation.

Change-Id: I96808dd266922432b92fe3962292e4d5b6a8ab46
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
2012-04-18 15:11:13 +02:00
Stephen Kelly
cd2b94771c Fix some unused variable warnings.
Change-Id: I3ffbb155c0efa65bb33a0e2ce80dbd75dc56f3fc
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-18 14:23:27 +02:00
Jędrzej Nowacki
9ecce11261 Remove redundant check in QMetaType::typeInfo
The check was introduced when void was not a fully defined type.

Change-Id: I4df8607999436f8db92be77fc8fd203fc66c2816
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 12:16:20 +02:00
Jędrzej Nowacki
ab0bcd0792 Remove redundant checks in QVariant.
QVariant and QMetaType have aligned type naming implementation.

Change-Id: I9eaae1045c492c148e3e9d23f4e04d48272f7ec2
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 12:16:09 +02:00
Jędrzej Nowacki
6f0065944d Hide QTypeModuleInfo in a private namespace.
The class is private and shouldn't pollute global namespace.

Change-Id: Ib44473fd72e5a70096eeff1662e88b29263d19c6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-04-18 12:15:52 +02:00
Stephen Kelly
50aca3d020 Fix some unsigned comparison warnings.
Change-Id: I4e72dbb6e207757c8bb75a7726c83ed5916df094
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-04-18 11:36:05 +02:00
Stephen Kelly
3b1a52b573 Fix build with QT_NO_CLIPBOARD.
Change-Id: I82558e1e432934b98236d69106fb98e44e819095
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-04-18 11:36:05 +02:00
Kim Motoyoshi Kalland
f13acef7ba Remove todo comments that are no longer relevant.
Task-number: QTBUG-25067

Change-Id: I5d3022a2881a3c6c97429f609fe567bd9970a046
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-18 11:36:05 +02:00
Lars Knoll
23ad9c3cf2 Revert "Fix memory leak of QFontEngineData"
This reverts commit addffb71b4.

The fix causes crashes on exit in Qt Declarative.

Change-Id: Ib1fc67c27fb1869b7824ba080083da67b8878fff
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-18 08:58:58 +02:00
Tasuku Suzuki
f5c3226f58 change NSTextInput to NSTextInputClient in Cocoa plugin
NSTextInput protocol is slated for deprecation

Task-number: QTBUG-23867
Change-Id: I3f9eadc31bdf4234c63f1bcde5172f22da8d340e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-18 01:33:57 +02:00
Janne Anttila
7bab41a681 Fixed libjpeg compiler warning about macro redefinition.
When compiling Qt for Windows CE the MSVC reported the followin warning:
    warning C4005: '_CRT_SECURE_NO_DEPRECATE' : macro redefinition
Fixed by adding ifdef quard for duplicate _CRT_SECURE_NO_DEPRECATE.

Task-number: QTBUG-22512
Change-Id: I8c37ffe6ca275c80a7b7e6b23f39f3ab06b332f1
Reviewed-by: aavit <qt_aavit@ovi.com>
(cherry picked from commit 1a1a8f004824b981865c6239747ff05d8e6f812a)
2012-04-18 01:33:57 +02:00
Mark Brand
00bf077b98 remove useless workaround
The workaround attempts to let the application reserve memory in
QString for receiving the stored procedure output parameter.
This does not work because the reserved capacity is not preserved
through QVariant.

Unfortunately, the application must actually populate QString with
at least the number of characters that will be received.

Change-Id: Icb3be60d6bd570ad2349f20fb7d93b340e395627
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-17 23:16:51 +02:00
Mark Brand
f869a12c10 QTBUG-18435 fix stored procedure output parameters on ODBC
Follow-up to c55a99965d8c08d5f924d49db4fe4aa49df8096.

3 problems prevented stored procedure output parameters from working.
- SQLBindParameter needs access to buffer provided by QByteArray.
- The length of the buffer is measured in bytes.
- A typo corrupted conversion back to QString.

Also, data() makes more sense than constData() to expose the buffer.

Task-Id: QTBUG-18435
Change-Id: I66444b13c0f584ed79bcf026e5a23caff83c22cb
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-17 23:16:51 +02:00
Frederik Gladhorn
84e782e2bd Only send progress bar updates when visible.
Screen readers tend to announce progress.
Some applications (for example KMail) have hidden
progress bars that update frequently.

While the applications should be fixed, it's better
not to spam the user with continous progress announcements.

Ported from Qt 4 patch.

Change-Id: I5f3b5a83dc80594d995b10e58527115de8601c77
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit 90dc28900d3abfb00a65fef1d9daf36e727dfdca)
2012-04-17 23:16:51 +02:00
Frederik Gladhorn
c65a558e00 Accessibility: Check for valid range of tree items.
This might lead to crashes otherwise.

Change-Id: Ib28ac03b7d200571a0e759467eb692cfee3b05f3
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-04-17 20:58:49 +02:00
Frederik Gladhorn
d64ad022f3 Use parentheses in statement with && and ||.
Forwardport from Qt 4

Change-Id: I4f968559a7371b87343cb5825eb83b0099364cf2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit 330b0bece4d7805067f488c157532f9fb9b48bbc)
2012-04-17 20:58:49 +02:00
Konstantin Ritt
dab2e1fea7 QThreadPool: unify waitForDone() overloads
Change-Id: I1515a65fab37588372794422a43ed09ac076e108
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
cbaf52b099 QThreadPool: optimize enqueueTask() for common case
the most-common case is: queue is empty or filled with tasks of
the same priority; so the runnable would be put at the end of queue.
both checks are cheap for us.

also avoid detach()'ing by using const iterators

Change-Id: Iab2255f852211f9accc8d717f778671661210ef3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
95bd974163 fix QChar::decompositionTag() returns wrong result for Hangul syllables
Change-Id: I28e7b14b6a90aa539f8a50107737a66b3484fc00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
087cda285f fix QChar::isPrint() returns an incorrect result.
results are now equals to results of ICU's u_isprint() for the entire set
of the Unicode code points

Change-Id: I763f4b37cccd285eb01543d486f25bd7ea011241
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-17 18:44:13 +02:00
Samuel Rødal
a73125bada Fixed RGBA <-> BGRA bug in EGLFS backingstore.
Better to swizzle in the fragment shader than to do a byte swapping
operation on the CPU.

Change-Id: I01420c3a5ceb5309f5648e1f86979b025bdd88aa
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-17 16:28:46 +02:00
Janne Anttila
ec49bcb2e4 Fixed MSVC compiler warning for zlib when compiling on WEC7.
WEC7 mkspecs define _CRT_SECURE_NO_DEPRECATE globally. zlib redefined
the same macro without checking if it is already defined. Added #ifdef
guard to zlib when defining _CRT_SECURE_NO_DEPRECATE.

Task-number: QTBUG-22512
Change-Id: I477b24b7bc0ebb4cd8a619b11668eceb0f5064d4
Reviewed-by: aavit <qt_aavit@ovi.com>
(cherry picked from commit a0a970447d63e5c9afdb55d179d671d9c24e9061)
2012-04-17 16:28:46 +02:00
Pierre Rossi
46556529ec Fix a thread safety issue with QTextLine::glyphRuns
This is a very partial revert of 10ac80708.
Revert back to using engineFromScript, which is reentrant, for cases other
than the "rawfont mode". In that last case, reentrancy is not a big issue
so far as the only client is WebKit, and this is used in the web process,
with no threaded rendering.

Change-Id: I047b04cf0236d52e6d548f34cddd3dcc7c3c5f83
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-17 16:28:46 +02:00
Jian Liang
addffb71b4 Fix memory leak of QFontEngineData
Move QFont::cleanup(); and cleanupThreadData(); to the end of destructor
of QGuiApplicationPrivate class. This is because they will trigger the
QFontCache::~QFontCache() function being called and at that time the
platform_theme object still hold some fonts object, This will cause the
QFontEngineData object hold by those fonts can never been deleted.

Change-Id: I4d3f21c5e2683706f68395ba3ad24203081e1d1d
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-17 16:28:46 +02:00
Jørgen Lind
ba1309e1f4 Add function getters in the native interface
Change-Id: I4609071e38c3807479375ef98f260516da03ec15
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-04-17 16:28:46 +02:00
Casper van Donderen
1d0ed55e6e QDoc: Write subclasses of namespaces in automatic ditamap.
Now we also write the subclasses of namespaces sorted to qt.ditamap.

Change-Id: I4a4376bac208b9bacd5a2ddd5265faef13dc2eba
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-17 16:28:46 +02:00
Jan-Arve Saether
19768e115a Add some missing \internal for accessibility
Change-Id: I42c0a14908cfcccd2218f887b286515fef8d6611
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-17 16:28:46 +02:00
Stephen Kelly
7c3684dff7 Fix out of bounds use of QVector API.
This is a regression introduced by commit
22b7d21186.

Task-number: QTBUG-24965
Task-number: QTBUG-25140

Change-Id: I3f3bfe23af802444b078a29ee5565dd2bd24a34d
Reviewed-by: David Faure <faure@kde.org>
2012-04-17 16:28:46 +02:00
Lars Knoll
64255ef650 Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
2012-04-17 12:58:52 +02:00
Sergio Ahumada
16b53b2f0e Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes 2012-04-17 10:38:24 +02:00
aavit
4a9fb41a79 Upgrading libpng: Patches to libpng 1.5.10 for Qt usage
This is the collection of those earlier patches to libpng in Qt that
are still relevant, updated as required. For details, refer to the git
history of the src/3rdparty/libpng directory of Qt 4 and Qt 5/qtbase.

Change-Id: Ia922441024536eec9b8ced8c3c5e4dc941ae152f
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-04-17 10:15:56 +02:00
aavit
1fa1ce3628 Upgrading libpng: Adding clean copy of libpng 1.5.10
This commit removes the previous version of the bundled libpng
(1.5.4), as well as all local modifications to it. It adds an
unmodified copy of the official libpng source distribution, except
that various extraneous files have been removed, as usual.

The patches required to build it in Qt will follow in separate
commit(s).

Change-Id: I90149f87fc889c44a3b60b21cdf755020f3a8e39
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-04-17 10:15:48 +02:00
Bradley T. Hughes
bffbfc5b33 Cocoa: allow timer activation to recurse
CFRunLoopTimer's callback will never recurse. Since we are using one
CFRunLoopTimer to drive all Qt timers, we need to work around this by
sending all timers via a dedicated CFRunLoopSource (since these
callbacks can recurse). We also need to block this new timer source
along with the posted event source when calling processEvents()
"manually" to prevent livelock deep in CFRunLoop.

Change-Id: I375e46b6cfa0c76db678a1085314d42d8996d062
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-17 10:15:44 +02:00
Bradley T. Hughes
2afeb07227 Add QPlatformWindow::setWindowModified(bool)
Mac OS X provided a platform API for marking a window/document as
modified. This previously worked in Qt 4, so we need to have an
interface to keep this working in Qt 5. If the platform window does not
provide an implementation, fallback to setting the window title.

Note that this does not add any QWindow API, it's only in
QPlatformWindow.

Change-Id: I84c5a5df8536859157f2b1fa9e4cc647a09fd06d
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-17 10:15:44 +02:00
Girish Ramakrishnan
2c13dc7482 api: remove QWindow::move
QWindow::setPos is the correct api.

Change-Id: I5439338e9bc6933800d66331f20ce554b017c4fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:52 +02:00
Girish Ramakrishnan
f285356e88 api: Fix const correctness of api in QScreen
const was missing in many convenience functions.

grabWindow should not be const since it actually does something.

Change-Id: I0ffa718878d4251c4fb5c34789cf58ebb85cff37
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:49 +02:00
Girish Ramakrishnan
6094197294 api: Make QGuiApplication::styleHints() static
Practically all functions in QGuiApplication are static.

Change-Id: I5948620865c021029a3c04b31901b1110e6c0d27
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:47 +02:00
Bradley T. Hughes
5a57ddebf5 Fix tst_QDialog::deleteInExec() crash on Mac OS X
When destroying a window immediately after showing it, we can sometimes
provoke a crash in Cocoa after the show-window-animation has finished
(which appears to assume that the window's view will always be valid).
Prevent the crash by not removing the view from the window. When
recreating a window, we explicitly release the old window, but we do not
release the view, so we can freely add it to the new window (i.e. this
does not introduce new bugs related to recreating the platform window).

Task-number: QTBUG-24977
Change-Id: I466ce75b04785401032a0a2d4a2c494910cd1672
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-17 03:28:29 +02:00
Donald Carr
a2e42a6a0a Reintroduce testlib to widget free builds
testlib now compiles without widget support and it will be great to get
this code path QAed and testable.

Change-Id: Iceb641bf04fdac84ef0a0f86d0abb83f4c66bf80
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-17 03:26:32 +02:00
Qt4iOS
4a4e9e4a9c Add support for iOS.
Provide support for platforms with older implementations of
realpath() (eg. iOS).

Change-Id: Iec7f73c8014d238ae6a2cb2fa836b36b89ce4ef6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-17 03:26:32 +02:00
Bradley T. Hughes
768e587cdc Add QPlatformWindow::windowEvent()
This function is used to pass non-spontaneous events from QWindow to
QPlatformWindow so that QPlatformWindow subclasses can do any platform
specific event handling (such as setting/clearing modality flags on
QEvent::WindowBlock/WindowUnblock).

Change-Id: I82a89e8dadcd2f706aae25889d79cbfac9c2ee18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 01:13:52 +02:00
Donald Carr
d4c4723583 Remove incorrect inclusion of GL support headers given EGL presence
The include files have a hard dependency on OpenGL (ES2); testing for the
presence of  EGL support is insufficient grounds for including this
functionality

Change-Id: I391b5dbbcbef40ecf68d16617b6eb1c0bb4b799e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-16 22:55:26 +02:00
hjk
6e1594e456 Make {TCBPoint,QEasingCurveFunction}::operator==() const
This is needed to use the classes with standard algorithms
and is the Right Thing anyway.

Change-Id: I13d1e0bfabbd216319cc138f11a9b3240f093052
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-16 22:33:50 +02:00
Donald Carr
5ba9c07ddd Handle window state changes correctly in EGLFS
The only valid state for EGLFS is fullscreen; this change reduces EGLFS to
reflect this cruel reality

Change-Id: I5aa9b4ef88451a00ce9de328add7d5512e1c86b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-16 22:33:43 +02:00
Samuel Rødal
c2cd2a0cb8 Implemented raster based backing store for EGLFS plugin.
This improves quality of rendering for QWidget-based applications a bit.

Change-Id: I6b832d1de7e722f4dbe4e82882f5db35f0b8c30c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-16 21:42:19 +02:00
Bjoern Breitmeyer
0e317af13f Fixed networkproxy build under WinCE
The used functionality is partially not available under WinCE.
qnetworkfunctions_wince.h encapsulates the needed extra symbols.
It only needs to compile as the functions are loaded dynamically.

Change-Id: Ieb9010d4f6c7f94d39918b869ac503976e094e49
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-16 19:04:38 +02:00
Martin Petersson
0a5440b2f0 Responses to request with AlwaysNetwork set should be cached
Previously the cache was not enabled if the request had AlwaysNetwork
set. This removes the check for the CacheLoadControlAttribute when
checking if the cache should be enabled.

Task-number: QTBUG-15805
Change-Id: I3d0722fbc1e6c77c5b947a2af0a09e2de8f4f9df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-16 18:35:58 +02:00
Richard Moore
2b1e0940fd Trivial doc fix.
Change-Id: I837c74d38b9f73aed41c3839421f5faad9d22f3f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-16 18:35:49 +02:00
Richard Moore
591ad20a0b Minor doc improvements.
Change-Id: Ic14cefcf935fea822c581013f437ae61b820ddd9
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-16 18:35:09 +02:00
Girish Ramakrishnan
5369f50686 Add 'we mean it' header to qpa headers
The QPA api is internal and not meant to be used by app users.

Change-Id: I37245e9635bf22f2454e763699dd58eca6565b63
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-16 18:31:52 +02:00
Girish Ramakrishnan
a718a99438 doc: Mark all qpa classes as internal
All QPA api as marked as so:
    * preliminary - the api is subject to change anytime
    * internal - internal api that shouldn't be used by apps
    * ingroup qpa - "qpa" module. In the long run, qdoc should
      generate documentation for qplatform* API as if it were
      a seperate module.

Change-Id: I4e76c0e0c1805c679cabd52d5006f9fa9bc411c0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-16 18:31:39 +02:00
Holger Hans Peter Freyther
6615dc1370 gui: Clear the QPixmapCache before destroying the QPlatformIntegration
The QPixmap in the pixmap cache should not outlive the QPlatformIntegration.
Clear the cache shortly before destroying the platform integration. This is
fixing a crash with the DirectFB plugin in the tst_qpixmapcache test.

Change-Id: I0b1a304dc37d874b412aadb77f8dbaa7d292711f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-16 18:15:00 +02:00
Thiago Macieira
5eaf0b8ef0 Remove the Qt 5 todo about empty string lists in QSettings
There's no need to change behaviour now. The current marker (@Invalid())
returns an empty string list, as opposed to a list with one item.
Changing it would break compatibility unpredictably with Qt 4.

So I choose not to change QSettings. Let it be "Done".

Task-number: QTBUG-25110
Change-Id: Id1f353dfed800005d927183da237f3f8357c496d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-16 17:54:05 +02:00
Samuel Rødal
1afff0e5fa Made the evdev mouse plugin clamp coordinates to screen.
Useful when we get relative events, as otherwise the mouse might end up
far outside the screen boundaries.

Change-Id: I8e3884ab2acb03eaa6afce8926f503dbd03b0c5d
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-16 17:49:55 +02:00
João Abecasis
76d61af1e2 Make reallocData use QArrayData::AllocationOptions
Growth computations are deferred to QArrayData::allocate, except in the
case of realloc as that functionality is currently lacking in
QArrayData. Since that sits in library code, anyway, it can be changed
later to use a future QArrayData::reallocate.

As it is, reallocData is becoming a model for QArrayData::reallocate
and what it can offer to containers of POD/movable types.

Change-Id: I045483f729114be43e4818149d1be1b333bcbe13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-16 15:51:20 +02:00
João Abecasis
3111e6d6fa Drop unnecessary assignment
In this branch, !IS_RAW_DATA has already established that offset is
sizeof(QByteArrayData) and realloc maintains the assumption.

Change-Id: Ic160e36d7781d4c4f64a3b2ebec98c9cb605b3eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-16 15:51:14 +02:00
Jędrzej Nowacki
d1f5a85e66 Migrate QByteArray over QArrayData.
For the time being QByteArrayData keeps its independent existence, for
the sake of other modules. Once they have been ported to use the new
initializer macros it can be changed to:

    struct QByteArrayData { QArrayData array; };

Extra braces can then be added to the macros.

With respect to source compatibility, the only concern is with other
modules, as QByteArrayData has already changed in incompatible ways with
Qt 4.x

Done-with: João Abecasis
Change-Id: I044e2a680317431777a098feec8839a90a3d3da3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-16 15:51:06 +02:00
João Abecasis
78b780b9a1 Remove explicit checks for shared_null/empty
This eases porting to QArrayData and retains semantics. In append() and
prepend() a conditional was generalized so that no work is done if there
is nothing to add.

Done-with: Jędrzej Nowacki
Change-Id: Ib9e7bb572801b2434fa040cde2bf66dacf595f22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-16 15:50:59 +02:00
João Abecasis
2ac4c463af Make QByteArray and QString keep track of terminating null
In conceptual terms, this change increments the Data::alloc member by
one for all strings allocated and maintained by these classes. Instances
initialized with fromRawData retain 0 as the member value, so they are
treated as immutable.

This brings QByteArray and QString closer to QVector, making it possible
for them to reference and share the same data in memory, in the future.
It also brings them closer to QArrayData.

In practical terms all comparisons to the alloc member were changed to
take into account that it also tracks the terminating null character.

Aside from the increment in the alloc member, there should be no user
visible changes.

Change-Id: I618f49022a9b1845754500c8f8706c72a68b9c7d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-16 15:50:53 +02:00
Lars Knoll
9bd0323551 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/corelib/io/qurl.cpp
	src/gui/kernel/qwindow.cpp
	src/tools/moc/generator.cpp
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/styles/qstyle.h
	src/widgets/widgets/qtabbar.cpp
	tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
2012-04-16 12:04:34 +02:00
Stephen Kelly
77fd8fd997 Show the type and address of QObjects in debug output.
Change-Id: I9f44ab80a6fb763adc9cbaf47de8e1b97212332d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-16 11:35:44 +02:00
Jørgen Lind
44be58226e Remove OpenKode OpenVG and qvfb platformplugins
Change-Id: Ic0bd8f68080bf139d81266d033cfd3c96a8d01f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-16 09:45:27 +02:00
Jian Liang
944d2e2f74 Initialize reference count for QWindowsMsaaAccessible
Initaliize reference count value to 0 for QWindowsMsaaAccessible.

Change-Id: I15cadd7ced0240322240060f6dd5126cc8add338
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-16 09:45:27 +02:00
Sean Harmer
6ad1ebf6f8 Use the new plugin metadata method in the QNX QPA plugin.
Change-Id: Ib40807b97bf8d9ec26e0dfe2797786d9352ce579
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-16 09:45:27 +02:00
Girish Ramakrishnan
41673c45dd qmenu.h includes private headers
qpa includes are considered private and should not be included
in public header files.

Change-Id: I26c744ec1d8ddef7b0c11c3d26b593be05f5aa54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-16 07:31:37 +02:00
Girish Ramakrishnan
d037d25c3d api: fix constness of QOpenGLContext::getProcAddress
Should be const just like Qt4's QGLContext::getProcAddress.

Change-Id: I273467d5cf852cd49f48cec3f335c4ddac795363
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-16 04:21:49 +02:00
Sean Harmer
f609035fc1 Adding support for obtaining an OpenGL Core Profile context on Mac OSX
Change-Id: I08048ecee9b243b122ee93fce316e498aa7e2d51
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-16 03:10:22 +02:00
Pasi Matilainen
b3670edba4 Fix incorrect state of show/hide menu items in Mac application menu
The "Hide <app>", "Hide Others" and "Show All" menu items in Mac
application menu are always enabled, and do not get disabled correctly.
Fix by turning on autoenable for the menu in qt_menu.nib, and by
implementing menu item validation in QCocoaMenuLoader.

Task-number: QTBUG-10705
Change-Id: Ic181dfa26a71acad0067f5269c72517b50b17362
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
(cherry picked from commit 8f23a6be1069455e609e8bea7527726c24bebb36)
2012-04-16 03:10:22 +02:00
Olivier Goffart
d2090e19a9 moc: Fix parsing of the empty preprocessor command
When encountering a null preprocessing directive (which is supposed to
be ignored), the moc preprocessor will leave a PP_NEWLINE token in the
token stream. That will confuse the parser.
The PP_NEWLINE token need to be ignored in the preprocessing phase.

Task-number: QTBUG-22717
Change-Id: I1e502a7e5bc6fa8ce2f82109ba7199b95747ff0a
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-16 00:54:19 +02:00
Thiago Macieira
f18a6c5fb5 Update com.trolltech -> org.qtproject in the bootstrapped tools
The tools will now generate the new org.qtproject annotations only,
matching the XML generator in the library. They accept both types of
annotations as input though -- and will generate a warning about the
older one.

This commit should be backported to Qt 4, so XML files can start to be
ported.

Task-number: QTBUG-23274
Change-Id: If298c342ab4774cbca1be1898a01af8b46e80446
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
2012-04-16 00:08:13 +02:00
Thiago Macieira
e12c34b244 Introduce the new UnknownProperty and PropertyReadOnly errors
Those error codes have been standardised for years but we haven't used
them until now.

Task-number: QTBUG-23274
Change-Id: Iebc9ded949f363281a4d43fd9d29a284f2e2df08
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
2012-04-16 00:07:49 +02:00
Thiago Macieira
e02a144a3c Finish cleaning up com.trolltech -> org.qtproject in QtDBus
Lots of uses of the annotations and error names, plus a bunch of local
unit test names (including one file that had to be renamed).

The meta object generator is updated to support both the old and new
names. That means some references to com.trolltech *must* remain in the
source code.

Task-number: QTBUG-23274
Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
2012-04-16 00:07:39 +02:00
Thiago Macieira
65e75acd05 Update the error codes in QtDBus
Change the old com.trolltech ones to org.qtproject and introduce Use
the alternate domain name for the Qt Project because the dash
character is not valid in interface and error names.

Task-number: QTBUG-23274
Change-Id: Iac1699e70525d67f983c10560932acff6b2ecde6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-16 00:07:25 +02:00
Holger Hans Peter Freyther
83fc52e3b4 widgets: Fix painting to a fully transparent top level widget
QWS used to have a line to change the composite mode from SourceOver
to Source for the top level widget. This wasn't used with QPA and I
removed the internal DontSetCompositionMode in qtbase. It turns out that
the QWS way is the most efficient one to initialize the background of
the widget.

The alternative is to have the QPlatformBackingStore::beginPaint
always clear the entire to be painted area and then paint the background
of the widget. The difference of painting each pixel once or twice is
noticable on embedded platforms and in the range of one to two fps.

Reproduce the issue with:
echo "QWidget {background: transparent}" > style.css
./examples/widgets/wiggly/wiggly -stylesheet style.css

Task-number: QTBUG-24526
Change-Id: Ica4c980bb3bf6eb87ddb5b510ac7493292d01543
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-15 06:14:00 +02:00
ABBAPOH
5cb2fbe088 Now QSplitter can have 0-pixel handle
Change-Id: Iad920ffcd5d7f4c01504d41d1740f130b7aa53dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-15 03:53:07 +02:00
Konstantin Ritt
73b24486ed UCD-5.0: apply Corrigendum #6
http://unicode.org/versions/corrigendum6.html:
> in Unicode 5.0, the list of characters with the Bidi_Mirrored property
> was made consistent for brackets and quotation marks, in preparation for
> new constraints on bidi mirroring. However, after publication of
> Unicode 5.0.0 it was discovered that this change adversely affected
> several quotation mark characters in deployed data.

Task-number: QTBUG-25169
Change-Id: Id49caf401af2d5a1e6dbcc32b2f350aa20b7f901
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-15 03:53:07 +02:00
Samuel Rødal
d357b74493 Fixed broken logic in evdev input plugins.
If we do multiple reads we need to accumulate the total amount of bytes
read, instead of just taking the last read amount into account.

Change-Id: Iaa9b90c269f3ed9d09dae67452ca816d9db6217f
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-15 01:41:45 +02:00
Girish Ramakrishnan
a9a1bf3359 Fold qpaintdevice_qpa.cpp into qpaintdevice.cpp
Change-Id: I274508826b9be4eb00f67fccae5a18ecbdf41a36
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-15 01:39:54 +02:00
Girish Ramakrishnan
763de6965c Fix header inclusion guard
Change-Id: Icc537d5b52315b9563078da9fa69ddd67b567f76
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-15 01:39:33 +02:00
Girish Ramakrishnan
033eff02fe doc: QWindowSurface is dead
It goes by the name of QBackingStore these days.

Change-Id: Id46254e47ee0abf9e669862eec6c2205d9634368
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-14 19:46:32 +02:00
Casper van Donderen
48e092574a QDoc: add missing newline characters in qdoc -help.
Change-Id: Ibd50091693be393c6b479d6ca8927ba1ed578709
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-14 19:46:09 +02:00
Martin Smith
aabd54b8bb qdoc: Fixed bugs causing invalid DITA XML
Fixed a bug in qdoc that caused too many end elements to be generated.
Also fixed some doc errors that caused invalid DITA to be generated.

Task nr: QTBUG-25302

Change-Id: Ifbbf457d28c51c2691a252888447739da7713bc9
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-14 19:46:00 +02:00
Giuseppe D'Angelo
c01eaa4382 QHash security fix (2/2): enable QHash random seed
Algorithmic complexity attacks against hash tables have been known
since 2003 (cf. [1, 2]), and they have been left unpatched for years
until the 2011 attacks [3] against many libraries /
(reference) implementations of programming languages.

This patch makes qHash use the QHash seed introduced in the
previous commits, thus truly randomizing bucketing in QHash.

[1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf
[2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks
[3] http://www.ocert.org/advisories/ocert-2011-003.html

Task-number: QTBUG-23529
Change-Id: Ibee9cf6aa820af5d777fcde478647665c728052a
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-14 17:59:26 +02:00
Giuseppe D'Angelo
c2293c897c QHash: remove optimization for QHash<int, T>
QHash employs an optimization for int/uints, squashing the hash
value and the key value inside an union. This obviously works
iff qHash(int k) = k. If the hash value gets salted, the hash
table is corrupted.

This patch removes that optimization by means of a #if 0,
so if further research finds out that we want those 4 bytes back
it's pretty simple to revert.

Change-Id: If273f0bf2ff007f4f2f7c46d2aab364a3b455cf1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-14 15:49:16 +02:00
Giuseppe D'Angelo
a8ceb73b93 qHash: qHash(T*) two arguments support
Change-Id: I1b78914fe9c6ee9251d68af1f2e95f1e3e0f1db5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-14 13:50:54 +02:00
Giuseppe D'Angelo
67d7f55db6 qHash: two arguments support for simple integer types (and QChar)
Change-Id: I24bed73422fb1d2e90cf3dd4e5375e249b3dcac4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-04-14 13:50:33 +02:00
Frederik Gladhorn
eb52d31ddf Update accessibility selections in QTextControl.
Forwardport from Qt 4.

Change-Id: Iae0c2792b64b8ec2736a9ff621cf7c313a394093
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit d5649547d641b9c5af3c3f814caf8e1ab5bf9f47)
2012-04-14 13:40:03 +02:00
Girish Ramakrishnan
d80b00f320 Fix header inclusion guards
_QPA_ should only be used for qpa (plugin specific api) files.

Change-Id: I1fb6cd5973fcabec4c7e87eb6ccb048f825e2aad
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-14 06:44:57 +02:00
Thorbjørn Lindeijer
06a5904c8f Removed QXmlStreamReader::readElementText overload
The version without argument was kept for binary compatibility when
the configurable ReadElementTextBehaviour was introduced. It is now
dropped in favour of using a default argument value.

Change-Id: Ic08c41d5a5aad9f22df7fc37a2d53ffbc6df1fe9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-14 03:53:46 +02:00
Mark Brand
cf52540dfb QTBUG-1363: fix QSqlField.length() for ODBC
Applied Bill King's suggestion in QTBUG-1363. Columns of
hStmt must be accessed in order.

Verified using ODBC driver on SQL Server 2005 on Windows 7.

Added test for length of text field for MS SQL Server over ODBC.

Task-Id: QTBUG-1363
Change-Id: I6673dafe75e3ef394d41e439adb45096c1421068
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-13 21:26:07 +02:00
Friedemann Kleint
13ebff81d0 Windows: Determine suitable font engine from application.
The Freetype engine currently works better for QML2, whereas
the native engine is better suited to the widgets.

Task-number: QTBUG-24205

Change-Id: I76de98c3e7c84a2d72542ea9860b8be1e67f7e04
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-04-13 18:15:26 +02:00
Frederik Gladhorn
76f536d661 Use QPointer to store accessible object.
Itemview were not following the established pattern
of keeping the referenced object in a QPointer.
This made them a lot more crash prone.

Port of Qt 4 change.

Conflicts:

	src/plugins/accessible/widgets/itemviews.cpp
	src/plugins/accessible/widgets/itemviews.h

Change-Id: I210b112b9c3647b246fde2d6c69aba9ce8d25bd3
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit f420ab2870d3c96e9678c24c64b4e26ec8a771bd)
2012-04-13 18:15:26 +02:00
Olivier Goffart
5a8c13a7d4 doc: Fix QObject::connect documentation
Unfortunately, qdoc is too simple to understand any pointer to member
function syntax.
(the ::* token is not even tokenized. And even if it was, it would be a
difficult way to hack that into the parser. (there is already an ugly
workaround for non-member pointer to function hat works by having '(*'
as a token,but the same hack is not possible for pointer to member function))
So I just put verbatim 'PointerToMemberFunction'

Also remove the obsolete mention that Qt::UniqueConnection is not supported
in that overload. It is now. (And it even contradicts the previous
paragraph)

Change-Id: I8fc9544808c9a462b0f11ccea406e2e33dee15b1
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-13 18:15:26 +02:00
Gunnar Sletta
84caba25d8 Move QPainterPathPrivate to the private header files.
This was made inline for the sake of performance, but has in hindsight
proven to be not really worth it. It also prevents us from aligning
the internal datastructure of QPainterPath with that of QPolygonF
and the internal QVectorPath class which would make mapping
between the two inside QPainter a lot faster.

Making all this out-of-line now as discussed in the task
https://bugreports.qt-project.org/browse/QTBUG-19998
so we can adress this in a binary compatible fashion during
Qt 5.x

Change-Id: I61058171ed31f8a845fa45517248367c85ce52cd
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-13 18:15:26 +02:00
Holger Hans Peter Freyther
19524b7499 directfb: Integrate building into configure.
Add DirectFB buildsystem integration by adding a configure target
and adding it as subdirectory to the project file. The default is
to automatically build directfb. Update the Broadcom/9425 build.

Change-Id: I482f865cebd9d5cd4c98c184773f8534f92db9df
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-13 18:15:26 +02:00
Giuseppe D'Angelo
bcedd0e242 QSharedPointer: qHash two arguments support
Change-Id: I800de3fd9769e4829018360c25a8cf2ee2e2e08b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-13 17:05:02 +02:00
Jan-Arve Saether
6fc44c5926 Minor cleanup of the header file.
Move inline implementations to iaccessible2.cpp.
Makes it easier to read and navigate the source code.

Change-Id: I8da44ba0d40395356f612ff6b3ce2a808105838a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-13 15:50:27 +02:00
Friedemann Kleint
d318ea2655 Windows QPA plugin: Fix logging.
- Remove frequently occurring messages.
- Rename variable to QT_QPA_VERBOSE.

Change-Id: Id930e1422675355a9657edae6505be87aaec98a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-13 12:59:17 +02:00
Konstantin Ritt
9fd2edb6da replace hardcoded values with a surrogate handling methods
Change-Id: Ib41e08d835f2e8ca2e32b4025c6f5a99840f2e27
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-13 10:44:28 +02:00
Jason McDonald
b317fe2a60 Merge the two overloads of QButtonGroup::addButton().
This change is source-compatible, but binary-incompatible.

Task-number: QTBUG-25101
Change-Id: If67aec2ca8dd54ad9315f6497c2dafbbbc0b775f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-13 10:44:28 +02:00
Thorbjørn Lund Martsum
03dbba9a62 QLayoutItem - make controlTypes a virtual function.
Just implementing the ### Qt5 suggestion about making
controlTypes a virtual function.

Change-Id: Ic1db47fe488f089de965438e456e9b48e0b96f32
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-13 10:17:44 +02:00
Stephen Kelly
2f4b9b8e42 Fix unsigned comparison warning.
Change-Id: I8544f47177b68cf29ce9fbebb152ca73db6e219d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-13 08:34:06 +02:00
Aron Rosenberg
99be6a5c12 Fix compiling with XCode 4.3
XCode 4.3 moved the location of the SDK dir, so change the qmake
test to not use the old hardcoded location. Also change the test
to look for versions before 10.6 instead of later than 10.6 so 10.8+
gets detected correctly.

Change-Id: I1cb53a18c4b4f484d0d9de9c9d5e9641018f2502
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-13 08:34:04 +02:00
Konstantin Ritt
89e5740a95 QChar: documentation fixes
Change-Id: Ic4b58ab811e53cf175ebaf0a67c40c56678f0f35
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-13 08:34:00 +02:00
Qt4iOS
600943daef Added iOS compatibility.
Put MacOS-specific code in #ifdef blocks to disable compilation on iOS.

Change-Id: I02c99c62b8ceb468b8b58e3c4ef52ca8ae2495f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-13 08:33:58 +02:00
Qt4iOS
affbbcd738 Added iOS compatibility.
Put MacOS-specific code in #ifdef blocks so that it is not compiled for
iOS. Add iOS implementation for MacOS-specific code, where possible.

Change-Id: I3664c76fcfa8d5497ad1db676b9331e4ae0dca0e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-13 08:33:56 +02:00
Qt4iOS
dcd893fbf7 Added iOS compatibility.
Modified OpenGL header inclusion block to support iOS GL include paths.
Removed ability to build for MacOS with GLES2, as no support on MacOS
for OpenGLES.

Change-Id: I2bcf302278545147632b23a86380fa3980ec10a4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-13 08:33:54 +02:00
Qt4iOS
75fb4efeae Added iOS compatibility.
Put MacOS-specific code into #ifdef blocks to enable compilation on iOS.

Change-Id: I0bb3846f457d1b3a56d99fe182b1718bc8429117
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-13 08:33:51 +02:00
Casper van Donderen
db094dfae1 QDoc: Fix infinite loop when finding items in ditamaps.
Change-Id: Ic033676e21a252db07543fccba0d2a41f4b52294
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-13 08:33:49 +02:00
Samuel Rødal
5bf5ace38c Prevent warning when using QPainter on a QGLWidget.
Prevents warning "QOpenGLContext::swapBuffers() called without
corresponding makeCurrent()".

Change-Id: I7e4f94df8654f899c25b3f41cbf4d007ca293f16
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-04-13 08:33:47 +02:00
Friedemann Kleint
fe0f72fa1a Implement modality in the Windows plugin.
Disable blocked windows and flash the active window if
a blocked one is activated (as in Qt 4).

Change-Id: I6b6d230f94a271ce2aa649e3f4e13ebd63e93da4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-13 08:33:43 +02:00
Thiago Macieira
e07cadecc2 __builtin_unreachable was added to GCC in version 4.5, so fix macros
Change-Id: Ida63bb46f696ae9d60331d863bf1478415a08ff2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-13 08:33:40 +02:00
Hannu Lyytinen
2a5ade68fd Use the new udev based framework for detecting graphics cards.
Get rid of hard coded device node and support any number of graphics
cards.

Change-Id: I50f07fb1e6ea321a4ae751db8fb49ab439dce51e
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-04-13 08:33:40 +02:00
Hannu Lyytinen
5ab6a3270d Implement basic bits for device autodetection via udev.
The graphics cards and eventually the input devices need to be resolved
via udev. This commit adds a listener class and an abstract base class
for writing device specific handlers.

Change-Id: I62784c98bc7ad4bc1431d61cd5f13c8b48edf330
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-04-13 08:33:37 +02:00
Holger Hans Peter Freyther
01b54bcd84 device: Introduce hooks for the directfb plugin and use them
The EGL integration is vendor specific, add platform hooks to the
DirectFB plugin and implement them for the Broadcom 97425. The hook
interface is internal and there are no ABI/API gurantees.

Change-Id: I33359830c51f16895e771837fccb71e03c81cf18
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-13 08:33:37 +02:00
Olivier Goffart
d1329e43cb moc: fix compilation of signals returning pointers.
That was a regression introduced in 1c5db1aff

Example:
  signals: int *someSignal();
would produce this code:
   int* _t0 = int*();
which does not compile

So have special handling for pointer to change it to '= 0'

Change-Id: Ie695e15e309d15c3cfd5c5a69ac8bf6d61ae9915
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-13 08:33:34 +02:00
Thiago Macieira
53112c5167 Remove Q_CORE_EXPORT from the simple QFlag and QIncompatibleFlag
Change-Id: I0302238e817fc7d3b4682c5cc4f9cb51d181a7d2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-13 08:33:31 +02:00
Thiago Macieira
84e45c646d Move QFlags to qflags.h
This is a verbatim copy of the source code.

Change-Id: I1f7efc75cad1ba05dda31d8ccfd091ae9ae40fd5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-13 08:33:28 +02:00
Friedemann Kleint
54fe4324d8 Fix compiler warning in evdevmouse plugin.
Change-Id: I3b203b485079ff2cc96044789b06525ab2cde448
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-13 08:32:51 +02:00
Friedemann Kleint
e9ab2dabf9 Fix MinGW warning about qDebug() formats.
Change-Id: I927d17240a7cc7b88814601b0711aa46ca166ff9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-13 08:32:37 +02:00
Stephen Kelly
aec8bac313 Style: Don't put an else after a return.
Change-Id: I41d031d92489e5539f293c30a6257310f2a1c657
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-13 01:44:02 +02:00
Thiago Macieira
4953093873 Re-add the Qt 4 compatibility methods for QUrl encoded query items
I forgot to re-add those when I re-added the non-encoded (QString)
forms.

Change-Id: I9d635d40106273177df2c332f09d66415efc15a3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 23:01:57 +02:00
Thiago Macieira
4d79312f1c Ensure proper handling of empty-but-present URL components
The new QUrl is able to distinguish a URL component that is empty from
one that is absent. The previous one already had that capability for
the port, fragment and query, and the new one extends that to the username,
password and path. The path did not need this handling because its
delimiter from the authority it part of the path.

For example, a URL with no username is one where it's set to QString()
(null). A URL like "http://:kde@kde.org" is understood as an
empty-but-present username, for which toString(RemovePassword) will
return "http://@kde.org", keeping the empty-but-present username.

Change-Id: I2d97a7656f3f1099e3cf400b199e68e4c480d924
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-12 23:01:37 +02:00
Sergey Gusarov
8e943bbf5d Apply Qt config option "-no-largefile" to SQLite make process
This patch fixes compilation error if there is no
64 bit support in compiler.

Task-number: QTBUG-15395
Change-Id: Ife4afb05491d36af93bf4ad3ba8fa227710655f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-12 21:26:42 +02:00
Bjoern Breitmeyer
71cfddeecc fixed compiling of QDnsRunner for wince and windows desktop
ce only has the utf16 variant desktop has all variants
of the DnsQuery call. Unified it to the utf16 variant.

Change-Id: Ic126c3f53da71c85a41a5c24c85970335700bcf0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-12 18:55:04 +02:00
Shane Kearns
3c0fdefc31 Fix autotest failures in QAbstractNetworkCache
The cache expiration calculation was previously removed to avoid
calculating it every time an object is fetched from the cache.
This is because the expiration date is calculated from max-age or
expires headers when the object is added to the cache.

However this broke the case where the server only provides a
last-modified header. In this case, the expiration date needs
to be checked at fetch time in order to add the warning if the
object is >24h old.

Change-Id: Iad381da0f91c27ac603abbaa94f268700ad2297f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-12 18:49:14 +02:00
Shane Kearns
17412400dc Add OS version detection for windows 8
Based on consumer preview, the internal version is 6.2

Change-Id: I9d6ff6c7614f46a20d489e8a8f4aefeb60c547f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-12 18:48:57 +02:00
Yan Shapochnik
dae4bd8489 Fix possible crash issue when testing the state of a QAccessibleMenuItem
The owner widget of a QAccessibleMenuItem may be NULL. Checking for a valid pointer before dereferncing.

Port of Qt 4 patch.

Change-Id: Ic3149ccc5d6ae0ebc83dae58163ae2f60397fd28
(cherry picked from commit 3f526366af14f6c640dd52cd089b00776ab06731)
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-12 18:27:51 +02:00
Robin Burchell
5aa8e5a81c Remove QPaintBufferSignalProxy and QPaintBufferResource.
Nothing seems to use these...

Change-Id: I58b3e5f8536e43b3076da0a86d9093a6e11b947a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 17:22:19 +02:00
Girish Ramakrishnan
40a1e8eccf Remove hasDirtyFromPreviousSync from backingstore.
It's always false (used to be some qws specific variable).

Change-Id: I3dc185dba4c778797f180410ce8d293336ecfd9c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 15:39:05 +02:00
Girish Ramakrishnan
a5dccb0ece Move QSurface destructor to qsurface.cpp
fa0407bdb5 moved all QSurface code to
a separate except the destructor.

Change-Id: I2bf426a0b70cbffafae7aca8dd5550192f762aeb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 15:37:15 +02:00
Girish Ramakrishnan
e583ce4103 remove references to qws from backingstore
The backingstore code is already hard to read as-is. Let's
simplify things by removing qws code.

Change-Id: Ibefd3ea17d29970d1f7348461959fdc5b01c1f42
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 15:36:36 +02:00
Girish Ramakrishnan
93c960876a Remove redundant platformNativeInterface()
platformNativeInterface() is already defined in QGuiApplication.

Change-Id: Ice720fb6f7e4b01c4627219d66a5a3c8980a79a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 15:36:10 +02:00
Girish Ramakrishnan
dd2429551e Remove QWidget::setWindowHandle
It's unused. The window (QWidgetWindow) is created and managed implicitly
by QWidget.

Change-Id: I28ee3f120a99c877f318e1abd7d73c9f3e542d03
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 15:35:41 +02:00
Jason McDonald
0b2a10dce5 Remove a Qt 5 to-do comment that will not be addressed.
Task-number: QTBUG-25102
Change-Id: I3fe1878adcf17cb95209df271d062e126e32a8fd
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 15:33:33 +02:00
Jason McDonald
0734979976 Remove Qt 5 to-do comment that will not be addressed.
Task-number: QTBUG-25093
Change-Id: Ib78cffe06f721371ff5c16e24db3abae6dcd4984
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 15:33:23 +02:00
Girish Ramakrishnan
b53ea69731 qss: fix parsing of icon style hints
Use cssIconValueToIcon (see 5a0eb4e768) to
retrieve the QIcon value from the css parser.

Task-number: QTBUG-25120
Change-Id: Ie7c6691514a4b35d416ca09ccf7966689de831c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-12 15:31:15 +02:00
Giuseppe D'Angelo
5c9ba41f71 QRegularExpression: optimize global match
PCRE doesn't like illegal Unicode sequences (it's explicitely
documented in pcreunicode(3) that they trigger undefined behaviour,
and the program may crash). Therefore, we always let PCRE check
the validity of both the pattern and the subject string.

However, when performing global matching, the subject string
can be checked only once: subsequent matches can safely skip the check
and avoid a huge performance hit of scanning the whole subject
string for each match (!).

This patch implements that behaviour internally -- it's still
not possible for the user to skip the sanity check. On large
subject strings, this gives a terrific performance benefit.

Change-Id: Ia44cf18782e07966c9cd6ec4ccfef081ed131763
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-12 15:12:23 +02:00
John Brooks
56ff31f0c1 Support more scaling factors for JPEG decompression
Since libjpeg 7, decompression scaling factors of [1,16]/8 have
been supported. Upscaling is slower, but using the entire range
of downscaling factors is significantly faster for sizes between
the power-of-two factors.

Time to decompress a 5184x3456 image and scale to 1900x1200,
slightly less than 3/8ths, changes from 251ms to 203ms.

libjpeg versions prior to 7 will round up to the next largest
factor they support, and continue to work as before.

Change-Id: I00a0655df2ef057e739927a643bfe0b0cabd5602
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-04-12 15:12:20 +02:00
Alberto Mardegan
011b88a7b3 Compute overshoot condition before snap points
Snap points are not needed if the overshoot condition is met; therefore,
move the overshoot handling before the computation of snap points.

Change-Id: I37556b10c1b1124eaed53b0f2a330085acf70776
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-12 15:11:10 +02:00
Alberto Mardegan
0ac0191111 Fix QScroller diagonal scrolling
Compute the time needed for the scrolling operation before computing the
movement on the X and Y components. This ensures (except when
overshooting or snapping to snap points) that the scrolling on the X and
Y components takes the same time. That is, scrolling occurs always along
a straight line.

Task-number: QTBUG-23227
Change-Id: Ic3b78b8611dbcbf19711c3dd96485a0d53accaed
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-12 15:11:05 +02:00
Kevin Krammer
4fac40f8b0 Refactor navigator event handling
Separate PPS based navigator event notification handling and implementation
of the actual event handling.

Like the similar refactoring for screen events, this will allow to reuse the
same event handler class for BPS driven event processing.

Change-Id: I29d4a082cb01ff7943b7822ea9aa8ad622fda593
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-12 15:00:33 +02:00
Casper van Donderen
7ed1ab9076 QDoc: Generate missing image error.
Change-Id: I98faf3b3422fa0a7ebd3f65c7ba64e6dc31bad86
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-04-12 14:33:38 +02:00
Robin Burchell
6b39f614d1 Remove 'using' of QPaintEngineEx methods from QRasterPaintEngine.
drawEllipse() and the drawPolygon() overloads are all reimplemented, so there is
no point having this here.

Change-Id: I343cea0dd0fff2ed6a27be2a19459056e929f9d8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 14:33:09 +02:00
Robin Burchell
2573e9c81d Remove unused QIntRect.
I can't find any uses of this anywhere, in either Qt 4 or Qt 5.

Change-Id: Ibf747b57b4afdd81e11631e87a80dcab5ac12f69
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-12 14:33:09 +02:00
Jason McDonald
94519a441c Address Qt 5 to-do comments related to QFileSystemModel.
- QFileSystemModel::rmdir() and QFileSystemModel::remove() changed to
  non-const -- they don't change the object, but they do change the
  file system, and the Qt way is to be non-const if having side-effects
  on external entities.
- The comment on incompatibility between entryList and QFileInfo will
  not be fixed as doing so is likely to break existing code.
- The comment on removing the internal resolvedSymLinks variable has
  been removed, as the variable is still used.

Task-number: QTBUG-25088
Change-Id: I20456e4d116076403d9c4d4692ee05c178a1ed17
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 10:41:29 +02:00
Jason McDonald
4f929e01e0 Address Qt 5 to-do comment for QColorDialog.
- change customColor() to return QColor instead of QRgb.
- change setCustomColor() and setStandardColor() to take
  a QColor instead of QRgb.
- add missing standardColor() getter method.

Task-number: QTBUG-25087
Change-Id: Ic6adb2031ef47f5e9b15fa3560a5322e6847c0bb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 10:40:23 +02:00
Konstantin Ritt
1035c93245 make QStringList::sort() to take a Qt::CaseSensitivity param
Task-number: QTBUG-12892

Change-Id: I402e6fb12ff24ac26c5a8103bf81547946f9cc58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 10:39:22 +02:00
Andreas Aardal Hanssen
a9cda51517 Fixes a regression; missing cursor blink when input mask is set.
I can't say for sure why q*linecontrol passes an empty rect to
the updateNeeded() signal when an input mask is set; presumably
the empty rect at some point has meant "full update", but there
are a few problems with this. Surely a full update is wrong,
even if the semantics have been lost in translation somewhere
(likely the qlinecontrol refactoring). This fix ensures
that empty rects from updateNeeded() are interpreted as a request
to update the whole widget. A further improvement would be to
ensure the line control doesn't request a full update when an
input mask is set. The cursor is usually wider when a mask is
set but because of QLineEdit::paintEvent()'s implementation,
there is currently a mismatch between the cursor width as seen
by q*linecontrol and what is actually drawn, which causes
rendering artifacts if updateNeeded() sends the cursorRect().

Since QLineEdit and Q*LineControl aren't actively developed, it's
best to keep this fix minimal, although the performance cost of
updating the whole line edit when an input mask is set is
unfortunate.

Task-number: QTBUG-7174
Change-Id: Ie51e015d760915e07b0220b770f04fc958d93a12
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-12 04:35:22 +02:00
Girish Ramakrishnan
c7da50ef8c Suppress warnings caused by ignoring chdir retval
Using g++ 4.6.1, we get warnings like below:
qprocess_unix.cpp:1376:69: warning: ignoring return value of
‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]

g++ is pretty adamant and prints the warning even if you explicitly
ignore using (void). So, just check for error and print a warning.

Change-Id: Ifd6f3b6bb9e17d44aa235815b06a762131ca8751
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-12 04:33:57 +02:00
Bradley T. Hughes
4800a94c94 Cocoa: use specified window modality in native print dialogs
Don't pick the modality type based on the presences of a parent widget,
use QWidget::windowModality() instead. If modality hasn't been
specified, then use presence of the parent to chose an appropriate
modality type.

Change-Id: Ib39c166ba3293174c55748f63222367e3e1c56bc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-12 04:15:35 +02:00
Bhooshan Supe
3a4ed33140 Remove input plugins hard libudev dependency
libudev extends the base functionality of these plugins but should not
be mandatory as it is missing on many embedded devices that still
actually require input devices (keyboard and/or mouse and/or
touchscreen) support

Change-Id: Ieeb949f1af5e774578f689a63f47a8c48f546ac1
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-12 04:15:32 +02:00
Jason McDonald
ee5bd5349b Remove Qt 5 to-do comment that will not be addressed.
The suggested behavioural change had the potential to break existing
code, so the change won't be made for Qt 5.

Task-number: QTBUG-25119
Change-Id: Ie03271d12b21a800c998e073eeb9ca1cd03ffe19
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 04:15:21 +02:00
Christoph Schleifenbaum
5a2ef8ebdd Cocoa: Proper handling of mDelegate
mDelegate keeps the pointer to a QNSFontPanelDelegate, which reacts
on the NSFontPanel used by this dialog helper. It has to be created
before it can be used. On a read-only access, this has been fixed to
return a default-constructed value (like QFont()). For writing access
(like setting the font) the delegate was already created.

The same applies to mDelegate to QNSColorPanelDelegate respective.

Change-Id: I36b89c16d98db9275aa31d399fe094b1d56d800d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-12 04:15:10 +02:00
James Turner
3918386779 Fix ownership / lifetime of QCocoaNativeInterface
Change-Id: I21dd1e3186e0dbbc60294f807de0db6aad8b9eee
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-12 04:15:07 +02:00
Thiago Macieira
3127f23e3a Fix warning introduced in "Adjust a double leading slash..."
Change-Id: Id89fd3983123c0ba302c493b54437dd75e419e01
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-12 03:18:44 +02:00
Jason McDonald
113af57061 Make QBoxLayout::insertItem() public.
This commit addresses a Qt 5 to-do comment in the code.  The method was
already protected (so could already be made public by sub-classing),
and already has documentation in qboxlayout.cpp.

Task-number: QTBUG-25098
Change-Id: I5b51d34be8180becb63b8ad291879620f265bbec
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-12 01:58:12 +02:00
Thiago Macieira
1b7e9dba75 Change the component formatting enum values so the default is zero
By having the default value equal to zero, we follow the principle of
least surprise. For example, if we had
      url.path()
and we refactored to
      url.path(QUrl::DecodeSpaces)

Then instead of ensuring spaces are decoded, we make spaces the only
thing encoded (unicode, delimiters and reserved characters are
encoded).

Besides, modifying the default can only be used to encode something
that wasn't encoded previously, so having the enums as Encode makes
more sense.

As a side-effect, toEncoded() does not support any extra encoding
options.

Change-Id: I2624ec446e65c2d979e9ca2f81bd3db22b00bb13
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:32:26 +02:00
Thiago Macieira
997ac954ab Allow {} to remain decoded in URLs in the path and query
This allows things like http://example.com/{1234-5678}?id={abcd-ef01}.
But do not allow it in other parts of the URL. I could allow it in the
fragment, but in the username and password it would be too ugly.

In order to do that, make DecodeReserved use two bits and have
PrettyDecoded set only one of them. That way, toString(PrettyDecoded)
can be distinguished from toString(PrettyDecoded | DecodeReserved),
just as path(PrettyDecoded) can be distinguished from
path(PrettyDecoded & ~DecodeDelimiters).

Also, take the opportunity to avoid decoding the reserved characters
in the query. Keep them encoded as they should be.

Change-Id: I1604a0c8015c6b03dc2fbf49ea9d1dbed96fc186
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:32:18 +02:00
Thiago Macieira
a01c662d37 Introduce QUrl::DecodeReserved and reorder the enums
DecodeReserved applies to all characters between 0x21 and 0x7E that
aren't unreserved, a delimiter, or the percent sign itself.

Change-Id: Ie64bddb6b814dfa3bb8380e3aa24de1bb3645a65
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:32:04 +02:00
Thiago Macieira
0441b2d4c3 Merge QUrl::DecodeAllDelimiters and QUrl::DecodeUnambiguousDelimiters
There's little value in having the DecodeUnambiguousDelimiters option
since neither QUrl nor QUrlQuery can return values that are ambiguous
in that particular context, ever.

This option could be used to encode a character if, when placed
in a URL, it would need to be encoded. Such cases are hash (#) or
question marks (?) in the path component, or slashes (/) and at signs
(@) in the userinfo.

However, we don't need two enums for that, since there are no
other characters that can appear in either form. Still, leave two bits
for this enum. In the future, if we want to split the gen-delims from
the sub-delims, we are able to.

Change-Id: If5416b524680eb67dd4abbe7d072ca0ef7218506
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:31:59 +02:00
Thiago Macieira
ef288340da Fix the handling of ambiguous delimiters in the query part of a URL
This is the same fix as the previous commit did for the other
components of the URL. But we're also changing how we handle the "[]"
characters in a query: previously the handling was like for other
sub-delims; now, they're always decoded, assuming that the RFC had a
mistake and they were meant to be decoded.

Change-Id: If4b1c3df8f341cb114f2cc4860de22f8bf0be743
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:31:46 +02:00
Thiago Macieira
8d3cb11261 Make QUrl handle ambiguous delimiters correctly
Refactor the way that QUrl stores and returns the components of the
URL so that ambiguous delimiters (gen-delims that could change the
meaning of the parsing) are interpreted correctly. Previously, QUrl
called "unambiguous" the form found in a full URL, even though each
item in isolation could have more characters decoded.

Now, instead, store only the fully decoded form. To recreate the
compound forms (the full URL, as well as the user info and the
authority), we need to do more processing.

This commit applies to the user name, password, path and fragment
only. The scheme, host and port do not need this work because they are
special; the query is handled separately.

Change-Id: I5907ba9b8fe048fff23c128be95668c22820663a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 23:31:41 +02:00
Shane Kearns
dc325aab18 Fix error reporting in QNetworkReplyHttpImplPrivate
When errors are detected synchronously in _q_startOperation,
they were not reported. This is because unlike the generic
QNetworkReplyImpl the function is called directly rather than
using a queued connection.
In order to report errors, use the _q_error and _q_finished slots
so that signals are emitted after returning to the event loop
i.e. after the application had a chance to connect the QNetworkReply

Change-Id: I8a7bbe79a934f4634fb4e0572ebb5479dfc5f489
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:20:10 +02:00
Shane Kearns
1a6b338e10 Add autotest interface to get session from QNAM
Change-Id: I7d8ea41299408377042a9f0d0a672e1a6fb57e7d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:19:41 +02:00
Shane Kearns
b0c7f34c90 Check background requests are allowed before starting
If background requests are not allowed, don't even attempt to start
the network session, just fail the request immediately.

After this change, a QNAM with mixed requests queued should behave
as follows when background requests are disabled:
 - background requests at head of the queue fail
 - first foreground request starts the session and succeeds
 - remaining background requests fail
 - remaining foreground requests succeed

If policy is changed on the fly, then running background requests
are not aborted. However queued background requests won't be started.

Change-Id: Ic9aba1eb59ca41b166a08d2ed09418e1b6af6b60
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:19:35 +02:00
Shane Kearns
6957b8d1ed Define usagePolicies API in QNetworkSession
This allows the system to publish usage restrictions to applications
related to the network in use.
Currently there is only one restriction defined:
NoBackgroundTrafficPolicy, which means that non user initiated traffic
should be avoided (e.g. background downloads).
For example this policy could be applied to save battery or data transfer
charges.

Change-Id: I49e26c0f3650d2b92f4ec51981aae9435b717b49
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 22:19:21 +02:00
Shane Kearns
ad73c3505a Use NetworkSessionFailedError in QNetworkReply
Switched the error code.
Republish the error string from the bearer plugin if possible.

Change-Id: I9e4ac7a9914fbf2e87fe8fd3a5175deda6d933d2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:18:48 +02:00
Shane Kearns
5017b2ee54 Define QNetworkReply::BackgroundRequestNotAllowedError
This error will be used when background network requests are not allowed
according to the current policy of the bearer plugin.
For example, to save power when battery is low on a portable device.

Change-Id: I866e115f8fdd046134da99ea895b7c1df0375f26
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:18:43 +02:00
Shane Kearns
fd98a8bd3c Define QNetworkReply::NetworkSessionFailed error
This is to replace the UnknownNetworkError which occurs when the
internal QNetworkSession fails to start (e.g. no usable WLAN available)

Change-Id: I2b14577c22e0acf8ff07be7e932f0dfe9ac89c33
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:18:37 +02:00
Shane Kearns
ade5adaab8 Set ConnectInBackground based on request
Set the QNetworkSession attribute to match the QNetworkRequest that
triggered it.
Currently if there are a mix of normal and background requests queued
and background connections are not allowed by policy:
 - background requests at the head of the queue should fail
 - first foreground request should successfully start a connection
 - remaining requests succeed regardless of background attribute

Change-Id: If0e3ec0b8a5096e3d7cd6df85884c6f53172d233
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:18:29 +02:00
Shane Kearns
2eccb18889 Define BackgroundRequestAttribute
This is so that the ConnectInBackground flag can be set on the
QNetworkSession internal to QNAM according to pending requests.

Change-Id: If0cc62f5117ed8febbbda7b7f6de62b11b274258
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-04-11 22:18:19 +02:00
Konstantin Ritt
9327bc87c3 fix QUtf8 codec to disallow codes in range [U+fdd0..U+fdef]
0xfdef-0xfdd0 is definitely 31 and not 15 :)
also fix all copy-pastes of this code (greping for '0xfdd0' helps ;)

Change-Id: I8f3bd4fd9d85f9de066f0f5df378b9188c12bd48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-04-11 19:14:43 +02:00
Jason McDonald
7ff5fb610c Update Qt 5 to-do comment in QDom.
The change discussed in the comment doesn't have to be done in a major
release if it isn't source-incompatible.

Task-number: QTBUG-25103
Change-Id: I50036ab13611871ede01b7b7a17ce4c325476b00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 19:14:43 +02:00
Jason McDonald
0fc74370b2 Minimally resolve Qt 5 to-do's in QXmlSimpleReader
Task-number: QTBUG-25104
Change-Id: Ic5200e2671f60f314d68ef5b341073e04d690c00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 19:14:43 +02:00
Jason McDonald
d6ad749e8f Remove Qt 5 to-do comments from qgraphicslayoutitem.h.
Neither of these comments will be actioned for Qt 5: the first because
would be source-incompatible with Qt 4, the second becuase it would be
a significant behavioural change.

Task-number: QTBUG-25090
Change-Id: I5f8f7cce3007c3188b2f0184138fa8e55a165654
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 19:14:43 +02:00
Julian de Bhal
5071bbf491 Minor doc fix - show -> hide in QWindow::hideEvent()
Change-Id: I91c5b7f7b688c4f99c6a364692fd96603a38c9bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-11 19:14:43 +02:00
Friedemann Kleint
ce84af7c9b Propagate window state changes to QWidget.
Apply the state in QWidgetWindow and send an event to
the widget unless the code is triggered by
QWidget::setWindowState().

Change-Id: Ibf2f4e730384e41636841b9216eecfdff35b7bcb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-11 19:14:43 +02:00
Friedemann Kleint
54f718e552 XCB: Compress window state change events.
- Avoid sending Window State change events from
  WM_STATE/NET_WM_STATE changes irrelevant to Qt::WindowState.
- Introduce QFlags for the NetWmState getter and setter to
  avoid passing QVector<> around.

Change-Id: I74730928c7fffca0fa1cab3b90ded90b06304c06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-11 19:14:43 +02:00
Bradley T. Hughes
9839474e19 QWidget: allow modal top-levels to have WA_DontShowOnScreen
If a modal top-level widget has WA_DontShowOnScreen set, we need to call
QGuiApplicationPrivate::showModalWindow() and hideModalWindow()
ourselves, since we will not be calling QWindow::setVisible() (which
would normally do the call for us).

Change-Id: I1b22dd177c5956a2290f3ee031c95ab50d88f153
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-11 16:18:15 +02:00
Bradley T. Hughes
ad1bd1563f Implement window modality in QtGui
QWindow already has windowModality() and setWindowModality() as part of
its API from commit 516f4e283b. Platform
plugins can use this already to setup modality hints on windows that
they create, but it's not enough to implement modality fully.

QGuiApplication gets a modalWindow() static method, which is similar to
QApplication::activeModalWidget() in that it returns the last modal
window to be shown.

The modal window "stack" moves from QApplicationPrivate to
QGuiApplicationPrivate. The enterModal*() and leaveModal*() functions in
QApplicationPrivate are removed and replaced by
QGuiApplicationPrivate::showModalWindow() and hideModalWindow(), which
are called by QWindow::setVisible() just before calling
QPlatformWindow::setVisible().

The virtual QGuiApplicationPrivate::isWindowBlocked() will tell us if a
window is blocked by a modal window (and tell which modal window for any
interested callers). The default implementation works on the QWindow
level. QApplicationPrivate reimplements isWindowBlocked() and adds popup
and WA_GroupLeader support.

QGuiApplication uses the state set from isWindowBlocked() to block
user-input events: mouse press, mouse move, mouse release, wheel, key
presses, key releases, enter/leave events, close events, and touch
begin, update, and end events.

Note also that the modality helper functions in QtWidgets and
QApplicationPrivate are left in place and working as they always have.
The behavior of QWidget in the presence of modal windows/dialogs should
not change.

Change-Id: I2c89e6026d40160387787a6e009ae1fdc12dfd69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-11 16:17:59 +02:00
Lars Knoll
eff344ab8a Don't crash when comparing values containing empty arrays/objects
Task-number: QTBUG-25164

Change-Id: I1fa00e359ef3583b9a7136bb888cdf5e1c3e75ac
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
2012-04-11 16:09:06 +02:00
Martin Smith
1ec7843856 QDoc: Fix no-examples option.
This was accidentally removed in the big change regarding searching in
the internal QDoc tree.

Change-Id: I2496d7497d239f1ec5fbd01be6a918c1ef29fc95
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-11 16:08:14 +02:00
Martin Smith
b1addf36c1 qdoc: Fixed to report read-only QML properties correctly
Now the default for a QML property is writable. If qdoc
can't detect the actual read-only status, writable is
assumed. There were some cases where qdoc could not
determine the actual read-only/writable status for a
QML property. In these cases, qdoc reported read-only
because the default was read-only, which was not optimal.

Change-Id: I55aeb2bedcde92a414f4d48a8d995e5e9dbca5da
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-04-11 16:08:09 +02:00
Konstantin Ritt
3ddd768504 QChar: optimize some methods a bit for general case
by reordering and regrouping conditions so that they lead to result earlier
in most-common usecases (l.letters, spaces and puncts, u.letters, other);
there are no title cased letters in range [0..127] -> use this in isTitleCase();
test for 0xa0 (nbsp) early in isSpace() as it is quite common in HTML, etc.;
add early test to isNumber().

Change-Id: Ib415f34cb1212d9ccf8753de2d1beaece1aa2243
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-11 15:57:32 +02:00
Shane Kearns
7386ab17df Use windows API to update missing CA roots
Windows ships with a minimal set of CA roots.
When using windows API to verify a certificate, it will fetch the
root certificate from windows update (assuming it is part of the
Microsoft trust program).

As we are using openssl, this does not happen transparently.

If SSL errors occur which indicate a broken chain then attempt
to fix it using the windows API before emitting sslErrors.

If the system CA certs are not in use (a CA bundle has been set
on the socket or as the global configuration), then this is skipped.
This is so an application can continue to use its own cert bundle
rather than trusting the system certs.

Key usage is specified, so that windows will return not trusted
status if the root is not suitable for SSL (server auth or
client auth OID).

Testability:
 - to test, must delete the CA cert(s) from the "third party
   root certification authorities" section of the cert store
   using mmc.exe.
 - If the workaround of installing the windows XP cert bundle was
   performed, then you also need to delete certs from the "trusted
   root certification authorities" section.
   This is dangerous, be careful not to delete the required
   certificates which are documented on MS website
 - Naturally, modifying these areas of the cert store requires
   elevated privilege.

Task-number: QTBUG-24827
Change-Id: I5cfe71c8a10595731f6bbbbabaaefa3313496654
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-11 15:49:02 +02:00
Qt4iOS
62cda62c0c Modified project files to be iOS compatible.
Removed some MacOS source code files from iOS build. Use unix standard
paths for now (iOS-specific implementation will come later).

Change-Id: I8b2731b431b3a379a1ec4ec07d227e886209e3e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-11 15:42:14 +02:00
Robin Burchell
7e74236477 Move QVectorPath::polygonFlags to its own class.
Who can say why it was put in QPaintEngineEx's header, but it certainly doesn't
belong there.

Change-Id: Ieb3b977affcf4b240f621d13b72bdc0e8f8138b9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-11 14:33:33 +02:00
Robin Burchell
517240096b Move QRectVectorPath into the .cpp of the only file actually using it.
Change-Id: I2778b5142ee574f44a9f9489a2752265c6a6c170
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-11 14:33:18 +02:00
Hannu Lyytinen
89f6997e80 Add support for QPlatformNativeInterface.
Initial bits to enable figuring out the EGL display and context.

Change-Id: I4b578e356dceb40b4456f0590d32c8df1f51fa53
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-04-11 12:42:37 +02:00
Hannu Lyytinen
0cd818aa7a Use correct framebuffer object.
KMS plugin deals with FBO IDs not equal to zero (the default FBO),
so return the correct ID.

Change-Id: I904fc0b8d732f856b4526bd7f73cc48c358c8441
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-04-11 12:41:20 +02:00
Hannu Lyytinen
38da61fdc0 Release the EGL context after initialization.
Threaded applications like qmlscene could not bind the EGL context if
the context is already bound in the other thread.

Change-Id: Ia75ef9e76ebff48aa2c9b348101ab2f388e18c5e
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-04-11 12:41:10 +02:00
Hannu Lyytinen
c343f710f4 Use the new plugin system in the KMS plugin.
Sync up the KMS QPA plugin with the plugin system changes.

Change-Id: Ifaa8be6f11aeb93acc63643c62ca15db4e9bc38f
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-04-11 12:40:56 +02:00
Jason McDonald
3f9a7f9557 Remove Qt5 to-do comment in qtexthtmlparser.cpp.
The comment relates to a change that is neither source- nor
binary-incompatible, so the change can be done in any minor release.

Task-number: QTBUG-25117
Change-Id: Ifba3ef53241f9bf2504c573066e4cfa5fbfe679e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-11 12:35:23 +02:00
Konstantin Ritt
f97db2555e unite QString::normalized() overloads
Change-Id: I27545e599a1831728e491a9fad1e52fa255535fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-11 10:46:19 +02:00
Robin Burchell
7be255156f Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.
Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these
functions just to avoid an include, except to pay for it with worse runtime
performance.

On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15%
faster(!) than adding an additional call to qMemSet. The advantage on sizes
above that is unmeasurable.

For qMemCopy, the benefits are a little more modest: 16-7%.

Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 10:46:19 +02:00
Girish Ramakrishnan
e60ca0de60 eglfs: rework hooks design
There are two problems with the current design:
1. if (hooks) hooks->foo() doesn't work in debug mode when no platform hook
   is defined. The problem doesn't arise in release mode because the compiler
   optimizes away the if (hooks) into a no-op since hooks is NULL when no
   platform hook is defined.
2. Adding a new hook requires changing every platform's hook implementation.

New approach:
1. Define QEglFSHooks as a class with virtual functions. A stub file provides
   the default implementation.
2. Platform hooks derive from above class and reimplement whatever is needed.

The filenames and variables have been changed to be more in line with the
Qt style.

Change-Id: I2eaaa5ad7c8b48a06361c4747d4f210c428c983f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-11 09:24:58 +02:00
Donald Carr
42f3bf772b Extend eglhooks to include hasCapability
Add BufferQueueingOpenGL to Raspberry PI's numerous capabilities

Change-Id: I1197c28a0c82df3ae2f6d5360791010e17373555
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-11 09:22:23 +02:00
Olivier Goffart
5dc506ad84 Mark QObject::disconnect overload const
Consistency with the non-static connect overload

Task-number: QTBUG-23622
Task-number: QTBUG-1772
Change-Id: Ic09df9cca1feaabb6b5cf335f04a0d6d4bbf011f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-11 08:46:48 +02:00
João Abecasis
6abfc992b9 Make reallocData() take (unsigned) size, including null
The parameter represents an allocation size and unsigned matches the
Q*Data::alloc member it ultimately represents (even if they currently
differ in accounting for the null).

There's still work up for grabs to ensure we avoid integer overflows
when growing.

Change-Id: Ib092fec37ec2ceed37bebfdc52e2de27b336328f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-11 02:26:41 +02:00
Christoph Schleifenbaum
127c431e25 Add Mac OS X backend for QDesktopServices.
Change-Id: Ie48844ed93385c8aef9ae0765b7a3d26583ed642
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-11 01:42:12 +02:00
Thorbjørn Lund Martsum
e8b098b636 QHeaderView - remove some (nearly) unused span functions
This removes a couple of functions. Two of them are unused and the
last one has its (now) very simple implementation inlined in the
only caller. The last function was called something with spans and
we would like to get away from using the word 'span' since we no
longer uses spans.

Change-Id: Icef95166289d52bd958400cba70daceb6fa75913
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-11 01:42:12 +02:00
Thorbjørn Lund Martsum
699f2424eb QHeaderView - rename many spans classes and variables
In (SHA) b800d8b94a the span model
was replaced with a plain section model. The code however still has
variables and classes called someting with spans which would be
confusing for possible new readers of the code.

This patch cleans up most of it. It only renames classes,functions
and variables (and not any semantics or the public API).

Change-Id: I6ceb068c7317223f0d8e37f8032197f518d0174c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-11 01:42:12 +02:00
Aron Rosenberg
90520cd834 Automatically query for Mac Proxy Server credentials
Add support for automatically searching the Mac System Preferences
for proxy server username/password. If a user has put credentials
in the SystemPreferences->Network->Interface->Proxies area, we
will now look in the KeyChain for those files. This will
automatically pop up a Permissions dialog from the OS if valid
credentials were found which match the server we are trying to
access.

Task-Number: QTBUG-22033

Change-Id: Ic7952afab4d16a65a87bb2f97a928c1c91167fe7
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 01:42:12 +02:00
Aron Rosenberg
c524bbbb8a Add Proxy Auto Config support (PAC) on Mac
Adds support for fetching and parsing Proxy Auto Config files if one
is specified in the Mac System Preferences

Task-Number: QTBUG-2069
Task-Number: QTIFW-28
Change-Id: I91feb999222187e7467f2c41383904cf0cff8633
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-11 01:42:12 +02:00
Eskil Abrahamsen Blomfeldt
97f9c6f8cd Minor clean up in QTextOption API
Source compatible, but binary incompatible, change to QTextOption
API to make it consistent with Qt's coding style.

Change-Id: I368f13925339fa41025a570f684f4b944844a022
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-11 01:42:12 +02:00
José Millán Soto
784076fccb Made qt_accStripAmp handle "&&"
Changed qt_accStripAmp implementation to handle texts which contains
pairs of ampersands representing a single ampersand.

In order to do that, a new static function called qt_accAmpIndex was
created.
This function is based on the code of qt_accHotKey, which was changed
to use qt_accAmpIndex.

Change-Id: Idcc5d07581d7fb3251c30399b189740ca8071104
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit f864f8f79b88bbc3cc9007d2a92b08ca4b5cb871)
2012-04-11 01:42:12 +02:00
Konstantin Ritt
3b778df102 minor improvement for NormalizationCorrections
let's don't hardcode the latests affected version value and simply use
the one parsed from NormalizationCorrections.txt

Change-Id: I37021e8238d77deada4c5ba7a2d160c87186b9dd
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 01:42:12 +02:00
Konstantin Ritt
8e74b5cfe4 fix digitValue() returned 0 instead of -1 for invalid ucs4 characters
Task-number: QTBUG-20318

Change-Id: I96c4c2b042bad478b7c704669e7ea0d574d3b22f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-11 01:42:12 +02:00
Samuli Piippo
bf3c3862b4 Fix crash with evaluation license
With QWS, an infinite loop is formed at application startup
when commercial evaluation license is used and QT_EVAL is defined.

Change-Id: If9712428932b51f5c8eee9ef2d0d444da06a25d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-11 01:42:12 +02:00
Thiago Macieira
d4f3052a1b Adjust a double leading slash in the path for FTP to /%2F
Some FTP implementations (currently not including QNAM) strip the first
slash off the path in an FTP URL so that the path in the URL is relative
to the login path (the user's home directory). To reach the root
directory, another slash is necessary, hence the double slash.

In anticipation of future URL normalisation, which Qt 4 could do, "//"
could be rendered to "/", so this extra slash should be "%2F".

This operation is done only in QUrl::fromUserInput.

Change-Id: If9619ef6b546a3f4026cb26b74a7a5a865123609
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-10 22:54:37 +02:00
Thiago Macieira
81d1f79a7f Add early-clobbers to the output variables in CPUID
Without those early-clobbers, the compiler might decide to schedule a
register that is also used as output. The existing early clobber in
the tmp variable was there so the compiler wouldn't use a register
scheduled as input (especially EAX).

To be honest, I'm not convinced that the compiler should be allowed to
do this. That means that two output variables are scheduled to the
same register... still, this fixes a problem found with GCC 4.2 (at
least the Mac one).

Change-Id: I6cd4676284e9a83d6aac4b439c6e58e347c40106
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-10 22:54:20 +02:00
Samuel Rødal
592bb3ca5e Removed Qt 5 todo comments from qgl.h / qgl_p.h.
No point in changing QGLContext API when QOpenGLContext is meant to
obsolete it.

Task-number: QTBUG-25074
Change-Id: Ie21692c8c402ed9cd6af56bef0175c4e46c3d8a9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-10 22:48:00 +02:00
Samuel Rødal
89387415b1 Removed Qt5 todo comment in qpaintengineex_p.h
This won't get done for Qt 5, and QtOpenGL still implements this API.

Task-number: QTBUG-25069
Change-Id: Ia8437d2a4a5a0e750afdf67764c53d75ee8065f6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-10 22:47:51 +02:00
Jason McDonald
880cbf6027 Bump some Qt 5 to-do's to Qt 6.
Source-incompatible changes are no longer desirable for Qt 5, so these
items must wait until at least Qt 6.

Task-number: QTBUG-23524
Change-Id: I0b9ae5f6f3a792e0169a4b0d3aefbdcb744acd2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-10 22:47:37 +02:00
Jan-Arve Saether
766498083a Add missing virtual destructor.
Change-Id: I94ac82ad4771b2b4c36ac24cc412fa43a0d77afb
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-04-10 19:52:57 +02:00
Mark Brand
d1502057d8 fix mingw detection
Change-Id: I7eb78ebd79bfc1be36cc43a1f41f4e574b063aed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-10 19:52:50 +02:00
Oswald Buddenhagen
143c4d3e13 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/widgets/styles/qwindowsxpstyle.cpp
	tests/auto/gui/kernel/qwindow/qwindow.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
2012-04-10 15:31:45 +02:00
Konstantin Ritt
933a1d2274 remove CODEC_FOR_C_STRINGS leftovers
Change-Id: Iaafb945882e3f6ad6d39f7eefb62b83ff50a9ba8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-10 15:03:16 +02:00
Olivier Goffart
2dca19b44e Document QEvent::ThreadChange
That event is mentioned in the documentation of QObject::moveToThread,
but not in the documentation of QEvent::Type

Task-number: QTBUG-16787

Change-Id: Iab769307d3de54881a82e59bed63b3831a3ffb29
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-04-10 15:03:16 +02:00
Jason McDonald
a869234593 Remove Qt5 to-do comments in qtextformat.cpp.
These won't be done for Qt 5.0 and to-do tasks really belong in a
bug-tracker not in the code.

Task-number: QTBUG-25072
Change-Id: Ife4ff148167e0f0c66a58233548f4011b0b10784
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-10 15:03:16 +02:00
Miikka Heikkinen
ef4783d297 Make it possible to enable non-scalable font scaling
Windows native font engine supports scaling of non-scalalble fonts, so
make it possible to do so.
Added two functions to QPlatformFontDatabase: fontsAlwaysScalable() and
standardSizes(), and made fontsAlwaysScalable() to return true for
Windows native font database.

Windows Freetype font engine doesn't seem to support scaling of
non-scalable fonts, so didn't enable it in there.

Added implementation of standardSizes() for Mac OS.

Task-number: QTBUG-24970
Change-Id: I41c9356ede8a37b7c61db94340dbeb5b629f34b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-10 12:49:34 +02:00
Pierre Rossi
a159ca80d7 Don't hardcode the default families in qfont_qpa.cpp
Since different platforms come with different fonts, we should
probably leave it up to the platform to decide which family to use.

Change-Id: I18bb81c0ce87cc7e9ac7f3abaeae1b41c0ce8410
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-04-10 12:49:34 +02:00
Andrew den Exter
5a02c2115c Fix crash with invalid pre-edit position.
Ensure the script item position is within the bounds of the text block
when adjusted to compensate for pre-edit text.

Change-Id: I2c745bf08afc0d9bc3aba27c24c2a123af017dc6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-04-10 10:38:10 +02:00
Girish Ramakrishnan
efdadbb3d6 Remove unused signal QWindow::backBufferReady
backBufferReady is not used anywhere

Change-Id: Ic5c8f6a89e031b3bd757b03f60737d55be969ee5
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-10 10:38:10 +02:00
Rafael Roquetto
00f3299e8b Blackberry OS implementation of QStandardPaths
Change-Id: I31427b896ca691de7071da17af4863d16348df7b
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-10 10:38:10 +02:00
Andy Nichols
2756101d0e Fixed build issue when using GLEW with MSVC
MSVC does not support the #warning precompiler command and
is considered an error when used. This change checks for
GCC before issuing the warning.

Change-Id: Iee1e27841fe77b0289e88b7b4ccaa176ab56a39d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-10 10:38:10 +02:00
Girish Ramakrishnan
673ce6c84e eglfs: Implement xlib based hook for testing
Add a hook implementation for X11 using xlib. This is primarily for testing.
xcb is not used since the x11/egl-mesa integration appears to be done through
xlib.

Currently, there is no input mechanism. The size can be adjusted using
EGLFS_X11_SIZE environment variable.

Change-Id: Ifcfbfd958d9d110d94e22f04dfad1f6c29818103
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-10 10:38:10 +02:00
Donald Carr
2ee8b98cae Remove QWS era pvr headers
The QWS powervr plugin ceased to exist with the move to QPA; these headers
are therefore entirely redundant

Change-Id: I28c7baae15df5bb9d7ea3763e3a018e9e1ae1fc6
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-10 10:38:10 +02:00
Girish Ramakrishnan
c75ef6e223 Fix header inclusion guards
The inclusion guards refer to the old graphics system code

Change-Id: Ifa72e3030c83797e471735a9a696bf12c0f75b08
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-04-10 08:26:10 +02:00
Girish Ramakrishnan
300ce31d70 Fix constness of QPlatformCursorImage::hostpot()
QPlatformCursorImage::hotspot() should be const.

Change-Id: I2b517098e75b013947386a5a620a15dc48e76cec
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-04-10 08:25:51 +02:00
Marc Mutz
39b4578156 QTypeInfo: document Q_PRIMITIVE_TYPE existing practice
Despite the documentation requiring Q_PRIMITIVE_TYPEs to
be PODs, existing practice in Qt (QFixed, QFlags, QUuid)
is to allow constructors on primitive types as long as
every bit pattern represents a valid object (ie. memory
doesn't have to be initialised to hold an object of the
type) and memcpy() can be used to create an independent
copy of the object (memcpy()ing QString, e.g., while
creating two valid objects, doesn't create independent
copies).

Change-Id: Ia85d48b89f6cc84e69ea76719eab9a858d247ad6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-04-09 12:54:49 +02:00
Marcel Krems
a7ed81b557 Removed QApplication overloads used solely for documentation.
Also removed a define which was used only for this purpose.

This change brings the constructors in line with Q{Core,Gui}Application.

Change-Id: I1134ca5611453e8445c1a4f3226846621fa8872c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-04-09 12:54:29 +02:00
Giuseppe D'Angelo
4893a5422e New qHash algorithm for uchar/ushort arrays (QString, QByteArray, etc.)
Port of Robin's work from I0a53aa4581e25b351b9cb5033415b5163d05fe71
on top of the new qHash patches (the original commit just introduced
lots of conflicts, so I redid it from scratch).

This is based on the work done in the QHash benchmark over the past
few months experimenting with the performance of the string hashing
algorithm used by Java.

The Java algorithm, in turn, appears to have been based off a
variant of djb's work at http://cr.yp.to/cdb/cdb.txt.

This commit provides a performance boost of ~12-33% on the
QHash benchmark.

Unfortunately, the rcc test depends on QHash ordering.
Randomizing QHash or changing qHash will cause the test to fail
(see QTBUG-25078), so for now the testdata is changed as well.

Done-with: Robin Burchell
Change-Id: Ie05d8e21588d1b2d4bd555ef254e1eb101864b75
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-09 10:16:09 +02:00
Giuseppe D'Angelo
ddb70bee2f Stop relying on qHash always giving the same results
The implementation of the various qHash overloads offered by
Qt can change at any time for any reason
(speed, quality, security, ...).

Therefore, relying on the fact that qHash will always give
an identical result across Qt versions (... across different
processes, etc.), given identical input, is wrong.
Note that this also implies that one cannot rely on QHash
having a stable ordering (even without the random qHash seed).

For such use cases, one must use f.i. a private hash function
that will never change outside his own control.

This patch adds a private hash function for QStrings,
which is identical to the Qt(4) qHash(QString) implementation.
A couple of spots in Qt where the results of a qHash call were
actually saved on disk are ported to use the new function,
and a bit of documentation is added to QHash docs.

Change-Id: Ia3731ea26ac68649b535b95e9f36fbec3df693c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-08 21:44:26 +02:00
Giuseppe D'Angelo
ea17c21fd8 QHostAddress: improve qHash implementation
Avoid the conversion to a temporary QString -- just hash the address
as a byte array.

Change-Id: Ic35cdbbc3ee66c32a28d911bd27de0092395979f
Done-with: Shane Kearns
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-08 18:25:10 +02:00
Giuseppe D'Angelo
9166163f10 QUrl: added two-arguments qHash support
An unnecessary #include <QHash> was also removed, and other
includes refactored.

Change-Id: Ifcd3e37d75029c142a2e55ab492b88624505670a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-08 18:25:04 +02:00
Giuseppe D'Angelo
c3b9a67cf0 More qHash(T, uint) overloads for Qt types
The more we get in 5.0, the better.

Change-Id: If00084477709db4fc3f6b2e15024d046491be2ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-07 22:20:19 +02:00
Giuseppe D'Angelo
e6e4456de0 QFileSystemModel: fix sorting
When sorting a model recursively, the children of a QFileSystemNode
are extracted from their parent in a QHash order; then filtered,
then sorted (using a stable sort) depending on the sorting column.

This means that the order of the children comparing to equal for
the chosen sort are shown in the order they were picked from the
iteration on the QHash, which isn't reliable at all.

Moreover, the criteria used in QFileSystemModelSorter for sorting
are too loose: when sorting by any column but the name, if the result
is "equality", then the file names should be used to determine
the sort order.

This patch removes the stable sort in favour of a full sort,
and fixes the criteria of soring inside QFileSystemModelSorter.

Change-Id: Idd9aece22f2ebbe77ec40d372b43cde4c200ff38
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-07 19:45:39 +02:00
Thiago Macieira
7ae76153cb Remove -DQT_NO_STL from the bootstrapped builds
Change-Id: I37ea06426b66e617a49ec46952abdaad8814eadf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-07 05:19:56 +02:00
Thiago Macieira
9dde45722b Remove references to QT_NO_STL from QtConcurrent
Same as with QtCore, remove the #ifdef and #ifndef and select the side
with STL.

Change-Id: If1440080328c7c51afe35f5944a19dafc4761ee5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-07 05:19:50 +02:00
Thiago Macieira
6f51fee995 Remove references to QT_NO_STL from QtCore
QT_NO_STL is now no longer defined, so remove the conditionals and
select the STL side.

Change-Id: Ieedd248ae16e5a128b4ac287f850b3ebc8fb6181
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-04-07 05:19:42 +02:00
Giuseppe D'Angelo
1241a02a01 qHash: always use the seed in the catch-all template
This pertubates the results of the calls to the one-argument
version of qHash through the catch-all template.

Change-Id: I7037b25d545e6f1360384a83ff895f4bb62ed195
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-06 22:51:24 +02:00
Marcel Krems
4bdb7a0780 Fix compilation with MinGW.
Change-Id: I494c84e8e6889a7d7bb3b29669337483732d02c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-05 23:54:37 +02:00
Giuseppe D'Angelo
538386f36f QLatin1String: add qHash overload
It was never introduced in Qt 4, probably because of the implicit
conversion to QString (that is, adding the qHash overload for
QLatin1String in Qt 4 would have been a BIC).

Change-Id: I2ebc8e73a85be497866820e0ca416dd11167bb53
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-04-05 20:48:53 +02:00
Debao Zhang
bdfff4d825 Fix compilation with MinGW-W64.
These types and values and been defined propsys.h from MinGW-W64
Version2 on.

Change-Id: If74b7cf07a0fce414009c86519494a782508d8fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-05 20:45:02 +02:00
Friedemann Kleint
fddbe8beec Windows: Send empty region in expose event from setVisible(false).
Fixing a crash in tst_qwidget.cpp, trying to redraw on destroying
the platform window.

Change-Id: I6b6e9a063a1c72dff8110c379f8392605aadbdd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-05 17:48:15 +02:00
Shane Kearns
e5337ad1b1 Find libssl on linux using paths of loaded libraries
The installed path of libssl may include an element describing the
architecture, e.g. x86_64-linux-gnu or i386-linux-gnu.
In most cases, the libraries already loaded (static dependencies of
Qt, such as libc) will include the path where libssl is installed.

Use dl_iterate_phdr to find the paths. This is a linux specific
function, but it does provide "/lib/<arch>" and "/usr/lib/<arch>"
at the point ssl symbols are being resolved when running the
qsslsocket autotest (which has less dependencies than a typical
Qt app).

Task-number: QTBUG-24694
Change-Id: I9af8081f41bb85c2fcff450a2acda5672a7f7518
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2012-04-05 15:37:53 +02:00
João Abecasis
2d89850b23 Enable variadic macros for MSVC >= 2005
Change-Id: I8793ea0f6e3a640276b073321d29373b2ed18d63
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-05 15:23:30 +02:00
Friedemann Kleint
76ae64abb5 Windows: Use native font engine by default.
Turn around the meaning of the command line parameter.
The FreeType engine can now be activated by passing freetype.

Change-Id: I9da6cd4a127603f9cfb91f0ce8450088c0883faa
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-05 12:46:31 +02:00
Pekka Vuorela
95c71cef20 Include with qt module to avoid configure warning
Change-Id: I8d338f22c4b0dabcca33878b33c6a203828d84c5
Reviewed-by: David Faure <faure@kde.org>
2012-04-05 10:18:41 +02:00