Commit 25d37a49 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix crash in customize toolbar dialog.

For some reasons, this doesn't crash on Linux...
parent 0bc96b8b
......@@ -647,16 +647,14 @@ inline int DroppingController::getParentPosInLayout( QPoint point )
QPoint origin = mapToGlobal ( point );
QWidget *tempWidg = QApplication::widgetAt( origin );
if( tempWidg == NULL )
return -1;
int i = -1;
if( tempWidg != NULL)
int i = controlLayout->indexOf( tempWidg );
if( i == -1 )
{
i = controlLayout->indexOf( tempWidg );
if( i == -1 )
{
i = controlLayout->indexOf( tempWidg->parentWidget() );
tempWidg = tempWidg->parentWidget();
}
i = controlLayout->indexOf( tempWidg->parentWidget() );
tempWidg = tempWidg->parentWidget();
}
/* Return the nearest position */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment