swap the branches for (not) reading from qt.conf, and use a state
variable instead of an 'else' for mutual exclusion. this is somewhat
more self-documenting, and allows for a saner handling of the mkspec
fallbacks (which really should have been in a separate [QMake] section
along with Host* and Sysroot, but changing that now is way too much
hassle downstream).
Change-Id: I80a73294022fd1e8d84fe501b737c4fc7758662f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
so far, qmake.exe was built in qmake/ and then copied to bin/, with
possible errors in the second step ignored. this made no sense.
this unifies the nmake makefile with the unix one; compare 46e51ce1d.
Change-Id: Ieb9c7cd46f0be0501d17e297808ac1cdad1b3c4a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
when the file's effects are discarded, the mention of the file should be
as well.
Change-Id: I894b7e2b887dd34d18533b197bfa9d0d84d647e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the normal mode forces the prompt into a pattern which may be
undesirable.
Change-Id: I01689c7a6573415801862348b32bafc6a609ed4a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
that is, adjust path separators and don't quote them. we already did
that to some degree, but totally inconsistently, so it just didn't work
for any targets with "fancy" file names.
note that we don't bother doing that for recursive targets, as these are
assumed to be identifiers.
Change-Id: Ic75f003b71abc6fed03a4121b903ad5ee8253ed2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
if the externally provided qmake had a different on-device install tree
layout, things would go wrong. of course, that's a rather unlikely case,
so nobody noticed ...
Change-Id: I59f9976a769ccb6099b7237ef42555f0549615aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
there are plenty new functions, let's do this symbolic act.
Change-Id: Iaeb88afa5e33cacd81dc0ea26e380a16af06a739
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
otherwise it's sometimes quite hard to tell it apart from configure's
own messages.
Change-Id: I2f4908344367a9a3ce38e032bf76486fc4552ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
this got broken in 2ad4d75754.
however, the new configure system operates from the top-level build dir
anyway, so there is no point in messing with the cache as a reference
point to start with - just use OUT_PWD.
Task-number: QTBUG-57120
Change-Id: I69629bf497931574bff8452939170abb1776ab60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
60985aa42 converted the QT_CONFIG use, not taking into account that the
feature isn't actually known to the configure system - it's coming
directly from the makespec. so revert that hunk (until we have a better
integration between makespecs and configure).
Task-number: QTBUG-57039
Change-Id: Iaf57b5f5339250055f1c378e091da3ab3fcd4292
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
We can not improve the result from JSON parsing without changing API,
so instead recalculate the line and column based on input and offset.
Change-Id: I54149233f71023aa5d30deff854d6f3406c5c48c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When including a CSS file in a HTML file sent to QTextDocument, and the
CSS file starts with «@charset "UTF-8";», which is the correct way of
declaring that, the parsing fails.
If you omit the space, like «@charset"UTF-8";» the parsing succeeds,
which is wrong.
Fix this by expecting and swallowing whitespace after the @charset
tokens.
Task-number: QTBUG-54829
Change-Id: I32044e8d24bda70c1eb06bf74af50d4cabe2211d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The buffer is fed into strstr() on the next loop iteration, but
strstr() expects a NUL-terminated string.
In the equivalent code some lines up, the buffer is explicitly
terminated, and we never write the last character of the buffer again,
so we'll not fall off the end of the buffer, but if we read less bytes
than in the last line, we'll parse garbage from the previous line.
Change-Id: I354e1ce1dea71188942305190500b4778a69b4ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This will be used by QtQuick to correct a performance regression introduced by
592614ea3e -- QFontDatabase::isSmoothlyScalable is
quite computationally expensive; and now it is unconditionally expensive
regardless of the platform.
Change-Id: I82bfa65a963c6c3c276d574f2b379da4a9ba5b69
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Do not consume white-space after a token before the token has been
parsed, otherwise we end up with misleading offsets. This also fixes
a wrong error of illegal number in several cases.
Change-Id: I492ca4de0346a1d0ab73b1c23d7a72dba812664c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The old code was wrong as it used QString::fromUtf8() to convert the
char * array to a QString. This could lead to wrong positions when trying
to find the #version directive, as any valid utf8 sequence in a comment
before could have lead to wrong offsets compared to the 8 bit data.
Fix this and optimize the code at the same time to avoid creating a copy
of the data and using QRegularExpression.
Also fixes building Qt with -no-feature-regularexpression
Change-Id: I2d84875ef59b3a0fb4d8b069bf56f4372c57ccdc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The test relied on the file created being automatically selected,
which sometimes does not happen when executing the entire test.
Explicitly select the file and check the selection.
Use the temporary directory for testing.
Change-Id: Ia58641c1ac32ba21effa8a5ace9623eb5d48a1c2
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Returning NSNotFound from the NSTextInputClient selectedRange
implementation when there is no selection prevents
dictation from activating (for unknown reasons).
Return an empty {0, 0} range instead. Text input
methods such as Pinyin still work after this change.
[ChangeLog][macOS] Speech to text dictation now works
for Qt text input.
Change-Id: Ibf1729bdd271e8ed5ce3c9d2a0373c8ab3613d8e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
In XCB environment the QClipboard::changed() was not delivered if the
QClipboard::clear() was issued by other Qt app/process.
If the QClipboard::clear() is used, then the owner in
xcb_xfixes_selection_notify_event_t is XCB_NONE, so we need make the
decission to handle this event by the selection_timestamp and our
m_timestamp[mode].
Task-number: QTBUG-56972
Change-Id: If4c486ac02223eac506465cac7ff1a07bd02a187
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
'use' entries in the tests and libraries sections of configure.json
files should work acrosss library boundaries, so a test in
qtwayland can refer to a library from qtbase.
Change-Id: Ide02b9985be427a27982a422ca84a29b23145bcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change qtConfig(opengl(es2)?) to qtConfig(opengl) as that covers
the case without any regular expression.
Change-Id: I935e3150f87e195e8bd3d0e55b4ed43572b131cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
You can now use 'module.gui' to check whether the Qt Gui module
exists in the current build of Qt.
Task-number: QTBUG-56656
Change-Id: Ic73f162ed0578e07c70e3ec3706f285b6d09a41d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This reverts commit 862fa24179,
which attempted to optimize QJsonObject::operator== under the
assumption that the entries it holds are lexicographically
sorted. They should be, because Object::indexOf() finds them
by binary search, but apparently both fromJson(), as well as
construction through op[] leave (some) entries unsorted.
This behavior should be fixed, because other code relies on
sorted entries, too, but until the problem is more fully under-
stood, revert the patch to unbreak equality comparisons.
Task-number: QTBUG-56843
Change-Id: I5b608c16d1bbcb4f01b75ce93bd58b49ff050be2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
On Windows cd does not change the drive. So when you are on drive C:
and type "cd D:\data" it will change the directory on drive D: but not
affect your current working directory.
To also change your drive you have to provide the parameter /d on
Windows, so "cd /d D:\data" will also change the drive.
Task-number: QTBUG-57080
Change-Id: Ib629879534523982eec693cef725f20a535a1a74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This strips leading whitespace from asset catalog filenames, which was
causing installation to fail due to incorrectly calculated paths.
Task-number: QTBUG-57090
Change-Id: I80db627262f9d58f4403e2d8ab205bef2113992b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The test created a Windows shortcut (.lnk) and checked on its existence.
It was not found in the first test since QFileSystemModel returned
the resolved file name (linktarget.txt). When fixing this by querying
QFileSystemModel::fileInfo()::fileName(), the 2nd test failed since
shortcut files are not considered system files.
Amends change 3b093034b6.
Task-number: QTBUG-53890
Task-number: QTBUG-20968
Task-number: QTBUG-29403
Change-Id: Iec58b52532b44d12759eaa6c8d63a8a4dc8d1bc3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
sysroot, spec, and xspec have no /src and /get variants.
Change-Id: I8548791f8ea6ba9fd9f10c35f914ed6badbea9d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
the autotest was also broken, because it was created by pasting the
bogus message into the result ...
Change-Id: I02b8663b96c7d96cdb3c19639e2213e49fd2bcec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When we are anyway caching the rendered glyphs in a texture,
like when doing native text rendering in the scene graph, the
outline drawing fallback does not make sense. In fact, when used
together with a dpr scale factor, it would cause text to be blurry,
since it would first render the QPainterPath at the set pixel size
and then scale the image.
In practice, there isn't any real clients of the internal outline_drawing
property in the Freetype engine anymore, since this is now handled
independently of the font engines in the
QPaintEngineEx::shouldDrawCachedGlyphs(), but in case we at any point
would want to be compatible with the X11 paint engine again, we
might as well keep it around.
Task-number: QTBUG-55856
Change-Id: Ie090c596fe5cda2b598fa152a488881d50f86d2c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
When the dpr scale caused pixel sizes to reach 64 pixels and up,
thus triggering the outline drawing fallback, we would render
the glyphs at the original size but scale the glyph positions,
giving broken rendering. This was because we did not actually
pass the matrix to the fallback function when getting the alpha
maps.
Fixing it revealed a different problem, which was that the bounding
box for the glyphs, returned by alphaMapBoundingBox() did not
actually apply the transform when outline drawing was enabled.
[ChangeLog][QtGui][Text] Fixed rendering of large fonts when a
device pixel ratio is set and the Freetype engine is used.
Task-number: QTBUG-55856
Change-Id: I03d9066faf0e4346628a4eb630f0dd74a81ef148
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We have to make sure that GL_GLEXT_RPOTOTYPES is defined when
qplatformbackingstore.h is included. Without the definition
glBlitFramebufferANGLE will not be set and compilation might fail.
Task-number: QTBUG-57083
Change-Id: I4cacaf4c2851913b3437ebd1f0f2956d0f400553
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
the response is lowercased, so an uppercase L would never match.
amends c7c7cf636.
Change-Id: Idc796ec9a43bfd23452cd758100cbf1fb6fb252b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Precompiled headers with GCC 5.3.1 causes internal compiler error in
qdrawhelper.cpp, so compile this specific file without PCH.
Task-number: QTBUG-54154
Change-Id: Id5d9fe99cbeca58a60734510898e4ccb9694c203
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
qt_x11_set_global_double_buffer() is dead code since Qt 5.
Change-Id: Ie9a33b6f03dc2e39f12bc790292bb0d227f05c44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fix compilation with topleveldomain, textodfwriter
and cssparser features disabled.
Change-Id: I3f061fb09eef36cd640256a46cf77dde85a54d3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Tests are not supposed to write into the build/application directory,
but rather should output to the temp directory.
Change-Id: Idcdf51226a2d547514aea2fbb2054998d8a3437e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>