ModelEditor: Fix use of Q_UNUSED

Change-Id: I379c9f0cd3ccc9fe4ef51c29ddd9de2b87b3e6c1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Jochen Becher
2015-11-12 20:41:02 +01:00
parent adb24b74bb
commit a441513596
5 changed files with 3 additions and 12 deletions

View File

@@ -454,7 +454,6 @@ bool DiagramController::hasDelegate(const MElement *modelElement, const MDiagram
DElement *DiagramController::findDelegate(const MElement *modelElement, const MDiagram *diagram) const
{
Q_UNUSED(diagram);
// PERFORM use map to increase performance
foreach (DElement *diagramElement, diagram->diagramElements()) {
if (diagramElement->modelUid().isValid() && diagramElement->modelUid() == modelElement->uid()) {

View File

@@ -73,8 +73,6 @@ public:
void visitDInheritance(const DInheritance *inheritance)
{
Q_UNUSED(inheritance);
DObject *baseObject = m_diagramSceneModel->diagramController()->findElement<DObject>(inheritance->base(), m_diagramSceneModel->diagram());
QMT_CHECK(baseObject);
bool baseIsInterface = baseObject->stereotypes().contains(QStringLiteral("interface"));
@@ -103,8 +101,6 @@ public:
void visitDDependency(const DDependency *dependency)
{
Q_UNUSED(dependency);
ArrowItem::Head endAHead = ArrowItem::HeadNone;
ArrowItem::Head endBHead = ArrowItem::HeadNone;
bool isRealization = dependency->stereotypes().contains(QStringLiteral("realize"));
@@ -132,8 +128,6 @@ public:
void visitDAssociation(const DAssociation *association)
{
Q_UNUSED(association);
m_arrow->setShaft(ArrowItem::ShaftSolid);
m_arrow->setArrowSize(12.0);
m_arrow->setDiamondSize(12.0);

View File

@@ -77,7 +77,7 @@ public:
void mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_UNUSED(event;)
Q_UNUSED(event);
}
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)

View File

@@ -282,8 +282,6 @@ void PathSelectionItem::update()
void PathSelectionItem::moveHandle(int pointIndex, const QPointF &deltaMove, HandleStatus handleStatus, HandleQualifier handleQualifier)
{
Q_UNUSED(handleStatus);
switch (handleQualifier) {
case None:
{

View File

@@ -279,7 +279,7 @@ QString typeUid()
template<class T>
QString typeUid(const T &t)
{
Q_UNUSED(t);
Q_UNUSED(t); // avoid warning in some compilers
#if !defined(QT_NO_DEBUG) // avoid warning about unused function ::hasNameToUidMap in Qt >= 5.5
QMT_CHECK_X((registry::TypeNameRegistry<T>::hasNameToUidMap()), "typeUid<T>()", "type maps are not correctly initialized");
QMT_CHECK_X((registry::TypeNameRegistry<T>::nameToUidMap().contains(QLatin1String(typeid(t).name()))), "typeUid<T>()",
@@ -291,7 +291,7 @@ QString typeUid(const T &t)
template<class Archive, class T>
typename registry::TypeRegistry<Archive, T>::TypeInfo typeInfo(const T &t)
{
Q_UNUSED(t);
Q_UNUSED(t); // avoid warning in some compilers
#if !defined(QT_NO_DEBUG) // avoid warning about unused function ::hasNameToUidMap in Qt >= 5.5
QMT_CHECK_X((registry::TypeRegistry<Archive,T>::hasMap()),
qPrintable(QString(QLatin1String("TypeRegistry<Archive, %1>::typeInfo(const T&)")).arg(typeUid<T>())),