diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-06-13 15:22:11 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-27 12:35:23 +0900 |
commit | d346b0f7afcf92a76466c5aaff5fed80d74dcb59 (patch) | |
tree | d80acbed6056b2cf501f717c294f572d91dbc0f2 | |
parent | 9dd062934387e59553bfea7402e840ee487aca77 (diff) | |
download | tqt-d346b0f7afcf92a76466c5aaff5fed80d74dcb59.tar.gz tqt-d346b0f7afcf92a76466c5aaff5fed80d74dcb59.zip |
Rename 'guiThread' and related functions to 'coreThread'.
A TTY TQApplication is GUI-less, so the usage of the term 'GUI' is
misleading.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | doc/html/functions.html | 14 | ||||
-rw-r--r-- | doc/html/index | 6 | ||||
-rw-r--r-- | doc/html/qt.dcf | 6 | ||||
-rw-r--r-- | doc/html/tqapplication-h.html | 6 | ||||
-rw-r--r-- | doc/html/tqapplication-members.html | 4 | ||||
-rw-r--r-- | doc/html/tqapplication.html | 24 | ||||
-rw-r--r-- | doc/man/man3/tqapplication.3qt | 22 | ||||
-rw-r--r-- | src/kernel/tqapplication.cpp | 67 | ||||
-rw-r--r-- | src/kernel/tqapplication.h | 10 | ||||
-rw-r--r-- | src/kernel/tqeventloop_x11.cpp | 16 | ||||
-rw-r--r-- | src/kernel/tqeventloop_x11_glib.cpp | 24 | ||||
-rw-r--r-- | src/kernel/tqobject.cpp | 2 | ||||
-rw-r--r-- | src/kernel/tqthread_unix.cpp | 2 | ||||
-rw-r--r-- | src/kernel/tqwidget.cpp | 5 | ||||
-rw-r--r-- | src/tools/tqthreadinstance_p.h | 2 | ||||
-rw-r--r-- | src/tools/tqthreadstorage_unix.cpp | 8 |
16 files changed, 116 insertions, 102 deletions
diff --git a/doc/html/functions.html b/doc/html/functions.html index efe2c6838..8b6765935 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -531,7 +531,9 @@ c: <a href="tqrect.html#coords">TQRect</a><li>copy: <a href="tqbitarray.html#copy">TQBitArray</a> <a href="tqcstring.html#copy">TQCString</a> <a href="tqimage.html#copy">TQImage</a> <a href="tqlineedit.html#copy">TQLineEdit</a> <a href="tqmemarray.html#copy">TQMemArray</a> <a href="tqpalette.html#copy">TQPalette</a> <a href="tqpicture.html#copy">TQPicture</a> <a href="tqpointarray.html#copy">TQPointArray</a> <a href="tqtextedit.html#copy">TQTextEdit</a> <a href="tqurloperator.html#copy">TQUrlOperator</a><li>copyAvailable: <a href="tqtextedit.html#copyAvailable">TQTextEdit</a><li>copyBlt: - <a href="tqpixmap.html#copyBlt">TQPixmap</a><li>cornerWidget: + <a href="tqpixmap.html#copyBlt">TQPixmap</a><li>coreThread: + <a href="tqapplication.html#coreThread">TQApplication</a><li>coreThreadAwake: + <a href="tqapplication.html#coreThreadAwake">TQApplication</a><li>cornerWidget: <a href="tqscrollview.html#cornerWidget">TQScrollView</a> <a href="tqtabwidget.html#cornerWidget">TQTabWidget</a><li>count: <a href="tqaccel.html#count">TQAccel</a> <a href="tqasciicache.html#count">TQAsciiCache</a> <a href="tqasciicacheiterator.html#count">TQAsciiCacheIterator</a> <a href="tqasciidict.html#count">TQAsciiDict</a> <a href="tqasciidictiterator.html#count">TQAsciiDictIterator</a> <a href="tqbuttongroup.html#count">TQButtonGroup</a> <a href="tqcache.html#count">TQCache</a> <a href="tqcacheiterator.html#count">TQCacheIterator</a> <a href="tqcanvaspixmaparray.html#count">TQCanvasPixmapArray</a> <a href="tqcombobox.html#count">TQComboBox</a> <a href="tqcombotableitem.html#count">TQComboTableItem</a> <a href="tqdict.html#count">TQDict</a> <a href="tqdictiterator.html#count">TQDictIterator</a> <a href="tqdir.html#count">TQDir</a> <a href="tqdockarea.html#count">TQDockArea</a> <a href="tqdomnamednodemap.html#count">TQDomNamedNodeMap</a> <a href="tqdomnodelist.html#count">TQDomNodeList</a> <a href="tqfocusdata.html#count">TQFocusData</a> <a href="tqheader.html#count">TQHeader</a> <a href="tqiconview.html#count">TQIconView</a> <a href="tqintcache.html#count">TQIntCache</a> <a href="tqintcacheiterator.html#count">TQIntCacheIterator</a> <a href="tqintdict.html#count">TQIntDict</a> <a href="tqintdictiterator.html#count">TQIntDictIterator</a> <a href="tqkeyevent.html#count">TQKeyEvent</a> <a href="tqkeysequence.html#count">TQKeySequence</a> <a href="tqlistbox.html#count">TQListBox</a> <a href="tqmap.html#count">TQMap</a> <a href="tqmemarray.html#count">TQMemArray</a> <a href="tqmenudata.html#count">TQMenuData</a> <a href="tqptrcollection.html#count">TQPtrCollection</a> <a href="tqptrdict.html#count">TQPtrDict</a> <a href="tqptrdictiterator.html#count">TQPtrDictIterator</a> <a href="tqptrlist.html#count">TQPtrList</a> <a href="tqptrlistiterator.html#count">TQPtrListIterator</a> <a href="tqptrqueue.html#count">TQPtrQueue</a> <a href="tqptrstack.html#count">TQPtrStack</a> <a href="tqptrvector.html#count">TQPtrVector</a> <a href="tqsqlform.html#count">TQSqlForm</a> <a href="tqsqlrecord.html#count">TQSqlRecord</a> <a href="tqtabbar.html#count">TQTabBar</a> <a href="tqtabwidget.html#count">TQTabWidget</a> <a href="tqtoolbox.html#count">TQToolBox</a> <a href="tqvaluelist.html#count">TQValueList</a> <a href="tqvaluevector.html#count">TQValueVector</a> <a href="tqxmlattributes.html#count">TQXmlAttributes</a><li>countCf: <a href="tqwindowsmime.html#countCf">TQWindowsMime</a><li>countFlavors: @@ -1053,8 +1055,7 @@ gamma: <a href="tqiconview.html#gridX">TQIconView</a><li>gridY: <a href="tqiconview.html#gridY">TQIconView</a><li>group: <a href="tqbutton.html#group">TQButton</a> <a href="tqbutton.html#group">TQCheckBox</a> <a href="tqfileinfo.html#group">TQFileInfo</a> <a href="tqbutton.html#group">TQPushButton</a> <a href="tqbutton.html#group">TQRadioButton</a> <a href="tqsettings.html#group">TQSettings</a> <a href="tqtooltip.html#group">TQToolTip</a> <a href="tqurlinfo.html#group">TQUrlInfo</a> <a href="tqwidgetplugin.html#group">TQWidgetPlugin</a><li>groupId: - <a href="tqfileinfo.html#groupId">TQFileInfo</a><li>guiThreadAwake: - <a href="tqapplication.html#guiThreadAwake">TQApplication</a><li><a name="h"></a> + <a href="tqfileinfo.html#groupId">TQFileInfo</a><li><a name="h"></a> hScrollBarMode: <a href="tqscrollview.html#hScrollBarMode">TQScrollView</a><li>handle: <a href="tqcursor.html#handle">TQCursor</a> <a href="tqfile.html#handle">TQFile</a> <a href="tqfont.html#handle">TQFont</a> <a href="tqpaintdevice.html#handle">TQPaintDevice</a> <a href="tqpainter.html#handle">TQPainter</a> <a href="tqregion.html#handle">TQRegion</a> <a href="tqsessionmanager.html#handle">TQSessionManager</a><li>handleError: @@ -1270,7 +1271,8 @@ icon: <a href="tqcontextmenuevent.html#isConsumed">TQContextMenuEvent</a><li>isContainer: <a href="tqwidgetplugin.html#isContainer">TQWidgetPlugin</a><li>isContentsPreviewEnabled: <a href="tqfiledialog.html#isContentsPreviewEnabled">TQFileDialog</a><li>isCopyOf: - <a href="tqfont.html#isCopyOf">TQFont</a> <a href="tqpalette.html#isCopyOf">TQPalette</a><li>isCurrent: + <a href="tqfont.html#isCopyOf">TQFont</a> <a href="tqpalette.html#isCopyOf">TQPalette</a><li>isCoreThread: + <a href="tqapplication.html#isCoreThread">TQApplication</a><li>isCurrent: <a href="tqlistboxitem.html#isCurrent">TQListBoxItem</a><li>isCustomizable: <a href="tqmainwindow.html#isCustomizable">TQMainWindow</a><li>isDefault: <a href="tqpushbutton.html#isDefault">TQPushButton</a> <a href="tqstyleoption.html#isDefault">TQStyleOption</a><li>isDefaultUp: @@ -3411,8 +3413,8 @@ wait: <a href="tqsocket.html#waitForMore">TQSocket</a> <a href="tqsocketdevice.html#waitForMore">TQSocketDevice</a><li>wakeAll: <a href="tqwaitcondition.html#wakeAll">TQWaitCondition</a><li>wakeOne: <a href="tqwaitcondition.html#wakeOne">TQWaitCondition</a><li>wakeUp: - <a href="tqeventloop.html#wakeUp">TQEventLoop</a><li>wakeUpGuiThread: - <a href="tqapplication.html#wakeUpGuiThread">TQApplication</a><li>warning: + <a href="tqeventloop.html#wakeUp">TQEventLoop</a><li>wakeUpCoreThread: + <a href="tqapplication.html#wakeUpCoreThread">TQApplication</a><li>warning: <a href="tqmessagebox.html#warning">TQMessageBox</a> <a href="tqxmlerrorhandler.html#warning">TQXmlErrorHandler</a><li>wasCanceled: <a href="tqprogressdialog.html#wasCanceled">TQProgressDialog</a><li>weekNumber: <a href="tqdate.html#weekNumber">TQDate</a><li>weight: diff --git a/doc/html/index b/doc/html/index index 042448975..8cad14b19 100644 --- a/doc/html/index +++ b/doc/html/index @@ -229,6 +229,8 @@ "TQApplication::closingDown" tqapplication.html#closingDown "TQApplication::colorSpec" tqapplication.html#colorSpec "TQApplication::commitData" tqapplication.html#commitData +"TQApplication::coreThread" tqapplication.html#coreThread +"TQApplication::coreThreadAwake" tqapplication.html#coreThreadAwake "TQApplication::cursorFlashTime" tqapplication.html#cursorFlashTime "TQApplication::desktop" tqapplication.html#desktop "TQApplication::desktopSettingsAware" tqapplication.html#desktopSettingsAware @@ -242,12 +244,12 @@ "TQApplication::font" tqapplication.html#font "TQApplication::fontMetrics" tqapplication.html#fontMetrics "TQApplication::globalStrut" tqapplication.html#globalStrut -"TQApplication::guiThreadAwake" tqapplication.html#guiThreadAwake "TQApplication::hasGlobalMouseTracking" tqapplication.html#hasGlobalMouseTracking "TQApplication::hasPendingEvents" tqapplication.html#hasPendingEvents "TQApplication::horizontalAlignment" tqapplication.html#horizontalAlignment "TQApplication::initialize" tqapplication.html#initialize "TQApplication::installTranslator" tqapplication.html#installTranslator +"TQApplication::isCoreThread" tqapplication.html#isCoreThread "TQApplication::isEffectEnabled" tqapplication.html#isEffectEnabled "TQApplication::isSessionRestored" tqapplication.html#isSessionRestored "TQApplication::lastWindowClosed" tqapplication.html#lastWindowClosed @@ -301,7 +303,7 @@ "TQApplication::tryLock" tqapplication.html#tryLock "TQApplication::type" tqapplication.html#type "TQApplication::unlock" tqapplication.html#unlock -"TQApplication::wakeUpGuiThread" tqapplication.html#wakeUpGuiThread +"TQApplication::wakeUpCoreThread" tqapplication.html#wakeUpCoreThread "TQApplication::wheelScrollLines" tqapplication.html#wheelScrollLines "TQApplication::widgetAt" tqapplication.html#widgetAt "TQApplication::winEventFilter" tqapplication.html#winEventFilter diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index 79d3be956..81716a7c7 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -152,6 +152,8 @@ <keyword ref="tqapplication.html#closingDown">closingDown</keyword> <keyword ref="tqapplication.html#colorSpec">colorSpec</keyword> <keyword ref="tqapplication.html#commitData">commitData</keyword> + <keyword ref="tqapplication.html#coreThread">coreThread</keyword> + <keyword ref="tqapplication.html#coreThreadAwake">coreThreadAwake</keyword> <keyword ref="tqapplication.html#cursorFlashTime">cursorFlashTime</keyword> <keyword ref="tqapplication.html#desktop">desktop</keyword> <keyword ref="tqapplication.html#desktopSettingsAware">desktopSettingsAware</keyword> @@ -165,12 +167,12 @@ <keyword ref="tqapplication.html#font">font</keyword> <keyword ref="tqapplication.html#fontMetrics">fontMetrics</keyword> <keyword ref="tqapplication.html#globalStrut">globalStrut</keyword> - <keyword ref="tqapplication.html#guiThreadAwake">guiThreadAwake</keyword> <keyword ref="tqapplication.html#hasGlobalMouseTracking">hasGlobalMouseTracking</keyword> <keyword ref="tqapplication.html#hasPendingEvents">hasPendingEvents</keyword> <keyword ref="tqapplication.html#horizontalAlignment">horizontalAlignment</keyword> <keyword ref="tqapplication.html#initialize">initialize</keyword> <keyword ref="tqapplication.html#installTranslator">installTranslator</keyword> + <keyword ref="tqapplication.html#isCoreThread">isCoreThread</keyword> <keyword ref="tqapplication.html#isEffectEnabled">isEffectEnabled</keyword> <keyword ref="tqapplication.html#isSessionRestored">isSessionRestored</keyword> <keyword ref="tqapplication.html#lastWindowClosed">lastWindowClosed</keyword> @@ -224,7 +226,7 @@ <keyword ref="tqapplication.html#tryLock">tryLock</keyword> <keyword ref="tqapplication.html#type">type</keyword> <keyword ref="tqapplication.html#unlock">unlock</keyword> - <keyword ref="tqapplication.html#wakeUpGuiThread">wakeUpGuiThread</keyword> + <keyword ref="tqapplication.html#wakeUpCoreThread">wakeUpCoreThread</keyword> <keyword ref="tqapplication.html#wheelScrollLines">wheelScrollLines</keyword> <keyword ref="tqapplication.html#widgetAt">widgetAt</keyword> <keyword ref="tqapplication.html#winEventFilter">winEventFilter</keyword> diff --git a/doc/html/tqapplication-h.html b/doc/html/tqapplication-h.html index f3bc3b9d1..f54ca7820 100644 --- a/doc/html/tqapplication-h.html +++ b/doc/html/tqapplication-h.html @@ -297,10 +297,10 @@ public: static void close_xim(); static bool x11_apply_settings(); #endif - void wakeUpGuiThread(); + void wakeUpCoreThread(); #if defined(TQT_THREAD_SUPPORT) void lock(); - void unlock(bool wakeUpGui = TRUE); + void unlock(bool wakeUpCore = TRUE); bool locked(); bool tryLock(); #endif @@ -308,7 +308,7 @@ public: signals: void lastWindowClosed(); void aboutToQuit(); - void guiThreadAwake(); + void coreThreadAwake(); public slots: void quit(); diff --git a/doc/html/tqapplication-members.html b/doc/html/tqapplication-members.html index bcb60e10c..7d4272aa0 100644 --- a/doc/html/tqapplication-members.html +++ b/doc/html/tqapplication-members.html @@ -61,6 +61,7 @@ body { background: #ffffff; color: black; } <li><a href="tqapplication.html#commitData">commitData</a>() <li><a href="tqobject.html#connect">connect</a>() <li><a href="tqobject.html#connectNotify">connectNotify</a>() +<li><a href="tqapplication.html#coreThreadAwake">coreThreadAwake</a>() <li><a href="tqapplication.html#cursorFlashTime">cursorFlashTime</a>() <li><a href="tqobject.html#customEvent">customEvent</a>() <li><a href="tqapplication.html#defaultCodec">defaultCodec</a>() @@ -86,7 +87,6 @@ body { background: #ffffff; color: black; } <li><a href="tqapplication.html#font">font</a>() <li><a href="tqapplication.html#fontMetrics">fontMetrics</a>() <li><a href="tqapplication.html#globalStrut">globalStrut</a>() -<li><a href="tqapplication.html#guiThreadAwake">guiThreadAwake</a>() <li><a href="tqapplication.html#hasGlobalMouseTracking">hasGlobalMouseTracking</a>() <li><a href="tqapplication.html#hasPendingEvents">hasPendingEvents</a>() <li><a href="tqobject.html#highPriority">highPriority</a>() @@ -172,7 +172,7 @@ body { background: #ffffff; color: black; } <li><a href="tqapplication.html#tryLock">tryLock</a>() <li><a href="tqapplication.html#type">type</a>() <li><a href="tqapplication.html#unlock">unlock</a>() -<li><a href="tqapplication.html#wakeUpGuiThread">wakeUpGuiThread</a>() +<li><a href="tqapplication.html#wakeUpCoreThread">wakeUpCoreThread</a>() <li><a href="tqapplication.html#wheelScrollLines">wheelScrollLines</a>() <li><a href="tqapplication.html#widgetAt">widgetAt</a>() <li><a href="tqapplication.html#winEventFilter">winEventFilter</a>() diff --git a/doc/html/tqapplication.html b/doc/html/tqapplication.html index 369c8ef6d..30de0a415 100644 --- a/doc/html/tqapplication.html +++ b/doc/html/tqapplication.html @@ -81,9 +81,9 @@ flow and main settings. <li class=fn>TQString <a href="#sessionKey"><b>sessionKey</b></a> () const</li> <li class=fn>virtual void <a href="#commitData"><b>commitData</b></a> ( TQSessionManager & sm )</li> <li class=fn>virtual void <a href="#saveState"><b>saveState</b></a> ( TQSessionManager & sm )</li> -<li class=fn>void <a href="#wakeUpGuiThread"><b>wakeUpGuiThread</b></a> ()</li> +<li class=fn>void <a href="#wakeUpCoreThread"><b>wakeUpCoreThread</b></a> ()</li> <li class=fn>void <a href="#lock"><b>lock</b></a> ()</li> -<li class=fn>void <a href="#unlock"><b>unlock</b></a> ( bool wakeUpGui = TRUE )</li> +<li class=fn>void <a href="#unlock"><b>unlock</b></a> ( bool wakeUpCore = TRUE )</li> <li class=fn>bool <a href="#locked"><b>locked</b></a> ()</li> <li class=fn>bool <a href="#tryLock"><b>tryLock</b></a> ()</li> </ul> @@ -97,7 +97,7 @@ flow and main settings. <ul> <li class=fn>void <a href="#lastWindowClosed"><b>lastWindowClosed</b></a> ()</li> <li class=fn>void <a href="#aboutToQuit"><b>aboutToQuit</b></a> ()</li> -<li class=fn>void <a href="#guiThreadAwake"><b>guiThreadAwake</b></a> ()</li> +<li class=fn>void <a href="#coreThreadAwake"><b>coreThreadAwake</b></a> ()</li> </ul> <h2>Static Public Members</h2> <ul> @@ -332,7 +332,7 @@ any overrides after.) <td valign="top">Threading <td valign="top"> <a href="#lock">lock</a>(), <a href="#unlock">unlock</a>(), <a href="#locked">locked</a>(), <a href="#tryLock">tryLock</a>(), -<a href="#wakeUpGuiThread">wakeUpGuiThread</a>() +<a href="#wakeUpCoreThread">wakeUpCoreThread</a>() <tr bgcolor="#f0f0f0"> <td valign="top">Miscellaneous <td valign="top"> @@ -874,12 +874,12 @@ GUI element that the user can interact with should have. For example no button should be resized to be smaller than the global strut size. <p> <p>See also <a href="#setGlobalStrut">setGlobalStrut</a>(). -<h3 class=fn>void <a name="guiThreadAwake"></a>TQApplication::guiThreadAwake ()<tt> [signal]</tt> +<h3 class=fn>void <a name="coreThreadAwake"></a>TQApplication::coreThreadAwake ()<tt> [signal]</tt> </h3> <p> This signal is emitted after the event loop returns from a function that could block. -<p> <p>See also <a href="#wakeUpGuiThread">wakeUpGuiThread</a>(). +<p> <p>See also <a href="#wakeUpCoreThread">wakeUpCoreThread</a>(). <h3 class=fn>bool <a name="hasGlobalMouseTracking"></a>TQApplication::hasGlobalMouseTracking ()<tt> [static]</tt> </h3> @@ -1656,16 +1656,16 @@ successfully lock it. </h3> Returns the type of application, Tty, GuiClient or GuiServer. -<h3 class=fn>void <a name="unlock"></a>TQApplication::unlock ( bool wakeUpGui = TRUE ) +<h3 class=fn>void <a name="unlock"></a>TQApplication::unlock ( bool wakeUpCore = TRUE ) </h3> -<p> Unlock the TQt Library Mutex. If <em>wakeUpGui</em> is TRUE (the default), -then the GUI thread will be woken with <a href="#wakeUpGuiThread">TQApplication::wakeUpGuiThread</a>(). +<p> Unlock the TQt Library Mutex. If <em>wakeUpCore</em> is TRUE (the default), +then the core application thread will be woken with <a href="#wakeUpCoreThread">TQApplication::wakeUpCoreThread</a>(). <p> <p>See also <a href="#lock">lock</a>(), <a href="#locked">locked</a>(), and <a href="threads.html">Thread Support in TQt</a>. -<h3 class=fn>void <a name="wakeUpGuiThread"></a>TQApplication::wakeUpGuiThread () +<h3 class=fn>void <a name="wakeUpCoreThread"></a>TQApplication::wakeUpCoreThread () </h3> -<p> Wakes up the GUI thread. -<p> <p>See also <a href="#guiThreadAwake">guiThreadAwake</a>() and <a href="threads.html">Thread Support in TQt</a>. +<p> Wakes up the core application thread. +<p> <p>See also <a href="#coreThreadAwake">coreThreadAwake</a>() and <a href="threads.html">Thread Support in TQt</a>. <h3 class=fn>int <a name="wheelScrollLines"></a>TQApplication::wheelScrollLines ()<tt> [static]</tt> </h3> diff --git a/doc/man/man3/tqapplication.3qt b/doc/man/man3/tqapplication.3qt index aa073c581..1355111ac 100644 --- a/doc/man/man3/tqapplication.3qt +++ b/doc/man/man3/tqapplication.3qt @@ -145,13 +145,13 @@ Inherits TQObject. .BI "virtual void \fBsaveState\fR ( TQSessionManager & sm )" .br .ti -1c -.BI "void \fBwakeUpGuiThread\fR ()" +.BI "void \fBwakeUpCoreThread\fR ()" .br .ti -1c .BI "void \fBlock\fR ()" .br .ti -1c -.BI "void \fBunlock\fR ( bool wakeUpGui = TRUE )" +.BI "void \fBunlock\fR ( bool wakeUpCore = TRUE )" .br .ti -1c .BI "bool \fBlocked\fR ()" @@ -181,7 +181,7 @@ Inherits TQObject. .BI "void \fBaboutToQuit\fR ()" .br .ti -1c -.BI "void \fBguiThreadAwake\fR ()" +.BI "void \fBcoreThreadAwake\fR ()" .br .in -1c .SS "Static Public Members" @@ -454,7 +454,7 @@ Since it also deals with common command line arguments, it is usually a good ide .PP <center>.nf .TS -l - l. Groups of functions System settings desktopSettingsAware(), setDesktopSettingsAware(), cursorFlashTime(), setCursorFlashTime(), doubleClickInterval(), setDoubleClickInterval(), wheelScrollLines(), setWheelScrollLines(), palette(), setPalette(), font(), setFont(), fontMetrics(). Event handling exec(), processEvents(), enter_loop(), exit_loop(), exit(), quit(). sendEvent(), postEvent(), sendPostedEvents(), removePostedEvents(), hasPendingEvents(), notify(), macEventFilter(), x11EventFilter(), x11ProcessEvent(), winEventFilter(). GUI Styles style(), setStyle(), polish(). Color usage colorSpec(), setColorSpec(). Text handling installTranslator(), removeTranslator() translate(). Widgets mainWidget(), setMainWidget(), allWidgets(), topLevelWidgets(), desktop(), activePopupWidget(), activeModalWidget(), clipboard(), focusWidget(), winFocus(), activeWindow(), widgetAt(). Advanced cursor handling hasGlobalMouseTracking(), setGlobalMouseTracking(), overrideCursor(), setOverrideCursor(), restoreOverrideCursor(). X Window System synchronization flushX(), syncX(). Session management isSessionRestored(), sessionId(), commitData(), saveState(). Threading lock(), unlock(), locked(), tryLock(), wakeUpGuiThread() Miscellaneous +l - l. Groups of functions System settings desktopSettingsAware(), setDesktopSettingsAware(), cursorFlashTime(), setCursorFlashTime(), doubleClickInterval(), setDoubleClickInterval(), wheelScrollLines(), setWheelScrollLines(), palette(), setPalette(), font(), setFont(), fontMetrics(). Event handling exec(), processEvents(), enter_loop(), exit_loop(), exit(), quit(). sendEvent(), postEvent(), sendPostedEvents(), removePostedEvents(), hasPendingEvents(), notify(), macEventFilter(), x11EventFilter(), x11ProcessEvent(), winEventFilter(). GUI Styles style(), setStyle(), polish(). Color usage colorSpec(), setColorSpec(). Text handling installTranslator(), removeTranslator() translate(). Widgets mainWidget(), setMainWidget(), allWidgets(), topLevelWidgets(), desktop(), activePopupWidget(), activeModalWidget(), clipboard(), focusWidget(), winFocus(), activeWindow(), widgetAt(). Advanced cursor handling hasGlobalMouseTracking(), setGlobalMouseTracking(), overrideCursor(), setOverrideCursor(), restoreOverrideCursor(). X Window System synchronization flushX(), syncX(). Session management isSessionRestored(), sessionId(), commitData(), saveState(). Threading lock(), unlock(), locked(), tryLock(), wakeUpCoreThread() Miscellaneous .TE .fi </center> @@ -933,10 +933,10 @@ Returns the application's global strut. The strut is a size object whose dimensions are the minimum that any GUI element that the user can interact with should have. For example no button should be resized to be smaller than the global strut size. .PP See also setGlobalStrut(). -.SH "void TQApplication::guiThreadAwake ()\fC [signal]\fR" +.SH "void TQApplication::coreThreadAwake ()\fC [signal]\fR" This signal is emitted after the event loop returns from a function that could block. .PP -See also wakeUpGuiThread(). +See also wakeUpCoreThread(). .SH "bool TQApplication::hasGlobalMouseTracking ()\fC [static]\fR" Returns TRUE if global mouse tracking is enabled; otherwise returns FALSE. .PP @@ -1568,14 +1568,14 @@ The mutex must be unlocked with unlock() before another thread can successfully See also lock(), unlock(), and Thread Support in Qt. .SH "Type TQApplication::type () const" Returns the type of application, Tty, GuiClient or GuiServer. -.SH "void TQApplication::unlock ( bool wakeUpGui = TRUE )" -Unlock the TQt Library Mutex. If \fIwakeUpGui\fR is TRUE (the default), then the GUI thread will be woken with TQApplication::wakeUpGuiThread(). +.SH "void TQApplication::unlock ( bool wakeUpCore = TRUE )" +Unlock the TQt Library Mutex. If \fIwakeUpCore\fR is TRUE (the default), then the core application thread will be woken with TQApplication::wakeUpCoreThread(). .PP See also lock(), locked(), and Thread Support in Qt. -.SH "void TQApplication::wakeUpGuiThread ()" -Wakes up the GUI thread. +.SH "void TQApplication::wakeUpCoreThread ()" +Wakes up the current thread. .PP -See also guiThreadAwake() and Thread Support in Qt. +See also coreThreadAwake() and Thread Support in Qt. .SH "int TQApplication::wheelScrollLines ()\fC [static]\fR" Returns the number of lines to scroll when the mouse wheel is rotated. .PP diff --git a/src/kernel/tqapplication.cpp b/src/kernel/tqapplication.cpp index 1cc5bf140..e6aad87c4 100644 --- a/src/kernel/tqapplication.cpp +++ b/src/kernel/tqapplication.cpp @@ -264,7 +264,7 @@ \i Threading \i lock(), unlock(), locked(), tryLock(), - wakeUpGuiThread() + wakeUpCoreThread() \row \i Miscellaneous @@ -393,21 +393,19 @@ TQ_EXPORT TQt::HANDLE tqt_get_application_thread_id() TQEventLoop *TQApplication::eventloop = 0; // application event loop #endif -#ifdef TQT_THREAD_SUPPORT TQEventLoop* TQApplication::currentEventLoop() { - TQThread* thread = TQThread::currentThreadObject(); +#ifdef TQT_THREAD_SUPPORT + TQThread *thread = TQThread::currentThreadObject(); if (thread) { if (thread->d) { return thread->d->eventLoop; } } return NULL; -} #else -TQEventLoop* TQApplication::currentEventLoop() { return TQApplication::eventloop; -} #endif +} #ifndef TQT_NO_ACCEL extern bool tqt_dispatchAccelEvent( TQWidget*, TQKeyEvent* ); // def in tqaccel.cpp @@ -569,8 +567,8 @@ public: // avoid warning from TQThread d->running = false; - // do some cleanup, namely clean up the thread-local storage associated with the GUI thread - TQThreadInstance::finishGuiThread(d); + // do some cleanup, namely clean up the thread-local storage associated with the core thread + TQThreadInstance::finishCoreThread(d); } static TQCoreApplicationThread* self() { return tqt_gui_thread_self; } @@ -1081,18 +1079,18 @@ TQApplication::TQApplication(Display *dpy, int argc, char **argv, #endif // TQ_WS_X11 #ifdef TQT_THREAD_SUPPORT -TQThread* TQApplication::guiThread() { +TQThread* TQApplication::coreThread() { return TQCoreApplicationThread::self(); } +#endif -bool TQApplication::isGuiThread() { - return (TQThread::currentThreadObject() == guiThread()); -} +bool TQApplication::isCoreThread() { +#ifdef TQT_THREAD_SUPPORT + return (TQThread::currentThreadObject() == coreThread()); #else -bool TQApplication::isGuiThread() { return true; -} #endif +} void TQApplication::init_precmdline() { @@ -2472,12 +2470,12 @@ void TQApplication::aboutTQt() /*! - \fn void TQApplication::guiThreadAwake() + \fn void TQApplication::coreThreadAwake() This signal is emitted after the event loop returns from a function that could block. - \sa wakeUpGuiThread() + \sa wakeUpCoreThread() */ @@ -3078,7 +3076,7 @@ int TQApplication::exec() void TQApplication::exit( int retcode ) { #ifdef TQT_THREAD_SUPPORT - TQThread* thread = tqApp->guiThread(); + TQThread* thread = tqApp->coreThread(); if (thread) { if (thread->d) { if (thread->d->eventLoop) { @@ -3087,7 +3085,7 @@ void TQApplication::exit( int retcode ) } } #else - tqApp->eventLoop()->exit( retcode ); + TQApplication::eventLoop()->exit( retcode ); #endif // TQT_THREAD_SUPPORT } @@ -3134,13 +3132,24 @@ int TQApplication::loopLevel() const /*! - Wakes up the GUI thread. + Wakes up the core application thread. - \sa guiThreadAwake() \link threads.html Thread Support in TQt\endlink + \sa coreThreadAwake() \link threads.html Thread Support in TQt\endlink */ -void TQApplication::wakeUpGuiThread() +void TQApplication::wakeUpCoreThread() { - eventLoop()->wakeUp(); +#ifdef TQT_THREAD_SUPPORT + TQThread* thread = tqApp->coreThread(); + if (thread) { + if (thread->d) { + if (thread->d->eventLoop) { + thread->d->eventLoop->wakeUp(); + } + } + } +#else + TQApplication::eventLoop()->wakeUp(); +#endif // TQT_THREAD_SUPPORT } /*! @@ -3866,7 +3875,7 @@ static void tqThreadTerminationHandlerRecursive( TQObject* object, TQThread* ori */ void TQApplication::threadTerminationHandler( TQThread *originThread ) { TQMutexLocker locker( tqt_mutex ); - TQThread* destinationThread = guiThread(); + TQThread* destinationThread = coreThread(); const TQObjectList* objects = TQObject::objectTrees(); for ( TQObjectListIt objectit( *objects ) ; *objectit; ++objectit ) { tqThreadTerminationHandlerRecursive((*objectit), originThread, destinationThread); @@ -4189,10 +4198,10 @@ bool TQApplication::desktopSettingsAware() */ -/*! \fn void TQApplication::unlock(bool wakeUpGui) +/*! \fn void TQApplication::unlock(bool wakeUpCore) - Unlock the TQt Library Mutex. If \a wakeUpGui is TRUE (the default), - then the GUI thread will be woken with TQApplication::wakeUpGuiThread(). + Unlock the TQt Library Mutex. If \a wakeUpCore is TRUE (the default), + then the core application thread will be woken with TQApplication::wakeUpCoreThread(). \sa lock(), locked() \link threads.html Thread Support in TQt\endlink */ @@ -4229,12 +4238,12 @@ void TQApplication::lock() tqt_mutex->lock(); } -void TQApplication::unlock(bool wakeUpGui) +void TQApplication::unlock(bool wakeUpCore) { tqt_mutex->unlock(); - if (wakeUpGui) - wakeUpGuiThread(); + if (wakeUpCore) + wakeUpCoreThread(); } bool TQApplication::locked() diff --git a/src/kernel/tqapplication.h b/src/kernel/tqapplication.h index 289df5abf..f8915c5b9 100644 --- a/src/kernel/tqapplication.h +++ b/src/kernel/tqapplication.h @@ -285,10 +285,10 @@ public: void changeAllInputContext( const TQString & ); static bool x11_apply_settings(); #endif - void wakeUpGuiThread(); + void wakeUpCoreThread(); #if defined(TQT_THREAD_SUPPORT) void lock(); - void unlock(bool wakeUpGui = TRUE); + void unlock(bool wakeUpCore = TRUE); bool locked(); bool tryLock(); #endif @@ -296,7 +296,7 @@ public: signals: void lastWindowClosed(); void aboutToQuit(); - void guiThreadAwake(); + void coreThreadAwake(); public slots: void quit(); @@ -436,10 +436,10 @@ private: public: #ifdef TQT_THREAD_SUPPORT - static TQThread* guiThread(); + static TQThread* coreThread(); static void threadTerminationHandler( TQThread * ); #endif - static bool isGuiThread(); + static bool isCoreThread(); }; inline int TQApplication::argc() const diff --git a/src/kernel/tqeventloop_x11.cpp b/src/kernel/tqeventloop_x11.cpp index 09fc42e82..97fb570dd 100644 --- a/src/kernel/tqeventloop_x11.cpp +++ b/src/kernel/tqeventloop_x11.cpp @@ -146,7 +146,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) if ( tqt_is_gui_used ) { TQApplication::sendPostedEvents(); - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { // Two loops so that posted events accumulate while ( XPending( TQPaintDevice::x11AppDisplay() ) ) { // also flushes output buffer @@ -220,7 +220,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) static timeval zerotm; timeval *tm = 0; if ( ! ( flags & ExcludeTimers ) ) { - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { tm = qt_wait_timer(); // wait for TQt timers if ( !canWait ) { if ( !tm ) @@ -235,7 +235,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) // Socket notifier events are only activated in the core application event loop, // so filter them out in other event loops. int highest = 0; - if (!(flags & ExcludeSocketNotifiers) && TQApplication::isGuiThread()) { + if (!(flags & ExcludeSocketNotifiers) && TQApplication::isCoreThread()) { // return the highest fd we can wait for input on if ( d->sn_highest >= 0 ) { // has socket notifier(s) if ( d->sn_vec[0].list && ! d->sn_vec[0].list->isEmpty() ) @@ -266,7 +266,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) FD_ZERO( &d->sn_vec[2].select_fds ); } - if ( tqt_is_gui_used && TQApplication::isGuiThread() ) { + if ( tqt_is_gui_used && TQApplication::isCoreThread() ) { // select for events on the event socket - only on X11 FD_SET( d->xfd, &d->sn_vec[0].select_fds ); highest = TQMAX( highest, d->xfd ); @@ -308,7 +308,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) // we are awake, broadcast it emit awake(); - emit tqApp->guiThreadAwake(); + emit tqApp->coreThreadAwake(); if (nsel == -1) { if (errno == EBADF) { @@ -374,7 +374,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) // activate socket notifiers if (!(flags & ExcludeSocketNotifiers) && nsel > 0 && d->sn_highest >= 0 && - TQApplication::isGuiThread()) { + TQApplication::isCoreThread()) { // if select says data is ready on any socket, then set the socket notifier // to pending int i; @@ -396,7 +396,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags ) // activate timers if ( ! ( flags & ExcludeTimers ) ) { - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { nevents += activateTimers(); } } @@ -415,7 +415,7 @@ bool TQEventLoop::hasPendingEvents() const #endif // TQT_THREAD_SUPPORT extern uint qGlobalPostedEventsCount(); // from tqapplication.cpp - return ( qGlobalPostedEventsCount() || ( (tqt_is_gui_used && TQApplication::isGuiThread()) ? XPending( TQPaintDevice::x11AppDisplay() ) : 0)); + return ( qGlobalPostedEventsCount() || ( (tqt_is_gui_used && TQApplication::isCoreThread()) ? XPending( TQPaintDevice::x11AppDisplay() ) : 0)); } void TQEventLoop::appStartingUp() diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp index ba638aac9..fa449ca07 100644 --- a/src/kernel/tqeventloop_x11_glib.cpp +++ b/src/kernel/tqeventloop_x11_glib.cpp @@ -207,7 +207,7 @@ void TQEventLoop::init() // intitialize the X11 parts of the event loop d->xfd = -1; - if ( tqt_is_gui_used && TQApplication::isGuiThread() ) { + if ( tqt_is_gui_used && TQApplication::isCoreThread() ) { d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() ); } @@ -231,7 +231,7 @@ void TQEventLoop::init() d->gSource = (GSource*)qtGSource; // poll for X11 events - if ( tqt_is_gui_used && TQApplication::isGuiThread() ) { + if ( tqt_is_gui_used && TQApplication::isCoreThread() ) { d->x_gPollFD.fd = d->xfd; d->x_gPollFD.events = G_IO_IN | G_IO_HUP | G_IO_ERR; g_source_add_poll(d->gSource, &d->x_gPollFD); @@ -315,7 +315,7 @@ bool TQEventLoop::processX11Events() if ( tqt_is_gui_used ) { TQApplication::sendPostedEvents(); - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { // Two loops so that posted events accumulate while ( XPending( TQPaintDevice::x11AppDisplay() ) ) { // also flushes output buffer @@ -407,7 +407,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) static timeval zerotm; timeval *tm = 0; if ( ! ( flags & ExcludeTimers ) ) { - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { tm = qt_wait_timer(); // wait for TQt timers if ( !canWait ) { if ( !tm ) { @@ -422,7 +422,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) // Include or exclude SocketNotifiers (by setting or cleaning poll events) // Socket notifier events are only activated in the core application event loop, // so filter them out in other event loops. - if (!(flags & ExcludeSocketNotifiers) && TQApplication::isGuiThread()) { + if (!(flags & ExcludeSocketNotifiers) && TQApplication::isCoreThread()) { TQPtrListIterator<TQSockNotGPollFD> it( d->sn_list ); TQSockNotGPollFD *sn; while ( (sn=it.current()) ) { @@ -496,7 +496,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) { ProcessEventsFlags flags = d->pev_flags; // Socketnotifier events? - if (!(flags & ExcludeSocketNotifiers) && TQApplication::isGuiThread()) + if (!(flags & ExcludeSocketNotifiers) && TQApplication::isCoreThread()) { TQPtrListIterator<TQSockNotGPollFD> it( d->sn_list ); TQSockNotGPollFD *sn; @@ -531,7 +531,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) { } // check if we have timers to activate? - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { timeval *tm = qt_wait_timer(); if (tm && (tm->tv_sec == 0 && tm->tv_usec == 0 )) { #ifdef DEBUG_QT_GLIBMAINLOOP @@ -571,7 +571,7 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) { // we are awake, broadcast it emit awake(); - emit tqApp->guiThreadAwake(); + emit tqApp->coreThreadAwake(); // some other thread woke us up... consume the data on the thread pipe so that // select doesn't immediately return next time @@ -603,14 +603,14 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) { } // } - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { nevents += activateSocketNotifiers(); } } // activate timers if ( ! ( flags & ExcludeTimers ) ) { - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { nevents += activateTimers(); } } @@ -653,14 +653,14 @@ bool TQEventLoop::hasPendingEvents() const #endif // TQT_THREAD_SUPPORT extern uint qGlobalPostedEventsCount(); // from tqapplication.cpp - return ( qGlobalPostedEventsCount() || ( (tqt_is_gui_used && TQApplication::isGuiThread()) ? XPending( TQPaintDevice::x11AppDisplay() ) : 0)); + return ( qGlobalPostedEventsCount() || ( (tqt_is_gui_used && TQApplication::isCoreThread()) ? XPending( TQPaintDevice::x11AppDisplay() ) : 0)); } void TQEventLoop::appStartingUp() { if ( tqt_is_gui_used ) { d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() ); - if ( (d->x_gPollFD.fd == -1) && TQApplication::isGuiThread() ) { + if ( (d->x_gPollFD.fd == -1) && TQApplication::isCoreThread() ) { d->x_gPollFD.fd = d->xfd; d->x_gPollFD.events = G_IO_IN | G_IO_HUP | G_IO_ERR; g_source_add_poll(d->gSource, &d->x_gPollFD); diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp index 5b2d3fd68..ec31f6cd6 100644 --- a/src/kernel/tqobject.cpp +++ b/src/kernel/tqobject.cpp @@ -184,7 +184,7 @@ void TQObject::setThreadObject_helper(TQThread *targetThread) Changes the thread affinity for this object and its children. The object cannot be moved if it has a parent. Event processing will continue in the \a targetThread. To move an object to the main - thread, pass TQApplication::guiThread() as the \a targetThread. + thread, pass TQApplication::coreThread() as the \a targetThread. Note that all active timers for the object will be reset. The timers are first stopped in the current thread and restarted (with diff --git a/src/kernel/tqthread_unix.cpp b/src/kernel/tqthread_unix.cpp index a84663df6..27b8ec7af 100644 --- a/src/kernel/tqthread_unix.cpp +++ b/src/kernel/tqthread_unix.cpp @@ -171,7 +171,7 @@ void TQThreadInstance::finish( void * ) } } -void TQThreadInstance::finishGuiThread(TQThreadInstance *d) { +void TQThreadInstance::finishCoreThread(TQThreadInstance *d) { TQThreadStorageData::finish( d->thread_storage ); d->thread_storage = 0; } diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp index 71fe8ea16..ac56e302a 100644 --- a/src/kernel/tqwidget.cpp +++ b/src/kernel/tqwidget.cpp @@ -882,13 +882,12 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n ) { #if defined(QT_CHECK_STATE) && !defined(TQ_WS_WIN) if ( tqApp->type() == TQApplication::Tty ) { - tqWarning( "TQWidget: Cannot create a TQWidget when no GUI " - "is being used" ); + tqFatal( "TQWidget: Cannot create a TQWidget when no GUI is being used" ); } #endif #if defined(TQT_THREAD_SUPPORT) && defined(QT_CHECK_STATE) - if (TQThread::currentThreadObject() != TQApplication::guiThread()) { + if (!TQApplication::isCoreThread()) { tqFatal( "TQWidget: Cannot create a TQWidget outside of the main GUI thread" ); } #endif diff --git a/src/tools/tqthreadinstance_p.h b/src/tools/tqthreadinstance_p.h index 2778d5daa..ea34f3c5f 100644 --- a/src/tools/tqthreadinstance_p.h +++ b/src/tools/tqthreadinstance_p.h @@ -100,7 +100,7 @@ public: static void finish( TQThreadInstance * ); #endif // Q_OS_WIN32 - static void finishGuiThread( TQThreadInstance *d ); + static void finishCoreThread( TQThreadInstance *d ); TQEventLoop* eventLoop; int cleanupType; diff --git a/src/tools/tqthreadstorage_unix.cpp b/src/tools/tqthreadstorage_unix.cpp index 977ccf6bb..71b10822b 100644 --- a/src/tools/tqthreadstorage_unix.cpp +++ b/src/tools/tqthreadstorage_unix.cpp @@ -90,14 +90,14 @@ TQThreadStorageData::TQThreadStorageData( void (*func)( void * ) ) TQThreadStorageData::~TQThreadStorageData() { - // The Gui thread has static storage duration, TQThreadStorage are almost always static (it's + // The core thread has static storage duration, TQThreadStorage are almost always static (it's // technically possible to allocate those in the heap, but it's quite unusual). It's impossible // to predict whichever of those one gets destroyed first, but usually it's a TQThreadStorage. // In that case we have to do the cleanup of its storage ourself as it won't be possible after // nullifying the destructor below. - TQThread *guiThread = TQApplication::guiThread(); - if (guiThread) { - TQThreadInstance *d = guiThread->d; + TQThread *coreThread = TQApplication::coreThread(); + if (coreThread) { + TQThreadInstance *d = coreThread->d; TQMutexLocker locker( d->mutex() ); if (d->thread_storage && d->thread_storage[id]) { thread_storage_usage[id].func( d->thread_storage[id] ); |