forked from len0rd/rockbox
Add BrowseDirtree::setDir(const QString&) to simplify the code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14694 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bedfd7c8b5
commit
4c881e2c91
5 changed files with 26 additions and 26 deletions
|
|
@ -495,13 +495,11 @@ void Config::browseFolder()
|
|||
#if defined(Q_OS_MACX)
|
||||
browser->setRoot("/Volumes");
|
||||
#elif defined(Q_OS_LINUX)
|
||||
QDir a("/media");
|
||||
browser->setDir(a);
|
||||
browser->setDir("/media");
|
||||
#endif
|
||||
if( ui.mountPoint->text() != "" )
|
||||
{
|
||||
QDir d(ui.mountPoint->text());
|
||||
browser->setDir(d);
|
||||
browser->setDir(ui.mountPoint->text());
|
||||
}
|
||||
browser->show();
|
||||
connect(browser, SIGNAL(itemChanged(QString)), this, SLOT(setMountpoint(QString)));
|
||||
|
|
@ -516,8 +514,7 @@ void Config::browseCache()
|
|||
#elif defined(Q_OS_WIN32)
|
||||
cbrowser->setFilter(QDir::Drives);
|
||||
#endif
|
||||
QDir d(ui.cachePath->text());
|
||||
cbrowser->setDir(d);
|
||||
cbrowser->setDir(ui.cachePath->text());
|
||||
cbrowser->show();
|
||||
connect(cbrowser, SIGNAL(itemChanged(QString)), this, SLOT(setCache(QString)));
|
||||
}
|
||||
|
|
@ -625,8 +622,7 @@ void Config::browseTts()
|
|||
|
||||
if(QFileInfo(ui.ttsExecutable->text()).isDir())
|
||||
{
|
||||
QDir d(ui.ttsExecutable->text());
|
||||
browser.setDir(d);
|
||||
browser.setDir(ui.ttsExecutable->text());
|
||||
}
|
||||
if(browser.exec() == QDialog::Accepted)
|
||||
{
|
||||
|
|
@ -647,8 +643,7 @@ void Config::browseEnc()
|
|||
|
||||
if(QFileInfo(ui.encoderExecutable->text()).isDir())
|
||||
{
|
||||
QDir d(ui.encoderExecutable->text());
|
||||
browser.setDir(d);
|
||||
browser.setDir(ui.encoderExecutable->text());
|
||||
}
|
||||
if(browser.exec() == QDialog::Accepted)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue