CppTools: Move CppFilesSettingsPage closer to new setup

Including some drive-by cosmetics.

Change-Id: Id9cdba68545907b099a70944c83fe17ad3c0b2a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-02-04 16:24:37 +01:00
parent 674d342aa9
commit ea6da69e8b
5 changed files with 103 additions and 144 deletions

View File

@@ -89,23 +89,25 @@ void CppToolsPlugin::test_headersource_data()
void CppToolsPlugin::initTestCase()
{
QDir(baseTestDir()).mkpath(_("."));
m_fileSettings->headerSearchPaths.append(QLatin1String("include"));
m_fileSettings->headerSearchPaths.append(QLatin1String("../include"));
m_fileSettings->sourceSearchPaths.append(QLatin1String("src"));
m_fileSettings->sourceSearchPaths.append(QLatin1String("../src"));
m_fileSettings->headerPrefixes.append(QLatin1String("testh_"));
m_fileSettings->sourcePrefixes.append(QLatin1String("testc_"));
CppFileSettings *fs = fileSettings();
fs->headerSearchPaths.append(QLatin1String("include"));
fs->headerSearchPaths.append(QLatin1String("../include"));
fs->sourceSearchPaths.append(QLatin1String("src"));
fs->sourceSearchPaths.append(QLatin1String("../src"));
fs->headerPrefixes.append(QLatin1String("testh_"));
fs->sourcePrefixes.append(QLatin1String("testc_"));
}
void CppToolsPlugin::cleanupTestCase()
{
Utils::FileUtils::removeRecursively(Utils::FilePath::fromString(baseTestDir()));
m_fileSettings->headerSearchPaths.removeLast();
m_fileSettings->headerSearchPaths.removeLast();
m_fileSettings->sourceSearchPaths.removeLast();
m_fileSettings->sourceSearchPaths.removeLast();
m_fileSettings->headerPrefixes.removeLast();
m_fileSettings->sourcePrefixes.removeLast();
CppFileSettings *fs = fileSettings();
fs->headerSearchPaths.removeLast();
fs->headerSearchPaths.removeLast();
fs->sourceSearchPaths.removeLast();
fs->sourceSearchPaths.removeLast();
fs->headerPrefixes.removeLast();
fs->sourcePrefixes.removeLast();
}
} // namespace Internal