Commit Graph

7602 Commits

Author SHA1 Message Date
Jonathan Liu
9ab445d264 QWizard/Win: Handle hit testing correctly for Vista style
Clicking the area just below the close button when Aero is enabled
reveals duplicate caption buttons. DwmDefWindowProc returns hit results
for DWM caption buttons but DefWindowProc may also return hit results
for non-DWM caption buttons.

To resolve this issue, if DefWindowProc returns a window button hit
result then we just use HTCLIENT (the client area) as the hit result
instead.

Change-Id: Ia741ce4f9aa944109d8de54c2f84009f5ea1883f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-12 11:00:38 +02:00
Friedemann Kleint
378e65c07a Windows/ICU: Compile fix.
Change-Id: I95c281b0e577a89e4d92dd16fd039ab9e53036f5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-12 07:11:39 +02:00
Yoann Lopes
68c90dd9b3 Make distance field image width variable.
The distance field generator was always returning a 64x64 pixels image.
It now returns an image with a variable width (width of the represented
glyph) and always a height of 64px.

Change-Id: Id5f11a50a8031ebca10cd4803adf179ccde6db26
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-06-12 07:09:54 +02:00
Thiago Macieira
290655c8a2 Fix compilation of tests/auto/corelib/tools with QT_STRICT_ITERATORS
Most fixes are simple and quite obvious. The ones more involved are
the ones to QArrayData, which had probably not been compiled with
strict iterators thus far.

Change-Id: Ic4ff84c34fd9a04fd686fecaa98149b1c47c9346
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-12 04:30:20 +02:00
Stephen Kelly
c5665a182d Only quit if there are no visible widgets or windows.
We need to let the QGuiApplication determine whether quitting is appropriate
based on whether there are visible top level QWindows after the last top-level
QWidget was closed.

This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880

The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test
in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit.

Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-12 04:30:18 +02:00
Kent Hansen
c66dc44968 Change internal QDeclarativeData hooks to use signal index range
This also changes the qtdeclarative-specific QMetaObject::activate()
overload to not take a methodOffset argument, since it's no longer
needed.

Change-Id: I4f7ece9f43339f3327419598c032e48fb37b97f0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2012-06-12 04:30:16 +02:00
Lars Knoll
69478da0f0 Don't use the gcc extension for QStringLiteral & Q_ARRAY_LITERAL
The extension doesn't work outside of function scopes, so a
function declaration such as
void foo(const QString &str = QStringLiteral("bar"));
would fail on certain gcc versions.

Change-Id: I2971301f2859edd3fc81b95dfa5a7c15f29e395c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-12 04:30:13 +02:00
Johannes Zellner
1c86619037 raspberry pi: Dont use the video layer for EGLFS
The OpenmaxIL video_render component uses the dispmanx layer 0, so EGLFS
should use at least z index 1. Otherwise the video_render would conflict
with the UI and thus overpaints it.

Change-Id: I3bed23567fa8c4399207289c6ef952c5a5e0d503
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
2012-06-12 04:30:12 +02:00
Girish Ramakrishnan
4fd095d242 raspberry pi: add /opt/vc/include/interface/vcos/pthreads to includes
See https://github.com/raspberrypi/firmware/pull/32 for more information.

Change-Id: I51bb532336ed069cde938540cd962721b1a72adb
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-12 04:30:09 +02:00
Stephen Kelly
f9caf48bee Use a QVector<int> instead of a QSet<int> in itemviews/models.
The QSet<int> is a more expensive container to use and create, so
it should be avoided.

This is source incompatible compared to earlier Qt 5 for
QAbstractItemView subclasses which reimplement dataChanged, but this
patch changes nothing compared to already-present SiC compared
to Qt 4.

Change-Id: Id95391dfd62a0a7f487a8765790b007badefb937
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-12 04:30:07 +02:00
Jędrzej Nowacki
3df316e961 Avoid a type name normalization during auto-registration.
Containers are auto-registered and use normalized names.

Change-Id: Id65c3940401f69436929220e1f6a971135e147ed
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-12 04:30:05 +02:00
jian liang
778e2b3bf5 Implement WindowTransparentForInput flag in Windows platform.
set WS_EX_LAYERED | WS_EX_TRANSPARENT style if the window has
WindowTransparentForInput flag.

Change-Id: I6b0dcf35abb5fc63c800439e9b81ace1070dcad4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-12 04:30:02 +02:00
Rafael Roquetto
b87c5cff24 Support other platform names on configure.exe
Added three new methods, which are meant to be used internally to
configureapp.cpp:
    - int platform(): returns an integer representing a platform
    - QString platformName(): returns the platform name string to be used when
      displaying the license agreement.
    - QString qpaPlatformName(): returns the value to be defined as
      QT_QPA_DEFAULT_PLATFORM_NAME.

