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:
hjk
2020-04-09 11:05:50 +02:00
parent 45ba9fcd53
commit 79b680e7f0
44 changed files with 136 additions and 129 deletions

View File

@@ -55,7 +55,7 @@ class QTCREATOR_UTILS_EXPORT PathChooser : public QWidget
Q_PROPERTY(QStringList commandVersionArguments READ commandVersionArguments WRITE setCommandVersionArguments)
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true)
// Designer does not know this type, so force designable to false:
Q_PROPERTY(Utils::FilePath fileName READ fileName WRITE setFileName DESIGNABLE false)
Q_PROPERTY(Utils::FilePath filePath READ filePath WRITE setFilePath DESIGNABLE false)
public:
static QString browseButtonLabel();
@@ -88,10 +88,15 @@ public:
bool isValid() const;
QString errorMessage() const;
FilePath filePath() const;
// Deprecated. Use filePath().toString()
QString path() const;
// Deprecated. Use filePath()
FilePath fileName() const { return filePath(); }
QString rawPath() const; // The raw unexpanded input.
FilePath rawFileName() const; // The raw unexpanded input.
FilePath fileName() const;
static QString expandedDirectory(const QString &input, const Environment &env,
const QString &baseDir);
@@ -163,7 +168,9 @@ signals:
public slots:
void setPath(const QString &);
void setFileName(const FilePath &);
// Deprecated: Use setFilePath()
void setFileName(const FilePath &path) { setFilePath(path); }
void setFilePath(const FilePath &);
private:
PathChooserPrivate *d = nullptr;