Commit Graph

12856 Commits

Author SHA1 Message Date
Frederik Gladhorn
200cc1f1e9 Accessibility Mac: Fix TextEdit
[ChangeLog][QtGui][Accessibility] Implemented text attributes to
enable VoiceOver to read QTextEdit and QPlainTextEdit.

Task-number: QTBUG-37204
Change-Id: Ie2fa8086a1bcf4907ac59850dc5c6c08b5f0b7f2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-20 12:49:18 +01:00
Daniel Teske
ae13c4e377 QProcessEnvironment: Fix handling of magic environment variables
The cmd shell on Windows sets special environment variables starting
with a '='.

Task-number: QTCREATORBUG-8716
Change-Id: Id2852188897522558907d9846fb2af069600235f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-20 10:36:34 +01:00
Kai Koehne
7c824bdb51 Update year in About Qt dialog
Change-Id: Ibbca2026c21394b68309cafe71e6d46065785f9b
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-03-20 10:36:34 +01:00
Morten Johan Sørvig
8c91c9912f Avoid QImage copy in toTexture()
Desktop OpenGL has GL_UNPACK_ROW_LENGTH which we
can use use to specify the image row stride.

This removes the need to call QImage::copy(). On
a retina MacbBok pro this reduces toTexture's share
of the total run time by 1-4%. (on tests/manual/
qopenglwidget/openglwidget)

Change-Id: Ia7f49d5c4ffcc347a495701bbaca6aecc2dc3433
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-20 10:36:34 +01:00
Laszlo Agocs
f5b552b590 Return false on context creation failure
Make QOpenGLContext::create() return false when the native context
could not be initialized. This way the return value and isValid()
become equivalent.

Relying on on having a non-NULL platform context is not enough, many
platforms will return a new instance even if the underlying platform
code failed to create a native context. To ensure that a platform
context is really usable, isValid() has to be checked too.

Change-Id: I6b4e9fdb24347ad52fbd6edbb8d144d51e16c301
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-20 10:36:34 +01:00
Mitch Curtis
9508ea4c50 Correct QPainter::setPen() documentation.
The default pen width is 1 as of Qt 5.

Task-number: QTBUG-37277

Change-Id: I5b7b9c2019bd0e812384e67812b7bcfde37d0b53
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-20 10:36:34 +01:00
Tobias Koenig
1f6e461533 Fix positional binding values order in QSqlQuery
Adapt the stringification code, that is used to produce the
keys for QSqlQuery::boundValues() return value, to keep the
right order of the binding values.

Task-number: QTBUG-12186
Change-Id: Ic11a455bfd9ffd1418b1b021ce5cf78cae9b4504
[ChangeLog][QtSql] Fixed the order of values with positional binding in a QSqlQuery
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-03-20 10:36:34 +01:00
Christian Strømme
f84e72600e Android: Check for exception before calling NewGlobalRef().
Calling NewGlobalRef() throws an exception if it gets an invalid ref.
If one of the jni object-calls throws an exception and the returned
reference is invalid, the subsequent call to NewGlobalRef() will trigger
the second exception and the process will be terminated.

Change-Id: I50c622e695542373d5b2eebd911c882e8e0f6bf7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-03-20 10:36:34 +01:00
Eskil Abrahamsen Blomfeldt
84c8e4717c Android: Re-enable threaded rendering
In Qt 5.2.x, the platform plugin inherited from the EGLFS platform
plugin, so calling the super class implementation of hasCapability()
would return true for ThreadedOpenGL. Since this link was removed
in Qt 5.3, we would return false for all devices, giving us a large
performance regression.

Task-number: QTBUG-37586
Change-Id: I27758649ee9c0921902787b93be943751c839eb8
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-20 10:36:34 +01:00
J-P Nurmi
53ee91fc8d Fix QAbstractScrollArea to respect transiency per scrollbar
Do not query scrollarea's own style whether the scrollarea itself is
a transient scrollbar, but query both scrollbar's style individually.

Change-Id: I6397a29bc7b276a92c538cbb7fc0dd921595d093
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-03-20 08:35:24 +01:00
Morten Johan Sørvig
5fe0c9e9b0 Cocoa: Set surface resolution for all GL surfaces
Change-Id: Ic54ad954a157ff777312361b7816b1752afbf75f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-20 08:35:24 +01:00
Morten Johan Sørvig
5e03c4d97f QOpenGLWidget retina support.
Use device pixels where appropriate. 

Change-Id: Ia953e6da4034eecbfccf798701ec1b850eea9d5b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-20 08:35:24 +01:00
Morten Johan Sørvig
07549de92b Delete the OpenGL context before the window.
Fix a crash-on-exit on Mac, where deleting the context
references the attached NSView.

Change-Id: Iac38184dab7a406e4072452fd9a6b175e6968ade
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-20 08:35:24 +01:00
Morten Johan Sørvig
669588484f Cocoa: Close windows with QWSI::handleCloseEvent()
Calling QWindow::close() directly bypasses some of
the window close logic in the QWindow subclasses.

Change-Id: I208db5600e6a756e25e207eaaf55dcfad255f406
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-20 08:35:24 +01:00
Morten Johan Sørvig
a466743f74 Cocoa: Enable QQuickWidget on Mac OS X.
Change-Id: I0635bf0bfcd49c20987a81c6f8895fc3343fbd20
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-20 08:35:24 +01:00
Friedemann Kleint
1cc421eb25 Use parent cursor for QLineEdit's clear button when not shown.
Task-number: QTBUG-37548
Change-Id: I8a4eb52f9a5a9551e53dab100f2337cf201d7401
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-03-20 08:35:24 +01:00
aavit
0e69c94222 Fix compile for embedded Android
Cannot use JNI to query for standard paths

Change-Id: I1596106fd4d5e532d3ac1cd6dbfce3fb9fe1db5a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-03-20 05:50:34 +01:00
aavit
83b3924cc3 Fixes: style runtime warnings when painting too small widgets
Trying to create a 0-size cache image would lead to trying to paint to
a null image, giving runtime warnings.

Task-number: QTBUG-37035
Change-Id: I0a7fdb19cc7548dea2770d6be4eb283f6b898ada
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-03-20 05:50:18 +01:00
Kurt Pattyn
3ff15f1e98 QOpenGLContext: Use color depth information from QSurfaceFormat
When a new QOpenGLContext is requested, the color depth
information is now also taken into account on OS X and WGL.

Task-number: QTBUG-37411
Change-Id: I69d04989a20de3ace041b009fbbdc03fa02cfdf8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-19 20:12:08 +01:00
Eduard Veleba
379238496d Workaround for misbehaving [UIScreen screens] in iOS 7.1
On iOS 7.1 [UIScreen screens] sometimes returns empty NSArray which
is against documentation and causes immediate application crash.
This workaround uses [UIScreen mainScreen] in case [UIScreen screens]
returns empty NSArray.