Currently supported names are Windows, Windows CE, QNX and Blackberry. Default
is "Windows".

Change-Id: Ifa4d1b9c02cda956be9becdf8db195d3d494f1d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:30:00 +02:00
Rafael Roquetto
8839109abe Fix arch detection when cross compiling on Windows
When trying to detect the target architecture, configure.exe will look for a
file called 'arch.exe'. However, in some situations such as when
cross-compiling on a Windows host to a Unix host, and depending on the
toolchain being used, the output file generated by config.tests/arch may
simply be called "arch" instead of "arch.exe", causing configure.exe to fail.
This patches configure.exe to handle both naming schemes.

Change-Id: I5798f716d732388c707564d4d45c4887ab3d3d9f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:58 +02:00
Bradley T. Hughes
0fb84aa7a9 Cocoa: do not terminate applications prematurely
Re-enable application termination as it was in Qt 4.
QApplication::exec() must return to main() so that the destructors in
main() are run.

The QApplicationPrivate::canQuit() function from Qt 4's
qapplication_mac.mm is gone, so bring back this function in
QCocoaApplicationDelegate instead.

Change-Id: I1c21894d59061687c36ab49bcb2e4e3ae0752fa4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-06-12 04:29:56 +02:00
Morten Johan Sorvig
3abf49cdc8 Cocoa: Compile when configured with -no-widgets
Build printing only if Qt is configured with
widget support.

This is mostly useful for testing -no-widgets builds.

Change-Id: I2d47b420e311869e85508db1f7372fe326617dec
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-12 04:29:53 +02:00
Laszlo Agocs
f100f84703 Clarify QTouchEvent docs
Mention something about touch handling with QWindow and document the
non-partialness of touch events which has been taken for granted since
4.6, but has not been documented at all.

Change-Id: I9ec75f74153bbc28e146b000d70fb26384e497a3
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-12 04:29:51 +02:00
Girish Ramakrishnan
e9df01d3db eglfs refactor: move window creation into qeglfswindow
This potentially allows the creation of multiple QWindows. The platform
context is now in a seperate file and the integration provides a new
instance of the context allowing creation of multiple contexts.

Change-Id: If2b6fa29b573d87c0a4cd0a8eff1f044bd1ff9b8
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-12 04:29:49 +02:00
Thiago Macieira
040f30decd Enable compilation of improved x86 code generation with MSVC
Now that we know the compiler flags for asking MSVC to produce SSE2 code
properly as well as AVX code (technically, just VEX-prefixed SSE2), we
may as well use it.

The SSE2 code generation is enabled by this commit. The AVX one
requires a change to configure to detect the support in the compiler.

Change-Id: Ib6970daaedf450500ee73600e6bf9722eddb9a0c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:47 +02:00
Thiago Macieira
f5a7d88378 Move the AVX and SSE tests to config.tests/common
This is the first step in supporting these checks on Windows.

Change-Id: I77cfd46bd733161ad2e52c2f76a6354b95ff737d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:44 +02:00
Thiago Macieira
6a51062e99 Move the SSE2/AVX/Neon/etc. flags into the compiler mkspecs
This allows us to have different flags for the compilers for
supporting the same feature. For example, the official flag in GCC to
support AVX2 is -mavx2, but ICC does not support it (yet), requiring
-march=core-avx2 or -xCORE-AVX2. That flag, instead, enables support
for all the features that the "Core-AVX2" processor (codename Haswell)
will support. And clearly, the MSVC flags are different.

Change-Id: I33b6d8617520925e807747180a8dbaafd79b7a9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:42 +02:00
Casper van Donderen
0d45699602 QDoc: Also allow dependant modules to be specified on CLI.
Change-Id: I25dfbadc788616a864ecbf322434a3ce45bb94e5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-06-12 04:29:34 +02:00
Martin Smith
14b0722166 qdoc: Better error messages for QML command errors
Some error messages were not clear for these qdoc commands: \qmlclass,
\qmlmodule, \inqmlmodule, and \qmlproperty. They have been made clearer
now.

Also, qdoc now parses input files in the same order all the time now.
The order is alphabetic now. This might not be the optimal order.

Change-Id: Id53a5ec8105009c71f4bbd41973a54aed7821099
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-06-12 04:29:31 +02:00
Thiago Macieira
9e1a9878aa Add a unit test to QSharedPointer being deleted by a C++11 lambda
This already worked, but let's have a test so we can be sure it doesn't
regress.

