We were delaying the conversion from Qt to OS X types,
but not the data request to the application.
Introduce "Eager" and "Lazy" pasteboard promises:
Eager promises request the application data immediately
and can continue to use the existing commit-promises-
on-app-exit logic. Eager promises are the default
type and will be used for copy/paste.
Lazy promises delay requesting the data from the application
for as long as possible, specifically until when
promiseKeeper() is called. Lazy promises are used for
drag-and-drop and are not committed on application
exit.
This brings OS X DnD behavior in line with the
Windows behavior.
[ChangeLog][OS X] Drag-and-drop QMimeData requests are
now delayed until drop time.
Task-number: QTBUG-31301
Change-Id: I8ddbba41593251f4c0c49c29492dce990066e20d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Without this patch some keycodes like Ctrl+Shift+= may generate several
similar key sequences like Ctrl++ and + but only more specific keys
should be returned by QXcbKeyboard::possibleKeys.
Task-number: QTBUG-38137
Change-Id: I23f6522eefaa3b83cfa639f76bdc6a19b450c6f9
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
At 4GiB the CI test system still spends a considerable
amount of time testing this. Tune the size down to
16 MiB.
Change-Id: I417aa6829fcc734e5de4d7d34e503190f6b291e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This caused instability in the CI and testing system:
Tests that expected expose and paint events no longer
got them due to window placement/visibility, including:
tst_QGraphicsProxyWidget::paintEvent
tst_QMdiArea::tileSubWindows
tst_QSizeGrip::hideAndShowOnWindowStateChange
This reverts commit f5cf06f4af.
Change-Id: I017fbf24f3ad99cce6602eddafc3a67f8edc494d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Second attempt. MSVCPROJ_TARGET contains the resolved target name,
including version number and target extension.
We're splitting this value into PrimaryOutput and
PrimaryOutputExtension.
PrimaryOutputExtension is only written if it contains a non-default
value.
Task-number: QTBUG-26782
Change-Id: I4b828dc5dd47322f653585aee1a5767f0cf8bd48
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This build will have broken tool button style. I also do not see a reason why
someone would purposefully leave behind people that could otherwise use their applications.
The build with this flag will be completely unsupported as configure states.
Task-number: QTBUG-32551
Change-Id: Ie33269a49ecc10258c9f8611542f7cf99a698bb5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
The methods retreiveVolumeInfo() and retreiveDiskFreeSpace() should be
retrieveVolumeInfo() and retrieveDiskFreeSpace().
Task-number: QTBUG-42068
Change-Id: I86137fbff26c42c8cc8bad366a4733118d6ca292
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QNetworkDiskCache don't handle to set CookieHeader. so All Set-Cookie's value is invalid.
The root of cause is that metaDataChanged() don't work because of no slot for it.
Add the slot for it and renamed to _q_metaDataChanged.
Task-number: QTBUG-41514
Change-Id: I5cec017e59a1de69c6e89c0bc7209a73dcdc11da
Reviewed-by: Jeongmin Kim <jm86.kim@lge.com>
Reviewed-by: Jung Dong-Heon <clamp03@gmail.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
The enum items PM_ScrollView_ScrollBarSpacing, PM_ScrollView_ScrollBarOverlap
and PM_SubMenuOverlap were mistakenly put together with obsolete enum items.
Move them up to fix it.
Change-Id: I90bd3a8ab68c99db27134d976fe69df56c9af2b8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Factor out function to calculate the geometry for the styles >= XP.
Task-number: QTBUG-41944
Task-number: QTBUG-40277
Change-Id: Ifad1519b99fd587158c790dd241cb3e4bac3bfc3
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
MSDN says if the DC was created by calling CreateDC, it must be freed
by DeleteDC not ReleaseDC.
Task-number: QTBUG-41941
Change-Id: I4c60b5d2587f1c4d3332fce74224cbc8b756eb2a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Set the reply state to "finished" also on errors.
Do a proper string compare to correctly translate
the error codes.
Task-number: QTBUG-42023
Change-Id: I222cc06a47b1f9f89095e8f935f316bf94fd0cd6
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Leaving an empty line causes the last sentence go outside the table,
causing a break before the subsequent enum values.
Change-Id: I7477010a259497f8063997d2122a954d1799c1ee
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Without this part of the calendar widget get cut off when put
in a layout and the contentsMargins are non zero.
Task-number: QTBUG-40352
Change-Id: I9ce90476c59c270d92e876a5dc81ea8ce325848c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Since we cannot support heightForWidth constraints on toplevel
windows, it is impossible to solve this perfectly: if the
window is resizable at all, the user will be able to resize it
too small. Our old solution was just to give up and allow
completely free resizing, even down to 0x0. This makes
very little sense. It is clearly better to use the minimum
size that we have already computed, even though it is not
perfect.
This reverts a behavior change introduced in commit
36e9516f85fbb9c9a236f5ca034d5a0126d86c12 (September 9th, 2002)
[ChangeLog][QtWidgets][QLayout] Widgets and dialogs containing
layouts with heightForWidth (such as a label with word wrap)
will no longer get a minimum size of 0x0.
Task-number: QTBUG-37673
Change-Id: If26b7ef9c80edbf9d54c6519b36646df408b7652
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Cocoa sens periodic drag updated events even if there is no
actuall mouse movement (or any other updates).
This breaks animations in different
views/widgets supporting our own auto-scroll (done with timers).
This patch kindly asks Cocoa _not_ to send us these events.
Task-number: QTBUG-32761
Change-Id: I5dad4ceb0a490e2f3cb34a806a5bdb1045b4dac3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Set dynamic property for all platforms and query it
in QWindowsWindow::show_sys().
Task-number: QTBUG-19194
Task-number: QTBUG-34504
Change-Id: I4199a2ed835d3de928405d470a81c54da93cc768
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
QListView::spacing() is the space around the item (layout margin),
so the effective spacing is twice as big.
This differs conceptionally from QTableView, which has a spacing of 1
and a line on top/bottom. Split up QComboBoxPrivateContainer::spacing()
into functions return spacing and top/bottom margins to reflect this.
Task-number: QTBUG-37865
Change-Id: I1ff812e7856e00a53f1119ef3304956cbb7cbfca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Add a QEventLoop::ProcessEventsFlags argument to
flushWindowSystemEvents(). This gives the platform
plugins more control over which events to flush.
Task-number: QTBUG-39842
Change-Id: Id9c01948b22e297b22503d38ec4e726f9f880fd5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jonathan Liu <net147@gmail.com>
The PDF generator was in many cases not correctly
applying miter limits to the generated strokes leading
to drawing artifacts for very sharp edges.
Task-number: QTBUG-37903
Change-Id: Ie93b0f4a56775729105a375ba3bcdb5b58993433
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
If no pen is set on the item, we can completely ignore the
pen for the creation of the items shape. This both speeds
up the creation of the shape and applying it as a clip mask
as well as creating more correct results.
Task-number: QTBUG-32846
Change-Id: I5f6f690256c71309713d8f746e67599af3088dd7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Checkable QToolButton has a special pixmap in the background,
painted with a 'smooth pixmaps' hint. This hint also affects
how an icon on a toolbutton itself is painted later. The difference
can be quite visible on a Retina display, so this patch makes the toolbutton's
image always look the same in checked/unchecked state.
Task-number: QTBUG-35162
Change-Id: I2adc8006371fa10d89d4b77da6b3aa168aa5abc8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
In some cases QToolBar creates a child window (a child borderless NSWindow)
placed on top of the toolbar's main window. As a result it's not possible
to drag this main window using its toolbar - the window "jumps" on the screen.
The reason is quite subtle - QNSView -handleMouseEvent: uses
[NSEvent mouseLocation] and this location is invalid:
- we have an NSWindow (parent)
- we have a child NSWindow ([parent addChildWindow:child ....]
- we handle drag event in a child window
- we move a parent window as a result of drag event
- Cocoa also moves a child window for us
- when handling the next drag event, location [NSEvent mouseLocation]
differs from the real event's location.
Task-number: QTBUG-40106
Change-Id: Ic68cb92ab4233a1e0746b478820c1e33fd37a462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
On OS X it's possible to maximize app's window by clicking on an app's
icon in the Dock.
Another trick is to use cmd-tab to select an app +,
while still holding the 'cmd' key, press the 'option' key -
this should also maximize a window.
None of these works at the moment, and to enable these features app
delegate should return YES from the
-applicationShouldHandleRepopen:hasVisibleWindows:.
method.
Task-number: QTBUG-40084
Change-Id: I33ba9e74d55d41d23deb429612519b746d461d9e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Fix warning:
void QWindow::setTransientParent(QWindow*) ... must be a top level window.
which occurred for example when parenting a QMenu onto a native child
widget.
Task-number: QTBUG-41898
Change-Id: Icc25fb2108bd68b2d9c0e551949b90fc7a82d358
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This reverts f0ee55c00. VERSION actually makes sense on Windows,
because it embeds a VERSIONINFO resource into the DLL that can
be inspected by the user.
Task-number: QTBUG-37961
Change-Id: I6b81b5aa999eba16cb8d9a4d61bd596310af46b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
tryShortcutOverride on OSX gets called via
QWindowSystemInterface::tryHandleShortcutEvent. This change
fixes that to use the QWindow's focus object.
Task-number: QTBUG-32928
Change-Id: I51beb774e1fb91e0d8e2c12d087176d917357311
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Change-Id: I823566ba72668c611d225aa92c4d09a53cabe8fc
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Added some commas.
Task-number: QTBUG-41928
Change-Id: I52ad75f895f41b109f0496863930ffaa1650447c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
The focusObject() of a QWidgetWindow is based on the focusWidget() of the
top level widget of the window, which is resolved through the focus_child
chain of the widget. This is not the same thing as the focusWidget of the
application. The hasFocus() function of a QWidget queries the latter, so
we can't put the focusObjectChanged signal inside hasFocus() when we
unconditionally clear the focus_child chain (and hence the focusObject)
earlier in the function.
Change-Id: Iae39da5d6031d22b21e9dc9f18e5fe6e6fd11a5c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
The focusObject of a QWidgetWindow is the focusWidget() of the top level
widget, so when clearing the focus object of the window we should clear
focus of the same focusWidget, not the application-wide focus widget,
which may live in another window.
Change-Id: Ib9162418865c225e23aac7987e119b3b651983eb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
We try to emulate a traditional window manager by activating windows
on touch press (before delivering the event), and on showing/hiding
windows, but this logic should not apply to popup windows (including
tooltips and tool windows), as they are in most cases already active
through their parent or transient parent, and should not steal keyboard
focus and bring the virtual keyboard down.
Change-Id: If10082bd48cdf1a9e1c41d8809066e86dafd7ffc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Change-Id: I29a2345bddc9ec9577bdc398e4df9914406e5367
QIOSWindow::windowType() is the same as window()->type()
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This makes it even more unlikely that anybody uses them.
Change-Id: I6b3a3902687a7fcde2d771617837f738001eeb0a
Task-number: QTBUG-25023
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>