Task-number: QTBUG-37601

Change-Id: I9b341b9ca788b5fc81804489d2e0a3af84207168
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-03-19 19:59:01 +01:00
Tor Arne Vestbø
aea988a3d9 Remove 'register' storage class specifier in armv6 atomics
It is deprecated, and produces warnings on recent Clang versions.

Change-Id: I83181dd12c06a600a2f0eafbd83fe6111cf7752c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-19 19:58:47 +01:00
Gabriel de Dietrich
aae382ab3b QMenu: Enable sloppy submenu mouse navigation
Since we're in the 21st century, we set QCommonStyle to return true
to the SH_Menu_SloppySubMenus style hint. This unlocks all the logic
already available in QMenu.

Task-number: QTBUG-20094
[ChangeLog][QtWidgets][QMenu] Enable sloppy submenu mouse navigation
Change-Id: I134c87e348d98d1f46055e0bfef2b4a4a3d2993a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-03-19 19:52:41 +01:00
Gabriel de Dietrich
f5224bd4d1 QMenuPrivate: Make sloppyDelayTimer non-static
Keeping the timer static would trigger warnings when enabling
SH_Menu_SloppySubMenus in QCommonStyle in a forthcoming patch.
This would happen if we opened a second level submenu quickly
enough and get the mouse event handler to reset the timer its
parent menu started.

Change-Id: Ia768603b40b219f87138c60a595c65ef408761ae
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-03-19 19:52:28 +01:00
Gabriel de Dietrich
c02cc25e83 QMenu: Sloppy menu selection should allow hovering separators
Setting the current action to 0 clears the sloppy region and
closes the submenu if we hover a separator on the way to the
submenu popup. Now, we choose not to while the sloppy delay
timer is running.

Task-number: QTBUG-20094
Change-Id: I9d1b1358fe64c259dc47f35db8fc8f2b19a73153
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-03-19 19:52:10 +01:00
Kai Koehne
b66950b342 Fix typos in QRegExp documentation
Change-Id: I80bce716ac1c161fd87291ecdbf21eb8f3f25e5a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-19 15:43:46 +01:00
Gatis Paeglis
b19b080894 Update bundled libxkbcommon version to 0.4.0
This release comes with important bug fixes. Also we can now
remove the workaround code which was needed for libxkbcommon 0.2.0.

Task-number: QTBUG-31712
Task-number: QTBUG-33732
Task-number: QTBUG-34056

Change-Id: I57caf7f803b9a01a15541a5ad82e464de3b8abbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-19 15:42:13 +01:00
Konstantin Ritt
c6b555dac3 Fix bundled HarfBuzz-NG build outside QtGui
On Mac, hb_coretext requires both CTFont and CGFont.
Due to not supporting the 0 tag by CoreText, hb_blob_get_data()
always fails causing the hb_coretext_shaper initialization to fail, too.
Since HarfBuzz-NG is not a part of QtGui module anymore,
there are two possibilities to workaround this: either engineer the
font data by querying tables one-by-one and generating the font
directory table, or pass CTFont and CGFont refs directly to hb_coretext
via the hb_face's user_data. This patch implements the latter.

Change-Id: I7d2e2df00818ea811642cb6a6c3b9c9abd5d7b94
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-19 04:17:01 +01:00
Friedemann Kleint
0d50efeae9 Fix QByteArray memory corruption in QIBaseDriver::open().
Rewrite code to use QByteArray::reserve(), QByteArray::append()
instead of memcpy().

Task-number: QTBUG-37508
Change-Id: I16ead153f33fa5a34bc01ee27ae4cd1b8993b65e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-03-19 04:17:01 +01:00
Mark Brand
1fad6a2483 update bundled sqlite to 3.8.4.1
The "Fixed CE build of sqlite3" patch is preserved in this change.
(ea70ec8711)

Change-Id: I9cf211785071386173a87f645773cdae08498354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-03-19 04:17:01 +01:00
Fabian Bumberger
4059e586cc QNX: Remove sending synchronous window system events
This makes some OpenGL autotests fail. Apparently we are sending a expose event before the window
is properly exposed.

Change-Id: I1710ec51605088ce594fc4676214db2d822d1cc5
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-19 04:17:01 +01:00
Fabian Bumberger
ea057c8372 QNX: Fix QToolTip
The problem is that on QNX the window activation and focus
events are delayed. QToolTip can not handle this and would hide
the tool tip right after it is created.

Change-Id: I6045d1d277b73508c24174d72a05e0baa4ae6e7f
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-19 04:17:01 +01:00
Frederik Gladhorn
4fc3d9ba63 Fix double release in QTimeZone on Mac
availableTimeZoneIds would release the enumerator.
This leads to a double free, so simply don't release the enumerator.

Task-number: QTBUG-37582
Change-Id: I521a9555d32545afd47095235ccee75a4f3e1974
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-19 01:01:38 +01:00
Frederik Gladhorn
a1af25290b Accessibility Mac: fix role for links
Change-Id: Ied4dd0bf112f36065da4063857898ca4bd0eb77b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-19 00:53:39 +01:00
Andrew Knight
b63027867e WinRT: Fix QDesktopServices::openUrl() for local files
The passed-in URL is expected to be a file-scheme URL to be converted to
a QString using toLocalFile(), not a relative path to be prepended with
the application directory.

Change-Id: I647f351c99f0df66ef017936585f044292c16aff
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-18 21:38:03 +01:00
Andrew Knight
9827f6d198 WinRT: Load system fonts using DirectWrite
System-installed TrueType fonts can be read into memory and loaded into
the FreeType font engine. This allows the application to be packaged
without fonts, but does not work on Windows Phone where DirectWrite is
not supported.

Every single-file TrueType font is registered with the font database,
and then loaded into memory at the point that the font is actually used.

Task-number: QTBUG-37230
Change-Id: I804116e37a874cd146a0653ba4cc018f8b1cd6a4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-18 21:37:55 +01:00
Shawn Rutledge
336cb75d8f X11: defaultDragDistance depends on screen resolution
The usual default is 10 pixels, but on a screen with resolution
exceeding 100 DPI, it will be a proportionally larger number.  The
reason is that such precise finger and mouse movements are more
difficult on higher-resolution screens.

Change-Id: I6e66299e12e6cac5c4e032251b32a34940970372
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-18 10:03:37 +01:00
Paul Olav Tvete
3245745cd0 Handle key release events correctly
Ignore key events that we don't actually handle.

Task-number: QTBUG-35784

Change-Id: I196a4d0d199817a7dfd32fc98207ebfe3982050b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-18 09:59:33 +01:00
Paul Olav Tvete
68a9229a97 Android input method improvements
Use the new inputmethod query API. and get rid of the hack where
we would move the cursor back and forwards to make sure that the
Android software keyboard noticed that the cursor had moved.