Change-Id: I358b436d216e3ec4310f05ccf4f70f9e7aad3281
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-12 04:29:29 +02:00
Sean Harmer
4e3b225bb0 Correctly detect blackberry mkspecs as cross-compiling for QNX
Change-Id: Ibcede225a0d6e421c086dba3cca5b0fcbeeafa68
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-11 12:05:19 +02:00
James Turner
c23e8f932b Fix Mac menu-merging case-sensitivity.
Use case-insensitive string comparisons to deal with any combination of case in the target or menu text correctly. Fixes issues reported by BHughes in TextEdit and Creator.

Change-Id: Ic3b577bf9034659b2de4aa206757b3a5a303a7b8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-06-11 11:41:08 +02:00
Girish Ramakrishnan
2d598e472a configure: remove unused PLATFORMS variable
PLATFORMS is unused. Also remove the loop that printed all the
PLATFORMS when the mkspec couldn't be autodetected. Even if the
PLATFORMS variable was moved up, it wouldn't work anyway since
it detects files and not directories.

Change-Id: Id483c431a179fb01fcf680538e28c81763bc0b90
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-11 11:30:23 +02:00
Christoph Schleifenbaum
2a8c423577 Deprecate QMainWindow::unifiedTitleAndToolBarOnMac
Update documentation. Implementation is left for
now.

There is currently no replacement; once we have
that in place we'll update the docs agin to point
to it.

Change-Id: I8b4532702938398dc5b4eef5da2b3f9dfb68382f
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-11 11:22:07 +02:00
Morten Johan Sorvig
ee895bdbb1 Remove QtWidgets include.
Change-Id: I39ff73ce0dbfe36634b5331538165e636f62e57c
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-11 11:21:49 +02:00
Morten Johan Sorvig
4e2199617c Cocoa: Remove QtWidgets dependencies.
Make the file/color dialog helpers use QCoreApplication::
translate("QDialogButtonBox", text) instead of
QDialogButtonBox::tr(text)

Change-Id: I7ee4c32f8f8b9cd002836e24b962ef1c0f2e0737
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-11 11:21:37 +02:00
Jeremy Katz
69f0782c09 update QStandardPaths::standardLocations() documentation
Remove the reference to PATH, as it may confuse developers who expect
a separator between locations. The ordering has been made explicit,
including the position of writableLocation() if it can be determined.
Note that some implementations may allow the empty string.

Change-Id: I134db44dd8bea437824a1d0bf8ed373ec655ab04
Reviewed-by: David Faure <faure@kde.org>
2012-06-11 00:37:12 +02:00
Debao Zhang
7616f31052 Make qmetaobject autotest independent of QtWidgets
Change-Id: I4340036a4e6024d9b8d0c7832ad7bfb28ec4bc99
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-06-11 00:37:01 +02:00
Lars Knoll
b2c1550564 Use QCollator in QString and remove it from qlocale_icu
Change-Id: Ic94439943999382f8050668edfb67d3b75ac1df4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-10 19:09:04 +02:00
Lars Knoll
1e9be1327b Add proper collation support to Qt
QString::localeAwareCompare() has always been a broken
way to support collation. The current implementation is
not even thread safe.

This adds a proper collation class that fixes the problems
and finally allows Qt to sort properly according to locale
rules.

The class is private for now, but is intendent to be made
public with 5.1

Change-Id: Idb4e75ff68a398c9813af622af884a90898d2be9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-10 19:08:56 +02:00
Lars Knoll
97e177e58d Refactor the ICU code for QLocale
Clean up the ICU code and make it thread-safe. Add a
QIcuData structure to QLocalePrivate, that contains
ICU specific data.

Link against ICU directly, greatly simplifying the
code.

Also fix a bug in the locale specific case conversion
code that would cause it to fail and fall back to the
QString code if the output string was larger than the
input.

Change-Id: Ie67e5ea14fa204ebc5887d7aaeb1a4f3ecaf8697
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-10 19:08:49 +02:00
Konstantin Ritt
c631927b76 Regenerate the Unicode tables with UCD 6.1.0
Task-number: QTBUG-1963
Task-number: QTBUG-5472
Task-number: QTBUG-12144
Task-number: QTBUG-18360
Task-number: QTBUG-23654

Change-Id: Ida09ad657c4b012eca654fcb79608b7cdeb5d60d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:58:17 +02:00
Konstantin Ritt
12e0319213 Line Breaking Algorithm: handle the Object Replacement Character
See http://www.unicode.org/reports/tr14/#CB
and http://www.unicode.org/reports/tr14/#LB20 for details

