forked from qt-creator/qt-creator
Utils: Simplify pathchooser validation
Allow to set a default value for the PathChooser which will be used on the one hand as placeHolderText and on the other hand for the default validation if the underlying line edit has no text set. Change-Id: I49d2f773cf3933cb30b54ee6de82290b480e743d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -153,6 +153,10 @@ public:
|
||||
// Deprecated. Use filePath()
|
||||
FilePath fileName() const { return filePath(); }
|
||||
|
||||
// this sets the placeHolderText to defaultValue and enables to use this as
|
||||
// input value during validation if the real value is empty
|
||||
// setting an empty QString will disable this and clear the placeHolderText
|
||||
void setDefaultValue(const QString &defaultValue);
|
||||
private:
|
||||
bool validatePath(FancyLineEdit *edit, QString *errorMessage) const;
|
||||
// Returns overridden title or the one from <title>
|
||||
|
||||
Reference in New Issue
Block a user