Mac supports Collate Copies using native api, so add support. Note
this is mostly only useful for setting the print dialog default, as
Mac supports server-side multiple copies so the app will never need to
collate the copies itself.
Change PDF and Windows to default to collate true to match Mac as this
is the behavior users expect.
Task-number: QTBUG-27724
Task-number: QTBUG-35251
Task-number: QTBUG-22144
Change-Id: Ia43dbc260b3a71aa5b267cca54c168ffbea794fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add support to the Mac print engine for set/get the Document Name using
the Job Name setting. Our documentation states this is one use that the
document name will be put to so is appropriate to be used.
Change the Windows print engine to default to a blank Docuemnt Name
consistent with the other print engines. If still blank when printing
then use a default value.
Task-number: QTBUG-27724
Task-number: QTBUG-22144
Change-Id: If590811b5720e6f759eabc290b578b94e221f9f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The PrintEngine keys are not consistently treated across the platforms
and are not properly tested. Start the process of making the print
engines behave consistently by documenting and testing the current
behavior. Ensure all unsupported features return a consistent
default value.
The auto test for valuePreservation() has been flaky depending on the
platform and installed printers so remove it and replace it with more
complete testing. If no native printers available then don't test
the native engines.
Fixes for the individual inconsistent keys will follow.
Task-number: QTBUG-26430
Change-Id: Iab914d7e0a5ae4a2cdc24c8645751f0910cf440c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
It's not "preliminary" anymore, and it doesn't return a QPlatformWindow,
but a QWindow.
Change-Id: Iaa1938728e689d97011dce8cf0d88ff8cb4a83b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
[ChangeLog][QtGui] Accessibility on Linux reported all objects as being
editable instead of just editable text items.
Change-Id: I8bca2799a2e5b175b3ca515fee5dd02eae23829e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Adding device mask verification for static device discovery.
DRM devices are no longer scanned if mask is set to input devices only
Change-Id: Ibd2e77280c2d93c707ba7bdb84c4ae3cb0932178
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Querying GL_MAX_SAMPLES is not supported in GLES2.
Avoiding the call also makes us play nice with Mesa in debug
mode since it gets rid of the warnings about the failing
glGetIntegerv call.
Change-Id: I05e501cc11af41a54fefc34ab919c5191e4f3f0a
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
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>