SDKtool: Enable operation on filenames again and improve help text

Change-Id: Icc447745ddbd4bd75b4805f42593e2ee1621e28e
Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Tobias Hunger
2016-12-14 15:26:52 +01:00
parent 990cec3371
commit 26f0c7c3ca
6 changed files with 11 additions and 8 deletions

View File

@@ -39,9 +39,8 @@ QString AddKeysOperation::helpText() const
QString AddKeysOperation::argumentsHelpText() const QString AddKeysOperation::argumentsHelpText() const
{ {
return QLatin1String("A file (profiles, qtversions or toolchains) followed by one or more Tuples\n" return QLatin1String("A file (relative to top-level settings directory and without .xml extension)\n"
"<KEY> <TYPE>:<VALUE> are required. KEY needs to start with\n" "followed by one or more Tuples <KEY> <TYPE>:<VALUE> are required.\n");
"the name of the file to insert data into (minus the .xml extension).");
} }
bool AddKeysOperation::setArguments(const QStringList &args) bool AddKeysOperation::setArguments(const QStringList &args)

View File

@@ -39,7 +39,8 @@ QString FindKeyOperation::helpText() const
QString FindKeyOperation::argumentsHelpText() const QString FindKeyOperation::argumentsHelpText() const
{ {
return QLatin1String("A file (profiles, qtversions or toolchains) followed by one or more keys to search for.\n"); return QLatin1String("A file (relative to top-level settings directory and without .xml extension)\n"
"followed by one or more keys to search for.\n");
} }
bool FindKeyOperation::setArguments(const QStringList &args) bool FindKeyOperation::setArguments(const QStringList &args)

View File

@@ -39,7 +39,8 @@ QString FindValueOperation::helpText() const
QString FindValueOperation::argumentsHelpText() const QString FindValueOperation::argumentsHelpText() const
{ {
return QLatin1String("A file (profiles, qtversions or toolchains) followed by one or more type:value tupels to search for.\n"); return QLatin1String("A file (relative to top-level settings directory and without .xml extension)\n"
"followed by one or more type:value tupels to search for.\n");
} }
bool FindValueOperation::setArguments(const QStringList &args) bool FindValueOperation::setArguments(const QStringList &args)

View File

@@ -39,7 +39,8 @@ QString GetOperation::helpText() const
QString GetOperation::argumentsHelpText() const QString GetOperation::argumentsHelpText() const
{ {
return QLatin1String("A file (profiles, qtversions or toolchains) followed by one or more keys to list.\n"); return QLatin1String("A file (relative to top-level settings directory and without .xml extension)\n"
"followed by one or more keys to list.\n");
} }
bool GetOperation::setArguments(const QStringList &args) bool GetOperation::setArguments(const QStringList &args)

View File

@@ -39,7 +39,8 @@ QString RmKeysOperation::helpText() const
QString RmKeysOperation::argumentsHelpText() const QString RmKeysOperation::argumentsHelpText() const
{ {
return QLatin1String("A file (profiles, qtversions or toolchains) followed by one or more keys to remove.\n"); return QLatin1String("A file (relative to top-level settings directory and without .xml extension)\n"
"followed by one or more keys to remove.\n");
} }
bool RmKeysOperation::setArguments(const QStringList &args) bool RmKeysOperation::setArguments(const QStringList &args)

View File

@@ -70,7 +70,7 @@ Utils::FileName Settings::getPath(const QString &file)
else if (identical.contains(lowerFile)) else if (identical.contains(lowerFile))
result.appendPath(lowerFile); result.appendPath(lowerFile);
else else
return Utils::FileName(); result.appendPath(file); // handle arbitrary file names not known yet
result.appendString(".xml"); result.appendString(".xml");
return result; return result;
} }