Commit Graph

22865 Commits

Author SHA1 Message Date
Konstantin Ritt
0a27532890 Introduce icu_dependency.pri
Simply to hide the magic bahind the scenes.

Change-Id: I69a159eb14712e68117f10e78745bdfbad46b6f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-20 18:12:04 +00:00
Laszlo Agocs
975260503a Add a note about not requesting a profile
As per spec not requesting a profile on 3.2+ is same as requesting
core since the profile mask defaults to core.

Change-Id: I5d03ac08bcba20c273c1c32a51f6a105eba0629f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-03-20 14:06:28 +00:00
Laszlo Agocs
20870dad20 Add OpenGL 4.5 to contextinfo example
Change-Id: I6f6c5b55769fd818aaf94580246952a574124c0d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-03-20 14:06:22 +00:00
Laszlo Agocs
7715ce9fab Disable usage of glTexStorage on Mali ES 3.0
Even though immutable storage is available and the glTexStorage2D seems to succeed,
the subsequent glTexSubImage2D calls always fail with GL_INVALID_OPERATION.

Falling back to mutable storage works just fine.

This makes QOpenGLTexture and examples like qtbase's textures functional on Mali T628
(tested with Odroid XU-3).

Task-number: QTBUG-45106
Change-Id: If1b4fe6673ba924cfa7cfd7af7d4f0bc3b6a0fe8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-03-20 14:06:15 +00:00
Andy Shaw
ba287c55ef Sort the entries in QDir by using the QDateTime::msecsTo()
By using the QDateTime::msecsTo to do the sorting it means that if
there is support for a precise time on the file system then this
ensures it sorts correctly.

Change-Id: I00528596908bba7b586aeffe5b0aa81019ff5722
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-20 13:51:40 +00:00
Andy Shaw
b6c14bca65 MySQL: Fix test so it expects the right integer type
Change-Id: Idd90d7881c6458fac7602bf02dad0f794d3b98c9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-20 13:51:34 +00:00
Andy Shaw
392d861790 MySQL: Keep the precision of the field when formatting the value
Change-Id: I4ab08be5112167a617d6d1d109754f2404a9605f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-20 13:51:29 +00:00
Konstantin Ritt
a2ebd502d4 [QWindowsFontDatabase] Move code around to improve readability
Keep DirectWrite initialization code in a single place and
fallback to GDI implementation if DirectWrite initialization has failed.

Change-Id: I2da185dbc073c58a7ba47bae09957ecac877d712
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-20 13:44:43 +00:00
Konstantin Ritt
4d54fe8d02 Simplify QWindowsFontDatabase::createEngine()
Reduce code duplication and improve readability.

Change-Id: Idf53c80077daa9bac03a72acfd2b6c7e3a24ad97
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-20 13:44:14 +00:00
Konstantin Ritt
af1a99ebb9 An attempt to fix font stretching with DirectFrite font engine
Do the `lf.lfWidth = tm.tmAveCharWidth * request.stretch / 100` trick
for the DirectWrite path, too.

Task-number: QTBUG-22652
Change-Id: I5238bce1033555a4386cb48fed8c898a9632e0cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-20 13:43:43 +00:00
Konstantin Ritt
cd75f29794 Only get font metrics if we're going to use them
Change-Id: If6b635e54f705c1e28b4e092a318d825a408ccfb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-20 13:43:33 +00:00
Konstantin Ritt
840a26a9b9 Do not re-create font if it is not of TMPF_TRUETYPE
For !ttf and stretch==100 case, it was:
hfont = CreateFontIndirect(&lf);
TEXTMETRIC tm = ..;
if (!ttf) {
    DeleteObject(hfont);
    lf.lfWidth = tm.tmAveCharWidth;
    hfont = CreateFontIndirect(&lf);
}
Unless there is some special behavior for non-TrueType fonts I don't
know about, it looks to me like a 100% waste.

Change-Id: I864340e50591ba1d8006d1a80f36f6f06f2734b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-20 13:43:26 +00:00
Konstantin Ritt
202a3deec7 [QFontEngineFT] Get rid of redundant lockFace()/unlockFace() calls
loadGlyphFor() locks the face when needed.

Change-Id: Ia02dce08243499f9f11b345dcdfa5d9e0a3bc889
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-20 13:43:08 +00:00
Konstantin Ritt
7cd1c0e420 [QFontEngineFT] Fix memory leaks and possible double deletions
The glyph returned by loadGlyph() must be freed manually when caching
is not enabled, except when it is a placeholder for a missing glyph.
This is a fix-up for d18ccbb5be.

