fix Coverity issues
This commit is contained in:
@@ -272,7 +272,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
|
||||
const App::PropertyString * stringProp = static_cast<const App::PropertyString*>(prop);
|
||||
|
||||
switch (role) {
|
||||
case Qt::TextColorRole:
|
||||
case Qt::TextColorRole: // dead code!
|
||||
return QVariant::fromValue(QColor(Qt::black));
|
||||
case Qt::DisplayRole:
|
||||
return QVariant(QString::fromUtf8(stringProp->getValue()));
|
||||
@@ -296,7 +296,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
|
||||
const App::PropertyQuantity * floatProp = static_cast<const App::PropertyQuantity*>(prop);
|
||||
|
||||
switch (role) {
|
||||
case Qt::TextColorRole:
|
||||
case Qt::TextColorRole: // dead code!
|
||||
if (floatProp->getValue() < 0)
|
||||
return QVariant::fromValue(QColor(Qt::red));
|
||||
else
|
||||
@@ -341,7 +341,7 @@ QVariant SheetModel::data(const QModelIndex &index, int role) const
|
||||
const App::PropertyFloat * floatProp = static_cast<const App::PropertyFloat*>(prop);
|
||||
|
||||
switch (role) {
|
||||
case Qt::TextColorRole:
|
||||
case Qt::TextColorRole: // dead code!
|
||||
if (floatProp->getValue() < 0)
|
||||
return QVariant::fromValue(QColor(Qt::red));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user