Cleanup / additional type specifiers

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1160322 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 0761ef3c62
commit fe082a0028

@ -758,15 +758,15 @@ void KApplication::iceIOErrorHandler( _IceConn *conn )
exit( 1 ); exit( 1 );
} }
class KDETranslator : public QTranslator class KDETranslator : public TQTranslator
{ {
public: public:
KDETranslator(TQObject *parent) : QTranslator(parent, "kdetranslator") {} KDETranslator(TQObject *parent) : TQTranslator(parent, "kdetranslator") {}
virtual QTranslatorMessage findMessage(const char* context, virtual TQTranslatorMessage findMessage(const char* context,
const char *sourceText, const char *sourceText,
const char* message) const const char* message) const
{ {
QTranslatorMessage res; TQTranslatorMessage res;
res.setTranslation(KGlobal::locale()->translateQt(context, sourceText, message)); res.setTranslation(KGlobal::locale()->translateQt(context, sourceText, message));
return res; return res;
} }
@ -1344,7 +1344,7 @@ void KApplication::saveState( QSessionManager& sm )
discard << "rm" << locateLocal("config", sessionConfigName()); discard << "rm" << locateLocal("config", sessionConfigName());
sm.setDiscardCommand( discard ); sm.setDiscardCommand( discard );
} else { } else {
sm.setDiscardCommand( "" ); sm.setDiscardCommand( QStringList("") );
} }
if ( canceled ) if ( canceled )
@ -2030,7 +2030,7 @@ TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
if (v > 128) if (v > 128)
// dark bg, light fg - need a darker disabled fg // dark bg, light fg - need a darker disabled fg
disfg = disfg.dark(lowlightVal); disfg = disfg.dark(lowlightVal);
else if (disfg != black) else if (disfg != Qt::black)
// light bg, dark fg - need a lighter disabled fg - but only if !black // light bg, dark fg - need a lighter disabled fg - but only if !black
disfg = disfg.light(highlightVal); disfg = disfg.light(highlightVal);
else else
@ -2068,7 +2068,7 @@ TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
if (v > 128) if (v > 128)
// dark button, light buttonText - need a darker disabled buttonText // dark button, light buttonText - need a darker disabled buttonText
disbtntext = disbtntext.dark(lowlightVal); disbtntext = disbtntext.dark(lowlightVal);
else if (disbtntext != black) else if (disbtntext != Qt::black)
// light buttonText, dark button - need a lighter disabled buttonText - but only if !black // light buttonText, dark button - need a lighter disabled buttonText - but only if !black
disbtntext = disbtntext.light(highlightVal); disbtntext = disbtntext.light(highlightVal);
else else
@ -3191,7 +3191,7 @@ uint KApplication::mouseState()
return mousestate & 0xff00; return mousestate & 0xff00;
} }
Qt::ButtonState KApplication::keyboardMouseState() TQ_ButtonState KApplication::keyboardMouseState()
{ {
int ret = 0; int ret = 0;
#ifdef Q_WS_X11 #ifdef Q_WS_X11
@ -3203,35 +3203,35 @@ Qt::ButtonState KApplication::keyboardMouseState()
&root_x, &root_y, &win_x, &win_y, &state ); &root_x, &root_y, &win_x, &win_y, &state );
// transform the same way like Qt's qt_x11_translateButtonState() // transform the same way like Qt's qt_x11_translateButtonState()
if( state & Button1Mask ) if( state & Button1Mask )
ret |= LeftButton; ret |= TQ_LeftButton;
if( state & Button2Mask ) if( state & Button2Mask )
ret |= MidButton; ret |= TQ_MidButton;
if( state & Button3Mask ) if( state & Button3Mask )
ret |= RightButton; ret |= TQ_RightButton;
if( state & ShiftMask ) if( state & ShiftMask )
ret |= ShiftButton; ret |= TQ_ShiftButton;
if( state & ControlMask ) if( state & ControlMask )
ret |= ControlButton; ret |= TQ_ControlButton;
if( state & KKeyNative::modX( KKey::ALT )) if( state & KKeyNative::modX( KKey::ALT ))
ret |= AltButton; ret |= TQ_AltButton;
if( state & KKeyNative::modX( KKey::WIN )) if( state & KKeyNative::modX( KKey::WIN ))
ret |= MetaButton; ret |= TQ_MetaButton;
#elif defined(Q_WS_WIN) #elif defined(Q_WS_WIN)
const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON); const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON);
if (GetAsyncKeyState(VK_LBUTTON)) if (GetAsyncKeyState(VK_LBUTTON))
ret |= (mousebtn_swapped ? RightButton : LeftButton); ret |= (mousebtn_swapped ? RightButton : LeftButton);
if (GetAsyncKeyState(VK_MBUTTON)) if (GetAsyncKeyState(VK_MBUTTON))
ret |= MidButton; ret |= TQ_MidButton;
if (GetAsyncKeyState(VK_RBUTTON)) if (GetAsyncKeyState(VK_RBUTTON))
ret |= (mousebtn_swapped ? LeftButton : RightButton); ret |= (mousebtn_swapped ? TQ_LeftButton : TQ_RightButton);
if (GetAsyncKeyState(VK_SHIFT)) if (GetAsyncKeyState(VK_SHIFT))
ret |= ShiftButton; ret |= TQ_ShiftButton;
if (GetAsyncKeyState(VK_CONTROL)) if (GetAsyncKeyState(VK_CONTROL))
ret |= ControlButton; ret |= TQ_ControlButton;
if (GetAsyncKeyState(VK_MENU)) if (GetAsyncKeyState(VK_MENU))
ret |= AltButton; ret |= TQ_AltButton;
if (GetAsyncKeyState(VK_LWIN) || GetAsyncKeyState(VK_RWIN)) if (GetAsyncKeyState(VK_LWIN) || GetAsyncKeyState(VK_RWIN))
ret |= MetaButton; ret |= TQ_MetaButton;
#else #else
//TODO: other platforms //TODO: other platforms
#endif #endif

@ -30,7 +30,7 @@
#include <tqregexp.h> #include <tqregexp.h>
#include <tqwidget.h> #include <tqwidget.h>
#include <tqmetaobject.h> #include <tqmetaobject.h>
#include <private/qucomextra_p.h> #include <tqucomextra_p.h>
#include <kapplication.h> #include <kapplication.h>
#include <kdebug.h> #include <kdebug.h>
#include <kkeynative.h> #include <kkeynative.h>

@ -312,7 +312,7 @@ void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
/* /*
Grmbl. See TQDialog::show(). That should get fixed in Qt somehow. Grmbl. See TQDialog::show(). That should get fixed in Qt somehow.
*/ */
if( qt_cast< TQDialog* >( subwindow ) != NULL if( tqqt_cast< TQDialog* >( subwindow ) != NULL
&& subwindow->parentWidget() == NULL && subwindow->parentWidget() == NULL
&& kapp->mainWidget() != NULL ) && kapp->mainWidget() != NULL )
{ {

Loading…
Cancel
Save