- no longer needed after test that used it was removed
Change-Id: I63fc8a9db07f9250507becb9bf6c2aefe0fdc254
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The architecture is detected at compile time based on the predefined
macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf
files. The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present
in the current copy of src/3rdparty/libpng, so no change in
functionality is expected.
The conditional for the SUPPORT_JIT define in pcre.pri is moved to
src/3rdparty/pcre/config.h, again so that we can use the compiler's
predefined macros to detect the architecture at compile time.
Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their
Q_PROCESSOR_* equivalents.
Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with
their Q_OS_* equivalents.
Note that this commit also effectively disables the SPARC atomic
implementation. An inline implementation for SPARC needs to be added,
or we remove the current code and instead rely on the GCC intrinsic or
C++11 std::atomic support on SPARC.
Note also that this commit does not remove QT_ARCH from configure or
qconfig.h. This will continue to be set until all Qt 5 projects can be
moved away from using QT_ARCH.
Change-Id: I5de747cc4436d21941329974cff3016970f497b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The QTextStream paragraph that is removed referred to something that is
incorrect. This was confirmed for Windows, Linux and Mac.
Change-Id: Ibac8f82482f2060308b5b8485d6da228bdf52fe6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
(cherry picked from commit 80cebfde10cf34dcc0777c24f1b3ff37cad20181)
Neither rendering with outline nor fetchMetricsOnly requires the
rendering from FreeType so we don't need to render them or cache
it. It should speed up recalcAdvances() quite a lot.
Change-Id: I0f623cb4f79da2edf6e9c9634a2f22fb0c66823c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
QSqlDatabase::database() is documented to be thread-safe and when the
driver is queried for the numericalPrecisionPolicy set then it can
comprimise the thread-safety.
Since the driver itself (if one is set) will be queried for the
numericalPrecisionPolicy when numericalPrecisionPolicy() is called on
the QSqlDatabase then we can have it fallback to the default instead
rather than taking the driver's own setting.
Task-number: QTBUG-13423
(cherry picked from commit e7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2)
Change-Id: Ie7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
When the filedialog was reshown the context menu for the header was not
in sync with the sections that were actually visible. This ensures that
it is in sync after the state of the header is restored.
Task-number: QTBUG-23271
Change-Id: Ia1546bf300d43a5822482f63de99eb52b674bf52
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
(cherry picked from commit 2e220e4603d6a0c21efee3a884be76e9f2d7ebb7)
Change-Id: Ib5a8513cc2d08adce49602b2590059b918b1ffda
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Fixes non-namespaced builds.
Change-Id: Ie743fc57e7f208fdd50c61b08dc8a4b150de3930
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
C++11 supports user-defined string literals, which makes
the C++98-accepted literal string concatenation sequence
"foo"MACRO
illegal under C++11.
The solution is to add whitespace between the string
literal and the macro. For symmetry, this patch adds it
on both sides.
Change-Id: Ie0c698f610986c4d1b12dc2083489043b696936d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change the use of QList<QPair<>> to a simple C array of xcb_keycode_t*s.
This is possible since the number of elements in the container is
statically known.
I have not measured speedup; this is just preventing premature pessimisation.
Change-Id: I8855fc8a4e7ee840d8b7497ec4166074da7d8ea8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Change-Id: If2471bea27f095352ae8c28604e104b896fd97c7
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The helper process 'app' wasn't built in release configuration.
Also improved finding the helper executable to utilize
QFINDTESTDATA and print out a proper errors if it could not be
found or started.
Note that adding ".exe" to process name in Windows is unnecessary
as QProcess already does that for you, so removed the ifdeffing.
Task-number: QTBUG-24330
Change-Id: Ibe75e0ecd24181ab623d0a60f17ecaf92052b0dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This allows to drop or paste them into lineedits and text widgets
(including such widgets in non-Qt applications)
Implementation note: this is done on-demand rather than in setUrls
so that it's still possible to setText explicitely; the new code
is only a fallback for when no text/plain data is available.
Change-Id: Ie90c43a30bfa64a6047b627e7351d20bf5ec8e03
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Historically, we've calculated font height as ascent+descent+1.
In Qt 4, a patch was added to work around this by subtracting
1 from the descent of the font engines. We now remove the +1 and
the work arounds.
Change-Id: I7e25d49b97ac892015d3328f32d70eb9a7c2d88f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
When we request glyphs from fallback fonts, we would potentially
load all fonts on the system into memory. This is especially true
for glyphs that are not supported by any font (or by the last in
the list) in any "Common" script (which e.g. includes CJK).
This would make any application which tried to display unsupported
glyphs use huge amounts of memory for keeping unused fonts cached,
only limited by the number of fonts on the system.
The patch contains two solutions: First, before loading the font,
the multi font engine will be asked whether it needs to be tried
for the given character. By default, this will always be true, so
all fonts will be tried, but with the new font config multi engine
in the platform plugin, it will ask FontConfig whether the font
contains a glyph for the character.
Should the font be loaded and still fail to resolve the character
(which could be the case for other platforms), we will simply
delete it again immediately instead keeping it cached.
Change-Id: I92dfb39289a359f49caa02c2caf8baf66098fb59
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Make it work for child windows, fixing the isActive()
test of QWindow.
Task-number: QTBUG-24185
Change-Id: I75597c2d322969f7e109d76e30b9b1f4b66c6e1e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
When setting NULL mimeData in QWindowsClipboard::setMimeData, and the
OleSetClipboard call failed, the warning print crashed because it
tried to access mimeData.
Task-number: QTBUG-24327
Change-Id: I1f56fd28c9191a330e14a93b4b11ac9c89db6985
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The watchFileAndItsDirectory() test would fail due to atime updates for
the first watched file coming up to 2 seconds after the file was closed.
Observation shows that the atime has a 2 second resolution on Mac OS X
using HFS+, so add an appropriate delay to make sure that the atime
update from the kqueue based file system watcher can dispatch all
updates.
Task-number: QTBUG-22744
Change-Id: Ie79af20d6b4c154021307c8a8f6d336369720337
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Prior to this commit, the following statement in the qtestlib
documentation was untrue: "If init() fails, the following testfunction
will not be executed, the test will proceed to the next testfunction."
If init() called QSKIP, the test function would be skipped, but if
init() reported a failure, the test function would still be executed
(even though doing so could be unsafe).
This commit makes testlib skip a test function if init() reports a
failure and enhances the selftests to cover skips and fails in both
init() and cleanup().
Task-number: QTBUG-20371
Change-Id: Id1cc8464ae0b8c257ae1b74dbe9189a501f5366b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR
Change-Id: I30bf175c2c9044e1f8556260a032467ca0dfc09f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR
Change-Id: I1957ef287ba2f337b5e0b2c6245d872eacb6316f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Changed qcryptographichash to use TESTDATA and QFINDTESTDATA
Change-Id: Ic3a1bdccc9f81605c648dab2a642421d17f7fe80
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
- Changed json unittest to use TESTDATA and QFINDTESTDATA
Change-Id: Id29f8257565f409fa184ba465f25bc8454e2b7fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The QML Text element attempts to layout text first without eliding and
only builds an elided string for the last visible line. This allows
it to re-use the already generated layout information to build the
elided string rather than doing a second layout of the relevant text.
Change-Id: Ieee45902d0c129853abe822c465eece4d634a028
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
In windows platform, simplified chinese envrionment, the default font
family name is "SimSun" which is not in the font list generated by
EnumFontFamiliesEx(), this will cause chinese font can't be displayed.
This patch will generate font's english name during font enumeration in
windows platform, and take font's english name into consideration in font
matching. The english name generation code is taken from Qt4.8
Change-Id: Ie939ec0c8c08c628a835c7a53fb22d0545626d9c
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
A variadic version of the QSKIP macro has been left in qtestlib for
a transitional period to give upstream projects time to catch up with
the removal of the function from the API. This transitional period is
now finished.
Task-number: QTBUG-21652
Change-Id: Ib1a9158c2efbae05ffd0e69e72879f6387d4b2e8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Testlib no longer does anything with the test location, and neither do
any of Qt's tests, so the code is no longer needed.
Change-Id: I1a464116179f3e26efadad6901f00f3c33e0ce84
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This patch improves performance when constructing a custom type in
a QVariant by ~ 7-20% (instructions count) depending on the type size
and metatype attributes.
Change-Id: Ic2707ff5abd689b66e23c1794f111504bf9b3b01
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Currently QMetaType API contains almost only static methods. This works
nice until someone needs more information or needs to do more operations
on a type. In this case every function call has to do type dispatch.
This API allows to avoid redundant type dispatching, by caching a
type information in a QMetaType instance. It gives significant
performance boost especially for custom types (up to 9x).
Change-Id: I223d066268402e072e41ca1d0a3e7bc160655d7f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This allows us to catch spurious libjpeg warnings via the installation of a
message handler
Change-Id: I82f3257118b5fbdf66550be80e72f75e9a24d3c1
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-Some of the public classes were missing the \inmodule command.
-Fixed a sentence.
Change-Id: I88ebe12680c744e32253dc01c5ddb4292267caf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The function was already marked as internal.
By moving access to the underlying file engine to private API this
supports the effort to completely drop file engines from public API. In
the future, the goal is to completely drop the file-engine abstraction
as it exists today.
Change-Id: I332fa56e70c87e83c1e08bb9f75e04df7c93fec7
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Anselmo L. S. Melo <anselmo.melo@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
openStandardStreamsBufferedStreams would fail if standard streams were
redirected to a file (e.g. ./tst_qfile > testlog.txt).
openStandardStreamsFileDescriptors already has a workaround, so apply it
here too.
Change-Id: Iffe9d7864909e489e77c1114e80c4e3bc70a8722
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Do like moc: If the string has already been entered into the table,
just return its position, don't make a new copy. This can save
space, for example, if there are several properties of the same type;
the typename only occurs once in the string table but will be
referenced by several property descriptors.
Change-Id: Ic0087697716cab1c6449ea51c0c758a6fd1a1c82
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
14 is the number of fields (ints) in the QMetaObjectPrivate struct
as of revision 6.
Use the calculated number of fields instead, so that the code will
still be correct when more fields are added in future revisions.
Change-Id: I4f2c2bfc125f3fabc8e8caedf5c6ba6c17a34d06
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
buildMetaObject() can operate in two "modes", based on whether a
buffer to write the meta-object into is passed or not. Add asserts
to make sure that the intermediate meta-data indexes are correct
in both "modes", and that the final size in "write mode" matches
the size that was computed in the preceding non-writing pass.
The asserts make it easier to catch obvious problems when changing
buildMetaObject() to generate a new meta-object revision.
Change-Id: Ief7c74e6f6fca836587e831b06072d6aa98c7193
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Instead of refcounting QWindow visibility, we ask the Application
subclass whether quitting is appropriate.
Task-Id: QTBUG-24120
Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
it is *ugly* to have the binary in the repository.
this adds a few seconds to the windows build, as the configure needs to
be rebuilt, obviously. that's almost negligible.
Change-Id: I40ffde23b3c3af2b6bab3e78cd0a9f433214b563
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
We should not assume that the first type id is 0.
Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
- Pass it from QWindowSystemInterface via QWindow to the widgets.
- Add handler code from 4.8 / qapplication_win.cpp to qwidget.cpp.
Change-Id: Ic759563aa00cb93fe014c1bf41020446c1927dec
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>