forked from qt-creator/qt-creator
Remove ExtraCompilerFactoryObserver
Was only used by PchManager. Change-Id: I610c1d4215613eb494e48225329660c1e2680d49 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -53,7 +53,7 @@ namespace ProjectExplorer {
|
|||||||
|
|
||||||
Q_GLOBAL_STATIC(QThreadPool, s_extraCompilerThreadPool);
|
Q_GLOBAL_STATIC(QThreadPool, s_extraCompilerThreadPool);
|
||||||
Q_GLOBAL_STATIC(QList<ExtraCompilerFactory *>, factories);
|
Q_GLOBAL_STATIC(QList<ExtraCompilerFactory *>, factories);
|
||||||
Q_GLOBAL_STATIC(QVector<ExtraCompilerFactoryObserver *>, observers);
|
|
||||||
class ExtraCompilerPrivate
|
class ExtraCompilerPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -322,14 +322,6 @@ ExtraCompilerFactory::~ExtraCompilerFactory()
|
|||||||
factories->removeAll(this);
|
factories->removeAll(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtraCompilerFactory::annouceCreation(const Project *project,
|
|
||||||
const Utils::FilePath &source,
|
|
||||||
const Utils::FilePaths &targets)
|
|
||||||
{
|
|
||||||
for (ExtraCompilerFactoryObserver *observer : qAsConst(*observers))
|
|
||||||
observer->newExtraCompiler(project, source, targets);
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<ExtraCompilerFactory *> ExtraCompilerFactory::extraCompilerFactories()
|
QList<ExtraCompilerFactory *> ExtraCompilerFactory::extraCompilerFactories()
|
||||||
{
|
{
|
||||||
return *factories();
|
return *factories();
|
||||||
@@ -465,14 +457,4 @@ void ProcessExtraCompiler::cleanUp()
|
|||||||
setCompileTime(QDateTime::currentDateTime());
|
setCompileTime(QDateTime::currentDateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtraCompilerFactoryObserver::ExtraCompilerFactoryObserver()
|
|
||||||
{
|
|
||||||
observers->push_back(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtraCompilerFactoryObserver::~ExtraCompilerFactoryObserver()
|
|
||||||
{
|
|
||||||
observers->removeOne(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
|||||||
@@ -143,20 +143,6 @@ private:
|
|||||||
QFutureWatcher<FileNameToContentsHash> *m_watcher = nullptr;
|
QFutureWatcher<FileNameToContentsHash> *m_watcher = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ExtraCompilerFactoryObserver
|
|
||||||
{
|
|
||||||
friend class ExtraCompilerFactory;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
ExtraCompilerFactoryObserver();
|
|
||||||
~ExtraCompilerFactoryObserver();
|
|
||||||
|
|
||||||
virtual void newExtraCompiler(const Project *project,
|
|
||||||
const Utils::FilePath &source,
|
|
||||||
const Utils::FilePaths &targets)
|
|
||||||
= 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ExtraCompilerFactory : public QObject
|
class PROJECTEXPLORER_EXPORT ExtraCompilerFactory : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -172,10 +158,6 @@ public:
|
|||||||
const Utils::FilePaths &targets)
|
const Utils::FilePaths &targets)
|
||||||
= 0;
|
= 0;
|
||||||
|
|
||||||
void annouceCreation(const Project *project,
|
|
||||||
const Utils::FilePath &source,
|
|
||||||
const Utils::FilePaths &targets);
|
|
||||||
|
|
||||||
static QList<ExtraCompilerFactory *> extraCompilerFactories();
|
static QList<ExtraCompilerFactory *> extraCompilerFactories();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -146,8 +146,6 @@ ExtraCompiler *QScxmlcGeneratorFactory::create(
|
|||||||
const Project *project, const Utils::FilePath &source,
|
const Project *project, const Utils::FilePath &source,
|
||||||
const Utils::FilePaths &targets)
|
const Utils::FilePaths &targets)
|
||||||
{
|
{
|
||||||
annouceCreation(project, source, targets);
|
|
||||||
|
|
||||||
return new QScxmlcGenerator(project, source, targets, this);
|
return new QScxmlcGenerator(project, source, targets, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,8 +107,6 @@ ExtraCompiler *UicGeneratorFactory::create(const Project *project,
|
|||||||
const Utils::FilePath &source,
|
const Utils::FilePath &source,
|
||||||
const Utils::FilePaths &targets)
|
const Utils::FilePaths &targets)
|
||||||
{
|
{
|
||||||
annouceCreation(project, source, targets);
|
|
||||||
|
|
||||||
return new UicGenerator(project, source, targets, this);
|
return new UicGenerator(project, source, targets, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user