| 976 | } |
| 977 | |
| 978 | bool MainWindow::redistributeDocks(const QPoint &pos, const QPoint &offset, |
| 979 | Qt::CursorShape cursorShape, |
| 980 | int (QSize::*dimension)() const, |
| 981 | Qt::Orientation orientation) { |
| 982 | #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) |
| 983 | if (cursor().shape() == cursorShape) { |
| 984 | if (DockWidget *before = redistributeFindDock(pos - offset)) { |
| 985 | if (DockWidget *after = redistributeFindDock(pos + offset)) { |
| 986 | if (before != after) { |
| 987 | int size = (before->size().*dimension)() + (after->size().*dimension)(); |
| 988 | resizeDocks({before, after}, {size / 2, size - size / 2}, orientation); |
| 989 | return true; |
| 990 | } |
| 991 | } |
| 992 | } |
| 993 | } |
| 994 | #else |
| 995 | (void)pos; (void)offset; (void)cursorShape; (void)dimension; (void)orientation; |
| 996 | #endif |
| 997 | return false; |
| 998 | } |
| 999 | |
| 1000 | void MainWindow::raiseContainingDock(QWidget *widget) { |
| 1001 | QWidget *dock = findSelfOrParent<QDockWidget*>(widget); |
nothing calls this directly
no outgoing calls
no test coverage detected