Make styleHints a static member variable of QGuiApplicationPrivate and
fix accessor accordingly. Extend tst_QApplication::settableStyleHints()
to run without QApplication instance as well and add a similar test
to QGuiApplication.
Task-number: QTBUG-44499
Change-Id: I42b92ef38f7dd512d08d70accfa7dd4f09a22f01
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Add command line test application that can print
the mime type of a file or dump all mime types.
Task-number: QTCREATORBUG-13996
Task-number: QTCREATORBUG-14005
Change-Id: I5ef2fa4b9fbab986b1db4fc0bd8abaacdf4f8fa0
Reviewed-by: David Faure <david.faure@kdab.com>
While the -fuse-ld=gold flag is related to linking, it is an argument to the
compiler driver to tell it what linker to execute, NOT an option to tell the
linker to behave differently.
So it shouldn't get prefixed with -Wl when passed though the compiler driver.
Change-Id: I2b50cb6d2bd8911aa9b305cd8e755d4dfe923041
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
it doesn't make a whole lot of sense, but it's possible to create
braced blocks which have no semantic meaning.
Change-Id: Id55dfdee1aa3fade507cbd1eb34bdffcd7eb6bff
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
we now warn about the pointless ones, and error out in cases that
already were semantically bogus.
Change-Id: Ifd80014af0fc53e3cc42561c4270d1dca234568f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
a colon after else/for is non-AND-ing, i.e., it's no logical operator,
but "punctuation". therefore, putting an operator into the token stream
is bogus. it didn't hurt execution, so it went unnoticed, but it still
wasted some bytes and cpu cycles.
Change-Id: If5578074257feed299bda1630bf0dfe72eb395ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
they come always in pairs (with one exception).
Change-Id: Ia2f69a8776bd7146ff2fb18d13cc6bb5b2c71139
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
they have been semi-warnings for a long enough time now.
Change-Id: I3fffd63f7b44b30d2dc18cdcd74221c10e98399d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
without that, both the lines
cond1 { cond2: VAR = val }
and
cond1 { cond2: else: cond3 }
would yield two bogus errors: first an excess brace, and then a missing
one.
Change-Id: I8609106c1ad387577deec2077e2ce13507ac4d3f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
we are transforming "magic" function calls into other structures. past
that point it's wrong to keep the function argument list terminator in
the token stream. this went unnoticed, because in this context it was
equivalent with the expected value list terminator (which was simply
never reached).
Change-Id: I3dc6719273ce9d663db867f355eba682ba6ccf2c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
the existing test is a blackbox test. this one is going to be different.
the first test is a bit trivial ...
Change-Id: Iba1b0b5c32490677551ee92c36f381b884c2765d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Currently Qt uses the QPlatformIntegration::StyleHint
SynthesizeMouseFromTouchEvents to check whether to synthesize mouse
events from touch events. But not only platform plugins can produce
touch events, they can be created by e.g. QTest::touchEvent() and in
this case we almost definitely need synthesizing regardless of the
platform.
This commit introduces a QTouchDevice::MouseEmulation capability which
replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents.
So it's possible to pass QTouchDevice without this capability to
QTest::touchEvent() and be sure that mouse events will be synthesized.
Notice that touch pads always emulate mouse events.
As a result we can activate some tests which were disabled for specific
platform configurations by commits 6c1670d8c2
and e9760f1559.
Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Based on testing by Paresh Adhia.
Task-number: QTBUG-44568
Change-Id: I0a84710bcda40f65b38c3b18f4d9b34f654e4c22
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Some existing debug output required recompiling with Q_XCB_DEBUG.
Being able to enable this debugging in the field will help with
troubleshooting any remaining screen management issues.
Change-Id: Ie67b0009d4b00b0d39fde0fb4d8d54fcf89d6693
Reviewed-by: Sandro Mani <manisandro@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Ensure QGuiApplicationPrivate::screen_list always contains at least one
screen, and that the first item (returned by QGuiApplication::primaryScreen)
is always the current primary screen
Task-number: QTBUG-42985
Change-Id: I08b880b3e94387f28230ed5fc738bceea943bad3
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Through the chain of code called by QPlatformIntegrationFactory::create, there
are cases where QGuiApplicationPrivate::platform_integration is accessed
(typically through QGuiApplicationPrivate::platformIntegration()) before the call
to QPlatformIntegrationFactory::create has returned.
Change-Id: I7805b72be5b56aed5cb8ce30cb908743c9b1f91b
Task-number: QTBUG-44388
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QPinchGesture::scaleFactor is relative to the previous zoom factor,
so either we need to multiply the total zoom by scaleFactor,
or set it based on totalScaleFactor, which is simpler. Pinch-zoom is
now working in this example.
There's also no reason to use getProperty() when the accessors are
directly accessible in QPinchGesture.
Task-number: QTBUG-6010
Change-Id: I150dc0b18b4b871a08ec55c0f77463509ab26afe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
On platforms which does not have at all sysv support, all
posix ipc tests and compilation failed because sysv
specific header files were included unconditionally.
Change-Id: I5713ace6daeb6e79f8794ce42b2b3dfa1b95ab2d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Avoid repeated instantiation of end() in loops, use variable instead.
Change-Id: I5f58fa63c2845827ebe9be2d0fcee80b7ccc74bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
qtbase/src/gui/math3d/qquaternion.cpp:466: warning: Undocumented parameter 'eulerAngles' in QQuaternion::fromEulerAngles()
qtbase/src/gui/math3d/qquaternion.cpp:466: warning: No such parameter 'eulerAngles.y()' in QQuaternion::fromEulerAngles()
qtbase/src/gui/math3d/qquaternion.cpp:466: warning: No such parameter 'eulerAngles.x()' in QQuaternion::fromEulerAngles()
qtbase/src/gui/math3d/qquaternion.cpp:466: warning: No such parameter 'eulerAngles.z()' in QQuaternion::fromEulerAngles()
qtbase/src/gui/math3d/qquaternion.cpp:455: warning: No such parameter 'pitch' in QQuaternion::toEulerAngles()
qtbase/src/gui/math3d/qquaternion.cpp:455: warning: No such parameter 'roll' in QQuaternion::toEulerAngles()
qtbase/src/gui/math3d/qquaternion.cpp:455: warning: No such parameter 'yaw' in QQuaternion::toEulerAngles()
qtbase/src/gui/opengl/qopenglshaderprogram.cpp:2757: warning: No such parameter 'value' in QOpenGLShaderProgram::setUniformValueArray()
Change-Id: Ib825ecb0db798380d97414ca3c3eba8bee3ab6ea
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The files were moved to a qrc resource, so the string is never empty,
we need to use QFile::exists to make sure they exist.
And the error message was wrong, pointing to current dir.
Change-Id: I532bda9f6221fb5c69b779b8b48baac9ede90eba
Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
If one asks for the global OpenGL context via the right attribute,
and then creates a QGLContext sharing with that context, Qt will
create anoter, dummy QGLContext owned by the global context.
At application shutdown, and specifically after ~QObject of QGuiApplication
has run, the QObjectPrivate dpointer gets destroyed. That destroys the
owning global QOpenGLContext, and therefore that dummy QGLContext as well.
However, QGLContext dtor triggers a code path that accesses qApp as
if it were still alive. That's not the case any more -- it has already
been destroyed. So, introduce a check and avoid dereferencing NULL.
Task-number: QTBUG-44621
Change-Id: Ic160ac99e9269db999e76229b1c7f8c53bd2be61
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This test accidentally causes the screen reader (in newer Gnome
environments) to be launched. This messes up the CI machines enough that
nothing works afterwards. Disable the whole test until I write the
proper fix. We don't lose anything because it was marked as
insignificant anyway.
Task-number: QTBUG-44434
Change-Id: I410e80580977178ea99a370c6c0909d1fb49a71c
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
This fixes a division by 0 when processing a maliciously crafted BMP
file. No impact beyond DoS.
Task-number: QTBUG-44547
Change-Id: Ifcded2c0aa712e90d23e6b3969af0ec3add53973
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
before marking the backingstore as dirty. The QWidgetBackingstore has an
assert that the region or the rect passed in is not empty, hence its
programming error not to check before calling this function.
Task-number: QTBUG-43489
Change-Id: Ic67fb6ca7959466e1758ce91827cd4b8acdf73fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Those QTimeZones failed to convert to other timezones because the data()
virtual function was never overridden and reimplemented. That meant all
QUtcTimeZonePrivate objects were *really* UTC, with no offset.
Task-number: QTBUG-44600
Change-Id: Ia0aac2f09e9245339951ffff13c5294bb783c674
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The c2m() function which converts a const_iterator into an iterator
is a broken concept for an implicitly shared container such as
QVector, because the act of calling begin() as the starting
point already detaches and invalidates the c2m argument.
This could be fixed in c2m, but the bug wasn't even in c2m,
but in removeAll(), which called end() before c2m, so the c2m
argument was already invalidated when entering c2m.
The solution is to store the positions as indices instead of
iterators before calling the first detaching function.
Task-number: QTBUG-44592
Change-Id: I66cf4f1277e71148a4d5b5bbfb6a3369ad02db68
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This involves a significant amount of memory allocation, which made it rather
more expensive than one would expect. The FT engine also caches face id, so this
seems like a reasonable prospect.
Increases delegates_text by another few ops/frame.
Change-Id: If31e6b54478e4caf46a3a12a9ac45254a1f01525
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Saves a couple dozen bytes in text size on optimized AMD64 builds.
Change-Id: Iefd9ca05a7b27f240836c1e1e00df569742fcd7f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
As requested in review of 1d2efe1f27.
I didn't add a comma in front of the timeSpec() as the other fields
aren't separated by commas, either.
Change-Id: I54d74b7199ca7e46e28d2ceca22b02205e318c90
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This slipped in with commit 1d2efe1f27,
but is of course completely bogus (though harmless).
Change-Id: If3875b65af0fa3fe85216391599433158043e361
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This is a partial revert of commit
18aae36a90 that restores the removed
*Backend classes and restores the ordering of members in other
*Backend classes. This restores binary compatibility for QtGui.
tst_bic now reports only that some of the *Backend classes have
changed size. This is a false positive as all such cases have added
new members at the end of the respective classes. Offsets to
pre-existing members are still consistent with earlier versions.
Change-Id: Ia7f651870c2dea7f1a8d3611e667151387506dc8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The property INTERFACE_LINK_LIBRARIES has a single value
and is configuration independent.
Change-Id: I9130b1d0444563335825e3806f693a39f65ca67d
Reviewed-by: Stephen Kelly <steveire@gmail.com>