forked from qt-creator/qt-creator
Mercurial: Emit version control changed() signals correctly.
Add a QVariant cookie to HgTask to be emitted on successful execution, wired to IVersionControl.
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include "mercurialclient.h"
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
using namespace Mercurial::Internal;
|
||||
|
||||
@@ -107,3 +109,17 @@ bool MercurialControl::sccManaged(const QString &filename)
|
||||
{
|
||||
return mercurialClient->manifestSync(filename);
|
||||
}
|
||||
|
||||
void MercurialControl::changed(const QVariant &v)
|
||||
{
|
||||
switch (v.type()) {
|
||||
case QVariant::String:
|
||||
emit repositoryChanged(v.toString());
|
||||
break;
|
||||
case QVariant::StringList:
|
||||
emit filesChanged(v.toStringList());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user