In our benchmarks this makes removeLast more than twice as fast.
(That is on my core I7 laptop with gcc on linux).
It changes the alloc test to be an assert rather than an if.
Change-Id: Id55195b9b7880e54a89be4dd9d6228d94aff23c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We kept using qInstallMsgHandler in testlib to not break test cases using
it too. However, this breaks tests using qInstallMessageHandler ...
ChangeLog: QTestLib: Test cases have to use qInstallMessageHandler instead
of the (deprecated) qInstallMsgHandler
Task-number: QTBUG-32391
Change-Id: I3bd95d9b0a48749243a5dd3e074df8ebcbc07dce
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This patch fixes the warning uncoverd by the -Xlint:unchecked option
by parametrising the generics with wildcards.
src/org/qtproject/qt5/android/QtActivityDelegate.java:315:
warning: [unchecked] unchecked call to getMethod(String,Class<?>...) as a member of the raw type Class
Method m = initClass.getMethod("setActivity", Activity.class, Object.class);
Change-Id: I665e9dfd6d64c92a491d68c838ad02bde275d604
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Though the worst case memory usage was improved in
b800d8b94a the best case usage changed.
Since best case is the same as worst case in Qt5, we should
use as little as possible, which this patch ensures.
We reduce the memory usage from 3 to 2 ints per section - which is
half of worst case in Qt4. There seems to be no bigger cost in
performance doing that. The recalcSectionStartPos is still very fast.
This patch limits the maximum section size to (2^20) ~ 1.000.000 pixels.
This alleviates
Task-number: QTBUG-32325
Change-Id: I9b7530030a31b4e35cf1ca9e32c6b936f5ea9790
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QFontEngineMulti::stringToCMap() stores the fallback engine index
in a glyph index'es high byte, which means the maximum fallback engine index
it can store is 255, so limit the number of tries we're doing to this value.
Otherwise we could end up with `fontEngineMulti->engine(glyph >> 24) == 0`
after successful stringToCMap() call.
Task-number: QTBUG-30412
Change-Id: I06907a39186fd207f3ce4b732a1a54e615744082
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Windows configure does not have -device-option yet.
A hack for android already generated the
qdevice.pri. But it did this even if no android
was build, so merged the device-option with the
android generation of qdevice.pri. The qdevice.pri
is generated earlier in the configure steps than
before to match the linux configure and allow
to set device options before the config.tests
are run.
Change-Id: I753cf0d5eba1479792a685d6e1f5acb38b970893
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
this adds the possibility to put the actual qt installation outside the
sysroot it is configured for. this makes it possible to install an
x-built qt without "polluting" the sysroot, which makes it possible to
have read-only sysroots, and multiple qt builds for one sysroot.
-prefix is the location within the sysroot as seen by the target itself,
and gets "burned" into QLibraryInfo in QtCore.
-extprefix is the location in the host file system and gets "burned"
into QLibraryInfo in qmake. if it is not specified, it defaults to the
sysrootified prefix, which is the previous behavior.
Task-number: QTBUG-26680
Change-Id: Ia43833c4e27733159afeb8c8b9b2d981378d0cd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
there is no point in scanning any of it.
qdoc already excludes itself (and will hopefully move out of qtbase
soon), so not adding it here.
Change-Id: I84356c0988be386de331bb7879b3ebd2108526a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
under normal circumstances, any errors will be noticed already by the
pkg-config --exists call, which is silent anyway. therefore this doesn't
change anything in normal qmake usage.
however, lupdate's and creator's evaluators skip the --exists calls and
subsequently invoke the normal query, which then prints useless noise to
the terminal.
Task-number: QTBUG-28159
Change-Id: I536412060f3830aafeb0587f855cd6af11227bca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
whatever it was used for is long gone.
Change-Id: Ifab7ae7968b1ab65982b1a6414274b3502bbc3d0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Optimize the parser of the X11 compose tables. Parsing these was
responsible for over 90% of the startup time in Qt 5.1.
Change-Id: Ifddc3f30828791e51a755f92791c26ffe43a9cd3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Windows CE 5 and the depending Windows Mobile
is not supported.
Change-Id: I81b9599f837590a1375b6340e58c47b478c079ba
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Sections may be hidden => QStyleOptionHeader::position must reflect the
state seen on the screen. Otherwise styles will give wrong visual
results.
Task-number: QTBUG-32203
Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
To avoid using modifier keys when releasing a two-finger
mouse wheel flick on a trackpad, we listen to event
phases. But for a normal mouse, a separate phase
NSEventPhaseNone is given. Ensure that we still send
modifier keys when that state is reported.
Task-number: QTBUG-32098
Change-Id: Ib840dd661b7842ae49127e5a8d42e3666ae2da4e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Change QNSView convertFromEvent: toWindowPoint: andScreenPoint:
arguments from QPoint to QPointF.
QWindowSystemInterface event handlers already use QPointF and
QPointF is needed for tablet support
(https://codereview.qt-project.org/#change,62740).
Change-Id: I6e5b2f19777fe24ae34e9e85028772e4be0a94f6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
We just need one digest algorithm, any algorithm, to generate a
somewhat unique identifier. SHA-1 will suffice.
Change-Id: I3cb26bf866d616df3ef32feace10934f19daa1a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
A QWindow should keep its title after removing and restoring the
frame, so set it if we are setting window flags that include a frame.
Task-number: QTBUG-32978
Change-Id: I0fe1b651eac05a210b06ec4f7f6fb78f2536834d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
...and operate directly on a passed array pointers,
without having to copy the input and output data.
Calling QFontEngine:: stringToCMap()/recalcAdvances() with
partially-constructed QGlyphLayout is completely safe
iff `glyphs` and `advances_?` members were initialized.
Also get rid of QGlyphLayoutInstance that was used just in a single place
and never was really needed.
Change-Id: I48fab246fd69fc869f948220a553c3574d93c772
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use QuickCheck data from DerivedNormalizationProps.txt to check
if the input text is already in the desired Normalization Form.
\sa http://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms
Using NF QC makes a significant boost to most operations that rely on
normalized input data, i.e. file path conversions on Mac, where "native"
form is a decomposed Unicode string.
Change-Id: I292a9da479c6beed730528fc7000c45bf1befc34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch fixes the issue when the escape '\' character was
interpreted as a compose value.
On the whole en_US.UTF-8 Compose file it only affects the following
sequences:
<dead_diaeresis> <space> : "\"" quotedbl # REVERSE SOLIDUS
<Multi_key> <slash> <slash> : "\\" backslash # REVERSE SOLIDUS
<Multi_key> <slash> <less> : "\\" backslash # REVERSE SOLIDUS
<Multi_key> <less> <slash> : "\\" backslash # REVERSE SOLIDUS
By coincidence the last 3 sequences were working even before this fix.
Task-number: QTBUG-32972
Change-Id: Ia4fc2156d982cf2918d0d1be6ee07706cfbfd091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Removed the Boxes example from the list as it requires
OpenGL.
Task-number: QTBUG-32953
Change-Id: Ieb186afde0a87b12d7ab48037b31ae5895740d60
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Invoking waitForStarted() on a QProcess before or after an unsuccessful
call to start() (e.g., with an empty command), would execute FD_SET with
an invalid file descriptor and cause the process to abort.
The bug can be reliably reproduced on OSX.
Task-number: QTBUG-32958
Change-Id: Id25b7781168489281645e21571361ca1a71d43e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Set the SONAME to the library name without the major
version number appended, as android does not have the versioned
symlinks.
Change-Id: I41c504869019a393a3f112b2f7fc81c7ad5afa1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
In this patch we introduce tabBarClicked and tabBarDoubleClicked to get
a finer grained information on the user interaction with the tab bar.
Done-with: kevin.ottens@kdab.com
Change-Id: I7be76a556ca09186e98f2e076fe2512d6c5e6773
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The tryShortcutOverride function needs to be called with the
focus object. The same logic is in QGuiApplication::notify.
Applications with QGuiApplication would therefore handle
ShortcutOverride correctly where QApplication would not allow the
override.
ChangeLog: Fixed ShortcutOverrid for QtQuickControls.
Now it is possible to assign a shortcut such as "b" and still type "b" in text inputs.
Task-number: QTBUG-32928
Change-Id: I4f4ab82fd11f45174a4483a01bbbe8143dfe0724
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
On Linux (XCB), resizing a dialog shifts its position. The fix corrigates
the geometry of the dialog to the right values.
Task-number: QTBUG-32473
Change-Id: I6d38539a3ebc3b95eacc7f13a76f83fc9e4d821c
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When implementing a custom subclass of QAbstractItemModel,
if the custom model will use MIME types other than the
default internal MIME type, the mimeTypes() member must be
reimplemented to return the list of allowed MIME types. If
mimeTypes() is reimplemented, mimeData(), canDropMimeData(),
and dropMimeData() must also be reimplemented to use the
allowed MIME types.
Task-number: QTBUG-32362
Change-Id: Iee5cf5d2dbed8a6c1f7ab47a7a4b9b03e80e8e59
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
So that, for example,
qDebug() << QKeySequence(Qt::Key_Cancel).toString();
prints "Cancel" instead of "ᡀ".
Task-number: QTBUG-953
Change-Id: Ib17fc314fd018355e6a1826d26fce85fdcbbe0c8
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>