Commit Graph

12972 Commits

Author SHA1 Message Date
J-P Nurmi
07fef5f3ff QFusionStyle: support transient scrollbars
QFusionStyle doesn't make scrollbars transient by default,
but the feature can be enabled with a proxy style:

class MyProxyStyle : public QProxyStyle
{
public:
    int styleHint(StyleHint sh, const QStyleOption *opt = 0,
                  const QWidget *w = 0, QStyleHintReturn *ret = 0) const
    {
        if (sh == QStyle::SH_ScrollBar_Transient)
            return 1;
        return QProxyStyle::styleHint(sh, opt, w, ret);
    }
};

Change-Id: Ibf169e219ad920cbe7edb06e128e09ed4d8faf96
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-03-20 16:55:23 +01:00
Mitch Curtis
9ad768fd19 QPushButton: draw label using the stylesheet's font.
The RenderRule for the stylesheet has the correct font information, it
just wasn't being set on the painter that draws the label.

Task-number: QTBUG-8990

Change-Id: I7cbaffc570421db04ebf3254cb6a21a68f7b868b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-03-20 16:47:22 +01:00
Mitch Curtis
ff0e7df477 Stop omitted enum value from showing up in Qt namespace doc.
The following omitted enum description can be seen at [1]:

"Ensures that the longest variant is always used when computing the
size of a multi-variant string. (Internal)"

This is because \omitvalue does not allow a description (whereas
\value does).

The description was moved to the qnamespace.h as a code comment.

[1] http://qt-project.org/doc/qt-5/qt.html#TextFlag-enum

Change-Id: I7983613bffa90f3071a4e2d678696391048c8757
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-03-20 14:13:29 +01:00
J-P Nurmi
5bcb87babf QApplication: fix scroll phase handling for wheel events
Set scroll phase correctly for propagated wheel events, and do not
let Qt::ScrollBegin/End steal focus when using Qt::WheelFocus policy.

Change-Id: Ia38b64059d96a228c3b83c9b455db6e30dfb9a46
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-20 14:12:51 +01:00
Laszlo Agocs
3e3d06d705 Docs: Correct OpenGL ES naming
Not sure where "OpenGL/ES" is coming from but there is no such thing.
The correct name is OpenGL ES.

Change-Id: If071ee5bd928fea1a2f1aebc11155344df1efe2d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-20 14:11:38 +01:00
Laszlo Agocs
8adca56674 Resurrect advanced bindTexture() features in QtOpenGL
During the Qt 4 -> 5 migration the setting of the extension flags
in QOpenGLFunctions/Extensions suffered a regression: flags like
GenerateMipmap were never set. This led to the unfortunate sitation
that features that were tied to these flags, like compressed texture
support or mipmap generation, got disabled.

This is now corrected by checking for the extensions like Qt 4 did.

Task-number: QTBUG-37588
Change-Id: I4a7beb1b435af11e05f5304aa04df2ec63b34c18
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-20 14:11:33 +01:00
Andrew Knight
33cac84df3 ANGLE D3D11: Fix internal index buffer for level 9 hardware
Some level 9 hardware does not support 32-bit indices, and in most
places this is already checked. It would appear that most phone
hardware actually does support 32-bit indices, and so this bug wasn't
caught until testing on the Surface RT. This is not surprising, as some
level 9 resources are only a minimum for the hardware spec, not the
true limit of the device/driver.

This patch provides the general fix to use 16-bit indices on such
hardware, but a whitelist of known good GPUs should be added to enable
32-bit indices where available.

Change-Id: I282ede5dd4a323037ade6c44b7cfac2c6445b491
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2014-03-20 13:59:33 +01:00
Kai Koehne
503d761c08 Print when logging rule is invalid.
Print a warning when an invalid logging rule is parsed.

Change-Id: I3bf9a6df4053d36b3803652b2faa86168d5222bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-20 13:45:35 +01:00
Friedemann Kleint
baa3d329ac Fix crash if SSL_get0_next_proto_negotiated() cannot be resolved.
Crash occurs after warnings like:

QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated

Task-number: QTBUG-37515
Task-number: QTBUG-33208

Change-Id: I18b803e4709b9d5f6b33717c2ac43179676351a4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-20 13:15:14 +01:00
Maurice Kalinowski
d7eb3d1280 Fix creating directory hierarchy for WinRT
mkpath was not working consistently on WinRT. The reason is that
createDirectory() starts from C:/ which is outside the sandbox and an
illegal access error has been returned.

In case the chunk is still inside the "known" writable area, we continue
to the next chunk. Known writable is derived from QStandardPaths. All
but Temp are children of the DataLocation on WinRT.

Task-number: QTBUG-35472
Change-Id: I3b4ab390bd321285da51d02f5eeaf06da4d56298
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-03-20 13:10:49 +01:00
Morten Johan Sørvig
a791943490 Cocoa: Follow-up m_sendUpAsRightButton for DnD
Clear and test for the correct button according to
the m_sendUpAsRightButton flag.

(Fixes the warning mentioned QTBUG-35804)

Task-number: QTBUG-35804
Change-Id: I5d724d1cfa66b88b8f54e228bd7fb73a04a9f4c9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-20 12:53:01 +01:00
Morten Johan Sørvig
91d0ba8ff4 Cococa: Make QMacNativeWidget work again.
The NSWindow releasing code in recreateWindow() has
regressed to not handle the m_contentViewIsToBeEmbedded
case.