The android plugin now uses absolute positions instead of
position within the paragraph for all cursor handling (provided
that the control supports the new API).

Task-number: QTBUG-37511
Change-Id: I03463dbbcb4acbfa41e2eab06889d021d50da01f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-18 09:59:20 +01:00
Frederik Gladhorn
433ebd1628 AVX image code was removed
Remove a last left-over after 5e519b31dc

Change-Id: I85e73a5d81d45b4ccfc80cdaf34ab7b6c3c85bdc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-17 23:00:50 +01:00
Konstantin Ritt
13171e7e63 Fix build on older MinGW versions
> In constructor 'QWindowsPrintDevice::QWindowsPrintDevice(const QString&)':
> src\plugins\printsupport\windows\qwindowsprintdevice.cpp:105:86:
> error: 'DC_COLLATE' was not declared in this scope

Change-Id: Ifb64c323765ae4b6abb80c32d4ba2bc3fbffa245
Reviewed-by: John Layt <jlayt@kde.org>
2014-03-17 23:00:50 +01:00
John Layt
fd6728a5bc QPrinter - Doc fix
Remove duplicated documentation.

Change-Id: I53b6430b69b0e76a04cdc12b32a6bd59756acaa8
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-03-17 20:53:21 +01:00
Friedemann Kleint
513a49d62c Fix translation of QtPrintSupport and QPageSize.
Add translator comments, fix spelling, reduce repetitive
messages.

Change-Id: Id4cbbc3de8fa261cf8f125c5faf735dc608e2b15
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-03-17 20:53:10 +01:00
Marc Mutz
b4a427bac6 Doc: document QSharedPointer::swap() method
The function is already present for quite some time, but was never documented,
so declare it as \since 5.3.

Add swap() function to qsharedpointer.h so it's visible to QDoc, too.

Change-Id: I8eba420878a096392fd181a180d5751101d37a50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-17 20:52:46 +01:00
Marc Mutz
9b58f95c63 Doc: Add docs for QtConcurrent::{Unhandled,Exception}
Change-Id: I2a9f28e572f8e59e260f659b6d17721037cbd38e
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-17 20:52:42 +01:00
Konstantin Ritt
4f2872c64f Make QTextEngine::setAdditionalFormats() invalidate cached results
...which ensures we're not getting the formatting/rendering
artefacts in case of QStackTextEngine.

Change-Id: Ia0696a3e67eb866cf9776c6649c43775944edd1d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 16:27:55 +01:00
Konstantin Ritt
946c092554 QGraphicsSimpleTextItem: Fix drawing the outline with pen, when set
QTextLayout's setAdditionalFormats() is expected to invalidate
the shaping results, so that the layouting must be done *after*
the format range(s) gets applied.

Task-number: QTBUG-33475
Change-Id: I6b948fc179da915545a98ac36f2c20163947ec9e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 16:27:55 +01:00
Laszlo Agocs
0a803dc90a Add note to docs about normalization in setAttributeBuffer
Task-number: QTBUG-37103
Change-Id: I0b1716b76e10c65871c6a96dab5d8d81c95095d7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-17 16:27:55 +01:00
Shawn Rutledge
f6d3b65e45 QFileDialog: documentation clarifications about file type filtering
*.* is not a portable file type filter.  Anyway it's better to filter
by mime types, because it's more inclusive now and may even get better
in the future.

Task-number: QTBUG-37393
Change-Id: Ide3c3dfc47cd4b4c55d842b73de5369a0596a546
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-17 16:27:55 +01:00
Ulf Hermann
a1a2a038db Warn if the time taken by QTest::qSleep() is more than 50% off
Like this we can find out more easily if autotests fail because of
flaky timing.

Change-Id: I57b10f5fc4908bed7d00990641b2ddfd4ea84a11
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-17 16:27:55 +01:00
Friedemann Kleint
fc3a1fba45 Windows: Allow for custom input context plugins.
Task-number: QTBUG-37556

Change-Id: I9719138e1b09026f0971f8d3eeae525fc8951c0d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Jonathan Liu <net147@gmail.com>
2014-03-17 16:27:55 +01:00
Allan Sandfeld Jensen
a4080e4719 Recognize RGBA8888 formats when converting to CGImage
qt_mac_image_to_cgimage incorrectly assumes any 32bit QImage format is
one ARGB32 form. This is no longer correct with the introduction of
RGBA8888 format.

This patch recognizes the formats a maps them to the native support for
them in CGImage. It also removes a duplicate method.

The codepath appears to be only used by the old coregraphics paintengine
and MIME handling. Which means RGBA images are probably printed and
copy/pasted incorrectly at the moment.

Task-number: QTBUG-36818
Change-Id: Ie6292defdbaef3e6105cf993e12911eded0918dc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-17 16:27:55 +01:00
Ulf Hermann
3d05fa25f2 Remove unused static const variable
clang on Mac OS complains about it.

Change-Id: I7a385eb520c5098cf61a0d8c2e1de0731db2e1ae
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-17 14:11:10 +01:00
Jani Heikkinen
23b47a8d4e Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-03-17 13:48:12 +01:00
John Layt
833a43d56c QtPrintSupport - Fix QT_NO_PRINTER build
Fix the QT_NO_PRINTER build for issues that have accumulated over last
few months, and in the new changes already approved.

Change-Id: I9aed21dee861837fd1a68a96692c873a4f5be293
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:26 +01:00
John Layt
69e9b12001 QCupsSupport - Remove obsolete CUPS code
All code directly using CUPS is now in the QPA plugin and QCupsSupport
is no longer needed, other than the utilities for setting CUPS options
which do not need direct access to CUPS.  Delete all the obsolete code.

Change-Id: I561ad8af2415a9b745e2d35fd0624a5acdf27648
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:23 +01:00
John Layt
aa76fcc301 QPrintDialog - Remove CUPS specific code
We no longer use QLibrary to load CUPS, so remove checks.  Switch from
using QCupsSupport and QPrinterInfo to QPlatformPrintDevice.  The
remaining use of QCupsSupport is only for utilities to set CUPS specific
options which don't need to link to CUPS directly, these will be
replaced later with generic cross-platform API.

Change-Id: I6e3d9e9a59633c33af0555eb28443a9fc192b27c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:20 +01:00
John Layt
9393f744d4 QPageSetupDialog - Use QPageLayout and QPageSize
Convert the Linux / CUPS version of the QPageSetupDialog to use
QPageSize and QPageLayout internally.  As this is an almost complete
re-write of the internals the liberty has been taken of doing renames
and code moves that would normally be done in separate commits, but in
this case would have been mostly pointless done separately.

