Commit Graph

7598 Commits

Author SHA1 Message Date
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
Konstantin Ritt
824180a122 Set the whiteSpace flag outside the grapheme and the line breaking loop
The white spaces determination doesn't belong to the text breaking algorithm.
A proper breaking implementation shouldn't assume spaces are
break opportunities (actually, space is allowed to be a grapheme base);
However, the whiteSpace flag should never be checked alone while iterating
over the text to find the space sequence; the grapheme boundaries should always
be taken into account. This covers the SMP code points in UTF-16 text and
graphemes that consist of a space followed with one or more grapheme extenders.

This introduces a minor overhead that would be eliminated some later.

Change-Id: Ic2cc7f485631fd0b436fc256ce112ded5f94fc07
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 21:18:36 +02:00
Lars Knoll
9d3e77f18e Remove QFactoryInterface from sql drivers
Change-Id: Ib31e6c4ce5264fc1e4281c8846df5630a6479a7c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 21:18:36 +02:00
Stephen Kelly
ee7fa67eb0 Deprecate the use of QWeakPointer to track QObjects.
The main problem with using QWeakPointer to track QObjects is that it
has API to convert to QSharedPointer, which is undefined behavior. There
is no need to overload the meaning of QWeakPointer with QObject
tracking.

QPointer is more suitable and should be used instead. Because QPointer
is implemented in terms of QWeakPointer, we need to add some overloads
which are not deprecated.

Change-Id: If0333e4800c9fd277629cc69185c9ca3e4e7e81d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-07 19:08:51 +02:00
Stephen Kelly
77a03ebd8d Expand the 'existing target guard' in generated CMake files.
This way the target will be created and have its properties
populated only one time.

I tried wrapping the whole file in an 'include guard', but that
broke the unit test in tests/auto/cmake/pass1 (and
the qt5_use_module function), because the function causes the
variables in the Config file to not exist outside of the
scope (eg for include directories), and yet, Qt5${Module}_FOUND is
still true even when the find_package was previously called in a
function, so it is not found and processed again.

The change in Qt5CoreConfigExtras.cmake does not need to be guarded
as it is only ever included from Qt5CoreConfig.

Change-Id: Iaa016563db5eb61294360ac9e003c9c923393d8c
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-07 19:08:34 +02:00
Samuel Rødal
1f9ae50457 Added SpellCheckUnderlineStyle theme hint.
Task-number: QTBUG-25115
Change-Id: I70abbed426ad8bebca51823ed5ce16f2f300b5cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-07 17:41:37 +02:00
Friedemann Kleint
d728bfe793 Windows: Store only full-size DC's obtained by BeginPaint.
Avoid painting bugs in case the DC covers only a part of the
window and QBackingStore does a full flush.

Task-number: QTBUG-26039

Change-Id: Ic918d9898ac824690273ac59bcb1e7e546cc698a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-07 17:13:38 +02:00
Kent Hansen
6b95e54f1f Fix compilation of examples with -no-widgets
Change-Id: Ie0e19daf6c6476b5c5130f4930dfa3df92917384
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 07:27:53 +02:00
Kent Hansen
7d7cd17d38 Make qtexttable autotest build without widgets
Change-Id: Id5f93dee0c4b5978c473838559f586ced35a2981
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 07:26:05 +02:00
Kent Hansen
51aff5ba67 Make sql autotests build without widgets
Change-Id: Icd4d2ef39961e2e0ec5c9e910c74b3e8a35503bf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 07:25:27 +02:00
Kent Hansen
2a62122682 Make "other" autotests build without widgets
Change-Id: I49e73c31b98e43259771c0e265cf13fc167c45f2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 07:24:31 +02:00
Kent Hansen
0f241b6f5e Don't build printsupport autotests when widgets aren't available
Change-Id: Ida376a75f376fc0d3696d715648c7229aec301e2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 07:24:01 +02:00
Donald Carr
b194575b85 Fix common device spec paths
This fixes breakage in the Raspberry Pi spec introduced in:

https://codereview.qt-project.org/#change,27536

due to incorrect depth assumptions regarding included files.

Change-Id: I802b828f1755f299939fed192dd3ca9bf1a83002
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-07 04:16:49 +02:00
Kent Hansen
ef30a59121 Remove widgets dependency from xmlstreamlint example
Change-Id: I2c7609077bd18864ffd9b2ba5086eb590aff3df0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:39:12 +02:00
Kent Hansen
1f8b8d56b2 Remove widgets dependency from qtconcurrent/map autotest
Change-Id: I734ae73a530ab6eb27271586040ef910e6ad0e2c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:39:09 +02:00
Kent Hansen
58db6e8822 Make animation autotests build without widgets
Change-Id: Icb0560a26973921611f697240fbce121fff518e9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:39:05 +02:00
Kent Hansen
1b444d5748 Remove widgets dependency from qdatastream autotest
Change-Id: I30ce3ce2d5a0badc7a846256825b4deea8c0856a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:39:05 +02:00
Kent Hansen
872b412bcc Make qprocess autotest build without widgets
Change-Id: I0a428852222accbea8446ba1c284f1c44b9d4bf3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-07 00:39:01 +02:00