It was added in c3a963da1f.
wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7.
Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Previous implementation relies on the fact that the only text document
with height -1 can grow or shrink vertically, and, hence, a bounding
rect should be updated under this circumstances. But method
QTextDocument::setPageSize might set a height different from -1, and
QGraphicsTextItem will be growing/shrinking vertically as well.
So, we have to relax condition to cover all use cases. Bounding rect
will be updated if new size is different from current size. This also
doesn't affect performance.
Fixes: QTBUG-55527
Change-Id: Id2c8e15d859aff9dde62c8ee14a6859c0c03f0d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We filter out Content-Length from the cache metadata due to IIS
sending it bogusly on 304 responses; however, we were only doing this
if the cached response had a Content-Length header, which doesn't
happen when the original request was delivered chunked. Furthermore,
the filtering wasn't limited to the case of 304 responses. So skip
the "had it previously" requirement and only do this for 304s.
Fixes: QTBUG-72035
Change-Id: Ie5d858e0f0205bf68f0a13a9c9d4a6e844cb3568
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Pointer messages should not be handled when we are inside a move/resize
modal loop. DefWindowProc() should handle this case instead.
Fixes: QTBUG-72078
Change-Id: I5ad7283bcf0cfe0ff7d21cf5640270c361b8ad8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
While the user is entering the password, the string variable that
stores the value might have to reallocate its content from time
to time (when the string needs to grow beyond its current capacity).
When the reallocation happens, the old buffer is freed, but its
data is not zeroed-out. This means that a QLineEdit that serves as
a password input field might leak chunks of the password during
its lifetime, and the leaks will persist after its destruction.
Since the QLineEdit can not control the behavior of the QString
it uses to store the entered value, the only thing it can do is try
to make the reallocations rare.
This patch reserves the space for 30 characters for the string which
stores the QLineEdit value when said QLineEdit is used for password
input. This is enough to make sure no reallocation happens in
majority of cases as barely anyone uses passwords longer than 30
characters.
[ChangeLog][QtWidgets][QWidgetLineControl/security] Preallocate a buffer
for the string that contains the entered value when the QLineEdit serves
as a password input field to minimize reallocations.
Change-Id: I3e695db93e34c93335c3bf9dbcbac832fc18b62d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Cosmetic, so we can avoid using QMap::insertMulti().
Change-Id: If7c971e127af0537dd28bd25f7803804e7e01170
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
And having duplicated entries in the hash doesn't make any sense. So use
regular iteration and insert for streaming the data in and out.
Change-Id: Ic3983010bdb9e17b207c6038fdccf43659da0e23
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It can be just as well received from the QModelIndex member.
Change-Id: I72f930206ca2afed730009778ded0e56e4e6f278
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
The NSAccessibility protocol has a property accessibilityParent.
This adds the implementation. The protocol will be adopted in a
follow-up commit.
Change-Id: I648cdc201950159e8268743a7fcdd24beb58c1c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Calling mysql_stmt_free_result() frees the results of the last
executed query while keeping the prepared statement valid. This
allows to keep around prepared QSqlQueries without the overhead
of keeping all the results in memory.
Change-Id: I4589e90857cc4e9a6f9612799bfca967a67e2ab2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Currently, a tile rearrange will move the active subwindow (if any)
to position zero (top-left). This ignores any tiling order set via
setActivationOrder(). This change removes this move so that the set
tiling order is respected when a tile operation is performed.
Fixes: QTBUG-43356
Change-Id: I2c481f0ffe45e42e811c6b6d476eb4cb65aa5d1f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
[ChangeLog][QtCore][QVector] QVector does not require a default
constructor for its template argument anymore.
Change-Id: Idd256dd756829561c21bd9e1e693f2918f1e3247
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This patch introduces a private 'API' to enable server-side OCSP responses
and implements a simple OCSP responder, tests OCSP status on a client
side (the test is pretty basic, but for now should suffice).
Change-Id: I4c6cacd4a1b949dd0ef5e6b59322fb0967d02120
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This macro declares three template functions that are different for each use
of the macro. The functions are in the public API but they are not meant to
be documented. This update just defines the macro to be empty so clang in
qdoc will ignore it.
Without this, clang reports a lot of errors incorrectly, but if we let clang
process the macro, it declares all those extra functions which then must be
documented with \internal in the cpp files, and we don't want to do that.
This will probably be redone in a later version using a custom annotation attribute.
Change-Id: I78ae4bcc98a3844b803d7ef7b1eba5d5539b043f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>)
corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue)
gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString)
printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString)
printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant)
tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name)
Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QListWidget::(is|set)Item(Selected|Hidden)() are deprecated for a long
time but not marked as such. Therefore explicitly mark them as
deprecated so they can get removed with Qt6.
Change-Id: I4567e740f1ebb5841b2e5b50c601fb83a782950c
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Usually we embed the private key for the leaf certificate, but in
Schannel _q_makePkcs12 is also used to create a certificate store for
our CA certificates, which we don't have any private key for.
So lift this restriction.
Change-Id: Ic86a2a6725f2c8272c951148eb97e18a964a36f2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Remove braces for single-line bodies, space around binary operators
Change-Id: I958396772966428dcd9694279175fd61d6109b40
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
There is no sense in testing the 'm_widget' 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: I898bac6d9b51b2abd7a5311aa71ac2492c7c042c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
QMdiAreaPrivate::resizeToMinimumTileSize() does not take into account
scroll bars when calculating the minimum size for the QMdiArea widget.
As a result, if scroll bars are enabled or showing during a tiling
operation, the top-level widget incorrectly expands in size (instead of
utilizing the scroll bars). Therefore, we should only resize the
top-level widget if scroll bars are disabled.
Fixes: QTBUG-40821
Change-Id: I3a8b7582d23fdf12d2b09f3740eea6b60bb395c3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The calculation of the minimum width assumes that when there is no label
for a row, the field occupies the full row. But this is only true when
QFormLayout::SpanningRole is set for this row. This lead to a to small
minimum size for the row / truncated widgets when the row in question is
the longest one in the form layout.
Fix it by checking if it is a spanned row instead if there is not label
when calculating the sizes.
Fixes: QTBUG-18308
Fixes: QTBUG-60800
Change-Id: I1a610c93ab5c7f9cac503721ae99b36f2710c634
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Using QT_MMAP macro instead of mmap() so we could map more than 2 GB of
the file. Not that the file format supports such a thing, but just in
case.
Change-Id: Iae320a2868db402a993dfffd15689bba1d667c7d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The support for setting the style name in the QTextDocument
API was never added, as revealed by the example in the
linked bug report.
The actual bug reported there (style names not working with
some Helvetica Neue) is not reproducible anymore.
[ChangeLog][QtGui][Text] Added support for setting the font's
style name in QTextCharFormat.
Task-number: QTBUG-22813
Change-Id: I8f4d12151c3611aa30965fd963bc93f7c4264e23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The more modern LC_BUILD_VERSION load command was introduced in the 10.13
SDK to unify the various versions of the LC_*_VERSION_MIN command. When
building with a deployment target of 10.14, the linker will use this
load command instead.
Change-Id: Ic3571fdbfdf4dfb9346128c6f6e75d1e06f86cd2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The old name was confusing as it conflicted with
QList<T>::swap(QList &other), that was doing something
completely different.
Rename the method to swapItemsAt() which is a lot clearer.
Change-Id: Iac77a1e790a7256766f83a24d2a243c880d875f4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This is a very slight source incompatibility, but required as
a preparation for Qt 6, where QList should inherit QVector or
share the implementation with it.
This requires some special work to correctly instantiate and
export QVector<QPoint> from Qt Core on MSVC.
Change-Id: I1d042c5fafdde7afe59409eda2580871d4832fcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch enables OCSP stapling in QSslSocket::SslClientMode (OpenSSL back-end
only). OCSP stapling is described by RFC6066 and based on the original OCSP as
defined by RFC2560. At the moment multiple certificate status protocol is not
supported (not implemented in OpenSSL). SecureTransport does not support OCSP
stapling at the moment.
[ChangeLog][QtNetwork][TLS] Added OCSP-stapling support for OpenSSL backend
Task-number: QTBUG-12812
Task-number: QTBUG-17158
Change-Id: Id2e0f4cc861311d1ece462864e5e30c76184af8c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
this considerably speeds up failures, as no doomed build is attempted,
and produces more reliable results, as no second lookup (which would be
subject to environment changes) is done any more during the build.
in principle, this also opens up possibilities like selecting specific
variants of dependencies, automatically extracting rpaths, etc.
qt_helper_lib.prf also needs to create fully resolved library names now.
Change-Id: I65f13564b635433030e40fa017427bbc72d1c130
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Make the decoder fail early to avoid spending time and memory on
attempting to decode a corrupt image file.
Change-Id: I598db817c387867a449040f5be5427c8b8746483
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This mechanism should only be enabled only for debug deployments, but
the check was removed by accident in ca139228ab.
Fixes: QTBUG-72230
Fixes: QTBUG-72132
Change-Id: I3378436e93314fdf254919aed066f1284a4581b3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
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>
The contents of a deleted QString can still remain in memory
and can be accessible by tools that read the raw process memory.
This means that a QLineEdit that serves as a password input field
can leak the password after it is destroyed.
With this patch, the contents of the m_text string member variable
will be zeroed-out before the m_text is destructed. This is done
only in the cases when the QLineEdit serves as a password field.
[ChangeLog][QtWidgets][QWidgetLineControl/security] Zero-out the string
that contains a password entered into the QLineEdit
Change-Id: I8f88f952244bf8a0399c14acf0869439ca0a60ca
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Certain fonts with multiple styles have the same family name. When
loading these as application fonts we were not specific enough when
querying for the text metrics. This meant that e.g. the bold version in
a font family would get the metrics of the regular one.
Fixes: QTBUG-67273
Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
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>
no need in duplicating DTLS-specific cases.
Change-Id: I475c6fb53daa44d60a5054bf3acc8474355b2186
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If the application gets suspended when a blocking queued connection is
made then it will cause the application to hang when being resumed.
Therefore a check is needed to still post the event to the other thread
but in a non blocking manner so that it does not cause a hang on return.
Fixes: QTBUG-72101
Change-Id: I6d53c97ed6d9d500559da2a9fd195226d1fc9905
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
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>
This was a regression from Qt4, due to not setting the window
group leader in WM_HINTS property. Qt4 did set this property.
It was not obvious that something was missing because of the
similarly named WM_CLIENT_LEADER property, which we do set.
Testing revealed that setting WM_CLIENT_LEADER is sufficient
on some DEs, e.g. KDE, Unity, but did not have the desired
effect on e.g Gnome and XFCE.
EWMH/ICCCM specs are known to be ambiguous, WM_CLIENT_LEADER
is only mentioned in the section on the session management, so
it is not surprising that there is this inconsistency between
various WMs.
This patch merely restores a lost WM hint. This solves the
reported issues on major desktops. If we support calling show()
on a dialog before its parent has been shown is still an open
question, which should be handled in QTBUG-72040.
Task-number: QTBUG-56829
Fixes: QTBUG-46626
Fixes: QTBUG-70756
Task-number: QTBUG-72040
Change-Id: Id2c575850e5f4f5af3e57963c577d33572e30b6e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
... printed by QPainter when it gets a pixmap with one or both of
dimensions equal to 0 (and a nullptr as a paintEngine).
Task-number: QTBUG-71806
Change-Id: I978f56c843daab307042e34390fc33f338ce8cf5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
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>
Commit 17b73b0d2b regressed performance by grabbing
the entire screen and then copying the grab region.
Move back to grabbing a minimal rectangle instead.
Also handle multi-screen grabs at different device
pixel ratios.
Multi-screen grabbing is handled by grabbing each screen
individually, and then stitching together the result.
The returned pixmap is created using the highest DPR
available, upscaling lower resolution parts as needed.
Change-Id: I9d45c5f7ec7b342360b745f49ef2939dc588f40b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
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>
The code was previously assuming font-smoothing was only used with
A32 font antialiasing, so the corresponding gamma-correction was not
performed.
Task-number: QTBUG-71075
Task-number: QTBUG-71946
Change-Id: I68d8304cf18638239d8bfac32c67333f16ccc7bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Also, add a note that explains that autoRepeat does not affect
QToolButton's autoRepeat property.
Change-Id: I9e95cef9e9d1b5ee6cb1114d0b9a9fad562db601
Fixes: QTBUG-48204
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
How to test:
* Have two printers
* Use lpoptions -d to set the default printer to be one and then the
other
* Use lpstat -d to check setting the default printer worked
* Use this simple test program and check the resulting values make
sense
qDebug() << "DefaultPrinter" << QPrinterInfo::defaultPrinter().printerName();
const QList<QPrinterInfo> list = QPrinterInfo::availablePrinters();
for(const QPrinterInfo &pi : list) {
qDebug() << pi.printerName() << pi.isDefault();
}
Fixes: QTBUG-70317
Change-Id: I535d11451c568630a374f5c37d8cac32cbb6d3ab
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Instead of tying the linear-conversion to a specific function, we move it
to imageForGlyph and base it on the premise for needing it.
Change-Id: Ib8fc79ad419ef703abcb82785ac15d4c75fb98e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The font smoothing helper in particular now takes into account whether
or not we're dealing with color glyphs, in which case we shouldn't (or
don't need to) smooth, and also makes sure the QFont::NoSubpixelAntialias
style strategy doesn't affect font smoothing when we're dealing with
non-subpixel-antialiased font smoothing, as on macOS 10.14.
Change-Id: Ibd477158629402c55cafec31576b6d9901d184cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The setting is not relevant for modern macOS applications, and none of
the applications shipped with macOS today are affected by it.
The only code path in macOS that picks it up is +[NSFont initialize] in
the UIFoundation framework, storing it for later so that -[NSFont screenFont]
and -[NSFont screenFontWithRenderingMode:] can use it, but these APIs are
deprecated and we don't use them in Qt.
Other NSFont code paths will not hit these APIs unless screen font
substitution is enabled, something it hasn't been since OSX 10.7.
https://preview.tinyurl.com/yctpfnqp
Removing handling of this setting allows us to simplify the reasoning
for whether or not antialiasing and font smoothing is enabled for a given
engine.
Change-Id: Ie2809052a1a0815d9bddedd4a6236eb6c898f993
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
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>
It will avoid a creation of temporary object and avoid copying.
Change-Id: Ifae5f6f9e36bcb07f4bacc31f151f8adcfa621a3
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
The 'aa' argument doesn't unconditionally enabled antialiasing, it just overrides
the check that the pointSize is larger than the antialiasing threshold. If the
styleStrategy has QFont::NoAntialias we still end up without antialiasing.
Change-Id: I7130e7c68d883c2443756242e96790264f583b0f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Makes for clearer code than looking at the glyph format.
Change-Id: Id6dd2a7851aac2a42cc27d9e2fb408ce9a5345d3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The way macOS does font smoothing has changed in Mojave, and we need to
take both this new algorithm into account, as well as support users who
set legacy preferences to revert back to subpixel font smoothing.
As a followup to this patch we will tweak some of the existing logic
to take the new font smoothing algorithm into account, so this is
just a first step.
Change-Id: If37014c18515f406b8bb8194c9df7a75c2eb10fc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Turns out that also Debian patches OpenSSL 1.0, changing its soname to "1.0.2".
Therefore, try also to load that one.
Amends 2708c6c11d.
Task-number: QTBUG-68156
Change-Id: I37cc060e90422779a6c29a324ab900f0fb99cfa7
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Removes assumptions about QImage format in a few places.
Change-Id: I515701be53190429a48956c31986fa0804806406
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The operator T() function of QAppleRefCounted should be const so
that the underlying type can be accessed from const member functions
just like the naked underlying type could.
Change-Id: I0819c5795d28442a6ff4db2732e211b183574f9f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The function doesn't need the flags argument, nor does it need the
ctfont or fontdef arguments if it's a normal const member function.
It can also be used from QCoreTextFontEngine::stringToCMap(), instead
of duplicating the code. This was originally the case before b4aa5d97
which improved surrogate pair handling, but for some reason the change
introduced the duplicate code instead of just changing the arguments
in the function call slightly.
The use of 0xff000000 to skip certain glyphs looks dubious, and is
probably related to QFontEngineMulti's use of the high byte to
indicate which engine the glyph came from, but the multi engine
strips this away before calling out to the concrete engine so
it could potentially be removed in a later patch.
Change-Id: I6c693595616da1b69fdbe3d7a31e392a8443369d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
It's only used in a single function (twice), so let's keep it
closer to the call site.
Change-Id: I7f8ceadc380171237eef3fa6b03ccd6bc89e99af
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The leak has been there since the beginnings of Qt 5.0.
Change-Id: I238181dcc63cb4cf8a60b5c565b184d8278d0315
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Keeping the fake parent window around in a created state means we're
wasting system resources such as native platform views/windows, and
makes it harder to debug the lifetime of these resources.
The fake window will be re-created if re-parented into at a later
point.
Change-Id: Ib82560e7e565af19d58afe121fd087669a6ffb95
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
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>
First of all, we were using the wrong size variable: instead of the size
of the section, found in the section header, we were using the size of
each section entry in the section table. Since that's usually smaller,
we weren't hitting a problem.
Second, if the string table is the last thing in the file and there's
nothing else after it, not even padding, then offset + section_size can
be equal to the file size. In fact, the .shstrtab section is usually the
last one, as it contains the section names themselves, so it stands to
reason that it's the second to last thing written.
For generic linkers, the last data in the file is the section table
itself, so usually the file is larger by at least a kilobyte, which is
why we haven't hit this bug. It could only manifest as deciding that
certain specially-crafted but valid ELF files were invalid. I can't
think of a way to trick it into thinking an invalid ELF is valid.
That's another reason why this code needs to be rewritten with more
modern coding styles and actually using <elf.h>
Fixes: QTBUG-71443
Change-Id: I1bd327aeaf73421a8ec5fffd156162f2df5557b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Originally QAtomicPointer didn't have the three-operand version,
resulting in code like:
if (!atomic.testAndSetXxx(expected, newvalue))
expected = atomic.load();
The three-operand version gives us the current value of the atomic in
case the test failed and it's free in all architectures, unlike the
extra load.
I have to use testAndSetOrdered here because I need the failing load to
use the Acquire memory order, even though that has an extra Acquire for
the successful case we don't need. QAtomicPointer does not have
testAndSetReleaseAcquire.
Change-Id: I1bd327aeaf73421a8ec5fffd1560fe30d3bfd9b8
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
If a focus frame is set around a widget that exist inside a
QAbstractItemView, both the focus frame and the widget will
be scrolled when the table is scrolled (since the focus frame
is a child of the view). The result is that after the widget
has been scrolled (which will move the focus frame to the
correct position as well), the focus frame will be scrolled
next, and therefore away from the widget.
This patch will catch this case by always adjusting the
focus frame position when someone tries to move it. Trying
to move the focus frame away from the widget it tracks
will anyway be flaky.
Fixes: QTBUG-63877
Change-Id: Ic2aacc4fafc219280e32092c258a7539d0db9cd0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QOpenGLWidget uses an FBO internally, that is glCleared whenever
recreated. But for the clear to be visible across shared contexts
we must also issue a glFlush.
QOpenGLWidget defers this flush until the compositing step, in
QOpenGLWidgetPrivate::beginCompose(), based on a flushPending
variable.
This variable is set either after invoking the user's paintGL()
function, or when opening a QPainter on the QOpenGLWidget, via
QOpenGLWidgetPaintDevice::ensureActiveTarget().
Unfortunately, if QOpenGLWidget::paintEvent() is overridden or
intercepted (meaning we will not end up calling paintGL()), but
the overridden paint event does not open a QPainter, we end up
never setting flushPending to true, and end up composing an
uninitialized FBO.
This can lead to rendering issues, or even kernel panics with
some unfortunate GL drivers.
The fix is to ensure the glClear is always flushed before
composing, by forcing a pending flush whenever the FBO is
recreated.
Fixes: QTBUG-70921
Change-Id: I72b596c09dcf54bd0f37668062daaad2d6f7f4bd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If the time the widget is set to use falls in the gap skipped by a
spring-forward, setting the date to the day of the spring-forward
turned a valid date into an invalid date-time. So use the usual trick
to map the "draft" date-time to a valid one.
Fixes: QTBUG-64485
Fixes: QTBUG-58947
Change-Id: Ib8f0f092cd5d6dce3da31eb52cd42150ca0d1fcb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This makes it clearer that const-ref needs to be specified in
the template arguments of qOverload() and related.
Change-Id: I527c8ca853be159af8665e9759d9549df10573b3
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
SSL_CTX_set_ciphers is new in 1.1.1.
Task-number: QTBUG-71983
Change-Id: If0ae9f95dcc867c62ed0d3a6a60c22c7f5e1cc9f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 36f3eeaf3e)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Do not reset the isSubWindowsTiled flag if the hide/show event is an
external (spontaneous) system window event, i.e. we should instead
reset this flag when the subwindow itself is directly hidden or
shown. This change ensures that tiling will be performed during the
resizeEvent after an application window minimize (hide) and then
restore (show).
Change-Id: Ib37f52f1162b493be3413fc59951be2f30701439
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The previous implementation leads to infinite chain of showing/hidden
line edit under circumstances described in QTBUG-54676. We basically got
the situation when size hint were calculated differently depending on
the line edit visibility state. In this case toolbar layout have to
show/hide extension button and line edit a lot of times and can never
leave this "loop" (please note, that the chain is much more complicated
in reality):
Resize toolbar -> Set layout geometry -> Size is OK to display line edit
-> Set layout geometry -> Hide extension button -> Set layout geometry
(wrong size is calculated here, so "run out of space") -> Hide line edit
-> Set layout geometry -> Show extension button -> Set layout geometry -
> Size is OK to display line edit ... And we're in the "loop"
Clear button is hidden if there is no text in a line edit.
In the previous implementation, the button was always visible, only
opacity was changing in order to "hide" the button. It resulted to
incorrect size hints (regular and minimum).
In the current implementation the button is really hidden/shown, and
size hints calculated correctly.
Also updated unit test for line edit.
Remove code duplication in functions for calculation text margin
Fixes: QTBUG-54676
Change-Id: I4549c9ea98e10b750ba855a07037f6392276358b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Most of our containers do not require a default constructor for
the template argument. Of course some operations (such as reserve)
still need it.
Change-Id: If080c422a1ffc13b8cb5e0915cee9a7adee81adc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This will be the only options for Qt 6, so make sure the code compiles now.
Change-Id: I23f791d1efcbd0bd33805bb4563d40460954db43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Add a tri-state setter logic similar to the other properties.
Fixes: QTBUG-71471
Change-Id: Iddb5be18a037634a53ad8725bddb91c12fb33fed
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Amend the check introduced by bde6a04949
to not apply to embedded windows and plugin applications.
Fixes: QTBUG-71991
Task-number: QTBUG-7081
Change-Id: I80b3dc0fa20ee3447a4bc4bbb41e66d4d90ab726
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Using similar techniques as used for QRgb qPremultiply and friends
Change-Id: I4be68cb01dc3b634cf370323884e824674205998
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The hasBorderInFullScreen only has an effect when set before
the window is shown or switched to fullscreen. This is currently
not possible in the QML case since the window is only accessible
after all properties (including visibility) have been set.
Add a function to set a default value.
[ChangeLog][QtPlatformHeaders][QWindowsWindowFunctions] Add a default
setting for hasBorderInFullScreen
Task-number: QTBUG-47247
Task-number: QTBUG-71855
Change-Id: I3952e3f34bc4eb134cf1c5265b4489fc74112688
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When using Q_DISABLE_COPY, clang-tidy reports:
warning: class 'Foo' defines a non-default destructor, a copy constructor
and a copy assignment operator but does not define a move constructor or a
move assignment operator [cppcoreguidelines-special-member-functions]
Add convenience macros to suppress move constructor/assignment
as well.
[ChangeLog][QtCore] Added macros Q_DISABLE_MOVE and Q_DISABLE_COPY_MOVE
complementing Q_DISABLE_COPY.
Change-Id: I0b07495ef4ef06c714f7368c706168613c3fe7bc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This is necessary to provide details for the key too,
when the server is using DHE-RSA-AESxxx-SHAxxx.
Amends 7f77dc84fb.
Change-Id: I8ab15b6987c17c857f54bc368df3c6c1818f428c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
SSL_CTX_set_ciphers is new in 1.1.1.
Task-number: QTBUG-71983
Change-Id: If0ae9f95dcc867c62ed0d3a6a60c22c7f5e1cc9f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
State the policy that so far only exists in the localization wiki
and is currently not followed by all translators.
Task-number: QTBUG-57697
Change-Id: I2aa9f1bbd244b53e48e59f625520a7f86d2df347
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Fixed a misguided condition in the check for bogus texts in the sscanf
branch of the decoder; it checked for 'e' but neglected 'E', which is
just as valid.
Change-Id: I9236c76faea000c92df641930e401bce445e06c8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Revised some toFloat()s to be consistent with the matching
toDouble()s; previously, they would return infinity if toDouble() did
but return 0 if toDouble() got a finite value outside float's range.
That also applied to values that underflowed float's range, succeeding
and returning 0 as long as they were within double's range but failing
if toDouble() underflowed. Now float-underflow also fails. Amended
their documentation to reflect this more consistent reality.
Added some tests of out-of-range values, infinities and NaNs.
[ChangeLog][QtCore][toFloat] QString, QByteArray and QLocale returned
an infinity on double-overflow (since 5.7) but returned 0 on a finite
double outside float's range, while setting ok to false; this was at
odds with their documented behavior of returning 0 on any failure.
They also succeeded, returning zero, on underflow of float's range,
unless double underflowed, where they failed. Changed the handling of
values outside float's range to match that of values outside double's
range: fail, returning an infinity on overflow or zero on underflow.
The documentation now reflects the revised behavior, which matches
toDouble().
Change-Id: Ia168bcacf7def0df924840d45d8edc5f850449d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
They actually return infinity if conversion overflows, while still
setting ok to false; they were documented to return 0 on failure, with
no mention of this special handling of overflow. Documented reality
rather than changing the behavior. Gave underflow as an example of
failure other than overflow (toDouble()s do indeed fail on it).
Added some tests of out-of-range values, infinities and NaNs.
[ChangeLog][QtCore][toDouble] QString, QByteArray and QLocale return
an infinity on overflow (since 5.7), while setting ok to false; this
was at odds with their documented behavior of returning 0 on failure.
The documentation now reflects the actual behavior.
Fixes: QTBUG-71256
Change-Id: I8d7e80ba1f06091cf0f1480c341553381103703b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The qCompare() implementation for double was handling infinities and
NaN the way tests need, but the one for float didn't; it has just the
same need, so apply the same fix. Extends 79493a3ee1.
Change-Id: I8425026acb61d535e449f579b77fdcd609157f7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
VoiceOver or other tools may query this property even when there is no text
interface. Make sure not to crash by verifying that the interface is supported.
Found while using AccessibilityInspector to verify other changes.
Change-Id: If7ee21b7616f091b71e86bab03a871ddbabe9200
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Follow DRY and do not repeat implementation of basically the same
thing, especially now that the implementation is no longer completely
trivial.
AXLineForIndex can be considered a primitive attribute, and
AXInsertionPointLineNumber a derived attribute, hence this opportunity
to not repeat oneself.
Change-Id: I64b596d8351e681f4438b91400a767407612c118
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
On macOS, the accessibility implementation of InsertionPointLineNumber
currently reflects a fix for issue (QTBUG-49437). While it seems from
testing this issue no longer requires such a fix, it still is a nice
optimization for single-line edits. So we hereby bring the same
optimization to LineForIndex parameterized attribute as well, and
makes the code for both attributes consistent.
Change-Id: I18b8cc249b6c65a25150f4e503999b04437e0306
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: I359768a7cbd4c3e1e11a453a32bb28add891cf20
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
`convertLineOffset` requires exactly one of `line` and `offset`
parameters to be -1.
[ChangeLog][macOS][Accessibility] VoiceOver now reads all lines in
multiline text components when navigating by lines.
Change-Id: I2872c4f5255a33dd2b493b46b22e672eb5779ee8
Fixes: QTBUG-71563
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The code that used it was removed in 55fa3c189f 6 years ago.
Change-Id: I76e42f147342feb1bda9bc2c5aa882af62757812
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
By explicitly identifying the fake window created for the window
container.
Change-Id: Id67a6e22588d04e68f5ede09bc078bb387c12e0b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
As a start, we just log the changes, but going forward we can use this
to report parent changes to QPA or get rid of old QNSWindows.
Change-Id: Id3625fb0b7608d85240f58bdecc70a5892075da3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QGraphicsProxyWidget::setWidget() is checking if the newly assigned
widget is already assigned to a child proxy widget without checking if
the child has a widget assigned at all which lead to a nullptr reference
if it is not the case.
Therefore check if the assigned widget is a valid pointer.
Fixes: QTBUG-15442
Change-Id: I006877f99895ca01975bdcad071cfcf90bea22ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
strlcpy is not available on some UNIX platforms, such as GNU/kFreeBSD.
qstrncpy is available everywhere and has similar semantics (in addition
it fills the rest of buffer size with NULL bytes, but that does not
cause extra work as our buffer sizes are small).
Change-Id: I76c5905eba248fd9fbc1f63f05e88e0617f8407a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We do already require glXGetProcAddress in line 241.
Fixes: QTBUG-71488
Change-Id: Id0f3bc256a71097241b99d2dcba927c1165e980e
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
We report two types of errors - those found by our code and errors
coming from the OS. setErrorString(), despite its name, does not just
set a string, but extracts a windows error code via GetLastError() and
then calls _q_winError(). This is wrong: some arbitrary error code (or
no error) can be reported when it was actually an error found by
Qt. Worse yet, string operations (allocations etc.) can potentially
clear the real error code. So remove setErrorString(), set errors
explicitly if it's the application code error or use _q_WinError
directly.
Task-number: QTBUG-71744
Change-Id: I67277d84006c4ad365f5636caf850e1f3ba4e1dc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
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>
A plugin (such as the Qt virtual keyboard) may provide a platform
input context.
Change-Id: I349ac6c4b96a3536bcde0d44a785cb7bb989fcc6
Fixes: QTBUG-68328
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Use 'msvc' instead of 'win32-msvc' or even 'win32-mscv*'.
Change-Id: I21dc7748a4019119066aea0a88a29a61827f9429
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
PasteboardGetItemCount() can return -1 as result to unsigned variable,
so the further loop will iterate "forever". Return early to avoid hang.
Change-Id: Ie91dba1c193d04513f0496d20bd0b6b0b5b6c151
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
CGContextRelease was called twice, both manual and from the destructor
of QMacCGContext.
Change-Id: Icba7dcda37af7e1f7c72937b3dd2d2cc4ea22c63
Fixes: QTBUG-71934
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
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>
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>
Any other method logs this here, too. This helped
to find the problem of QTBUG-71027.
Change-Id: I2d1f6199837d778ada62dac357764b0609e99692
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
in this case w->parentWidget() is not QTabBar, but QTabWidget and we
never draw PE_IndicatorTabClose control (before the recent major
re-write in qmacstyle we never tested the actual type).
Task-number: QTBUG-61092
Change-Id: I87c4813258cc2b483b2ef278c4a2f8796973af1c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
All the delegate callbacks give us the relevant NSWindow, so we don't
need one delegate per window just to be able to resolve the correct
platform window.
Change-Id: I8e44186da63bf01f029bb0b1fefcd8880f49dda6
Fixes: QTBUG-65693
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Releasing it in [QNSWindow closeAndRelease] is wrong, as we only call
that method from a few call sites, and can easily end up with a normal
dealloc by means of e.g. the [m_nsWindow release] in ~QCocoaWindow.
This still leaves Xcode thinking we have a single leaking delegate
per active NSWindow, as it apparently doesn't realize we're calling
release manually. This needs to be investigated further.
Task-number: QTBUG-65693
Change-Id: I9105602274d8532465e5108aba2b05bf253268e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Q_DISABLE_COPY annotates the functions as deleted but this was not
mentioned in the documentation.
As a drive-by adjust some indentations.
Change-Id: I808fe3f1ce9f949d2ba41436661569ab0f2a9f73
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
When a QScrollBar had a stylesheet the subControlRect() was not properly
mirrored which lead to a wrong scrolling behavior.
Fix it by adjusting the resulting rect with visualRect().
This reverts 00c9ec63a5 since it did not
completely fixed the issue for all use cases.
Fixes: QTBUG-27279
Fixes: QTBUG-38748
Fixes: QTBUG-40443
Change-Id: I19718287be7b4cfc9dbe6951fff99ae48264a855
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In NDKr18 Google removed GCC, most probably the massacre will not end
there and they will remove all GNU tools, so we need to start using LLVM
ones.
This patch still keeps the compatibility with GNU tools if the Qt was
built with android-g++ mkspec.
Change-Id: Ibe1979577e08ce63604d55fc5bbd5f64b3737675
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
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>
QFont, QFontMetrics, QFontMetricsF and QTextLayout constructors
use only const methods of QPaintDevice so there is no reason
for them to require a non-const pointer argument
Fixes: QTBUG-65967
Change-Id: Ibfcdef2a25f0cd4284dad76135fc4c9bf5667d7a
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>