From 930b84f6acc4c06129256243f01fd65f6bc60896 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 24 Aug 2023 22:05:21 +0300 Subject: [PATCH] remove unused QWidgetExceptionCleaner struct Signed-off-by: Ivailo Monev --- src/gui/kernel/qwidget.cpp | 36 ------------------------------------ src/gui/kernel/qwidget.h | 2 -- 2 files changed, 38 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 0ce835513..ed5baa177 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -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. diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h index 9b0acb4d6..4cb4ab583 100644 --- a/src/gui/kernel/qwidget.h +++ b/src/gui/kernel/qwidget.h @@ -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); -- 2.11.0