Commit Graph

5944 Commits

Author SHA1 Message Date
Tor Arne Vestbø
77a4915bf9 macOS: Add IOSurface based backingstore for layer-backed views
The naïve approach used for layer-backing in the past caused a detach
of the backingstore QImage on each beginPaint, since the image was
assigned to the layer via a CGImageRef that participated in the
QImage implicit sharing (and had to, so we couldn't get around that).

We now use IOSurfaces, wrapped in a QPlatformGraphicsBuffer abstraction.
The surfaces can be assigned to the layer's content the same way images
could, but allows us to reason more closely about whether or a buffer
is in use, and increases the chance that we will have a zero-copy path
to the screen.

Unless the window has requested a surface format with single buffering
we use a dynamic swap chain of buffers. In most situations there will
be two buffers in play, one assigned to the layer and one ready to
paint to, but during resize and some other situations the buffers
will grow temporarily to accommodate the increased back-pressure.

Since QBackingStore is documented as having single-buffer behavior,
we take care to persist content between the buffers before every
swap. By doing this before swapping, instead of before each paint,
we can avoid preserving areas that will be painted to anyways, and
will in many situations (such as blinking cursors e.g.) end up not
persisting anything.

The RasterGL surface case is handled by reading out the buffer data
and doing a manual texture upload. In the future we can support
direct texture access via CGLTexImageIOSurface2D, but this requires
QPlatformBackingStore::composeAndFlush to learn how to support other
targets than GL_TEXTURE_2D, as CGLTexImageIOSurface2D only works with
GL_TEXTURE_RECTANGLE_ARB targets.

Fixes: QTBUG-48763
Fixes: QTBUG-72360
Fixes: QTBUG-71162

Change-Id: Ica12f69b244e54d0fd31c929730d15657c286af8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-03-14 21:51:27 +00:00
Giuseppe D'Angelo
6620f93a74 QOpenGLContext: fix docs about sharing
FBOs cannot be shared. Streamline the remainder of the sentence.

Change-Id: I654b23f86f4ee4ea2ca8e71958464d9f55394297
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-03-13 16:16:17 +00:00
Aleix Pol
131c760af6 Fix generation of the Qt5::GLESv2 target on ARM
Since 5.12.1 the library name provided is an absolute path. We need to
take the case into account, otherwise it just fails to build if the
target is used.

Fixes QTBUG-72903

Change-Id: I96407e5fe1831487da77cbe7b24b64dae59b22ff
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-03-05 13:31:42 +00:00
Allan Sandfeld Jensen
17a51c4e0d Don't split bezier curves that are already just a line
Otherwise we can end up in an infinite loop of splitting the curve and
then discarding the half of the new curve, etc.

Fixes: QTBUG-74172
Change-Id: I1984b7fd33cd98f65866f1c57c6ab20114615803
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-03-05 08:54:23 +00:00
Allan Sandfeld Jensen
55cc93e9d6 Prefer BGRA uploading to swizzling
The older BGRA extension is more likely to have stable driver support.

Fixes: QTBUG-74150
Change-Id: If321b3024fbdeb9e199880744b9ee915b3b2bf6c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-03-02 08:25:19 +00:00
Joerg Bornemann
49ef377349 Fix determination of OpenGL include paths on macOS, take 2
The sysrootification of OpenGL include paths must be done only once: at
configure time. The resolved paths are stored since 521a8539 and must not be
resolved again.

Turn the makeSpec-type opengl library into a custom-type one, and do
the sysrootification in the handler function.

Fixes: QTBUG-73736
Change-Id: I2933144057d6f01d8bfc7bda2c2df56c57303459
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-27 09:53:52 +00:00
Dominik Haumann
16cb578a8d QSyntaxHighlighter: Fix crash when parent is a nullptr
QSyntaxHighlighter has the follwoing constructor taking a QObject

  QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent)
    : QObject(*new QSyntaxHighlighterPrivate, parent)
  {
      if (parent->inherits("QTextEdit")) {
          // ...
      }
  }

Typically, a 'parent' refers to the parent/child hierarchy in Qt
and is allowed to be a nullptr. However, in this case, passing a
nullptr will lead to a crash, as reported in
https://bugs.kde.org/show_bug.cgi?id=404820

This patch makes the QSyntaxHighlighter constructor nullptr safe
by checking if parent is a valid pointer.

Change-Id: Ia4e9b46b94fd37e6ceb2cd0538594353fdc1e349
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
2019-02-27 06:36:59 +00:00
Shawn Rutledge
1500d2283e Clear only one device from g_pointIdMap when all points released
The new test tst_QTouchEvent::touchOnMultipleTouchscreens()
needs the touchpoint IDs to be predictable, but another test currently
has a QEXPECT_FAIL; without release events, g_pointIdMap continued to
hold the touchpoints that were there when the test failed.  So it's
necessary to add QWindowSystemInterfacePrivate::clearPointIdMap()
to be able to call it in the test cleanup function.

Fixes: QTBUG-73830
Change-Id: Ia6a70d028be95cd2b6676db6363ec408c0b116bc
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-02-26 19:52:25 +00:00
Eirik Aavitsland
1e0395f73e Fix assert when drawing lines with extreme coordinates
For extreme coordinates, the rasterizer's width parameter could become
NaN, which compares false with everything and hence would trigger an
assert.

Fixes: QTBUG-56434
Change-Id: I27abae6ab0bc94ce042be86ea0587095cdb7d487
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-25 08:26:21 +00:00
Kari Oikarinen
33707f5b2f Merge 5.12 into 5.12.2
Change-Id: I3a5721aebd3afd8fa08d3f3df6bf61502fa9c347
2019-02-20 12:37:31 +02:00
Allan Sandfeld Jensen
a5cded843f Avoid creating wide images with negative bytesPerLine
The QImage API can not handle images with more bytes per line than what
an integer can hold.

Fixes: QTBUG-73731
Fixes: QTBUG-73732
Change-Id: Ieed6fec7645661fd58d8d25335f806faaa1bb3e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-14 07:48:38 +00:00
Joerg Bornemann
797f686ea4 Turn bcm_host library into makeSpec source
The bcm_host library couldn't be detected anymore. Let the makespec
provide LIBDIR, INCDIR and LIBS for bcm_host to fix this.

Change-Id: I4bc268504dc48edaf2884f1c14b745260fd9112c
Fixes: QTBUG-73727
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-14 07:27:34 +00:00
Tor Arne Vestbø
18f415e46d QBackingStore: Make QPlatformBackingStore creation lazy
Some platform backing stores may require that the window has been
created, so let's defer the platform backingstore creation until
absolutely necessary.

Change-Id: Ib93151c6473e3bbe77d994782d84289c2f63bcf2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-13 12:37:18 +00:00
Kai Koehne
d6c474b49b QTextDocument: Do respect white-space:nowrap
Prevent automatic insertion of line-breaks in blocks formatted with 'white-space:nowrap'.
This follows the example of white-space:pre.

Fixes: QTBUG-54787
Change-Id: If26f6a54106a02fe0e388947f6368ae4e86acf63
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-13 08:14:47 +00:00
Tor Arne Vestbø
c4e9eabc30 Don't allow backingstore flush to non-raster surfaces
Change-Id: I8e85706727a8c5f7585e34e3864c8a9f48481b92
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-12 13:53:16 +00:00
Lars Knoll
035d80407b Fix two smaller bugs in the BiDi engine
Remove wrong code changing the Bido level of line separators. This
lead to wrong ordering of the string in case the line separator was
meant to be ignored and the string should be rendered in one line. Line
breaks are anyways already reset to the paragraph level by the algorithm
and reordering is done on a line by line basis, so this will work
correctly when doing proper line breaking.