Change-Id: I6eaa7c1fbf0a04cb3425f1d322fcae89239e83b7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:17 +01:00
John Layt
1ffd79bfb7 QPrinter - Fix winPageSize() on Mac and Linux
Using QPageSize internally provides the Windows ID on all platforms so
remove the conditional compile on the QPrinter api and add support to
the print engines.

Change-Id: I31e23d5090a9b6ceb087c29dead050b0ee1855a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:13 +01:00
John Layt
dbc50e06df QPrinter - Use QPageSize and QPageLayout
Use QPageSize and QPageMargins to get/set values in the print engines,
add api to directly set the values, and rewrite the docs to make the
paper-based api obsolete instead of the page-based api.

Add new PPK keys to pass QPageSize, QPageMargins and QPageLayout to the
print engines to ensure no level of detail is lost, e.g. for custom
sizes passed to QPrinter.

[ChangeLog][QtPrintSupport][QPrinter] QPrinter can now use QPageSize
and QPageLayout in the public api to control the page layout for a
print job.

Change-Id: Iee39a4042bcd6141d29b0a82b49066d7a7a78120
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:10 +01:00
John Layt
70081096a1 QPrintEngine - Switch Windows to QPageLayout
Switch the Windows QPrintEngine to use QPageLayout.

Change-Id: I2b617fe103980c4efbb0ed367547e436f2d8a5e2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:07 +01:00
John Layt
ab42391cd0 QPrintEngine - Switch Windows to QPlatformPrintDevice
Change the Windows QPrintEngine implementation to use the
QPlatformPrintDevice to obtain device information, and use QPageSize to
obtain page size conversions.  A following change will use QPageLayout
to store that page size.

Change-Id: I990943e2b62ab6dab2c4d4a292c7ed7261beadf2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:04 +01:00
John Layt
4eb36ad597 QPrintEngine - Switch Mac to QPageLayout
Use QPageLayout in the Mac QPaintEngine.

Change-Id: I4c160e3875d69879160e289c371c10b1ac028748
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:46:01 +01:00
John Layt
c5cbdc2cbc QPrintEngine - Switch Mac to QPlatformPrintDevice
Change the Mac QPrintEngine to use QPlatformPrintDevice and QPageSize
for all device and page size related requirements.

Change-Id: Ie0e598eceaf1a657a1554c0f56078fd857ef2e06
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:58 +01:00
John Layt
d13195584e QPrintEngine - Switch Cups to QPlaformPrintDevice
Use QPlatformPrintDevice in the Cups print engine for all device
specific code.

Change-Id: Ic1f5f8b4010a9958c320f3c0c727cf1bd1a70c65
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:55 +01:00
John Layt
9e29fab38d QPdfWriter - Use QPageSize and QPageLayout
Add support to QPdfWriter for QPageSize, QPageLayout, and resolution.

[ChangeLog][QtGui][QPdfWriter] The QPdfWriter now supports setting
the PDF orientation, layout and resolution by using QPageSize and
QPageLayout.

Change-Id: I9c269f997ec540dac1989f355c6a2e7488947966
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:52 +01:00
John Layt
0c04b31d27 QPdfPaintEngine - Use QPageLayout and QPageSize
Switch internals of QPdfPageEngine and derived classes to use
QPageLayout and QPageSize to make handling of page layout and size
more consistent by removing multiple implementations.  In particular
remove all use of the QPdf namespace version of page size.

Change-Id: Ie820340015e8812c8162bd1a257dd0f51f4f0b85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:49 +01:00
John Layt
4ab55a01e9 QPagedPaintDevice - Use QPageSize and QPageLayout
Use new QPageLayout and QPageSize class to store and convert page sizes
and layouts consistently.  Extend the PageSize enum to match
QPage::PageSize.

Note that public setters/getters cannot be added as virtuals would break
BIC, but without virtuals the derived classes would break.  Instead an
internal api is provided and the derived classes will need to
implement identical api to manipulate it.

[ChangeLog][QtGui][QPagedPaintDevice] Paged paint devices such as
QPrinter and QPdfWriter now support all Postscript standard page sizes.

Task-number: QTBUG-27685
Task-number: QTBUG-25744

Change-Id: I62e96ab94194ab4ac8bed8fa804e0ce1c3233313
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:47 +01:00
John Layt
b0428926ce QPrinterInfo - Switch to QPlatformPrintDevice
Change the QPrinterInfo implementation to use QPlatformPrintDevice as
the backend.  Remove all the old QPrinterInfo related code from the
QPA plugin.  Add public api to QPrinterInfo to support some features
from QPlatformPrintDevice.

[ChangeLog][QtPrintSupport][QPrinterInfo] Added new public api for
isRemote(), state(), defaultPageSize(), supportedPageSizes(),
supportsCustomPageSizes(), minimumPhysicalPageSize(),
maximumPhysicalPageSize(), supportedResolutions(),
availablePrinterNames(), and defaultPrinterName(). The use of
availablePrinters() is discouraged due to performance concerns.

Task-number: QTBUG-35248

Change-Id: Ic38323a930549ad67bf04a1a6bb43d623dfe6a33
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:44 +01:00
John Layt
cf8b8340f3 QPlatformPrintDevice - Add Windows implementation
Add Windows implementation of QPlatformPrintDevice.

Change-Id: I007678cd6d2bdae0728b61cc2796a5c5e5d1578f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:42 +01:00
John Layt
e33b915267 QPlatformPrintDevice - Add Mac implementation
Implement the OSX support for QPlatformPrintDevice

Change-Id: I2e3900818d4d9f0682a15ed94b8c824085adb465
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:39 +01:00
John Layt
6826912f60 QPlatformPrintDevice - Add CUPS implementation
Add support to the CUPS print plugin for the new QPlatformPrintDevice
class.  Note this is called QPpdPrintDevicePrivate as it uses the CUPS
PPD support which is deprecated from CUPS 1.6 onwards.  A different
plugin will be implemented for the CUPS 1.6 support.

Change-Id: I26d005f90842d9c6262341171ef157536d28cc5d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:37 +01:00
John Layt
f50d46e5eb QPlatformPrintDevice - New QPA base class
Add a new QPA class to abstract Print Devices.  Each platform instance
will encapsulate all required details about a print device instead of
the code being distributed throughout the print engine and print
plugin.

Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:31 +01:00
John Layt
5eeed00f4d QPageLayout - Add new QPageLayout class
New QPageLayout to encapsulate page layout details including page size,
orientation and margins.  Scale may be added later.

Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.

[ChangeLog][QtGui] Added class QPageLayout to support handling page
layouts including the page size, orientation and margins.

Change-Id: Ife1ddd6c2a8d1516542be2eb37425111f41cd5c7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-03-17 13:45:27 +01:00
John Layt
87d802465b QPageSize - Add new QPageSize class
New QPageSize class to encapsulate paper sizes and names to ensure all
sizes and conversions are consistent and match the Postscript standard
sizes.

Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.

