summaryrefslogtreecommitdiffstats
path: root/src/widgets/qmenubar.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-02-12 14:08:42 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-02-12 14:08:52 +0900
commit67bff2edcacb208dc44dcd521386bef686dc6dbf (patch)
tree538584042585402a59d4b1464b117033778ccc28 /src/widgets/qmenubar.cpp
parentfb401a891f1b426e9419c0cb16403df407138611 (diff)
downloadtqt3-67bff2edcacb208dc44dcd521386bef686dc6dbf.tar.gz
tqt3-67bff2edcacb208dc44dcd521386bef686dc6dbf.zip
Replace Q_WS_* defines with TQ_WS_* equivalents
This is the first part of the replacement process. Usage of Q_WS_* has been replaced with the equivalent TQ_WS_*. Definition of Q_WS_* has been mirrored into TQ_WS_* defines, to allow TDE code to continue building till replacement is carried over to all other modules. Once that is completed, the original Q_WS_* defines will be removed. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/widgets/qmenubar.cpp')
-rw-r--r--src/widgets/qmenubar.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/widgets/qmenubar.cpp b/src/widgets/qmenubar.cpp
index c0051ef6e..ae31bfe89 100644
--- a/src/widgets/qmenubar.cpp
+++ b/src/widgets/qmenubar.cpp
@@ -71,7 +71,7 @@ public:
static bool inMenu = FALSE;
#endif
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
extern int qt_xfocusout_grab_counter; // defined in qapplication_x11.cpp
#endif
@@ -265,7 +265,7 @@ static const int gtkItemVMargin = 8;
TQMenuBar::TQMenuBar( TQWidget *parent, const char *name )
: TQFrame( parent, name, WNoAutoErase )
{
-#if defined( Q_WS_MAC ) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined( TQ_WS_MAC ) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
mac_eaten_menubar = FALSE;
mac_d = 0;
macCreateNativeMenubar();
@@ -334,7 +334,7 @@ TQMenuBar::~TQMenuBar()
#ifndef TQT_NO_ACCEL
delete autoaccel;
#endif
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
macRemoveNativeMenubar();
#endif
if ( irects ) // Avoid purify complaint.
@@ -354,7 +354,7 @@ void TQMenuBar::updateItem( int id )
repaint( irects[i], FALSE );
}
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
static bool fromFrameChange = FALSE;
#endif
@@ -436,7 +436,7 @@ void TQMenuBar::performDelayedStateChanged()
void TQMenuBar::performDelayedChanges()
{
-#if defined(Q_WS_MAC) && !defined(TQMAC_MENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_MENUBAR_NO_NATIVE)
// I must do this here as the values change in the function below.
bool needMacUpdate = (pendingDelayedContentsChanges || pendingDelayedStateChanges);
#endif
@@ -444,7 +444,7 @@ void TQMenuBar::performDelayedChanges()
performDelayedContentsChanged();
if( pendingDelayedStateChanges )
performDelayedStateChanged();
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
if(mac_eaten_menubar && needMacUpdate) {
macDirtyNativeMenubar();
@@ -485,11 +485,11 @@ void TQMenuBar::menuDelPopup( TQPopupMenu *popup )
void TQMenuBar::frameChanged()
{
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
fromFrameChange = TRUE;
#endif
menuContentsChanged();
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
fromFrameChange = FALSE;
#endif
}
@@ -580,7 +580,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
// Start waiting for Alt release on focus widget
} else if ( ke->stateAfter() == AltButton ) {
waitforalt = 1;
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
TQMenuData::d->aInt = qt_xfocusout_grab_counter;
#endif
if ( f && f != object )
@@ -606,7 +606,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
(object->parent() == 0 && ((TQWidget*)object)->focusWidget() == 0) ) {
if ( waitforalt && event->type() == TQEvent::KeyRelease &&
( ke->key() == Key_Alt || ke->key() == Key_Meta )
-#if defined(Q_WS_X11)
+#if defined(TQ_WS_X11)
&& TQMenuData::d->aInt == qt_xfocusout_grab_counter
#endif
) {
@@ -664,7 +664,7 @@ void TQMenuBar::subHighlighted( int id )
#ifndef TQT_NO_ACCEL
void TQMenuBar::accelActivated( int id )
{
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
if(mac_eaten_menubar)
return;
#endif
@@ -823,7 +823,7 @@ void TQMenuBar::show()
performDelayedChanges();
calculateRects();
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
if(mac_eaten_menubar) {
//If all elements are invisible no reason for me to be visible either
bool all_hidden = TRUE;
@@ -942,7 +942,7 @@ int TQMenuBar::calculateRects( int max_width )
int w=0, h=0;
if ( !mi->isVisible()
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
|| (mac_eaten_menubar && !mi->custom() && !mi->widget() )
#endif
) {
@@ -978,14 +978,14 @@ int TQMenuBar::calculateRects( int max_width )
separator = i; //### only motif?
}
if ( !mi->isSeparator() || mi->widget() ) {
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
if ( !mac_eaten_menubar ) {
#endif
if ( gs == MotifStyle && mi->isVisible() ) {
w += 2*motifItemFrame;
h += 2*motifItemFrame;
}
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
}
#endif
@@ -1189,7 +1189,7 @@ void TQMenuBar::drawContents( TQPainter *p )
style().drawControl(TQStyle::CE_MenuBarEmptyArea, p, this, contentsRect(), g);
p->restore();
-#if defined(Q_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
+#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
if ( !mac_eaten_menubar )
#endif
{