Scan lex and yacc sources for dependencies as if they were C source code,
which is close enough to reality.
This will unfortunately result in the generated source files depending on
the generated headers, while it should have been the object files created
from these sources which have that dependency. But qmake cannot do better,
and this is good enough.
Task-number: QTBUG-56507
Change-Id: Ic3e1941bf2e2820bfddf99deba854e1e82f83669
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
A merge from 5.7 with this change will trigger a compiler crash
on gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6) on Linux RHEL_7_2 (gcc-x86_64).
This reverts commit eeb03fbf26.
Task-number: QTBUG-56817
Change-Id: I143fdf43e0530d68d627718c515c2063630bd920
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This change provides missing documentation for two member
functions of QString.
QString QString::fromUtf16(const char16_t *str, int size)
QString QString::fromUcs4(const char32_t *str, int size)
Change-Id: I94a9437a457062e49e4457f5876e4d7c31fff24c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Some of the qminimaleglscreen.h includes are not even necessary.
With the inclusion of egl.h (or qt_egl_p.h in 5.7 and up) isolated
to this header, all we need to ensure is that the sources that include
it place the include at a suitable place.
This is not the only possible solution, there are alternatives (each with
its own caveat), but this is likely the least intrusive.
Task-number: QTBUG-56559
Change-Id: I17db031c8e401d9895a417ba3568ad1e4ba30f72
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
9f45d2ab added a documentation macro for bordered images
- Add the corresponding CSS rules to apply a drop shadow
for such images.
Change-Id: I18c4fbd7498db7b9391f33e568219e67b329e618
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Instead of calling QHash::value(), inserting the return value
into the hash with a different name and only many lines later
removing the old node, do the extraction into a QScopedPointer,
and the insertion into the hash from the QScopedPoiner, keeping
the node update in between the two.
Avoids the double-lookup of 'oldName', makes it clearer what's
going on, and limits the potential for some return between the
insertion under the new name and the removal under the old one
sneaking in, which would cause a double-delete later in the
dtor.
Change-Id: Ia2d1cca77c04708421ccb5e594729ec83de85345
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Commit 3d3d65f5 separated the PDB files for compiling and linking. Only
the PDB file the linker produces would be installed. However, this does
not work for static libraries as the LIB tool does not create a PDB file
from the compiler's PDB file. This patch turns the separation between
PDB files off for static libraries.
Task-number: QTBUG-56594
Change-Id: I08dcb7889c67b2f6370efa1ee19be8558355bbc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When commenting out the warning in createOrOpenKey()
(src\corelib\io\qsettings_win.cpp:157), applications produce warnings:
QSettings: Failed to create subkey "Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes": Access is denied.
indicating that an attempt to open the registry in read/write mode fails.
Add a utility function to read out registry strings in read-only mode to
the font database and use that instead.
Change-Id: I4187344cac7ec2ba27f15b51e237575efc171853
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When no central widget has been set, calling takeCentralWidget should
just return a null pointer instead of crashing.
[ChangeLog][QtWidgets][QMainWindow] Fixed crash using takeCentralWidget when
the central widget was not set.
Task-number: QTBUG-56628
Change-Id: I240ccf4caa41d2716a78851571fbfbf444a4922e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
And use different wording to describe QtConcurrent::filtered(), as
it doesn't modify the sequence it operates on.
Change-Id: I768c0d121e027c5de36ba7bd548c2d4c2a7f1bd9
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Even though the \legalese command is no longer used in Qt 5
documentation as it doesn't support collating legalese texts
across modules, it may still be useful for stand-alone doc
projects.
Add CSS rules so the \legalese text is styled similarly to
code blocks, to make it stand out from the rest of the content.
Change-Id: I533d8e2375ea2f8054c0671ff34dfa6f0dfe01d1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
The mentioned functions are now documented in src/3rdparty/freebsd.
Anyhow, the license and copyright differs ...
Change-Id: Ib59ace624d1d8244f591668ed05993787ca65d24
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The "use" option was so far only available for tests, to define that
the test requires usage of a certain library. Extend this to libraries,
so they can also define that running the test for the library requires
usage of another lib.
Change-Id: I2749c21e27c08ad6e12040590317c06c97f493db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
These CONFIG entries are also needed during configure, and preemptively
fixes build errors uncovered by an upcoming forward merge, due to code
restructuring.
Change-Id: I39ae5e0f24bbd43dd3c04225d42cce4edd199094
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
... such as beginSharedPainter() and endSharedPainter()
Change-Id: I0e76dd172c2f3bce169f58e4c62bd47c73c99dcd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We may not be playing nice with Cocoa's internals when
we decide to reparent NSColorPanel's contents to add
QColorDialog's own OK/Cancel buttons. In order to reduce
issues, we should avoid poking at things during the
application's shutdown sequence. Simply releasing the
stolen view should be enough at that point.
A similar pattern exists in QNSFontPanelDelegate.
Change-Id: I678c236e0c57c4d08a1109a479d965f924288c54
Task-number: QTBUG-56448
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
When compiling with EGL native types being the Xlib types (uncommon since
we disable this both for Mesa and NVIDIA embedded, but can happen with other
vendor's headers), the types for EGLDeviceEXT (void*) and EGLNativeDisplayType
(Display, i.e. _XDisplay*) won't match, breaking compilation. At runtime we won't
hit that path, so all we need to ensure is that the code compiles. Do this via a cast.
When the native types are generic, both types are void* so the cast has no
effect.
Change-Id: Ib54f569d4494906f74107f08b47bd6b521d700db
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Introduced in the 5.7 branch by 5f39a0ef8d.
Add also a warning in the GLX backend instead of just dereferencing the
null pointer.
Task-number: QTBUG-55291
Change-Id: I1f2930768b39a04ee443a68d0ac7dc9ecf26cb9c
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
This allows creating or extending QPA plugins to provide access to QFont
and related types.
It concerns both GDI and DirectWrite engines, as well as the regular and
the freetype based font databases. The qt.qpa.fonts logging category has
been moved together into the QWindowsFontDatabase related files to avoid
depending on the qwindowscontext.h header file. Finally, QwindowsNativeImage
is following pending a future refactor with similar code in qpixmap_win.cpp
and the Windows XP style.
Change-Id: Iddff2f3d715e3ab7695e6c2052b7596a01fd6fa8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This improves support for fractional scale factors.
Task-number: QTBUG-49374
Change-Id: Ied6579ee831f3ea29f238baaffa67374ea6823d9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
inputAssistantItem is not available on tvOS.
Change-Id: Icff684d6299688fbeaf40ffcb32ff9c46371b305
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
QPlatformIntegration::clipboard() is not allowed to return
null. This will lead to a crash as soon as someone tries
to access QClipboard.
Change-Id: I3c1e7cdc5103fe4424f9739a09f599d6c0af40b2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Passing zero as size parameter to QAbstractSocketEngine::write() has
unspecified behavior, at least for TCP sockets. This could happen on
flush() when writeBuffer is empty or on writeData() with size 0. Avoid
by explicitly checking against zero size.
Change-Id: I070630d244ce6c3de3da94f84c2cded2c7a4b081
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The previously used regular expression failed for messages
in local languages, particularly for the French message containing
a non-breaking space.
Task-number: QTBUG-56388
Change-Id: Ie757617f1b3a31820d0ed274c4b157d544ac1ea6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
qgrayraster_p.h, qgrayraster.cpp contain code from Freetype which
unfortunately cannot be excluded by e.g. '-no-freetype'. Document this
code therefore separately.
Change-Id: I20d79e984013b2aec874774ddc765b1dc57ebe0e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
If qreal is float, then android-clang compilation was breaking here
Change-Id: Ieccc357ecbbea5cbb22a5808dd0791795240a985
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Recontribute QUrl::fromUserInput under the corporate license agreement;
i.e. remove the separate BSD license from the code.
Change-Id: I1e0b4aab921fb20d2fd558fe732cea596ecbc9ca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The menu scrollers and the tear off items are painted in the layer
of QMenu. In a case that QMenu contains QWidgetAction items, the items
are painted under QWidgetAction items. They are visually hidden unless
QWidgetAction items' background is transparent. The tear off doesn't work
since QWidgetAction item on top of it grabs mouse events. To fix the issue,
add two child widgets in QMenu, paint the scroll up and the tear off items
in one child widget and the scroll down item in the other one. Both child
widgets are painted on top of overlapping sibling menu item widgets.
Change-Id: I7eaef21b667b388fbb78b60664f4a4bd91215309
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The QAction items overlap with the menu scrollers. The patch is to
set correct clip regions for QAction items in order not to overlap
with the scroll arrows.
Change-Id: Ie724bd2be522daf5935fb489523b5d5f32bb7f71
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
... and use that variable in qt_configure.prf to find the pkg-config we
detected during qtbase configuration.
This is required for modules outside of qtbase being able to use
pkg-config to configure external libraries.
We do not use the PKG_CONFIG variable any more, as that interferes with
the $$pkgConfigExecutable() function, which some Qt modules still use.
Change-Id: I8886a266207e04301009fe8207c16b02c5455b2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
According to the latest XDG spec, FontsLocation should point to
XDG_DATA_DIR/fonts, not ~/.fonts.
Task-number: QTBUG-55507
Change-Id: Ia62ffe172abbb93d5ce7fd58bdf038ff13954f1b
Reviewed-by: David Faure <david.faure@kdab.com>
replace explicit pkg-config uses with the results of configure tests,
for consistency.
Change-Id: I3587db6085798ea7a49f8871fc6838eb687a6391
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The current implementation of QMacPasteboardMimeUnicodeText
didn't contain any logic to handle unicode text with a byte
order mark (BOM). According to the
docs (*), 'public.utf16-plain-text' can have an optional BOM.
Because of that, Qt would fail encoding UTF-16 text from the
pasteboard if it had a BOM.
Additionally, perhaps because of a bug in iOS 10, UTF-16 text
placed on the pasteboard by Qt ends up being encoded wrong by
native apps, unless the text has a BOM.
Rather than hard-coding UTF-16 encoding/decoding in qmacmime, we
now leave it to QTextCodec. QTextCodec will add a BOM by
default, and can handle decoding of UTF-16 both with, and
without, a BOM.
*: https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html
Task-number: QTBUG-56229
Change-Id: I3a08deb0262350c67e5622cf23eb3c3a4907ec39
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In 5e3e34731b, a default implementation
of QPlatformFontDatabase::fallbacksForFamily() was added, but this
implementation included only the fonts with a matching style in
the returned list.
The result of this was that if a font face for a specific language
did not have e.g. an italic font, then we would show missing glyph
boxes instead. On Android, it would be impossible to show any
italic text in Chinese, Japanese, Hebrew, or Arabic.
[ChangeLog][QtGui][Text] Fixed synthesized oblique for non-latin
text on platforms using the basic font database, such as Android.
Task-number: QTBUG-51223
Change-Id: I494d8ad87292b65d4380a2e600c1c0dc7fc8f937
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>