Commit 2a86cb13 authored by dt's avatar dt
Browse files

PathChooser: Fix some regressions

Task-Nr: QTCREATORBUG-2409
parent 6b665ac9
......@@ -156,10 +156,12 @@ void PathChooser::setBaseDirectory(const QString &directory)
QString PathChooser::path() const
{
const QString path = m_d->m_lineEdit->text();
if (!m_d->m_baseDirectory.isEmpty() && QFileInfo(path).isRelative())
if (!m_d->m_baseDirectory.isEmpty()
&& QFileInfo(path).isRelative()
&& !path.isEmpty())
return QFileInfo(m_d->m_baseDirectory + QLatin1Char('/') + path).absoluteFilePath();
else
return QFileInfo(path).absoluteFilePath();
return QDir::fromNativeSeparators(path);
}
void PathChooser::setPath(const QString &path)
......
Supports Markdown
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