diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-02-22 12:25:19 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-02-22 12:28:29 +0100 |
commit | 086c993ac99ccbe312cdffcfdaf77c01ae1c472a (patch) | |
tree | 9556e7c30a37a166e028f6fe84a072da616c8443 /src/libs/utils/pathchooser.h | |
parent | 8784196ff5bfe698b4af44ad0941e328ca1e22fb (diff) | |
download | qt-creator-086c993ac99ccbe312cdffcfdaf77c01ae1c472a.tar.gz |
Path Chooser: Introduce tooltip displaying the version.
Add a string-list type property specifying the version argument
for command type Path Choosers. Use it prototypically in
GccToolChainWidget.
Rubber-stamped-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/libs/utils/pathchooser.h')
-rw-r--r-- | src/libs/utils/pathchooser.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h index 23be035adf..1c90142d38 100644 --- a/src/libs/utils/pathchooser.h +++ b/src/libs/utils/pathchooser.h @@ -62,6 +62,7 @@ class QTCREATOR_UTILS_EXPORT PathChooser : public QWidget Q_PROPERTY(QString promptDialogTitle READ promptDialogTitle WRITE setPromptDialogTitle DESIGNABLE true) Q_PROPERTY(Kind expectedKind READ expectedKind WRITE setExpectedKind DESIGNABLE true) Q_PROPERTY(QString baseDirectory READ baseDirectory WRITE setBaseDirectory DESIGNABLE true) + Q_PROPERTY(QStringList commandVersionArguments READ commandVersionArguments WRITE setCommandVersionArguments) public: static const char * const browseButtonLabel; @@ -113,6 +114,17 @@ public: QLineEdit *lineEdit() const; + // For PathChoosers of 'Command' type, this property specifies the arguments + // required to obtain the tool version (commonly, '--version'). Setting them + // causes the version to be displayed as a tooltip. + QStringList commandVersionArguments() const; + void setCommandVersionArguments(const QStringList &arguments); + + // Utility to run a tool and return its stdout. + static QString toolVersion(const QString &binary, const QStringList &arguments); + // Install a tooltip on lineedits used for binaries showing the version. + static void installLineEditVersionToolTip(QLineEdit *le, const QStringList &arguments); + private: // Returns overridden title or the one from <title> QString makeDialogTitle(const QString &title); |