forked from qt-creator/qt-creator
QDoc: Fix QDoc warnings
This patch fixes ~1100 warnings from qdoc Change-Id: Ia9555db675acbf8083b2f87d9855a62a3a34ccb9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
@@ -91,32 +91,32 @@ public:
|
||||
the variable its value when requested. A typical setup is to
|
||||
|
||||
\list 1
|
||||
\o Register the variables in ExtensionSystem::IPlugin::initialize():
|
||||
\code
|
||||
static const char kMyVariable[] = "MyVariable";
|
||||
\li Register the variables in ExtensionSystem::IPlugin::initialize():
|
||||
\code
|
||||
static const char kMyVariable[] = "MyVariable";
|
||||
|
||||
bool MyPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
[...]
|
||||
VariableManager::registerVariable(kMyVariable, tr("The current value of whatever I want."));
|
||||
connect(VariableManager::instance(), SIGNAL(variableUpdateRequested(QByteArray)),
|
||||
this, SLOT(updateVariable(QByteArray)));
|
||||
[...]
|
||||
}
|
||||
\endcode
|
||||
bool MyPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
[...]
|
||||
VariableManager::registerVariable(kMyVariable, tr("The current value of whatever I want."));
|
||||
connect(VariableManager::instance(), SIGNAL(variableUpdateRequested(QByteArray)),
|
||||
this, SLOT(updateVariable(QByteArray)));
|
||||
[...]
|
||||
}
|
||||
\endcode
|
||||
|
||||
\o Set the variable value when requested:
|
||||
\code
|
||||
void MyPlugin::updateVariable(const QByteArray &variable)
|
||||
{
|
||||
if (variable == kMyVariable) {
|
||||
QString value;
|
||||
// do whatever is necessary to retrieve the value
|
||||
[...]
|
||||
VariableManager::insert(variable, value);
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
\li Set the variable value when requested:
|
||||
\code
|
||||
void MyPlugin::updateVariable(const QByteArray &variable)
|
||||
{
|
||||
if (variable == kMyVariable) {
|
||||
QString value;
|
||||
// do whatever is necessary to retrieve the value
|
||||
[...]
|
||||
VariableManager::insert(variable, value);
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
\endlist
|
||||
|
||||
If there are conditions where your variable is not valid, you should call
|
||||
@@ -159,20 +159,20 @@ public:
|
||||
There are several different ways to expand a string, covering the different use cases,
|
||||
listed here sorted by relevance:
|
||||
\list
|
||||
\o Using VariableManager::expandedString(). This is the most comfortable way to get a string
|
||||
with variable values expanded, but also the least flexible one. If this is sufficient for
|
||||
you, use it.
|
||||
\o Using the Utils::expandMacros() methods. These take a string and a macro expander (for which
|
||||
you would use the one provided by the variable manager). Mostly the same as
|
||||
VariableManager::expandedString(), but also has a variant that does the replacement inline
|
||||
instead of returning a new string.
|
||||
\o Using Utils::QtcProcess::expandMacros(). This expands the string while conforming to the
|
||||
quoting rules of the platform it is run on. Use this method with the variable manager's
|
||||
macro expander if your string will be passed as a command line parameter string to an
|
||||
external command.
|
||||
\o Writing your own macro expander that nests the variable manager's macro expander. And then
|
||||
doing one of the above. This allows you to expand additional "local" variables/macros,
|
||||
that do not come from the variable manager.
|
||||
\li Using VariableManager::expandedString(). This is the most comfortable way to get a string
|
||||
with variable values expanded, but also the least flexible one. If this is sufficient for
|
||||
you, use it.
|
||||
\li Using the Utils::expandMacros() methods. These take a string and a macro expander (for which
|
||||
you would use the one provided by the variable manager). Mostly the same as
|
||||
VariableManager::expandedString(), but also has a variant that does the replacement inline
|
||||
instead of returning a new string.
|
||||
\li Using Utils::QtcProcess::expandMacros(). This expands the string while conforming to the
|
||||
quoting rules of the platform it is run on. Use this method with the variable manager's
|
||||
macro expander if your string will be passed as a command line parameter string to an
|
||||
external command.
|
||||
\li Writing your own macro expander that nests the variable manager's macro expander. And then
|
||||
doing one of the above. This allows you to expand additional "local" variables/macros,
|
||||
that do not come from the variable manager.
|
||||
\endlist
|
||||
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user