Commit Graph

944 Commits

Author SHA1 Message Date
Sergio Martins
dd7b0b27d1 Don't move the static separators when restoring a placeholder
Fixes fuzzer testcase 6.json
2019-10-15 19:15:11 +01:00
Sergio Martins
855e9ab884 Minor rename 2019-10-15 18:20:02 +01:00
Sergio Martins
f44d63f4c3 DebugDialog: Add button to updateAnchorFollowing() 2019-10-15 18:17:22 +01:00
Sergio Martins
8fec6a871e fuzzer: minor simplification for 6.json 2019-10-15 17:13:34 +01:00
Sergio Martins
982e9828e8 fuzzer: regeneratete 6.json, fixes comments 2019-10-15 17:05:41 +01:00
Sergio Martins
68dba4c993 fuzzer: Add failing test-case
Another "Constraints not honoured"
2019-10-15 17:04:28 +01:00
Sergio Martins
af796f6e69 fuzzer: Only print tasks we're running 2019-10-15 16:40:38 +01:00
Sergio Martins
d0c7c9eb99 Fix Item and Frame geometry getting out of sync 2019-10-15 16:37:08 +01:00
Sergio Martins
7a6d2a1f6d Fix cases where ensureAnchorsBounded() wasn't called
It wasn't called because the min size decreased, so setSize()
was a no-op, so ensureAnchorsBounded() was skipped.

But the internal widgets constraints can change, so still call ensureAnchorsBounded().
2019-10-15 14:52:48 +01:00
Sergio Martins
c8d436d752 fuzzer: trim 4.json further
this is the minimal to reproduce now.
2019-10-15 13:04:23 +01:00
Sergio Martins
5bed380e21 fuzzer: trim testcase 4.json 2019-10-15 12:59:33 +01:00
Sergio Martins
92bbe4d4f7 Remove a dock widget from the layout before adding as tab
So the layout can grow first and not complain there's not enough
space.

Fixes fuzzer test-case 3.json.
The warning was: "Constraints not honoured" in Item::onLayoutRequest()
2019-10-15 12:51:49 +01:00
Sergio Martins
fe4627280e fuzzer: Trim 3.json 2019-10-15 12:07:44 +01:00
Sergio Martins
60de4fd6a0 fuzzer: Generate the descriptions before running the operations
Because we want to print the state before running stuff, not how
the dockwidgets end up
2019-10-15 11:59:30 +01:00
Sergio Martins
6dad6a6cb0 fuzzer: Add failing tests 2019-10-15 11:51:07 +01:00
Sergio Martins
50f6ac62fa Fix off-by-one when adjusting the separator's end
It was intersecting with the Item by 1 pixel.

This fixes fuzzer test 1.json.

