QFontDatabase::load() is the only caller that passes non-null
QFontPrivate* to QFontDatabase::findFont(), to adjust the pointSize
with regards to the font's dpi; do that right in QFontDatabase::load().
The `multi` param's meaning is, in fact, an absence of the
QFont::NoFontMerging flag,
so prefer the latter and prevent ambiguity in the future.
Change-Id: Icc7751044e454ca438e7627364faa415287bf1ae
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The logic this code was aimed for has been covered by a more complete
solution in QFontDatabase::load() years ago; simply drop the dead code.
Change-Id: Id8860353ff4f4d2f1529aa89810d6c5725e97d24
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Add version guards to prevent compiler error:
'XITouchClass' was not declared in this scope
in systems having XInput version < 2.2.
Change-Id: Ib1308f29ef97288eb994ab8bdd668199ca2ee1d7
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Make it possible to read images with EXIF orientation automatically
applied. This was originally implemented without opt-out in Qt 5.4, but
reverted. Here it is implemented as opt-in for JPEG, and opt-out for TIFF
to keep behavioral consistency.
The EXIF support for JPEG was written by Rainer Keller.
[ChangeLog][QtGui][Image plugins] An option has been added to
QImageReader to enable automatic application of EXIF orientation.
This behavior was default in Qt 5.4.1, but reverted in Qt 5.4.2.
Task-number: QTBUG-37946
Task-number: QTBUG-43563
Task-number: QTBUG-45552
Task-number: QTBUG-45865
Change-Id: Iaafd2519b63ede66ecc1f8aa4c7118081312b8f5
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The UNDER_NT define is useless as the include
already happens before in qfunctions...
Change-Id: I25fc23e169ce91d787331a7a86023aa7b424d687
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
mingw is not msvc, and nobody in their right mind would expect it to
behave like it.
[ChangeLog][Important Behavior Changes][qmake] Qt configure and qmake
used with a MinGW spec will no longer emulate MSVC by picking up the
INCLUDE and LIB environment variables. Use the -I/-L configure options
to pass additional paths, as you would under Unix.
Change-Id: I533bb97de34d14dcbd45e0416283a79f44096c67
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
It won't be functional otherwise with GLX when the QOpenGLWidget is targeting
a separate X screen.
Change-Id: Ibe5b89023f833039bb67d94b78b173de2e021ac9
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Targeting a non-primary screen with a QOpenGLWindow requires (at least
with GLX) that the context is created with the same screen. Otherwise
the context cannot be used with the window (BadMatch due to different
X screens)
Change-Id: I64f38ad7317d39a164bb69bb1430692319fc49d4
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It is fully possible to show a window on all the connected screens
even when the screens are not virtual siblings, i.e. they do not
form one big desktop. When X is configured to use a separate screen
for each physical screen, it becomes essential to do setScreen()
either directly or via QDesktopWidget in case of widgets. The original
code attempting to call QWindow::setScreen() cannot succeed since there
is no QWindow available before the widget is shown. This is easy to
work around.
The app now works identically in all cases.
Change-Id: I519ca0c0109c68aac2f2d4e6972d14b55767b403
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The QWindow tends to get mouse releases on Windows when
maximizing the window for example. This is likely a problem
in the platform, but the example should be improved too to
be more robust and ignore such unwanted events.
Task-number: QTBUG-42842
Change-Id: Iecf916a2f753ed1b37d644721ee212ca7c728c49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When EGL is autodetected but -no-opengl is specified the backend
must be skipped, just like the GLX one.
Task-number: QTBUG-44998
Change-Id: I1ccbaf540f3777a1fc39aaf12bded4febf20faa0
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Contrary to the comment, MSVC does support INFINITY, but
always prints a warning when it's used:
qpainterpath.cpp(3066) : warning C4756: overflow in constant arithmetic
Avoid this by using numeric_limits<T>::infinity.
Change-Id: Ie925b036b807378da5298a275fa108347c24519e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
According to the documentation for QStandardPaths::standardLocations() and
QStandardPaths::writableLocation, they should return empty lists / strings
if the location cannot be determined. So remove the section in
qstandardpath_ios.mm that always sets a default path for undefined
locations.
Change-Id: I0c7fc0a1a0bbe2a5e0fb4e79e0f96f0280a647e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The current caching strategy had a flaw in that it tried
to lazy-lock the mutex only if g_currentAssetData was non-zero.
For this to be somewhat reliable, g_currentAssetData would have
to be volatile. But that would still not be enough since
thread-unaware code optimizations might also happen on the CPU level.
Instead of complicating the current logic more, change it to
only do caching per thread. Since QThreadStorage will take ownership
of its data, we can't let it store a pointer to QIOSAssetData directly
since we need to control the life time of QIOSAssetData using deleteLater.
Change-Id: I2c3ffb3257ec2bdec8be71a3d63f666ab33b5277
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
When both scroll bar's policies are set to ScrollBarAsNeeded, make sure
the scroll bars are shown if needed and not show if not. Even the corner
case, where one scroll bar's visibility depends on the other, is handled
properly.
Task-number: QTBUG-45470
Change-Id: I11d6ccf7c0b51644a5ce2d5c3fc59e2e4812755d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
ItemIsTristate only makes sense in tree widgets, where it triggers the
auto-tristate behavior between parents and children.
Change-Id: Idfa8bb5d0b9c63fe450115fb58d088929e11c7ff
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
My commit 6c973dee2c broke the case where setApplicationName
is called before the QCoreApplication constructor.
Fixed and added autotest.
Task-number: QTBUG-45283
Change-Id: If7bdb0d82be50b50a95a04027f5f9d7143c1a7ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
As usual, user code connected to signals emitted from Qt may destroy
an object's internal status while a signal is being emitted.
Guard a bit QDialogButtonBox signal emissions to prevent
crashes in case the button or a dialog get deleted from a slot
connected to clicked(). Also, be sure to emit the corresponding
accepted/rejected/etc. signal.
Change-Id: I7b1888070a8f2f56aa60923a17f90fb5efef145c
Task-number: QTBUG-45835
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
... by making the conditional future-proof by inverting it.
Task-number: QTBUG-45972
Change-Id: I0bf8eac1b1095b9bf4dec0b82fc42e5a58d0499a
Reviewed-by: Andrew Knight <qt@panimo.net>
Reviewed-by: Gunnar Roth
there is no need to make exceptions for install targets now, so instead
of abusing qt_no_install_library, introduce a new header_module flag.
Change-Id: I4ad7e301d1b60938b17e1dea732b1dbe3ff88a1a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
don't try to install the primary target, as it obviously doesn't exist.
however, we must not disarm bundle installation.
Change-Id: I3074150f749220d77c1210a4978e71aff9c9a3a9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
In addition to BLACKLIST, Qt will now look for GPU_BLACKLIST too.
Test cases that are specified as disabled in the GPU blacklist
will be skipped. This is particularly relevant when running tests
on Embedded Linux devices.
For example, the following JSON would configure the test case
glxContextWrap to be skipped on drivers where GL_VENDOR contains
UnstableDriverVendor:
{
"entries": [ {
"gl_vendor": "UnstableDriverVendor",
"features": [ "disable_glxContextWrap" ]
} ]
}
In contrast to the regular blacklist, GPU-blacklisted test cases are
not run at all. This is because driver problems and instabilities
often lead to crashes.
Change-Id: I340cf5c0261a206109b78409774408981bba5c68
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Because if it doesn't, then calling dbus_type_is_fixed or is_basic may
result in a failed assertion.
process 16304: arguments to dbus_type_is_fixed() were incorrect,
assertion "_dbus_type_is_valid (typecode) || typecode ==
DBUS_TYPE_INVALID" failed in file dbus-signature.c line 345.
Change-Id: Idf715b895bac4d56b4afffff13db2ed71b1516a5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
The test is always marked as XPASS in CI.
Change-Id: I629bdec6f038cd8b6208fc4db61c67a9ea003b2e
Task-number: QTBUG-22326
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
eglPostSubBufferNV is used to communicate the size of the window, as
otherwise there is no way for the renderer to know if the last frame was
rendered in landscape or portrait, causing rendering glitches when the
orientation changes. The rotation flags are utilized in a few additional
places now to fix some corner cases where the rotation was not applied.
This patch should be squashed into "ANGLE-Improve-Windows-Phone-Support"
during the next ANGLE rebase.
Task-number: QTBUG-44333
Task-number: QTBUG-43502
Change-Id: Iec37f7531854184819c30c87eab82d96d56ff133
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This allows the plugin to communicate the swap region to ANGLE and avoid
glitches when the orientation changes.
Task-number: QTBUG-44333
Change-Id: I40240cbcb3aaec92dbf4a82f4957965e92b9c3da
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
We were fetching "lastText" too late, and setting the opacity
of the clear button to 0.
Change-Id: I82c2aea7dab4af4424fb57e12f78d07a0374457e
Task-number: QTBUG-45518
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
For some reason, each column in a QColumnView is a QAbstractItemView,
*including* the preview widget's column. Unfortunately,
the preview widget's column class was not overriding scrollContentsBy,
so scrolling it had no effect.
A more comprehensive solution would be a major refactoring of the
code to make that column a plain Q(Abstract)ScrollArea, as it doesn't
need QAIV's APIs at all, but I don't want to change code and risk
breaking behavior.
Change-Id: Ice500a8eaef13c295df4cc274b9f80d9a24c65f4
Task-number: QTBUG-11392
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
GCC 5 combined with a recent binutils have a new optimization that
allows them to generate copy relocations even in -fPIE code. Clang has
the same functionality when compiling an executable with -flto. We need
to let the compilers know that they cannot use copy relocations, so they
need to use really position-independent code.
Position independent code throughout is not really required. We just
need the compilers to use position-independent access to symbols coming
from the Qt libraries, but there's currently no other way of doing that.
Task-number: QTBUG-45755
Change-Id: I0d4913955e3745b69672ffff13db5df7377398c5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This reverts commit d0eba497c1.
A better fix is to use -fPIC instead of just -fPIE fo
-reduce-relocations.
Task-number: QTBUG-45755
Change-Id: I1759291b684fd76d4009e4be9ba1354eb056e659
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test keeps failing. The approach of sending mouse move events is
inherently fragile due to the use of QCursor::setPos and the expectation
that that produces the correct sequence of mouse move events.
Change-Id: I07ec75460b70c27152e8775deffcb77fa9328d0c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Previously, implementation was spread between qlayout.cpp and qlayoutitem.cpp
and the docs between those two files and qsizepolicy.qdoc.
Move everything into a new qsizepolicy.cpp.
Change-Id: Id15c2c13572b7b8863be596603100f388eafea07
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This allows subclasses to submit any queued events that have to be
handled before normal operation starts. For example, if an error event
got generated during initialization which has to be handled by the
state machine, the startup hook in the private class can be used to post
those events and have the state machine handle them appropriately.
Change-Id: I62249a31d8840f47bc19920870ad5da9647e61f9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
When there are conflicting transitions, a transition that is nested
deeper (i.e. more specific) has priority. If two transitions have the
same nesting level, the one that comes first in the document order gets
priority.
Before this patch, only the document order was considered.
Change-Id: I58f188c270cabe2c386a783ceef7a0a955105425
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The global shared context is now always enabled on iOS. This means that
contexts used by QOpenGLWindow/Widget and QQuickWindow/Widget and the
iOS backingstore will share with each other.
[ChangeLog][QtGui] QOpenGLWidget and QQuickWidget are now supported on iOS.
Task-number: QTBUG-40034
Change-Id: Ibfb99ffcb18f8f8d263662fbf237bc348fc730ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
If the flag is set, report to UIKit that it should
continue searching for the touch target by returning
'NO' from [UIView pointInside:].
Change-Id: I723f64fd855284fa60d0be18b2535dfa61f31381
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Widgets can have the attribute Qt::WA_ShowWithoutActivating
set, which is forwarded to QWindow as a property
(_q_showWithoutActivating). Both The cocoa plugin and
the windows plugin check for this property before
activating a window upon setVisible, so lets do the
same for the iOS plugin.
Note that this is not the same as shouldAutoActivate, since
the window should gain focus like normal if the user
taps on it.
Change-Id: Ie6c95d4044906d97f0a03d27009a23d462c6ca34
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>