forked from qt-creator/qt-creator
GccToolChain: Invalidate caches on toolchain changes
Change-Id: I91a69631d0417beb35574a5725da6b5a5e411113 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -177,6 +177,13 @@ QList<HeaderPath> GccToolChain::gccHeaderPaths(const FileName &gcc, const QStrin
|
|||||||
return systemHeaderPaths;
|
return systemHeaderPaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GccToolChain::toolChainUpdated()
|
||||||
|
{
|
||||||
|
m_predefinedMacrosCache->invalidate();
|
||||||
|
m_headerPathsCache->invalidate();
|
||||||
|
ToolChain::toolChainUpdated();
|
||||||
|
}
|
||||||
|
|
||||||
static QList<Abi> guessGccAbi(const QString &m, const ProjectExplorer::Macros ¯os)
|
static QList<Abi> guessGccAbi(const QString &m, const ProjectExplorer::Macros ¯os)
|
||||||
{
|
{
|
||||||
QList<Abi> abiList;
|
QList<Abi> abiList;
|
||||||
|
|||||||
@@ -104,6 +104,12 @@ public:
|
|||||||
return checkImpl(compilerArguments);
|
return checkImpl(compilerArguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void invalidate()
|
||||||
|
{
|
||||||
|
QMutexLocker locker(&m_mutex);
|
||||||
|
m_cache.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Utils::optional<T> checkImpl(const QStringList &compilerArguments)
|
Utils::optional<T> checkImpl(const QStringList &compilerArguments)
|
||||||
{
|
{
|
||||||
@@ -217,6 +223,7 @@ protected:
|
|||||||
bool m_doesEnable = false;
|
bool m_doesEnable = false;
|
||||||
bool m_triggered = false;
|
bool m_triggered = false;
|
||||||
};
|
};
|
||||||
|
void toolChainUpdated() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit GccToolChain(Detection d);
|
explicit GccToolChain(Detection d);
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ protected:
|
|||||||
explicit ToolChain(Core::Id typeId, Detection d);
|
explicit ToolChain(Core::Id typeId, Detection d);
|
||||||
explicit ToolChain(const ToolChain &);
|
explicit ToolChain(const ToolChain &);
|
||||||
|
|
||||||
void toolChainUpdated();
|
virtual void toolChainUpdated();
|
||||||
|
|
||||||
// Make sure to call this function when deriving!
|
// Make sure to call this function when deriving!
|
||||||
virtual bool fromMap(const QVariantMap &data);
|
virtual bool fromMap(const QVariantMap &data);
|
||||||
|
|||||||
Reference in New Issue
Block a user