Commit Graph

4761 Commits

Author SHA1 Message Date
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