Task-number: QTBUG-32792
Task-number: QTBUG-44812
Change-Id: I410fa1b7703e306739d9dae35fff06af6c79dce0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-20 13:43:05 +00:00
Konstantin Ritt
7ff3a7d3a3 Apply Qt-specific changes to the bundled FreeType
Enable TT_CONFIG_OPTION_SUBPIXEL_HINTING instead of deprecated
TT_CONFIG_OPTION_UNPATENTED_HINTING to improve hinted rendering.

Change-Id: I63efae235a2abb1a9f4bbba5fec900670e1ffe9a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-20 13:42:38 +00:00
Konstantin Ritt
2eaf0cf8fd Update bundled FreeType to 2.5.5
Removed everything, imported with help of import_from_tarball.sh script,
and then added a pre-generated builds/unix/ftconfig.h

Task-number: QTBUG-44648
Change-Id: Iea948e41f7761f1580382b3763d04c7a61383382
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-20 13:42:29 +00:00
BogDan Vatra
77c518a503 Android: Use nullptr instead of Q_NULLPTR
Android QPA is built only for Android using Android toolchains which we
know for sure that it supports C++11/14. Actually C++11 is enabled by
default on Android, so there is no need to use more a macro instead of
the real thing.

Change-Id: I14a720f08320b2e4557f4f1c859454ced19340a6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-20 13:16:53 +00:00
Paul Olav Tvete
08f268ba22 Proper screen change handling for devicePixelRatio
We need to make sure that we know which screen we are on, and use the
correct devicePixelRatio, depending on the screen.

Task-number: QTBUG-45076
Change-Id: Ic56ad4ca8a807d584ce4938b64905ce4dd10f7aa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-20 13:00:08 +00:00
Friedemann Kleint
d425563bac Windows: Activate popup when there is no active window.
Port af7d2b2127dadbdf828c60c75255bb1b4f591651 and
9ffdfa58b3ad2ed4100a7d223a85399b72c6deb7 for QTBUG-7386 from
Qt 4.

Task-number: QTBUG-44928
Task-number: QTBUG-7386
Change-Id: I119b75349ff30b19f56ecad7fdecf898ac0797d6
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-03-20 12:27:30 +00:00
Friedemann Kleint
3e503b197d Diaglib: Add gesture events to event filter.
Task-number: QTBUG-45134
Task-number: QTBUG-45120
Change-Id: I9b2420ec302dfff173fbc8e3173d6ef0fcf095e0
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-03-20 12:27:21 +00:00
Friedemann Kleint
09a06c7171 Windows: Fix touch registration.
IsTouchWindow() returns false for windows that have
not yet been registered for touch and the code bailed out.
Fix the check so that registration is only suppressed when the
flags match.

Change-Id: Ia1e88553d2fd8f9acc4e3b9c5f4af6cdbe93b3f6
Task-number: QTBUG-45134
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-03-20 12:27:09 +00:00
Sergei Kulik
97edc8ede2 Fixed compilation on Mac OS X (qt namespace and preprocessor issues))
Configured with -qtnamespace <...> -no-opengl -D QT_NO_PRINTER

Change-Id: I1c959a89afda08d29a854f21e6e51732d136753c
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-03-20 07:05:03 +00:00
Morten Johan Sørvig
282ba9a180 Whitespace cleanup
Change-Id: Iedb3a43d9208687ac43d0ecb532357257a3b72e2
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-03-19 16:47:00 +00:00
Morten Johan Sørvig
bc1796ff5c Fix high-dpi scaledContents QLabel
Scale to device pixel size.

Change-Id: I9da089f1a3cafdc7f31f57cca504249b00508192
Task-number: QTBUG-42503
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-19 16:46:42 +00:00
Kai Koehne
e7b257c39b Doc: Fix QVector constructor documentation
Change-Id: Ib16df599553e482e981573afadf3c3f4e70ed5b1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-03-19 07:27:22 +00:00
Tor Arne Vestbø
4e48a8b457 iOS: Base size of menu picker toolbar on the picker size itself
This fixes the tiny font in the UIToolbar above the UIPickerView.

Change-Id: Idc6681cd5b527c15cf5331d04ff3785304146b56
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-03-19 05:51:50 +00:00
Laszlo Agocs
ba9ac942f0 Add missing null check when detaching a QImage
copy() may result in a failing malloc and thus return a QImage with a
null d. Hence the need for a null check before incrementing detach_no.

