Sergio Martins
0331f90791
Move title bar logic regarding close button to base class
...
So QtQuick can use it too
2020-11-19 22:09:40 +00:00
Sergio Martins
b19c53d650
qtquick: Implement some title bar helpers for tests
...
Mostly getters that return the title button state
2020-11-19 21:45:29 +00:00
Sergio Martins
3670cf2377
qtquick: Comment the embedded main window test
...
We don't support that yet
2020-11-19 17:49:27 +00:00
Sergio Martins
864670b0a1
qtquick: Fix some cases where floating windows didn't have parent
...
Happened because floatingWindow->parentWidget() was null. On QtWidgets
this works because QWidget::parentWidget() will return the transient parent
without a problem.
2020-11-19 17:47:02 +00:00
Sergio Martins
0cf148b389
tests: Check for the existence of QWindow at exit, not QWidget
...
So we're clean for QtQuick too
2020-11-19 16:34:30 +00:00
Sergio Martins
921d0892a0
qtquick: Fix tst_setVisibleFalseWhenSideBySide
...
Was also broken (but passed) for QtWidgets.
We don't support hidding widgets with setVisible(false).
2020-11-19 11:59:09 +00:00
Sergio Martins
beb2d9e659
qtquick: Add support for non-closable windows
...
fixes tst_preventClose
2020-11-18 18:13:35 +00:00
Sergio Martins
59168da231
qtquick: Fix crash at exit
...
Don't delete our QWindow if the QWindow is currently deleting us
2020-11-18 18:10:32 +00:00
Sergio Martins
3dbf699c49
qtquick: Fix QtQuick parenting
...
Mimic QtWidgets so we have similar behaviour:
- When a MainWindow is deleted, its associated QWindow is deleted
too.
- When a MainWindow is deleted, it deletes any FloatingWindows
which have it as a transient parent
2020-11-18 16:18:42 +00:00
Sergio Martins
baa7561b13
qtquick: Fix tst_addAndReadd
...
Wasn't even correct for QtWidgets and just passing because the
widget wasn't getting dropped QtWidgets, since the indicator was hidden.
For QtQuick the indicator is also hidden but it's accepting it. To fix.
2020-11-18 14:42:34 +00:00
Sergio Martins
ac5f4b871c
qtquick: Fix tst_honourGeometryOfHiddenWindow
...
We want the geometry of the QWindow
2020-11-18 14:30:08 +00:00
Sergio Martins
52bf449366
qtquick: Fixes for focusing
...
Fixes tst_focus too, and maybe a few other tests
2020-11-18 14:01:55 +00:00
Sergio Martins
08a1c4e6df
qtquick: Implement focus policy
...
fixes tst_dockWidgetGetsFocusWhenDocked
2020-11-18 12:35:46 +00:00
Sergio Martins
156dad6e03
qtquick: Fix IndicatorWindow::posForIndicator()
...
Wasn't even implemented. Should make some tests pass.
2020-11-18 12:06:20 +00:00
Sergio Martins
b642d2df2f
qtquick: Fix dropped widget not being the current tab
2020-11-18 11:44:55 +00:00
Sergio Martins
5cedfab82c
Make DropIndicatorOverlay::posForIndicator() pure virtual
2020-11-18 11:44:02 +00:00
Sergio Martins
af9d62a58c
qtquick: Fix FloatingWindows not being destroyed when empty
...
Also fixes tst_createFloatingWindow
2020-11-17 23:15:33 +00:00
Sergio Martins
0758496b0d
Fix QtQuick build without developer mode
2020-11-17 21:15:07 +00:00
Sergio Martins
a452723919
Fix tests running with a nullptr state machine
2020-11-17 21:08:05 +00:00
Sergio Martins
774e66ba6f
Minor: add an assert
...
Provides a nicer backtrace when it happens.
Currently repro on QtQuick only
2020-11-17 21:04:32 +00:00
Sergio Martins
f13de89db5
tests. Fix utils.h draggableFor() for QtQuick
2020-11-17 20:44:04 +00:00
Sergio Martins
1393ae224f
Fix DockWidget::windowActiveAboutToChange() being emitted too much
...
Was being emitted even when it didn't affect our window.
This caused an explosion of signals when we had many dock widgets.
2020-11-17 18:52:54 +00:00
Sergio Martins
d92d7c258c
tests: Remove stray qDebug
2020-11-17 18:15:38 +00:00
Sergio Martins
619ca74051
Use QFAIL instead of qFatal
...
more elegant, and test can continue, so we see the whole result
2020-11-17 18:15:03 +00:00
Sergio Martins
aa39a71ae5
Rename tst_common to tst_docks
...
Now that tst_docks was all ported let's have the old name again.
Also cmake -jN now works, as tst_docks is called by the tests_launcher
while tst_common was not
2020-11-17 15:44:49 +00:00
Sergio Martins
f4e33c1409
tests: Port the remaining tests to QtQuick
...
Tests now build with QtQuick too.
2020-11-17 15:26:14 +00:00
Sergio Martins
ad96336a36
Also init resources if QT_STATIC is defined
...
Should help with WASM, so you don't need to manually call
Q_INIT_RESOURCE
2020-11-17 11:35:37 +00:00
Sergio Martins
50d1e75709
Fully scope the qrc resource files
...
So they don't clash when KDDW is a static library
2020-11-17 11:33:22 +00:00
Sergio Martins
793c4e509b
Fix crash regarding edge case of dragging window to itself
...
If we're not showing a title bar, then the draggable is the tabbar,
not the floating window.
2020-11-16 22:55:45 +00:00
Sergio Martins
e4a33ad8b7
Added README for wasm
...
Fixes issue #100
2020-11-13 18:45:58 +00:00
Sergio Martins
52cf53ce5c
example: init resources if static
...
Fixes title bar not having icons on WASM
For issue #100
2020-11-13 18:33:13 +00:00
Sergio Martins
8791870efb
Blacklist classical indicators on WASM
...
Use segmented indicators.
Wasm doesn't support top-level windows with translucency, which
is required for the classical indicators
For issue #100
2020-11-13 18:18:25 +00:00
Sergio Martins
4f8c47bfa4
Don't require Qt5X11Extras for web assembly
...
For issue #100
2020-11-13 17:43:38 +00:00
Sergio Martins
ad141df6b1
Merge branch '1.1'
2020-11-13 16:00:49 +00:00
Sergio Martins
72605292b7
Don't show dock/undock icon when dockwidget is not dockable
...
Fixes issue #99
2020-11-13 15:51:26 +00:00
Sergio Martins
1443eff1d9
tests: Port some tests to QtQuick
...
15 to go
2020-11-10 18:00:19 +00:00
Sergio Martins
22d5db32ce
FocusScope: Remove focus when nothing is focused
2020-11-09 15:25:32 +00:00
Sergio Martins
e9a321039f
Renamed signal to windowActiveAboutToChange()
...
Added the 'aboutTo', as the event hasn't been caught by the top-level
window yet
2020-11-09 13:46:16 +00:00
Sergio Martins
b93f115b53
Added DockWidget::windowActiveChanged() signal
...
Tracking the top-level window's 'isActiveWindow' property is difficult
since the dock widget's top-level window is changing all the time
when docking and undocking. So added a convenience signal
2020-11-09 13:35:05 +00:00
Sergio Martins
7faaf2cc69
tests: Port more tests to QtQuick
...
18 to go before we start fixing them
2020-11-08 15:18:16 +00:00
Sergio Martins
978f9d3a5e
tests: Port another test to QtQuick
...
29 to go
2020-11-06 23:52:48 +00:00
Sergio Martins
09793b3481
tests: Port more tests to QtQuick
...
31 to go
2020-11-06 23:33:02 +00:00
Sergio Martins
f4d9a96ddb
Added Config::Flag_KeepAboveIfNotUtilityWindow
...
Which sets Qt::WindowStaysOnTopHint for floating windows.
Usually unneeded, as floating windows are Qt::Tool with a transient
parent, but in case you're using Flag_DontUseUtilityFloatingWindows
then you might want (or not) to keep them above.
2020-11-05 12:11:48 +00:00
Sergio Martins
4ac892038f
Fix QtQuick build
2020-11-04 11:34:35 +00:00
Colin Ogilvie
387ba291be
export FocusScope
2020-11-04 11:32:42 +00:00
Sergio Martins
5d3d189774
tests: Port 1 test to QtQuick
2020-11-03 17:22:50 +00:00
Sergio Martins
a6a1047f75
FocusScope: Also honour widgets embedded in the tab bar
...
A widget embedded in a tab bar (like a line edit) lives outside
the DockWidget but inside the Frame. It should still focus the
current dockwidget.
2020-11-03 17:12:21 +00:00
Sergio Martins
3e70b846e8
FocusScope: Modify the member variable before emitting signal
2020-11-03 16:19:47 +00:00
Sergio Martins
0a2aebd78d
FocusScope: Also focus when the user clicks on tab widget background
...
Relevant when you don't have a title bar
2020-11-03 15:29:13 +00:00
Sergio Martins
ddad0feaf3
tests: Additional 5 tests build for QtQuick now
...
37 to go
2020-11-02 20:04:14 +00:00