Optimization switch - macros Q_UNREACHABLE().
--HG-- branch : feature
This commit is contained in:
parent
79f2ddde2a
commit
9bc3660940
|
@ -174,6 +174,7 @@ QString DialogHistory::Record(const VToolRecord &tool)
|
|||
switch ( tool.getTypeTool() )
|
||||
{
|
||||
case Tool::ArrowTool:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
case Tool::SinglePointTool:
|
||||
{
|
||||
|
@ -435,16 +436,22 @@ QString DialogHistory::Record(const VToolRecord &tool)
|
|||
//Because "history" not only show history of pattern, but help restore current data for each pattern's piece, we
|
||||
//need add record about details and nodes, but don't show them.
|
||||
case Tool::Detail:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
case Tool::UnionDetails:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
case Tool::NodeArc:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
case Tool::NodePoint:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
case Tool::NodeSpline:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
case Tool::NodeSplinePath:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
default:
|
||||
qWarning()<<tr("Got wrong tool type. Ignore.");
|
||||
|
|
|
@ -426,7 +426,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
this->row = row;
|
||||
switch (column)
|
||||
{
|
||||
case 0:
|
||||
case 0: // name
|
||||
item = ui->tableWidgetIncrement->item(row, 0);
|
||||
id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
||||
domElement = doc->elementById(QString().setNum(id));
|
||||
|
@ -439,7 +439,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
emit haveLiteChange();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 2: // base
|
||||
itemName = ui->tableWidgetIncrement->item(row, 0);
|
||||
item = ui->tableWidgetIncrement->item(row, column);
|
||||
id = qvariant_cast<quint32>(itemName->data(Qt::UserRole));
|
||||
|
@ -461,7 +461,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case 3: // ksize
|
||||
itemName = ui->tableWidgetIncrement->item(row, 0);
|
||||
item = ui->tableWidgetIncrement->item(row, column);
|
||||
id = qvariant_cast<quint32>(itemName->data(Qt::UserRole));
|
||||
|
@ -474,7 +474,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
emit haveLiteChange();
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 4: // kgrowth
|
||||
itemName = ui->tableWidgetIncrement->item(row, 0);
|
||||
item = ui->tableWidgetIncrement->item(row, column);
|
||||
id = qvariant_cast<quint32>(itemName->data(Qt::UserRole));
|
||||
|
@ -487,7 +487,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
emit haveLiteChange();
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
case 5: // description
|
||||
itemName = ui->tableWidgetIncrement->item(row, 0);
|
||||
item = ui->tableWidgetIncrement->item(row, column);
|
||||
id = qvariant_cast<quint32>(itemName->data(Qt::UserRole));
|
||||
|
|
Loading…
Reference in New Issue
Block a user