Commit Graph

23126 Commits

Author SHA1 Message Date
BogDan Vatra
5cb72486ba Android: Early spring QPA cleanup
- Move m_eglDisplay to private section
- needsBasicRenderloopWorkaround is needed only locally so, make it a
static function
- remove unused member variables.

Change-Id: I3e845301ec66a322621c7d9e6fac257320a40f77
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-23 07:38:33 +00:00
Caroline Chao
05e073deeb QDoubleSpinBox: Set back an upper limit width
The limit has been removed in the change
a317ee0a6f.

Task-number: QTBUG-44865
Change-Id: I7106f7e7a2653e1ab03d79861ac505d4666598eb
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2015-03-23 07:22:17 +00:00
Konstantin Ritt
f2ec2fcd55 Update bundled HarfBuzz to 0.9.40
Change-Id: I88c3608c3f15e39e89a00cfc23c184aebe7097e4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-23 07:12:53 +00:00
Konstantin Ritt
241ff426eb [locale database utility] Minor code deduplication
Change-Id: Ib6917940dfc410148d88e539cad2cdf7331a940d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-23 07:08:31 +00:00
Konstantin Ritt
9c97e5c40e [locale database utility] Optimize by caching the locale lookup chain
Change-Id: I1b95b3365337753ca0ab782091fa61870b77b051
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-23 07:08:28 +00:00
Konstantin Ritt
7ae4ffa0e0 [locale database utility] Fix inheritance chain
Locales with an explicit parent locale should not inherit
the language-default locale.
For example, a correct chain for zh_Hant_MO is:
  zh_Hant_MO -> zh_Hant_HK -> zh_Hant -> root
(two fixups: zh_Hant_HK and root, so that do not inherit zh)

Fortunately, this didn't do any difference in a generated data.

Change-Id: I92e09a95bd86f8723d8fe993f57d99af6f50db5e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-23 07:08:24 +00:00
Konstantin Ritt
31cd326bec Report a correct Unicode version used by Qt
The version bump was forgotten in edfce46a6c

Change-Id: I99501bb314baab68f037417db4b3b14e11f2de02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-23 07:02:25 +00:00
Konstantin Ritt
3cb2e0dd09 Clean-up tst_QChar
Since Qt 5.0, static overloads of QChar has a uint parameter only,
so there is no more ambiguity between uint<->ushort and thus some tests
does not make sense anymore; avoid explicit cast to uint for the others.

Change-Id: Ibc7a2ac4de63d3f023a8dbb5e53211ef8521579d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-23 07:01:27 +00:00
Thiago Macieira
17cfe1b35f Relicense forkfd under an MIT license
The difference between BSD and MIT is the need to reproduce the
copyright in the documentation and the non-endorsement by a particular
company (the name of which was stale in the forkfd code).

Change-Id: Iee8cbc07c4434ce9b560ffff13cd0174934935e9
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-03-23 06:16:21 +00:00
Lorn Potter
8c242fd65d Fix a crash in connman bearer backend on d'tor when using QStringLiteral
Task-number: QTBUG-41507
Change-Id: I7711eb34bf9ca738fb25031acff3371a6126ae23
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
2015-03-22 16:38:15 +00:00
Frank Reininghaus
f1e9076809 Fix problems with extended selection after changing the model contents
Storing the position of the first selected item in the view can lead to
wrong extended selections if the contents of the model change. Future
Shift-clicks will always use the previous position of the first selected
item, which may not be correct any more, to calculate the current
selection.

To fix this problem, a QPersistentModelIndex is used to keep track of
the first selected item.

A new unit test is added. Moreover, one function of the QTableView unit
test is changed such that it shows the view prior to performing the
test. Without this change, this test may fail. That the test, which
simulates mouse presses without showing the view, worked at all seems
to be a coincidence, as pointed out in QTBUG-18009.

Task-number: QTBUG-18009
Change-Id: I0d844fbd1a994c279a7c8ee5d9b5b9fccecd25bf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-22 14:38:07 +00:00
Paul Olav Tvete
d41368b4e9 Doc: warn about resize event bug
The resize event for QMdiSubWindow may occasionally have an invalid
oldSize(). This has been the case since 2007. Fixing this looks like a
high risk, low reward endeavour.

Task-number: QTBUG-32446
Change-Id: I80ce43987c7b6e346cd44f7ac4cef01b01e5472b
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-03-21 15:37:44 +00:00
Christoph Schleifenbaum
e6b97fd2c7 Cocoa: Don't let key events triggering input method events close dialog.
Added a flag to QCocoaWindow to ignore shouldCloseWindow. This is set
from within QNSView when escape is pressed and the current focus widgets
is processing input method events (like QTextEdit). This lead to
unwanted dialog rejects.