Secondly fix a small bug found while testing the above change, where
we wouldn't set the correct levels for boundary neutrals and explicit
embedding chars because we did that processing before we were fully
done with the BiDi algorithm.

Change-Id: Id88f91cd58d2ab29be864aef34ca1727c1586611
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:26 +00:00
Lars Knoll
79f2a9e666 Fix an assertion in the BiDi algorithm
The algorithm has been treating DirB inconsistently so far.
initScriptAnalysisAndIsolatePairs was treating it differently
than generateDireationalRuns leading to assertions.
It wasn't visible in our test data, as DirB is in almost all cases the
paragraph separator, where we split strings anyway.

Change-Id: I7dc0e7bbcf30ee84d8781ea06097da023e371f05
Fixes: QTBUG-73238
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:16 +00:00
Lars Knoll
4247d7c5a0 Fix QTextTable:insertRows() for tables with spanning cells
Don't resize the height of cells spanning several columns
multiple times.

Fixes: QTBUG-36713
Change-Id: I5eb45892f2008e6a4f85745b56efd04323e25673
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-09 08:01:08 +00:00
Volker Hilsheimer
c66ddd7aba Include relevant example code in documentation of setUrlHandler
By only looking at the function prototype, it's tempting to assume that
the handler needs to be registered with the usual SLOT macro. That is
not the case.

The code snippet is already included in the class description, but it
doesn't hurt to repeat it here.

Change-Id: If24fdca41a4bd976ebd1156c9e1106469388265c
Fixes: QTBUG-50484
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2019-02-06 04:15:26 +00:00
Eirik Aavitsland
a2b8f891fa Doc: decrease confusion about HSV vs HSL in QColor
The non-qualified hue() and saturation() etc. refers to those values
in the HSV, not HSL, color model. Make this more explicit in the
documentation to avoid confusion.

Task-number: QTBUG-73129
Change-Id: Ief337672966ac72d0d0c3606d8d68acf01ffe7ee
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-02-05 22:47:46 +00:00
Eirik Aavitsland
01f090e9e4 Fix QColor::toCmyk() for rgb(0, 0, 0)
We translate all pure gray colors into cmyk having c,m,y=0 and only
the k value expressing the darkness. But a fix introduced to avoid
division by 0 caused rgb(0, 0, 0) to be an exception to this; it ended
up being translated as c,m,y,k=1 instead.

Fix by catching the potential div-by-0 situation earlier and directly
set the orthodox cmyk translation: c,m,y=0,k=1.

Fixes: QTBUG-73171
Change-Id: I3774eaf9d96e096ac5c47c55d28881bea2bd1309
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-05 22:47:33 +00:00
Eirik Aavitsland
66c3a71e91 Painter path stroking: fix capping of beziers ending in tight turns
For some overly tight beziers where the start or end point and the
next control point are closer than the pen width, the stroker's
shifting algorithm will produce a start/end tangent pointing in the
opposite direction from what is expected, for one of the sides. This
would break the square and round capping logic. Fix by detecting the
situation in the capping function and reversing the tangent when
necessary.

Change-Id: I48f4f017403d7b289b0483dd2b3a7ff1bbd0cf2a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-05 22:47:16 +00:00
Eirik Aavitsland
e96641d881 Fix xbm image format handler: properly reject invalid files
The read_xbm_header() function is used to check for valid file header,
containing valid width and height values. But in case of an invalid file,
the check could depend on uninitialized variables.

Change-Id: I9f933ed6e38d86109e5b5a8d55fe763ab928d749
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-05 22:47:07 +00:00
Albert Astals Cid
50447bb7a3 Initialize bit_depth
==12==WARNING: MemorySanitizer: use-of-uninitialized-value
   #0 0x6b90ea in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:360:32

Change-Id: Idf04130e645dcf589dfb6260661be18a71b7bdc2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-31 12:08:34 +00:00
Christian Ehrlicher
0bde49bd92 QPictureIO::read(): don't work on dangling pointer
QPictureIO::read() is using pictureFormat() when the format has to be
guessed. pictureFormat() returns a QByteArray which was implicit
casted into a char* and then pointed to uninitialized memory.
Fix it by using a QByteArray instead a plain char*.

Change-Id: If9ae286ed68134af597f0b0c779789e40f9efaed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-30 17:38:25 +00:00
Albert Astals Cid
f383fa4b9c png: initialize color_type to 0
Fixes
==12==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x6b8179 in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:247:9
on fuzzed file

Change-Id: I772d536a0db91665dc16e94751ef507de1064376
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-30 10:13:27 +00:00
Eskil Abrahamsen Blomfeldt
4514cf27b2 Fix default font properties when using raw fonts for text layouts
When a QRawFont is set explicitly on the layout, we would get certain
font properties from the QTextCharFormat instead. But when the properties
had not been set on the QTextCharFormat, we would get the default values
which were always 0/false, not the actual default values used in QFont.

Instead, we calculate a QFont query based on the format and use the
properties from this. This will give us the correct default values
in the cases where they are not overridden.

Change-Id: I53e5103739164c3d9eafaf76fcb4e8bda57bd12a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-01-29 17:36:24 +00:00
David Edmundson
6abed98e87 Fixups for GL_CONTEXT_LOST in QOpenGLExtensionMatcher
Fixes the rest of the places we use the pattern of emptying the OpenGL
error stack to be able to handle GL_CONTEXT_LOST.

Change-Id: Ic45024fc6df84d70d60c48831fa586f889af0c0b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-29 11:15:24 +00:00
Tor Arne Vestbø
775b5e2631 Remove requirement to lock graphics buffer before getting total size
QPlatformGraphicsBuffer::byteCount() shouldn't need locking unless
bytesPerLine() is implemented in a way that requires it, in which
case the assert should be in the subclass.

Change-Id: I0fdb04c0a3ab042408d6d17b2759509853573d16
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-29 11:06:28 +00:00
Kai Koehne
6358f8e302 QtGui: Unify license headers
Change-Id: I0a2553b95b099fdfa83d42e71bdf9a192a6588c7
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-29 10:41:31 +00:00
Joni Poikelin
9bbeb7e6e8 Prevent QPixmap::load from touching QPixmapCache in non-gui threads
Change-Id: Ied0fec48c81298743f694f317dd60e58d356f69a
Fixes: QTBUG-72523
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-28 14:52:57 +00:00
Eric Lemanissier
fffe5d6225 configure: handle FREETYPE_* variables
This allows the user to set the following variables:
FREETYPE_INCDIR
FREETYPE_LIBDIR
FREETYPE_LIBS

Fixes: QTBUG-72765
Change-Id: Ib70b30f355cc2185c45233e0cfe5e6e55acdf2b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-24 22:28:54 +00:00
Tor Arne Vestbø
c907becbf1 Always unlock graphics buffer after binding texture during composeAndFlush
The code path for re-generating the texture already has the unlock, but the
non-regenerating code-path was missing an unlock, causing asserts when the
graphics buffer was then attempted to be locked (again) at a later point.

