forked from qt-creator/qt-creator
PathChooser: Make path/rawPath and fileName/rawFileName more consistent
This moves the fromUserInput that used to be in rawFileName to fileName, so that fileName produces the same output it used to produce. Change-Id: Ifb209af3f60d959c3f7119ebfa20f999c5d5f0ca Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -306,16 +306,16 @@ void PathChooser::setEnvironment(const Environment &env)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PathChooser::path() const
|
|
||||||
{
|
|
||||||
return d->expandedPath(rawPath());
|
|
||||||
}
|
|
||||||
|
|
||||||
QString PathChooser::rawPath() const
|
QString PathChooser::rawPath() const
|
||||||
{
|
{
|
||||||
return rawFileName().toString();
|
return rawFileName().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString PathChooser::path() const
|
||||||
|
{
|
||||||
|
return fileName().toString();
|
||||||
|
}
|
||||||
|
|
||||||
FileName PathChooser::rawFileName() const
|
FileName PathChooser::rawFileName() const
|
||||||
{
|
{
|
||||||
return FileName::fromString(QDir::fromNativeSeparators(d->m_lineEdit->text()));
|
return FileName::fromString(QDir::fromNativeSeparators(d->m_lineEdit->text()));
|
||||||
@@ -323,7 +323,7 @@ FileName PathChooser::rawFileName() const
|
|||||||
|
|
||||||
FileName PathChooser::fileName() const
|
FileName PathChooser::fileName() const
|
||||||
{
|
{
|
||||||
return FileName::fromString(path());
|
return FileName::fromUserInput(d->expandedPath(rawFileName().toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: try to remove again
|
// FIXME: try to remove again
|
||||||
|
Reference in New Issue
Block a user