Release the NSWindow directly instead of calling
recreateWindow()

Change-Id: Ibc6d10faf4c6dae42e02c400b16f28a1d28eb192
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-20 12:52:44 +01:00
Morten Johan Sørvig
ecd70c038a Cocoa: call SetFrontProcess on raise()
This will raise the window in front of windows from
other processes as well. Following Qt 4, only do this
for top-level windows.

Task-number: QTBUG-29087
Change-Id: Iae1b9c2928a627501112f97728198ed6dd614b2d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-20 12:52:36 +01:00
Frederik Gladhorn
04e8c5d5e8 Accessibility Mac: Implement most TextEdit functions
With this patch reading QTextEdit line by line works with VoiceOver.

Task-number: QTBUG-37204

Change-Id: Id9d7c4294254aaa8fe51ee8b612bfbb43348b777
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-20 12:49:57 +01:00
Frederik Gladhorn
d9697df4e0 Accessibility Mac: Implement setting focus
[ChangeLog][QtGui][Accessibility] Allow assistive apps such as VoiceOver
to set the focus on widgets and controls.

Change-Id: I657bf7d827c5e5293cfd628dbb6b8f0592a84f24
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-20 12:49:48 +01:00
Frederik Gladhorn
b8c96f2eb9 Accessibility: Improve QTextEdit
EditableTextInterface was implemented but not reported to the
accessibility bridges.
Newlines in QTextEdit when using QCursor::selectedText are returned as
unicode paragraphs, replace them by newlines.

[ChangeLog][QtWidgets][Accessibility] Fixed QTextEdit not reporting
newlines to accessibility frameworks and add editable text interface.

Change-Id: Iac21e70f5468a16f8abf242ae148290dbab3f8e4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-03-20 12:49:33 +01:00
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
Frederik Gladhorn
263f97f963 Fix Mac Bearer when machine has no wifi
This manifested itself for some continuous integration machine, all
regular macs have wireless. In case there is no wifi, we would never
emit updateCompleted().

Change-Id: I1c5b0da6e1d73fef2588beb1796207326d430e26
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2014-03-14 15:26:16 +01:00
Tor Arne Vestbø
fbaa6d3ca6 Don't populate font families using localized family names on OS X/iOS
The font database and QFont should have normalized font family names,
so using CTFontDescriptorCopyLocalizedAttribute is not a good idea.

If the feature of reporting the localized name of a font family or
style is needed in for example the font selection dropdown or dialog,
it should be exposed as an explicit property of the font.

Change-Id: Iaa15ad861043f4c78a38080608b6fe4d99efee18
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-03-13 13:28:16 +01:00
Tor Arne Vestbø
b3ac505e21 Fix a few build warnings on iOS due to unused functions
Change-Id: If345a4137986a7d5032a2b48d92c08bc58e02144
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-03-13 13:28:03 +01:00
Tor Arne Vestbø
8bc026ddcc Ensure that QGuiApplication is inited before using QFontDatabase
Change-Id: I494c4fdfa49139316efac0f68f8d463c02056372
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-03-13 13:27:55 +01:00
Paul Olav Tvete
daff5656e2 QQuickWidget: fix crash on exit
Make sure that the correct context is current when freeing GL resources.
Otherwise, on shutdown, QOpenGLVertexArrayObject would try to use the
previously current context, which mmay already have been deleted.

Task-number: QTBUG-37385
Change-Id: Ib2332f54636738a1a4b1041a7dcbffd0af00261d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-13 13:27:36 +01:00
Paul Olav Tvete
afbad00a4d QQuickWidget move/resize fix
Make sure the alphamask in the backingstore is updated whenever the
geometry of a QQuickWidget/QOpenGLWidget child changes.

Task-number: QTBUG-37372
Change-Id: I70e94664bd7da774694645f604e1a7277fe563c7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
2014-03-13 13:27:29 +01:00
Kai Koehne
ef43967fcd Logging: Let user configure rules via QT_LOGGING_RULES
Check also for rules set in an environment variable QT_LOGGING_RULES.
This makes it even more convenient to set rules e.g. for just one run of an
application, without having to create a logging configuration file. It
is also more in place with the current way we enable/disable debugging
of parts of Qt via environment variables.

Change-Id: I4d05976f2b6c12bca472552ffa22345475cd01de
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
2014-03-13 13:26:51 +01:00
Kai Koehne
490298e939 Optionally print from where logging rules are loaded
Tell the user from where logging configurations are loaded from if
the QT_LOGGING_DEBUG environment variable is set. This allows 'debugging'
of the logging rules database, because it's very simple to e.g. silence
all debug messages by adding a logging configuration file somewhere, and
forget about it.

Change-Id: Iee34031d531462060b5603e2210e01fd40952c63
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:38 +01:00
Kai Koehne
19693362e7 Use QStringRef for parsing of logging rules
Use QStringRef to speed up the parsing of the left side of logging rules.

Change-Id: Idd4d75496e3865d092f2802c45928a414c14c615
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:36 +01:00
Kai Koehne
2350c7e35c Make parsing of categories in logging rules more strict
Do not accept rules with wildcards in the middle.

Change-Id: If6fa71629c46bc4127aa8bd475643bc0e8a9f57c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:26 +01:00
Kai Koehne
b3871dc804 Make parsing of categories in logging rules consistent.
The documentation says that the left side of a logging rule has the syntax

<category>[.<type>]