Change-Id: Ic65add838360079829b7e81d7c1cfe2274959059
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-24 20:25:00 +00:00
Qt Forward Merge Bot
e3da05f39a Merge remote-tracking branch 'origin/5.12.1' into 5.12
Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
2019-01-23 10:13:29 +01:00
Thiago Macieira
0c007a87be Fix change-of-sign warnings in ICC 19
error #68: integer conversion resulted in a change of sign

Change-Id: I4ac1156702324f0fb814fffd156f80962df6b4a7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-23 04:13:55 +00:00
Rolf Eike Beer
230921a7f0 fix crash if no screens are available
Fixes: QTBUG-73166
Change-Id: I936672b7a09a540d21e6dcd371f5ffe1e5536b85
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-21 15:25:02 +00:00
Gatis Paeglis
f43f636f50 configure: fix a bug where -no-xcb implied eglfs_x11=no
Change-Id: I89bbef23a0abd7692b9bda7b356502f5450af6cc
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-01-22 06:35:08 +00:00
Mårten Nordheim
f8f0f3eef1 QSyntaxHighlighter: cancel delayed highlight if done manually
It was an implicit effect before which stopped working after
dec7961709. Reintroduce it as some
projects used this side-effect as a way to abort the initial
highlighting.

Change-Id: I5340ee9882a242bc8b5f7f843f1cfe793a65d357
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-16 14:23:37 +00:00
Friedemann Kleint
b782004149 Fix multiple emission of QGuiApplication::lastWindowClosed() when native child widgets are used
Run the handling in QWindowPrivate::maybeQuitOnLastWindowClosed()
for top level windows only.

Fixes: QTBUG-73061
Change-Id: I74deb50b06a64e8ef0e438d2abf14888f778a46e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-01-16 07:16:43 +00:00
Michael Brasser
a7fa2618e4 Update QOpenGLTexture::generateMipMaps for ES 3
Per the Khronos documentation, this operation is not permitted on ES 3.

Change-Id: Iff70ef83d48228277b883df588011432ba80f4bd
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-01-15 19:39:41 +00:00
Friedemann Kleint
3eac688ec0 Documentation: Add \nullptr macro and use where applicable
Qt for Python users reading the documentation assume that int(0) can
be passed for pointer parameters. Use the newly introduced \nullptr to
disambiguate this.

In a follow-up step, the \nullptr macro can be defined as None
when generating the Qt for Python documentation.

Task-number: PYSIDE-903
Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-10 22:16:07 +00:00
Eirik Aavitsland
74c8aa7608 bmp image handler: Reject invalid 0-dimension files early
Avoid spending time on decoding attempt of invalid bmp files
specifying height or width as 0.

Change-Id: Ia6666088515eee54777f7154868fb7d07c6b4438
Done-with: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-01-08 16:35:15 +00:00
Andre de la Rocha
81c3c66bb4 Fix PDF generation for locales using comma as decimal separator
A previous change that extended the maximum PDF size has caused the
generation of invalid PDF output when the current locale was set to
something using commas instead of points when outputting floating
point numbers through printf(). This change uses QByteArray::number()
instead, which uses points, irrespective of the current locale.

Fixes: QTBUG-72868
Fixes: QTBUG-72848
Change-Id: I292eba2d6c89b3e01957bb8c04c04bdca8ada316
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
2019-01-08 16:35:03 +00:00
Lars Knoll
a8db9b8663 Fix a crash in QTextEngine when a paragraph only contains a tab
This fixes a regression introduced by change
c3d2d83fcb.

Change-Id: Idf840804c68cd6b1751e122b45e9dd2775af56f5
Fixes: QTBUG-72900
Fixes: QTBUG-72754
Reviewed-by: David Faure <david.faure@kdab.com>
2019-01-08 16:34:36 +00:00
Kai Koehne
2e2832a499 Fix typo in fontconfig autotest
Change-Id: Ie6ef3aa654083cd23320eda99660ff85050d999c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-01-08 13:12:57 +00:00
Timur Pocheptsov
98552a84ce Emit paletteChanged and send ApplicationPaletteChange on theme change
Fixes: QTBUG-72575
Change-Id: I407e081295a456a7bdd36de91ca5bbf74bba6078
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-08 11:43:16 +00:00
Liang Qi
0e96b5fe48 Merge remote-tracking branch 'origin/5.12' into 5.12.1
Conflicts:
	src/widgets/kernel/qtooltip.cpp

Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
2019-01-08 09:34:24 +01:00
Liang Qi
772f56c3cf Fix warnings about uninitialized variables - qrgba64_p.h
In function 'QRgba64 rgbBlend(QRgba64, QRgba64, uint)':
error: 'blend.QRgba64::rgba' is used uninitialized in this function [-Werror=uninitialized]
qrgba64_p.h:246:13: note: 'blend' was declared here
     QRgba64 blend;

Change-Id: I7b263f863281c51c7d8099704f2cffcc7e1a07df
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-07 14:57:03 +00:00
Gatis Paeglis
abcf7a103e configure: improve warning when all qpa plugins disabled with features.gui
The mentioned README file has never been very trustworthy and
after 863c688749 it has become
very minimal - it doesn't contain anything that is not already
present in "configure --help" and enforced by the configure
process. Furthermore, the warning was XCB specific, but Qt
supports also other QPA plugins on linux.

Change-Id: I3211dda3f294cbcd5f3d15fe8c21a1af7627f048
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-07 07:27:35 +00:00
Topi Reinio
3b03150aa2 Doc: Restore documentation for QTest functions in other modules
Qt Test library sources specific to Core, GUI and Widgets modules
were moved around in commit 88867e39b.

The new source locations must be referenced in Qt Test documentation
configuration. The same sources are excluded in their original doc
projects, and the related snippet file is moved over to qttestlib.

The commit also fixes the remaining documentation issues for Qt Test.

Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-01-04 12:16:56 +00:00
Topi Reinio
66c9161d05 Doc: Fix link in QImage::load() documentation
Change-Id: I9a3a059a860f5b21253ab0e7cdc616cbfc9a3885
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-04 09:36:40 +00:00
Gatis Paeglis
dd988e2074 configure: add XCB GL integration features
This way Qt builders can see if everything has been configured
properly for XCB GL integrations at configure time, instead of
at the end of the build process.

Change-Id: I00740cc2edd7f6ecfcda0ddfb22649d1b4db4aa2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:29:17 +00:00
Gatis Paeglis
0decdcb754 configure: add X11 subsection in "Features used by QPA backends"
xcb-xlib is used by XCB and EGLFS_X11.

xlib is used by XCB, EGLFS_X11 and offscreen plugin (not listed
currently under "QPA backends").

egl_x11 is used by XCB GL integration plugin and EGLFS_X11.

Renamed X11 -> XCB under "QPA backends", because that is the
correct QPA name.

Change-Id: I455ac3a41da3ab84453d8de0edc657c3a5e064c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:09:47 +00:00
Gatis Paeglis
7d8fe4d98f configure: make xcb-render a hard dependency for xcb plugin
Its been available by default since at least libxcb 1.5, and in Qt 5.12
we have even increased the minimal required libxcb version to 1.9.

Having configure switches for extensions is a legacy from Qt 4. There
are still few exceptions in Qt5, where the reason is that we have to
support Linux distributions that don't ship recent enough libxcb.

