Now QBasicMutex is Lockable and QMutex is TimedLockable, which means they can
be used in std::lock_guard, std::unique_lock, std::lock, etc.
[ChangeLog][QtCore][QMutex] QMutex now fully models the TimedLockable
concept by providing the try_lock, try_lock_for and try_lock_until
functions, therefore making it usable in Standard Library lock
management classes and functions.
Change-Id: I7c691481a5781a696701e1ab78186b5cefbd6a87
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In MySQL, the character set named utf8 uses a maximum of 3 bytes
per character and contains only BMP characters.
It does not support supplementary characters.
In version 5.5.3, a new UTF-8 character set called
utf8mb4 has been introduced, which supports 4-byte characters.
[ChangeLog][QtSql][QSqlDatabase] When connecting to a MySQL server
whose version is 5.5.3 or higher, the default connection charset
is now utf8mb4 instead of utf8 to allow 4-byte UTF-8 encodings.
Change-Id: I718bd23212afd67367b39d4ce7da2a99ae0f1cca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
As a special case, setting the value of chunk size to zero forces
QRingBuffer to produce a separate QByteArray on each call which
appends the data. So, this enables a packet mode where portions of
data are stored independently from each other.
Change-Id: I2d0b331211901a289da7d4533e974f06830b5590
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Adds rounding before using the optimized low accuracy interpolation,
this reduces the magnitude of error in the scaled result from ~4 bits
to just 2 bits.
Change-Id: Ie4e618bf5b1f4a74367aa419ebbd534cc6a846b3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This seems to be a leftover from pre-QPA Cocoa menus time.
Change-Id: I1bcfb3a882f500a63a5dec0fbe01f4541e14d54a
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This requires fixing the test on Windows: QMutex internally uses
WaitForSingleObjectEx which can wake up early, according to the system
timer resolution:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms687069(v=vs.85).aspx#waitfunctionsandtime-outintervals
QTime must be so slow that it hides the early wakes, but QElapsedTimer is
accurate enough to make the test fail unless we add back some tolerance to
compensate for the early wakeups.
Change-Id: I20b38af9c87a0b0e38a19b9bff1c3c24975c78f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In some auto-tests, we create several instances of
QGuiApplication (though seldom, if ever, simultaneously).
However, the QCocoaMenuLoader instance was never properly
deallocated, resulting in NSApplication.servicesMenu
to still be assigned. This resulted in an exception being
raised (NSInternalInconsistencyException) the second time
we would construct a QCocoaMenuLoader.
The CPU cycles saving solution is to make QCocoaMenuLoader
a singleton. This approach is also safe since this class'
initialization doesn't depend on any state in QGuiApplication
(even the application name is fetched from either the main
bundle or the app's args).
This also allows us to clean up some code in QCocoaApplication
and QCocoaApplicationDelegate who have suffered from lack of
attention over the years.
Change-Id: Ic4c859d628ab8abd9b469b99c64293582f8e363d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
When support for custom verbs was added the overloads for the various
body data options were not.
Task-number: QTBUG-54868
Change-Id: I1a495023d957fc71d1e3b77997a2b4b8531c0a0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This proved to be quite slow in the past due to QReadWriteLock's implementation
being suboptimal (prior to its improvement in
343e5d066a).
This codepath is exercised quite extensively by QML with enum registrations.
Change-Id: I94d1e13933bf005604dc4494e2cb5bc25ef3d387
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
it's entirely reasonable to extend the saved command line by new
arguments. note that these are not saved in turn.
Change-Id: I02c1a2b33e93c85b3a29c50de00c2e5334f6ef51
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
these options don't seem particularly useful (they were added in 2001
without any indication of the intended usage). maintaining multiple
static configurations can be best achieved with a script (outside the
build directory, which these options didn't permit to start with).
this obsoletes QTBUG-46690, which refers to these options.
Change-Id: I994c18481cd63d256bb7a6d1948c57f7bd480614
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
it's somewhat questionable to save the environment of pkg-config, but
not that of many other things we use.
additionally, we now have logic to automatically set it up from the
sysroot when it's missing.
This reverts commit 228392aff2.
Change-Id: I0612c196c9a5023bb3ef436aebfb87cb46d8cd14
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
otherwise we get an unintelligible mess if multiple messages are emitted
in the same category. also, there were already empty lines between
categories, so it was also inconsistent.
Change-Id: I5e6622bc8a5d2773bbd99124cedf4e3eb73b8a60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
it's the only OS with braindead "old" dtags in the first place.
Change-Id: I0fba436ff3f9fc061c1741b1899ca133b8ad6b5e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the json parser passes line breaks verbatim, so we need to get rid of
them ourselves.
Change-Id: I3b71fe54dcaa8c3a2ff94e8ac4845f49dabe1663
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
they are really meant for pretty-printing the summary in the first
place, and were previously unused when this type was invoked explicitly
(because of using a condition).
adjust the neon/mips_dsp/mips_dspr2 descriptions to match the context
and remove the now redundant "message" fields.
Change-Id: I08558f342a0d9189a37145085e5470f91a9d0881
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
they are really meant for pretty-printing the summary in the first
place, and were previously unused for this type.
adjust the c++* descriptions to match the context.
Change-Id: I2a76b5651892bf9bd6fec315e446bfdb7c3aee97
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
they are really meant for pretty-printing the summary in the first
place, and were previously unused for this type.
adjust the sse/avx/avx512 descriptions to match the context.
Change-Id: Icf514718355c6ccd608d825b70296cc0383dbfe8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
this ensures that we complain if desktop gl or gles2 is explicitly
requested but not available.
Change-Id: Iad068ef34cdf9353cb483d4dc667ddd85ded740d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
this ensures that an explicitly requested linked/runtime support is
complained about when the test fails. the old configure would do that as
well.
Change-Id: I7f235fa7df5e5d53938de0e32b07536447b8d1d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
introduce -openssl-runtime and -openssl [no|yes|linked|runtime] for
consistency with the respective dbus options.
Change-Id: I061b46b52b3132ead4332b33f7a60d6fe0e73ab9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... by chaining it to the dbus feature, as is done for openssl/-linked.
Change-Id: Id1f9f761914c356d2a0056aa80213954dce3403d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
while probably not too useful, the old configure does allow explicitly
disabling verbose mode.
Change-Id: If0585443c649a67f616b3668cc90b18fecde11ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since 10.6, the first menu is always identified
as the application menu. See remark about Nibless
apps and the application menu in,
https://developer.apple.com/library/prerelease/content/releasenotes/AppKit/RN-AppKitOlderNotes/index.html
Therefore, we can get rid of the NIB file together
with the loading logic we had in place (and which,
incidentaly, was using deprecated API).
Change-Id: I99bf0e9d8ea749a9be9295fa12602335abc6548e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Most APIs related to ProcessSerialNumber have
been deprecated since 10.9.
Change-Id: I6be5ae92cfe2c8f80d557af6c6a79c0cd016ba90
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
The delivery of hover events creates unnecessary overhead on touch
platforms. This allows Qt Quick Controls 2 to determine whether the
underlying platform wants hover effects. The hover effects are enabled
by default for the classic desktop platforms: Linux, Windows & macOS.
Change-Id: Ia4e7b5c0fcb7af8f1c47e06fb28086cffdf35976
Task-number: QTBUG-50003
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Instead of reporting the file times in the precision of seconds, our API allows
us to report it up to millisecond precision.
Change-Id: I8bcc6a1fb4116e8c5421d650a68f6fb00482e551
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The current QFontDatabase().writingSystemSample for Arabic is an
arbitrary text and meaningless.
This suggested text is used in LibreOffice and it makes sense for Arabic
people.
Task-number: QTBUG-53390
Change-Id: I7456d2741fbc07b4cfffd6151b421cb4427dd3e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
C preprocessors augment their standard list of include paths from the
environment: Unix preprocessors use $C_INCLUDE_PATH (for C) and
$CPLUS_INCLUDE_PATH (for C++), plus CPATH for both, whereas MSVC uses
the an environment variable simply called "INCLUDE". Handling this for
MSVC is particularly important because the VCVARSALL.BAT script sets the
necessary #include paths in the environment for important things.
Without that being parsed, moc won't find some #defines, like
WINAPI_DESKTOP_FAMILY.
[ChangeLog][moc] qmake and moc now cooperate to use the Visual Studio
environment variables (set by the VCVARSALL.BAT script) to find system
include files. A possible consequence is that moc parses application
headers slightly differently, depending on #if conditions that depended
on macros that previous versions had not seen #define'd. Implementers of
other buildsystems are advised to pass the --compiler-flavor=msvc option
to moc.
Change-Id: I7e06274214d1939b0124e5b4bf169cceaef9ca46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In order for moc to properly parse #ifdefs and family, we've had
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
compiler. That list is woefully incomplete.
Instead, let's simply ask the compiler for the list. With GCC and
family, we use the -dM flag while preprocessing. With ICC on Windows,
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
requires using some undocumented switches and parsing environment
variables (I've tested MSVC 2012, 2013 and 2015).
The new moc option is called --include to be similar to GCC's -include
option. It does more than just parse a list of pre-defined macros and
can be used to insert any sort of code that moc needs to parse prior to
the main file.
Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
There is now a DARWIN version for all four Apple platforms at once,
a MACOS_IOS version for macOS and iOS (since many of the checks we need
are prior to tvOS or watchOS's existence), and MAC and OSX have been
relegated to synonyms for MACOS_IOS and MACOS, respectively.
Change-Id: I54f587e26c6b46bf4b469c5d3039086c65566651
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Align ourselves to what std::thread does (and what's sensible to do anyhow,
since we even document that "Deleting a running QThread [...] will probably
result in a program crash").
[ChangeLog][QtCore][QThread] Destroying a QThread which is still running will
now result in immediate and abnormal program termination.
Change-Id: Ib481287915be01a1381df14abf6e0fb68c36b5b5
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Associates the scalableBitmapFactor with the freetype QFontEngine
so that it is preserved when caching the engine
Task-number: QTBUG-53652
Change-Id: I010f9d235ccf30679b112e0c05e01bc247a3693f
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
We can expect C++11 now, and using an initializer list
is much shorter.
Change-Id: I6424d24ce7660b342a629e836b94d62c8868a44d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Conflicts:
qmake/library/qmakeevaluator.cpp
One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line. Trivial resolution.
Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
The (example) code used a real to hold 360 / 7, which is of course 51,
discarding the 3/7 that was most likely meant to be kept. Noticed by
Coverity (CID 22364). Use 360.0 instead of 360 to get more accurate
results.
Change-Id: Ifdfbb932589d8ea728710e8b656af651c9f8a7d2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>