1
0
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:
Leo Franchi
2012-11-25 22:32:26 -05:00
parent 3ed09d23f4
commit c557663c22

View File

@@ -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
}