Sergio Martins
d50d5606e4
DebugView: Don't show our own window in the viewer
2019-07-25 17:03:13 +01:00
Sergio Martins
55544356c2
DebugWindow: Remove annoying modal dialogs
2019-07-25 16:27:57 +01:00
Sergio Martins
539f227bb1
Set the SeparatorWidget geometry before showing it
...
Otherwise it can go out of sync
2019-07-25 16:06:28 +01:00
Sergio Martins
84cd38b2e2
checkSanity: only check anchor geometry in case it's not following
2019-07-25 15:57:55 +01:00
Sergio Martins
aa073198e0
checkSanity: Check anchor geometries too
2019-07-25 15:56:06 +01:00
Sergio Martins
30983f6c07
debug++
2019-07-25 15:44:25 +01:00
Sergio Martins
c40c33d225
debug++
2019-07-25 15:36:30 +01:00
Sergio Martins
15fbd40bd1
DebugWindow: add checkSanity() and dumpDebug() options
2019-07-25 15:27:55 +01:00
Sergio Martins
133c323535
DebugWindow: Add a widget picker
...
Allows to select with mouse a widget, and it prints a qDebug
2019-07-25 15:15:32 +01:00
Sergio Martins
a6b33f106e
Really fix the spurious mouse press with MFC
...
Test the high-order short instead of the entire thing.
the low-order is still set for some reason, docs says it means "toggle"
like in caps-lock toggle. Which doesn't make any sense for mouse.
Anyway, just test the high-order as the docs say.
2019-07-25 14:56:24 +01:00
Sergio Martins
c645b8d9fa
Fix test that was failing on XCB and Windows but not on offscreen
...
Not sure why it didn't fail
2019-07-25 14:41:54 +01:00
Sergio Martins
7db4114703
Set s_restoringInProgress to the overloading taking a byte array too
2019-07-25 11:56:41 +01:00
Sergio Martins
53b0dd95d6
restore: Try to detect invalid streams
2019-07-25 11:56:41 +01:00
Sergio Martins
a31da9229c
Add a decent min size for widgets, 80x90 now
2019-07-25 11:13:00 +01:00
Sergio Martins
399a5d3c9a
restore: Also restore the geometry while we're at it
...
Not very important, as the Frame also has the geometry, but let's keep
things as they were
2019-07-25 10:15:11 +01:00
Sergio Martins
5befd7a3d5
restore: Also restore the ITem's min-size
2019-07-25 10:02:14 +01:00
Sergio Martins
d283af243b
restore: Clear helper properties
2019-07-25 09:36:33 +01:00
Sergio Martins
a5ee3cec27
Before closing really close all the dock widgets
...
The user app was able to ignore the QCloseEvent and the widget
wouldn't close, which would then mean it was deleted by it's parent
Frame during restore
2019-07-24 23:10:55 +01:00
Sergio Martins
c9b596238c
Add a failing test
2019-07-24 22:41:51 +01:00
Sergio Martins
a08f05607d
DebugDialog: Fix off-by-one
2019-07-24 22:22:27 +01:00
Sergio Martins
f62b8f85f8
DebugWindow: Add button for save restore
2019-07-24 21:53:17 +01:00
Sergio Martins
f204667676
DebugWindow: Fix typo in message box
2019-07-24 21:39:16 +01:00
Sergio Martins
d060c3970d
DebugWindow: Added a "Toggle float"
...
So we can hide/unhide dock widgets
2019-07-24 20:23:36 +01:00
Sergio Martins
2d2ac7ca06
Don't return false if there's nothing to restore
2019-07-24 18:38:50 +01:00
Sergio Martins
8a6297c5a5
Fix non-developer build
2019-07-24 18:23:16 +01:00
Sergio Martins
dc7d5a925c
tests++
2019-07-24 17:39:55 +01:00
Sergio Martins
fd795d9925
Only restore placeholders after the items are created
2019-07-24 17:30:03 +01:00
Sergio Martins
e18baa13d1
Add a Item ctor just for the case it's a placeholder
...
For use when we're restoring a layout
2019-07-24 17:20:30 +01:00
Sergio Martins
8f92e6490b
Add some convenience methods
2019-07-24 17:19:52 +01:00
Sergio Martins
77c48aa154
Also register frames, needed for restore
2019-07-24 12:42:13 +01:00
Sergio Martins
a40adbe0b8
Also restore the placeholder items
2019-07-24 11:54:32 +01:00
Sergio Martins
d66a14ee18
Register layouts
2019-07-24 11:52:49 +01:00
Sergio Martins
e5e590e498
Fix non-developer build
2019-07-24 10:29:50 +01:00
Sergio Martins
962b6d6779
Actually remove the qRegisterMetaType, Q_DECLARE_METATYPE is enough
...
The bug was fixed by using the fully qualified name in Q_PROPERTY
2019-07-24 09:52:05 +01:00
Sergio Martins
1788e6199b
Register ItemList in Anchor ctor and use fully qualified name
...
works now on gammaray
2019-07-24 09:49:46 +01:00
Sergio Martins
edd0443055
Fix Anchor::m_initialized not being true after a restore
...
Was causing Anchor::updateItemSizes() to be skipped
2019-07-23 22:55:18 +01:00
Sergio Martins
602f15df90
Register ItemList, trying to get it to appear on gammaray
2019-07-23 22:46:42 +01:00
Sergio Martins
3bab6cad59
In checkSanity(), check the anchors before the items
...
Since anchors are easier to debug it's better to see those warnings
first
2019-07-23 22:19:26 +01:00
Sergio Martins
976a846f14
Emit widgetCountChanged only at the end when restoring
...
Otherwise it triggers code that shouldn't run while restore
is in progress
2019-07-23 22:18:45 +01:00
Sergio Martins
2ab56f47f0
Don't crash in AnchorGroup::debug() as anchors can be nullptr
...
Anchors shouldn't be null, but this debug() is called when weird
things happen so we can debug them, so dont crash
2019-07-23 21:30:40 +01:00
Sergio Martins
c5842eb34d
Dont' reparent FloatingWindow when restoring it
...
Instead pass the correct parent from the beginning.
Otherwise causes a bug in X11 where the FloatingWindow would
disappear sometimes, even if isVisible() and geometry were correct.
The test doesn't really catch it, as the properties are correct,
but visually it can be seen. Commiting the test anyway.
2019-07-23 18:46:09 +01:00
Sergio Martins
edf1d74044
Reenable tst_restoreCrash, it passes
2019-07-23 18:04:56 +01:00
Sergio Martins
7c4a7caa40
Fix restored Frame not calling updateTitleBarVisibility()
...
It's called when parent changes. We could just call it after restoring
but I rather have the paths normalized, so now it uses the same path
when restoring as when adding
2019-07-23 17:42:46 +01:00
Sergio Martins
10c2b0fa77
Reenable layout storing
2019-07-23 17:08:54 +01:00
Sergio Martins
0243dd4ed4
Add a more complex test
2019-07-23 16:59:36 +01:00
Sergio Martins
f585f06422
Restore geometry of closed dock widgets too
2019-07-23 15:08:14 +01:00
Sergio Martins
6e550c05c5
When restoring FloatingWindow set the correct window flags
...
It wasn't being created as a window
2019-07-23 13:52:52 +01:00
Sergio Martins
0c0c3975a3
Silence debug
2019-07-23 13:45:00 +01:00
Sergio Martins
a9a9e3b828
Be sure to have the static anchors set before calling addItems_internal()
2019-07-23 13:33:59 +01:00
Sergio Martins
a251e827ce
Restore geometry first
...
So we don't get resize events doing extra work after
2019-07-23 13:31:43 +01:00