diff --git a/language/classmodel/documentclassesfolder.cpp b/language/classmodel/documentclassesfolder.cpp --- a/language/classmodel/documentclassesfolder.cpp +++ b/language/classmodel/documentclassesfolder.cpp @@ -230,7 +230,7 @@ const CodeModelItem& item = codeModelItems[codeModelItemIndex]; // Don't insert unknown or forward declarations into the class browser - if ( (item.kind & CodeModelItem::Unknown) || (item.kind & CodeModelItem::ForwardDeclaration) ) + if ( item.kind == CodeModelItem::Unknown || (item.kind & CodeModelItem::ForwardDeclaration) ) continue; KDevelop::QualifiedIdentifier id = item.id.identifier(); diff --git a/plugins/cvs/cvsproxy.cpp b/plugins/cvs/cvsproxy.cpp --- a/plugins/cvs/cvsproxy.cpp +++ b/plugins/cvs/cvsproxy.cpp @@ -185,7 +185,7 @@ return job; } - if (job) delete job; + delete job; return nullptr; } @@ -229,7 +229,7 @@ return job; } - if (job) delete job; + delete job; return nullptr; } @@ -250,7 +250,7 @@ return job; } - if (job) delete job; + delete job; return nullptr; } diff --git a/plugins/quickopen/expandingtree/expandingdelegate.cpp b/plugins/quickopen/expandingtree/expandingdelegate.cpp --- a/plugins/quickopen/expandingtree/expandingdelegate.cpp +++ b/plugins/quickopen/expandingtree/expandingdelegate.cpp @@ -131,7 +131,7 @@ QSize widgetSize = widget->size(); s.setHeight( widgetSize.height() + s.height() + 10 ); //10 is the sum that must match exactly the offsets used in ExpandingWidgetModel::placeExpandingWidgets - } else if( model()->isPartiallyExpanded( index ) ) { + } else if( model()->isPartiallyExpanded( index ) != 0) { s.setHeight( s.height() + 30 + 10 ); } return s; diff --git a/plugins/quickopen/expandingtree/expandingtree.cpp b/plugins/quickopen/expandingtree/expandingtree.cpp --- a/plugins/quickopen/expandingtree/expandingtree.cpp +++ b/plugins/quickopen/expandingtree/expandingtree.cpp @@ -40,7 +40,7 @@ QTreeView::drawRow( painter, option, index ); const ExpandingWidgetModel* eModel = qobject_cast(model()); - if( eModel && eModel->isPartiallyExpanded( index ) ) + if( eModel && eModel->isPartiallyExpanded( index ) != 0) { QRect rect = eModel->partialExpandRect( index ); if( rect.isValid() ) diff --git a/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp b/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp --- a/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp +++ b/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp @@ -345,7 +345,7 @@ } //Eventually partially expand the row - if( !expanded && firstColumn(treeView()->currentIndex()) == idx && !isPartiallyExpanded(idx) ) + if( !expanded && firstColumn(treeView()->currentIndex()) == idx && (isPartiallyExpanded(idx) == 0) ) rowSelected(idx); //Partially expand the row. emit dataChanged(idx, idx); diff --git a/plugins/testview/testview.cpp b/plugins/testview/testview.cpp --- a/plugins/testview/testview.cpp +++ b/plugins/testview/testview.cpp @@ -239,11 +239,10 @@ QStandardItem* TestView::itemForProject(IProject* project) { - foreach (QStandardItem* item, m_model->findItems(project->name())) - { - return item; + QList stditemlist = m_model->findItems(project->name()); + if (stditemlist.size() > 0) { + return stditemlist.at(0); } - return addProject(project); } diff --git a/shell/settings/sourceformattersettings.cpp b/shell/settings/sourceformattersettings.cpp --- a/shell/settings/sourceformattersettings.cpp +++ b/shell/settings/sourceformattersettings.cpp @@ -176,7 +176,6 @@ l.selectedStyle = styleIter.value(); } } - break; } if (!l.selectedFormatter) { Q_ASSERT(!l.formatters.empty());