diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-09-28 12:27:40 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-29 06:12:09 (GMT) |
commit | 66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3 (patch) | |
tree | 0984d6a3680374b6c13daf2d0c1cc78e4660d268 /tools | |
parent | 619136931e2c985377348d196d488e429a4858d6 (diff) | |
download | Qt-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')
13 files changed, 2 insertions, 30 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); diff --git a/tools/shared/qtgradienteditor/qtcolorline.cpp b/tools/shared/qtgradienteditor/qtcolorline.cpp index 3ac8771..9fd5b2a 100644 --- a/tools/shared/qtgradienteditor/qtcolorline.cpp +++ b/tools/shared/qtgradienteditor/qtcolorline.cpp @@ -148,7 +148,6 @@ void QtColorLinePrivate::setColor(const QColor &color) return; m_color = color; checkColor(); - QColor c = colorFromPoint(m_point); m_point = pointFromColor(m_color); q_ptr->update(); } @@ -664,7 +663,6 @@ void QtColorLinePrivate::paintEvent(QPaintEvent *) QVector<QRect> r = rects(m_point); - QColor cBack = q_ptr->palette().color(QPalette::Active, QPalette::Window); QColor c = colorFromPoint(m_point); if (!m_combiningAlpha && m_component != QtColorLine::Alpha) c.setAlpha(0xFF); @@ -922,8 +920,6 @@ void QtColorLinePrivate::mousePressEvent(QMouseEvent *event) QVector<QRect> r = rects(m_point); QPoint clickPos = event->pos(); - QSize fieldSize = q_ptr->geometry().size() - - QSize(m_indicatorSize + 2 * m_indicatorSpace - 1, m_indicatorSize + 2 * m_indicatorSpace - 1); QPoint posOnField = r[1].topLeft() - QPoint(m_indicatorSpace, m_indicatorSpace); m_clickOffset = posOnField - clickPos; diff --git a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp index 2b69563..2ee3405 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp +++ b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp @@ -834,7 +834,6 @@ void QtGradientStopsWidget::paintEvent(QPaintEvent *e) double handleWidth = d_ptr->m_handleSize * d_ptr->m_scaleFactor / (w * (d_ptr->m_scaleFactor + max)); QColor insideColor = QColor::fromRgb(0x20, 0x20, 0x20, 0xFF); - QColor borderColor = QColor(Qt::white); QColor drawColor; QColor back1 = QColor(Qt::lightGray); QColor back2 = QColor(Qt::darkGray); diff --git a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp index 67ddcbf..f4ddaed 100644 --- a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp @@ -276,14 +276,11 @@ void QtButtonPropertyBrowserPrivate::propertyInserted(QtBrowserItem *index, QtBr if (!parentItem->container) { m_recreateQueue.removeAll(parentItem); WidgetItem *grandParent = parentItem->parent; - QWidget *w = 0; QGridLayout *l = 0; const int oldRow = gridRow(parentItem); if (grandParent) { - w = grandParent->container; l = grandParent->layout; } else { - w = q_ptr; l = m_mainLayout; } QFrame *container = new QFrame(); diff --git a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp index a34b9ae..9e7b91f 100644 --- a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp @@ -307,15 +307,12 @@ void QtGroupBoxPropertyBrowserPrivate::propertyRemoved(QtBrowserItem *index) removeRow(parentItem->layout, row); } else { WidgetItem *par = parentItem->parent; - QWidget *w = 0; QGridLayout *l = 0; int oldRow = -1; if (!par) { - w = q_ptr; l = m_mainLayout; oldRow = m_children.indexOf(parentItem); } else { - w = par->groupBox; l = par->layout; oldRow = par->children.indexOf(parentItem); if (hasHeader(par)) diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp index fafc84a..63aba58 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp @@ -1783,15 +1783,12 @@ QtBrowserItem *QtAbstractPropertyBrowser::insertProperty(QtProperty *property, QList<QtProperty *> pendingList = properties(); int pos = 0; int newPos = 0; - QtProperty *properAfterProperty = 0; while (pos < pendingList.count()) { QtProperty *prop = pendingList.at(pos); if (prop == property) return 0; - if (prop == afterProperty) { + if (prop == afterProperty) newPos = pos + 1; - properAfterProperty = afterProperty; - } pos++; } d_ptr->createBrowserIndexes(property, 0, afterProperty); |