Fix directory name display in relocate dialog

This commit is contained in:
Mike Gelfand 2014-12-26 14:21:47 +00:00
parent 8a4f8b9e15
commit e9394e2f9b
1 changed files with 3 additions and 2 deletions

View File

@ -32,13 +32,14 @@ RelocateDialog::onFileSelected (const QString& path)
myPath = path;
const QFileInfo pathInfo (path);
const QString absolutePath = pathInfo.absoluteFilePath ();
const QFileIconProvider iconProvider;
ui.newLocationButton->setIcon (mySession.isLocal () ?
iconProvider.icon (pathInfo) :
iconProvider.icon (QFileIconProvider::Folder));
ui.newLocationButton->setText (pathInfo.baseName ());
ui.newLocationButton->setToolTip (path);
ui.newLocationButton->setText (pathInfo.fileName ().isEmpty () ? absolutePath : pathInfo.fileName ());
ui.newLocationButton->setToolTip (absolutePath);
}
void