Add a function for validating labels.
This commit is contained in:
parent
6ad873223e
commit
4a39e453dc
|
@ -387,6 +387,14 @@ qint64 FileSystem::maxLabelLength() const
|
|||
return 16;
|
||||
}
|
||||
|
||||
/** Validates the label for this FileSystem
|
||||
* @param label the label that will be checked
|
||||
* @return the valid label */
|
||||
QString FileSystem::validateLabel(const QString& label) const
|
||||
{
|
||||
return label.left(maxLabelLength());
|
||||
}
|
||||
|
||||
/** @return this FileSystem's type as printable name */
|
||||
QString FileSystem::name() const
|
||||
{
|
||||
|
|
|
@ -182,6 +182,7 @@ public:
|
|||
virtual qint64 minCapacity() const;
|
||||
virtual qint64 maxCapacity() const;
|
||||
virtual qint64 maxLabelLength() const;
|
||||
virtual QString validateLabel(const QString& label) const;
|
||||
|
||||
virtual SupportTool supportToolName() const;
|
||||
virtual bool supportToolFound() const;
|
||||
|
|
Loading…
Reference in New Issue