src: clazy compiler warnings

get rid of most clazy warnings (https://github.com/KDE/clazy)
* range loop use refs
* qcolor ctor with ints
* missing Q_OBJECT macro
* use .constfirst instead of .first

enabled ccache for unix systems for fasterr recompiling
* if ccache is in path we use it now
This commit is contained in:
Andreas Stallinger
2017-08-10 09:45:55 +02:00
parent bb5c1d49b6
commit 37ead804bf
97 changed files with 339 additions and 344 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ void FileManager::update(
m_allSourceFilePaths.clear();
for (FileInfo fileInfo: FileSystem::getFileInfosFromPaths(m_sourcePaths, m_sourceExtensions))
for (const FileInfo& fileInfo : FileSystem::getFileInfosFromPaths(m_sourcePaths, m_sourceExtensions))
{
const FilePath& filePath = fileInfo.path;
if (isExcluded(filePath))
@@ -76,7 +76,7 @@ std::set<FilePath> FileManager::getAllSourceFilePathsRelative(const FilePath& ba
std::vector<FilePath> FileManager::makeCanonical(const std::vector<FilePath>& filePaths)
{
std::vector<FilePath> ret;
for (const FilePath filePath: filePaths)
for (const FilePath& filePath: filePaths)
{
ret.push_back(filePath.canonical());
}
@@ -85,7 +85,7 @@ std::vector<FilePath> FileManager::makeCanonical(const std::vector<FilePath>& fi
bool FileManager::isExcluded(const FilePath& filePath) const
{
for (FilePath path : m_excludePaths)
for (const FilePath& path : m_excludePaths)
{
if (path == filePath || path.contains(filePath))
{