Task-number: QTBUG-30939
Change-Id: I0a02d93b6411119ec018b0cb8fe5c63beeab62ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-03 10:09:40 +00:00
Gatis Paeglis
6899117a59 configure: properly atomize render vs. renderutil
xcb-render is a C interface for X11 extension. xcb-render-util is a
utility library that complements xcb-render by providing convenience
functions and interfaces which make the raw X protocol more usable.

Bumped xcb-render-util version to avoid having include hacks. We were
bundling 8 years old release 0.3.8 (Apr, 2011). 0.3.9 is the latest
release and it was relesed 4,5 years ago (Jun, 2014). All CI machines
have 0.3.9. The only thing that have changed in xcb-render-util sources
since 2011 is that we don't need to have various hacks to include
xcb_renderutil.h in C++ files. Upgrading bundled XCB libs was also
requested in QTBUG-71109.

Task-number: QTBUG-71109
Change-Id: Ib261f7584ad81be95660123b007e2200a3042f4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:09:34 +00:00
Eskil Abrahamsen Blomfeldt
ceddc14af1 Draw ShowTabsAndSpaces symbols with the correct font
We would draw the tab and space symbols without setting the correct
font on the painter first.

[ChangeLog][QtGui][Text] Fixed so ShowTabsAndSpaces will use the
correct font.

Fixes: QTBUG-62540
Change-Id: I3b7d6d317473e7aab722dafe1a128c57a830f634
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-01-03 08:48:41 +00:00
Morten Johan Sørvig
f4b77570e2 Make QWindow::type() reflect ForeignWindow status
The Qt::ForeignWindow flag is or’ed to d->windowFlags
by QWindow::flags(). Use this getter function instead
of accessing d->windowFlags() directly.

Change-Id: I6a82aa7e379ba51272954ffe7b87f108034da8c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-22 21:51:48 +00:00
Morten Johan Sørvig
6881699d76 Fix layering violation in isForeignWindow()
QPlatformWindow::isForeignWindow() should return whether
the native window is of the foreign window type, or
false if the platform (plugin) does not support this
concept.

It should not call QWindow::type(), since that function
may itself be implemented in terms of isForeignWindow().

Change-Id: Ib67a5a44c5c1db0acb4d3bc155e187f8164146d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-22 21:51:38 +00:00
Eskil Abrahamsen Blomfeldt
28b2232e78 Don't dither antialiasing on glyphs when converting to mono
When glyphs are converted to monochrome from an alpha map,
it does not make sense to apply high quality dithering, because
the result will be that some the subpixels along the edges
that cover only part of a pixel are filled. This causes the
glyphs to look jagged and ugly.

Instead, we use ThresholdDither to fill all pixels that are
>= 50% opacity.

[ChangeLog][QtGui][Text] Improved appearance of monochrome
text on some platforms.

Fixes: QTBUG-69702
Change-Id: I0f44a8d73f6b9f1eb59f297d66438575f1e9db10
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-21 10:27:22 +00:00
Eskil Abrahamsen Blomfeldt
e6880e7cd1 Fix text shifting vertically when elided
When eliding text we would check for the existence of the ellipsis
character and fall back to using the dot if it was not available.
However, when font merging was in use, we would also use ellipsis
from a fallback font if available. This could cause the metrics
of the text to increase if the fallback font had larger metrics,
and the result was that text could shift when elided.

It is better to prefer the dot from the current font than to use
the ellipsis from a fallback, so we only use the ellipsis if
it is in the main font.

[ChangeLog][QtGui][Text] Fixed a bug where eliding text could
change the height of its bounding rectangle for certain fonts.

Fixes: QTBUG-72553
Change-Id: Ib27fc65302465ddce661801bcc5ae32e55f1aeb9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-21 10:27:12 +00:00
Oswald Buddenhagen
53ae00d03c configure: inline a few more tests
these were new on dev while the original migration happened on 5.9, or
came from new changes which hadn't adapted yet.

Change-Id: I5e48437061a97e6df6e93881c98471455e177631
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-17 21:31:48 +00:00
Oswald Buddenhagen
65463764f2 configure: properly atomize xcb-syslibs
as it is now cheap to test for individual libraries and headers, split
the xcb_syslibs monster-library into its parts.
the compile test remains a single blob, though, as that didn't get any
cheaper. whether it's worth keeping it in the first place is debatable.

Change-Id: Id7cae7925bb4d77069437512abecf14feea749f2
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-17 21:29:17 +00:00
Oliver Wolff
7a481fce28 configure: detect fxc.exe more thoroughly
When building ANGLE, we need the shader compiler (fxc.exe), which is not
shipped with MinGW. Previously, we required an installed DirectX SDK.
For Windows versions >= 8, the DX SDK is also part of the Windows Kit,
so we also allow the user to specify the location of the Windows Kit.
We also detect fxc on 64-bit hosts now, and in newer SDK versions which
version the binary directory.

The detected binary is now exported by configure, so the ANGLE project
file does not need to duplicate the logic anymore.

Task-number: QTBUG-52487
Change-Id: I41a17992909041dd84291b69498195cc8b8fab8a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-17 21:29:11 +00:00
Oswald Buddenhagen
1ef9859e7e configure: refactor directx checks
properly atomize the libraries and express their dependencies, and
adjust the project files accordingly.

note that we don't try to use any additional paths, as all SDKs we
currently support have built-in directx 11 support:
- msvc2013 comes with win sdk 8.1; that is also used for win7 targets
- mingw-64 5.3 (though this one is missing fxc, which is why the code
  path for using an external sdk for that remains)

Change-Id: Ib44e389ef46567308293c2bbcad20a96e8ef70c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-12-17 21:29:05 +00:00
Tor Arne Vestbø
ae825a48dc Set point size, not just pixel size, when creating HarfBuzz fonts for shaping
Otherwise HarfBuzz will fall back to using default font sizes, e.g. 12.0
in the CoreText backend.

hb_coretext_font_create() already does the right thing, but we're not using
that function, we create the hb_font_t ourselves in _hb_qt_font_create().

The mismatch didn't matter for vector-based fonts as the metrics (presumably)
scale linearly, but for bitmap-based font such as Emojis they don't, and
we ended up with advances that were way too large (increasingly so the
larger the font point size).

Change-Id: I4781dda965c745853732026da91590d8506ec3f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-16 15:02:20 +00:00
Oswald Buddenhagen
e80bf655e9 configure: verify header presence against sources
in addition to the actual library resolution, also resolve the headers
belonging to the library, to validate the include path, and possibly
ensure that the right version of the library is present.

the "include" entries were moved out of the "test" objects, and renamed
to "headers". this cleanly permits libraries without compile tests.

the headers were not put into the sources, because the variance among
the includes is generally orthogonal to the variance among the
libraries.

note that this - like the library resolution - provides no support for
darwin frameworks. consequently, the opengl libraries are excluded from
the conversion on darwin.

similarly, wasm is excluded (centrally), because emcc is magic and would
need advanced wizardry to be dealt with.

Change-Id: Ib390c75371efa2badcfec9b74274047ce67c3e5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-12-14 23:44:30 +00:00
Friedemann Kleint
d1cafa3eba qt_imageFromWinHBITMAP(): Fix memory corruption when converting from bitmaps with low depths
Insufficient memory was allocated when asking GetDIBits() to convert to 32bit.
Fix allocation size and use a QScopedArrayPointer.