with optional wildcard '*' as the first or the last character (or at
both positions.

However, so far we didn't allow

qt.*.debug

But what we did allow is implicit dropping of trailing '.', e.g.

qt.* matched also 'qt'

Fix these by splitting up the '.type' in advance, and then do string
matching only on the 'real' category names.

Change-Id: Iab50ad0fc673464e870f5ab8dfb3245d829b3107
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:14 +01:00
Kai Koehne
f6d0c67d30 QDebug: Allow text stream formatting for 64 bit numbers
Use the QTextStream stream operator for formatting 64 bit numbers,
just like we do for other numbers, too. This ensures all numbers in
a QDebug stream e.g. respect the hex and showbase modifiers.

The original reason for formatting qin64, quint64 with QString::number
is unclear (pre-dates the original qt4 git import). Maybe QTextStream
did lack proper support for 64 bit numbers back then.

Task-number: QTBUG-36841
Change-Id: I049516c2a8394c9c1a708f86c3d950418a20a957
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-13 13:26:02 +01:00
Kurt Pattyn
1f4cda9a70 Replace Note: with \note in documentation
Change-Id: I213ac1fb2733e675f3641441fe6c621bab06c1f0
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-03-13 13:25:58 +01:00
Tor Arne Vestbø
c466f2ed46 Remove need to populate font database on OS X to get fallback families
Populating the whole database takes a while, and it's very easy to trigger
the fallback family code path through eg. matching or getting the default
font family from QFont.

Instead of relying on populate to resolve family name to a PostScript name
(which was required when using CTFontCreateWithName), we instead use the
CTFontDescriptorCreateWithAttributes() function to create a descriptor
based on the family name, and then use CTFontCreateWithFontDescriptor().

The other way around, we use CTFontDescriptorCreateWithNameAndSize, and
then pull out the family name from the descriptor. The need for creating
a CTFont for private fonts (eg '.Apple Symbols Fallback') does not seem
necessary anymore, as tested on 10.7-10.9.

The disadvantage of creating font descriptors instead of re-using the
data computed by population is that we're doing the same work twice,
but the end result is making the font database more lazy, and the 80%
use-case is assumed to be that you're only interested in the fallback
of a small number of fonts, which means you don't want to populate all
of the fonts in the system (taking about 1100ms on the test system).
Looking up the fallback of a single family or style now takes about
15-25ms.

Task-number: QTBUG-37165
Change-Id: I6b904dbe796a3f236919d778d0168fdef9a20e69
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-03-11 03:39:39 +01:00
Konstantin Ritt
800232e1d3 Fix custom font substitution list support
During the QPA refactoring, the custom font substitution list support
was lost by ignoring the font request's fallbackFamilies member
when the multi font engine gets created/initialized.
If fallbackFamilies is not empty, it should be prepended to the
font database default fallback families list. Also respect the
custom fallback families list in the cache key to avoid picking
a multi font engine with wrong fallbacks list.

Task-number: QTBUG-36628

Change-Id: Ie2b84b3a397bee4816f421cddf76a5375829f13a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-11 03:39:34 +01:00
Konstantin Ritt
c3b2425791 Guarantee QPFDB::fontEngine() always return non-multi font engine
After QPA refactoring, QWindowsFontDatabase::fontEngine() was returning
a multi font engine w/o any particular reason.
This makes the code more obvious and opens the road to further improvements.

Change-Id: I4858026ddf774d3159c89357b1c905f5112b1c51
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-11 03:39:26 +01:00
Laszlo Agocs
4b3d11efc0 Add EGL_KHR_create_context support
[ChangeLog] GLES3 and desktop OpenGL are now fully supported with EGL

Task-number: QTBUG-37332
Change-Id: Ic695db573d90b3a204941d105a370f5c63182b63
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-10 21:04:49 +01:00
Laszlo Agocs
08b9e51c47 egl: Choose GLES3 capable configs when needed
Passing OpenGLES and majorVersion 3 in a QSurfaceFormat selects GLES3 in case
it is supported. This works fine already now, but is not safe since the config
choosing logic does not request a GLES3-capable configuration and so it may
end up with a non-GLES3 compatible one.

This is now corrected by passing the EGL_OPENGL_ES3_BIT_KHR bit when
EGL_KHR_create_context is available.

Change-Id: Iacee1e1819b944c0f7c1062666106abddf59272b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-10 21:04:37 +01:00
Laszlo Agocs
a4f421d431 egl: Update the OpenGL version in the context's QSurfaceFormat
The GLX and WGL support code does this already. Do it for EGL too since
requesting OpenGLES with majorVersion 3 results in GLES3 (where supported)
and in this case the expected majorVersion in QOpenGLContext::format() is 3.

Change-Id: I73d61d7569e6ebaa91aef57fb1b0051a77a73355
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-10 21:04:28 +01:00
Laszlo Agocs
5aaec48000 Remove unused parameter from QEGLPlatformContext constructor
The API is chosen via QSurfaceFormat, the constructor argument is ignored.
Remove this historical artifact.

Change-Id: I4a5c1e12cb297de22f239ad0a6747c1c36168eed
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-10 21:04:16 +01:00
Bernd Weimer
4084e7dc19 QNX: Change the way one requests child windows
The use of Qt::Dialog as a way to signal that a parentless window be created
as a child proved problematic as some applications use dialogs as their sole
window.

Instead, rely on the existence of a dynamic property called 'qnxWindowGroup'.
If found, the window will be created as a child window and that window group
will be joined.

Also added the ability to set the id string window property via another
dynamic property 'qnxWindowId'. While strictly related to the original
issue, one typically needs the ability to set the window id if one
is joining a group.

Added extensive documentation on the mysterious rules of the QNX QPA as
regards windows, at least covering the areas affected by this patch.

This patch was originally implemented by Roger McLean.

Change-Id: I0ef88d654b794ddcb54d4c4d9804bef750da5a33
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-10 20:56:31 +01:00
Konstantin Ritt
b7f013bf19 Fix CJK languages support with HarfBuzz-NG
By some reason, mapping to Han script doesn't work for some (most?)
fonts. Until the issue is really fixed, pretend the HB-old behavior
and simply map to Common script.

Change-Id: I4c146f5ff2a42f64b971b2f5ebd7f65e2513fdf0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-10 20:28:52 +01:00
Alex Blasche
4c9885a0f5 Revert some previously added constexpr in QVector?d classes
This commit partly reverts cd91d8ad02.

The revert is required as the used ifdef relied on undefined
compiler behavior. Especially Windows has had trouble. The revert reduces
the risk of breaks by future compilers.

The proper inline and constexpr has to wait until Qt 6.

Task-number: QTBUG-37122
Change-Id: I881fffb95fa46d9c170c9420a578f15640e18aea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-10 16:04:28 +01:00
Nico Vertriest
267eab3f39 Doc: correction link, example and parameter issues qtbase
Moved codecs folder to qtbase/examples
Corrected quote in dropsite.qdoc
Replaced snippet statement by include statement
Added doc for undocumented parameters

Task-number: QTBUG-34749

Change-Id: If4de95b8d39e5680fd0f63f8d2b6685a4b0a8052
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-03-10 16:02:19 +01:00
Laszlo Agocs
1e8de50674 Avoid using direct OpenGL calls in gui and widgets
Change-Id: I5d88a2e204ca23e178a4e3044b9cb13392c3e763
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-10 15:10:37 +01:00
Konstantin Ritt
11eb9d37dc Use QStringIterator instead of homebrew
Task-number: QTBUG-15664

Change-Id: I1ed3eb04ddd822e57a4d993af656dfe283f3af1a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-10 15:05:01 +01:00
Eskil Abrahamsen Blomfeldt
ca280bfe3b Android: Support double click event
It's impossible to get the distance between two touch events
down to 5 pixels on e.g. my Nexus 5.

This patch makes it possible to tweak the distance through
the platform theme, and sets the distance to 15% of an inch
on Android. Also provides a way to override the default minimum
of 5 pixels by using an environment variable.

[ChangeLog][Android] Fixed double click events

Task-number: QTBUG-36974
Change-Id: I23d94020c531747d6638b645133611614a2a0703
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-03-10 09:56:13 +01:00
Topi Reinio
d87ddcf56f qdoc: Improve navigation bar for example files
For example file pages, added a link to the parent example page
into the navigation bar.

Also,
    - Removed protectEnc() calls for strings added as Text atoms,
      this is done automatically when generating the navigation
      bar output, and doing it twice results in malformed output.

    - Removed the subtitle from being appended to example file
      title. The subtitle contains the full path of the file and
      it's already displayed on the page body, so removing it
      from the html title + navigation bar makes for a cleaner
      look without losing any information.

Task-number: QTBUG-33022
Change-Id: I3ca942470453379e22f1a4aaec1d9b866d85bb5c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-03-09 12:12:55 +01:00
Konstantin Ritt
cfb4581fee QFontEngineQPA: Get rid of unused externalCMap
It seems to be a leftover after dropping the QPF1 font engine.

Change-Id: If8d3e1447fab9d042a85195d7bdb4d9811c37c6e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-08 14:01:17 +01:00
Konstantin Ritt
94d0f7c3d3 Make QFontEngineQPA report the TT 'cmap' table support
The QPF2 CMap is identical to the TrueType CMap table format.

Change-Id: I8c34d7c6a5942375538f3b8cb71d5a808b4fb400
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-08 14:01:14 +01:00
Fabian Bumberger
3f6a554d21 QNX: Do not create default platform theme
If the theme name is not recognized we should not create a QPlatformTheme, but rather return 0.
If no platform theme can be created on creation of the QGuiApplication,a default QPlatformTheme
will be created automatically.

Change-Id: I685fa352c87d74c225c7f91c10cb84fb5128a3f6
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-08 11:45:43 +01:00
Fabian Bumberger
79469565cf Fix description of how themes are created (code comments)
Change-Id: I3b8ed0af5208687a9ab75e916b477f5e24b4d1e2
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-08 11:45:39 +01:00
Fabian Bumberger
43af92be45 BlackBerry: Choose the appropriate file dialog type
This chooses the appropriate file dialog type based on the nameFilters that were set.

Change-Id: I0c674eacbaebf862ce4359e744271c0d6382c216
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-08 11:45:29 +01:00
Fabian Bumberger
7591abbe04 BlackBerry: Repair the file picker
The interface for invoking the file dialog has been changed. Instead of a Json object we now
passing a pps object to the invoke target.

Change-Id: I3c5bc8f0e1af1a84d4afb6bc1923f23db2b43d5e
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-08 11:45:06 +01:00
Alex Blasche
d42b8a22ff Make QVector* compile on Win/static
Task-number: QTBUG-37122
Change-Id: Ib2283e8c27da7af2bdc08eee3b7cc542fbe55d71
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-08 11:44:46 +01:00
Martin Gräßlin
2f63d04ff1 Export rootWindow to the QXcbNativeInterface
This change exports the root window to the native interface as there
is QX11Info::appRootWindow which so far goes over the QDesktopWidget
to get the window id of the root window. Which is a rather hackish way
considering that the root window is known to the QXcbConnection.

But even more it's a very fragile way and can result in crashes on
startup of applications if the application accesses the appRootWindow
too early.

Change-Id: Ibb09a7fa714cb355f579298fc6df33bf80f73f58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-03-08 08:18:24 +01:00
Thiago Macieira
51f7ef800e Make Q_NULLPTR be NULL on C++98
Some compilers actually have a C++11-like null pointer constant in C++98
mode:

$ gcc -dM -E -include stddef.h -xc++ /dev/null | grep NULL
#define NULL __null
$ icc -dM -E -include stddef.h -xc++ /dev/null | grep NULL
#define NULL __null
$ clang -dM -E -include stddef.h -xc++ /dev/null | grep NULL
#define NULL __null

Change-Id: Ie0bcaf36fed6ad27e761a0a24332817129128571
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-03-08 00:21:53 +01:00
Thiago Macieira
d1e2235553 Revert the QByteArrayList addition to Qt 5.3
This reverts commits f12b0f9a38
("QByteArrayList: optimize op+"),
f96f2fe367 ("Enable QByteArrayList
tests"), and 4f23f0530a ("new
QByteArrayList class").

This class is coming back in Qt 5.4.

[ChangeLog][CHANGELOG FIX] Remove the line about QByteArrayList being
added.

Change-Id: I890ab2b34a9b3e575512eb306d0f241143a867cf
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-08 00:21:53 +01:00
Konstantin Ritt
7ef5a8528e Improve code readability
Since we were requesting a multi font engine, the returned font engine
must be a multi one or nothing at all.

Change-Id: I1ee4e1b7c68f54c83a8c7292082d015ebfa0a8cb
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-03-08 00:21:53 +01:00
Paul Olav Tvete
8fdd11465c Destroy backingstore before window
The window is created before the backingstore, so the destruction should
happen in the reverse order. Also, the backingstore is created based on
a pointer to a QWindow, so the dependency is from backingstore to window.
Thirdly, this fixes a crash when using QQuickWidget/QOpenGLWidget.

Task-number: QTBUG-37045
Change-Id: I6e782c553fddfeef877be30ca2610aff75a425a0
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-08 00:21:53 +01:00
Samuel Gaist
be81c58845 Add Objective-C specific type converters to QByteArray
This patch adds the Objective-C NSData/CDataRef converters to
QByteArray

This will replace the current converters offered in QMacExtras

[ChangeLog][QtCore][Objective-C] Added NSData/CDataRef converters for
QByteArray

Change-Id: I7a0f14bee4271798db345f3c5efd26ac671a3ea4
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-08 00:21:53 +01:00
Joerg Bornemann
f15d9e6ccd do not use fileno calls in forked child
This fixes an issue that causes QProcess::start to silently fail on
OS X 10.9. Apparently, fileno(stdout) locks the handle on OS X 10.9.
It may happen that the parent process fflush()s stdout while the child
has just been forked. The stdout lock of the parent is never released
in the child and fileno(stdout) therefore locks forever.

According to the fork documentation on opengroup.org one may only call
async-signal-safe functions between fork and exec in the child. The
fileno() function does not appear in the list of async-signal-safe
functions. Also, fileno(stdout) and friends can be easily replaced by
the standard constants STDOUT_FILENO etc.

Done-with: Fawzi Mohamed <fawzi.mohamed@digia.com>
Task-number: QTBUG-37306

Change-Id: I2b1f5f47cc48a1ad020fb0493a955d2bc27aeb47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from b2216bbe06)
2014-03-07 23:53:13 +01:00
Andrew Knight
7625c51ef4 Windows Phone: Handle back-button press
When the back button is pressed, send an immediate key event to the
topmost window (or the application if there is no window). If it is
accepted, mark the native event as accepted and send a key release event.
This way, the application may call accept() on the KeyPress event for
Qt::Key_Back in order to create backstepping behaviors within the app.

This is in line with Android, which quits the app when the event is
ignored. On Windows Phone, the default behavior occurs when the event is
ignored, which is to back out of the application and leave it running
in the background.

Task-number: QTBUG-35951
Change-Id: I46d15478f441f73d3660370370689b2f9fa11f25
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-07 22:27:25 +01:00
Andrew Knight
3a1c223a0a WinRT: Handle window exposure when visibility changes
Expose events should be sent to application windows when the main view
becomes visible (again). This fixes a blank screen which may occur when
resuming an app from suspend.

Change-Id: I33dc00482ef17cdc954a71626a8ad3cd24361a64
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-07 22:27:22 +01:00
Laszlo Agocs
4c9d767f6e Avoid asserting with QQuickWidget on Windows
Change-Id: I8b4185a9725b27b3e3e0e049e3a001ed61bcf1d5
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-03-07 17:13:35 +01:00
Laszlo Agocs
ed5e75cf5b Clarify QOpenGLContext::format() docs
Avoid unrealistic expectations where applications would assume that
requestedFormat() == format().

Change-Id: I12dcfda3d86ce26f1cae9771b1fe2203291864db
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-03-07 17:13:28 +01:00
Laszlo Agocs
9152a3bf20 Clarify QWindow::format() docs
Change-Id: I35c5f9e7a235afc75c0051b3958875371f182b29
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-03-07 17:13:24 +01:00
Gatis Paeglis
e9ce4fcffa Remove usage of QT_NO_SHAPE
First of all QT_NO_SHAPE was never set in configure script, which
means that !contains(DEFINES, QT_NO_SHAPE):LIBS += -lxcb-shape always
was true and we were linking to -lxcb-shape no matter what.

Secondly, we are providing shape.c in qtbase/src/3rdparty/xcb/libxcb, so
users always have an -qt-xcb option available to get this extension.

Change-Id: I7d14a0ac5ca6e36fb9c053225916cae41028b532
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-07 11:11:47 +01:00
Fabian Bumberger
f0257cc1fd Blackberry: Change name from QQnxTheme to QBlackberryTheme
Change-Id: Ia30a18c988986f8c20bc4e4475c5e24b06493035
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-07 10:19:34 +01:00
Fabian Bumberger
63608e4e32 BlackBerry: Implement the dark palette
This patch only implements the dark palette and returns it by default.

Change-Id: Ieab39c2d5c8f35b9479719b78843b13355c5f123
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-03-07 10:19:26 +01:00
Richard Moe Gustavsen
b1bdeba086 iOS: implement clipboard
This will implement support for copy/paste operations
inside, and between, applications.

Change-Id: I50031b89bdb07f106950dc90fb8b1accbd1191bb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-03-06 20:48:59 +01:00
Richard Moe Gustavsen
3e89183c67 qmacmime: bugfix unicode::canConvert
The UnicodeText converter is a bit special since it can convert
to both utf8 and utf16 for text/plain. But since flavorFor("text/plain")
can only return one UTI, it returns utf16. And this means that
canConvert will return false if given utf8 as argument.
On iOS this is often the only format available on the pasteboard, which
means that pasting text from another app app will fail.

This patch will ensure that it returns true for both utf8 and
utf16.

Change-Id: I31697f1815c19113393a8ef48f2ead4d7f1078ec
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-03-06 20:48:59 +01:00
Richard Moe Gustavsen
15c9fb4013 Cocoa/Platformsupport: move qmacmime from cocoa to platformsupport
Share qmacmime with iOS

Change-Id: Ied1b6ed74f2d63ef34d818554827a6165651b6a1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-03-06 20:48:59 +01:00
Richard Moe Gustavsen
6de7a96405 Cocoa: remove old carbon code from qmacmime
Prepare qmacmime to be moved to platform support by
removing unused includes and function declarations and
other dependencies on carbon or cocoa.

Also remove unneeded QCFString convertions, and use
UTI strings directly (fetched from apple docs) rather
than querying the system.

Change-Id: I8f622664c13f3fd05862720c3658cfc1b59baf28
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-06 20:48:59 +01:00
Richard Moe Gustavsen
35ca2b85af Cocoa: remove qmacmime includes where not needed
Change-Id: Id20df8b80f3064ac0d193124fb790a075a89e53c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-06 20:48:59 +01:00
Richard Moe Gustavsen
73adb78926 Cocoa: create QCocoaMimeTypes for Cocoa-only mime-types
Prepare to move qmacmime out of the cocoa port and into
QPlatformSupport for sharing with iOS. This patch will
start by moving tiff out, since it depends too much on
old carbon image manipulation code that will not compile
on iOS (depends on ApplicationServices etc).

Change-Id: Id7a9b919c8f51fa9beb2f4ee2f13cca96894f6a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-03-06 20:48:59 +01:00
Joerg Bornemann
b2216bbe06 do not use fileno calls in forked child
This fixes an issue that causes QProcess::start to silently fail on
OS X 10.9. Apparently, fileno(stdout) locks the handle on OS X 10.9.
It may happen that the parent process fflush()s stdout while the child
has just been forked. The stdout lock of the parent is never released
in the child and fileno(stdout) therefore locks forever.

According to the fork documentation on opengroup.org one may only call
async-signal-safe functions between fork and exec in the child. The
fileno() function does not appear in the list of async-signal-safe
functions. Also, fileno(stdout) and friends can be easily replaced by
the standard constants STDOUT_FILENO etc.

Done-with: Fawzi Mohamed <fawzi.mohamed@digia.com>
Task-number: QTBUG-37306

Change-Id: I2b1f5f47cc48a1ad020fb0493a955d2bc27aeb47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-03-06 19:05:47 +01:00
Laszlo Agocs
8302d8b5aa Make QGLFunctions wrap QOpenGLFunctions
Remove the duplicated implementation.

When moving to support also dynamic GL builds, having a standalone
QGLFunctions is not feasible anymore since the changes made to
QOpenGLFunctions will not be backported to QGLFunctions.

Change-Id: Iaf742e496d3c92d6d915baee93283180259e27a6
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-06 19:05:47 +01:00
Andrew Knight
f116778aed WinRT: Use native wait methods instead of std::thread's sleep_for
sleep_for appears to be unreliable (resulting in infinite waits) when
used in a thread which is also using native waiting methods. This is
also a step in the direction of eliminating std::thread's usage in WinRT.

Change-Id: I58bc4bf9ada25de247849333ef925964676b7239
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-03-06 17:22:55 +01:00
Paul Olav Tvete
cc278a4a78 Window change notification QQuickWidget
QQuickWidget and QOpenGLWidget needs to know when the window changes so
it can use the correct GL context.

Task-number: QTBUG-37045
Change-Id: Ib98b18e721908017398518f73226cb3731886927
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-06 17:22:55 +01:00
Rolf Eike Beer
9ba7cc07db Tslib plugin: also apply missing release coordinate code to non-raw mode
Even if the normal mode is used the release events may have zero coordinates.

Change-Id: I2eac8cf50dfcf9e62d8cec2423419a6579266849
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-06 17:22:55 +01:00
Paul Olav Tvete
82288308ec Doc fix
QOpenGLContext::destroy() is private. The recommended way to free
resources temporarily is simply to delete the context.

Change-Id: I0d59b55afb209d56405f3584e4645bd4718790af
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-03-06 17:22:55 +01:00
Frederik Gladhorn
275dcd61d3 Fix cursor blink time in Windows
In Qt 4 there is a factor of 2 in qapplication_win.cpp,
this got lost, so all our cursors were blinking twice as
fast.

Task-number: QTBUG-37200

Change-Id: I11ce61c51279d9ceb8bc9ba01c1bb9640a31ade8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-06 17:22:55 +01:00
Tor Arne Vestbø
1d6de20e0b Re-enable drag-and-drop on iOS after bugfixes to QBasicDrag and friends
Change-Id: I0fd4e5e8d561826841cc78b26cd524ba01a8b689
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-06 17:22:55 +01:00
Gatis Paeglis
e8fb9a3c7c Update bundled libxcb-xkb version to 1.10
To utilize the new xkb_x11_* API from libxkbcommon 0.4.0, we need to update
the bundled libxcb-xkb version to 1.10, which is the minimal required version.

Change-Id: I0b72a2684bd11cbe5ae65d6dab7292be3a76464c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-06 17:22:55 +01:00
Laszlo Agocs
b0d7e7b282 Avoid polluting debug output in eglfs and linuxfb
Size hints will not be implemented. Grabs maybe some day but the
warnings should be silenced for now.

Change-Id: I1f4861454d45e668c4d758c7f82940cd1136d0c8
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-06 17:22:55 +01:00
Laszlo Agocs
77024a62fe Unify default dpi between eglfs and linuxfb
Task-number: QTBUG-37251
Change-Id: I4ab8e645441f6ad3a122304e1ead050b48fafbac
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-06 17:22:55 +01:00
Allan Sandfeld Jensen
cd652500af Add optimize_full qmake config option
This patch adds a new config option to qmake to enable full optimization
where it makes sense. This currently is supported on all gcc like
compilers by exchanging -O2 for -O3.

In qtbase it is used to enable full optimizations on qtcore and qtgui
and in a later patch can be used to replace similar existing logic in
QtWebKit's WTF and JavaScriptCore modules.

This fixes a performance regression from gcc 4.7 to 4.8 in the software
renderer.

An aliasing error in qregion.cpp which was exposed by more aggresive
optimization has been solved as well.

Change-Id: Ic2c6c41b79cb3846212b40e7bcc11ff492beb27f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-06 12:21:14 +01:00
Allan Sandfeld Jensen
2df1a6c4c9 Cleanup SPDY stream closing
We should not accept or process messages on closed streams, and unless
we are in a half-closed state (having initiated close ourselves), we
should respond to FIN with a FIN of our own.

This patch means we no longer trigger all the corner case teardown on
common sites that were fixed in earlier patches.

Change-Id: I0d2bab62700a0022a959e66c7053afbad07a9f7e
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-03-06 12:21:14 +01:00
Gatis Paeglis
1664458f63 Improve xkb config root detection
Relevant part from libxkbcommon's configure.ac file:

xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config`
if test "x$xkb_base" = x; then
xkb_base=$datadir/X11/xkb
fi
AC_ARG_WITH([xkb_config_root],
[AS_HELP_STRING([--with-xkb-config-root=<path>],
[Set default XKB config root (default: xkeyboard-config install path)])],
[XKBCONFIGROOT="$withval"],
[XKBCONFIGROOT="$xkb_base"])
AC_SUBST([XKBCONFIGROOT])

This patch implements an equivalent logic in Qt's configure script (with some
additions).

Change-Id: I25968f76021e120e2439d2756121bbe3c5e18c98
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-03-06 12:21:14 +01:00
Gatis Paeglis
9580f3484d Append additional compose file search paths
On FreeBSD Compose files are stored in different place than on Linux
distributions, this patch adds new search paths.

Change-Id: Ic1e745801a2f9a53d1af058be8a1dfaced5032a7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-03-06 12:21:14 +01:00
Laszlo Agocs
1f802afc49 Clean up proxy leftovers in gui/opengl
Change-Id: I24d10dab121c23b0683fa99bd309cf557c3ddffb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-06 12:21:14 +01:00
Oswald Buddenhagen
19501b0731 Fix win32 mkspecs
Instead of checking for dynamicgl in QT_CONFIG, which is apparently
not possible, revert them and do it in opengl.prf instead.

Dynamic GL is Windows-only for the time being so this should be sufficient.

Change-Id: If293ea4c9b024df52257086c8b6250602a44724d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-06 12:21:14 +01:00
Albert Astals Cid
af113cfc0f Use None instead of GLX_NONE
GLX_NONE is not 0, so it doesn't work as end-of-list marker
The documentation explicitly mentions to use None or NULL

Fixes valgrind warning

==22686== Conditional jump or move depends on uninitialised value(s)
==22686==    at 0x78949AF: glXCreatePbuffer (glx_pbuffer.c:709)
==22686==    by 0xDD7F0E1: QGLXPbuffer::QGLXPbuffer(QOffscreenSurface*) (qglxintegration.cpp:515)
==22686==    by 0xDD624B0: QXcbIntegration::createPlatformOffscreenSurface(QOffscreenSurface*) const (qxcbintegration.cpp:259)
==22686==    by 0x4F1D6A2: QOffscreenSurface::create() (in /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.2.1)
==22686==    by 0xDD80248: QGLXContext::queryDummyContext() (qglxintegration.cpp:454)
==22686==    by 0xDD803F0: QGLXContext::supportsThreading() (qglxintegration.cpp:488)
==22686==    by 0x5BD9927: QSGRenderLoop::instance() (in /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.2.1)
==22686==    by 0x5BF969E: QQuickWindowPrivate::init(QQuickWindow*) (in /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.2.1)
==22686==    by 0x5C97BFC: QQuickView::QQuickView(QWindow*) (in /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.2.1)
==22686==    by 0x40636F: startShell(int, char const**, void*) (main.cpp:91)
==22686==    by 0x407125: main (main.cpp:193)

Change-Id: Ib4f5ae50f7e31d3fbeb5acf67753e1d8b9e434b0
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-06 12:21:14 +01:00
Jędrzej Nowacki
bc361899f2 Remove unused and unlinked qdocconf file from src/plugins.
Change-Id: Ie6fd3f9fe7d5bbbe948dd3d38d2be835fd92834d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-03-06 12:21:14 +01:00
Jędrzej Nowacki
742e0fb560 QDoc: Do not warn about a file overwritting while writing to /dev/null
Change-Id: I7d23edf5a73d521bad361f1007be0750acd4c1e9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-03-06 12:21:14 +01:00
Laszlo Agocs
efbea58665 Make QOpenGLFunctions able to resolve everything
At least if the platform plugin's QPlatformOpenGLContext implementation
supports it.

This completes the QOpenGLFunction changes necessary for dynamic loading
of the OpenGL implementation. Everything else is up to the platform plugin.

Change-Id: I710e6fbee3005360ecf02bc6ef976e1beb513819
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-06 12:21:14 +01:00
Laszlo Agocs
e9ebb43419 Dynamic GL: Query gl handle and type via the native interface
Change-Id: I7ca5beaeb57ee2e4e9c175f53ac32371d1f6b5ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-03-06 12:21:14 +01:00
Shawn Rutledge
2bac49265e Tablet target widget isn't always the same as its widget window
In this scenario there is a widget with a QPushButton inside, and you
click the pushbutton with the tablet.  The target of the event is the
pushbutton, but when you click it, the window is destroyed.  The
widgetwindow destructor cannot check the pushbutton's window() because
it has already been destroyed.  So it seems we have to store both
widgets: the actual target and the parent widget which has the window.

Task-number: QTBUG-36848
Change-Id: I37d8fb03743f3e501d695342edc42de104777b18
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-06 12:21:14 +01:00
Sze Howe Koh
b83dc929ec Complete QJsonValue::fromVariant()
- QVariant can store (U)Int, (U)LongLong, Float and Double numbers.
  Previously, QJsonValue::fromVariant() converted Floats into Strings
  while converting the others to Doubles.
- Add unit tests for QJsonValue::fromVariant()

[ChangeLog][QtCore][JSON] QJsonValue::fromVariant() will now convert
single-precision Floats into Doubles instead of Strings

Change-Id: I457adbe29c37ada611d1c6d711c42866d63d4024
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-06 12:21:14 +01:00
Thiago Macieira
0aba7fbb58 Always initialize integer types in D-Bus demarshalling
If you tried to demarshall in a write-only QDBusArgument, the class
would print a warning, but will continue running nonetheless. So instead
just initialize everything, despite the warning.

qdbusargument.cpp:1138:30: error: ‘d’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
qdbusargument.cpp:1165:33: error: ‘s’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
qdbusargument.cpp:1301:15: error: ‘y’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
etc.

Change-Id: I6d713b4a7b7639e31f3b39bb488ad3ed3ab3fa4a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-03-06 12:21:14 +01:00
Samuel Gaist
736d7a26cd Avoid creating a new QMimeData each time the Android clipboard is used
This patch aims to fix a memory leak that occurs when the platform
clipboard is used on Android. The QMimeData from the clipboard is
recreated each time mimeData is called

[ChangeLog][QtCore][QPA/Android] Fixed a memory leak in the clipboard

Task-number: QTBUG-36025
Change-Id: I241f586589ff256885caee5e5f737313d24d942d
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-03-06 06:09:57 +01:00
BogDan Vatra
c5b2425e8e Fix compile
Move Q_Q(QGLContext); inside #ifndef block, otherwise q varialble
remains unused and it breaks the compilation.

Change-Id: Iebef9a45930fd4f7783eb983b55bf6b5e0b94cf4
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-03-06 06:09:17 +01:00
BogDan Vatra
1f695a31e2 Pass the APPLICATION_PARAMETERS variable if defined.
Change-Id: I2a3c049db43bbd0a2c373dae9e9ac1395c099b74
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-03-06 06:08:58 +01:00