Task-number: QTBUG-41657
Change-Id: I868c37ef355fceaa1e2fc5f8a472e3dcc84dcadd
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-18 14:25:13 +00:00
Laszlo Agocs
42f9fd5f07 Do not build glx integration with -no-opengl
Task-number: QTBUG-44998
Change-Id: I57c18cd3621a59297d3f91026903628ea6187a5f
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-18 14:25:09 +00:00
Richard Moe Gustavsen
53a9ff2a45 iOS: only use image picker dialog as native dialog for loading files
The user cannot use the image picker dialog for selecting file names
for saving. So ensure we fall back to use the normal file dialog
when that is the case.

Change-Id: Ic73571d34d87c47c68b75dfe0bad1810ad91aa57
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-18 14:01:21 +00:00
Andy Nichols
32e6a4a976 EGLFS: Make Mali GPU backend more generic
This provides both build and runtime fixes to make the Mali GPU backend
able to be used in more places.

The Mali backend was always trying to resize the frambuffer driver to
twice the default height.  In the case of the Mali T628 in the ODROID
XU3 it is an error to set the virtual height of the framebuffer device
to anything greater than the physical height.

Change-Id: I25a64e411f44d2aeb1cb4376183d9ea547c10161
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-18 13:43:49 +00:00
Andy Nichols
ce239fb2b4 Add device mkspec for Odroid-XU3
Change-Id: I87cd84b5bc1f6819692b5ef505558d948f3739e4
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-18 13:43:44 +00:00
Laszlo Agocs
e7bd18f156 Fix EGL config - X visual matching for i.MX6
Task-number: QTBUG-44290
Change-Id: I06cbb169803aa8a06ea310651def1f3582194c8e
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-18 13:40:52 +00:00
Marko Kangas
ce97f37bff Fix tst_largefile QCOMPARE value types
Added casting to QT_OFF_T type. Otherwise fails on some
compilers.

Change-Id: I4f1f0c558af7d182a4babf38a7f048b27b3db611
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-18 13:35:40 +00:00
Shawn Rutledge
e32c015803 improve QTouchEvent::TouchPoint qDebug operator
Include pressure, startPos and lastPos.

Change-Id: Ib08b52e25bc2c298b712becf858c87d16fd7a7ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-18 13:29:39 +00:00
Tor Arne Vestbø
64475cc678 iOS: Leave it up to QIOSTextInputResponder to decide when to reconfigure
We need to store the IM state as part of the QIOSTextInputResponder, so
that the text responder can decide at a later point if it can still be
the text responder for the current (possibly changed) focus object.

Change-Id: I4ec861c5479238edf6a0fc101fa8241958af2d32
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-03-18 13:07:34 +00:00
Lars Knoll
0411240fda Make sure remove() doesn't corrupt the json object
When using non latin keys, remove() could cause corruption
of the json object.

Task-number: QTBUG-42270
Change-Id: I7305e57ebb78630a9bf68bc4f831a6d1646abb79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-18 07:34:59 +00:00
Lars Knoll
124da60c1d Fix support for iso8859-16 when compiling with ICU
ICU doesn't support iso8859-16, so we need to fall back to
the Qt codec for this encoding.

Task-number: QTBUG-45053
Change-Id: I9754cf098c906fe8a75363a3d090029543cd0e35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-18 07:34:55 +00:00
Lars Knoll
ba8c34aaf3 Fix QCollator::compare documentation
We don't guarantee -1, 0 and 1, but simply negative 0 or
positive numbers. This is in line with e.g. QString::compare()

Task-number: QTBUG-42860
Change-Id: I6009b2eb732ae3b4726cec06ec0eacc2c46a3c93
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-18 07:34:26 +00:00
Lars Knoll
75cb6f59f1 Add QJsonValueRef::toVariant()
to better mirror the API of QJsonValue

Task-number: QTBUG-43686
Change-Id: I83edecf5226d44980a8a442a512a13ab9b2ac6a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-18 07:34:21 +00:00
Olivier Goffart
7c77013c7f Fix source incompatibility while connecting signals with forward declared arguments
QObject::connect tries to determine if the arguments are registered
metatypes. This used to work even for arguments that were forward
declared. But now, the metatype system tries to call
QtPrivate::IsQEnumHelper<T>::Value to know if it is registered.
That fails on gcc if T is forward declared.

Apparently gcc needs to know the full type of T to pass it in the
ellipsis function, even within a sizeof expression.

So change the ellipsis expression to a template one.

