summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-09-28 12:27:40 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-29 06:12:09 (GMT)
commit66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3 (patch)
tree0984d6a3680374b6c13daf2d0c1cc78e4660d268 /tools/designer
parent619136931e2c985377348d196d488e429a4858d6 (diff)
downloadQt-66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3.zip
Qt-66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3.tar.gz
Qt-66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3.tar.bz2
Fix gcc 4.6 warnings about assigned/unused variables in Qt Designer.
Change-Id: Ic983e09769c812412defd6f84298770235c3ed48 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/formeditor/formwindow.cpp2
-rw-r--r--tools/designer/src/components/formeditor/widgetselection.cpp2
-rw-r--r--tools/designer/src/designer/qdesigner_workbench.cpp1
-rw-r--r--tools/designer/src/lib/shared/connectionedit.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_dnditem.cpp1
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu.cpp1
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menubar.cpp1
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp6
8 files changed, 1 insertions, 15 deletions
diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp
index 5e017b5..dd17ee8 100644
--- a/tools/designer/src/components/formeditor/formwindow.cpp
+++ b/tools/designer/src/components/formeditor/formwindow.cpp
@@ -2178,7 +2178,7 @@ void FormWindow::layoutContainer(QWidget *w, int type)
// find managed widget children
QWidgetList widgets;
const QObjectList::const_iterator ocend = l.constEnd();
- for (QObjectList::const_iterator it = l.constBegin(); it != l.constEnd(); ++it)
+ for (QObjectList::const_iterator it = l.constBegin(); it != ocend; ++it)
if ( (*it)->isWidgetType() ) {
QWidget *widget = static_cast<QWidget*>(*it);
if (widget->isVisibleTo(this) && isManaged(widget))
diff --git a/tools/designer/src/components/formeditor/widgetselection.cpp b/tools/designer/src/components/formeditor/widgetselection.cpp
index 376c2f9..62cf3c9 100644
--- a/tools/designer/src/components/formeditor/widgetselection.cpp
+++ b/tools/designer/src/components/formeditor/widgetselection.cpp
@@ -439,8 +439,6 @@ void WidgetHandle::changeGridLayoutItemSpan()
if (!grid)
return;
- const QSize size = m_widget->parentWidget()->size();
-
const int index = deco->indexOf(m_widget);
const QRect info = deco->itemInfo(index);
const int top = deco->findItemAt(info.top() - 1, info.left());
diff --git a/tools/designer/src/designer/qdesigner_workbench.cpp b/tools/designer/src/designer/qdesigner_workbench.cpp
index e970814..b26e376 100644
--- a/tools/designer/src/designer/qdesigner_workbench.cpp
+++ b/tools/designer/src/designer/qdesigner_workbench.cpp
@@ -875,7 +875,6 @@ void QDesignerWorkbench::bringAllToFront()
void QDesignerWorkbench::resizeForm(QDesignerFormWindow *fw, const QWidget *mainContainer) const
{
const QSize containerSize = mainContainer->size();
- const QSize containerMinimumSize = mainContainer->minimumSize();
const QSize containerMaximumSize = mainContainer->maximumSize();
if (m_mode != DockedMode) {
fw->resize(containerSize);
diff --git a/tools/designer/src/lib/shared/connectionedit.cpp b/tools/designer/src/lib/shared/connectionedit.cpp
index 7543a9f..7196dc7 100644
--- a/tools/designer/src/lib/shared/connectionedit.cpp
+++ b/tools/designer/src/lib/shared/connectionedit.cpp
@@ -909,7 +909,6 @@ void Connection::checkWidgets()
if (r != m_source_rect) {
if (m_source_pos != QPoint(-1, -1) && !r.contains(m_source_pos)) {
QPoint offset = m_source_pos - m_source_rect.topLeft();
- QPoint old_pos = m_source_pos;
m_source_pos = pointInsideRect(r, r.topLeft() + offset);
}
m_edit->update(m_source_rect);
@@ -923,7 +922,6 @@ void Connection::checkWidgets()
if (r != m_target_rect) {
if (m_target_pos != QPoint(-1, -1) && !r.contains(m_target_pos)) {
const QPoint offset = m_target_pos - m_target_rect.topLeft();
- const QPoint old_pos = m_target_pos;
m_target_pos = pointInsideRect(r, r.topLeft() + offset);
}
m_edit->update(m_target_rect);
diff --git a/tools/designer/src/lib/shared/qdesigner_dnditem.cpp b/tools/designer/src/lib/shared/qdesigner_dnditem.cpp
index a81e0b0..de9cb69 100644
--- a/tools/designer/src/lib/shared/qdesigner_dnditem.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_dnditem.cpp
@@ -78,7 +78,6 @@ void QDesignerDnDItem::init(DomUI *ui, QWidget *widget, QWidget *decoration,
m_widget = widget;
m_decoration = decoration;
- const QRect geometry = m_decoration->geometry();
m_hot_spot = global_mouse_pos - m_decoration->geometry().topLeft();
}
diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp
index 77e09c6..0ee1a83 100644
--- a/tools/designer/src/lib/shared/qdesigner_menu.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp
@@ -1085,7 +1085,6 @@ void QDesignerMenu::slotShowSubMenuNow()
} else {
// The position is not initially correct due to the unknown width,
// causing it to overlap a bit the first time it is invoked.
- const QSize menuSize = menu->size();
QPoint point = g.topLeft() - QPoint(menu->width() + 10, 0);
menu->move(mapToGlobal(point));
}
diff --git a/tools/designer/src/lib/shared/qdesigner_menubar.cpp b/tools/designer/src/lib/shared/qdesigner_menubar.cpp
index 8ea4032..c45d963 100644
--- a/tools/designer/src/lib/shared/qdesigner_menubar.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_menubar.cpp
@@ -872,7 +872,6 @@ void QDesignerMenuBar::showMenu(int index)
} else {
// The position is not initially correct due to the unknown width,
// causing it to overlap a bit the first time it is invoked.
- const QSize menuSize = menu->size();
QPoint point = g.bottomRight() - QPoint(menu->width(), 0);
menu->move(mapToGlobal(point));
}
diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
index 0fc57f0..d5e9cdb 100644
--- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -919,10 +919,6 @@ QLayoutItem *QAbstractFormBuilder::create(DomLayoutItem *ui_layoutItem, QLayout
bool isVspacer = false;
const DomSpacer *ui_spacer = ui_layoutItem->elementSpacer();
-
- const QMetaEnum sizePolicy_enum = metaEnum<QAbstractFormBuilderGadget>("sizeType");
- const QMetaEnum orientation_enum = metaEnum<QAbstractFormBuilderGadget>("orientation");
-
const QList<DomProperty *> spacerProperties = ui_spacer->elementProperty();
if (!spacerProperties.empty()) {
const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
@@ -2448,8 +2444,6 @@ void QAbstractFormBuilder::loadListWidgetExtraInfo(DomWidget *ui_widget, QListWi
{
Q_UNUSED(parentWidget);
const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
- const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags");
-
foreach (DomItem *ui_item, ui_widget->elementItem()) {
const DomPropertyHash properties = propertyMap(ui_item->elementProperty());
QListWidgetItem *item = new QListWidgetItem(listWidget);