Sergio Martins
84e467a28d
tests: Move the _data() method next to the respective test
2019-07-05 14:58:41 +01:00
Sergio Martins
b10b9af14a
Port away from QScopeGuard
...
It's not available on older Qt
2019-07-05 14:56:00 +01:00
Sergio Martins
52596c11d6
Refactor AnchorGroup::turnIntoPlaceholder a bit
...
Now honours chains of folowees
2019-07-05 14:40:56 +01:00
Sergio Martins
a7e3b5a3a2
Remove double negation for readability
2019-07-05 11:11:56 +01:00
Sergio Martins
e9128da69f
Use better assert
2019-07-05 11:05:37 +01:00
Sergio Martins
317cb1b472
Relax this assert by using isSquashed() instead
...
It's a more correct approach as there could be a chain of followers
2019-07-05 10:58:22 +01:00
Sergio Martins
d0a34ae7e7
Add Anchor::findAnchor()
2019-07-05 10:35:15 +01:00
Sergio Martins
0d9ab0ee00
Rename anchor() to anchorAtDirection() for clarity
2019-07-05 10:23:36 +01:00
Sergio Martins
2679905cb0
Add Anchor::endFolowee()
2019-07-05 10:23:17 +01:00
Sergio Martins
3bb7ab04a9
Rename anchor to anchorAtDirection
...
So it maches anchorAtSide
2019-07-05 09:37:11 +01:00
Sergio Martins
9dc74fd8cb
Add failing test
2019-07-05 09:23:01 +01:00
Sergio Martins
5cc8650b10
debug++
2019-07-04 23:00:47 +01:00
Sergio Martins
d2b1f8e1a4
More hardening for AnchorGroup::turnIntoPlaceholder
2019-07-04 22:59:51 +01:00
Sergio Martins
8c4d373849
Add Anchor::isStaticOrFollowsStatic()
2019-07-04 22:59:03 +01:00
Sergio Martins
35e82b4e86
Fix anchoring "following" when creating placeholders
...
Sometimes, there's already some other anchor that's following
an anchor outside of the group, like when we have two adjacent
placeholders
2019-07-04 18:45:13 +01:00
Sergio Martins
49c4b5de18
Fix crash due to holding a reference to a QVector element
...
When the QVector reallocates it invalidates the references
2019-07-04 18:04:52 +01:00
Sergio Martins
8c402f780d
Add a failing test
2019-07-04 17:00:54 +01:00
Sergio Martins
ca5376e4de
Improve debug
2019-07-04 16:18:16 +01:00
Sergio Martins
4a35c28b37
Fix a few clazy warnings
2019-07-04 15:12:25 +01:00
Sergio Martins
b5e932258e
Fix position calculation when restoring placeholders
...
It was going out of bounds. We need to respect the bounds
of each anchor
2019-07-04 14:58:31 +01:00
Sergio Martins
482934d55e
AnchorGroup: add anchorAtSide()
2019-07-04 14:57:38 +01:00
Sergio Martins
b4b2b53641
Fix typo when disconnecting the follower
...
Should fix a few bugs
2019-07-04 14:56:53 +01:00
Sergio Martins
d7635a408b
Coding style
2019-07-04 12:05:32 +01:00
Sergio Martins
434bf5b1e0
Fix two anchors following each other
2019-07-04 10:36:15 +01:00
Sergio Martins
3059965bbe
Remove unused variable
2019-07-03 22:33:44 +01:00
Sergio Martins
d29eaee49a
Remove unused variable
2019-07-03 22:32:15 +01:00
Sergio Martins
d5a05c4f38
Tests++
2019-07-03 22:29:53 +01:00
Sergio Martins
ac76363cbe
Add a warning about negative position
2019-07-03 22:24:43 +01:00
Sergio Martins
257800e7a3
Warn when setting a smaller size than the minimum size
2019-07-03 20:09:45 +01:00
Sergio Martins
71f659b444
Add a minSize property so we can debug via gammaray
2019-07-03 20:04:59 +01:00
Sergio Martins
6ed0e44063
Expose contentsSize as Q_PROPERTY so we can see it under gammaray
2019-07-03 19:44:05 +01:00
Sergio Martins
185d7edeb8
Fix build due to unused function
2019-07-03 19:08:56 +01:00
Sergio Martins
9c4a729a09
Remove unused variable
2019-07-03 19:05:17 +01:00
Sergio Martins
332860b763
tests++
2019-07-03 18:58:39 +01:00
Sergio Martins
d76e2380b3
Fix unit-test on Windows
...
We were resizing the window to a smaller size than it supports.
2019-07-03 18:06:24 +01:00
Sergio Martins
28a0093eb4
Debug++
2019-07-03 16:57:12 +01:00
Sergio Martins
c37b6099f4
Use Q_EMIT
2019-07-03 16:11:00 +01:00
Sergio Martins
6711b98bb1
Fix title bar titles
...
It should use DockWidget::title() instead of name()
2019-07-03 16:06:00 +01:00
Sergio Martins
502f2e7d4b
TitleBar: Add a title property, so we can see it under Gammaray
2019-07-03 16:00:32 +01:00
Sergio Martins
a311d44d67
Fix build
2019-07-03 15:25:40 +01:00
Sergio Martins
b9ae1b74c2
Don't include moc in the cpp file
...
Breaks with weird build systems
2019-07-03 15:22:03 +01:00
Sergio Martins
ca8a72d304
DragController: Work with MFC windows too
...
A MFC window with an embedded QMainWindow doesn't appear in
topLevelWindows(), so we need an extra check.
2019-07-03 15:13:27 +01:00
Sergio Martins
9fc631a589
Add logging related to top-levels
2019-07-03 14:12:32 +01:00
Sergio Martins
c1b7dcbc57
Just assert here
2019-07-03 12:59:01 +01:00
Sergio Martins
c2fd238377
Expose Button
...
Allows to remove the moc include which isn't working on weird
build systems
2019-07-03 12:58:16 +01:00
Sergio Martins
94ed5d49ef
Rename static variable
2019-07-03 12:57:53 +01:00
Sergio Martins
d0598ab3c9
Fix non-developer-mode build
2019-07-03 11:54:27 +01:00
Sergio Martins
5341e7353e
add unit-test for using an embedded MainWindow
2019-07-02 15:57:55 +01:00
Sergio Martins
daf18e9153
Protect against re-entrancy
2019-07-02 15:15:54 +01:00
Sergio Martins
d4fba8e0f8
Fix cases where docked dock widgets wouldn't have the right placeholder
...
Previously dock widgets only cared about placeholders to mainwindow and
ignored FloatingWindow placeholders, but a placeholders can be transfered
from FloatingWindow to mainwindow, becoming interesting, and shouldn't
be ignored anymore
2019-07-02 14:31:44 +01:00