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:
Eike Ziller
2021-06-28 11:57:08 +02:00
parent d97c10a42e
commit bb195a95c7
4 changed files with 1 additions and 41 deletions

View File

@@ -53,7 +53,7 @@ namespace ProjectExplorer {
Q_GLOBAL_STATIC(QThreadPool, s_extraCompilerThreadPool);
Q_GLOBAL_STATIC(QList<ExtraCompilerFactory *>, factories);
Q_GLOBAL_STATIC(QVector<ExtraCompilerFactoryObserver *>, observers);
class ExtraCompilerPrivate
{
public:
@@ -322,14 +322,6 @@ ExtraCompilerFactory::~ExtraCompilerFactory()
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()
{
return *factories();
@@ -465,14 +457,4 @@ void ProcessExtraCompiler::cleanUp()
setCompileTime(QDateTime::currentDateTime());
}
ExtraCompilerFactoryObserver::ExtraCompilerFactoryObserver()
{
observers->push_back(this);
}
ExtraCompilerFactoryObserver::~ExtraCompilerFactoryObserver()
{
observers->removeOne(this);
}
} // namespace ProjectExplorer

View File

@@ -143,20 +143,6 @@ private:
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
{
Q_OBJECT
@@ -172,10 +158,6 @@ public:
const Utils::FilePaths &targets)
= 0;
void annouceCreation(const Project *project,
const Utils::FilePath &source,
const Utils::FilePaths &targets);
static QList<ExtraCompilerFactory *> extraCompilerFactories();
};

View File

@@ -146,8 +146,6 @@ ExtraCompiler *QScxmlcGeneratorFactory::create(
const Project *project, const Utils::FilePath &source,
const Utils::FilePaths &targets)
{
annouceCreation(project, source, targets);
return new QScxmlcGenerator(project, source, targets, this);
}

View File

@@ -107,8 +107,6 @@ ExtraCompiler *UicGeneratorFactory::create(const Project *project,
const Utils::FilePath &source,
const Utils::FilePaths &targets)
{
annouceCreation(project, source, targets);
return new UicGenerator(project, source, targets, this);
}