CMake: Semi-automatic cleanups

* Shorten header guards
* Use override and auto where possible
* Remove useless destructors, etc.
* Remove private slots sections, unify private: sections
* Use member initialization where it makes sense

Change-Id: I00eaf6d706adc16859176d1b68c631d3336bb39f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-01-07 15:22:53 +01:00
parent 079448d342
commit b2b6d3c526
41 changed files with 222 additions and 306 deletions

View File

@@ -48,23 +48,17 @@ const char CMAKE_INFORMATION_AUTODETECTED[] = "AutoDetected";
///////////////////////////
// CMakeTool
///////////////////////////
CMakeTool::CMakeTool(Detection d, const Core::Id &id)
: m_state(Invalid), m_process(0),
m_isAutoDetected(d == AutoDetection),
m_hasCodeBlocksMsvcGenerator(false),
m_hasCodeBlocksNinjaGenerator(false),
m_id(id)
CMakeTool::CMakeTool(Detection d, const Core::Id &id) :
m_isAutoDetected(d == AutoDetection),
m_id(id)
{
//make sure every CMakeTool has a valid ID
if (!m_id.isValid())
createId();
}
CMakeTool::CMakeTool(const QVariantMap &map, bool fromSdk)
: m_state(Invalid), m_process(0),
m_isAutoDetected(fromSdk),
m_hasCodeBlocksMsvcGenerator(false),
m_hasCodeBlocksNinjaGenerator(false)
CMakeTool::CMakeTool(const QVariantMap &map, bool fromSdk) :
m_isAutoDetected(fromSdk)
{
m_id = Core::Id::fromSetting(map.value(QLatin1String(CMAKE_INFORMATION_ID)));
m_displayName = map.value(QLatin1String(CMAKE_INFORMATION_DISPLAYNAME)).toString();