Remove the qmake project files for most of Qt.
Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.
Also leave the qmake project files for utils and other minor parts that
lack CMake project files.
Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
It was left out of the build in f08038fca7
but not removed. It doesn't make sense to keep it, as the classes it
tests have been removed.
Change-Id: Ic36a066eb092d8b9b40c645de649af9dcaab4ff2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
And generate a few more test projects that were missing.
Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The QT_OPENGL_ES* macros are leftovers from an earlier,
ad hoc configuration system, which has since been
replaced by QT_CONFIG. To clean things up in Qt 6,
we use the new way instead.
Task-number: QTBUG-83467
Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Removes QGL paths in sub-attaq and chip examples.
The boxes example depended on QGL and has been removed.
The corresponding module and test directories for the opengl module are now
empty, but has been left there so we can move the QOpenGL* classes there.
[ChangeLog][QtOpenGL] The deprecated QGL* classes have been removed.
Fixes: QTBUG-74408
Change-Id: I52f56409af8f6901359462a7ba162103d051fe3d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The benefit of keeping this code around was to inspire or inform
changes in the areas to take into account possibly missing features
in Qt 5, but at this point that benefit is questionable. We can
always use the history to learn about missing pieces if needed.
Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Rename the alias property used by add_qt_resource() to QT_RESOURCE_ALIAS
to match property naming conventions.
Change-Id: I97b12b0b794e158f03dabeed5ec23a3b7d56cfbb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When running Qt autotests on a developer machine with a high
resolution, failures occur due to either some widget becoming too
small, some rounding fuzz appearing when Qt High DPI scaling is active,
or some test taking screenshots failing to deal with device pixel
ratios != 1 in the obtained pixmaps.
It is not feasible to adapt all tests to pass on high resolution
monitors in both modes (Qt High DPI scaling enabled/disabled). It
should be possible to specify the High DPI setting per test.
Previously, it was not possible to set the Qt High DPI scaling
attributes since they must be applied before QApplication
instantiation.
Enable this by checking for the presence of a static void initMain()
function on the test object and invoking it before QApplication
instantiation.
Prototypically use it in tst_qtimer and to turn off High DPI scaling for
tst_QGL.
[ChangeLog][QtTestLib] It is now possible to perform static
initialization before QApplication instantiation by implementing a
initMain() function in the test class.
Change-Id: Idec0134b189710a14c41a451fa8445bc0c5b1cf3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This change makes the PREFIX parameter a required parameter if the
target does not specify a default. This way the behavior is clear when
reading the code: add_qt_resource() without PREFIX means it must come
frmo the target.
Change-Id: I79024e70e7b4d32a5164b93aa08ec9ff409b2d39
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
These tests have not failed on the removed platforms for at least 60 days
Task-number: QTBUG-76608
Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This way we don't need to run rcc during cmake time
Change-Id: Id92111bce6c2b6798f3b18552cea82c8d07c4fc0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
When using the overload of QCoreApplication::processEvents that takes a
maxtime argument, the function will keep processing events until there
are no more events, or until it times out.
The problem is that the function doesn't distinguish between events that
were on the event queue when the function was called, and events generated
by processing events as part of its own execution. If for example a widget
calls update() in its paintEvent, the function will spin for the entire
duration of maxtime.
That doesn't work for qWaitFor, where we need to check the predicate
between each pass, so we use the overload of processEvents that doesn't
take a maxtime. That's fine, as we have our own timeout logic.
Change-Id: I9738d7d0187c36d4a5ddfcd3fd075b0bd84583c4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Ife72db5a0d7cb8abe55c60c519087e2b60f26990
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Otherwise the QGLWidget's context may be owned by and used by the swap
thread when the resize happens on the main thread.
Change-Id: Id415747572e6b988924618b1df0efdee5fcb1805
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The test has been crashing flakily recently.
1) It is creating a QGLWidget
2) It is stealing the QGLContext of that widget and moves it into a separate
thread.
3) In that secondary thread it makes the context current.
4) Meanwhile the QGLWidget itself may receive for example a resizeEvent or
other events and - since it assumes that it owns the context - attempts to
make it current.
5) Attempting to call makeCurrent() on a QGLContext that is in a different
thread than the current thread (via QObject thread affinity) will result
in a call to qFatal() and consequently the test aborts.
The conclusion from Simon Hausmann is that this test is testing a pattern from
Qt4 times that may or may not have worked back then. Nowadays with the Qt5
QOpenGL* API we do support this properly and there appears little sense testing
this.
Therefore remove the test altogether.
Task-number: QTBUG-66411
Task-number: QTBUG-66216
Change-Id: Ie2d66705bc7c3914ace6abcba9557c7c67ad4db3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The vast majority is actually switched to QRandomGenerator::bounded(),
which gives a mostly uniform distribution over the [0, bound)
range. There are very few floating point cases left, as many of those
that did use floating point did not need to, after all. (I did leave
some that were too ugly for me to understand)
This commit also found a couple of calls to rand() instead of qrand().
This commit does not include changes to SSL code that continues to use
qrand() (job for someone else):
src/network/ssl/qsslkey_qt.cpp
src/network/ssl/qsslsocket_mac.cpp
tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The qWaitFor functions themselves can not trigger a test failure, as that
will not result in the test function exiting early, so every single call
to qWaitFor needs to be wrapped in a QVERIFY.
Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QWidget overload of qWaitForWindowExposed waits for the widget's
top level QWindow, which for the viewport is the graphics-view.
We want to explicitly wait for the viewport to be exposed, as the
viewport is covering the whole graphics-view, preventing it from
being exposed. See a6991376c.
Change-Id: I86df43871126562f09e4ce14931bc6fc7f06263d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The child viewport window covers the entire client
area of the parent window, which prevents the parent
window from being exposed.
This worked by accident until now, and was uncovered
by changes to the cocoa platform plugin implementation.
Change-Id: I0d62a1a33f125e5a9030c8def452a49886e54956
Task-number: QTBUG-50414
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Instead of the never-ending blacklisting of "broken" drivers, simply switch
to always choosing a byte ordered QImage format with OpenGL ES, and keep
on using the (one and only) spec-mandated GL_RGBA/GL_UNSIGNED_BYTE combo.
There is nothing broken with not supporting BGRA for glReadPixels even when
GL_EXT_read_format_bgra (an out of date, pre-2.0 extension that got folded
into the spec to begin with) is present. We do not have a good way to tell
if BGRA_EXT is supported for glReadPixels or not, so just skip the whole
problem altogether.
Task-number: QTBUG-59283
Task-number: QTBUG-59303
Change-Id: I9f0605380923bd3b3ffdeb80f5c172d3e4cc7927
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This change allows painting via QPainter onto a QOpenGLWindow, QOpenGLWidget
or QOpenGLFramebufferObject when an core profile context is in use. This is
important on macOS in particular, where compatibility profiles are not
available, and so the only way to use modern OpenGL is via a core profile
context.
Added core profile compatible shaders with moder GLSL keywords.
The paint engine binds a VAO and two VBOs from now on, whenever VAOs are
supported. Note that this changes behavior also for OpenGL 2.x context that
have VAO support via extensions.
The Lancelot test suite gains support for core profile contexts. This can
be triggered via -coreglbuffer in place of -glbuffer when manually inspecting
via 'lance', while tst_lancelot will automatically run core context-based tests
whenever supported.
Task-number: QTBUG-33535
Change-Id: I6323a7ea2aaa9e111651ebbffd3e40259c8e7a9c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix
Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code
that the code in question was a left-over from Qt4, when we used
Q_WS_ defines instead of Q_OS_ defines.
This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so
for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually
unconditionally included.
To make this even clearer, the defines have been replaced by checks for
1 or 0, with a comment describing how the code used to look in Qt4. The
use of constants in the check also makes it easier for editors to parse
the condition and show visually that the code is defined out.
Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
one of the effects of CONFIG+=x11 is LIBS+=$$QMAKE_LIBS_X11, so it's
positively pointless for project files to do the same.
Change-Id: I4085acd6254401897b34e131c2cb57f1f76a3638
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Based on discussion with Laszlo, we are blacklisting this test.
Task-number: QTBUG-53133
Change-Id: I08a5192ebcefd7b093c79872e0dfaddb794cab57
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Removing blacklistings from tests that are now passing.
Change-Id: I00aa1ce286d3e7715fb4bee4a36d0d77049a29ae
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
This also reverts commit 018e670a26.
The change was introduced in 5.6. After the refactoring, 14960f52,
in 5.7 branch and a merge, it is not needed any more.
Conflicts:
.qmake.conf
src/corelib/io/qstandardpaths_mac.mm
src/corelib/tools/qsharedpointer_impl.h
tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
Blacklisting all tests, which were failing locally.
Task-number: QTQAINFRA-949
Change-Id: I40c25ab0155b8977596d61297ab252a546515f87
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Whether or not to call XInitThreads() doesn't apply since Qt-5.0's switch to XCB.
Change-Id: I5f1e5e664a251c98af6357c87fc9a6bb03a46ce3
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>