diff options
author | hjk <hjk@qt.io> | 2019-07-23 10:17:57 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-07-23 15:51:45 +0000 |
commit | 8b72e9216746c04e68a1c6498ac3396942fbebce (patch) | |
tree | c8742f1cf932ec3fae5a3f6476b390dbeb06ec9e /src/libs/utils/pathchooser.cpp | |
parent | 80716610c5f4deb32af15f1189363bf2ebffa41e (diff) |
Utils: Add CommandLine convenience constructors
... taking a QString for the executable.
This weakens the very explicit QString -> FileName conversion via the
named constructors for the special case of constructing a CommandLine.
I think that's worthwhile here, as it reduces the noise on the caller
site under circumstance where the nature of the thing is obvious.
Change-Id: I27b4a73639728893d053b2e7ba65cb745f0ffe83
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/utils/pathchooser.cpp')
-rw-r--r-- | src/libs/utils/pathchooser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index a114aba310f..611a2b8c6d5 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -109,7 +109,7 @@ bool BinaryVersionToolTipEventFilter::eventFilter(QObject *o, QEvent *e) const QString binary = le->text(); if (!binary.isEmpty()) { const QString version = BinaryVersionToolTipEventFilter::toolVersion( - CommandLine(FilePath::fromString(QDir::cleanPath(binary)), m_arguments)); + CommandLine(QDir::cleanPath(binary), m_arguments)); if (!version.isEmpty()) { // Concatenate tooltips. QString tooltip = "<html><head/><body>"; @@ -678,7 +678,7 @@ FancyLineEdit *PathChooser::lineEdit() const QString PathChooser::toolVersion(const QString &binary, const QStringList &arguments) { - return BinaryVersionToolTipEventFilter::toolVersion({FilePath::fromString(binary), arguments}); + return BinaryVersionToolTipEventFilter::toolVersion({binary, arguments}); } void PathChooser::installLineEditVersionToolTip(QLineEdit *le, const QStringList &arguments) |