OSDN Git Service

remove unused QWidgetExceptionCleaner struct
authorIvailo Monev <xakepa10@gmail.com>
Thu, 24 Aug 2023 19:05:21 +0000 (22:05 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Thu, 24 Aug 2023 19:05:21 +0000 (22:05 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/kernel/qwidget.cpp
src/gui/kernel/qwidget.h

index 0ce8355..ed5baa1 100644 (file)
@@ -743,42 +743,6 @@ QWidgetSet *QWidgetPrivate::allWidgets = 0;         // widgets with no wid
   QWidget member functions
  *****************************************************************************/
 
-/*
-    Widget state flags:
-  \list
-  \i Qt::WA_WState_Created The widget has a valid winId().
-  \i Qt::WA_WState_Visible The widget is currently visible.
-  \i Qt::WA_WState_Hidden The widget is hidden, i.e. it won't
-  become visible unless you call show() on it. Qt::WA_WState_Hidden
-  implies !Qt::WA_WState_Visible.
-  \i Qt::WA_WState_CompressKeys Compress keyboard events.
-  \i Qt::WA_WState_BlockUpdates Repaints and updates are disabled.
-  \i Qt::WA_WState_InPaintEvent Currently processing a paint event.
-  \i Qt::WA_WState_Reparented The widget has been reparented.
-  \i Qt::WA_WState_ConfigPending A configuration (resize/move) event is pending.
-  \endlist
-*/
-
-struct QWidgetExceptionCleaner
-{
-    /* this cleans up when the constructor throws an exception */
-    static inline void cleanup(QWidget *that, QWidgetPrivate *d)
-    {
-#ifdef QT_NO_EXCEPTIONS
-        Q_UNUSED(that);
-        Q_UNUSED(d);
-#else
-        QWidgetPrivate::allWidgets->remove(that);
-        if (d->focus_next != that) {
-            if (d->focus_next)
-                d->focus_next->d_func()->focus_prev = d->focus_prev;
-            if (d->focus_prev)
-                d->focus_prev->d_func()->focus_next = d->focus_next;
-        }
-#endif
-    }
-};
-
 /*!
     Constructs a widget which is a child of \a parent, with  widget
     flags set to \a f.
index 9b0acb4..4cb4ab5 100644 (file)
@@ -568,7 +568,6 @@ protected:
 private:
     QLayout *takeLayout();
 
-    friend class QBackingStoreDevice;
     friend class QWidgetBackingStore;
     friend class QApplication;
     friend class QApplicationPrivate;
@@ -588,7 +587,6 @@ private:
     friend class QStyleSheetStyle;
     friend class QX11EmbedWidgetPrivate;
     friend class QX11EmbedContainerPrivate;
-    friend struct QWidgetExceptionCleaner;
 
 #ifdef Q_WS_X11
     friend void qt_net_update_user_time(QWidget *tlw, unsigned long timestamp);