Make it inline; add fast checks for typical spaces;
add fallback function that uses the fastcall calling
convention.
On ia32, this change makes isSpace ~340x faster for
ascii spaces, ~170x faster for non-space ascii
characters, and ~1.3x faster for non-ascii characters.
Note that this change is NOT binary compatible.
Also add an autotest with expected results from
before the optimization, to ensure that the behavior
is the same.
Change-Id: I9438d0ad3c9ba2e80560c4bee7eed05115265798
Reviewed-on: http://codereview.qt-project.org/4905
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Make it inline; add fast checks for ascii letters
and digits; add fallback function that uses the
fastcall calling convention.
On ia32, this change makes isLetterOrNumber ~120x
faster for ascii letters and digits, ~150x faster
for non-letter/digit ascii characters, and ~1.3x
faster for non-ascii characters.
Note that this change is NOT binary compatible.
Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.
Change-Id: Ia4e13692f4dd79f6aa0b96da29449e0487971b0e
Reviewed-on: http://codereview.qt-project.org/4904
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Make it inline; add fast checks for ascii letters;
add fallback function that uses the fastcall calling
convention.
On ia32, this change makes isLetter ~370x faster for
ascii letters, ~250x faster for non-letter ascii
characters, and ~1.5x faster for non-ascii characters.
Note that this change is NOT binary compatible.
Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.
Change-Id: I06f8d3d43114537cee5567e670898cef6494c20a
Reviewed-on: http://codereview.qt-project.org/4903
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Make it inline; add fast checks for ascii digits;
add fallback function that uses the fastcall calling
convention.
On ia32, this change makes isDigit ~370x faster for
ascii digit characters, ~250x faster for non-digit
ascii characters, and ~1.5x faster for non-ascii
characters.
Note that this change is NOT binary compatible.
Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.
Change-Id: I718fadecda3f591d6f4c22374d8e476f4724fd83
Reviewed-on: http://codereview.qt-project.org/4902
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Calling QChar::category() is slow; do some fast checks to
detect ascii characters before falling back to the generic
handling.
On ia32, this change makes isUpper ~260x faster for uppercase
ascii characters, and ~180x faster for non-uppercase ascii
characters. Similar numbers for isLower.
Even with the additional checks, these versions are slightly
faster than before for non-ascii characters as well, since
we now call the static fastcall category(ushort) function,
which is faster than the category() member function (which
uses the stack to pass the unicode value).
Change-Id: I6ae0df466bb4835ca0d5319fd6018862c849313b
Reviewed-on: http://codereview.qt-project.org/4901
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The benchmark isn't exhaustive, but tests the functions
that are heavily used by QtDeclarative.
For performance reasons, QtDeclarative has its own
implementation of various QChar functions (in
qdeclarativeutils_p.h). But we want to make the actual
QChar functions as fast, so that QtDeclarative can also
use them.
Change-Id: Ic25f30651224c39f2824380d679b8500739f38c3
Reviewed-on: http://codereview.qt-project.org/4900
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gabi
Change-Id: I99b08f8b41f483c92ae175630b812e4b299069b6
Reviewed-on: http://codereview.qt-project.org/4916
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Do not trigger a self-assign warning when running into code containing
a Q_OBJECT macro. Currently this happens a lot e.g. when using clang
to build code using Qt.
Change-Id: I68995624b18406f337318599e463f36f87486e66
Reviewed-on: http://codereview.qt-project.org/4960
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
There's no QImage::Format_A8 format. This is a term used in the
corresponding QFontEngineGlyphCache enum.
Reviewed-by: Jiang Jiang
(cherry picked from commit e453fce2731069dce993a94b0c2291307cc7806c)
Change-Id: I68a190abdf4446d05231af89ac861380ac79b188
Reviewed-on: http://codereview.qt-project.org/4773
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Removes the QT_NO_IM macro which was a temporary measure during
refactoring work. This macro disabled the setPreeditArea() call
and caused only the formats of the preedit text to be registered,
not the actual string.
Task-number: QTBUG-21261
Change-Id: I76cdf116043520fa2185ddcd34739da031c0fcdc
Reviewed-on: http://codereview.qt-project.org/4958
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Not sure why this was not the case all along, but on my MSVC2008
installation the include must be prefixed by the 'GL' directory.
Change-Id: Icb29b072446bab386b5c62ab0df453ded41b8ede
Reviewed-on: http://codereview.qt-project.org/4914
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
There is no longer a focusObject setter/getter in the input context.
Instead the object can be gotten from the new input panel API. Instead
of reimplementing setFocusObject(), implementations should now connect
to the inputItemChanged() signal of QInputPanel.
Change-Id: I6c674424da5a0c8c3995e5f5acd191ef91ba8a00
Reviewed-on: http://codereview.qt-project.org/4913
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QIcon has not been moved to QtGui after all, re-introduce
QtWidgets-dependent code path.
Task-number: QTBUG-21402
Change-Id: I61c37babaeceadf7d53c10736bcc847758adaf1b
Reviewed-on: http://codereview.qt-project.org/4775
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
prepareToRender() might call adjustSize() resulting in the widget's size
changing, so we should make sure to call adjustSize() _before_ we decide
on the required pixmap dimensions.
Task-number: QTBUG-21402
Change-Id: Ie72b46bc8e8e22f848769f78187f47ae9f4e37d3
Reviewed-on: http://codereview.qt-project.org/4772
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This was a binary compatibility hack to extend the accessibility
framework towards IAccessible2. Start fixing it properly.
Change-Id: I82bb0daa6469930c5bf6e440c919159603d56a83
Reviewed-on: http://codereview.qt-project.org/4750
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
It seems as the refactor merge replaced the v8 submodule
SHA1 by an older version. This commit reinstates Aaron's
version from commit b57c3cc40f
Change-Id: Ie172e935561e2f6510dd81c035b17816d8da9e4b
Reviewed-on: http://codereview.qt-project.org/4899
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
This test attempts to enforce various conventions onto Qt's autotests.
Many of the things enforced by this test became obsolete from Qt4 ->
Qt5 (because Qt5 CI is much less "magic" than Qt4 CI).
The merge of `refactor' branch obsoletes even more.
The remaining valuable part of this test should be moved into the `qtqa'
module as a shared test, because it applies to all modules, not just
qtbase.
Change-Id: I2402bca32e43c597f14b8ff6ca729563ff8efbfe
Reviewed-on: http://codereview.qt-project.org/4926
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Add a default implementation for RelationTo.
Usually this should be empty and it is pointless to return
the parent-child releations in this function.
Instead we will have proper parent-child functions and also
remove this functionallity from navigate.
Having default implementations for these removes the
necessity to reimplement them to return Unrelated in
many places.
Change-Id: I13b7ad3256533681e5a0548ae15da98ca0d16b94
Reviewed-on: http://codereview.qt-project.org/4785
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
If qtbase was configured to build both debug and release versions of
libraries, it makes sense for any modules we are building to do the
same by default.
Change-Id: Idb5f78a7414b6ed2bacf295ad01f259fca435410
Reviewed-on: http://codereview.qt-project.org/4702
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
When cursor position or editor text changes many input method query attributes like
cursor rectangle, cursor position, surrounding text, current selection and anchor
position change as well. Checking in text control and editor classes what of those
related attributes have exactly changed before calling the update increases code
complexity unnecessarily for a little benefit. Qt::InputMethodQueries flag can still
be used to optimize more independent cases when attributes change individually, which is
more common for input methods hints, fonts, platform data, maximum length or enabled
attributes.
Change-Id: Ic9eee5f1edb6d33ef6c01d2c9c8ad582100c0150
Reviewed-on: http://codereview.qt-project.org/4739
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Warnings like
QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool)
QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool)
QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool)
QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool)
Ibus is not always available and QPlatformInputContextFactory is allowed to load different input methods.
Change-Id: Id498a5e024e6646e73ed4db2efe5b007e6601698
Reviewed-on: http://codereview.qt-project.org/4738
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The test got moved one level down in the directory tree,
but tries to find the top level directory. Fix paths
to make it work again.
Change-Id: I7b80a1c6891e7f1aa013a89203f651aa3ea932e8
It is incorrect to use QT_GUI_EXPORT to export symbols from any library
other than libQtGui. When used outside of libQtGui, QT_GUI_EXPORT
attempts to _import_ symbols rather than _export_ them.
Change-Id: I7489067f479edd3acd9bf08bcaa24ee4dea4c3cc
Reviewed-on: http://codereview.qt-project.org/4838
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
This plugin currently refers to some API which does not exist
(focusObject). It has no chance to compile for anyone. Disable it
until fixed.
Change-Id: I3b74b61bf5f73ba06ff73375b233a4e4ca6c1678
Reviewed-on: http://codereview.qt-project.org/4843
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
This QEXPECT_FAIL is obsoleted by Commit 2cca7e0884
Change-Id: I97bf9d8f0db50435b785bb1d2e1d60369d67aad2
Reviewed-on: http://codereview.qt-project.org/4764
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Necessary to avoid CI blocking.
The tests should be enabled again as soon as possible.
Task-number: QTBUG-21424
Change-Id: Ib25da5b9a1fdb23e00a5c503db90d306deb90f06
Reviewed-on: http://codereview.qt-project.org/4768
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Necessary to avoid CI blocking.
The tests should be enabled again as soon as possible.
Task-number: QTBUG-21424
Change-Id: Ibc54723855579095be0dea3bd3e071dd22a1fccf
Reviewed-on: http://codereview.qt-project.org/4825
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
This change disables failing tests to increase the
likelihood that 'make check' terminates with a zero
exit status. This is done to prevent the CI system
from blocking further commits once qtbase#refactor
is merged into qtbase#master.
Failing tests are marked as insignificant (by putting
'CONFIG += insignificant_test' in the .pro file).
Note: This is a temporary measure that needs to be cleaned up
once the refactor->master integration is complete.
Ideally all disabled tests need to be enabled and passing.
All changes will be marked by the string QTBUG-21402 in a comment
for easy location.
Task-number: QTBUG-21402
Change-Id: Ic4400671671f6d9b75b106a6aa4755b20e74378d
Reviewed-on: http://codereview.qt-project.org/4678
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>