Change-Id: Ice0aa2b2ce81f6e39839a353240420436eddd754
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:58:13 +02:00
Konstantin Ritt
c8dd0de1a6 Line Breaking Algorithm: don't break inside numeric expressions
Change-Id: I8362663454e4c6604ecb6289ae8009d47c78aeb1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:58:09 +02:00
Konstantin Ritt
48d99e74fc Update the Unicode Text Breaking Algorithm implementation tests
* The Line Breaking Algorithm implementation conformance tests has been added;
* The Grapheme, Word, and Sentence Breaking Algorithm implementation
  conformance tests has been updated.

Change-Id: Ia1a6eef6272d580964cb23788ddf30dfd5f4a5a3
Note: the Line Break test data contains some extended cases we don't currently support;
      just skip them for now.
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:58:06 +02:00
Konstantin Ritt
d64cb5f707 Update the Unicode Text Breaking Algorithm implementation
to make it conformant to the Unicode 6.1 specifications #14 and #29.

The most important changes are:
* The implementation has been reworked from scratch to fix all known bugs;
* Separate-out the grapheme and the line breaking implementation to eliminate
  an overhead due to calculating unnecessary breaks;
* Stop using deprecated SG class in favor of resolving pairs of surrogates;
* A proper support for SMP code points;
* Support for extended grapheme clusters (a drop-in replacement for the legacy
  grapheme clusters as of Unicode 5.1);
* The hardcoded tailoring of UBA has been eliminated which breaks the 7 years-old
  lineBreaking test. Some later, we'll investigate if such a tailoring is still needed.

Change-Id: I9f5867b3cec753b4fc120bc5a7e20f9a73d89370
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:58:02 +02:00
Konstantin Ritt
f32a7f1e21 Update the Unicode related autotests
Update NormalizationTest.txt data file with one from UCD 6.1;
Add few more QChar::unicodeVersion() testcases;
Add some line break class mapping testcases;
Add some exceptional case mapping testcases;
Add script class mapping test;

Change-Id: I164394984abb2b893c8db62fb77e7bd87aa0850b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:57:57 +02:00
Konstantin Ritt
c9100bcce7 Update the Unicode data files up to v6.1.0
Change-Id: I20b94634b1f4ebff10757c2348cfdbbd906e8797
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:57:54 +02:00
Konstantin Ritt
60e1892d83 Update the qunicodetables generator to deal with UCD 6.1 files
Change-Id: If22018ff83cfc6b9c984f689648da038fce11d84
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-10 15:57:49 +02:00
Thiago Macieira
2176a4f04f Reorganise the painting.pri file after the last round of cleanups
Change-Id: I35f5356fc59d109074d39c4fafd608540743479a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-06-10 15:56:46 +02:00
Kai Koehne
0f73d7bb35 Logging: Remove outdated QMessageHandler
Commit d9a1c2dff replaced QMessageHandler with QtMessageHandler. However,
the old signature was still supported for a grace period.

Change-Id: I3141499efdc749460b77de1ceec82f312e904bec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-10 15:55:49 +02:00
Kent Hansen
5e79415218 Make qpointer autotest build without widgets
Change-Id: Ibd05a49174e7055faa89c48659130a11418b9616
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-10 13:43:18 +02:00
Johannes Zellner
16548ce85e evdevmouse: send correct event position for wheel events
The current position for mouse events is synchronized in the mousemanager,
thus the wheel event needs to pick the event position from there.

Change-Id: I1e73a0154b596885c7092f0a74e6dd448deb428c
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-06-10 09:39:36 +02:00
Thiago Macieira
612fae1ae6 Add support for the x86intrin.h header on GCC systems.
This header can be included at any time on x86 systems and is present
since the GCC versiosn that also support AVX.  It contains intrinsics
for instructions that have been present in x86 CPUs since the dawn of
time.

Change-Id: I9adb066c2c0b56ce8fd5ed7366716038f1254502
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-09 10:45:01 +02:00
Thiago Macieira
fbabbe63c5 Use UTF-8 in the QtTest data and benchmark tags
Future-proofing. Since Qt source code is now mandated to be in UTF-8,
it is entirely possible that someone will use non-ASCII in data tags.

Though it would be interesting to see how to access them from the
Windows command-line.

Change-Id: I880fc312432b62143888ff1e1d9abbd54f704601
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-09 10:45:01 +02:00
Thiago Macieira
693468a54d Replace deprecated QGraphicsScene::itemAt() with items()
Change-Id: I33ee03db775d3cf6807372e0963748cf6a4e07db
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-09 10:45:01 +02:00