forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.9'
Change-Id: I7bdb6a4658c5fca1a7e1dda5adbb5613dabc6d18
This commit is contained in:
@@ -52,7 +52,7 @@ namespace ProjectExplorer {
|
||||
|
||||
Q_GLOBAL_STATIC(QThreadPool, s_extraCompilerThreadPool);
|
||||
Q_GLOBAL_STATIC(QList<ExtraCompilerFactory *>, factories);
|
||||
|
||||
Q_GLOBAL_STATIC(QVector<ExtraCompilerFactoryObserver *>, observers);
|
||||
class ExtraCompilerPrivate
|
||||
{
|
||||
public:
|
||||
@@ -310,7 +310,8 @@ void ExtraCompiler::setContent(const Utils::FileName &file, const QByteArray &co
|
||||
}
|
||||
}
|
||||
|
||||
ExtraCompilerFactory::ExtraCompilerFactory(QObject *parent) : QObject(parent)
|
||||
ExtraCompilerFactory::ExtraCompilerFactory(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
factories->append(this);
|
||||
}
|
||||
@@ -320,6 +321,14 @@ ExtraCompilerFactory::~ExtraCompilerFactory()
|
||||
factories->removeAll(this);
|
||||
}
|
||||
|
||||
void ExtraCompilerFactory::annouceCreation(const Project *project,
|
||||
const Utils::FileName &source,
|
||||
const Utils::FileNameList &targets)
|
||||
{
|
||||
for (ExtraCompilerFactoryObserver *observer : *observers)
|
||||
observer->newExtraCompiler(project, source, targets);
|
||||
}
|
||||
|
||||
QList<ExtraCompilerFactory *> ExtraCompilerFactory::extraCompilerFactories()
|
||||
{
|
||||
return *factories();
|
||||
@@ -455,4 +464,14 @@ void ProcessExtraCompiler::cleanUp()
|
||||
setCompileTime(QDateTime::currentDateTime());
|
||||
}
|
||||
|
||||
ExtraCompilerFactoryObserver::ExtraCompilerFactoryObserver()
|
||||
{
|
||||
observers->push_back(this);
|
||||
}
|
||||
|
||||
ExtraCompilerFactoryObserver::~ExtraCompilerFactoryObserver()
|
||||
{
|
||||
observers->removeOne(this);
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user