Commit Graph

7576 Commits

Author SHA1 Message Date
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
Miikka Heikkinen
5e6b167fea Windows: Fix window positioning for ActiveQt servers
The toplevel window for an embedded ActiveQt server does not have
a parent QWindow, but it does have a parent HWND, so is not a real
toplevel. Enable using a QWindow property to inform windows platfrom
plugin that a window is embedded and handle geometry accordingly.

Task-number: QTBUG-25808
Change-Id: Ie26c53b587c312b1df397b25cb944019c020b8de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-09 10:45:01 +02:00
Jonathan Liu
dfe5987161 QWizard/Win: Drag window on Vista with only left mouse button
The QWizard window should only be draggable using the left mouse button
on Vista.

Change-Id: Ie6ec118cbb48440c5dc6b84c4361119b1bbbd0cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-09 10:45:01 +02:00
Friedemann Kleint
1fb176eaf4 QWidget::destroy(): Release mouse and keyboard grab.
This used to happen in the platform widget code.

Task-number: QTBUG-26079

Change-Id: Id6de7473c2fa4381a39114d5122e06e3bde159fa
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-09 10:45:01 +02:00
Friedemann Kleint
e454000abc Fix assert in painting demos when switching to OpenGL.
Fix creation order. The ArthurFrame receives a paint
event with OpenGL set to true when the glw-member is still 0.

Task-number: QTBUG-26084
Change-Id: Ib4b568d22ae925542e3a775403e4c983ea0b4de5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-09 10:45:01 +02:00
Joerg Bornemann
e03d1ae953 implement Qt::TranslucentBackground for Windows
Adapted the Qt 4.8 implementation of translucent widgets in
the Windows platform plugin. This is only working for non-OpenGL
top level Windows.

Change-Id: Ic4c1c52d33b380f530f6a07e96c0c154a0571415
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-09 08:34:56 +02:00
John Layt
14f45e535b QtPrintSupport - Add CUPS printer and options queries to plugin
Implement initial support in the CUPS plugin for directly calling CUPS
to obtain printer list and basic printer info rather than QCupsSupport.

Add api to the plugin to return any options for a printer, usually IPP
options as implemented for CUPS, but whatever applies for the host
print system.

Future changes will add support for returning the PPD options.  This
api may eventually be added to QPrinterInfo, but not in 5.0.

Change-Id: I6c8bae4c9295009599e6ab31382f5fff4c93981f
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-06-09 01:46:36 +02:00
Konstantin Ritt
80ceba9a36 QZip: improve reading of zip files, fix some edge cases in writing
This supercede https://codereview.qt-project.org/#change,25111 and fixes
some more cases;
The autotest crash is fixed as well (but the test itself omitted due to
.pro file misconfiguration)

Change-Id: I4a3adde18b4f9a8ac9822f700eee71d2a12b9c2c
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2012-06-08 21:49:58 +02:00
Lars Knoll
09992c654d Remove QFactoryInterface from style plugins
Change-Id: I5c41f1c8b91b5e1117b9163c137de4bf5f51099c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 21:34:45 +02:00
John Layt
20c7fa62ca QtPrintSupport: Move printer list into plugin base class
Move the cached printer list from the Windows plugin into the base
class so the CUPS plugin can also use it in a subsequent commit.

Change-Id: Idf5fb7fc49b1820aad58f16e8854ab9120caa193
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-06-08 18:44:55 +02:00
Miikka Heikkinen
f2df9cef75 Fix crash in qt_qpa_core_dispatcher() at application exit.
In some situations it is possible to get events when QCoreApplication
has already cleared the 'self' pointer and will thus not return an
instance. For example, destroying screen at application exit when
there are parentless dialogs open will result in hiding the dialog,
which at least in Windows causes a call to
QWindowSystemInterface::handleExposeEvent() which will need the core
dispatcher down the line.

Fixed the crash by checking if the QCoreApplication instance is valid
instead of blindly using it. This should cause no problem as unhandled
events are simply queued.

Task-number: QTBUG-26061
Change-Id: Ide2350a62208433728e0271192c1da4b1efacc9b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-08 18:39:02 +02:00
Girish Ramakrishnan
a15aa822b7 Remove unused variable inSetParent
Change-Id: Ie65514209f14d8f8b2396c1d6e37cd8c3e4c0c1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-08 18:35:40 +02:00
Stephen Kelly
14cd267839 Use variadic macros where available to make QSKIP source compatible.
Otherwise this is a large source incompatbility during porting, so
it makes sense to provide the option of using C++11 for that.

Change-Id: I9792b3ae2c1fa3743bc9a2e74380134ea2f24add
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 18:10:18 +02:00
Markku Heikkila
9e75354aab Fix crash in QTreeWidgetItem::sortChildren when adding new item.
This is a cherry-pick of 4f388c383e39b598d997e21bd9a4f16d89bd0625
from February

Recursive call is caused if user code calls QtreeWidgetItem()::sortChildren and
sorting is enbled in QTreeWidget.

First call is from user code and second is caused by timer.
When timer expires second call is made.

This recursion is prevented with QTreeModel::SkipSorting skipSorting()
in QTreeWidgetItem::sortChildren();

