Sergio Martins
bcd44d5408
Build with QT_NO_KEYWORDS
2019-07-13 12:09:17 +01:00
Sergio Martins
105bb6770b
Add a failing test for a feature we don't support yet
...
When adding a dock widget to a tab we don't check its minimum size
and we don't resize the layout, yet.
2019-07-13 03:01:53 +01:00
Sergio Martins
8a69fce26a
Remove some unused code
2019-07-13 02:45:12 +01:00
Sergio Martins
fa5f03c0a2
Add missing include
2019-07-13 02:45:00 +01:00
Sergio Martins
cd96c63ddf
Merge pull request #3 from Montel/remove_unused_includes
...
Remove unused includes
2019-07-13 02:39:27 +01:00
Sergio Martins
5071c2befe
Merge pull request #2 from Montel/remove_duplicate_logging_p_h
...
Remove duplicate logging_p.h
2019-07-13 02:38:48 +01:00
Sergio Martins
7709803e57
Make the setFollowee() stuff much simpler
...
It was getting quite crazy to figure out which anchors to follow
when restoring dock widgets in complex layouts full of hidden items.
Now, the approach is much simpler, we just call setFollowee(nullptr)
on all anchors, then swipe left and right, top and bottom and
set the anchors that really need to follow
2019-07-12 12:58:11 +01:00
Sergio Martins
abafa49492
fuzzer: minor style fixes and add Laurent as author
2019-07-12 11:20:15 +01:00
Sergio Martins
7c3a5f83e5
Merge pull request #1 from Montel/add_fuzzer_apps
...
Add test application for generating random dockwidget for testing potential bugs
2019-07-12 11:16:41 +01:00
Laurent Montel
122f5dcebe
Remove unused includes
2019-07-12 12:07:40 +02:00
Laurent Montel
b57588364b
Remove duplicate logging_p.h
2019-07-12 12:04:12 +02:00
Laurent Montel
30a04e1d13
Add test application for generating random dockwidget for testing potential bugs
2019-07-12 11:57:20 +02:00
Sergio Martins
f0e9a4f1bc
Add another failing test
2019-07-11 14:10:25 +01:00
Sergio Martins
b4864d156f
Don't assert that the group is squashed
...
It can happen
2019-07-11 14:02:11 +01:00
Sergio Martins
7561047fa5
Relax sanity checks for placeholder items
...
We don't care about their size
2019-07-11 14:00:58 +01:00
Sergio Martins
1a06cb3757
Update the thickness when the end followee changes
2019-07-11 13:12:41 +01:00
Sergio Martins
e5fbbdae6c
Improve finding the right anchors for restoring placeholders
2019-07-11 12:58:35 +01:00
Sergio Martins
898c27291b
Refactor
2019-07-11 11:36:37 +01:00
Sergio Martins
48366ff847
Refactor a bit
2019-07-11 11:19:30 +01:00
Sergio Martins
9f706a0abd
Add AnchorGroup::availableSize()
2019-07-11 11:12:52 +01:00
Sergio Martins
5d9e827d21
Add MultiSplitter::ensureAvailableSize()
2019-07-11 11:04:33 +01:00
Sergio Martins
e7deb2c27a
Add MultiSplitterLayout::availableSize()
...
Just an overload to methods we already have
2019-07-11 10:35:27 +01:00
Sergio Martins
59a01e7d2d
Asserts++
2019-07-11 10:35:05 +01:00
Sergio Martins
6116c4c11b
Remove AnchorGroup::anchorFollowing
...
It's now unused and technically wrong as there can be more than 1
following in the same group
2019-07-11 10:16:09 +01:00
Sergio Martins
8503bca997
Add anchorsFollowingInwards()
...
To replace anchorFollowing(), as there can be more than 1
2019-07-11 10:09:36 +01:00
Sergio Martins
dab0694dbc
Introduce Anchor::findNearestAnchorWithItems()
...
As a cleaner alternative than abusing AnchorGroup::turnIntoPlaceholder()
as the item was already a placeholder
2019-07-10 19:11:10 +01:00
Sergio Martins
90502ae5c7
When adding widgets relative to placeholders don't forget to set following
2019-07-10 18:24:33 +01:00
Sergio Martins
91704fd486
Uncomment a few tests that are passing
2019-07-10 16:39:30 +01:00
Sergio Martins
ba0da2aab1
debug++
2019-07-10 16:27:09 +01:00
Sergio Martins
3f73a99a71
Update followers whenever the followee anchor is deleted
2019-07-10 16:10:30 +01:00
Sergio Martins
eb29f1318d
Minor rename
2019-07-10 15:57:18 +01:00
Sergio Martins
6134ccfd3c
Add MultiSplitterLayout::anchorsFollowing
2019-07-10 15:55:55 +01:00
Sergio Martins
fa23d954b1
Add a failing unit-test
2019-07-10 15:34:13 +01:00
Sergio Martins
839500b84d
Fix detecting window when the top-level is embedded in MFC
...
Although topLevel is a topLevel to Qt, it's actually inside
another Windows window.
2019-07-10 15:33:07 +01:00
Sergio Martins
2cbf758f6b
Don't include MainWindow.moc in .cpp
...
some build systems don't support it
2019-07-10 12:58:24 +01:00
Sergio Martins
bad105f0a2
Dont' accept using AddingOption_StartHidden for any layouted dock widgets
2019-07-10 12:31:10 +01:00
Sergio Martins
b8d5fefbf1
Allow to add a dock widget directly as a placeholder
...
So it's not visible at startup if not needed
2019-07-10 12:24:36 +01:00
Sergio Martins
9052d93794
Fix adding a widget to a layout that already contains it
...
It should work, since we can be moving a widget to another
location
2019-07-10 11:20:20 +01:00
Sergio Martins
2c989ad5e8
Validate the parameters before creating the Frame
...
otherwise we're left with a dummy frame
2019-07-09 22:43:55 +01:00
Sergio Martins
3fc32fc4aa
Warn when adding a widget and the widget is the same as the relativeTo
2019-07-09 22:22:28 +01:00
Sergio Martins
c682a6966e
Add tests for several stealing scenarios
2019-07-09 21:33:49 +01:00
Sergio Martins
fceb7078ab
Make no side-effects if the tab widget already contains the widget
2019-07-09 21:15:23 +01:00
Sergio Martins
5af0482a7e
WIP: Allow to add a dock widget directly hidden
...
So it's not shown
2019-07-09 19:35:01 +01:00
Sergio Martins
97d7bd903b
Refactor to make less complex
2019-07-09 19:16:45 +01:00
Sergio Martins
7c1dca8a83
Remove unused variable
2019-07-09 19:11:57 +01:00
Sergio Martins
4518bf4462
Refactor more code, so it can be shared
2019-07-09 19:10:23 +01:00
Sergio Martins
c012af78d5
Minor: Move to place where it's used
...
probably we can refactor the whole block
2019-07-09 18:45:27 +01:00
Sergio Martins
60041870c3
Debug++
2019-07-09 18:40:18 +01:00
Sergio Martins
e2e234cb38
Debug++
2019-07-09 18:26:01 +01:00
Sergio Martins
2adae6b375
Debug++
2019-07-09 18:11:02 +01:00