summaryrefslogtreecommitdiffstats
path: root/src/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-12-19 14:03:09 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2012-12-19 14:03:09 -0600
commit35202ed0d899a9ff3c77dad72b501fb30e4dcf93 (patch)
tree683787f69d937483b860973ce17f0c5d430a142d /src/kernel/qwidget.cpp
parent8d5add0e87ad913bdf0362a83f431995115f3bfa (diff)
parentf19aa203c934d0f85862fdf810a87fe7c5777d17 (diff)
downloadqt3-35202ed0d899a9ff3c77dad72b501fb30e4dcf93.tar.gz
qt3-35202ed0d899a9ff3c77dad72b501fb30e4dcf93.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/qt3
Diffstat (limited to 'src/kernel/qwidget.cpp')
-rw-r--r--src/kernel/qwidget.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp
index 704681d..5ad69a0 100644
--- a/src/kernel/qwidget.cpp
+++ b/src/kernel/qwidget.cpp
@@ -56,6 +56,9 @@
#include "qstyle.h"
#include "qmetaobject.h"
#include "qguardedptr.h"
+#if defined(QT_THREAD_SUPPORT)
+#include "qthread.h"
+#endif
#if defined(QT_ACCESSIBILITY_SUPPORT)
#include "qaccessible.h"
#endif
@@ -887,6 +890,12 @@ QWidget::QWidget( QWidget *parent, const char *name, WFlags f, NFlags n )
}
#endif
+#if defined(QT_THREAD_SUPPORT) && defined(QT_CHECK_STATE)
+ if (QThread::currentThreadObject() != QApplication::guiThread()) {
+ qFatal( "QWidget: Cannot create a QWidget outside of the main GUI thread" );
+ }
+#endif
+
fstrut_dirty = 1;
isWidget = TRUE; // is a widget