[ChangeLog][QtGui][QPageSize] Added new QPageSize class to implement
Adobe Postscript PPD standard page sizes. This class supports the
standard page sizes, names and keys from the PPD standard, and provides
convenient size and rect conversion methods.

Change-Id: Ie2c8be0c3df0d29ac5da4cd9877ad41d0982633c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-17 13:45:19 +01:00
John Layt
ad0163d088 QPrinter - Add page metric tests
Add more page metrics tests to expose the many bugs and inconsistencies
in the page layout handling.  No platform or pdf backend passes all
these tests so they are skipped for now, but following commits will use
the tests to ensure the re-write of the page layout handling fixes the
many problems in a consistent way for all backends.

Change-Id: Ic5b16aa08dfe2bd9a9191662fd2bbe6b913e15c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-03-17 13:45:14 +01:00
Allan Sandfeld Jensen
cf56e066ad Revert "Make OpenGL texture glyph cache use the right freetype glyphs"
This reverts commit f78661b03c.

The reverted patch was working around that QFontEngineFT was using
the poor QFontEngine fall back. That issue was fixed in commit
0b7beaaaf2, and the work around
is no longer needed.

This also fixes a rare problem with the workaround when the fontengine
and the glyph-cache do not share the same default glyph format which
can happen with QRawFonts.

Change-Id: I150f70a003b137c1d145f6f70cda568c85633e5c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-17 13:39:09 +01:00
Laszlo Agocs
2861a4d109 Fix no-opengl build with egl
Disable eglfs and similar plugins when opengl is not enabled.
(but egl is present)

GL-dependent parts of eglconvenience need to be skipped too.

Task-number: QTBUG-37457
Change-Id: I44d49495241551bc7b1f565aa0b5ace9f310628e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-17 13:31:14 +01:00
Jędrzej Nowacki
ac178eae4e Fix Q_DECLARE_METATYPE macro
The macro should stringify value of the given token not the token
itself.

Task-number: QTBUG-37547
Change-Id: I90f4fa613bd13d5a581828ab13f620b40dfd3593
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-03-17 13:05:07 +01:00
Frederik Gladhorn
a2850e54d5 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	src/gui/painting/qdrawhelper.cpp
	src/gui/painting/qdrawhelper_avx.cpp
	src/gui/painting/qdrawhelper_x86_p.h

Change-Id: I09352d05119f6fd000319074a2705b38361b2c90
2014-03-17 12:29:11 +01:00
Morten Johan Sørvig
8212e0cfad Cocoa: Set "Stereo" OpenGL format option.
Task-number: QTBUG-35548

Change-Id: I60b633ae44b8b4b353a7328eb0922b9301e1460c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-03-17 09:15:25 +01:00
Morten Johan Sørvig
ffc8aac684 Fix high-dpi QGraphicsPixmapItem bounding rects.
QGraphicsPixmapItem did not take the pixmaps
devicePixelRatio into account when calculating the
bounding rect. As a consequence, a 512x512@2x pixmap
would get a 512x512 bounding size instead of the
correct 256x256 bounding size.

Task-number: QTBUG-37008
Change-Id: I266e418b7e5d92bf1d4c96bd9380a27708dc2b4a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2014-03-17 09:15:15 +01:00
Allan Sandfeld Jensen
0b7beaaaf2 Fix rendering of grayscale antialiased FT fonts on QGLWidget
QFontEngineFT::alphaMapForGlyph and QFontEngineFT::alphaRGBMapForGlyph
has been broken since change#65694. They always fall back to using
the path rendering of QFontEngine because we zero the scoped pointer
just before testing it.

To fix it we need to release the scope pointer after we are done using
it.

Change-Id: I8811c1f5261f286f2f3dd3c0f93c988ba0909669
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-03-15 10:46:25 +01:00
David Schulz
cc0636ea1e Remove level 4 compiler warnings from MSVC.
Task-number: QTBUG-7233

Change-Id: I52067e3a22e98a62fd87415906e54a54ff2d6b49
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Dave McClelland
2014-03-15 10:46:17 +01:00
Martin Klapetek
c6e271da6d QXcbWindow - inline the atom functions
Change-Id: I3a8f9efb7de21bf2301721edca49c9411c62eed0
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-15 10:46:10 +01:00
Martin Klapetek
2ae50d9123 Update QScreen::availableGeometry() on _NET_WORKAREA atom changes
When the window manager sets new workarea using the _NET_WORKAREA xcb
atom, QScreen::availableGeometry() does not react to that and returns an
invalid available geometry. This patch reacts to that change and updates
the QScreen property properly on xcb platform.

Change-Id: I8f0b4a27bab0ce450fb7393f4d9a56f3ce9a4ea1
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-15 10:46:05 +01:00
Liang Qi
eadaaf69fb Cocoa: added queryKeyboardModifiers() in platform plugin
Task-number: QTBUG-37181
Change-Id: I9256d0c9b83d6e5982864dc747586cbe2322b60c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-15 10:45:59 +01:00
Kari Pihkala
5334a2cea7 Mac: Add support for high-dpi custom pixmap QCursors
For pixmaps with devicePixelRatio greater than 1,
create a native cursor that has a normal and a high-dpi
representation.

Task-number: QTBUG-34116
Change-Id: I1c014d65749add25f2b828837555a1844ede97c1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-15 10:45:53 +01:00
Morten Johan Sørvig
4d56c86f80 Cocoa: Disable the zoom button when appropriate
Disable the zoom (maximize) button for fixed-size
windows and customized windows with the MaximizeButton
flag not set.

Task-number: QTBUG-37078
Change-Id: I6da88496474713de37b48aa65742203632ba99d6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-15 10:45:47 +01:00
BogDan Vatra
f9e1e595a9 Android: Delay the set of the BackingStore if window->handle() is null.
Task-number: QTBUG-37458

Change-Id: Idddfe1876aff3d14d8c6c060d04236c5dc611bce
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-15 10:45:42 +01:00
Eskil Abrahamsen Blomfeldt
287fa94fe2 Android: Fix another "QApplication not on main() thread" crash
The assets file engine is created before main() is called, thus
prepopulate was called before main(). In this function, we created
a QDataStream which internally created a QBuffer which inherits
from QObject. This caused the main thread pointer to be initialized
early, and the old "QApplication is not on the main() thread" warning
and crash returned. The fix is to prepopulate the first time the
file engine is used instead.

Task-number: QTBUG-37444
Change-Id: I2c6e5f1a8ca88b5dc7d8e145fffeb7587dc0e623
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-15 10:45:36 +01:00
Richard Moe Gustavsen
de51854726 iOS: update keyboard rectangle when scrolling the screen
When we scroll, the keyboard will change position relative
to QScreen, even if it appears to stay put. For that
reason we also need to update the keyboard rect after
doing a scroll.