Task-number: QTBUG-44496
Change-Id: I7fa07bd3cde470b134c2ec53b0d581333d16a6f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-18 07:33:19 +00:00
Olivier Goffart
59c4024171 QDebug operator for Q_FLAG when the QFlags itself is registered
Currently, IsQEnumHelper<T> returns true also if QFlags<T> is registered
as a Q_FLAG. But this is going to be changed in the next commit.
For the QDebug operator to continue to work even when the QFlags<T> is
registered and not the T, we need to take it into account in the
QEnableIf condition

Change-Id: If1fcffd133aa20ba95a07e2bfaaa308896ab01b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-18 07:31:39 +00:00
Shawn Rutledge
ebdf991660 xcb: create a screen if dimensions are known but outputs are not
This partially reverts 51ada7734a
because it's necessary to keep some scenarios with vnc and
remote X servers working.  When an application is starting,
if we don't find the xrandr outputs but we know the dimensions
of the screen, we should still be able to put windows onto that
screen; but when we already had known xrandr outputs and then they
were removed, that's the case where we want to stop rendering
(and have no screen instances) until the screen(s) are reattached.

Task-number: QTBUG-31389
Task-number: QTBUG-40174
Task-number: QTBUG-42985
Change-Id: I13d0996ba6ece78c4ebcd2c3a59f1617c1c7f0fa
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-17 15:37:45 +00:00
Filipe Azevedo
fcabeb2e47 QCocoaDrag: Fix text, url and image preview pixmap while dragging.
OSX was missing text, url and image preview while dragging causing the
drag operation to show a small dashed box around the mouse cursor.

Task-number: QTBUG-33824
Change-Id: I8d0acd0d6a48b7cb29ad2faba8b9ecb9cdf2a5ab
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-17 10:20:30 +00:00
Thiago Macieira
699e7a0869 Remove the tests for Ubuntu Oneiric (11.10)
This system is no longer in the CI rotation and we haven't had reports
of the same issues happening on later versions. Either the issues have
since been fixed or they were never an issue in Qt in the first place.

This commit has the additional benefit of getting rid of the following
shell error when qmake was run:
	sh: line 0: [: =: unary operator expected
as /etc/lsb-release hasn't contained DISTRIB_CODENAME for some time and
proper quoting was never implemented (not even qtcpsocket.pro).

Change-Id: Ia0aac2f09e9245339951ffff13c829e910ee64e9
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-17 01:26:13 +00:00
Thiago Macieira
4cdff7a0ea QtWidgets: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.

Change-Id: Ia0aac2f09e9245339951ffff13c94684f8498f21
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-03-17 01:26:00 +00:00
Thiago Macieira
4da46bbb9a forkfd: dynamically detect whether the Darwin waitid is broken
The Darwin kernel that came with Mac OS X 10.7 has a broken
implementation of waitid when passed a P_ALL first argument. It does
tell us that there is a process that can be wait()ed, but does not fill
in the siginfo_t structure.

See commit 9931fa9df4 for more
information.

Change-Id: Iee8cbc07c4434ce9b560ffff13cafa4c88cdabd6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-16 19:28:13 +00:00
Andy Shaw
bb5d287cc3 Windows: Don't cause a malloc before calling GetLastError()
When creating a string it would cause a malloc which would reset
GetLastError() so we need to ensure that GetLastError() is the first thing
it calls if a Windows API call fails.

Task-number: QTBUG-27765
Change-Id: I5cc4ce59aa1f03a0ec978fe54949a7931a225d52
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-16 18:13:24 +00:00
Richard Moe Gustavsen
60ac5957d3 iOS: stop listening for keyboard visibility after QIOSMenu::dismiss()
We used to stop listening for keyboard visibility when quipickerview
was deallocated. The problem with that approach is that we don't
have a guarantee for when dealloc gets called. So what can happen
is that we get a call from Qt to dismiss the menu. That causes us
to close the keyboard, which will trigger the notification, which
will call dismiss recursively. This will hit our assert checking
if we have a valid picker view.

This patch will unsubscribe to the notification explicitly upon a
call to dismiss, to avoid recursive dismiss calls.

Change-Id: If1efa3438037e00a02bc186fdcb6c0b3d3d595e4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-16 15:38:37 +00:00
Tor Arne Vestbø
8fe016158f iOS: Skip tests that don't make sense or don't work on the platform
Change-Id: Id6777bdf430ad8a8e3b432caf5000bea8f7860b6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-16 14:25:27 +00:00
Tor Arne Vestbø
9a7564edee iOS: Prefer debug-simulator as default test target
Change-Id: I765670e8ebc3881a55767a408121743ff29f0e59
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-16 14:18:32 +00:00