We do not currently emit screenchanged events when a window is moved
to another screen on X11.
This patch emits the event when a window no longer intersects with
its current screen, and switches to the first intersecting screen.
Change-Id: Ie40d6eb67b85bd961eeb348bc43e4f308ee22dba
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
The enum value is unused, a QTextTableFormat is actually documented
to have a FormatType of FrameFormat, and isTableFormat() etc. do
the right thing.
Task-number: QTBUG-35114
Change-Id: I2f3305630b92f117c1f89b85460457265e5af126
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
It's possible to use the cursorRect API in the cases
where QCocoaWindow has a NSWindow. This is true for
all top-level QCococaWindows today.
Task-number: QTBUG-35659
Change-Id: Iefb2c1c022448e19a9c005a808e0c81abe9281ea
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
qkmsscreen.h:114:18: error: private field 'm_refreshTime' is not used
Change-Id: Id9c802c5c3ae2ffdf61238f083bfe875e7b613a8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
There's no advantage at keeping them inline because we never call them
directly: we take pointers to them. This can actually cause
multiple copies of the function to be emitted, then the linker may or
may not decide to discard N-1 copies. Just avoid this route
and deinline them.
Change-Id: I5adc704b50ec7f26498846fcbb86cb5b5d016b4b
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Showing, moving and resizing
Contrarily to what an NSWindow does to its NSViews, child NSWindows need
to be explicitly shown and hidden, and clipped if the parent NSWindow
changes geometry. Also, hiding an NSWindow will not hide its child
windows. This needed to be managed manually, adding 2 additional states
to QCocoaWindow to reflect whether a child window has been clipped out by
any ancestor geometry change, or hidden by any ancestor being hid. Also,
ordering out an NSWindow will remove it fromm its parent's child windows
array, making necessary to maintain a parallel list of child windows in
QCocoaWindow.
Stack order
Although child NSWindows can be ordered relatively to each other, they
need to be added again to be moved lower in the window stack. This also
means the windows above it need to be added on top.
Key (focus) status
One of the remaining issues, is to make sure the top level window keeps
the "key status" while still forwarding key events to the child window.
Keeping same event propagation
This use case is best illustrated with undocking QDockWidgets (if these
are child NSWindows). The main issue is to make sure the QDockArea will
get the mouse events right after undocking a dock widget. We used a similar
workaround as the "key status" problem, and manually forward the mouse
events to the dock area's QWindow.
Manual test, by Morten Johan Sørvig, included.
Task-number: QTBUG-33082
Task-number: QTBUG-22815
Change-Id: I50e34936fb82bff013e99f4bcb3bd0db0704c6ae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Unlike the newer QOpenGLFramebufferObject, QGLFramebufferObject still
contains some unfortunate tests for !IsRenderBuffer when creating
renderbuffers. Removing these tests avoids asserting in debug builds
on drivers that are not conformant to the GL spec in this respect.
This means that the qgl autotest is now passing on such drivers too.
The tests do not make much sense in the first place since Qt is not
a conformance test suite.
Change-Id: I21d6272cd5cef9dd71eab57e46771d3ce7dacbfb
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Since OSX 10.4 it has been possible to change the page orientation
during a print job.
Task-number: QTBUG-27630
Change-Id: Ic3c69e83afebbb9267ef6f435f968aeef2b72963
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
An earlier commit add new PaperSources for First and Last, but after
looking at wingdi.h it turns out these are just the first and last
DMBIN values, and Upper is equal to OnlyOne. Remove First and Last, but
keep the Upper and CustomSource for use later by PPD based printer
systems.
Change-Id: I298472a1f54efcc584e73dec944b96fc91426c1b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make the printer selection option api public on Windows to be
consistent with Mac, and with the print program api which is already
public.
Change-Id: I3da9684288348eaa43276ca8534a1d5809f7027b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add support to the Mac and Windows print engines to preserve the
creator name when switching between native and pdf format.
Change-Id: Ie036af3140f24d8e34aa886f091384f93aa0157b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
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>