Change-Id: I9bda2ab5b5e4970f488d3e69e44cf58e273f8fcd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-03-15 10:45:31 +01:00
Friedemann Kleint
7b8d4cdb10 Windows native file dialog: Allow for omitting name filter description.
Task-number: QTBUG-37329

Change-Id: I644595a292e5b1890b2088b68be595bfcdba9d4d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-03-15 10:45:24 +01:00
Laszlo Agocs
3d2160056e Resurrect QGLWidget::renderText()
The variant taking x, y, z has been broken in all Qt 5.x releases.
This is now corrected by making the GL2 paint engine capable of applying
a Z translation.

Task-number: QTBUG-31156
Change-Id: I119566e9e9577f6cdf7e8bae56cac1e34995e622
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-15 10:45:10 +01:00
Morten Johan Sørvig
77bf302ce2 Prevent DrawTextItemDevice::metric warning on Mac
Implement PdmDevicePixelRatio.

Task-number: QTBUG-36419
Change-Id: I4d2822d01e08c80e9b829d5f524e8e761e694fba
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-15 10:45:04 +01:00
Allan Sandfeld Jensen
19532eec2a Fix casting and overallocation in qregion.cpp
The POINTBLOCK struct in qregion.cpp is badly defined. By using ints
as the base storage of the internal array it forces not only bad casting
from int to QPoint, but also allocates an array four times too big.

This patch changes to char, since a char pointer may alias anything and
this gives the right size of the array.

Change-Id: I608eaf39ac7306c71314a139bed6e2352249c0ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-15 10:44:56 +01:00
Gabriel de Dietrich
4b0016f045 Cocoa: Get rid of the forward window pointer asap
As soon as we receive an event not related to dragging
a QDockWidget out of its area (or a similar use case),
we no longer need the forward window.

Task-number: QTBUG-37265
Change-Id: I310e9cc2cf099c76e7a88427826d4b97ca0cd9b9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-15 10:44:52 +01:00
J-P Nurmi
49b14f7a8b Remove the _qt_filedialog_xxx hooks
These internal and obsolete hooks are no longer used. The correct way
to provide platform dialogs in Qt 5.x is to implement a platform theme
plugin, as was done for GTK+ 2.x.

Change-Id: I3f1474fbf760130106b3c47173eaedd2f1a919bf
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-03-15 10:44:47 +01:00
Friedemann Kleint
51e5378113 Use QCommandLineParser in example dnslookup.
Show how use QCommandLineParser with additional
parameter checking for custom options and positional
arguments.

Also explain how to display help in GUI applications.

Change-Id: I03513e09b7dd5b150259593da0af2ef2a281cab2
Reviewed-by: David Faure <david.faure@kdab.com>
2014-03-15 10:44:41 +01:00
Lorenz Haas
4b0ad2fcc8 Doc: Fix syntax/compiler error in QThread snippet
Change-Id: If64e01099b50f15b5cf7cdb0890dfa4f7625126d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-03-15 10:44:29 +01:00
Kai Koehne
82fd626ded Document %{if-category} in default message pattern
Commit 15ddb91b introduced %{if-category}, and changed the default
message pattern. Adapt the documentation accordingly.

Change-Id: I1d500122300c4d62171de3607553b3a5a822d4a7
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-03-15 10:44:25 +01:00
Laszlo Agocs
7fba691110 Docs: Clarify QOpenGLFunctions::functions()
Change-Id: Ifb6fdc3de7f93a1632b396eaaa14078546cac4dd
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-03-15 10:44:20 +01:00
Peter Hartmann
2bbdc6358f HTTP internals: keep consistent state in channel and protocol handler
It could be that the channel has its reply already reset to 0, while
the protocol handler thinks the reply is still active, which might
lead to weird behavior including hard to reproduce crashes.

Task-number: QTBUG-37424

Change-Id: I89b65d34caaa546a343edc2ee205aa76425de88f
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-03-15 10:44:16 +01:00
Laszlo Papp
c42ac8173e Fix a probably copy/paste issue from drawImage in the drawPixmap snippet
Change-Id: Ia2b34e3ee6954342501a805f9e047cb90078e9d5
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-03-14 22:40:40 +01:00
Friedemann Kleint
176342e70a QWindowsXP/VistaStyle: Fix detection of item view delegate line edits.
The old code tried to check the 2nd parent for inheritance from
QAbstractItemView. This also triggers for line edits on a QDialog parented
on the item view. Introduce convenience function that checks for
top levels in the chain.

Task-number: QTBUG-37504

Change-Id: I932f8efdb4764e9b1eea84c802bf7e8718338e1d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-03-14 22:40:36 +01:00
Andrew Knight
9ceeaaac79 WinRT: Add debug message handler for winrtrunner
By placing debug messages in shared memory, the application can share
debug messages with winrtrunner (or any utility which passes -qdevel
to the app and opens the corresponding shared memory area).

Task-number: QTBUG-37308
Change-Id: Id0e04cfd5f0f701d552a448f780788c7cbf9b438
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-14 22:40:32 +01:00
Richard Moe Gustavsen
60f0a97edd iOS: fix build failure __IPHONE_NA not defined
__IPHONE_NA was previously defined to 9999, but with
iPhoneOS7.1.sdk it is now undefined. From Availability.h:
"__IPHONE_NA is not defined to a value but is uses as a
token by macros to indicate that the API is unavailable"

This causes Qt to evaluate QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE
to true when given __IPHONE_NA as argument. And then the
build will fail.

Change-Id: I11f1d0285329d90c633c00c0c4d446ef5cd8089b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-03-14 22:40:28 +01:00
Andrew Knight
42afaa992a d3dcompiler_qt: Remove control file semantics
This simplifies the compiler control semantics by always using the
packaged compiler if it is available. With no packaged compiler, the
service is assumed to be running if the directory structure is present.
Use of a packaged library can be overridden by setting the environment
variable QT_D3DCOMPILER_DISABLE_DLL to 1.

When the runtime compiler is used, the source will no longer be
logged, and the compilation output will no longer be cached.

Change-Id: Ib07f517e7043d7785bdfa9da55abd34df518eeed
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-14 22:40:24 +01:00
Samuel Gaist
bcfc68f9cd Use Uniform Type Identifiers to detect OS X bundles
Following Apple's documentation, the first step to identify a
bundle is to check if it has a known extension. Currently, it's
done using string comparisons ored in an if statement. The list
is not complete and new types, whether provided by a system update
or other means, can't be detected.

The new approach is to use Uniform Type Identifier which queries
the OS directly to check whether the extension conforms to
kUTTypeBundle. That includes e.g. applications, frameworks etc.

