Applications that do not override paintGL() (may happen in some test code)
will not perform any GL rendering, not even clearing. This is fine, but
to be safe we need to do a clear right after creating the FBO in order to
prevent showing garbage.
Task-number: QTBUG-38327
Change-Id: If062901bb18724f961e41856085470e37b49abbe
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
GetGlyphOutline Windows API returns wrong values when used with an
OpenType PS font and in GGO_NATIVE mode. It causes problem when
exporting to PDF. The fix changes the GetGlyphOutline call to use
GGO_METRICS instead.
Task-number: QTBUG-12799
Change-Id: I47d6d16b6e7819b51bc444420ada4a47d5f24f4e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
qatomic_sparc.h was removed previously as part of general cleanup of
old atomic code for Qt 5.3. Unfortunately SPARC include reference was
not removed resulting in build failure on that platform.
Task-number: QTBUG-41384
Change-Id: Ic6e31b32324b0e5dd3700a6a21515a8eea5668bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The fallbacks on the platform should ideally contain all fonts that
support the script passed in, but this would require populating the
font database and checking the unicode ranges for all fonts, so it
would cause a significant performance hit on Mac. What we do here
instead is just return a set of default fonts as the fallbacks
and disregard the requested script.
The consequence of this is that some special unicode codepoints were
not supported on Mac, because we weren't working with a full fallback
list.
To rectify this without breaking performance, we always add Arial
Unicode MS to the end of the fallback list as a final fallback.
This should always be present on the system and has a wide support
of different scripts.
[ChangeLog][OS X][Fonts] Fixed missing glyph box shown in place of some
uncommon Unicode code points.
Change-Id: I4fc8576bfddc8a73204aca2b16437d42c524bc79
Task-number: QTBUG-40986
Task-number: QTBUG-40549
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This is a very useful tool to test the behavior of a given platform
when it comes to rendering on three contexts to three window surfaces
from the gui thread and calling swapBuffers for each.
Change-Id: If3abd055d0dee7cfb24098484326aa24261556bc
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Otherwise it is impossible to set a swap interval different
than the one set by QSurfaceFormat::setDefaultFormat().
Both windows and xcb will pick up the updated interval from the
window on the next frame.
Change-Id: I55a59f83a62d3adcea687adf28639646b576ed58
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Its contents are already inside the "state" member.
Fixes a "TODO" for Qt 5 (bumping it to Qt 6, where we will be
able to break API).
[ChangeLog][QtWidgets][Styles] The usage of the
QStyleOptionProgressBar::orientation member has been deprecated.
Task-number: QTBUG-25121
Change-Id: Ie531bb2f2733b15a213e83c9706468e2bf829359
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The QPixmap(const char* const*) ctor featured prominently in the callgrind
trace of tst_qmdi*, with 23% of total time spent there in tst_qmdiarea
before the change.
Cache the results in the QPixmapCache. That's probably a good idea for all
standardPixmap()s, but none other feature prominently in any of the
widgets/widgets auto-tests, so there's no immediate need to do something
about it.
After the change, less than 3.5% of the total time is spent on parsing
XPMs.
Change-Id: Idfb6ffe0d0f7a4a1f71a7c26fc9ab0f42bdbd7a8
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The only way I was able to find information on this was through bug
reports.
Change-Id: Iac59a82fab9c216495860ad3b1efad1125130002
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The code to draw underlines on specific characters in widget menu could
not handle ligatures. Instead of using special code to handle this case
this patch changes the mnemonic underlines to use normal format-ranges
making the text engine deal with splitting ligatures as necessary.
Task-number: QTBUG-20960
Change-Id: I6159110eae7aa8c819af16ba4a393d758871e2e0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In OS X, certain keyboard layouts (such as Japanese) do not produce
unicode character conversions for Escape and other keys. In these cases
the code uses a fallback scan code check to map the key. The scan code
mapping had the function keys, but there are several other important
keys it can map.
Task-number: QTBUG-41090
Change-Id: I624793c9bb28ae8c98b54539c277943905cac7e2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Each test function is responsible for removing the children it added to
m_window, since m_window is reused for each testcase.
Due to this, the test
QCOMPARE(children.length(), 2);
failed, (it was 3).
Change-Id: Idbd13214d2e841450800df0542fbdbcfaac85ce1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Extend the QImage format with two 8-bit grayscale and alpha formats.
These formats have the advantage over Indexed8 that they have simpler
conversion and can be rendered to by the raster engine.
[ChangeLog][QtGui][QImage] Added support grayscale and alpha 8-bit
formats which can also be rendered to.
Change-Id: I4343c80a92a3dda196aa38d0c3ea251b094fc274
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QtDemo was removed with a commit in qtdoc.
Change-Id: I1803e041e7da57641148a37691ffdc6ae6c85ad9
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
When the user adds a compiler option that qmake doesn't understand, a
warning message is printed. One can suppress these warnings now by
adding CONFIG+=suppress_vcproj_warnings to the project file.
Task-number: QTBUG-37520
Change-Id: Ieb7ad2c900329e76636047dff85824ea0456f608
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
On the save dialog the cancel option is detected now from exec()
method.
Change-Id: I977626b83fe770ddc148b57551becd04e5fd9dd5
Task-number: QTBUG-41020
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
the condition is copied 1:1 from the BUNDLE_DATA logic in qt_module.prf.
Task-number: QTBUG-41267
Change-Id: Ia80a9a29319f70017e090855cf8d35a77b9e727f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This is to align the behaviour with how QGtkStyles behavior is.
Change-Id: Ic85d96cf4a4ab30974b25936de6d5b98e65dd2f3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Qt sets a QCocoaMenuDelegate on every menu it creates in order to emit
the (OSX specific) aboutToShow signal. However, there are a few cases
where OSX will copy a menu without copying the delegate. One of those
cases is the dock: the result of -[NSApplication applicationDockMenu:]
is used to create a new menu, to which a few more items are copied.
This copy is then send back to the dock.
This patch invokes the delegate's -menuWillOpen: method when
-[NSApplication applicationDockMenu:] is called. Note that sub-menus
won't receive the call-back, because the dock doesn't tell the
application what happens after returning from applicationDockMenu:.
Task-number: QTBUG-39604
Change-Id: I0e06df371a3d77342ae4b7148041214e5c4579d7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QToolButton::sizeHint() takes into account the presence of a menu.
However, setMenu() doesn't retrigger a size hint recalculation. Hence,
(un)setting a menu on an already sized tool button won't properly
reset the size hint. Since the calculated size hint is cached,
delete the cached value and call updateGeometry to cause a
recalculation.
Task-number: QTBUG-38949
Change-Id: I6e79e5e70e31afdfd129282b3668875eca86f51d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The code transformed the coordinates from the view to the window's
content view, and since that content view is flipped in the pure
Qt world (content view == QNSView), it manually flipped the
coordinates to transform from that to window coordinates.
Instead just directly transform the view coordinates to window
coordinates using standard Cocoa methods, which then works with
any kind of content view and NSWindow configuration.
Task-number: QTBUG-40958
Change-Id: Idddd327fe9cff3309606379d0e04ee8b4bd5eece
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
QSplitter::handleWidth() returns either a style dependent value if
d->handleWidth is negative or the value of d->handleWidth itself.
So to preserve this choice after calling saveState()/restoreState()
we should save and restore the value of d->handleWidth rather than a
result of handleWidth() which is non-negative.
Change-Id: Idc11f8063d34b6c4a5f9b0a0032868679766dfb9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
[ChangeLog][QtWidgets][Styles] Allow overriding standardIcon() in a proxy style
Change-Id: I3c7983a7e51a8b220a0ca8ead2b4d7b87a77d71b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The current behavior was that accessibility is enabled if the variable
is _not_ set, which causes accessibility to be enabled all the time even
if a screen reader isn't present.
Change-Id: I73286622fb5abe1cedce420e760306ab7f200e69
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
It used LCID without including qt_windows.h while QT_USE_ICU was
defined.
Change-Id: I3d4cf0e6bd0e299729d23d9a36c5a87adde774c9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Mouse events synthesized from touch events affect only the left mouse button.
So preserve the state of other buttons.
Change-Id: I628d41089db39f0c983aa95f311a842111b8c39c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This covers the case in the bug report, but not much more.
Task-number: QTBUG-21254
Change-Id: Ie191a39ceddd7e58a0d8baf7d01f2a08c70162e5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
And a comment to fix it when the tooling situation improves.
Change-Id: I79781da18a36d4e11cede8477f90f216e08bffe2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
And enable the style to control the behavior of the sloppy submenus
[ChangeLog][QtWidgets][QMenu] QMenu now pick up how "sloppy" submenus
behave from the style
Task-number: QTBUG-20094
Change-Id: Ib1a9770d9b63028033cc360ae236471449d00267
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
On 64-bit platforms: 56 -> 48 bytes.
On 32-bit platforms it's still the same size (44 bytes).
Change-Id: Ia4831753258ef12aa983757523bb76979e6fc4b0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
And not a normal pointer. The problem is that in certain scenarios,
if the TLW containing a QSizeGrip changes and the old TLW gets
immediately destroyed, then the mechanism which updates the tracked
TLW is run too late, and ends up accessing a dangling pointer.
Therefore, we need to protect that pointer via a smart pointer.
Task-number: QTBUG-22867
Change-Id: Icfb051132bacde604f660ac7a98bc0a9d1022c68
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
There is no point in recreating the QOpenGLWidget's
context when it shares with all top-levels'
shareContext().
Change-Id: I659a8ef6563de0cc1e833198af4dfb8c705e40d8
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Forward dnd events to the QWindow, exactly like QQuickWidget would do.
This of course requires setting setAcceptDrops(true) on the container widget.
Task-number: QTBUG-39213
Change-Id: I8ea49e630b071dc0aacd53f798d9b46b03502365
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
QSet::contains needs to hash the string, which is unnecessary, since we
can just check if the size of the set changed.
Change-Id: I2c7a42bae6cdf351533d5a582a42079658fa7729
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Translation is an expensive thing, and probably quite uncommon - so don't
penalise any common cases by checking for it until we're quite sure they have
failed.
In addition, we avoid repeated string construction when translating (caching the
result) and avoid repeated case-insensitive comparison by toLowering the string
data.
This change either speeds up most runtime cases that were unfairly penalised
(such as "light") by 50-70% or doesn't impact the runtime speed at all (or,
results were within the margin-of-error).
Of course, calling with translated content will be a bit slower now, but the
slowness of the translations should more than dwarf the real change there.
Change-Id: If24685dfd553e4aed07fbf07678b2585e22b0a3a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
thread-local variables are known to be broken on Windows XP if the
library is loaded dynamically. This has been fixed since Windows Vista,
but to avoid any elaborate runtime checking of the OS version we're just
removing the logic alltogether for MSVC / Windows.
Task-number: QTBUG-41008
Change-Id: I64ee95270d142294c975a5890d6e1b62a833b6ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>