diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-10 09:07:19 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-10 09:07:19 (GMT) |
commit | a3256014d6adb31c89b0e5de5b0decc393649b70 (patch) | |
tree | cd315ffdb3e35f4040b268e9dc083244da084b2a /src/gui | |
parent | b17cc4918bfc4b250293000bdabcb8f2dbdec787 (diff) | |
parent | 2c232cdbce3eba095da26362b964f411a9d3ba80 (diff) | |
download | Qt-a3256014d6adb31c89b0e5de5b0decc393649b70.zip Qt-a3256014d6adb31c89b0e5de5b0decc393649b70.tar.gz Qt-a3256014d6adb31c89b0e5de5b0decc393649b70.tar.bz2 |
Merge branch '4.6'
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/egl/egl.pri | 2 | ||||
-rw-r--r-- | src/gui/embedded/qwssharedmemory_p.h | 4 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 67 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.h | 5 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 27 | ||||
-rw-r--r-- | src/gui/image/qiconloader.cpp | 37 | ||||
-rw-r--r-- | src/gui/kernel/qapplication.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qevent.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qprintengine_ps_p.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qwindowsurface_qws_p.h | 2 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 9 | ||||
-rw-r--r-- | src/gui/widgets/qmenu_symbian.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qmenubar.cpp | 11 | ||||
-rw-r--r-- | src/gui/widgets/qslider.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/qtoolbararealayout.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qvalidator.cpp | 2 |
20 files changed, 88 insertions, 103 deletions
diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri index 75a3d91..22c8bd7 100644 --- a/src/gui/egl/egl.pri +++ b/src/gui/egl/egl.pri @@ -21,7 +21,7 @@ unix { } for(p, QMAKE_LIBDIR_EGL) { - exists($$p):LIBS += -L$$p + exists($$p):LIBS_PRIVATE += -L$$p } !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL diff --git a/src/gui/embedded/qwssharedmemory_p.h b/src/gui/embedded/qwssharedmemory_p.h index fabd2dd..1d0d090 100644 --- a/src/gui/embedded/qwssharedmemory_p.h +++ b/src/gui/embedded/qwssharedmemory_p.h @@ -68,7 +68,7 @@ public: void setPermissions(mode_t mode); int size() const; - void *address() { return shmBase; }; + void *address() { return shmBase; } int id() const { return shmId; } @@ -82,7 +82,7 @@ public: // old API QWSSharedMemory(int, const QString &, char c = 'Q'); - void * base() { return address(); }; + void * base() { return address(); } bool create(); void destroy(); diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index d67011b..9c0c649 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -335,10 +335,6 @@ it's parent if it's z-value is negative. This flag enables setZValue() to toggle ItemStacksBehindParent. - \value ItemAutoDetectsFocusProxy The item will assign any child that - gains input focus as its focus proxy. See also focusProxy(). - This flag was introduced in Qt 4.6. - \value ItemIsPanel. The item is a panel. A panel provides activation and contained focus handling. Only one panel can be active at a time (see QGraphicsItem::isActive()). When no panel is active, QGraphicsScene @@ -954,17 +950,6 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) parent->itemChange(QGraphicsItem::ItemChildRemovedChange, thisPointerVariant); } - // Auto-update focus proxy. Any ancestor that has this as focus proxy - //needs to be nulled. - QGraphicsItem *p = parent; - while (p) { - if ((p->d_ptr->flags & QGraphicsItem::ItemAutoDetectsFocusProxy) && - (p->focusProxy() == q)) { - p->setFocusProxy(0); - } - p = p->d_ptr->parent; - } - // Update toplevelitem list. If this item is being deleted, its parent // will be 0 but we don't want to register/unregister it in the TLI list. if (scene && !inDestructor) { @@ -1041,18 +1026,11 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) dirtySceneTransform = 1; // Restore the sub focus chain. - if (lastSubFocusItem) - lastSubFocusItem->d_ptr->setSubFocus(); - - // Auto-update focus proxy. The closest parent that detects - // focus proxies is updated as the proxy gains or loses focus. - p = newParent; - while (p) { - if (p->d_ptr->flags & QGraphicsItem::ItemAutoDetectsFocusProxy) { - p->setFocusProxy(q); - break; - } - p = p->d_ptr->parent; + if (lastSubFocusItem) { + if (parent && parent->isActive()) + lastSubFocusItem->setFocus(); + else + lastSubFocusItem->d_ptr->setSubFocus(); } // Deliver post-change notification @@ -1220,6 +1198,7 @@ QGraphicsItem::~QGraphicsItem() d_ptr->removeExtraItemCache(); clearFocus(); + if (!d_ptr->children.isEmpty()) { QList<QGraphicsItem *> oldChildren = d_ptr->children; qDeleteAll(oldChildren); @@ -2772,7 +2751,7 @@ void QGraphicsItem::setFocus(Qt::FocusReason focusReason) // Update the scene's focus item. if (d_ptr->scene) { QGraphicsItem *p = panel(); - if (!p || p->isActive()) { + if ((!p && d_ptr->scene->isActive()) || (p && p->isActive())) { // Visible items immediately gain focus from scene. d_ptr->scene->d_func()->setFocusItemHelper(f, focusReason); } @@ -2792,10 +2771,9 @@ void QGraphicsItem::setFocus(Qt::FocusReason focusReason) */ void QGraphicsItem::clearFocus() { - if (!d_ptr->scene) - return; // Invisible items with focus must explicitly clear subfocus. d_ptr->clearSubFocus(); + if (hasFocus()) { // If this item has the scene's input focus, clear it. d_ptr->scene->setFocusItem(0); @@ -2808,7 +2786,7 @@ void QGraphicsItem::clearFocus() Returns this item's focus proxy, or 0 if this item has no focus proxy. - \sa setFocusProxy(), ItemAutoDetectsFocusProxy, setFocus(), hasFocus() + \sa setFocusProxy(), setFocus(), hasFocus() */ QGraphicsItem *QGraphicsItem::focusProxy() const { @@ -2832,7 +2810,7 @@ QGraphicsItem *QGraphicsItem::focusProxy() const The focus proxy \a item must belong to the same scene as this item. - \sa focusProxy(), ItemAutoDetectsFocusProxy, setFocus(), hasFocus() + \sa focusProxy(), setFocus(), hasFocus() */ void QGraphicsItem::setFocusProxy(QGraphicsItem *item) { @@ -4876,13 +4854,21 @@ void QGraphicsItemPrivate::ensureSceneTransform() */ void QGraphicsItemPrivate::setSubFocus() { - // Update focus child chain. - QGraphicsItem *item = q_ptr; - QGraphicsItem *parent = item; - bool hidden = !visible; + // Update focus child chain. Stop at panels, or if this item + // is hidden, stop at the first item with a visible parent. + QGraphicsItem *parent = q_ptr; do { - parent->d_func()->subFocusItem = item; - } while (!parent->isPanel() && (parent = parent->d_ptr->parent) && (!hidden || !parent->d_func()->visible)); + // Clear any existing ancestor's subFocusItem. + if (parent != q_ptr && parent->d_ptr->subFocusItem) { + if (parent->d_ptr->subFocusItem == q_ptr) + break; + parent->d_ptr->subFocusItem->d_ptr->clearSubFocus(); + } + parent->d_ptr->subFocusItem = q_ptr; + } while (!parent->isPanel() && (parent = parent->d_ptr->parent) && (visible || !parent->d_ptr->visible)); + + if (!parent && scene && !scene->isActive()) + scene->d_func()->lastFocusItem = q_ptr; } /*! @@ -4890,7 +4876,7 @@ void QGraphicsItemPrivate::setSubFocus() */ void QGraphicsItemPrivate::clearSubFocus() { - // Reset focus child chain. + // Reset sub focus chain. QGraphicsItem *parent = q_ptr; do { if (parent->d_ptr->subFocusItem != q_ptr) @@ -10568,9 +10554,6 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag) case QGraphicsItem::ItemNegativeZStacksBehindParent: str = "ItemNegativeZStacksBehindParent"; break; - case QGraphicsItem::ItemAutoDetectsFocusProxy: - str = "ItemAutoDetectsFocusProxy"; - break; case QGraphicsItem::ItemIsPanel: str = "ItemIsPanel"; break; diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h index 1b65700..1c969ba 100644 --- a/src/gui/graphicsview/qgraphicsitem.h +++ b/src/gui/graphicsview/qgraphicsitem.h @@ -103,9 +103,8 @@ public: ItemHasNoContents = 0x400, ItemSendsGeometryChanges = 0x800, ItemAcceptsInputMethod = 0x1000, - ItemAutoDetectsFocusProxy = 0x2000, - ItemNegativeZStacksBehindParent = 0x4000, - ItemIsPanel = 0x8000 + ItemNegativeZStacksBehindParent = 0x2000, + ItemIsPanel = 0x4000 // NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag. }; Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index ee4cfe0..0fd1647 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -653,19 +653,6 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, return; } - // Auto-update focus proxy. The closest parent that detects - // focus proxies is updated as the proxy gains or loses focus. - if (item) { - QGraphicsItem *p = item->d_ptr->parent; - while (p) { - if (p->d_ptr->flags & QGraphicsItem::ItemAutoDetectsFocusProxy) { - p->setFocusProxy(item); - break; - } - p = p->d_ptr->parent; - } - } - if (focusItem) { QFocusEvent event(QEvent::FocusOut, focusReason); lastFocusItem = focusItem; @@ -678,9 +665,14 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, QInputMethodEvent imEvent; sendEvent(lastFocusItem, &imEvent); - // Close any external input method panel - for (int i = 0; i < views.size(); ++i) - views.at(i)->inputContext()->reset(); + // Close any external input method panel. This happens + // automatically by removing WA_InputMethodEnabled on + // the views, but if we are changing focus, we have to + // do it ourselves. + if (item) { + for (int i = 0; i < views.size(); ++i) + views.at(i)->inputContext()->reset(); + } } } @@ -1398,6 +1390,7 @@ QGraphicsScene::QGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObj QGraphicsScene::~QGraphicsScene() { Q_D(QGraphicsScene); + // Remove this scene from qApp's global scene list. qApp->d_func()->scene_list.removeAll(this); @@ -2438,7 +2431,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item) // Ensure that newly added items that have subfocus set, gain // focus automatically if there isn't a focus item already. - if (!d->focusItem && item->focusItem()) + if (!d->focusItem && item->focusItem() && item->isActive()) item->focusItem()->setFocus(); d->updateInputMethodSensitivityInViews(); diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 908b8a1..adc2967 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -68,41 +68,42 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance) +static QString fallbackTheme() +{ + QString defaultTheme; +#ifdef Q_WS_X11 + if (X11->desktopEnvironment == DE_GNOME) + defaultTheme = QLatin1String("gnome"); + else if (X11->desktopEnvironment == DE_KDE) + defaultTheme = X11->desktopVersion >= 4 ? + QString::fromLatin1("oxygen") : + QString::fromLatin1("crystalsvg"); +#endif + return defaultTheme; +} + static QString systemThemeName() { - QString result; + QString result = fallbackTheme(); #ifdef Q_WS_X11 if (X11->desktopEnvironment == DE_GNOME) { -#if defined(QT_NO_STYLE_GTK) - result = QLatin1String("gnome"); -#else +#ifndef QT_NO_STYLE_GTK result = QGtk::getGConfString(QLatin1String("/desktop/gnome/interface/icon_theme"), - QLatin1String("gnome")); + result); #endif } else if (X11->desktopEnvironment == DE_KDE) { - QString kdeDefault = X11->desktopVersion >= 4 ? - QString::fromLatin1("oxygen") : - QString::fromLatin1("crystalsvg"); - QSettings settings(QKde::kdeHome() + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); settings.beginGroup(QLatin1String("Icons")); - result = settings.value(QLatin1String("Theme"), kdeDefault).toString(); + result = settings.value(QLatin1String("Theme"), result).toString(); } #endif return result; } -static QString fallbackTheme() -{ - QString defaultTheme = systemThemeName(); - if (defaultTheme.isEmpty()) - defaultTheme = QLatin1String("hicolor"); - return defaultTheme; -} QIconLoader::QIconLoader() : m_themeKey(1), m_supportsSvg(false) @@ -269,7 +270,7 @@ QIconTheme::QIconTheme(const QString &themeName) m_parents.append(fallbackTheme()); // Ensure that all themes fall back to hicolor - if (!m_parents.isEmpty()) + if (!m_parents.contains(QLatin1String("hicolor"))) m_parents.append(QLatin1String("hicolor")); } } diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 86c7a50..216cfff 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -337,7 +337,7 @@ public: static inline QT3_SUPPORT const QColor &winStyleHighlightColor() { return palette().color(QPalette::Active, QPalette::Highlight); } static inline QT3_SUPPORT void setPalette(const QPalette &pal, bool, const char* className = 0) - { setPalette(pal, className); }; + { setPalette(pal, className); } static inline QT3_SUPPORT void setFont(const QFont &font, bool, const char* className = 0) { setFont(font, className); } diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index c899313..697b93a 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -685,7 +685,7 @@ public: QClipboardEvent(QEventPrivate *data); ~QClipboardEvent(); - QEventPrivate *data() { return d; }; + QEventPrivate *data() { return d; } }; #endif diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index af2b640..d85023b 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -138,7 +138,7 @@ public: #endif TTypeUid::Ptr MopSupplyObject(TTypeUid id); - inline QWidget* widget() const { return qwidget; }; + inline QWidget* widget() const { return qwidget; } void setWidget(QWidget *w); void sendInputEvent(QWidget *widget, QInputEvent *inputEvent); void setIgnoreFocusChanged(bool enabled) { m_ignoreFocusChanged = enabled; } diff --git a/src/gui/painting/qprintengine_ps_p.h b/src/gui/painting/qprintengine_ps_p.h index 827e4d9..704617e 100644 --- a/src/gui/painting/qprintengine_ps_p.h +++ b/src/gui/painting/qprintengine_ps_p.h @@ -95,7 +95,7 @@ public: virtual QPrinter::PrinterState printerState() const; - virtual Qt::HANDLE handle() const { return 0; }; + virtual Qt::HANDLE handle() const { return 0; } private: Q_DISABLE_COPY(QPSPrintEngine) diff --git a/src/gui/painting/qwindowsurface_qws_p.h b/src/gui/painting/qwindowsurface_qws_p.h index 2c45120..6c65db3 100644 --- a/src/gui/painting/qwindowsurface_qws_p.h +++ b/src/gui/painting/qwindowsurface_qws_p.h @@ -173,7 +173,7 @@ public: QPaintDevice *paintDevice() { return &img; } bool scroll(const QRegion &area, int dx, int dy); - QImage image() const { return img; }; + QImage image() const { return img; } QPoint painterOffset() const; bool lock(int timeout = -1); diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index f450d94..0aed71a 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -334,7 +334,7 @@ QtFontStyle *QtFontFoundry::style(const QtFontStyle::Key &key, bool create) else high = pos; pos = (high + low) / 2; - }; + } pos = low; } if (!create) @@ -693,7 +693,7 @@ QtFontFamily *QFontDatabasePrivate::family(const QString &f, bool create) else low = pos; pos = (high + low) / 2; - }; + } if (!res) return families[pos]; } diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 7cae784..ab2506c 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -74,7 +74,7 @@ QByteArray QFontEngineS60Extensions::getSfntTable(uint tag) const Q_ASSERT(m_trueTypeExtension->HasTrueTypeTable(tag)); TInt error = KErrNone; TInt tableByteLength = 0; - TAny *table = m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength); + TAny *table = q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength)); QByteArray result(static_cast<const char*>(table), tableByteLength); m_trueTypeExtension->ReleaseTrueTypeTable(table); return result; diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index 4e367c9..8b85d2d 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1328,6 +1328,8 @@ void QTextCursor::insertText(const QString &text, const QTextCharFormat &_format if (ch == QLatin1Char('\n') || ch == QChar::ParagraphSeparator + || ch == QTextBeginningOfFrame + || ch == QTextEndOfFrame || ch == QLatin1Char('\r')) { if (!hasEditBlock) { diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index c9b6c38..88837ca 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1594,11 +1594,13 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const for (int i = 0; i < layoutData->items.size(); i++) { const QScriptItem *si = layoutData->items.constData() + i; + QFontEngine *fe = fontEngine(*si); + int pos = si->position; int ilen = length(i); if (pos > from + len) break; - if (pos + len > from) { + if (pos + ilen > from) { if (!si->num_glyphs) shape(i); @@ -1631,7 +1633,6 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const charEnd++; glyphEnd = (charEnd == ilen) ? si->num_glyphs : logClusters[charEnd]; if (glyphStart <= glyphEnd ) { - QFontEngine *fe = fontEngine(*si); glyph_metrics_t m = fe->boundingBox(glyphs.mid(glyphStart, glyphEnd - glyphStart)); gm.x = qMin(gm.x, m.x + gm.xoff); gm.y = qMin(gm.y, m.y + gm.yoff); @@ -1641,6 +1642,10 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const gm.yoff += m.yoff; } } + + glyph_t glyph = glyphs.glyphs[logClusters[pos + ilen - 1]]; + glyph_metrics_t gi = fe->boundingBox(glyph); + gm.width -= qRound(gi.xoff - gi.x - gi.width); } } return gm; diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 4674a01..00ceb98 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the S60 port of the Qt toolkit. +** This file is part of the S60 port of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 720bd62..d5a7982 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -1094,6 +1094,8 @@ void QMenuBar::mousePressEvent(QMouseEvent *e) if(e->button() != Qt::LeftButton) return; + d->mouseDown = true; + QAction *action = d->actionAt(e->pos()); if (!action || !d->isVisible(action)) { d->setCurrentAction(0); @@ -1104,8 +1106,6 @@ void QMenuBar::mousePressEvent(QMouseEvent *e) return; } - d->mouseDown = true; - if(d->currentAction == action && d->popupState) { if(QMenu *menu = d->activeMenu) { d->activeMenu = 0; @@ -1252,10 +1252,11 @@ void QMenuBar::keyPressEvent(QKeyEvent *e) void QMenuBar::mouseMoveEvent(QMouseEvent *e) { Q_D(QMenuBar); - d->mouseDown = e->buttons() & Qt::LeftButton; + bool popupState = d->popupState || e->buttons() & Qt::LeftButton; + if (!d->mouseDown || !popupState) + return; QAction *action = d->actionAt(e->pos()); - bool popupState = d->popupState || d->mouseDown; - if ((action && d->isVisible(action)) || !popupState) + if (action && d->isVisible(action)) d->setCurrentAction(action, popupState); } diff --git a/src/gui/widgets/qslider.h b/src/gui/widgets/qslider.h index 289c5b7..7b27582 100644 --- a/src/gui/widgets/qslider.h +++ b/src/gui/widgets/qslider.h @@ -114,8 +114,8 @@ public: inline QT3_SUPPORT void setTickmarks(TickPosition position) { setTickPosition(position); } inline QT3_SUPPORT TickPosition tickmarks() const { return tickPosition(); } public Q_SLOTS: - inline QT_MOC_COMPAT void addStep() { triggerAction(SliderSingleStepAdd); }; - inline QT_MOC_COMPAT void subtractStep() { triggerAction(SliderSingleStepSub); }; + inline QT_MOC_COMPAT void addStep() { triggerAction(SliderSingleStepAdd); } + inline QT_MOC_COMPAT void subtractStep() { triggerAction(SliderSingleStepSub); } #endif private: diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp index cd5c131..de11625 100644 --- a/src/gui/widgets/qtoolbararealayout.cpp +++ b/src/gui/widgets/qtoolbararealayout.cpp @@ -776,7 +776,8 @@ void QToolBarAreaLayout::deleteAllLayoutItems() for (int k = 0; k < line.toolBarItems.count(); ++k) { QToolBarAreaLayoutItem &item = line.toolBarItems[k]; - delete item.widgetItem; + if (!item.gap) + delete item.widgetItem; item.widgetItem = 0; } } diff --git a/src/gui/widgets/qvalidator.cpp b/src/gui/widgets/qvalidator.cpp index 416c0cd..405bf04 100644 --- a/src/gui/widgets/qvalidator.cpp +++ b/src/gui/widgets/qvalidator.cpp @@ -636,7 +636,7 @@ QValidator::State QDoubleValidator::validate(QString & input, int &) const case ScientificNotation: numMode = QLocalePrivate::DoubleScientificMode; break; - }; + } QByteArray buff; if (!locale().d()->validateChars(input, numMode, &buff, dec)) { |