ProjectExplorer: Drop Detection argument from ToolChain constructor

This was used wildly inconsistently. Use a setter instead in
circumstances where the context is reasonably clear.

The assumption is that this will always be done at some time in all
code paths.

Use a new 'Uninitialized' value to avoid triggering the first update.

Change-Id: I82c38cb9da3ccdbd8fbae8beefcbfa0e559ff794
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-05-08 19:03:15 +02:00
parent 33c4dd8383
commit d116559cd8
25 changed files with 152 additions and 129 deletions

View File

@@ -39,12 +39,12 @@ using namespace Utils;
namespace Nim {
NimToolChain::NimToolChain(ToolChain::Detection d)
: NimToolChain(Constants::C_NIMTOOLCHAIN_TYPEID, d)
NimToolChain::NimToolChain()
: NimToolChain(Constants::C_NIMTOOLCHAIN_TYPEID)
{}
NimToolChain::NimToolChain(Core::Id typeId, ToolChain::Detection d)
: ToolChain(typeId, d)
NimToolChain::NimToolChain(Core::Id typeId)
: ToolChain(typeId)
, m_compilerCommand(FileName())
, m_version(std::make_tuple(-1,-1,-1))
{
@@ -52,7 +52,7 @@ NimToolChain::NimToolChain(Core::Id typeId, ToolChain::Detection d)
}
NimToolChain::NimToolChain(const NimToolChain &other)
: ToolChain(other.typeId(), other.detection())
: ToolChain(other.typeId())
, m_compilerCommand(other.m_compilerCommand)
, m_version(other.m_version)
{