Fixes: QTBUG-72343
Change-Id: I45f79c913a243316e01bc6efed08e50ccc7d25f4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-12 16:08:10 +00:00
Allan Sandfeld Jensen
9fbce8d5cb Avoid crash in blitting or fast draw when QPointF is too big
Change-Id: I88182d5d95fda15d33836f16dee78167685b3765
Fixes: QTBUG-72392
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-12-11 18:32:53 +00:00
Paul Wicking
9400a120ea Doc: Fix typo in snippet
Resolves "reference to non-static member function must be called" error.

Fixes: QTBUG-72403
Change-Id: Iebd865ff553736df43548b72b45ed3f4711fffc1
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-12-11 14:03:11 +00:00
Tor Arne Vestbø
161c569314 macOS: Reset font glyph caches when application theme changes
Our glyph caches on 10.14 are based on the application appearance, so when
the application goes from dark to light or light to dark, we need to reset
and re-populate the glyph-caches to account for the new appearance.

Change-Id: If019d8cfa33ffb2b14747444b2ff74b288992f55
Fixes: QTBUG-71018
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-09 23:22:14 +00:00
Tor Arne Vestbø
2e715c31ed Allow overriding the maximum cached glyph size via the environment
Useful for testing.

Change-Id: I8cfd4453018cba0301287ad6a1c15a88cdc33c1c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-08 15:27:16 +00:00
Allan Sandfeld Jensen
a71f50edc6 Revert "Ensure alignment of image-data"
This reverts commit ae8389e19c.

The result of malloc should be aligned in any case, and
this change conflicts with the use of realloc on the data elsewhere.

Change-Id: I01773132b240614a2656dd3013490b0df9cd14a7
Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-08 08:53:54 +00:00
Oswald Buddenhagen
501ff0a18c untangle the egl-x11 relationship in the build system
egl-x11 is used in two places:
- the eglfs-x11 plugin, which has a hard dependency on xcb-xlib
- the xcb-egl plugin, which has a soft dependency on xcb-xlib

that means that the egl-x11 configure test needs to be untangled from
xcb, and that eglfs-x11 should be a separate feature with a proper
dependency declaration.

