Commit 6216552d authored by Marco Bubke's avatar Marco Bubke
Browse files

Fix compiler warnings

parent f933602c
......@@ -176,16 +176,16 @@ FormEditorItem* FormEditorItem::fromQGraphicsItem(QGraphicsItem *graphicsItem)
return qgraphicsitem_cast<FormEditorItem*>(graphicsItem);
}
static QRectF alignedRect(const QRectF &rect)
{
QRectF alignedRect(rect);
alignedRect.setTop(std::floor(rect.top()) + 0.5);
alignedRect.setBottom(std::floor(rect.bottom()) + 0.5);
alignedRect.setLeft(std::floor(rect.left()) + 0.5);
alignedRect.setRight(std::floor(rect.right()) + 0.5);
return alignedRect;
}
//static QRectF alignedRect(const QRectF &rect)
//{
// QRectF alignedRect(rect);
// alignedRect.setTop(std::floor(rect.top()) + 0.5);
// alignedRect.setBottom(std::floor(rect.bottom()) + 0.5);
// alignedRect.setLeft(std::floor(rect.left()) + 0.5);
// alignedRect.setRight(std::floor(rect.right()) + 0.5);
//
// return alignedRect;
//}
void FormEditorItem::paintBoundingRect(QPainter *painter) const
{
......@@ -208,7 +208,7 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
}
painter->setPen(pen);
int offset = m_borderWidth / 2;
// int offset = m_borderWidth / 2;
painter->drawRect(boundingRect().adjusted(0., 0., -1., -1.));
}
......
......@@ -69,16 +69,16 @@ void SelectionIndicator::clear()
m_indicatorShapeHash.clear();
}
static void alignVertices(QPolygonF &polygon, double factor)
{
QMutableVectorIterator<QPointF> iterator(polygon);
while (iterator.hasNext()) {
QPointF &vertex = iterator.next();
vertex.setX(std::floor(vertex.x()) + factor);
vertex.setY(std::floor(vertex.y()) + factor);
}
}
//static void alignVertices(QPolygonF &polygon, double factor)
//{
// QMutableVectorIterator<QPointF> iterator(polygon);
// while (iterator.hasNext()) {
// QPointF &vertex = iterator.next();
// vertex.setX(std::floor(vertex.x()) + factor);
// vertex.setY(std::floor(vertex.y()) + factor);
// }
//
//}
void SelectionIndicator::setItems(const QList<FormEditorItem*> &itemList)
{
......
......@@ -571,13 +571,13 @@ QList<QGraphicsItem*> Snapper::generateSnappingLines(const QRectF &boundingRect,
return generateSnappingLines(boundingRectList, layerItem, transform);
}
static void alignLine(QLineF &line)
{
line.setP1(QPointF(std::floor(line.p1().x()) + 0.5,
std::floor(line.p1().y()) + 0.5));
line.setP2(QPointF(std::floor(line.p2().x()) + 0.5,
std::floor(line.p2().y()) + 0.5));
}
//static void alignLine(QLineF &line)
//{
// line.setP1(QPointF(std::floor(line.p1().x()) + 0.5,
// std::floor(line.p1().y()) + 0.5));
// line.setP2(QPointF(std::floor(line.p2().x()) + 0.5,
// std::floor(line.p2().y()) + 0.5));
//}
QList<QGraphicsItem*> Snapper::generateSnappingLines(const QList<QRectF> &boundingRectList,
QGraphicsItem *layerItem,
......
......@@ -785,7 +785,7 @@ void WidgetLoader::setSource(const QUrl &source)
m_component = 0;
}
QWidget *oldWidget = m_widget;
// QWidget *oldWidget = m_widget;
if (m_widget) {
//m_widget->deleteLater();
......
......@@ -241,7 +241,7 @@ void ModelToTextMerger::applyChanges()
}
}
void ModelToTextMerger::reindent(const QMap<int, int> &dirtyAreas) const
void ModelToTextMerger::reindent(const QMap<int, int> &/*dirtyAreas*/) const
{
// QList<int> offsets = dirtyAreas.keys();
// qSort(offsets);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment