[UIFont familyNames] will return a list of fonts that include the fonts
Telugu Sangam MN, Heiti SC, Heiti TC, and Bangla Sangam MN, but when
calling [UIFont fontNamesForFamilyName:] for these fonts we get an
empty list.
The problem appeared when we tried to then populate these fonts, as
CTFontDescriptorCreateMatchingFontDescriptors() would return a list
of font descriptors from the PingFang SC font when called with
NSFontFamilyAttribute = "Heiti SC". This is due to PingFang being a
replacement for Heiti in later iOS versions.
Task-number: QTBUG-50624
Change-Id: I22684e247d472c30775321b6976b3aeb6ea579f5
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
So that it actually compiles with gcc-linaro-arm-linux-gnueabihf-raspbian.
Remove also flags a device spec should not set (like -std and -O).
Change-Id: Ib7a3bc298e60715410d5c00fbc22199ab4711fa7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The rpi3 spec added previously is only half of the story now that we
have the option to use another GL driver.
Change-Id: I1b1edde77bcc6d2f382f1021de9c594c27c34d6f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Do the multiplication of the normal components in floating point to
avoid integer overflows. Also add an assert, since a scale of 0 here
will cause a normal of (0, 0) which will assert further into the
drawRectangle() function, and the cause is not immediately clear.
Task-number: QTBUG-51956
Change-Id: If7187d56af28eaa149f8f362050a587da5adb262
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Assuming a certain max height for glyphs would make it impossible
to render certain fonts. The follow up to this change is in
Qt Quick, where the code must also be adapted to make it work.
Task-number: QTBUG-52389
Change-Id: Iabebb2de21a92d1537b2965aa6603529c1d5d587
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
If a user's code, attached to sslErrors signal, calls abort/close
or disconnectFromHost but our SSL socket was configured not to verify a peer,
no need to continue handshake after calling checkSslErrors
(and finally crashing on invalid 'ssl' pointer).
Task-number: QTBUG-53906
Change-Id: I7f185511d278f9d6f16e7d6c5ba424707141459c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Push conversions from pthread_t to Qt::HANDLE and back into functions.
The casts that were being used didn't work for the unusual 64-bit
pointer/32-bit int combination that QNX is using for 7.0. HANDLE ends
up as a 64-bit pointer and pthread_t ends up as a 32-bit integer. g++
considers the precision loss when converting from the 64-bit pointer
to the 32-bit integer an error. Better to have the casts hidden in
functions so it's easier to adjust them for unusual combinations such
as this.
Change-Id: Ia156b26224a0f7edc1c31e3d1ee8b21191381698
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As we are rendering into a new paint device we need to copy the device
pixel ratio from the widget.
Task-number: QTBUG-50207
Change-Id: I2fe08052c4ab589cb871f4c95440b7d63f79beb9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
GetModuleFileName exists for Windows 10 and upwards, hence use the
generic version from the win32 mkspec. This allows to create a
QCoreApplication object with nullptr argv, as the application filename
is identified via the binary itself and not via arguments. A couple of
auto-tests use this method to create multiple application objects during
runtime.
Unfortunately we cannot apply this for msvc2013, even though MSDN states
the GetModuleFileName exists, it fails to compile for Windows Phone 8.1.
Change-Id: I2b8b988107487ef3785462f8ca40b0a6e0623e32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
In case QEventDispatcherWinRT::runOnXamlThread returns an error the
runtime sets the status of IAsyncInfo to Error. At the point when the
IAsyncInfo destructor is invoked, an unhandled exception is thrown
indicating the error has not been handled, causing any application to
just crash deep inside the Windows platform libraries.
Hence, in case runOnXamlThread returns non-S_OK we have to manually
invoke Close() of the IAsyncInfo to tell the system we have taken care
of everything.
Change-Id: I3ac1e2ec2726f42e44f4f9a92191e454711120dd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Contrary to our initial assumption, this should be added by default to
allow full functionality during development by default. Developers need
to decide which capabilities to use during the publishing step already,
hence improve DX by adding this.
Task-number: QTBUG-50847
Change-Id: I36e0214f7bcf8610d31851eea172aba3944cfd99
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
There is no need for the functions to assert. By returning false they
show that something went wrong and the error will be handled
gracefully.
Change-Id: Ib026adf5c6fb23b5e6b5598533caec3b3669220c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
If runOnXamlThread returns anything but S_OK an exception is thrown
which might cause the application to terminate. So we give the lambda
a reference to hr and check that reference instead of runOnXamlThread's
return value for errors.
Change-Id: I1188ea720c63f6fdf43400f2f3ff928b72afc58e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
runOnXamlThread should always return S_OK (causes exceptions otherwise)
so we need another way of error reporting to the outside (hr reference).
A failed hr is reported to the outside (of the lambda) and interpreted
as an unknown error.
Specific error cases like the given address not being a local address
or the given address being in use already are handled inside the lambda.
The specificErrorSet variable is necessary in these cases so that the
error is not overwritten by unknownError.
Change-Id: I198d66fe97726d5127bf31e50c7eff3363d5259c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Q_COMPILER_CONSTEXPR can be undefined (or not defined at all) to
indicate that constexpr should not be used regardless of the compiler's
ability to support it. This is done for QNX because some C library
floating point functions used in the Dinkumware C++ library aren't
constexpr functions; i.e., the library doesn't have proper constexpr
support even though the compiler does.
(cherry picked from commit d87242968f)
Change-Id: If0bdeb2180710dd9ccd97d79fa91cf9ff42f7990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtGui][Platform Specific Changes] Added bsdfb
platform plugin for FreeBSD. Plugin renders directly to
framebuffer, no hardware acceleration supported. bsdfb accepts
"fb", "size", "offset", and "mmsize" arguments with the same
format as linuxfb.
Change-Id: I5f5cea0b5ed70d5c6f8d01dc547f54c731bcae5f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
BSD OS mkspecs share mainly the same configurations except very few
differences. Merge into a common/bsd/bsd.conf file to be used across all BSD
OSes in their respective qmake.conf and add a qplatformdefs.h that contain
the common defines to be re-used in the BSD mkspecs.
The change includes the usage of <sys/param.h> also on NetBSD through the
common qplatformdefs.h, which is intended for using NetBSD's version defines.
Change-Id: Ibb0ac9e4c8bb5aff7d0febdcab1a4b9600a61117
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The fromCGRect function was left out for QRect, as the foundation type is
using CGFloats internally. Clients should use an explicit QRectF::toRect()
when potentially throwing away precision.
Change-Id: I0d4c5c5a4e6a45ea3287e3f37a00b69b0bfdefcf
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Use larger system metric SM_CXICON instead of SM_CXSMICON and set NIIF_LARGE_ICON
in the NOTIFYICONDATA. De-inline function iconFlag() and set NIIF_USER for user
icons for NIIF_LARGE_ICON to take effect.
Task-number: QTBUG-53591
Change-Id: I47c8e0a020ef94241403b1fbae76d5ef2e074301
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The move constructor is slightly more interesting than the copy
constructor because we can reset other to a short data state on 64-bit
systems. The assembly of that function is simply:
mov (%rsi),%rax
mov %rax,(%rdi)
movq $0x1,(%rsi)
retq
The move-assignment operator for QDateTime was already there. There's no
need for one for QDateTime::Data since it's never called.
Change-Id: I06bae9392f534e45b3f1ffff144dffdd7f23b170
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We won't shrink on manipulation when we have memory allocated, but it's
a good idea to create a non-shared copy if we can. It's an unlikely
scenario, though, because it requires the QDateTime object to have been
set to a large state then manipulated back into a small state.
Change-Id: I06bae9392f534e45b3f1ffff144dfee755bafa01
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The file has an organization, so let's follow it. This commit has no
other changes besides moving code around.
Change-Id: I06bae9392f534e45b3f1ffff144e0b1f6dd72622
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Well, maybe not for so long: we may want to revisit it for Qt 6. At the
very least, we should enlarge the size of QDateTime on 32-bit system so
that they too can benefit from the optimization.
With this optimization, on 64-bit systems, the most common uses of
QDateTime now no longer allocate memory at all. The range is slightly
reduced from 584,554,049 years to 2,283,414 years around 1970. The other
drawback is that calling QDateTime::offsetFromUtc() on a localtime now
needs to recalculate the offset, instead of using the cached offset.
(QDateTime::toMSecsSinceEpoch() didn't use the cache).
Change-Id: Id5480807d25e49e78b79ffff144a8b2c9af91814
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit moves QDateTimePrivate functions setTimeSpec, setDateTime,
getDateTime, checkValidDateTime and refreshDateTime outside the
class. Like the previous commit, this is done in preparation for the
"Short QDateTime Optimization" as the "msecs" field will be placed in
the short data, if possible.
By making them file-level static, this also improves code generation, as
the compiler doesn't know whether it has to emit the class members for
out-of-line use or not.
Change-Id: I06bae9392f534e45b3f1ffff144df4d73cbc9184
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit changes most accesses to the d->m_status (including
d->spec() and d->setSpec() uses) to use new static functions. This is
done in preparation to the "Short QDateTime Optimization" as the status
byte will be kept in the short data.
Change-Id: I06bae9392f534e45b3f1ffff144dbd795d03227a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Instead of using a macro for maybe passing an extra parameter, pass the
d pointer and let the function decide what to use and what not to use.
Change-Id: I06bae9392f534e45b3f1ffff144dbeb68a30cb48
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
They're superfluous, since b491fab02a
removed the distinction between null and invalid. Just use the
isValidXxx equivalents.
Change-Id: I06bae9392f534e45b3f1ffff144db9badad010fd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We're going to have to stop using QSharedDataPointer because of the
upcoming short-datetime-optimization. By dropping the inheritance, I am
also able to rearrange the members and remove the padding hole that
existed.
The second padding hole was removed in the previous commit, which merged
two 32-bit fields into one.
On 64-bit systems, there's no way around a remaining 4-byte hole
somewhere due to the odd number of 32-bit members. I chose to leave it
in the middle of the struct, before the m_timeZone member, instead of
tail padding, so that the layout of the first members structure are the
same in bootstrapped and non-bootstrapped builds. That should help
debugging the bootstrapped tools in Qt Creator. It's also now the same
in 32- and in 64-bit systems.
Change-Id: Id69569111e7d4e619e22ffff144b1fba708885f7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Storing them in a single byte is the first step towards the Short
QDateTime Optimization.
The bump in the "private version" by 10 is to accommodate possible
changes in the Qt 5.7 branch.
Change-Id: Id5480807d25e49e78b79ffff144a59420457bcf0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The animated glow always has a length of 120 but was previously drawn
with the clipping rect of the bar's actual size. For sizes smaller than
120 the native theme part would be clipped and the black gradient would
show.
Change-Id: Id81e39c405ef81ae08af0f64249568016944bdf1
Task-number: QTBUG-51266
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This enables creation of autotests which use touch events, without using
private API.
Task-number: QTBUG-44030
Change-Id: If8fe89f8423aaafd9e6501e231c33580b9365eb8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This makes it easier for users to find out how to get a file's
extension when browsing docs.
Change-Id: I08a1b620dea5432462133324824fae85754b9a09
Task-number: QTBUG-53380
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
The backing store would not report itself dirty if only render-to-
texture widgets were dirty.
This caused QOpenGLWidgets not be repainted after being remapped if they
marked themselves dirty while unmapped.
Task-number: QTBUG-50818
Task-number: QTBUG-51815
Change-Id: If43f7cbb6f4d44831b4c21b89f884d6bcaebf87c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
the assumption stated in b67a0836d is actually invalid - configure sets
build_all without debug_and_release there. debug_and_release does
actually imply build_all, though.
to make things less confusing, don't let configure inject
iphonesimulator_and_iphoneos into all projects, but handle it like
debug_and_release instead.
Change-Id: Ib7acdc63308a538862fc603428f81aba60bca08e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The Apple documentation explicitly says that you should call super
when implementing these methods.
Change-Id: I584bb140a4a5bde88927b379ab19158a78c6fea9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Add a class to display debug messages, providing convenience functions for
installing and formatting parameters like indentation. It prints a startup
message containing relevant information about Qt.
Change-Id: Id0a19adbb5953a6ded1a8e692f242b63748e7273
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>