Task-number: QTBUG-44076
Change-Id: Ic90a8a6ba8c5cddbc0d486563acad57dd384d179
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-21 10:05:57 +00:00
Konstantin Ritt
aa2c5ba995 Stop doing s/HAVE_CONFIG_H/PCRE_HAVE_CONFIG_H/g in bundled PCRE sources
As we build PCRE outside of QtCore, there is no need to do that anymore.

Change-Id: Ib184966062f6afe7a449b860058e61e1ab2f7939
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-20 18:12:13 +00:00
Konstantin Ritt
b5e0e433cc Build bundled PCRE copy as qt_helper_lib
We already have an infrastructure for that.

Change-Id: I9110b74dcf7f93362586687da6f112e72cb663a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-20 18:12:09 +00:00
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
Eskil Abrahamsen Blomfeldt
c179fc710e Android: Fix compilation on armv5 with 4.9 toolchain
Thumb instructions trigger a compiler bug in e.g. Qt Script
when used with armv5 in the recent versions of the toolchain.
We already disabled this for the 4.8 toolchain, but the bug
is also present in 4.9, so we need to disable it there as
well.

Change-Id: I6cadc7efd2b59b9a2ffec038559edd0e7782a4b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-20 15:36:52 +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
Maurice Kalinowski
e6602a38e1 WinRT: Fix documentation for manifest capability description
0c7241cc contains the wrong identifier for device capabilities. This has
been updated in a previous commit, but documentation was not properly
updated.

Task-number: QTBUG-45098
Change-Id: I300a2ea19ebdf8a1aaed492a1bdf24b9af2bd60a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Andrew Knight <qt@panimo.net>
2015-03-20 10:35:43 +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
Eirik Aavitsland
d5c6335ff3 Fix rasterization errors in aliased cosmetic drawPolyLine
If a cosmetic polyline contained a 1-pixel segment, the next segment
would be drawn with wrong starting point.

The original fix for QTBUG-26156 had some unwanted side effects
(QTBUG-31579 and now QTBUG-42398). It tried to skip start-point update
if stroke() did not actually draw anything (because the segment was
too small). However, to determine that, it tested for a change in
lastPixel. But that was not failsafe; in some cases (1-pixel segment),
lastPixel could be unchanged even though the segment had been
drawn. With this change, we instead test directly whether stroke()
skipped the segment or not.

Task-number: QTBUG-42398
Change-Id: Id751db69a18cd1af4f45070db9d5698aa532d22a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-19 09:01:08 +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
Allan Sandfeld Jensen
90461979bc Avoid using the current frame as the previous in layout
When continuing a previous layout, we would in some cases add a wrong
margin because we would treat the current frame as preceding itself.

Task-number: QTBUG-42269
Change-Id: Idf00fadbed890ce34b073cf670cc9b8e1d4b0d5d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-18 22:55:47 +00:00
Jocelyn Turcotte
ee7fea3338 OSX Fix disapearing tray icon
It would happen together with an error:
    QPainter::begin: Paint device returned engine == 0
and would be caused by the size provided to QIcon::pixmap being empty,
itself caused by the availableSizes list being empty for the Selected
mode.

This bug was most often hidden by the fact that the Selected icon mode
was not triggered properly since we usually only set menuVisible after
calling updateIcon, and most of the time when it did, we would overwrite
it right after with a Normal mode icon.

Fix the issue by disabling the broken feature completely since the
default Selected icon is grayed out while tray icons are now usually
black (or white when selected). To support the dark menu bar mode on
10.10 we'll need to use NSImage's setTemplate anyway and that
knowing in advance if we can invert the colors ourselves would also
better solve the menuVisible usecase.

Task-number: QTBUG-42910
Change-Id: If9ec9659af28ecceb841bfc2f11721e6029fe891
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-18 20:12:18 +00:00
Andre Hartmann
e610ef8c8d QComboBox: Update completer on setCurrentIndex()
When the ComboBox currentText() was changed by key
LineUp or LineDown or mouse click, the completer still
contained the last inserted characters.

If now all text was selected (by Ctrl+A or selectAll()),
the old item and index was restored on next Enter press.

Task-number: QTBUG-41288
Change-Id: I6916fd31c8b8fbacfb12e1a62c3e46823cf918b4
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-18 16:57:19 +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