[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdevplatform] /: Investigate warnings and fix where it's possible and needed (kdevplatform) [1]
From: Kevin Funk <kfunk () kde ! org>
Date: 2016-12-05 7:57:12
Message-ID: E1cDo9A-0005Vk-Tk () code ! kde ! org
[Download RAW message or body]
Git commit 4143fcf529d5becdfeba487d65225bada3821ee2 by Kevin Funk.
Committed on 05/12/2016 at 07:50.
Pushed by kfunk into branch 'master'.
Investigate warnings and fix where it's possible and needed (kdevplatform) [1]
Summary: Warning fixes for GCI task.
Reviewers: #kdevelop, kfunk, ematirov
Subscribers: kdevelop-devel
Differential Revision: https://phabricator.kde.org/D3580
M +1 -1 language/classmodel/documentclassesfolder.cpp
M +13 -13 plugins/cvs/cvsproxy.cpp
M +1 -1 plugins/quickopen/expandingtree/expandingdelegate.cpp
M +1 -1 plugins/quickopen/expandingtree/expandingtree.cpp
M +1 -1 plugins/quickopen/expandingtree/expandingwidgetmodel.cpp
M +3 -4 plugins/testview/testview.cpp
M +0 -1 shell/settings/sourceformattersettings.cpp
https://commits.kde.org/kdevplatform/4143fcf529d5becdfeba487d65225bada3821ee2
diff --git a/language/classmodel/documentclassesfolder.cpp \
b/language/classmodel/documentclassesfolder.cpp index 7fee4272c..67b616128 100644
--- a/language/classmodel/documentclassesfolder.cpp
+++ b/language/classmodel/documentclassesfolder.cpp
@@ -230,7 +230,7 @@ bool DocumentClassesFolder::updateDocument(const \
KDevelop::IndexedString& a_file 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
index 75e8f8053..287cb3efe 100644
--- a/plugins/cvs/cvsproxy.cpp
+++ b/plugins/cvs/cvsproxy.cpp
@@ -185,7 +185,7 @@ CvsJob* CvsProxy::log(const QUrl &url, const \
KDevelop::VcsRevision& rev)
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -229,7 +229,7 @@ CvsJob* CvsProxy::diff(const QUrl& url,
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -250,7 +250,7 @@ CvsJob * CvsProxy::annotate(const QUrl& url, const \
KDevelop::VcsRevision& rev)
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -265,7 +265,7 @@ CvsJob* CvsProxy::edit(const QString& repo, const QList<QUrl>& \
files)
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -281,7 +281,7 @@ CvsJob* CvsProxy::unedit(const QString& repo, const QList<QUrl>& \
files)
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -296,7 +296,7 @@ CvsJob* CvsProxy::editors(const QString& repo, const QList<QUrl>& \
files)
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -314,7 +314,7 @@ CvsJob* CvsProxy::commit(const QString& repo, const QList<QUrl>& \
files, const QS
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -336,7 +336,7 @@ CvsJob* CvsProxy::add(const QString& repo, const QList<QUrl>& \
files,
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -353,7 +353,7 @@ CvsJob * CvsProxy::remove(const QString& repo, const QList<QUrl>& \
files)
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -386,7 +386,7 @@ CvsJob * CvsProxy::update(const QString& repo, const QList<QUrl>& \
files,
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -412,7 +412,7 @@ CvsJob * CvsProxy::import(const QUrl& directory,
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -451,7 +451,7 @@ CvsJob * CvsProxy::checkout(const QUrl& targetDir,
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
@@ -474,7 +474,7 @@ CvsJob * CvsProxy::status(const QString & repo, const QList<QUrl> \
& files, bool
return job;
}
- if (job) delete job;
+ delete job;
return nullptr;
}
diff --git a/plugins/quickopen/expandingtree/expandingdelegate.cpp \
b/plugins/quickopen/expandingtree/expandingdelegate.cpp index cb6a3e391..024eb1fab \
100644
--- a/plugins/quickopen/expandingtree/expandingdelegate.cpp
+++ b/plugins/quickopen/expandingtree/expandingdelegate.cpp
@@ -131,7 +131,7 @@ QSize ExpandingDelegate::sizeHint ( const QStyleOptionViewItem & \
option, const Q 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 ) != \
ExpandingWidgetModel::ExpansionType::NotExpanded) { s.setHeight( s.height() + 30 + \
10 ); }
return s;
diff --git a/plugins/quickopen/expandingtree/expandingtree.cpp \
b/plugins/quickopen/expandingtree/expandingtree.cpp index 54682ddc3..aa4f5896e 100644
--- a/plugins/quickopen/expandingtree/expandingtree.cpp
+++ b/plugins/quickopen/expandingtree/expandingtree.cpp
@@ -40,7 +40,7 @@ void ExpandingTree::drawRow ( QPainter * painter, const \
QStyleOptionViewItem & o QTreeView::drawRow( painter, option, index );
const ExpandingWidgetModel* eModel = qobject_cast<const \
ExpandingWidgetModel*>(model());
- if( eModel && eModel->isPartiallyExpanded( index ) )
+ if( eModel && eModel->isPartiallyExpanded( index ) != \
ExpandingWidgetModel::ExpansionType::NotExpanded) {
QRect rect = eModel->partialExpandRect( index );
if( rect.isValid() )
diff --git a/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp \
b/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp index 4eaa3d242..0599bbe24 \
100644
--- a/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp
+++ b/plugins/quickopen/expandingtree/expandingwidgetmodel.cpp
@@ -345,7 +345,7 @@ void ExpandingWidgetModel::setExpanded(QModelIndex idx_, bool \
expanded) }
//Eventually partially expand the row
- if( !expanded && firstColumn(treeView()->currentIndex()) == idx && \
!isPartiallyExpanded(idx) ) + if( !expanded && \
firstColumn(treeView()->currentIndex()) == idx && (isPartiallyExpanded(idx) == \
ExpandingWidgetModel::ExpansionType::NotExpanded) ) rowSelected(idx); //Partially \
expand the row.
emit dataChanged(idx, idx);
diff --git a/plugins/testview/testview.cpp b/plugins/testview/testview.cpp
index eddfb3d50..e39085f0f 100644
--- a/plugins/testview/testview.cpp
+++ b/plugins/testview/testview.cpp
@@ -239,11 +239,10 @@ QStandardItem* TestView::itemForSuite(ITestSuite* suite)
QStandardItem* TestView::itemForProject(IProject* project)
{
- foreach (QStandardItem* item, m_model->findItems(project->name()))
- {
- return item;
+ QList<QStandardItem*> itemsForProject = m_model->findItems(project->name());
+ if (!itemsForProject.isEmpty()) {
+ return itemsForProject.first();
}
-
return addProject(project);
}
diff --git a/shell/settings/sourceformattersettings.cpp \
b/shell/settings/sourceformattersettings.cpp index 6395d807d..500d3a345 100644
--- a/shell/settings/sourceformattersettings.cpp
+++ b/shell/settings/sourceformattersettings.cpp
@@ -176,7 +176,6 @@ void SourceFormatterSettings::reset()
l.selectedStyle = styleIter.value();
}
}
- break;
}
if (!l.selectedFormatter) {
Q_ASSERT(!l.formatters.empty());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic