Commit Graph

7815 Commits

Author SHA1 Message Date
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
Lars Knoll
cf9264bb6b Remove QFactoryInterface from bearer plugins
Change-Id: I8d6736e56f34f49041fff409d040634475eb0bf5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:13 +02:00
Lars Knoll
0b69385e42 Remove the QFactoryInterface dependency from platform plugins
Change-Id: I4010e59dcd8a790e06bb9a0ccf3cc9a5c7737ed1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:09 +02:00
Lars Knoll
d173da37ee Remove QFactoryInterface from the generic plugins
Change-Id: I5a4351ca4b6605f9628496701bb8c6063cf36c78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:09 +02:00
Lars Knoll
1402660575 Remove QFactoryInterface from picture plugins
Change-Id: I7b02cbfb850d6a9fc90c1eb1e12a9950baf61e77
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:05 +02:00
Lars Knoll
dcf3c95175 Remove QFactoryInterface dependency from icon plugins
Change-Id: I65bed1646f3c5e89329a6bbe3dcdbdb5660b7004
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:05 +02:00
Lars Knoll
2903db8b4c Remove the QFactoryInterface dependency from accessible plugins
QFactoryInterface is not needed anymore and will get removed soon.

Change-Id: Ib2806200b1a7f4a45d62e2b556380946ef68f585
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-06-08 00:12:03 +02:00
Lars Knoll
c9d040c1f5 Don't inherit from QFactoryInterface for image plugins
QFactoryInterface is obsolete now that we have the new plugins loading
mechanism, where we can get the keys out of the plugin without
having to load it. Remove it from QImageIOHandlerFactoryInterface
as a first step of getting completely rid of it.

Change-Id: I856b149dd20131e1cdcdcb271c1a355c9e0da6ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-08 00:12:00 +02:00
Donald Carr
21019539fb Fix eglfs regression in configure
XPLATFORM_QNX was never explicitly set, yet the tests which evaluate it
assume that it is.

Change-Id: If97d2ee1f4432ada0c68e36348bf5bec85f94e43
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-07 21:18:36 +02:00
John Layt
b9fc8bc10f SIC: QPrintSupport - Remove options api from QPageSetupDialog
QPageSetupDialog has an enum PageSetupDialogOption, however one option
had support removed in Qt 4.5 and the remaining 2 are actually for an
internal implementation detail that could lead to memory leaks if
changed by an app.

This change removes the enum and the api as they is now useless.

Change-Id: I9a3ab689dcab57151de894db5ebf22f6ad90d71e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-06-07 21:18:36 +02:00
Konstantin Ritt
88e735c9c9 Shift positions for lineBreakType
to keep them consistent with positions for all other flags.
This changes the internal behavior so that attributes[0].lineBreakType now means
"break opportunity at start of the text (before the first character in the string)"
and is always assigned with HB_NoBreak to conform rule LB2
(see http://www.unicode.org/reports/tr14/#LB2).

The current implementation is based on the sample implementation from tr14
that aimed to be as simple as possible rather than to be optimal.
From now, we can use pieces of the attributes array "as is"
without having to adjust some positions. Or we can analize some long text
by chunks (e.g. paragraph by paragraph) and consume less memory.

This introduces a minor overhead that will be eliminated shortly.

Change-Id: Ic873a05a9d5203b1c3d5aff2e4445a3f034c4bd2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 21:18:36 +02:00
Konstantin Ritt
8aac04f705 QTextBoundaryFinder: Consider soft hyphen as line breaking opportunity
SoftHyphen enum value was added to specify such a boundary reason

Change-Id: I4248909eed6ab8cbca419de4dcf9fe917620a158
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 21:18:36 +02:00