That code allows for not having an activity on Android.
In my case I've made some java code to handle an Android service.
The code is mainly about not dereferencing null pointers.
Change-Id: Ia7fda03cbbc55e6afeacd928445a4b72b51c679e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This fixes the following case:
<blockquote>
<span />Foobar
</blockquote>
Qt would see the end of <span>, and consider the current block
tag as closed, thus resetting the block format, thus losing the
margin set for the current block (due to blockquote).
If you do
<blockquote>
<span>Foo</span>Foobar
</blockquote>
instead, then the same would not happen, since hasBlock is set
to false when we append text to the current inline node.
[ChangeLog][QTextDocument] Add support for empty inline elements
in block tags.
Task-number: QTBUG-33336
Change-Id: Ic566edfec96cb8d44d1c02932bb195bc921d1580
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
In change cb8445f032, I tried to
remove all the historical +1s when calculating the font height
from the ascent and descent, but I missed a couple. These are
used when drawing the background for the text, the height of which
would no longer match the height returned from QFontMetrics.
[ChangeLog][Text] Fixed off-by-one in the height of text background.
Task-number: QTBUG-36444
Change-Id: If6d87f903e246f9faed2298bb1693b2556906eed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This attribute is not guaranteed to fully work with QPA.
Task-number: QTBUG-36489
Change-Id: I638a8e00851288012be553b5316aa6088dd67cff
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2d05d3bd28 was not correct.
On OS X, when user uses CJK input method, only types single punctuation,
it was converted to CJK ones, and not showed in composing text.
Task-number: QTBUG-35700
Change-Id: I2d1063d2f837d075929dc5ebb5722fdefc6ee0f6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Use a static QCocoaIntegration pointer instead of
QGuiApplication. This removes the need to call out
of the platform plugin as well as the casting from
"platform" to "cocoa" types.
Change-Id: If432b3567811223b73a67548e475e07d63635b73
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Enable non power of two texture support for non compatible NPOT GPU.
If the context does not handle NPOTTexture feature, the image to bind is scaled to POT size. It works with OpenGL ES and Desktop version.
It is actually almost the same code as the one in QGLContextPrivate::bindTexture.
Change-Id: I6f0f511165c9e171a14f4ba6ba0b7a902e590cf6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This fixes a serious regression from
7d72516b52.
[ChangeLog] QFileSelector: the identifier for OS X has been changed back
to 'osx' from 'mac', and 'mac' and 'darwin' have now been added as
selectors for Darwin OS (which is the base of both OS X and iOS).
Task-number: QTBUG-35073
Change-Id: I83183e34c5a697338cc1ddcac33a41bd379ded12
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
This bug causes that Cascades QML application cannot open more than
system ulimit defined number of different asset:///*.qml files.
The realFile is ordinary closed in the ~QNetworkReplyFileImpl(),
the QDeclarativeTypeLoader::::networkReplyFinished() calls
reply->deleteLater(). There are tricky situations when event-loop is
not entered and too many read already files are waiting for close.
This patch close() file when all the data is read. It can be done
this way since the QNetworkReplyFileImplnetworkreply is a sequential
device.
For more info, please, read comments on QTBUG-36032
Task-number: QTBUG-36032
Change-Id: I4002f21b4b0c7350af48b0dc6530d9606fd2794b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
KDE calculated colors weren't set correctly rendering all calculated colors
"Light", "Midlight", "Mid" and "Dark" as black.
Issues fixed:
* QFrame with frameStyle Box|Raised didn't look raised but
instead just black border.
* QMdiArea had black background
* QToolBox separators were just black
Change-Id: I5e06bafe280f73af12f23960ae68a8b35e8549ac
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@digia.com>
HarfBuzz-NG does character mirroring where appropriate.
A simple solution is to unset RightToLeft shaper flag when
text gets shaped with HB-NG. Instead, move the mirroring code
right to HB-old proxy function and decrease code duplication.
Change-Id: Icdcd50b73b3e6a43da4b85addc7d8f51edf86512
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The local 'enabled' variable might cause dubious MSVC warnings
if a local variable name 'enabled' exists.
Just replace the whole loop with the if (...); else idiom, as Thiago
once suggested on the mailing list.
Task-number: QTBUG-36605
Change-Id: I0b8959a29d4432296961493fe2b7827c5b860d00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When changing a filter so that a previously empty proxy model becomes
populated sorting was not applied correctly.
This was caused by using mapToSource for getting source_sort_column
from proxy_sort_column. For an empty proxy model this won't work because
no valid proxy index can be created in this case.
We now directly use the root index column mapping instead by doing
essentially the same as QSortFilterProxyModelPrivate::proxy_to_source
but without the sanity checks needed for external use.
The sorting feature of QSortFilterProxyModel has always assumed that
the number of columns is specified by columnCount(QModelIndex()) so
the behavior doesn't change.
[ChangeLog][QtCore][QSortFilterProxyModel] Fixed sorting when a
previously empty proxy model becomes populated because of a change in
the filter.
Task-number: QTBUG-30662
Change-Id: I21322122e127889dfadc02f838f0119ed322dcab
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Remove virtual from appCommitData and appSaveData and make them public
Change-Id: Ifd605742c6552b7a407de9bf482f8f0f0aa125ca
Reviewed-by: David Faure <david.faure@kdab.com>
Removed QMoveEvent generating code from QWidgetPrivate::setGeometry_sys
for widgets with native window handles. A move event is already
generated for them by QGuiApplicationPrivate::processGeometryChangeEvent.
Task-number: QTBUG-32590
Change-Id: I73313a012851516047ac017f1e15a21774d8ffe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The DSA emulator functions query which texture is currently bound
to a given target, then bind the new one, perform an operation,
and bind the old one back.
The problem is that in order to query what's currently bound to the
GL_TEXTURE_<X> target one needs to call glGetIntegerv passing
GL_BINDING_TEXTURE_<X>. Since both GL_TEXTURE_X and GL_BINDING_TEXTURE_X
values are completely arbitrary (not contiguous nor related in any way)
we need to pass *both* them to the functions.
The right GL_BINDING_TEXTURE_X was getting already chosen (and stored)
at texture creation time by QOpenGLTexture, so it's just a matter
of passing it around.
For the "real" DSA functions, the binding target is ignored.
Change-Id: Ida823abbfb142d4a22bf9f9a762b160b7e281c6d
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Remove reference to released font-engine so we don't risk returning it
later.
Change-Id: I741a741567a079818c7f414ac1f9c0b5a9677322
Task-number: QTBUG-36522
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
If the user code installs a message handler that uses
any API that prints logs (handled by qt_message_print)
then this will lead to an infinite loop.
This patch adds a thread local storage to check
if the message handler is done before the thread
is calling it again.
Note: This check is performed only if the compiler
supports thread_local (__declspec(thread) for MSVC).
Change-Id: I43b0460b8f39b26a18de48a5652a5e55f0b336f8
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
If an egl surface can not be created (e.g. when out of memory) the
application should not crash. In this case we will not be able to make
the egl surface current and have to return false in the makeCurrent call
in QQnxGlContext.
Change-Id: If9b5a82a0f64dc0a42bee687d351bea43fb05d51
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
setGeometry will adjust the buffer for an egl window when a egl surface is created.
Adjusting the buffer somewhere else can be potentially harmful. Another reason is that
every egl window has a buffer on its own (unlike raster windows) so we do not have to
check if we have to create a buffer after reparanting.
Change-Id: I01406867a0dab598dac7d86e1f1e28ca9736a299
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
The overload used an evil hack to work around a flaw in the QSslCipher
API rather than fixing the API. The hack was broken by the addition of
support for newer versions of TLS. This change solves the issue properly
by fixing the QSslCipher API then using the fixed version.
Task-Number: QTBUG-34688
Change-Id: Ibf677c374f837f705395741e730d40d8f912d7c6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
There's no loss of data when converting a Unicode string to UTF-8,
so don't state that in the docs.
Change-Id: If26914ec674a994d9c59136448e8e4292d0412e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QGraphicsSceneIndexIntersector was used as a kind of polymorpic predicate in
items_helper(). But it had only one function and the instances of it, which
were kept around in QGraphicsSceneIndexPrivate, were re-initialised on every
call to items_helper(), which means that one can just as well pass that
miniscule amount of data to the function itself.
Replaced the polymorphism with a function pointer and the comparison state
(which is conceptually const if it wasn't for the requirement to assign
to it all the time) with a const void * argument.
Effects on Linux AMD64 GCC 4.9-trunk release stripped:
text: -1584B
data: -376B
relocs: -26
I've wrapped the functions in a namespace. The only reason for this is
to keep the functions, previously defined in class bodies, at the same
indentation level so as not to destroy the git-blame history for them.
Change-Id: I8e1f48030047a3c54e881de7c77a3325b3e1f509
Reviewed-by: Alexis Menard <alexis@webkit.org>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
It was impossible to hide/show the close button after a QMdiSubWindow
was created.
Task-number: QTBUG-9933
Task-number: QTBUG-27274
[ChangeLog][QtWidgets][QMdiSubWindow] Fixed setWindowFlags() for QMdiSubWindow.
Change-Id: I7db9a1bef5ba8a8ace729acb85682c8b3de9c33c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This avoids "change of sign" warnings as found by ICC when the high
bit is set. This often happens when you do
X & ~Y
as ~Y probably has bit 31 on. If the enum is unsigned, then there's a sign conversion.
Change-Id: Ia5f221d928ac0155f4504a70c4046e60c25fbf3b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When MSVC supports ref-qualified members, we need to ensure that
qstring_compat.cpp can see the non-qualified definitions in qstring.h,
which means no precompiled header.
Alternatively, for a bootstrapped build we could not compile
qstring_compat.cpp or #ifndef the functions.
Change-Id: I8ece34503060f0b4b0f8f2df2fb9b0fb1311e269
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.120).aspx says:
__AVX__ Defined when /arch:AVX is specified.
Now we know what flag it is, we don't need to use our _M_AVX flag
anymore. We're also now assuming that Microsoft will follow the same
pattern for AVX2 (i.e., __AVX2__), so this commit also removes the
check for _M_AVX2.
The other defines that were defined alongside AVX2 are removed because
they have no use currently in Qt.
Change-Id: I64a026b2206dbd0d2dffa7c803bee969c9b94a94
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This way, the same codebase works for x86, x86-64 LP64 and x86-64 ILP32
(a.k.a. x32).
Task-number: QTBUG-35463
Change-Id: Iffcecc6a4c03267fb64e287c2d6226d078d7d115
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add overloads to the find() methods in QPlainTextEdit and QTextEdit
that find the next occurrence matching the passed regular expression.
These are convenience methods that eliminate the need to use the
document() method and the need to handle the QTextCursor return value.
[ChangeLog][QtWidgets][QPlainTextEdit] Added find method overload using QRegExp
[ChangeLog][QtWidgets][QTextEdit] Added find method overload using QRegExp
Change-Id: Ia6139b771e3ae4ca02e4b8ea7fde19e5dc71b9d8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Just so it's closer to the code that does the inverse.
Change-Id: Iecaab20adad2cb7f4a55818c687aecc76f0523e7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Amazing how many places had the conversion duplicated. When compiling
with GCC under -O3 (which enables -ftree-vectorize), GCC would use SIMD
by using the PMOVZXBW instruction, but only if the -msse4.1 was passed
(or equivalent -march= switch), which almost no one did.
Also, the two lastIndexOf and the qt_find_latin1_string updates are also
fixing bugs because the old code forgot to cast the input to uchar
first. That meant the compiler was generating sign-extension from 8 to
16 bits, as opposed to zero-extension.
Change-Id: I4e2430a51dfc337994834524d3540382157509ef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>