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
+5 -5
View File
@@ -47,7 +47,7 @@ QtCodeFile* QtCodeFileList::getFile(const FilePath filePath)
{
QtCodeFile* file = nullptr;
for (std::shared_ptr<QtCodeFile> filePtr : m_files)
for (const std::shared_ptr<QtCodeFile>& filePtr : m_files)
{
if (filePtr->getFilePath() == filePath)
{
@@ -177,7 +177,7 @@ bool QtCodeFileList::requestScroll(const FilePath& filePath, uint lineNumber, Id
void QtCodeFileList::updateFiles()
{
for (std::shared_ptr<QtCodeFile> file : m_files)
for (const std::shared_ptr<QtCodeFile>& file : m_files)
{
file->updateContent();
}
@@ -185,7 +185,7 @@ void QtCodeFileList::updateFiles()
void QtCodeFileList::showContents()
{
for (std::shared_ptr<QtCodeFile> filePtr : m_files)
for (const std::shared_ptr<QtCodeFile>& filePtr : m_files)
{
filePtr->show();
}
@@ -193,7 +193,7 @@ void QtCodeFileList::showContents()
void QtCodeFileList::onWindowFocus()
{
for (std::shared_ptr<QtCodeFile> filePtr : m_files)
for (const std::shared_ptr<QtCodeFile>& filePtr : m_files)
{
filePtr->updateTitleBar();
}
@@ -218,7 +218,7 @@ std::pair<QtCodeSnippet*, Id> QtCodeFileList::getFirstSnippetWithActiveLocationI
{
std::pair<QtCodeSnippet*, Id> result(nullptr, 0);
for (std::shared_ptr<QtCodeFile> filePtr : m_files)
for (const std::shared_ptr<QtCodeFile>& filePtr : m_files)
{
if (filePtr->isCollapsed())
{