Task-number: QTBUG-20345
Change-Id: Ibf73e69274423f31397a9e391bfba7d5c4103a3c
Reviewed-by: Markku Tapio Heikkilä <markku.heikkila@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-08 18:09:07 +02:00
Girish Ramakrishnan
a95e396a83 eglfs: Disable eglfs when evdev is not present
EGLFS has a hard dependency on evdev, so don't compile it when
evdev is not present.

This also removes the check that disabled EGLFS specifically for QNX.
Since QNX doesn't have evdev, EGLFS will get disabled automatically.

Change-Id: I9fdb364b2eff9b370fa238609a8f98af6ccb7f7b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-08 17:56:09 +02:00
Casper van Donderen
7525e85798 QDoc: Only print modulename::type on collision pages.
Change-Id: I090698b106456370f6c0982006243304f87dc70c
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-06-08 13:38:56 +02:00
John Layt
271b484b00 QtPrintSupport: Move plugin access of QPrinterInfo internals to base
Move all plugin methods requiring access to QPrinterInfo internals
into the plugin base class, and remove the plugin classes as friends
from QPrinterInfo.

Change-Id: Ic527efc681e198abf19e038dd77c36bb8017d049
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-06-08 13:33:50 +02:00
Morten Johan Sorvig
2922f85e70 Reduce QtWidgets dependencies in the Cocoa plugin.
b8246f08 added the new menus implementation which
removes one of the major QtWidget dependencies.

Continuing on the path to QtWidget-freedom this
commit removes the following:
- qmenu_mac.h/mm. Not used.
- FORMS += filedialog.ui. Not used.
- qt_strippedText from qaction.cpp. Duplicate.
- Misc stray includes.

What is left should be the dependencies needed by
the print engine implementation. These will be
handled at a later time.

Change-Id: I0cead4cdaddcebd402d30c6112f3e889d0f28740
Conflicts:
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-08 13:00:03 +02:00
Kent Hansen
5fc8cc830e Make qfont autotest build without widgets
Change-Id: I2ab344d44cb2aa8c59c1c28f7368784849d4b74d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-08 08:31:14 +02:00
Kent Hansen
027cd4c1b9 Make qicon autotest build without widgets
Change-Id: Ic6176404076bac956d00d57c99e0bbf0ac78beca
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-08 08:23:24 +02:00
Friedemann Kleint
23994a364e Add Qt::WindowTransparentForInput to Window flags manual test.
Change-Id: If27567a93d5a2e910289c680643503d02831d742
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-08 08:02:46 +02:00
Friedemann Kleint
94a81928ac Fix a crash when calling effectiveWinId() on parentless widgets.
Remove the assert as it also triggers when the widget is one
that currently has no parent (setParent(0)).
Check that the WinId is != 0 in the cursor code.

Change-Id: I711fc600f1d803c8f01c15df87984e742a4c23d2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-08 08:02:13 +02:00
Frederik Gladhorn
21e0d16411 Remove widgets lib dependency on platformsupport.
Instead of the dependency add the one needed function as virtual to
the QPlatformServices in QtGui.

Change-Id: Ia4455f5ac88ec4d0480bd81635cebba62bbd8ac5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-08 04:47:59 +02:00
Mitch Curtis
168c583a78 Allow ISODate string without seconds in QTime::fromString().
According to ISO 8601 (section 4.2.2.3), seconds can be omitted
from a string representing time.

Task-number: QTBUG-2813
Change-Id: I2578f290845e46a8f49be489f1d7427984ae7f08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:55:27 +02:00
aavit
1f461ac45b Namespace the bundled zlib symbols, to avoid clash with user zlib
When Qt is being compiled and is using the bundled zlib, QtCore needs
to export the zlib symbols, since zlib is needed in other Qt
libraries as well. That gives a danger of a potentially disastrous
symbol clash if the user later on links with both Qt and an external
zlib (ref. e.g. QTBUG-15071).

This commit enables a zlib compilation flag that causes all zlib
symbols to be redefined with a prefix. Hence, they will not clash
with a standard zlib.

A minor drawback is that zlib.h will now have #defines for a few
semi-normal identifiers. Hence, a couple of more changes are done:
In the private qzip code, the identifer crc32 had to be renamed.
QHttpNetworkReplyPrivate needed no change, but as a defensive measure
the #include <zlib.h> is moved from the _p.h file to the .cpp file,
to avoid surprising compilation errors later in code that include
that header.

This commit does not in itself solve the issue of how to let Qt
libraries outside of qtbase use the same bundled zlib, but it is
a prerequisite for that.

Change-Id: If84105901a8c90d35009faffe660c85a6bd2fee5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:53:10 +02:00
Lars Knoll
02191b6e4b Remove dependency from QFactoryInterface for the print plugin
Change-Id: Ia35890b72e7797ef655bf97b4a34af2908657c0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:20 +02:00
Lars Knoll
7715a2d0a5 Remove QFactoryInterface from the input plugins
Change-Id: Ia4a9dc5b4ef276dca39681848e531b4c9e4f64e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:16 +02:00