OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95d2b06
)
replace break and falltrough with return in QMimeDataPrivate::getData()
author
Ivailo Monev
<xakepa10@laimg.moc>
Sat, 4 Jan 2020 22:55:48 +0000
(22:55 +0000)
committer
Ivailo Monev
<xakepa10@laimg.moc>
Sat, 4 Jan 2020 22:55:48 +0000
(22:55 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/kernel/qmimedata.cpp
patch
|
blob
|
history
diff --git
a/src/core/kernel/qmimedata.cpp
b/src/core/kernel/qmimedata.cpp
index
20b4105
..
fecd899
100644
(file)
--- a/
src/core/kernel/qmimedata.cpp
+++ b/
src/core/kernel/qmimedata.cpp
@@
-82,14
+82,12
@@
void QMimeDataPrivate::setData(const QString &format, const QVariant &data)
QVariant QMimeDataPrivate::getData(const QString &format) const
{
- QVariant data;
for (int i=0; i<dataList.size(); i++) {
if (dataList.at(i).format == format) {
- data = dataList.at(i).data;
- break;
+ return dataList.at(i).data;
}
}
- return
data
;
+ return
QVariant()
;
}
QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Type type) const