The spec, added in 5.7.0, simply defined WIN_INTERFACE_CUSTOM, leading
to the generic, non-X11 typedefs for the EGL native types. This is
fine for the typical embedded use, but is not what is wanted when
targeting xcb, and leads to disabling EGL-on-X support.
Therefore, move the define into a comon header and let the individual
libs decide by defining or not defining QT_EGL_NO_X11. This sets both
MESA_EGL_NO_X11_HEADERS and WIN_INTERFACE_CUSTOM in qt_egl_p.h.
This way Qt builds supporting all three of eglfs (DRM+EGLDevice),
wayland, and xcb (EGL) can be generated out of the box.
[ChangeLog][Platform Specific Changes][Linux] xcb with EGL and OpenGL
ES, as well as eglfs with the eglfs_x11 backend, are now supported on
DRIVE CX boards when using the linux-drive-cx-g++ device spec.
Done-with: Louai Al-Khanji <louai.al-khanji@qt.io>
Task-number: QTBUG-55140
Change-Id: I6f186d16612e170995e3bca1214bcabad59af08e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
QStyle was created but never removed
Change-Id: I55011377afd475af28e4ce2cf657e435dd37c96a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This warning has been introduced by VS2015 Update 3 and is not in our
control as the warning happens inside the system headers. To keep the
compile output clean, disable this warning.
Change-Id: I96253538c6d6774bb91cd5a4ea80dda2910e74b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
26238aca8c causes double deletion of the
QTouchDevice in case the post routine already cleaned up the list by the
time the touch handler gets to do it.
Just check the list of devices to see if the one we hold is still there.
If not, the pointer is likely to be a dangling one so do nothing.
This will avoid dying with bus error or similar on application exit.
Task-number: QTBUG-51562
Change-Id: I50c1edee7405aad308274538219698388c2cc9f9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
ICC supplies a math.h header that defines things like:
#define isnan( __x__ ) __IMFC99MACRO1ARG_ALL( __x__, isnan, __, f, __, , __, l)
So use the already-existing workaround for it.
Since Qt 5.7 requires C++11, we can remove the check for that.
Change-Id: I149e0540c00745fe8119fffd1463cc5caf341337
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The first part adds QTabBarPrivate::initBasicStyleOption()
which is basically QTabBar::initStyleOption() but
without the expensive QFontMetrics::elidedText() call.
That is because QTabBar::tabSizeHint() would call
initStyleOption() and then immediately discard the result
of that computation.
Then, QTabBar::tabSizeHint() is modified to cache the calls
to QFontMetrics::size(), which is also expensive. The cache
is invalidated when the style or the font changes, or when
the elide mode is set.
Change-Id: I591b2e401af3576a2ebabc5b94f19ae157e28cf2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This is only when the attached MIME data contains text, and we
fall back to rendering that text into a pixmap. It requires
getting the device pixel ratio from the source which, for now,
may be a QWidget or a QWindow. Other cases may exist, but that
would bring more dependencies than desired.
Similarly, it fixes the draggabletext example. Other examples
would require either to get updated pixmaps or change substantially
in order to support HiDPI (e.g., the fridgemagnets example).
Change-Id: I66198214233e3e06c87505744e2aaa9691fe1bb6
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Otherwise we can fail to stretch the last section when adding new
sections.
Task-number: QTBUG-52446
Change-Id: I7eb5267ac500bf4246e57c3e3a43268bb65ef1f7
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Enable switching application to fullscreen mode. This is mostly required
for desktop targets of WinRT.
Task-number: QTBUG-54517
Change-Id: I67e4020bc2ec8da86d94815e5765959f4ae2b63f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The text is correctly describing the gradient from gray to blue but the
picture shows white to blue. Additionally including the SVG sources for
creating the pictures.
Change-Id: I608a239f4de9c2d3761196c44db024cc31ce441a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
To make sure it does not end up picking the desktop OpenGL implementation
from Mesa that may be present in the sysroot.
Change-Id: I815eb7d2664f9e62d620acf8260cae40f83dfaf8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Since STL support is mandatory in Qt 5, the sentence is a tautology
and can be removed.
Change-Id: I8676368cc917aa00a85b1113ed2a47694427b2ce
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
After the Anniversary update of Windows 10 (update 1607), color fonts
using the Adobe/Mozilla format with embedded SVGs are detected as
color fonts by DirectWrite, but they do not contain any colored layers.
The result of this was that we would no longer draw these fonts using
the pen color, but we would also not support the colored glyphs in the
fonts. In order to still support using these fonts as regular
monochromatic fonts, we check if there is actually a palette in the
font file before registering it as a color font.
[ChangeLog][QtGui][Windows] Fixed rendering Adobe/Mozilla format
color fonts with other colors than black after Windows 10 Anniversary
update.
Task-number: QTBUG-55097
Change-Id: I8d74787e49530d1167b9f2533ffdf7ab814c3358
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Add option "nodirectwrite" to turn off DirectWrite fonts
and "nocolorfonts" to turn off DirectWrite for colored fonts.
Task-number: QTBUG-55096
Task-number: QTBUG-55097
Change-Id: If12133fbd20dc7657b3616eff833a8e8c116e070
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
We should create the files with 0666 and let the umask take care of adjusting
to the final permissions in the file system.
[ChangeLog][QtCore][QLockFile] Fixed permissions on lock files on Unix to
allow for adjustments via umask.
Change-Id: Iee6a6ac3920d0ffd4465f54ac6e955f7fe087173
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
When running under callgrind, do not bother with the use of the watchdog. The
constructor waits for the thread to start, which adds an overall run-time cost
that depends on the OS scheduling.
Change-Id: I162e2e311c43a6892ebc67dea39899e40babb61d
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
We can't (at present) actually exercise the failure in
QWindowsLocalCodec::convertFromUnicode() that prompted us to consider
the possible failure here, but we should at least test for it.
Change-Id: I5066c88d7b4caeb48aebc6b79c355fa49e1c581c
Reviewed-by: Frederic Marchal <frederic.marchal@wowtechnology.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The section got introduced in commit 93d35c07d0, but is
ignored by browsers so far due to a non-blank space (0xc2 0xa0).
Task-number: QTBUG-55115
Change-Id: Ie0668b89c7151c934f40e033100a544011a583d8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Sometimes, this test fails in CI due to notifications arriving
asynchronously from the OS. This happens inside closeWriteChannel()
call, where we are flushing the write buffer and I/O completion on
the read pipe could occur there as well. So, take this into account
before waiting for the new incoming data. Also, improve the checks
on successful reading and writing.
Change-Id: Iabe875fc346eb4420c72d03208d22ea861a570c6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Before: HexRgb: 0.00230 ms per iteration, HexArgb: 0.00290 ms per iteration
After: HexRgb: 0.00051 ms per iteration, HexArgb: 0.00061 ms per iteration
This showed up as a relevant optimization when profiling KIconLoader
which uses QColor::name() as part of the key -- thanks to Mark Gaiser for
the investigation and first suggestion of a solution. I have also seen
customer code writing a replacement for QColor::name() because it was
too slow to be used as a hash key.
Change-Id: I009ccdd712ea0d869d466e2c9894e0cea58f0e68
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Instead of 'true', it should be '-1'.
Change-Id: I5e8f99153da68d34b37477ef4cedbc447fba347f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
With change 208496091d the space character
was replaced with a visual document terminator character. However this
meant that if the whitespace was visualized without the document
terminator character visualized then clicking after the text would cause
it to be positioned off by one.
By bringing back the space character when the terminator is not being
visualized then it will correctly place the cursor at the end of the
text.
Change-Id: I335c1773a37a654f3196bd350562e8f92ffd5369
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
8a33077 made QUrl::resolved() follow its documentation ("If relative
is not a relative URL, this function will return relative directly.",
where relative means scheme is empty).
However there is much code out there (e.g. qtdeclarative) which relies
on QUrl::fromLocalFile("fileName.txt") to be treated as relative, so
for now, we still allow this (in Qt 5.6.x). For Qt 5.8, this commit will
be reverted.
[ChangeLog][QtCore][QUrl] [EDITORIAL: replaces 8a33077] QUrl::resolved()
no longer treats a URL with a scheme as a relative URL if it matches
this URL's scheme. For now it still treats "file:name.txt" as relative
for compatibility, but be warned that in Qt 5.8 it will no longer
consider those to be relative. Both isRelative() and RFC 3986 say that
such URLs are not relative, so starting from Qt 5.8, resolved() will
return them as is.
Change-Id: Iff01e5b470319f6c46526086d765187e2259bdf5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
At least with the eglfs platform plugin, the QBackingStore constructor
results in a null pointer access if done before creation.
Change-Id: I2e78e70700fa48499a35c55797e1b962b6e6285a
Reviewed-by: Rebecca Worledge <rebecca.worledge@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Use QStringRef::isNull instead of QStringRef::string()
for validation. Non-NULL str.string() may yet leave us
with a useless str.unicode(), which is the actual problem here;
whereas !str.isNull() does really confirm that str.unicode()
is sensible.
Such test prevents situation like:
const QString a;
QString b;
b.append(a); // b.isNull() == true
b.append(QStringRef(&a)); // b.isNull() == false
Auto test updated: create QStringRef from QString directly, without
any condition.
Change-Id: I082cd58ef656d8a53e3c1223aca01feea82fffb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The unneeded ';' triggered warnings in pedantic compilation mode.
Change-Id: Id2324823e138560bb25234306601253d7bbd713e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
According to QLocalSocket's documentation, connectToServer() must
initiate a connection attempt after opening the device. Otherwise, if
a connection succeeds immediately, connected() signal will be emitted
on closed device. So, this patch ensures that TCP-based implementation
behaves correctly.
Change-Id: I4cc9474815e091a1491a429a6dc17f9cf0154f58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Specify the display to use by setting environment variable
QT_QPA_EGLFS_DISPMANX_ID Possible values are :
0: MAIN LCD
1: AUX LCD
2: HDMI
3: SDTV
4: FORCE LCD
5: FORCE TV
6: FORCE OTHER
Change-Id: I146db9a7f423bd4c6c1716c64d3df4d2388e85f9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
A constraint ensuring we do not sample beyond the current scan-line
was missing in the SSE2 optimized sampling.
Discovered with lancelot.
Change-Id: Ib0ece8f8bfaa034733873dc5b8baaaad5d4c0380
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Also make use of qdoc's \note command.
Change-Id: I276300cfcfde06e82b04793dbf25df8ec73e9838
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
... so don't use emit on them.
Just confuses readers.
Change-Id: I24365fc533b5b35f8942d6014dbc68387aa23e22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
- Simplify the code, remove unused members
- Fix the translations of plurals to use %n
- Add tooltip displaying full paths in list
- Add context menu allowing to copy the name and open
- Display the correct slashes on Windows
- Connect the returnPressed() signals of the line edits
- Make the search recursive
- Do not search binary files by checking the mime type
Change-Id: I3663799c88931db1f58c03ea35211e7ab03737ec
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
- Port to Qt 5 connection syntax.
- Remove unneeded member variables.
- Adapt to screen size.
- Add a tab widget with a hex dump view to the preview dialog.
- Handle conversion errors in preview dialog,
add status label displaying errors and warnings about failures
and invalid characters encountered.
- Fix translated messages.
Change-Id: I916100c903e73d0d2326523753ed7398b1c34df0
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
The warning printed when wrapping foreign windows is
missing a parameter. Amends change
f2ef587906.
Task-number: QTBUG-41186
Change-Id: Iefbd174c1acc42e87fd1a764d96452b1745aa4c0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
As it were, QStringLists were not handled explicitly when comparing
QVariants. If both QStringLists contained only a single entry, they
were treated as QStrings - if both QStringLists were empty, there were
equal (correctly so) - but if one of the QStringLists had more than
one entry, the compare function fell through to returning always 1.
As discussed here: https://stackoverflow.com/a/38492467/3444217
Added rich comparison tests for all non-numerical, non-recursive
QVariants that support them (except QModelIndex and
QPersistentModelIndex)
Task-number: QTBUG-54893
Change-Id: Icc5480d9ba056ee5efe83da566c5829caa1509d7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
An old line redefined the altStyleName variable causing sub-families to
be registered with their language-name as their style-name.
Change-Id: I8c21ad556f53ffd62f8ef9b326fb9431eea1d857
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Emoji characters as input by the virtual keyboard are received
as a sequence of surrogates. Store state internally when a high
surrogate is received and send off the sequence when the matching
low surrogate is received via input method.
Task-number: QTBUG-50617
Change-Id: I91e763ec3e0747d6852f7c5c2057a67b0c24e0f5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
- Use Qt 5 connection syntax.
- Introduce helper function to calculate the square size, remove
the existing 24 pixel limitation since that makes it impossible
to render 20pt fonts.
- Add filter chooser for font filters.
- Add menu and info dialog showing DPI and default fonts.
- Streamline code
Change-Id: I0cd4d0475b5a7ed3c475de7a413abebbe688dfe2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
If A is B, but not all B is A, we should not register A as an alias for
B. It is better to register it as a separate font-family so when
explicitly requested only faces from the sub-family are considered.
Task-number: QTBUG-53459
Change-Id: Ie9f5db3ba3fa69a0edb5b1965cce25e4885a00fc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Various transition functions checked on m_tranTimes.size() > 0 inside
a block which was conditioned on this already; simplify the code by
knowing this is true already. Tidied up an initializer at the same
time.
Change-Id: I3e933a69e1b71b94bfd4451e4d761844da669d33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>