QMainWindowLayout::hover does not need to return a value
The return value of the function is never used Change-Id: I75e51bce36eedd42f5527ddb86efd434fe11551d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
596e157d3c
commit
b138645cc6
@ -2283,11 +2283,11 @@ void QMainWindowLayout::updateGapIndicator()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<int> QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
|
void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
|
||||||
{
|
{
|
||||||
if (!parentWidget()->isVisible() || parentWidget()->isMinimized()
|
if (!parentWidget()->isVisible() || parentWidget()->isMinimized()
|
||||||
|| pluggingWidget != 0 || widgetItem == 0)
|
|| pluggingWidget != 0 || widgetItem == 0)
|
||||||
return QList<int>();
|
return;
|
||||||
|
|
||||||
QWidget *widget = widgetItem->widget();
|
QWidget *widget = widgetItem->widget();
|
||||||
QPoint pos = parentWidget()->mapFromGlobal(mousePos);
|
QPoint pos = parentWidget()->mapFromGlobal(mousePos);
|
||||||
@ -2317,13 +2317,13 @@ QList<int> QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mouse
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path == currentGapPos)
|
if (path == currentGapPos)
|
||||||
return currentGapPos; // the gap is already there
|
return; // the gap is already there
|
||||||
|
|
||||||
currentGapPos = path;
|
currentGapPos = path;
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
fixToolBarOrientation(widgetItem, 2); // 2 = top dock, ie. horizontal
|
fixToolBarOrientation(widgetItem, 2); // 2 = top dock, ie. horizontal
|
||||||
restore(true);
|
restore(true);
|
||||||
return QList<int>();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixToolBarOrientation(widgetItem, currentGapPos.at(1));
|
fixToolBarOrientation(widgetItem, currentGapPos.at(1));
|
||||||
@ -2332,7 +2332,7 @@ QList<int> QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mouse
|
|||||||
|
|
||||||
if (!newState.insertGap(path, widgetItem)) {
|
if (!newState.insertGap(path, widgetItem)) {
|
||||||
restore(true); // not enough space
|
restore(true); // not enough space
|
||||||
return QList<int>();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize min = newState.minimumSize();
|
QSize min = newState.minimumSize();
|
||||||
@ -2340,7 +2340,7 @@ QList<int> QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mouse
|
|||||||
|
|
||||||
if (min.width() > size.width() || min.height() > size.height()) {
|
if (min.width() > size.width() || min.height() > size.height()) {
|
||||||
restore(true);
|
restore(true);
|
||||||
return QList<int>();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
newState.fitLayout();
|
newState.fitLayout();
|
||||||
@ -2354,8 +2354,6 @@ QList<int> QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mouse
|
|||||||
applyState(layoutState);
|
applyState(layoutState);
|
||||||
|
|
||||||
updateGapIndicator();
|
updateGapIndicator();
|
||||||
|
|
||||||
return path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QDockWidgetGroupWindow *QMainWindowLayout::createTabbedDockWindow()
|
QDockWidgetGroupWindow *QMainWindowLayout::createTabbedDockWindow()
|
||||||
|
@ -291,7 +291,7 @@ public:
|
|||||||
QRubberBand *gapIndicator;
|
QRubberBand *gapIndicator;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QList<int> hover(QLayoutItem *widgetItem, const QPoint &mousePos);
|
void hover(QLayoutItem *widgetItem, const QPoint &mousePos);
|
||||||
bool plug(QLayoutItem *widgetItem);
|
bool plug(QLayoutItem *widgetItem);
|
||||||
QLayoutItem *unplug(QWidget *widget, bool group = false);
|
QLayoutItem *unplug(QWidget *widget, bool group = false);
|
||||||
void revert(QLayoutItem *widgetItem);
|
void revert(QLayoutItem *widgetItem);
|
||||||
|
Loading…
Reference in New Issue
Block a user