Sergio Martins
2aefa9efa0
qtquick: Fix windows being resized bellow their min size
2022-06-10 18:59:53 +01:00
Sergio Martins
5791198c51
qtquick: Fix some benign sizing warnings
...
During resize QtQuick will trigger lots of calls to setSize()
since it updates the width and the height separately.
Run our sanity checks only after with width and height are done
being updated, and not twice
2022-06-10 15:33:16 +01:00
Sergio Martins
a94daba3fc
Bound the suggested floating window geometry
...
Because why not, seems correct. No bug would happen with QtWidgets
since QtWidgets respect the min sizes of their children, but for
QtQuick it's more flaky as there's no intrinsic mechanism for
min sizes, so give it some help
2022-06-10 14:16:57 +01:00
Sergio Martins
8e85e46ee9
tests: Make the view min size be the same as it was in 1.x
2022-06-08 19:02:01 +01:00
Sergio Martins
118fe3d32e
qtquick: Fix guest view not getting parented when getting added
...
To be improved on milestone 3
2022-06-08 12:22:57 +01:00
Sergio Martins
fb31f893ae
Remove unneeded QJsonDocument include
2022-06-08 00:59:16 +01:00
Sergio Martins
d275226df9
qtquick: Fix Stack creating two TabBar's
...
It's created by the controller, we shouldn't create another one
in the view
2022-06-08 00:32:14 +01:00
Sergio Martins
a5279b5efd
qtquick: Minor refactoring, add TabBar_qtquick::qmlTabs()
2022-06-08 00:00:41 +01:00
Sergio Martins
81007f629f
qtquick: Fix flaky handling of tabs
...
The flickable of TabBar from QtQuickControls has a bogus contentX
when removing and readding tabs. Instead implement tabAt() via
iteration and checking which tab contains the point
2022-06-07 23:34:54 +01:00
Sergio Martins
060fe44e71
Remove some unneeded QApplication includes
2022-06-07 17:14:05 +01:00
Sergio Martins
3c13f51017
tests: Also resize the view, not only the window when creating main window
...
Both are needed. This is how it worked in v1
2022-06-07 00:24:38 +01:00
Sergio Martins
ad9cdad927
qtquick: Don't do geometry changes at destruction
...
It's unneeded and makes tests fail. Setting visibility would trigger
a bunch of code that we don't want at destruction time
2022-06-06 23:53:22 +01:00
Sergio Martins
31992dcb83
tests: Fix tst_honourGeometryOfHiddenWindow on XCB
...
The suggested height should be smaller than the floating window
min-size.
2022-06-06 23:35:31 +01:00
Sergio Martins
a5ecfbdd91
tests: Fix createMainWindow having different behavior between frontends
2022-06-06 23:03:53 +01:00
Sergio Martins
0929fb1c75
qtquick: Fix showing qtquick window not setting the root item visible
2022-06-06 15:43:53 +01:00
Sergio Martins
4515c85f91
Don't call "Frame::isMDI" when layout is being destroyed
...
Just emit the signal always, QtQuick will reread the property.
It's better than doing a complex solution
2022-06-06 15:30:34 +01:00
Sergio Martins
230f562cb4
qtquick: Fix floating window being deleted at construction
...
When the window is hidden we destroy it, but not while it's
still being constructed.
2022-06-06 14:58:09 +01:00
Sergio Martins
3758dc7dda
Fix weird logic in FloatingWindow::isBeingDeleted()
2022-06-06 14:48:58 +01:00
Sergio Martins
464624f2a5
qtquick: Don't dereference FloatingWindow while it's being destructed
...
Caught by UBSAN
2022-06-06 13:53:31 +01:00
Sergio Martins
0be61b0a1b
qtquick: Don't delete dock widgets in frame view dtor
...
views shouldn't delete controllers
2022-06-06 13:44:53 +01:00
Sergio Martins
5faf36700b
Use qGuiApp instead of qApp
...
As QtQuick applications might not have QApplication.
2022-06-06 13:24:38 +01:00
Sergio Martins
995df8e3e8
qtquick: Remove qFatal in TabBar_qtquick::tabsAreMovable
...
It wasn't implemented in v 1.x either.
2022-06-06 11:29:14 +01:00
Sergio Martins
14189dc601
Make LayoutSaver deserializeWindowGeometry deal in Window instead of View
2022-06-06 11:23:07 +01:00
Sergio Martins
9c881ec53e
Normalize how we set top level window geometry
...
Prefer Window API, since for QtQuick the root view isn't so tighly
coupled with the QWindow as in QWidgets world. Hide the difference in
Window_qtwidgets.cpp, which now prefers the QWidget API whenever possible,
as that's better tested than using QWindow direclty.
2022-06-06 11:17:42 +01:00
Sergio Martins
581451c342
Remove old ViewWrapper::asDropArea()
...
It's unneeded, and it wasn't implemented for QtQuick
2022-06-06 10:28:44 +01:00
Sergio Martins
eb198736b8
qtquick: Fixed drag indicators not working on main window
...
ViewWrapper::asDropArea() was dummy. Will remove it.
2022-06-06 10:23:48 +01:00
Sergio Martins
e8f390f2ad
tests|qtquick: Don't create lots of spurious QQuickView
...
Most of the times we just want to create a dock widget which
will be parented immediately, we don't need the window.
2022-06-06 10:13:19 +01:00
Sergio Martins
2beb4982b0
qtquick: Make Window_qtquick::rootView() behave like in v 1.x
...
The MainWindow might not be the QQuickView's root item, but
version 1.x would still return that. So preserve that, since it's
what tests expect.
We can improve after having tests passing.
2022-06-06 09:42:06 +01:00
Sergio Martins
46159d88bd
Add Window::containsView()
2022-06-06 09:25:45 +01:00
Sergio Martins
fbff1ed4a7
qtquick: Fix min size being violated in FloatingWindow ctor
...
Only set the suggested geometry after we added the frame.
This is the behaviour in 1.x too.
2022-06-06 09:24:38 +01:00
Sergio Martins
6bd87113b4
Simplify some code, add a View::transientWindow() shortcut
2022-06-05 14:19:08 +01:00
Sergio Martins
7e3a82ed3e
qtquick: Fix setting of transient parent window
...
We need to go through Window, not through View.
This even makes things cleaner, as parentView() shouldn't go across
window boundaries. That's the case for QtWidgets but it's not consistent
with QtQuick. Our View abstraction has saner rules
2022-06-05 14:12:22 +01:00
Sergio Martins
f9efe2755e
Fix LayoutSaver not restoring geometry correctly
...
"normalGeometry" was repeated twice due to typo
2022-06-05 13:31:08 +01:00
Sergio Martins
a88beb7574
qtquick: Implement missing methods for classic indicators
2022-06-05 12:53:22 +01:00
Sergio Martins
792aaf76da
Normalize handling of close event for Frame and FloatingWindow too
...
Fixes windows not closing correctly for QtQuick
2022-06-05 12:47:53 +01:00
Sergio Martins
f11a6a6a8c
Honour View::closeRequested signal
...
This noramalizes how both qtwidgets and qtquick were handling it.
Fixes tests related to close events in qtquick
2022-06-05 03:23:19 +01:00
Sergio Martins
6d926ee6e4
qtquick: Remove two more unneeded signals
2022-06-05 02:39:52 +01:00
Sergio Martins
666d4be478
qtquick: Fix wrong signal being emitted
...
It's the controller signal that is connected
2022-06-05 02:30:45 +01:00
Sergio Martins
ce88a00b4b
tests: Don't enable these qtquick tests yet
...
Was commited by mistake
2022-06-05 01:14:32 +01:00
Sergio Martins
075a9d30f0
qtquick: Make Layout::floatingWindow()
...
The layout might be parented to other intermediate stuff.
2022-06-05 01:12:18 +01:00
Sergio Martins
ec4e22b5ae
qtquick: Move the ClassicIndicator Q_PROPERTIES to the view
...
as that's what will be exposed to QtQuick
2022-06-05 00:54:30 +01:00
Sergio Martins
56ca80e8fc
qtquick: Fix crash when dereferencing incomplete stack controler
...
The stack controller CTOR was still in the stack (pun intended), then
dereferenced by tabbar. Instead, call Stack_qtquick::init() to intitialize
the the TabBar. At this point the Stack controller is already usable.
2022-06-04 21:30:43 +01:00
Sergio Martins
ec144472ce
Remove unneeded QWidget reference
2022-06-04 21:23:49 +01:00
Sergio Martins
991ced33f6
Rename createTabWidget() to createStack()
...
as done with the other classes already
2022-06-04 21:21:22 +01:00
Sergio Martins
78357b53a4
move some todos to milestone 3
2022-06-04 20:55:42 +01:00
Sergio Martins
16529c6704
qtquick: Port code that emitted frameGeometryChanged()
...
It's a public signal used by client code
2022-06-04 20:52:49 +01:00
Sergio Martins
1ead71442f
qtquick: Remove old rubber band code, this has been ported already
2022-06-04 20:41:57 +01:00
Sergio Martins
a3f2e8ec9a
qtquick: Rename tabBarObj to tabBarViewObj
...
Makes it clear it's a view
2022-06-04 20:39:41 +01:00
Sergio Martins
a2b5f40ed1
qtquick: Implement Stack_qtquick::tabBarObj()
2022-06-04 20:38:40 +01:00
Sergio Martins
d63a9db5a2
Port wayland commented out code
2022-06-04 20:30:20 +01:00