Occurrences which should simply be removed entirely (due to always being
true or always being false as a result of the current OS support matrix)
have been left untouched for now.
Change-Id: I86d5a084cb84bc28fefc5191d40924de1439b3de
Reviewed-by: Liang Qi <liang.qi@qt.io>
QSysInfo::WinVersion, QSysInfo::WindowsVersion,
QSysInfo::windowsVersion(), QSysInfo::MacVersion,
QSysInfo::MacintoshVersion, and QSysInfo::macVersion() are now
deprecated.
QOperatingSystemVersion exists as a more flexible replacement.
Change-Id: Ib97d1bfb260f2595ba3c06ff8fd251c5de41cedc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This removes the need to assign to the member variable
after constructing an instance.
Simplify code accordingly.
Change-Id: I9660f1ff2cb5a17b8eee697988bed03b76468112
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Which, in Mach speak, is an exception handler for the process. Also
check if the crash reporter is in a mode that will show a dialog for
any crashed process. If so, leave it to that crash reporter to do stack
traces.
This patch has the nice side-effect that a crashing test won't have both
a debugger and CrashReporter generate stack traces.
You can check the settings for CrashReporter on macOS with the command:
defaults read com.apple.CrashReporter DialogType
If it is set to 'basic' or 'developer' or 'crashreport', CrashReporter
will show the dialog. If set to 'server' it won't. Any unattended system
should have it set to 'server' (which will have QTest invoke lldb to
generate stack traces):
defaults write com.apple.CrashReporter DialogType server
Change-Id: I39153e44cff15c00341857f178b1dcfab154f8ee
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Incidentally, this means that the function will no longer include the
patch version number on Android, but this is more consistent with other
platforms like Apple and Windows anyways.
Change-Id: I9996317e73e491b3a139a511efe1384c57b73e0a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This class provides a "type safe" way to compare and access operating
system version numbers.
[ChangeLog][Deprecation Notice] QSysInfo::windowsVersion() and
QSysInfo::macVersion() are deprecated and are replaced by the newly
introduced QOperatingSystemVersion.
Change-Id: I52b532de2e068ccf90faaa8342eee90c0a4145de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We're using QLocale::system() by default for conversions between
date/time and strings; locale-dependency should be left to QLocale's
methods, so we should switch to using the C locale for the date/time
classes' methods, to make the results locale-independent.
Task-number: QTBUG-55632
Change-Id: I6ea6e8d2289e537f4d26eccf69a4f314c501f116
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The returned string is now more similar to what the Apple (macOS, iOS,
tvOS, watchOS) version returns, and helps prepare for a later patch that
removes usages of QSysInfo::windowsVersion().
Change-Id: I5ba2937b27169ffc6624ccb4e608e6ff56a179bb
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
EcmaScript mandates that number-to-string functions pad the resulting
strings with zeroes, up to the requested precision. QLocale actually
supports this, under the disguise of the "Alternate" flag, used by
QString::asprintf().
We split this flag into the three options it actually represents and
make IncludeTrailingZeroesAfterDot available as a NumberOption. This
allows us to generate numbers in an EcmaScript compliant way.
In addition, a symmetrical option to reject trailing zeroes when
parsing strings to numbers is added.
[ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption
allow generating strings from doubles in accordance to EcmaScript's
Number.toPrecision(n).
Change-Id: If1090d5a0364a29811011a472afc8b75d0af0a8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Redoes the simple calculation of x coordinates in integer registers
rather than use the potentially expensive extract/move from NEON
register.
Change-Id: I914b463d6c20be2281710d626407196112d1615b
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
android is linux, but the QPA plugin is not enabled by configure, so
skip the warning here.
Change-Id: Ib136dd142b775a00686cdaa0cec5414d035c9516
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
remove the redundant 'Style' suffix, and use CamelCased words (the list
uses space as a separator).
Change-Id: I169a741fdc293ac42ae6b97a5726477b53127506
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... to the new qmake based configuration system.
This removes the old qfeatures.txt (distributed over configure.json
files) and qfeatures.h (distributed over qconfig-<module>.h files).
qfeatures.prf is gone without replacement, as attempts to use it would
lead to followup errors anyway.
Change-Id: I1598de19db937082283a905b9592d3849d2199d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Always include qtprintsupportglobal.h before checking the
ifdef, and add ifdef's where they where missing.
Change-Id: I535dce33b26955fb0196ea05d54be41fe93e9151
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
"description" suggests something slightly longer.
this may seem like a gratuitous change, but the upcoming replacement of
the old feature system clarifies makes it seem much less so.
Change-Id: Ibe702e01cb146b59127bf1f990b4acaef1c61d55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Move the different parts of configure.json/.pri into the libraries where
they belong.
Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It is unused since 0f7bc885aa
(Turn off font hinting when active highdpi scaling).
Change-Id: I901407bedf24ae301acbe6afa94bc0a4cadb0620
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
... instead of QMap<Key, bool>. Since Qt doesn't have such
a container, use std::set instead, which also simplifies
some code, in particular, because, unlike the Qt containers,
it does the right thing on attempted duplicate insertion:
nothing.
Saves 6.5KiB in text size (1.1% of total) on optimized
GCC 5.3 Linux AMD64 builds.
Change-Id: I9578a9a58c1c06abe58f22a5b6127d43c2f4be12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
XcbConnection::TabletData only exist if XCB_USE_XINPUT2 is defined and
QT_NO_TABLETEVENT is not.
Change-Id: I94f4558714b105f2ce98b9b4a7462e7a8eb628e3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
dc3e7e45eb introduced locales from a
packaging perspective, providing the information available from the
package manifest. However, developers are rather interested in the
available and preferred system languages to update user interfaces.
Task-number: QTBUG-55672
Change-Id: I740d4f9c9ca21a8cbd437d3b232470897c569d34
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This touches multiple areas. First adding a tooltip to the window list
should not automatically invoke focussing and hence
handleWindowActivated should not be invoked. This is the same approach
as on the windows qpa.
The winrt qpa supports multiple (non-fullscreen) windows since a while.
However, pointerUpdated still acted on the top level window, which
caused problems resolving the real target of a mouse event. In this case
the tooltip received all events, while the application window should get
them. Hence identify the target window via the system coordinates.
Task-number: QTBUG-50733
Change-Id: Iea1f4cd7406e6cde85ab3fc83f018b871fc30824
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
A recent ANGLE update added GL_GLEXT_PROTOTYPES for gl2.h. That was
a good first step, but we need this for gl3.h and gl31.h as well,
because once one upgrades to a newer EGL/GLES capable build of Mesa,
the same problem will surface.
Change-Id: I138ae32e3461dc87bf789aa641359ae46c0ec170
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This change implements the required infrastructure to modularize the new
configuration system.
This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.
When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.
When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.
Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.
This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.
The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.
qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This is required to do the modularization of those
features properly.
Change-Id: I384aff20274e795aa70483980f0ef25309328800
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
don't bother opening headers.pri files, as they won't match anyway.
Change-Id: I4d923266dabf1c9684fba4086f55bc24d76d23c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Ignore everything that after the initial period separated numbers.
Change-Id: I376b154ff0ab6e3877223ec1383ed4708ecd2164
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Add an rvalue overload of the QForeachContainer ctor to allow moving
rvalues into the internal container copy.
This does not change the semantics of Q_FOREACH. It is just an
optimization.
Port to NSDMI to minimize code duplication.
Costs ~1.3KiB across all libraries and plugins in a QtBase Linux
build (optimized GCC 6.1 AMD64).
Change-Id: I180e35ecab68aa1d37773b3546787481bb5515a2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Moves the blendPixel function from the SSSE3 file and use it more
generally, also adds a const_alpha version.
Change-Id: Ia29d1ab3879a845d5b65e0610b7836507e33c7ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Duplicates the improved bounds check for rotated sampling in RGB64, and
improves two prologs by using that x1 == x2 during the prolog.
Change-Id: I562c5bee12e314c36d3b304f2f72d7635d22d7d4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Modern platforms such as macOS and Windows support large fancy icons
in the system balloon notification. We just need to pass the icon into
platform plugin.
[ChangeLog][QtWidgets][QSystemTrayIcon] Support custom icons in showMessage()
Task-number: QTBUG-49283
Change-Id: Iaeca36fe1bf350eae34d105549010ecbedf9c0a1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
qUncompress has code to deal with OOM situations without crashing. This
code is highly convoluted. It achieves that by realloc()ing QByteArray's
buffer. Instead, let's operate on QByteArray::Data and use RAII to
manage the lifetime of the buffer.
Change-Id: I1cc7601489634e96833cfffd145688433b76f447
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This function reallocates a QArrayData block with realloc() but, as
the name says, it's only valid for types that do not increase the
alignment requirements. I don't think it's worth doing this for types
that do increase the alignment requirements, since we don't know the
alignment of the pointer returned by realloc(). If the new pointer
modulo the alignment is different from the old pointer modulo the
alignment, we'd have to memmove data around, which would be quite
inefficient (realloc might have memcpy'ed already and this memmove
would copy data to nearby).
This function is intended to be used especially in QString and
QByteArray, which were already using realloc() on pointers created by
QArrayData::allocate.
Change-Id: I45b61247db2e84797ad794c1049c47a09c1fb29a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
We have to check whether the cursor is covered by the virtual keyboard
when it is shown. If that is the case and the keyboard is snapped to the
bottom of the screen the whole content is moved up to ensure the
cursors's visibility.
WinRT's input context had to be moved from the XAML to the GUI thread
as the signal/slot connection does not work otherwise. Signals from
QInputMethod were emitted but not handled in QWinRTInputContext as it
ran on another thread which did not spin an event loop.
Task-number: QTBUG-50291
Change-Id: Id89e970dc194c25ad07ceab14d9fea51bd7388b2
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
By doing so we no longer leak the input pane inside the destructor.
Additionally the coding style is closer to the rest of the WinRT port.
Change-Id: I0d56086719c98585cec8bc3c4bcb2d86c3ea2e79
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
While there are similarities, we want to keep control over those tests
which affect only one platform.
Change-Id: Id1f6eb9954169148d70cea14969f34f21d1e6690
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
For platforms which require packaging the testdata into the application
resources, the BLACKLIST file needs to be added. Otherwise it will not
be found during runtime.
Change-Id: I2d5c3b3040b3b268bc73254459b8b902b7fae4e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
It makes very little sense that one needs to have a debug build
of Qt to debug QObject issues in application code. At this date
we don't even offer debug builds for Linux systems, and anyhow
one might want to debug an application running against a
release build of Qt.
[ChangeLog][QtCore][QObject] QObject::dumpObjectInfo and
QObject::dumpObjectTree are now fully functional even in a non-debug
build of Qt.
Change-Id: Ifddd3023ffc82f3dc3928a7a94d4970e2fb1b44a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
We are removing the Content-Length header from our QNetworkReply
headers from a compressed HTTP reply.
A new attribute is added to have access to the original length.
Task-number: QTBUG-41840
Change-Id: I4e885e422d4203d63460d49c0eb5f11022003578
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Shows a descriptive warning when the application is not
initialized or it's not a GUI application.
Change-Id: I0fbb1c30fb603f444b6ef2a5adbe4f27a15f1daf
Reviewed-by: David Faure <david.faure@kdab.com>
Initially it was planned to introduce it in 5.8, but actually
it was introduced in 5.9.
Change-Id: I9101a78fa4c17572982571bac37a8fce00e86d01
Reviewed-by: David Faure <david.faure@kdab.com>