Task-number: QTBUG-31884
Change-Id: Ief73a83904adf27ccb71b0070e67cba081d1fd4a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-14 22:40:19 +01:00
Laszlo Agocs
6b56b2ddb2 Disable QtOpenGL in dynamicgl builds
Migrating this is out of scope for the time being.

Change-Id: Iac4a98d8db8e132a6ffa28075548fe2af76637fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-14 22:40:15 +01:00
Laszlo Agocs
f1f603bd0b Fix dynamic opengl build
Some ifdefs were slightly incorrect.

Change-Id: I5ffb162becb040c91ed56f36c6126c59f67c367a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-14 22:40:11 +01:00
Alejandro Exojo
d7eb0a632a Fix one bogus print to stderr: use toLocal8Bit()
Change-Id: I86341ccbd0251a9c858a5e1a9b7ea291d73cda01
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-14 22:40:07 +01:00
Dmitry Shachnev
d5dcd6d166 Add AArch64 support to qfilesystemwatcher_inotify.cpp
Based on a patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>,
licensed under CC0 (aka Public Domain) or BSD license.

Change-Id: I60815d6893c7a9d2873864ff626b865881ec5ee9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-14 22:40:02 +01:00
Fabian Bumberger
02abe7921b QNX: Fix touch position
Change-Id: I8e4f83f58fbb31f7cffdf74b0ce431a6fd46f13b
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-14 22:39:54 +01:00
Bernd Weimer
2aee54c738 BlackBerry: Add button color to dark palette
Change-Id: I35191841e4d606042375ab8af442a339d6a701dd
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-03-14 22:39:51 +01:00
Paul Olav Tvete
80d4a19f51 Android: Use proper empty strings in key events
A key event with no unicode would get a text of "\0" instead of
the empty string. This would lead to various widgets interpreting
the Key_Back event as text input, meaning that it would be grabbed
by the widget instead of being propagated.

Task-number: QTBUG-35784
Change-Id: Ibdb0e491572e41dd1aaf3b03ae1a780731f0559a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-14 22:39:48 +01:00
Paul Olav Tvete
1567699c0e Handle key release events correctly
Properly ignore key events that we don't actually handle.

Task-number: QTBUG-35784
Change-Id: Ibd3e72c76367a1dc3b1f2d39538fcf8441082ff2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-14 22:39:44 +01:00
Paul Olav Tvete
08ba111719 Don't block Key_Back in file dialog
Update the 10 year old FIXME hack to allow Key_Back (which will
close the dialog on Android). Also clean up nearby code that has
been dead for seven years.

Task-number: QTBUG-35784
Change-Id: I609858afb2caefe7025e421406288ae56717fea5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-14 22:39:39 +01:00
Jorgen Lind
fde6450b59 Add workaround for bug in the Mesa glsl optimizer
Change-Id: I23251f5288b41f5b7f86406984fdd854127797a9
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-14 22:39:15 +01:00
Gabriel de Dietrich
9cd2dac348 Vista Style: More menu item pixel fixes for QtQuick Controls
Includes a one-pixel fix for widgets, where the menu item text
would be one pixel too far away from the vertical gutter.

Task-number: QTBUG-37451
Change-Id: I2539233814a427c5bed66a5c07584717eb3df418
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-03-14 22:39:12 +01:00
James McDonnell
ff7f3aba39 Complete support for no-fullscreen parameter
Change the code so that it doesn't force application windows to full
screen when the no-fullscreen parameter is used in the QT_QPA_PLATFORM
environment variable.

Task-number: QTBUG-37456
Change-Id: If9612cc2ca69f829d45e7fd4b83338c3a41cf986
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-03-14 22:39:09 +01:00
Gatis Paeglis
530f985651 [XCB] Fix crash in QML drag-and-drop
Use QPointer to make sure that we are not trying to destroy already
deleted object.

Task-number: QTBUG-35702

Change-Id: Ib746996787488e636f25e6ea5be0571607ee2ded
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-14 22:39:05 +01:00
Frederik Gladhorn
df757e30f8 Fix compilation with QNATIVESOCKETENGINE_DEBUG enabled
Change-Id: Ie60b70aaa1fe11de613ba99427be00e307b6769d
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-14 22:38:59 +01:00
Marcel Krems
b14e4eb5f0 Add missing \since 5.0 to QProcess::{program,arguments}.
Change-Id: Ie2ce1860e1c63c0955b0a2bee7f8b33c91b9f628
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-03-14 18:26:12 +01:00
Marcel Krems
2954d51579 Add compiler name for Clang in QLibraryInfo::build()
Change-Id: I88490f01edc00f5d3c9570fa630915a11c843311
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-14 18:26:03 +01:00
Gatis Paeglis
ecb7fd9ff7 [XCB] Fix drag-and-drop segfault
QXcbDrag inherits QBasicDrag which takes care of calling
updateAction() when needed, we don't need to call it explicitly.

Task-number: QTBUG-33057

Change-Id: I754408f74f56de36ace8ffa40a61bd7c64619899
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-03-14 18:24:59 +01:00
Risto Avila
0a24d653b6 Fix Direct2D clipping when Qt::WA_OpaquePaintEvent is true
Changed clip rectangle handling from bounding rect to region. Now also
sub region rectangles are taken in to account.

Task-number: QTBUG-37199
Change-Id: I9e09376e2c6d3fee8f85db753295a6138a03096f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-03-14 18:24:12 +01:00
Morten Johan Sørvig
d9c34e9cdd Repaint widgets on screen change.
Add a screenChanged handler slot to QWidgetWindow,
which calls markDirty() on the backing store with
the BufferInvalid and UpdateNow flags set.

Update CocoaBackingStore to create a new buffer on
window devicePixelRatio change. Use the
QCocoaWindow::devicePixelRatio() implementation instead
of a duplicate implementation in the backing store.

The plan is to replace this implementation with one
based on QUpdateWindowRequestEvent for Qt 5.4

Change-Id: I8e521c53df4ac90815613e730fe821996334721f
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-14 18:23:25 +01:00
Rolf Eike Beer
6d858a0fdb XCB plugin: query screen resources without _current
xcb_randr_get_screen_resources() and xcb_randr_get_screen_resources_current()
do basically the same, but for one case: if nothing has queried these
information ever before. So if an application is the very first client ever
to connect to an X server it may just return nothing. A call to
xcb_randr_get_screen_info_reply() will then cause the X server to allocate the
needed information and send an update notification, resulting in a second
QXcbScreen being created, but the other one is still around and probably used.

The behavior I observed with a simple test application was that the application
was not visible on the screen when it was the first client ever on the X
server. Killing the application and starting it again made it work just fine.

