forked from qt-creator/qt-creator
Client: Block until editor is closed
Change-Id: I06bd4425008103be3a4c8f64b6dff8f7df30c552 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
225c21a0f2
commit
14e35b5dc4
@@ -532,13 +532,16 @@ static QStringList subList(const QStringList &in, const QString &key)
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn PluginManager::remoteArguments(const QString &argument)
|
||||
\fn PluginManager::remoteArguments(const QString &argument, QObject *socket)
|
||||
|
||||
Parses the options encoded by serializedArguments() const
|
||||
and passes them on to the respective plugins along with the arguments.
|
||||
|
||||
\a socket is passed for disconnecting the peer when the operation is done (for example,
|
||||
document is closed) for supporting the -block flag.
|
||||
*/
|
||||
|
||||
void PluginManager::remoteArguments(const QString &serializedArgument)
|
||||
void PluginManager::remoteArguments(const QString &serializedArgument, QObject *socket)
|
||||
{
|
||||
if (serializedArgument.isEmpty())
|
||||
return;
|
||||
@@ -547,9 +550,15 @@ void PluginManager::remoteArguments(const QString &serializedArgument)
|
||||
foreach (const PluginSpec *ps, plugins()) {
|
||||
if (ps->state() == PluginSpec::Running) {
|
||||
const QStringList pluginOptions = subList(serializedArguments, QLatin1Char(':') + ps->name());
|
||||
ps->plugin()->remoteCommand(pluginOptions, arguments);
|
||||
QObject *socketParent = ps->plugin()->remoteCommand(pluginOptions, arguments);
|
||||
if (socketParent && socket) {
|
||||
socket->setParent(socketParent);
|
||||
socket = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (socket)
|
||||
delete socket;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user