It allows to create a QJsonObject instance in C++ by using
initializer list of pairs QString QJsonValue, for example:
QJsonObject o = {{"property1", 1}, {"property2", 2}};
[ChangeLog][QtCore][QtJson] QJsonObject now supports
C++11 initializer lists.
Task-number: QTBUG-26606
Change-Id: I67af881e175f427e563e685336c48a5f8466b476
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Halves the amount of paint events triggered by transient scrollbars.
Task-number: QTBUG-30316
Change-Id: Ifdf968d5c45013332758a6b751ce11d1ef2a2ca8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Introduce function QMdiSubWindowPrivate::storeFocusWidget()
to store focus widget and call this when de-activating a
sub window. Change restoreFocus() to return a bool and call
it from QMdiSubWindowPrivate::setActive().
Task-number: QTBUG-38378
Change-Id: I18dbe66ce85213ca5b4907b5a09126544415351a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Other platforms do not do this either. What is more, some of the
extension handling code will try to resolve functions that are not
necessiarly present, and this is not an error.
Change-Id: I39dad8f8d89fc45de3ea83f04727a8e38b6a3387
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
With MSVC it takes minutes to compile pbuilder_pbx.cpp.
So let's remove this generator that's never used.
Change-Id: I13038d551283d96dfb0baf0b8a8a68c6538193c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
For multi-pass RCC qmake generates broken VS project files, because
the RCC extra compiler directly calls the C++ compiler on a generated
source file. Adding this call to a VS project file will bypass any
project settings. Also, the VS project generator is not prepared to
add extra compilers that generate object files.
Task-number: QTBUG-39685
Change-Id: I1bcaad8936be8371d596f29ed8952888ba95f7b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Replace old virtual declarations by Q_DECL_OVERRIDE where
applicable.
Errors discovered: QWindowsScreen::primaryOrientation() did not
overwrite any method, changed to orientation().
Task-number: QTBUG-38858
Task-number: QTBUG-38993
Change-Id: Ie85d5235f3cd35c7a24cac3c1c7693c6508b1009
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
We were resetting the window type on show, this was breaking some
deployments, since it used to be possible to set the xcb properties from
the user application.
This change requires the user to at least start using the
QtPlatformHeaders before overriding the window properties with the values
set there.
Change-Id: Ic58919a42b6d532035c7ec6158a086b85666a22f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Recent patches have added new functionality, and other aspects of the
documentation have been outdated for some time.
Task-number: QTBUG-39458
Change-Id: Ib7013eee091ff443971485133a58785d9284bc3d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Fix ugly warnings by MinGW:
qwindowsfontdatabase.cpp: In member function '{anonymous}::TableDirectory*
{anonymous}::EmbeddedFont::tableDirectoryEntry(const QByteArray&)':qwindowsfontdatabase.cpp:167:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (Q_UNLIKELY(m_fontData.size() < sizeof(OffsetSubTable)))
^
..\..\..\..\include/QtCore/../../src/corelib/global/qcompilerdetection.h:202:49:
note: in definition of macro 'Q_UNLIKELY'
Change-Id: I47fac598ed1b6623146fb437c00da64d8e8b6984
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Until now, it has been necessary for tablet-oriented applications which
care about multi-button styli to reject each tablet event and wait for
the mouse event in order to know which buttons are pressed. This patch
adds the new API and also the X11/xcb implementation.
[ChangeLog][QtCore][Tablet support] Added buttons to QTabletEvent
Task-number: QTBUG-39458
Change-Id: If2c9ec1ceacc1700a82686c5fc6f568f9111055a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
When the user holds the Wacom Art Pen straight, rotation is zero;
when turning it counter-clockwise, it should have a negative angle,
whereas the driver sends a positive angle multiplied by 10;
when turning it clockwise it should have a positive angle up to 180,
whereas the driver sends 360 * 10 going downwards towards 180 * 10.
These corrections make the angle reading the same between Linux and
Windows.
Task-number: QTBUG-39570
Change-Id: I9f18ef6629bffa849c8d65cba02d42b21469cebc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This function has been inlined in commit 4f50be8d,
but wasn't removed.
Change-Id: I1a4eb7399ab2dd87a9fb15c4c886004d777487a8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
On supported platform, allow to show a backtrace by using
%{backtrace} or %{backtrace depth=N separator="|"}
[ChangeLog][QtCore][Logging] QT_MESSAGE_PATTERN can include a
backtrace using %{backtrace}
Change-Id: Ib00418c070d3bd6fe846dc04bf69fa91ba64f9cd
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
"Unsharables", given they can't be shared, don't need to detach, so skip the
check altogether and don't try to propagate the flag. It shouldn't be.
Change-Id: Icc483401d5a57708b43d64bd3cebc66c6b934815
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Implementation of the functions were moved to templatized helper
functions that will be shared with QString::splitRef in future.
Change-Id: Ie25fab57f77f5ceb11ced26ab7e7f86739f4c78b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
"Static" and "raw" data are immutable and shouldn't be modified from
within the QArrayData API. Adding the asserts here gives us a basic
safety net.
Change-Id: Ie2fec03fa1ef5a7f73c50e5badf8b8ab863728b4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the test fails here, output the values actually used in comparison.
Change-Id: Ie4ed5ebdf1951c02b89a9648aee50a99d0bb0628
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Cost of a type lookup for core built-in types is really small, just few
cpu instructions, but the benchmark was testing create() and destroy()
functions (in a different fashion) which by definition allocate and
de-allocate memory. These memory operations are significantly more
expensive which obfuscate the results.
Change-Id: I33c679f57e6c2b57e98328f076dfe249ab7bcde8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This does mostly the same HB-old did, except of non-BMP codepoints
support and better handling of space and punctuation characters.
Change-Id: Iaf8565a35f27d5f4837128cec345eff3d9d2bdf0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Factor out function to determine the font family for a style
hint and use that for the FreeType font database as well.
Task-number: QTBUG-39961
Change-Id: Ic5ec0928c7994b61e4d2b10d829826658b1aa1d5
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This is much more useful than the URL "file:", it allows to use
"empty path" and "empty URL" for the same meaning (e.g. not set).
QFileDialog actually uses "file:" though, as the URL for the
"My Computer" item in the sidebar. This patch preserves that.
[ChangeLog][QtCore][QUrl] QUrl::fromLocalFile now returns an empty URL
if the input string is empty.
Change-Id: Ib5ce1a3cdf5f229368e5bcd83c62c1d1ac9f8a17
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Saves us from an extra load in the loop when the result is already
there.
Change-Id: Ib65b5b13f27975b8fc88be9b888c19505bf5e07c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This was a long-time coming.
One innovation from this commit is that it will add the source to
SOURCES if the compiler is already generating code for that specific
target. That is currently always the case for Neon, and the MIPS DSPs
since that is the only condition in which configure will enable those
targets. And because of qt_module.prf, it's also always the case for
SSE2 (but not for SSE3 or higher).
So simplify the .pri files by removing always-true conditions.
Change-Id: Ib24af74717b652c9a6be246e3c17a839470f37da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
We don't actually detect whether the compiler can create Neon code or
provides Neon intrinsics. Most of them do, so that test would be mostly
moot. We removed the detection previously because we couldn't
automatically enable Neon due to leakage of instructions outside the
areas protected at runtime.
Instead, we rely on the mkspec properly passing the necessary flags that
enable Neon support.
This commit does not change that. All it does is verify whether the arch
detection found "neon" as part of the target CPU features. In other
words, it moves the test that was in simd.prf to configure.
It does fix the Neon detection in configure.exe, which was always
failing for trying to run a test that didn't exist
(config.tests/unix/neon).
Change-Id: Id561dfb2db7d3dca7b8c29afef63181693bdc0aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
No need to duplicate the extra compiler code.
Change-Id: Ic5656d2f4500c19e0428a7eec1cbcef6c353e99b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The "rbit" instruction requires ARMv6T2 or higher. This was found in the
CI when building the imx6 target:
Compiler: arm-poky-linux-gnueabi-g++
Flags: -mfloat-abi=hard -mfpu=neon
Errors from the assembler:
{standard input}:3078: Error: selected processor does not support ARM mode `rbit r3,r3'
{standard input}:7341: Error: selected processor does not support ARM mode `rbit ip,ip'
That compiler defaults to ARMv5T. That's obviously wrong for an i.MX 6,
which is a Cortex-A9 (ARMv7), but the correction applies for older
processors.
Change-Id: I56c276fa411977dd7cd867d62adf021e4909302c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
QVariant::convert accepts int as an argument, there was no need to cast.
Change-Id: I774c9567972860d887e17acb91ec332ffcebd9d5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
QJsonValue, while comparing two QJsonArrays, should consult also length
of the arrays, because a different than null base pointer doesn't mean
that an array is not empty.
Change-Id: If76739355a4e74b842e836289565f98d95c006d5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QJsonValue, while comparing two QJsonObjects, should consult also length
of the objects, because a different than null base pointer doesn't mean
that an object is not empty.
Change-Id: Ibee1849ef9fed15d32f2c8f2aad9b053846e46b7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Before this change such code:
QJsonObject o;
o["blah"];
would create property "blah" and assign null value to it, while
this code:
const QJsonObject o;
o["blah"];
would not. The change unifies the confusing behavior. Now reading
a non-existing property, is not causing a property to be added
in any visible way.
Internally QJsonObject stores a special hash of undefined, but
referenced values. Such reference is supposed to not live long,
only to the first compacting or assignment.
Change-Id: Ib022acf74ff49bad88d45d65d7093c4281d468f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The operator should always return an undefined values for an empty
object
Change-Id: Ic38f7660d77c64b2d001967bc5109df4185db74a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
It is a minor reduction, in release build it is ~200 bytes
Change-Id: I4f7972c95769f2e0ca1ddc935ff7a0a6b4379e2a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
There is no need for a custom algorithm as we can use
std::count
Change-Id: Id1ab514c7cd8f52efe49b27712121415d7ca4455
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix tests widgets leaking widgets and ensure it stays
that way by adding a check to cleanup().
Task-number: QTBUG-38858
Change-Id: I77a81d823c68cf0b4e51c2da55b1c473d6e4170b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Although it may seem strange that such a method is const,
optimizing doesn't affect the user-visible part of the object.
Moreover, *not* having it const makes it asymmetrical with other
methods (such as match()) which are const, and under certain
conditions optimize as well.
Change-Id: I0cd8d4a6909d00629fcc65c1c3a1f011f31db782
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Blocking DBus calls have the potential to totally wreck user interactivity at
best (actions taking too long) and make things appear completely broken at worst
(the default timeout is 30 seconds, which is a huge amount of time, especially
if you get unfortunate and have a repeated blocking call).
Provide a warning when a call is found that takes too long, based on some preset
durations (200ms for the main thread, 500ms for other threads on the basis that
the main thread is generally more important).
Also provide configuration knobs for these environment variables, in miliseconds:
setting them to 0 will warn on all blocking DBus calls. Setting them to -1 (the
default, on release builds) will disable the warning.
[ChangeLog][QtDBus] Blocking calls that take a long time will now generate a
warning. The time taken may be tuned using the environment variables
Q_DBUS_BLOCKING_CALL_MAIN_THREAD_WARNING_MS and
Q_DBUS_BLOCKING_CALL_OTHER_THREAD_WARNING_MS. The value represents (in
milliseconds) how long before a blocking call is warned on. A value below zero
disables the warning, a value of zero will warn on all blocking calls.
Change-Id: I0ab4c34aa01670a154d794d9f2694b3235e789db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtWidgets][QLineEdit] The signal textEdited() is now
emitted when the user clicks the clear button created by
setClearButtonEnabled() as well.
Task-number: QTBUG-40287
Change-Id: Iacd303ffd1533f27cfa68a6120cdd370e3d31ddc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>