Change-Id: Id64f267e8ebcfa5b39d21d98307170a09e5169df
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-03-14 18:23:06 +01:00
Friedemann Kleint
cbf5aa625d Windows: Change defaultNameFilterDisables() to return false.
As was done in Qt 4, where QFileDialog sets NameFilterDisables() to true
for Q_WS_MAC only.

Task-number: QTBUG-37302

Change-Id: I162f9e79762aa4fa68aba02d1bdfc6322d472a9d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-03-14 18:22:16 +01:00
Alejandro Exojo
6d05f5faff Make QtCriticalMsg exit on QT_FATAL_CRITICALS
Change-Id: I92e8f9851dd074f3bcded6981f5545d1e93b549f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-14 18:20:21 +01:00
Peter Hartmann
2e49b7a3b9 BB select(): move special select method to qcore_unix_p.h
... and make it independent of QProcess, because we want to use it
from QtNetwork as well.
In addition, move select_msecs() to qcore_unix_p.h as well and rename
it to qt_select_msecs().

Task-number: QTBUG-36144

Change-Id: Ief681b6f6c80e85aa5091a5a04bcedb60f353217
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-14 18:20:09 +01:00
Konstantin Ritt
a7e58bf253 Build bundled HarfBuzz-NG outside QtGui
Being a part of QtGui, HarfBuzz-NG breaks build with -Werror.
Instead of disabling a particular warnings-as-errors,
build a prefixed static library and make it a link-time dependency.

Change-Id: Id0be1f0e0034092d50f83cd364d5c65940fee869
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-14 18:18:26 +01:00
Konstantin Ritt
4dcf40b308 Make bundled HarfBuzz-NG not depend on Qt
Change-Id: Id2a0e4ae4cf2b4a6c95985b3b31c846aac92f992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-14 18:18:13 +01:00
Laszlo Agocs
ace3b97d4c Fix deprecated setOption() usage in GLX integration
The correct function is setOptions().

Change-Id: Ife9ff75c409c843b4871804fcfd06b9d2a7733d3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-03-14 18:17:29 +01:00
Michal Klocek
72fe9f1d0d Fix a crash of accessing deleted paintengine
When painting to QPixmap with QBlitterPaintEngine and dfb
PaintEngine have PaintDevice (pdev) as QImage. Painter code
uses PaintDevice::paintEngine() to refer to paintEngine.
This will became dangling pointer since QDirectFbBlitter::doLock()
will delete QImage. Instead return QPixmap as PaintDevice.

Change-Id: Idfac919b6438a82b412020e441e0a102e4a2a052
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-14 18:13:34 +01:00
J-P Nurmi
45f264b682 QGtkStyle: remove file dialog functionality
GTK+ 2.x file dialogs are now implemented in QGtk2PlatformTheme

Change-Id: I2babd6a35e7abd606ec5d047abbefbe3f0fbb892
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-03-14 15:27:47 +01:00
Gabriel de Dietrich
48e6352d4c Cocoa: Fix crash when closing window from title bar
Some mouse event may result in the window being deleted
so we need to take extra precaution when calling the super
class' 'sendEvent:' method.

Task-number: QTBUG-37287
Change-Id: Idf89ea177c78053bcdef52c54a197409e20bf38e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-14 15:27:41 +01:00
Shawn Rutledge
8bbc1eaeb6 docs: QApplication::startDragDistance default value is 10
This comes from QPlatformTheme::defaultThemeHint().

Change-Id: I12a9add3af65e819a06b66d958acb8f21cfe0e13
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-14 15:27:38 +01:00
Bernd Weimer
563342d7ef BlackBerry: Improve platform specific documentation
Updated BlackBerry specific documentation around QSettings to make the
differences more obvious for developers.

Change-Id: Ib9acc2409379a836713f1a7e9d6189585a35aa61
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Erin Rahnenfuehrer <erahnenfuehrer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-03-14 15:27:34 +01:00
Bernd Weimer
a2a954da00 QNX: Fix screen event handling
Return code was misinterpreted.

Change-Id: I917db0879384a4997ff154ab25e56fbada55c0e4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-03-14 15:27:29 +01:00
Andrew Knight
d38786deba WinRT: Separate backing store initialization to be more robust
If the GL context cannot be made current in the backing store's
constructor, the framebuffer resources won't be allocated. Fix this
by creating an initialization routine that can be called again if it
fails.

The issue was revealed by the GUI Analog Clock demo, which creates the
backing store before the window has a native handle.

Task-number: QTBUG-36008
Change-Id: I875f8183eff60908fc2b46f441bb553b42ff500d
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-14 15:27:24 +01:00
Joerg Bornemann
04a632c88a fix namespaced WinRT build
Change-Id: I613a737600f85ef90155e3b8647197b4fd092998
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-14 15:27:12 +01:00
Joerg Bornemann
c6bb371b4b fix warning
Change-Id: I7afedbf679ae1c8467eea749e79eb10f2516d039
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-03-14 15:27:07 +01:00
David Fries
e6cb06a835 correct send vs sent grammar
Correct the tense of send vs sent in comments and documentation.

Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-14 15:27:03 +01:00
Kai Koehne
961b24eed2 Don't show evaluation popup for unsupported evaluation
Do not show the popup for unsupported evaluations on every launch of a
QWidget based application. This is causing problems e.g. for applications
that are run by Qt Creator in the background, like qmlpuppet.

Instead, we'll show a similar dialog on Qt Creator startup.

Change-Id: I6b44c24865ed6992a70f8a9dd0bcd08a4744cb28
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-14 15:26:59 +01:00
Morten Johan Sørvig
1bd56022a5 Cancel NSURLConnections before releasing them.
Task-number: QTBUG-37042

Change-Id: I7ddcbc315b4b720e7da7880fc00731c28beb4bb2
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-03-14 15:26:53 +01:00
Janne Anttila
afcaaea4c6 Implement QStandardPaths::GenericConfigLocation for WinRT.
Same logic for locaton used as in other Windows variants.

Change-Id: I5f71710d28ea1338748c9bd41d48bba15e674baa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-14 15:26:45 +01:00
Samuel Gaist
0300f56133 Make android non-prefix shadow build usable
Until now android developer build was not usable due to missing files.
These files are only available after a make install.
This patch aims to add that copy phase when building.

Task-number: QTBUG-36901
Change-Id: If0a7e982899b8c18495c7cb6508184fa153b239d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-14 15:26:37 +01:00
Alejandro Exojo
0541f65efa Fix docs: QT_FATAL_WARNINGS acts when not empty
Change-Id: If68b98459eab3186e2f3d44f087b753d2c57b79d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-14 15:26:32 +01:00
Topi Reinio
c026912e84 Doc: Fix issue in QThread example code
Added a missing reference operator to make the code example
compile.

Task-number: QTBUG-37359
Change-Id: Ie52f65ab3b325daf1ee3b368131e54c8a17f92ef
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-03-14 15:26:25 +01:00