summaryrefslogtreecommitdiffstats
path: root/src/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-12-19 14:03:14 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2012-12-19 14:03:14 -0600
commitf8224f3a623495e4e1dbf852554d7601a6b7c4c4 (patch)
treed5583114ba48669960c9f7d68927687ea652a0b8 /src/kernel/qwidget.cpp
parent25240579092616b09d28705ac84e13e49b744707 (diff)
parente8cbbedf46da493d2c206444a7e18e5777402905 (diff)
downloadtqt-f8224f3a623495e4e1dbf852554d7601a6b7c4c4.tar.gz
tqt-f8224f3a623495e4e1dbf852554d7601a6b7c4c4.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
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 f7ed299fb..f0ff3ed53 100644
--- a/src/kernel/qwidget.cpp
+++ b/src/kernel/qwidget.cpp
@@ -56,6 +56,9 @@
#include "ntqstyle.h"
#include "ntqmetaobject.h"
#include "ntqguardedptr.h"
+#if defined(QT_THREAD_SUPPORT)
+#include "ntqthread.h"
+#endif
#if defined(QT_ACCESSIBILITY_SUPPORT)
#include "ntqaccessible.h"
#endif
@@ -887,6 +890,12 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
}
#endif
+#if defined(QT_THREAD_SUPPORT) && defined(QT_CHECK_STATE)
+ if (TQThread::currentThreadObject() != TQApplication::guiThread()) {
+ tqFatal( "TQWidget: Cannot create a TQWidget outside of the main GUI thread" );
+ }
+#endif
+
fstrut_dirty = 1;
isWidget = TRUE; // is a widget