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
+8 -8
View File
@@ -206,13 +206,13 @@ void QtGraphView::activateEdge(Id edgeId, bool centerOrigin)
m_onQtThread(
[=]()
{
for (std::shared_ptr<QtGraphEdge> edge : m_oldEdges)
for (std::shared_ptr<QtGraphEdge>& edge : m_oldEdges)
{
edge->setIsActive(false);
edge->setIsFocused(false);
}
for (std::shared_ptr<QtGraphEdge> edge : m_oldEdges)
for (std::shared_ptr<QtGraphEdge>& edge : m_oldEdges)
{
if (edge->getData() && edge->getData()->getId() == edgeId)
{
@@ -264,7 +264,7 @@ void QtGraphView::finishedTransition()
void QtGraphView::clickedInEmptySpace()
{
std::vector<std::shared_ptr<QtGraphEdge>> activeEdges;
for (std::shared_ptr<QtGraphEdge> edge : m_oldEdges)
for (std::shared_ptr<QtGraphEdge>& edge : m_oldEdges)
{
if (edge->getIsActive())
{
@@ -276,7 +276,7 @@ void QtGraphView::clickedInEmptySpace()
if (m_graph && m_graph->getTrailMode() != Graph::TRAIL_NONE)
{
for (std::shared_ptr<QtGraphEdge> edge : activeEdges)
for (std::shared_ptr<QtGraphEdge>& edge : activeEdges)
{
edge->setIsActive(false);
}
@@ -639,14 +639,14 @@ void QtGraphView::doRebuildGraph(
// create edges
Graph::TrailMode trailMode = m_graph ? m_graph->getTrailMode() : Graph::TRAIL_NONE;
std::set<Id> visibleEdgeIds;
for (const std::shared_ptr<DummyEdge> edge : edges)
for (const std::shared_ptr<DummyEdge>& edge : edges)
{
if (!edge->data || !edge->data->isType(Edge::EDGE_AGGREGATION))
{
createEdge(view, edge.get(), &visibleEdgeIds, trailMode, offset, params.bezierEdges);
}
}
for (const std::shared_ptr<DummyEdge> edge : edges)
for (const std::shared_ptr<DummyEdge>& edge : edges)
{
if (edge->data && edge->data->isType(Edge::EDGE_AGGREGATION))
{
@@ -1025,7 +1025,7 @@ void QtGraphView::createTransition()
vanish->addAnimation(anim);
}
for (std::shared_ptr<QtGraphEdge> edge : m_oldEdges)
for (const std::shared_ptr<QtGraphEdge>& edge : m_oldEdges)
{
QPropertyAnimation* anim = new QPropertyAnimation(edge.get(), "opacity");
anim->setDuration(150);
@@ -1105,7 +1105,7 @@ void QtGraphView::createTransition()
node->blendOut();
}
for (std::shared_ptr<QtGraphEdge> edge : m_edges)
for (const std::shared_ptr<QtGraphEdge>& edge : m_edges)
{
QPropertyAnimation* anim = new QPropertyAnimation(edge.get(), "opacity");
anim->setDuration(150);