Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
6216552d
Commit
6216552d
authored
Jan 07, 2010
by
Marco Bubke
Browse files
Fix compiler warnings
parent
f933602c
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
View file @
6216552d
...
...
@@ -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.
));
}
...
...
src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp
View file @
6216552d
...
...
@@ -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
)
{
...
...
src/plugins/qmldesigner/components/formeditor/snapper.cpp
View file @
6216552d
...
...
@@ -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
,
...
...
src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp
View file @
6216552d
...
...
@@ -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();
...
...
src/plugins/qmldesigner/core/model/modeltotextmerger.cpp
View file @
6216552d
...
...
@@ -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);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment