The sysrootification of OpenGL include paths must be done only once: at
configure time. The resolved paths are stored since 521a8539 and must not be
resolved again.
Turn the makeSpec-type opengl library into a custom-type one, and do
the sysrootification in the handler function.
Fixes: QTBUG-73736
Change-Id: I2933144057d6f01d8bfc7bda2c2df56c57303459
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Handle WM_SETCURSOR to apply override cursors to window that do not have
mouse capture (as is done in Qt 4).
Fixes: QTBUG-58590
Change-Id: I7ff6f799da1b8d4b4396c0a6137778a11a192617
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
QSyntaxHighlighter has the follwoing constructor taking a QObject
QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent)
: QObject(*new QSyntaxHighlighterPrivate, parent)
{
if (parent->inherits("QTextEdit")) {
// ...
}
}
Typically, a 'parent' refers to the parent/child hierarchy in Qt
and is allowed to be a nullptr. However, in this case, passing a
nullptr will lead to a crash, as reported in
https://bugs.kde.org/show_bug.cgi?id=404820
This patch makes the QSyntaxHighlighter constructor nullptr safe
by checking if parent is a valid pointer.
Change-Id: Ia4e9b46b94fd37e6ceb2cd0538594353fdc1e349
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
If you enter a nested event loop, cause a deleteLater(), exit that event
loop, then enter a new one, the nesting count will be the same so those
are legitimate targets for deletion.
Task-number: QTBUG-73432
Change-Id: Id98140e1c2f0426cabbefffd157f975b5e291ccd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is required for non-ANSI paths on Windows.
Change-Id: Id98140e1c2f0426cabbefffd157c4065c3bdfd40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Not entirely sure that this solves the problem reported in the bug
report, but here's the theory: the loop
633 while (!d->interrupt) {
...
710 }
has few calls that recurse back, so the compiler optimizer can assume
that the variable remains unchanged (not interrupted) in most of the
branches. Additionally, it can assume the variable did not change from
there to
712 // still nothing - wait for message or signalled objects
713 canWait = (!retVal
714 && !d->interrupt
715 && (flags & QEventLoop::WaitForMoreEvents));
Which causes canWait to be true, despite having been interrupted by
another thread.
Changing to an atomic does not force the reloading of the variable
(strictly speaking, would need volatile, but all atomic implementations
do reload now), but it solves the problem of data race, which was UB.
The equivalent variable in the Unix event dispatcher is atomic (commit
49d7e71f77 from 2013). I've reordered the
bool members so they're all together and reduce the amount of padding in
this class.
Fixes: QTBUG-72438
Change-Id: I4ac1156702324f0fb814fffd156f290df94dc4c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The new test tst_QTouchEvent::touchOnMultipleTouchscreens()
needs the touchpoint IDs to be predictable, but another test currently
has a QEXPECT_FAIL; without release events, g_pointIdMap continued to
hold the touchpoints that were there when the test failed. So it's
necessary to add QWindowSystemInterfacePrivate::clearPointIdMap()
to be able to call it in the test cleanup function.
Fixes: QTBUG-73830
Change-Id: Ia6a70d028be95cd2b6676db6363ec408c0b116bc
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
With a QTreeView it is possible that collapsing an item can cause the
item under the mouse to be a new one and over the checkbox area for the
new item. As a result, a release can cause it to change the check state
even though it did not get the press for that item. This ensures that
it only allows the edit if it got the press as well.
Fixes: QTBUG-61476
Change-Id: I9a0821466afc84c97c9819755ccbacd729f7fbd7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Visual Studio doesn't support files being in multiple filters and
refuses to load such projects. Source files that appear in variables
that are mapped to file filters (SOURCES, TRANSLATIONS, ...) must not
be added to a second filter if they are input for an extra compiler.
Fixes: QTBUG-74004
Change-Id: Id2d752059c98d04e8154a7848c91f29a94bd092a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
When an item was dragged outside the window, the mouse release event was not
being properly delivered and the item would stick to mouse cursor after
moving it back into the window.
Fixes: QTBUG-72994
Change-Id: Ibce990390c866e16d58f7d969673dd05e862d97e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
qtPrepareTool could return a more complex command-line in the variable,
for some reason. So declare the dependency on the actual executable
only.
Change-Id: Id061f35c088044b69a15fffd1583504f25936a7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
For extreme coordinates, the rasterizer's width parameter could become
NaN, which compares false with everything and hence would trigger an
assert.
Fixes: QTBUG-56434
Change-Id: I27abae6ab0bc94ce042be86ea0587095cdb7d487
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Fixes the error: variable 'isDifferent' set but not used
Change-Id: Ibd60b17126057da64a41d325b7ef548316f27c4b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of hardcoding the target's extension to ".exe" we should rely on
target information available in Visual Studio. $(TargetFileName) is
documented as "The file name of the primary output file for the build
(defined as base name + file extension)." so it can be used instead of
$(TargetName) together with ".exe".
Change-Id: I103d8d13456910617b2d53c9c8f4e2935eb93015
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
We must deleteLater the pipe writer in closeChannel, because if you
call closeWriteChannel() from a slot that is connected to a signal
emitted from QWindowsPipeWriter, we'd operate on a deleted object.
For consistency, we're calling QWindowsPipeWriter::stop before
deleteLater and deduplicate the code.
Fixes: QTBUG-73778
Change-Id: I61d3dedf57e9fd02517a108d13ffc85e006330f6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Wrong locale name
-----------------
From the java.util.Locale documentation:
"Note that Java uses several deprecated two-letter codes. The Hebrew ("he")
language code is rewritten as "iw", Indonesian ("id") as "in", and Yiddish
("yi") as "ji". This rewriting happens even if you construct your own Locale
object, not just for instances returned by the various lookup methods.
Because of this, if you add your localized resources in for example values-he
they will not be used, since the system will look for values-iw instead.
To work around this, place your resources in a values folder using the
deprecated language code instead.
See also:
http://www.apps4android.org/?p=3695https://issuetracker.google.com/issues/36908826
Change-Id: I726c43f282156b21e8d6b073029f3c3b8fd42a30
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
It fails on CI (Windows 10). Given our qabstractsocket disables
read notifications/stops emitting readyRead if it already has pending data
(unbuffered, aka UDP socket type) - make sure we do not suffer from this.
The change does not affect the test's logic (unless the logic was to fail),
it just makes it more fail-proof.
Change-Id: I6c9b7ded20478f675260872a2a7032b4f356f197
Fixes: QTBUG-73884
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We should be using QFile::encodeName() to properly convert filenames
from string to bytearray. This takes user's locale into account.
Change-Id: I090f73f21feb73af166e88baa0e7f4a595cdb25b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
With "macos" keyword in place, we can blacklist using that
keyword instead of the old "osx".
Change-Id: Ib7a2f88265271df152320cce8594b8f788b47687
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Due to removal of insignificant flag in
tst_qfilesystemmode.pro a bunch of tests will
either fail or crash in different operating systems.
Task-number: QTBUG-70572
Task-number: QTBUG-70573
Task-number: QTBUG-29403
Change-Id: I44925187acd72e600d2fec4f2604b67c66ecdd6b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
QINSTALLS is not set when Visual Studio projects are used. Use its
resolved value in case that Visual Studio projects are generated.
Change-Id: I8c21d4335971f45e56b3549086cb803c2d464158
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The counter is just how many tests were blacklisted, regardless of
their success or otherwise. Skipping its increment for BXFAIL is apt
to introduce noise in our tracking of how many tests are blacklisted.
Change-Id: I1dd74e5f6619121c21d8741be7bc4e2d1cb43fa9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is quite an important detail for an otherwise useful format. We
should make the user aware that they currently have a tradeoff:
- Either you can store settings in one place on all platforms that your
application targets and have to manually manage conversion from
strings, or
- Use native formats which can be hard to find and edit, but retain
type information.
Change-Id: Ic648524c9ebff25246d7cdefb7628ff5ddf84964
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Incomplete translation
----------------------
If an application has more than one locale, then all the strings
declared in one language should also be translated in all other languages.
If the string should not be translated, you can add the attribute
translatable="false" on the <string> element, or you can define all
your non-translatable strings in a resource file called donottranslate.xml.
Or, you can ignore the issue with a tools:ignore="MissingTranslation" attribute.
Change-Id: I6f93f34fc36a06de9a0b687a93cf58df941dbbcb
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
1. Fix erroneous logic, which was triggered in 'h2' mode (non-TLS connection)
- after the initial protocol upgrade/POST request was handled, the server
(on Windows specifically) was erroneously handling upcoming DATA frames by replying
with another redirect response.
2. Make the test less heavy by sending 1 MB of Qt::Uninitialize instead of 10 MB
- theoretically this could cause a timeout before the redirected request finished
successfully.
Task-number: QTBUG-73873
Change-Id: I961e0a5f50252988edd46d0e73baf96ee22eef3f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I489c37131bf715d45f147964de4a8cd8c02adbcb
Fixes: QTBUG-72966
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The code was needed when we had QCocoaWindow::hide(), that guarded the
ordering out by checking the visible state of the NSWindow. We no longer
have that method, and setVisible doesn't have the same guard.
Added a comment in setVisible to prevent future travelers from adding
logic that introduces the same situation.
Change-Id: I0514619a303daceb1cd7d334f0de4bfce6c3e96f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
One of the tests was not added to the parent subdirectory pro so this
is also rectified.
Change-Id: I270f1c2882260e3e3fac83d074ed6444c5dece19
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
MSVC managed to trigger the this != &other assertion in
QString(const QString &other); so just skip creation of the
intermediate string in the function whose body tripped over this.
Change-Id: I687003cfc588531018c6069863ce2a76078c8e3f
Fixes: QTBUG-73802
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
For MS Visual Studio we need to use _popen() and _pclose() instead of
the POSIX functions; and the pipe needs to be opened in binary mode.
Change-Id: Ide0fb26a1e5f121b384b0baaf8100f26c614ccc6
Fixes: QTBUG-73810
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
f78842abe4 added the emission of the
signal in QAbstractLineEdit::keyPressEvent(). This patch also emits
it for QDateTimeEdit.
Fixes: QTBUG-73725
Change-Id: I66d577f5d4b60ad57987b26e7a1c1f20fad47782
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Delaying the main library load cause serious problems for people who want
to access it's functions from java before the main method is called.
Change-Id: I87f3a8282003395e003b06978048762eeabe6548
Fixes: QTBUG-68813
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
From API 24 it is possible to get the UiLanguages correctly from
Android so if API 24 or later is available we should use this. If it is
not available, then it will fallback to the original behavior of using
the system language.
Fixes: QTBUG-68019
Change-Id: I4cfbc2b807b361c08da56a74100ba59abf5f2d0f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Initializing the window will end up in [NSWindow _commonAwake], which calls many
of the getters. We need to set up the platform window reference first, so we can
properly reflect the window's state during initialization.
Change-Id: I5349273b1930ee8a57dc518db74be90d2426f61c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We want to share the implementation between the two classes, but
Objective-C doesn't natively have a mixin-feature. Instead of using
dynamic super-calls at runtime (which worked fine, but added
complexity), we now do the mixin at compile time using the
preprocessor.
The dynamic-super feature is left in, in case we need it in other
areas in the future.
Change-Id: I95dfa7f18cba86cc518e963dd018944ef113ac06
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The code in QCocoaEventDispatcher was dead and could be removed.
Change-Id: I0c57e64791045d65033376c096220983059028ba
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We don't need all the checks for the event dispatcher, it should
always be there.
Change-Id: Ib89a9c1c5524b49c2d85fae12425d19ced960597
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Change-Id: I321ab68b51c4ba63204c0e15fec74164e2c93d34
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".
Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This reverts commit 37970d7b3e.
That commit broke the build on macOS, because the OpenGL headers aren't
resolved anymore at configure time.
Change-Id: Iec6ef009c9ea7e28b12eeca6b5eb06918bf49d98
Fixes: QTBUG-73827
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This fixes a bug where app build would fail with AssertionError: SIMD is
used, but not supported in WASM mode yet
Change-Id: I27d5eb00b2c869b890dc519a7a793b7f87aeb9d2
Fixes: QTBUG-73795
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
make it "last one wins", consistently with regular libraries. this
isn't really relevant in qmake, because the order matters only for
static frameworks, which qmake defines out of existence.
note that specifying frameworks by full path does not work, so we
don't need to amend 9d76beee5 in that regard.
Change-Id: Ib027109339e1b5973c577d69906b6daf83ba9611
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>