The warning would look like:
MultiSplitterLayout::checkSanity: Widget <item> with rect <rect> intersects anchor <anchor>
2019-10-15 11:16:07 +01:00
Sergio Martins
69d61198a2 debug++ 2019-10-15 10:10:47 +01:00
Sergio Martins
5633d09ced Fix Items not having an object name
Now debugging is easier
2019-10-15 10:10:20 +01:00
Sergio Martins
5da338c185 fuzzer: Run MultisplitterLayout::checkSanity() after each operation 2019-10-14 23:22:45 +01:00
Sergio Martins
f287258a5a fuzzer: Remove the pause action
It's annoying as the generator inserts it, and it's only indented
for debug. Instead of an action add a field for the json.
2019-10-14 23:18:13 +01:00
Sergio Martins
3901119989 fuzzer: Simplify test by making dock4 visible 2019-10-14 22:48:56 +01:00
Sergio Martins
ad4c77e15a fuzzer: Add -f option to force dumping json
When loading from json we don't dump. But it's useful to regenerate
the old json in case the format was upadted with more fields.
2019-10-14 22:46:12 +01:00
Sergio Martins
50b8c91014 fuzzer: Print description when running operations
Even easier than reading json
2019-10-14 22:18:17 +01:00
Sergio Martins
d4306b458e fuzzer: Add a comment field to the json
So it's easier to read the json
2019-10-14 22:09:15 +01:00
Sergio Martins
9000e90124 fuzzer: Simplify 1.json even more
Removed unneeded DockWidgets
2019-10-14 21:57:28 +01:00
Sergio Martins
c63e4a3d38 fuzzer: Also write the MainWindow name to json
Same reason as previous commit
2019-10-14 21:55:08 +01:00
Sergio Martins
9738fbddc6 fuzzer: Write the DockWidgets name to the json too
This way it's easier to read the json and remove unneeded dock widgets
while trimming the test-case
2019-10-14 21:49:36 +01:00
Sergio Martins
6957f40cdf fuzzer: trim 1.json to the minimum to reproduce 2019-10-14 21:22:21 +01:00
Sergio Martins
6a3084abb6 fuzzer: Add failing testcase
Gives:
MultiSplitterLayout::checkSanity: Widget KDDockWidgets::Item(0x55e8038d8f90)
with rect QRect(0,0 1953x407) Intersects anchor KDDockWidgets::Anchor(0x55e803a17ba0)
with rect QRect(1209,406 5x562)
2019-10-13 23:52:27 +01:00
Sergio Martins
09101e9252 fuzzer: Don't allow Pause action to pause during regular runs
We only want to pause when we add it ourselves in the json
2019-10-13 23:49:39 +01:00
Sergio Martins
a0e3f32a63 fuzzer: Don't add as tab a widget that's already in the same mainwindow
Remove the testcase json, since this case shouldn't be tested
2019-10-13 23:49:10 +01:00
Sergio Martins
fb52c4053e fuzzer: Add a Pause action, for debugging purposes 2019-10-13 22:51:01 +01:00
Sergio Martins
f2e76c704e fuzzer: Don't store the index in the json, it's not needed 2019-10-13 22:44:05 +01:00
Sergio Martins
3895af14ea fuzzer: add a slowdown option 2019-10-13 22:05:20 +01:00
Sergio Martins
6b0d493b48 fuzzer: Add json test case of a failing test
Generates:
void KDDockWidgets::Item::onLayoutRequest() const Constraints not honoured
2019-10-13 21:49:35 +01:00
Sergio Martins
dd580a0f2f fuzzer: Don't generate random params when replaying
When replaying we want to replay with the params we read from json
2019-10-13 21:32:43 +01:00
Sergio Martins
3c6625164c fuzzer: add a method to check if the operation has params 2019-10-13 21:14:34 +01:00
Sergio Martins
8ea7aee657 Don't qFatal on warnings comming from the tests 2019-10-13 18:52:05 +01:00
Sergio Martins
d23eb035b9 fuzzer: Don't add dock widget to tabwidget already containing it 2019-10-13 18:51:41 +01:00
Sergio Martins
e278d0108a Add OperationBase::newOperation() to avoid duplicated code 2019-10-13 18:41:27 +01:00
Sergio Martins
ae439e0dad fuzzer: Add new operation: AddDockWidgetAsTab 2019-10-13 18:34:51 +01:00
Sergio Martins
a49ffe54c7 docs++ 2019-10-13 18:13:52 +01:00
Sergio Martins
e5b5885892 fuzzer: Add a 50ms delay, make the window manager happier 2019-10-13 18:09:13 +01:00
Sergio Martins
0ca0ad492b fuzzer: don't require dock widgets to exist when loading json
They'll be created later. So use their name instead of a pointer
to them.
2019-10-13 17:50:50 +01:00
Sergio Martins
c709f7743d fuzzer: Fix reading height and width from json 2019-10-13 17:12:18 +01:00
Sergio Martins
b82977d9ee fuzzer: minor refactor to share code 2019-10-13 17:06:41 +01:00
Sergio Martins
28d0aa25ae fuzzer: Loading from json now works 2019-10-13 17:01:08 +01:00
Sergio Martins
069a9654aa fuzzer: Don't dump json when we're loading from json 2019-10-13 17:00:53 +01:00
Sergio Martins
78efe4097f fuzzer: Add fromVariantMap(), so we can read the json 2019-10-13 14:03:23 +01:00
Sergio Martins
acf6cfb327 Add QCommandLineParser support 2019-10-12 10:13:32 +01:00