Now menu items and key shortcuts for Cut, Copy, Paste and Select All
work in the standard ways in dialogs such as the file dialog, provided
that the corresponding QActions have been created and added to the menu.
This depends on new roles to identify each menu item which is so
broadly applicable that it should work even when a native widget has
focus; but the role will be auto-detected, just as we were already
doing for application menu items such as Quit, About and Preferences.
When the QFileDialog is opened, it will call
redirectKnownMenuItemsToFirstResponder() which will make only those
"special" menu items have the standard actions and nil targets. When
the dialog is dismissed, those NSMenuItems must be reverted by calling
resetKnownMenuItemsToQt(), because to invoke a QAction, the NSMenuItem's
action should be itemFired and the target should be the
QCocoaMenuDelegate.
Task-number: QTBUG-17291
Change-Id: I501375ca6fa13fac75d4b4fdcede993ec2329cc7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Add all the available QPrinter options to the QPrintDialog manual test
to allow for testing presets.
Change-Id: Ia6394094fc9920da0d6c645793d51650404899d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Convert the manual print dialogs test to use a ui file as subsequent
changes will add a lot more widgets.
Change-Id: I06ac54b67532f0eea1e91a2d9aca4f587d2fa332
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Add a new QPA class to abstract Print Devices. Each platform instance
will encapsulate all required details about a print device instead of
the code being distributed throughout the print engine and print
plugin.
Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
At least if the platform plugin's QPlatformOpenGLContext implementation
supports it.
This completes the QOpenGLFunction changes necessary for dynamic loading
of the OpenGL implementation. Everything else is up to the platform plugin.
Change-Id: I710e6fbee3005360ecf02bc6ef976e1beb513819
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Currently the only supported SPDY version is 3.0.
The feature needs to be enabled explicitly via
QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used
can be determined via QNetworkRequest::SpdyWasUsedAttribute from a
QNetworkReply once it has been started (i.e. after the encrypted()
signal has been received). Whether SPDY can be used will be
determined during the SSL handshake through the TLS NPN extension
(see separate commit).
The following things from SPDY have not been enabled currently:
* server push is not implemented, it has never been seen in the wild;
in that case we just reject a stream pushed by the server, which is
legit.
* settings are not persisted across SPDY sessions. In practice this
means that the server sends a small message upon session start
telling us e.g. the number of concurrent connections.
* SSL client certificates are not supported.
Task-number: QTBUG-18714
[ChangeLog][QtNetwork] Added support for the SPDY protocol (version
3.0).
Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d
Reviewed-by: Richard J. Moore <rich@kde.org>
This fixes the issue that the blitter required sometimes the
texture wrapping to be repeat
Change-Id: I86150d008422facf9040873b0983b0e44be9ad24
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The Origin for Target rect was deemed a confusing concept. The current
implementation would translate the target rect to the coordinate system
specified. However, the order and "direction" of the vertices would
always be the same. So drawing a texture in for one target rect defined in
one coordinate system would paint the texture the same way as it would
when a texture was drawn for a target rect drawn in the "opposite"
coordinate system. The point with this was that if you wanted to "flip"
the texture you would specify that with the source coordinate system.
However, this approach breaks on different levels, such as QRect has functions
which expects a top left coordinate system (ie. top() and bottom()).
In the end Qt uses a top left coordinate system, hence QWindow specifies
a top left coordinate system, and hence the api becomes easier if it is
not possible to define the coordinate system of the target viewport.
Change-Id: I7dd59b3718380876e87a4bff88381d7a1c7d58c1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Integrate with QOpenGLTextureBlitter, QOpenGLWidget and friends.
Change-Id: Ic2867b713a21a3d2820d546174fc9164b3dd220c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Enable child widgets (without a native window) that render to an FBO
and are composed with the raster backingstore by the platform plugin.
A preliminary version of QOpenGLWidget is included as private API.
Change-Id: I8f984a4d7db285069ce3d6564707942c823d890d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Useful for bug reports and test logs.
[ChangeLog][QtCore] QLibraryInfo provides information on how
Qt was built.
Change-Id: I867197fd7d2e10bcdf01a8eb47c9c1e03647e2c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... which is needed to negotiate the SPDY protocol.
[ChangeLog][QtNetwork][QSslConfiguration] Added support for the Next
Protocol Negotiation (NPN) TLS extension.
Task-number: QTBUG-33208
Change-Id: I3c945f9b7e2d2ffb0814bfdd3e87de1dae6c20ef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
private api, but useful for 2d gui code that suddenly finds itself
needing to get a set of textures onto some fbo
I didn't want to include ARB_copy_image since it looks like its from
texture/renderbuffer -> texture/renderbuffer while this class implies
texture -> write fbo. We could wrap ARB_copy_image in QOpenGLTexture or
some other class or we can add it later.
I have not added any QOpenGLTexture functions since this class opperates
on the GLuint identifier. We can add overloads later.
Change-Id: I3e565b33466c1c183a249a33c3e82c6786debd55
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.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>
... to have a real world test case for uploading via SSL,
QHttpMultiPart (+ resetting) etc.
Change-Id: I004dd6f2507776b2fb8ebe1f02625b40abff6261
Reviewed-by: Richard J. Moore <rich@kde.org>
the diff -w for this commit is empty.
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Press and hold is an interaction available on many platforms,
particularly when touch is involved. In Qt Quick this is exposed to the
user via MouseArea::onPressAndHold. This value should not be hard-coded,
but rather use a platform-specified default. This commit adds the
low-level hooks necessary for that to happen.
Task-number: QTBUG-24793
Change-Id: I621a8ac9de66b881e34336228056bffbb6306a70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
It is probably better not to have a default boolean in
QHeaderView::setResizeContentsPrecision
Task-number: QTBUG-34665
Change-Id: I0bb2c35abc1d5713bb3ee65df3af86c04f175a38
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Allowing for creating a printer in various modes
and toying with the paper settings.
Task-number: QTBUG-34276
Change-Id: Ieb35dc55c509f84d7d81817c7903e02a41ba8b44
Reviewed-by: John Layt <jlayt@kde.org>
Sometimes it is nice to be able to replace a widget in a layout.
Change-Id: I23a6a65e417e94d53bc48639503db1a142bc3f10
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Before we went through non hidden indexes, but we never considered
the visual order. This patch fixes that issue.
Though it was wrong before, it probably never was a big problem
since it was unlikely that the tree (on logical index 0) was
swapped or hidden, but
658e42e77a
makes it more likely that problems with wrong focus could occur.
Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Currently just a convenience method for setNameFilters(), it uses
QMimeType to create a name filter from the glob patterns and
description defined in each MIME type.
In the longer term, this API could be used to do proper mimetype-based
filtering using QMimeDatabase::mimeTypeForFile() in the builtin
QFileDialog (aka "not native"), instead of only looking at globs via the
name filters.
Change-Id: I0edccf5f30c514481b47cd100d743d1ed7a24024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
In delegates we get into trouble with calling showPopup in
setEditorData (edit by double click) - and that is not reasonable.
The user has requested edit - and therefore it is natural to save
a click for the user and show the popup at once.
However that fails since we have the mouse down and as soon as we
release the mouse we will call hidePopup.
This patch ensures that the mouseReleaseEvent, that caused the
problem is only considered if we have had a mousePressEvent.
Change-Id: Ibe031fcb9ad2158f6969e41127bbb5f651b9cae6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Even though detailed text does not work that well, it should still
be in the manual test.
Change-Id: I051f9f0592ad9206dc42f0e9929c1be32baec832
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This patch allows to set which logical index the tree is in.
Before the tree always displayed data from the logical index 0,
but it is actually more likely that the user wants to have data
from visual index 0 (which can be done by special value -1).
There is nothing special about logical index 0, and not being
able to change the tree-data is just annoying.
Change-Id: Ib070ce93343a0d2fbac3ad5a42cb4359401ac87c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
For some time, we've assumed that the URL specification had a mistake in
that it didn't allow the "#" character to appear decoded in the
fragment. We've gotten away with it so far.
However, turns out that the CoreFoundation NSURL class doesn't like it.
So we have to be stricter.
[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no
longer decodes %23 found in the fragment to "#" in the output of
toString(QUrl::FullyEncoded) or toEncoded()
Task-number: QTBUG-31945
Change-Id: If5e0fb37bae84710986c9ca89bd69ec98437cd63
Reviewed-by: David Faure (KDE) <faure@kde.org>
This add checks on iterators on insert and erase.
Change-Id: I41d96e038d74668cc1df10b6d42cde4b82f8a696
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>