forked from qt-creator/qt-creator
Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit. Keep the old versions as inline function now to ease downstream migration. Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -310,7 +310,7 @@ QString PathChooser::rawPath() const
|
||||
|
||||
QString PathChooser::path() const
|
||||
{
|
||||
return fileName().toString();
|
||||
return filePath().toString();
|
||||
}
|
||||
|
||||
FilePath PathChooser::rawFileName() const
|
||||
@@ -318,7 +318,7 @@ FilePath PathChooser::rawFileName() const
|
||||
return FilePath::fromString(QDir::fromNativeSeparators(d->m_lineEdit->text()));
|
||||
}
|
||||
|
||||
FilePath PathChooser::fileName() const
|
||||
FilePath PathChooser::filePath() const
|
||||
{
|
||||
return FilePath::fromUserInput(d->expandedPath(rawFileName().toString()));
|
||||
}
|
||||
@@ -342,7 +342,7 @@ void PathChooser::setPath(const QString &path)
|
||||
d->m_lineEdit->setTextKeepingActiveCursor(QDir::toNativeSeparators(path));
|
||||
}
|
||||
|
||||
void PathChooser::setFileName(const FilePath &fn)
|
||||
void PathChooser::setFilePath(const FilePath &fn)
|
||||
{
|
||||
d->m_lineEdit->setTextKeepingActiveCursor(fn.toUserOutput());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user