mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Retry if the /Volumes entry is still not found after our wait
This commit is contained in:
@@ -90,6 +90,23 @@ void
|
||||
CheckDirModel::volumeShowFinished()
|
||||
{
|
||||
reset();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
// Make sure /Volumes is there, if not wait and try again
|
||||
const QModelIndex parent = index("/");
|
||||
const int count = rowCount(parent);
|
||||
bool found = false;
|
||||
for ( int i = 0; i < count; i++ )
|
||||
{
|
||||
if ( data( index( i, 0, parent ) ).toString() == "Volumes" )
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !found )
|
||||
QTimer::singleShot( 500, this, SLOT( volumeShowFinished() ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user