Sergio Martins
8447cefc14
fuzzer: trim testcase 16
...
Now has the minimum to reproduce
2020-01-22 10:56:11 +00:00
Sergio Martins
141cbc55f4
add a failing testcase
2020-01-21 22:05:32 +00:00
Sergio Martins
873978a99e
Add some failing testcases
2020-01-21 22:05:03 +00:00
Sergio Martins
b8279633ac
fuzzer: add an -l option, so it loops until it crashes
2020-01-21 17:10:29 +00:00
Allen Winter
df692686e7
various - update copyright year
2020-01-07 11:36:56 -05:00
Sergio Martins
2ff2b78f5a
Fix unit-tests on Windows with Qt 5.9
...
Our RAII class that ensures that each test leaves 0 top-levels behind
was being initialized with somthing bigger than 0 since the
rectForDrop() test wasn't doing proper cleanup.
Not sure why only repro with 5.9, but it's correct now.
2020-01-04 22:24:11 +00:00
Sergio Martins
6be2490c08
tests: When cleanup fails print the top-levels that we compared to
...
Since qApp->topLevels() contains buttons which will be deleted later
2020-01-04 21:15:39 +00:00
Sergio Martins
f37ecc0765
tests: Remove test with hardcoded values
...
It's flaky as the min sizes are varying with Qt versions. Also what
it tests is already tested in previous tests and elsewhere.
2020-01-04 18:33:43 +00:00
Sergio Martins
3b20f99092
tests: Add some missing window cleanup checks
2020-01-04 18:27:20 +00:00
Sergio Martins
9f5c7b5e6a
tests: Use fusion style on all platforms
...
To make the tests more robust, as some widgets min size will
vary
2020-01-04 18:19:26 +00:00
Sergio Martins
4b0b11acee
tests: Use QElapsedTimer instead of QTime::start()
...
The later is deprecated
2020-01-04 18:11:34 +00:00
Sergio Martins
e5df8db045
tests: Add some tests for double close
2019-12-29 18:29:27 +00:00
Sergio Martins
6be6aee56a
Fix dock widgets not filling their complete available space
...
To repro:
- stack 3 dock widgets vertically
- close the top one
- close the top one
The remaining one should now fill the whole window but it wasn't.
Culprit was the code that makes sure that when a dock is closed that
the adjacent ones get to share their space
2019-12-23 14:28:40 +00:00
Sergio Martins
7452520662
Add DockRegistry::dockWidgetForGuest()
...
So you can find out the dock widget which hosts a widget
2019-12-20 10:57:05 +00:00
Sergio Martins
787f7802be
Move the private code into a private/ folder
...
It's nice to have a similar include hierarchy at build time and install
time.
It also makes things more explicit
2019-10-20 19:24:54 +01:00
Sergio Martins
6a9b02ea63
Fix ensureMinSize_recursive
...
It doesn't make sense to only grow one side, as sometimes the item
must grow in both sizes, as the right side might now have enough
to acomodate its needs.
This also allows us to not use Anchor::ensureBounded(), as separators
being within their bounds doesn't imply min sizes being respected, while
the inverse is true
fuzzer testcase 10.json now passes
2019-10-20 16:57:52 +01:00
Sergio Martins
195390aa9e
Fix build with msvc2015, it doesn't have <optional>
2019-10-18 17:37:25 +01:00
Sergio Martins
38dc89818f
fuzzer: Move 10.json to failing/
...
So we can test the good ones easier, just fuzzer *json
2019-10-18 17:24:48 +01:00
Sergio Martins
a4b064945b
fuzzer: Add a failing test
2019-10-18 00:01:33 +01:00
Sergio Martins
bc1b511d86
fuzzer: Add a failing test
2019-10-17 18:45:03 +01:00
Sergio Martins
9d0a69c1a6
Relax warning about AnchorGroup being small
...
When adjusting the vertical separators we should only check if
the group has enough width. It's height is adjusted in ensureAnchorsBounded().
(And vice-versa)
Found via fuzzer's test-case 9.json. Passes now.
2019-10-17 18:12:51 +01:00
Sergio Martins
bb7f5e51c6
Relax warning in Anchor::setPosition()
...
Can happen with normal separators too.
They'll be fixed ensureAnchorsBounded() anyway.
2019-10-17 17:50:59 +01:00
Sergio Martins
27cae066a6
Fix Anchor::cumulativeMinLength
...
We don't want to count the size of separators that are following
others, but we might be in the middle of an operation that will
change which separators are following, like when restoring a placeholder.
So query the actual separators that will follow.
Fixes fuzzer 8.json and 2.json
2019-10-17 13:30:31 +01:00
Sergio Martins
1bd5f20309
fuzzer: Bail out if json to load doesn't exist
2019-10-17 09:06:30 +01:00
Sergio Martins
ea2a1ed0fd
fuzzer: simplify 8.json
2019-10-16 14:09:33 +01:00
Sergio Martins
8bdbe029ff
fuzzer: Add failing unit-tests
2019-10-16 14:04:16 +01:00
Sergio Martins
c57815a828
fuzzer: trim 2.json
2019-10-15 19:34:14 +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
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
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