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
+16 -1
View File
@@ -4,6 +4,8 @@
#include "data/storage/PersistentStorage.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/messaging/type/MessageQuitApplication.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/scheduling/Blackboard.h"
#include "utility/utility.h"
#include "Application.h"
@@ -66,6 +68,19 @@ Task::TaskState TaskFinishParsing::doUpdate(std::shared_ptr<Blackboard> blackboa
bool interruptedIndexing = false;
blackboard->get("interrupted_indexing", interruptedIndexing);
ErrorCountInfo errorInfo = m_storageAccess->getErrorCount();
std::stringstream ss;
ss << "Finished indexing: ";
ss << indexedSourceFileCount << "/" << sourceFileCount << " source files indexed; ";
ss << utility::timeToString(time);
ss << "; " << errorInfo.total << " error" << (errorInfo.total != 1 ? "s" : "");
if (errorInfo.fatal > 0)
{
ss << " (" << errorInfo.fatal << " fatal)";
}
MessageStatus(ss.str(), false, false).dispatch();
StorageStats stats = m_storageAccess->getStorageStats();
dialogView->finishedIndexingDialog(
indexedSourceFileCount,
@@ -73,7 +88,7 @@ Task::TaskState TaskFinishParsing::doUpdate(std::shared_ptr<Blackboard> blackboa
stats.completedFileCount,
stats.fileCount,
time,
m_storageAccess->getErrorCount(),
errorInfo,
interruptedIndexing
);