when the plugins that need egl-x11 are not built, it also makes no sense
to build the respective integration in the egl_support module (even if
it's possible to coax it into building), so adjust things accordingly.

Change-Id: Ic729d0b7c893dd00844567329205c24ea2703033
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 23:49:15 +00:00
Oswald Buddenhagen
3ee7aa72b7 configure: atomize xcb-* tests properly
xcb is a dependency which should be detected upfront.
same for xlib.

this also removes calls to functions coming from the dependencies from
the tests (both because these calls prove nothing, and because at some
point we will stop linking transitive deps).

Change-Id: Iac77305eab33ea8ff5c71302cef980eb908d8403
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 23:49:04 +00:00
Oswald Buddenhagen
118b456c6b configure: convert xlib to a proper library definition
Change-Id: I1623aee9e8632e4bfd466e09e275cc23f94c6dab
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-07 23:48:48 +00:00
Oswald Buddenhagen
b6737b7ecd wasm: fix freetype library source
Change-Id: Ib99c4c178808c7325e55e85a1548542ae3c57524
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2018-12-07 23:48:30 +00:00
Tim Blechmann
fc2c4edcbd configure: fix linking with statically linked freetype
freetype depends on zlib. using statically linked freetype as system
library lacks the usage requirement to link with zlib. so we need to
add this manually.

Task-number: QTBUG-63115
Change-Id: Iaf0f3027bd9d1386fcc1ecfbfbe07ab09b2d0bb9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-07 23:48:21 +00:00
Thiago Macieira
ea9f11b038 Add a note about virtual_hook
Change-Id: I1ff3b344ec5a4499bb25fffd156b2bf6a7d88625
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-07 18:52:18 +00:00
Gatis Paeglis
28fd625873 configure: remove xkbcommon_evdev transition hack
It was added in c3a963da1f.
wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7.

Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-07 18:20:56 +00:00
Lars Knoll
416b4cf685 Set correct vertical position for text following a very large image
If the document is paged and contains an image spanning more than one
page, correctly set the y position for everything following that
image.

Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172
Fixes: QTBUG-59886
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-03 10:42:00 +00:00
Allan Sandfeld Jensen
d23d146175 Fix alignment of temporary QRgba64 buffers on win32
The alignment of long long on 32-bit windows is only 32-bits, but we
should be safe to assume it is aligned at 64-bit.

Since QRgba64 is a public type, we can't fix the alignment there without
breaking ABI, so instead fix it where temporary buffers are allocated.

At the same time be consistent about using QRgba64 so we can switch to it
enforcing alignment in Qt6.

Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-30 15:14:26 +00:00
Gatis Paeglis
f2b4462f84 xcb: remove old work-around for building with util-wm
Commits that added this code:

7ce8491280 and
f005dee1b3

I guess this was a work-around, before we started bundling
XCB libs a year later in 21bd66e1ea

0.3.8 was released in 2011-04-26 and we are bundling 0.3.9, so
it is safe to remove the include work-around as well.

Change-Id: I5794f40d86e10ebdad984aa4b61311979aaadcf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-30 14:05:13 +00:00
Tor Arne Vestbø
b926d5f919 CoreText: Remove handling of QFontEngineMulti's highByte
It's a leftover from when the Cocoa plugin used QFontEngineMulti
exclusively. Nowadays QFontEngineMulti will strip out the highByte
before calling into the real engine. Left an assert just in case..

Change-Id: I6cb26d20a908d7c3aaf096297fca160805fdb85b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-30 10:35:52 +00:00
Gatis Paeglis
c3a963da1f src/3rdparty: remove xkbcommon
The only reason why we bundled this library ~6 years ago was because
it was not available on distributions that we supported at the time,
but library was a hard dependency for XCB plugin. See:
2122e731ab

Later more and more projects started to depend on it (compose input
context plugin, libinput, mir, wayland). The configuration had become
too complex, because some projects used bundled and some used the
version from the system.

Having libxkbcommon in 3rdparty sources is not necessary anymore, after
RHEL 6.6 was removed from the list of supported platforms for Qt 5.12.

Ubuntu 16.04  - 0.5.0
Ubuntu 18.04  - 0.8.0
openSUSE 42.3 - 0.6.1
RHEL-7.4      - 0.7.1

This will also simplify further development, e.g. QTBUG-42181

Bumped the minimal required version 0.4.1 -> 0.5.0.

The patch also contains a code marked with "TRANSITION HACK", which
is temporary needed so we can update the dependent wayland module.

[ChangeLog][Third-Party Code] Removed xkbcommon from bundled sources.
This library is present on all supported platforms. The minimal required
version now is 0.5.0.

Task-number: QTBUG-65503
Change-Id: Iec50829bb6f8fbb19f3c4e4ad62e332beb837de5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-30 09:47:03 +00:00
Val Doroshchuk
2e86b652b7 Fix crash in QSimpleDrag when no platform window
No need to return top level window if it was not created.
It means no platform resources have been allocated.

Events might not be delivered if the wrong window is returned.

Fixes: QTBUG-70544
Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-11-29 13:14:14 +00:00
Tor Arne Vestbø
09e3457541 macOS: Share code for resolving CGImage bitmapInfor for a QImage
Removes assumptions about QImage format in a few places.

Change-Id: I515701be53190429a48956c31986fa0804806406
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-28 23:59:17 +00:00
Tor Arne Vestbø
17cdb28ed5 macOS: Fix use of deprecated enum value
Change-Id: Ibf979837e1adcadcbb100d059b06b1a48157eab6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-28 23:59:17 +00:00
Allan Sandfeld Jensen
ae8389e19c Ensure alignment of image-data
Instead of relying on the return value of malloc having the correct
alignment, use proper non-throwing new[] operators.

Change-Id: I06c6c619e21c848f3d184bdb7cef8c5589c1c7ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-28 09:11:28 +00:00
Allan Sandfeld Jensen
7c93f1cf5d Remove macOS specific path that causes reverse vertical advance
This special case of macOS appears to be outdated and now causes a bug.

Change-Id: Ie9c074bb69eda7abfe3d123f807b517334cc2958
Fixes: QTBUG-69803
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-11-22 14:26:59 +00:00
Oswald Buddenhagen
54dabdd1e8 wasm: fix qpa plugin build system integration
fix the plugin name (it was missing the leading 'q') and the name used
in configure (the latter making it unnecessary to mess with it in the
mkspec). the qt.prf override which forced linkage of the plugin is also
removed due to being completely redundant.

Change-Id: I94687a34a295c36754e36a298af902b656ba2ecc
Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2018-11-21 23:08:05 +00:00
Lars Knoll
ac4b2a2b8e Don't start a new page when printing very large images
Don't start a new page to print a very high line of text if
that line wouldn't fit on one page in any case. In that case
we have to break the image up onto several pages anyway, so
we might as well start it immediately.

Change-Id: I823aa4961df179054476755c8f5df2e03874661f
Fixes: QTBUG-59885
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-21 05:36:46 +00:00
Lars Knoll
199f9c5448 Fix vertical alignment of inline images
Inline images can have 4 different alignments. Unfortunately,
AlignTop and AlignBottom can only be set once we have laid out
the whole line and know the total height of the line, as one
could otherwise end up with lines that are too high.

To fix this, position the images for these cases in a second loop
after we have calculated the length of the line and the maximal
image height in that line.

Task-number: QTBUG-59310
Change-Id: I1fd4cd39e43a13d1967b9f5c9ce8270a99269cd9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-19 11:45:09 +00:00
Liang Qi
4d180586cd Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm

Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
2018-11-19 12:42:10 +01:00
Liang Qi
37d3bc9ad7 Merge remote-tracking branch 'origin/5.12.0' into 5.12
Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
2018-11-16 08:10:15 +01:00
Liang Qi
527406cbd9 Modernize the "settings" feature
Change-Id: I9b8a61ecb1413b513ae5c9e77d3ee1b3e8b6562c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-15 17:20:15 +00:00
Lars Knoll
c3d2d83fcb Correctly initialize the logClusters array for tabs and objects
The logclusters where never correctly initialized for tabs or
inline objects.

Change-Id: I376fd2dba19994eb5add24cdb8a93c38bde8cd1e
Fixes: QTBUG-70946
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-14 20:16:31 +00:00
Laszlo Agocs
800cd53c7e Increase QOpenGLTextureCache max size
From 64 to 256 MB. Note that this is especially important
because bindTexture() will fail and return an invalid
texture for image data larger than this. That is not ideal
but is trickier to correct. Until that is available, increase
the cache size to alleviate the pain somewhat.

Task-number: QTBUG-59207
Change-Id: Ibc22524acad0b42a632eb7e4cd8ea86225174837
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-14 20:15:47 +00:00
Allan Sandfeld Jensen
2393551665 Fix precision in parsing hex format QColors
We document being able to parse more than 8-bit per color, but were
ignoring everything after the first 8 bits.

Change-Id: Ic85ab04b0836e6979a623e294eebd5084c1a9478
Fixes: QTBUG-71373
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-11-12 22:18:43 +00:00
Samuel Gaist
178bc49ac2 QImageWriter: improve documentation regarding use of resources
QImageWriter's plugin can open devices while operating and only free
them on destruction which means that if one wants to act on the file
written if must first destroy the writer's instance. This patch adds
the suggestion to use a scope to avoid that problem.

Change-Id: I239157ea86c4a93faab237fe1860312a3c7ac7a2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-11-12 13:01:20 +00:00
Lars Knoll
a6a5e81cd6 Fix a typo in the docs
Change-Id: I0f1b015a34b8caffa3b60927cedbccf7db50b383
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-11-12 07:16:54 +00:00
Morten Johan Sørvig
c9f375f4e3 Document QScreen::grabWindow high-DPI behavior
Change-Id: Ib32510ff30e907365e64921fda14e686a495c77c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-12 07:15:16 +00:00
Morten Johan Sørvig
8802826de6 Make grabWindow return pixmap with correct dpr
The devicePixelRatio on the returned pixmap should
be the product of the Qt and platform scale factors.

This handles the corner case of setting QT_SCALE_FACTOR
on macOS with a high-dpi display.

Change-Id: I3600165d47c03c4e043bcc5e375932cc3fc0c544
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-11 09:10:05 +00:00
Friedemann Kleint
b20c15f204 QtGui: Check event type in QWindowSystemInterface::handleMouseEvent()
Assert on receiving double clicks which are currently not implemented.

Task-number: QTBUG-71263
Task-number: QTBUG-70999
Change-Id: I85cd21665ecaf118584053de63745044728d8f5b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-11-09 21:43:38 +00:00
Liang Qi
bc07958f92 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	.qmake.conf
	qmake/Makefile.unix
	src/gui/text/qtextdocument.cpp
	src/gui/text/qtextdocument.h

Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
2018-11-09 10:34:33 +01:00
Mårten Nordheim
dec7961709 QSyntaxHighlighter: Delay all highlights until first rehighlight
When calling setDocument (directly or through the constructor) a delayed
rehighlight is initiated. Previously, if any text was changed before
this rehighlight could run it would cancel the rehighlight, even if the
changed text only caused a new block of text to be highlighted.

Fixes: QTBUG-71307
Change-Id: Ib09b664d90906f5b4427105f0e45469806f3a779
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-11-08 16:38:27 +00:00
Thiago Macieira
9d90c0edac QImage: merge the size calculations with proper (non-UB) checks
This check, which was only done once, was wrong:
    const int bytes_per_line = ((width * depth + 31) >> 5) << 2;

    // sanity check for potential overflows
    if (std::numeric_limits<int>::max()/depth < width

If width*height overflows, then it's already UB and checking afterwards
with a division is pointless and slow.

The other instances weren't properly guarding against overflows.

Change-Id: I343f2beed55440a7ac0bfffd1563350d4cfa639c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-11-08 15:20:01 +00:00
Andy Shaw
38b87cc4bb Doc: Clarify what samples() returns if not explicitly set
Change-Id: Icf4478121a9d67356eb976039c666d6945a2099c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-07 16:48:13 +00:00
Sergio Martins
9933511838 Fix typo in define. s/GL_FRAMEBUFFER_SRB/GL_FRAMEBUFFER_SRGB
Found with clazy

Change-Id: Ied84c0fa95a7ae7b7791e167695acfc7877f7e25
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2018-11-07 14:40:03 +00:00
Liang Qi
825f988156 Modernize the "textcodec" feature
Also clean up QTextCodec usage in qmake build and some includes
of qtextcodec.h.

Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-07 13:19:54 +00:00
Topi Reinio
8828993c44 Doc: Qt GUI: Fix documentation warnings
These are minor typos or documentation warnings that snuck in with
new features.

Task-number: QTBUG-71502
Change-Id: I03669cfecc3c3d80168ff7b1ca8bca7571e06d25
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-11-06 12:43:17 +00:00
Liang Qi
eedb3a06cb Merge remote-tracking branch 'origin/5.12.0' into 5.12
Change-Id: I12f26470e01a8582d0f02f51e20d5b742bd95d6f
2018-11-05 19:06:47 +01:00
Allan Sandfeld Jensen
73e7eb785f Enable swizzling
This part was accidently left disabling after testing the
fallback still worked.

Change-Id: Ic2df939753641a9771e68bc8857c570d356cff44
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-05 15:16:24 +00:00
Liang Qi
b36c5bdc30 Merge remote-tracking branch 'origin/5.11' into 5.12.0
Conflicts:
	src/plugins/platforms/cocoa/qcocoaglcontext.mm
	src/plugins/platforms/xcb/qxcbscreen.h

Change-Id: If9b4c67288396ff7346088ce591c7a3588b51979
2018-11-05 09:59:59 +01:00
Jarek Kobus
deee147aca Fix doc
Change-Id: I75386b948763bbe784fc36abe7e69696bc04219d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-31 10:34:01 +00:00
Andre de la Rocha
eb056ee233 Fix painter opacity being ignored when rendering to PDF
The opacity set on a QPainter was being ignored for drawImage()/drawPixmap()
calls when rendering to a PDF file through QPdfWriter/QPrinter. This change
fixes it for PDF files v1.4 (default version) or v1.6. For PDF/A-1b files,
opacity will remain ignored to ensure compliance with the specification.

Task-number: QTBUG-70752
Change-Id: I4280e898698e0367dfb4c6ac2cd14ca2bf98850e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-30 17:48:23 +00:00
Andy Nichols
1b9af84c1b Don't create an offscreen surface when not on the GUI thread
When we try to gracefully destroy a QOpenGLVertexArrayObject it is not
possible to create an QOffscreenSurface from a thread that is not the
GUI thread. In this case we just need to bail out instead.

The side effect that was seen previously was that there would be a
warning and a deadlock on Windows when closing QQuickWindows that
contained a QQuickPaintedItem backed by a FrameBufferObject render
target (which would be using the OpenGL paint engine) when using the
threaded render loop.

Task-number: QTBUG-70148
Change-Id: I4a20d74d9af850bb90d243212ad9f65c3fc9e616
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-10-30 12:49:53 +00:00
Kirill Burtsev
d2e0e416d4 Fix leaking QTabletEventPrivate instance
Fixes: QTBUG-52279
Change-Id: I4f40fc9d3ce938b4c821f10cacd21e6f652a2227
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-10-25 14:08:32 +00:00
Andy Shaw
509d566ec0 Don't block mouse events if the window is a Tooltip type
If a tooltip was shown on an application modal dialog then it would end
up blocking mouse events to the dialog while the tooltip was visible.
Since tooltips are special in this case, they should not cause mouse
events to be blocked.

Fixes: QTBUG-65599
Change-Id: Ibf1729ca4942f5854e4f9687c5586382e23c1c31
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-24 10:47:43 +00:00
Ivan Komissarov
903666a602 qtriangulator: Remove a bunch of dead code
There is no sense in testing the 'm_array' pointer against null, as the
memory was allocated using the 'new' operator. The exception will be
generated in the case of memory allocation error.

Task-number: QTBUG-71156
Change-Id: Ib76d16d38d2b0b0c4c9fae3d8d5bdd86af0d08ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-22 16:24:25 +00:00
Andre de la Rocha
1bb8627f8f Extend PDF engine to allow the generation of PDFs with huge pages
Qt's PDF engine previously supported only the PDF v1.4 standard, which
only allows pages of up to 200x200in (about 5x5m). This patch optionally
enables the generation of PDF v1.6-compliant files that allow the
redefinition of user space units, so that pages of up to 381x381km are
now possible. By default, generated files are compliant to v1.4 spec.
v1.6 compliance must be enabled by, e.g., calling QPrinter::setPdfVersion()
with QPrinter::PdfVersion_1_6. PDF v1.6-compliant files require Adobe
Reader 7.0 or newer (also worked with the built-in viewers in current
versions of Chrome, Firefox and Edge).

Task-number: QTBUG-69386
Change-Id: I21708e0d465d5d7d9e46ff06dd04acfe1dfb0858
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-10-22 15:53:17 +00:00
Ivan Komissarov
07f79a8029 qimagescale: Get rid of the memset call
There is no need to call a memset as long as class is initialized with
new and default-constructor will initialize values.

Change-Id: I02f9ec524e32cb72713f6b5e37b60f3dec72fb28
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-21 18:15:09 +00:00
Anton Kudryavtsev
ef02dd14cd QMovie: use rvalue more
Change-Id: Idf052436190bf225662ff6c1d4b7b8e3c0c84685
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-21 12:11:56 +00:00
Qt Forward Merge Bot
7a252ac467 Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: Iaf28977e7ecf566b28b9406dcb005d48621169c2
2018-10-21 01:00:09 +02:00
Eirik Aavitsland
6599c1f758 QPicture: fix crash for malformed picture
A file with the correct QPicture magic bytes, but shorter than a full
QPicture file header, could cause the header decoder to access memory
out of bounds. Add a size check to avoid.

As a driveby, generally harden the parsing against malformed files.

[ChangeLog][QtGui][QPicture] Fix crash reading malformed picture file

Task-number: QTBUG-71208
Change-Id: I86eb1f915ca9b3a4b91c7433036d76ed6061e2f0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-10-18 09:03:03 +00:00
Mikhail Svetkin
7d03b9b300 qpainterpath: Fix Q_ASSERT typo
Task-number: QTBUG-71156
Change-Id: Id1669f72a684171ad8c72badad56e72ee20ee625
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-10-17 10:53:22 +00:00
Liang Qi
ccf26f6a88 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/plugins/platformthemes/platformthemes.pro
	src/printsupport/kernel/qplatformprintdevice.cpp

Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
2018-10-17 10:35:28 +02:00
Tobias Hunger
a174b3df44 Fix wrong keyword in configure.json
'description' is used only once in all configure.json files, so
I assume that was meant to be 'purpose'.

Change-Id: I66e9d9196c27d2f2131c2d57ea03895e8f5ce754
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-16 11:24:09 +00:00
Allan Sandfeld Jensen
1cd2955173 Fix enum passed to QFontDatabase::findFont
The script taken here is a QChar::Script, not a
QFontDatabase::WritingSystem. This means it was passing QChar::Unknown.

Change-Id: I919ae7187ba277346a7719116a94776dce24dd84
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-16 11:14:31 +00:00
Laszlo Agocs
e0b1c39bed Drop cached shaders when arch is different
According to reports Intel on Windows gets confused when feeding
program binaries retrieved from x86 and x64 builds into each other.

Task-number: QTBUG-64697
Change-Id: Ia7748f532ad06942a92c6fbfc4c9d1ad16bc785a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-10-16 07:20:12 +00:00
Ulf Hermann
402efef57b Don't drop update requests when closing and reopening windows
Before commit 4d15f393a7 update requests
were handled by a timer on QWindow. Therefore they survived the closing
and re-opening of platform windows. Now, as the timer was moved to
QPlatformWindow, it gets reset when you close the QWindow, and any
pending update requests are lost. However, we do set the
updateRequestPending variable on QWindow when requesting an update.
Therefore, we can also restore the update timer on the platform window
when creating it.

Change-Id: I23b00f24a46706beac7d1455edd8a5623db46b22
Fixes: QTBUG-70957
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-10-16 07:09:36 +00:00
Gatis Paeglis
00ae1e6b7b xcb: respect QEventLoop::ExcludeUserInputEvents in native event handlers
This was a regression from Qt 4.

Before this patch, we supported filtering events only at QWindowSystemInterface
level, but to properly support filtering in QAbstractEventDispatcher::filterNativeEvent,
we have to filter the events earlier. Now it is possible to enable/disable this
feature for platforms that support native event filtering.

The mapping of which events are user input events were taken from
QWindowSystemInterfacePrivate::EventType.

Task-number: QTBUG-69687
Change-Id: I9a5fb9f999451c47abcdc83fdcc129b5eeb55447
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-16 06:57:01 +00:00
Eirik Aavitsland
fc4b0769a5 Fix pdf printing in static builds
The pdf engine uses a resource file, but Q_INIT_RESOURCE() was lacking.

Task-number: QTBUG-71070
Change-Id: I685961b3f2eea0ffe6b5313c72d504a8ad9a98e5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-10-16 06:56:19 +00:00
Cristian Maureira-Fredes
1f6bfc2207 Doc: Move literal code block to a separate file
We need to override this snippet for the documentation
we generate for Qt for Python, and it is easier to have
it on a separate file.

Task-number: PYSIDE-801
Task-number: PYSIDE-691
Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-10-15 10:55:18 +00:00
Eirik Aavitsland
f2f040ae1c Improve support for QImages in QDataStream read transactions
QImage's operator>>(QDataStream&) did not set an error mode on the
stream on read failures. That would break QDataStream transactions.
Since the current QImage serialization cannot differentiate between
truncated and corrupted data, we set the ReadPastEnd error as expected
by the transaction system.

Also specify the expected file format on decoding QImage from stream,
to avoid all the format handlers' canRead() being invoked. This is
necessary since some of them may call ungetChar(), which fails when
the stream is in a transaction.

Also add testing of this feature to the QDataStram transaction
autotest. That required a slight rewrite of the fake sequential
QIODevice subclass. The previous implementation had incorrect
behavior of peek(), which is required by QImage decoders.

Task-number: QTBUG-70875
Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-15 07:18:57 +00:00
Lorn Potter
52070f3a6c wasm: fix wasm shader compile
This fixes qopenglwindow shader in the triangle

Task-number: QTBUG-67338
Change-Id: I8552183bf9ca45e9b56760b340d014ddd34c21f4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-10-15 00:19:13 +00:00
Giuseppe D'Angelo
72fc65784d QImageReader: add tracepoints for image loading
Change-Id: I5fe25793eeda01a4fa1658091890af23f66b7089
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
2018-10-14 22:00:26 +00:00
Alexandra Cherdantseva
1192c463db QImageWriter/QPNGHandler: Quality option should be CompressionRatio
Wrong option was used to set zlib compression level for png
setCompression with negative value uses default compression
setCompression with value between 0-100 converts to zlib compression level 0-9
setCompression with positive value overrides Quality option

Change-Id: Ic4b048a1e30d6940019c2a00a6c24d0c11e3f821
Reviewed-by: Alexandra Cherdantseva <neluhus.vagus@gmail.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-14 19:36:33 +00:00
Christian Ehrlicher
bbe08d6b68 QCss: properly parse functions which contains additional spaces
When there were additional spaces between the function definition and
the first parameter, the parser failed to parse it when it contained
another function (e.g. 'qlineargradient(... rgb() ...)').
The reason for this was that ::until() needs the function at index-1 so
it can correctly count the opening parenthesis.

Fixes: QTBUG-61795
Change-Id: I992f556e7f8cd45550f83bc90aa8de2b4e905574
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-12 22:01:14 +00:00
Liang Qi
3eebadc173 Modernize the "mimetype" feature
Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:26:33 +00:00
Liang Qi
c593492d16 Modernize the "animation" feature
Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:26:15 +00:00
Anton Kudryavtsev
02f7caaa7d QPixmap: use rvalue more
Change-Id: Ifb8c014abf6e02dc782fab2d653e4edfc4972125
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-10 12:20:32 +00:00
Allan Sandfeld Jensen
f864a62ccd Add missing null checks after detach
A few places we didn't check if detach() succeeded including
in reinterpretAsFormat(), where it can be undone.

Task-number: QTBUG-70785
Change-Id: Ibcc8e26e2961f6288eb7a045ae1cb28e59213a49
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-10 08:23:31 +00:00
Allan Sandfeld Jensen
b7c5c2e65b Add NEON optimized ARGB32 unpremultiply routines
Mirroring similar routines recently added for SSE4.1

Change-Id: Ibb9d10cc34655ce1dc0e97fdff4e4f6a81d47d05
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-09 13:17:47 +00:00
Qt Forward Merge Bot
b4da5c6b93 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/tools/qtimezoneprivate.cpp

Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
2018-10-08 10:00:49 +02:00
Allan Sandfeld Jensen
9d27aec869 Optimize gamma-table lookup on SSE2 and NEON
Speeds up gamma-corrected text rendering.

Change-Id: I38c12ff52f4601853c3f3524de2761a932111160
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-10-05 19:56:15 +00:00
Andrew O'Doherty
b2b32d3147 fix HTML subset documentation is not very readable on smaller screens
When viewing "Supported HTML Subset" documentation in Qt Creator (in
QTextBrowser), the first table that lists all tags is quite unreadable
(see images). It happens because there is a code snippet in Comment
column for tag "meta" that uses pre-formatted text. Because it should
not be wrapped automatically, it ends up pushing first 2 columns into
their minimum size, which mostly makes them take a single letter per
row.

Task-number: QTBUG-64126
Change-Id: I08bf6f61806d52e7a2f47bdbed1b5950825ce739
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-09-30 21:05:03 +00:00
Friedemann Kleint
97f4366202 QLineEdit: Disable input methods for password unless IME supports hidden text
Move the checking logic from QGuiApplicationPrivate::_q_updateFocusObject()
to QInputMethodPrivate::objectAcceptsInputMethod(), which is also called
from QWidget::updateMicroFocus() via QInputMethod::update().

Fixes: QTBUG-56767
Change-Id: Ia4cce5e7e766008df891537048d5daf739c010ff
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2018-09-29 19:45:35 +00:00
Laszlo Agocs
76c4a70499 QOpenGLShader: report geom. and tess. on GLES 3.2+
Also fix up the docs.

To make everything more complicated, OpenGL ES 3.2 does not support
default tessellation levels. Therefore the related functions remain
OpenGL 4.0+ only.

[ChangeLog][QtGui] QOpenGLShader has been fixed to expose geometry and
tessellation evaluation/control shaders with OpenGL ES 3.2.

Task-number: QTBUG-66074
Change-Id: I2e4277912800d8302824e3fb74f61ec16f4b341d
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-09-28 13:59:42 +00:00
Liang Qi
353a58ceb9 Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-09-27 18:34:12 +00:00
Liang Qi
d0fcaa7eaa Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/global/qconfig-bootstrapped.h
	src/widgets/util/qcompleter.cpp

Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
2018-09-27 11:08:55 +02:00