Fix kdelibs FTBFS on native TQt3

pull/16/head
Timothy Pearson 13 years ago
parent 3fbca5d9a4
commit fb652a2be4

@ -672,7 +672,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
if( !success ) if( !success )
{ {
cerr_ << "ERROR: Couldn't attach to DCOP server!" << endl; cerr_ << "ERROR: Couldn't attach to DCOP server!" << endl;
retval = QMAX( retval, 1 ); retval = TQMAX( retval, 1 );
if( users.isEmpty() ) if( users.isEmpty() )
break; break;
else else
@ -725,7 +725,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
if( !buf.isNull() ) if( !buf.isNull() )
{ {
int res = callFunction( app, objid, function, params ); int res = callFunction( app, objid, function, params );
retval = QMAX( retval, res ); retval = TQMAX( retval, res );
} }
} }
} }
@ -734,7 +734,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
// Just call function // Just call function
// cout_ << "call " << app << ", " << objid << ", " << function << ", (params)" << endl; // cout_ << "call " << app << ", " << objid << ", " << function << ", (params)" << endl;
int res = callFunction( app, objid, function, params ); int res = callFunction( app, objid, function, params );
retval = QMAX( retval, res ); retval = TQMAX( retval, res );
} }
break; break;
} }

@ -782,7 +782,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
emit attachFailed(TQString::tqfromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName)); emit attachFailed(TQString::tqfromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName));
return false; return false;
} }
int size = QMIN( (qint64)1024, f.size() ); // protection against a huge file int size = TQMIN( (qint64)1024, f.size() ); // protection against a huge file
TQCString contents( size+1 ); TQCString contents( size+1 );
if ( f.readBlock( contents.data(), size ) != size ) if ( f.readBlock( contents.data(), size ) != size )
{ {

@ -76,7 +76,7 @@ private:
TQ_UINT32 *m_starttab; TQ_UINT32 *m_starttab;
TQ_UINT32 *m_lengthtab; TQ_UINT32 *m_lengthtab;
QByteArray m_data; TQByteArray m_data;
TQByteArray::Iterator m_pos; TQByteArray::Iterator m_pos;
RLEMap m_rlemap; RLEMap m_rlemap;
TQPtrVector<RLEData> m_rlevector; TQPtrVector<RLEData> m_rlevector;

@ -194,7 +194,7 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
m_pZ->append( child ); m_pZ->append( child );
int nChildAreaMinW = 0, nChildAreaMinH = 0; int nChildAreaMinW = 0, nChildAreaMinH = 0;
int nChildAreaMaxW = QWIDGETSIZE_MAX, nChildAreaMaxH = QWIDGETSIZE_MAX; int nChildAreaMaxW = TQWIDGETSIZE_MAX, nChildAreaMaxH = TQWIDGETSIZE_MAX;
if ( topChildMaximized && child->m_pClient ) if ( topChildMaximized && child->m_pClient )
{ {
//the former top child is maximized, so maximize the new one //the former top child is maximized, so maximize the new one

@ -323,8 +323,8 @@ void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos )
// Calculate the minimum width & height // Calculate the minimum width & height
int minWidth = 0; int minWidth = 0;
int minHeight = 0; int minHeight = 0;
int maxWidth = QWIDGETSIZE_MAX; int maxWidth = TQWIDGETSIZE_MAX;
int maxHeight = QWIDGETSIZE_MAX; int maxHeight = TQWIDGETSIZE_MAX;
// it could be the client forces the childframe to enlarge its minimum size // it could be the client forces the childframe to enlarge its minimum size
if ( m_pClient ) if ( m_pClient )
@ -562,7 +562,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
{ {
m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode ); m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode );
} }
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX );
// reset to maximize-captionbar // reset to maximize-captionbar
m_pMaximize->setPixmap( *m_pRestoreButtonPixmap ); m_pMaximize->setPixmap( *m_pRestoreButtonPixmap );
m_pMinimize->setPixmap( *m_pMinButtonPixmap ); m_pMinimize->setPixmap( *m_pMinButtonPixmap );
@ -582,7 +582,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
m_pClient->m_stateChanged = true; m_pClient->m_stateChanged = true;
m_state = state; m_state = state;
// client min / max size / layout behavior don't change // client min / max size / layout behavior don't change
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX );
m_pMaximize->setPixmap( *m_pRestoreButtonPixmap ); m_pMaximize->setPixmap( *m_pRestoreButtonPixmap );
int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER; int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER;
int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR +
@ -664,7 +664,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
else else
{ {
m_pManager->setMinimumSize( 0, 0 ); m_pManager->setMinimumSize( 0, 0 );
m_pManager->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); m_pManager->setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX );
} }
} }
@ -782,7 +782,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
TQSize mincs = w->tqminimumSize(); TQSize mincs = w->tqminimumSize();
TQSize maxcs = w->tqmaximumSize(); TQSize maxcs = w->tqmaximumSize();
w->setMinimumSize( 0, 0 ); w->setMinimumSize( 0, 0 );
w->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); w->setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX );
// min/max sizes, flags, DND get lost. :-( // min/max sizes, flags, DND get lost. :-(
w->reparent( this, 0, pnt2, w->isVisible() ); w->reparent( this, 0, pnt2, w->isVisible() );

@ -729,12 +729,12 @@ void KMdiChildView::setMaximumSize( int maxw, int maxh )
if ( mdiParent() && mdiParent()->state() == KMdiChildFrm::Normal ) if ( mdiParent() && mdiParent()->state() == KMdiChildFrm::Normal )
{ {
int w = maxw + KMDI_CHILDFRM_DOUBLE_BORDER; int w = maxw + KMDI_CHILDFRM_DOUBLE_BORDER;
if ( w > QWIDGETSIZE_MAX ) if ( w > TQWIDGETSIZE_MAX )
w = QWIDGETSIZE_MAX; w = TQWIDGETSIZE_MAX;
int h = maxh + KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + mdiParent() ->captionHeight(); int h = maxh + KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + mdiParent() ->captionHeight();
if ( h > QWIDGETSIZE_MAX ) if ( h > TQWIDGETSIZE_MAX )
h = QWIDGETSIZE_MAX; h = TQWIDGETSIZE_MAX;
mdiParent()->setMaximumSize( w, h ); mdiParent()->setMaximumSize( w, h );
} }

@ -355,7 +355,7 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe,
case PE_Splitter: case PE_Splitter:
{ {
QPen oldPen = p->pen(); TQPen oldPen = p->pen();
p->setPen(cg.background()); p->setPen(cg.background());
p->drawRect(r); p->drawRect(r);
p->setPen( cg.light() ); p->setPen( cg.light() );

@ -956,7 +956,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe,
if (kickerMode) if (kickerMode)
{ {
if (p->device() && p->device()->devType() == TQInternal::Widget && if (p->device() && p->device()->devType() == TQInternal::Widget &&
TQCString(static_cast<TQWidget*>(static_cast<QWidget*>(static_cast<QPaintDevice*>(p->tqdevice())))->className()) == "FittsLawFrame" ) TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->tqdevice()))->className()) == "FittsLawFrame" )
{ {
int x2 = x + r.width() - 1; int x2 = x + r.width() - 1;
int y2 = y + r.height() - 1; int y2 = y + r.height() - 1;

@ -231,7 +231,7 @@ union kthemeKey{
unsigned int cacheKey; unsigned int cacheKey;
}; };
#define KDE_TQBITMAP_TO_TQPAINTDEVICE(x) static_cast<const TQPaintDevice*>(static_cast<const QPaintDevice*>(static_cast<const QPixmap*>(static_cast<const QBitmap*>(x)))) #define KDE_TQBITMAP_TO_TQPAINTDEVICE(x) TQT_TQPAINTDEVICE_CONST(static_cast<const TQPixmap*>(static_cast<const TQBitmap*>(x)))
void KThemeBase::generateBorderPix( int i ) void KThemeBase::generateBorderPix( int i )
{ {

@ -575,7 +575,7 @@ protected:
virtual int tqstyleHint( StyleHint sh, virtual int tqstyleHint( StyleHint sh,
const TQWidget *widget = 0, const TQWidget *widget = 0,
const TQStyleOption& opt = TQStyleOption::Default, const TQStyleOption& opt = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const TQStyleHintReturn* returnData = 0 ) const
{ {
return KStyle::tqstyleHint( sh, return KStyle::tqstyleHint( sh,
widget, widget,

@ -2185,7 +2185,7 @@ void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h,
p->fillRect( x, y, w, h, fillBrush ); p->fillRect( x, y, w, h, fillBrush );
} }
int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, QStyleHintReturn *shr ) const int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, TQStyleHintReturn *shr ) const
{ {
switch ( sh ) switch ( sh )
{ {

@ -122,7 +122,7 @@ public:
virtual int tqstyleHint( StyleHint sh, virtual int tqstyleHint( StyleHint sh,
const TQWidget *widget = 0, const TQWidget *widget = 0,
const TQStyleOption& = TQStyleOption::Default, const TQStyleOption& = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const; TQStyleHintReturn* returnData = 0 ) const;
virtual TQSize tqsizeFromContents( ContentsType contents, virtual TQSize tqsizeFromContents( ContentsType contents,
const TQWidget *widget, const TQWidget *widget,

@ -886,7 +886,7 @@ void PlastikStyle::renderPanel(TQPainter *p,
if (kickerMode && if (kickerMode &&
p->tqdevice() && p->tqdevice()->devType() == TQInternal::Widget && p->tqdevice() && p->tqdevice()->devType() == TQInternal::Widget &&
TQCString(static_cast<TQWidget*>(static_cast<QWidget*>(static_cast<QPaintDevice*>(p->tqdevice())))->className()) == "FittsLawFrame") { TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->tqdevice()))->className()) == "FittsLawFrame") {
// Stolen wholesale from Keramik. I don't like it, but oh well. // Stolen wholesale from Keramik. I don't like it, but oh well.
if (sunken) { if (sunken) {
const TQCOORD corners[] = { x2, y, x2, y2, x, y2, x, y }; const TQCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
@ -1819,7 +1819,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe,
// -------------- // --------------
case PE_Splitter: { case PE_Splitter: {
// highlight on mouse over // highlight on mouse over
TQColor color = (static_cast<QPaintDevice*>(static_cast<QWidget*>(hoverWidget)) == static_cast<QPaintDevice*>(p->tqdevice()))?TQColor(cg.background().light(100+_contrast)):cg.background(); TQColor color = (static_cast<TQPaintDevice*>(static_cast<TQWidget*>(hoverWidget)) == static_cast<TQPaintDevice*>(p->tqdevice()))?TQColor(cg.background().light(100+_contrast)):cg.background();
p->fillRect(r, color); p->fillRect(r, color);
if (w > h) { if (w > h) {
if (h > 4) { if (h > 4) {

@ -40,7 +40,7 @@ namespace KUnitTest
void SlotTester::invokeMember(const TQString &str) void SlotTester::invokeMember(const TQString &str)
{ {
TQString slotname = TQString::number(QSLOT_CODE) + str; TQString slotname = TQString::number(TQSLOT_CODE) + str;
connect(this, TQT_SIGNAL(invoke()), this, slotname.ascii()); connect(this, TQT_SIGNAL(invoke()), this, slotname.ascii());
emit invoke(); emit invoke();
disconnect(this, TQT_SIGNAL(invoke()), this, slotname.ascii()); disconnect(this, TQT_SIGNAL(invoke()), this, slotname.ascii());

@ -1774,7 +1774,7 @@ KApplication::~KApplication()
#ifdef Q_WS_X11 #ifdef Q_WS_X11
class KAppX11HackWidget: public QWidget class KAppX11HackWidget: public TQWidget
{ {
public: public:
bool publicx11Event( XEvent * e) { return x11Event( e ); } bool publicx11Event( XEvent * e) { return x11Event( e ); }
@ -2786,14 +2786,14 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const
// put the whole address lists into RFC2047 encoded blobs; technically // put the whole address lists into RFC2047 encoded blobs; technically
// this isn't correct, but KMail understands it nonetheless // this isn't correct, but KMail understands it nonetheless
to = TQString( "=?utf8?b?%1?=" ) to = TQString( "=?utf8?b?%1?=" )
.arg( QString(KCodecs::base64Encode( _to.utf8(), false )) ); .arg( TQString(KCodecs::base64Encode( _to.utf8(), false )) );
} }
if ( !_cc.isEmpty() ) if ( !_cc.isEmpty() )
cc = TQString( "=?utf8?b?%1?=" ) cc = TQString( "=?utf8?b?%1?=" )
.arg( QString(KCodecs::base64Encode( _cc.utf8(), false )) ); .arg( TQString(KCodecs::base64Encode( _cc.utf8(), false )) );
if ( !_bcc.isEmpty() ) if ( !_bcc.isEmpty() )
bcc = TQString( "=?utf8?b?%1?=" ) bcc = TQString( "=?utf8?b?%1?=" )
.arg( QString(KCodecs::base64Encode( _bcc.utf8(), false )) ); .arg( TQString(KCodecs::base64Encode( _bcc.utf8(), false )) );
} else { } else {
to = _to; to = _to;
cc = _cc; cc = _cc;

@ -112,7 +112,7 @@ static TQString encode( const TQString& segment, int encoding_offset, int encodi
} }
else else
new_segment[ new_length++ ] = (QChar)local[i]; new_segment[ new_length++ ] = (TQChar)local[i];
} }
TQString result = TQString(new_segment, new_length); TQString result = TQString(new_segment, new_length);
@ -183,7 +183,7 @@ static TQString lazy_encode( const TQString& segment, bool encodeAt=true )
(character == '?') || // Start of query delimiter (character == '?') || // Start of query delimiter
((character == '@') && encodeAt) || // Username delimiter ((character == '@') && encodeAt) || // Username delimiter
(character == '#') || // Start of reference delimiter (character == '#') || // Start of reference delimiter
((character == 32) && (i+1 == old_length || segment[i+1] == (QChar)' '))) // A trailing space ((character == 32) && (i+1 == old_length || segment[i+1] == (TQChar)' '))) // A trailing space
{ {
new_segment[ new_length++ ] = '%'; new_segment[ new_length++ ] = '%';
@ -657,7 +657,7 @@ void KURL::parse( const TQString& _url, int encoding_hint )
goto NodeErr; goto NodeErr;
if (alpha && buf[pos]==':' && (len==2 || (len>2 && (buf[pos+1]=='/' || buf[pos+1]=='\\')))) if (alpha && buf[pos]==':' && (len==2 || (len>2 && (buf[pos+1]=='/' || buf[pos+1]=='\\'))))
#else #else
if ( x == (QChar)'/' ) if ( x == (TQChar)'/' )
#endif #endif
{ {
// A slash means we immediately proceed to parse it as a file URL. // A slash means we immediately proceed to parse it as a file URL.
@ -673,9 +673,9 @@ void KURL::parse( const TQString& _url, int encoding_hint )
// '.' is not currently accepted, because current KURL may be confused. // '.' is not currently accepted, because current KURL may be confused.
// Proceed with :// :/ or : // Proceed with :// :/ or :
while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) ||
buf[pos] == (QChar)'+' || buf[pos] == (QChar)'-')) pos++; buf[pos] == (TQChar)'+' || buf[pos] == (TQChar)'-')) pos++;
if (pos < len && buf[pos] == (QChar)':' ) if (pos < len && buf[pos] == (TQChar)':' )
{ {
m_strProtocol = TQString( orig, pos ).lower(); m_strProtocol = TQString( orig, pos ).lower();
if ( m_iUriMode == Auto ) if ( m_iUriMode == Auto )
@ -715,10 +715,10 @@ void KURL::parseRawURI( const TQString& _url, int encoding_hint )
// '.' is not currently accepted, because current KURL may be confused. // '.' is not currently accepted, because current KURL may be confused.
// Proceed with : // Proceed with :
while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) ||
buf[pos] == (QChar)'+' || buf[pos] == (QChar)'-')) pos++; buf[pos] == (TQChar)'+' || buf[pos] == (TQChar)'-')) pos++;
// Note that m_strProtocol is already set here, so we just skip over the protocol. // Note that m_strProtocol is already set here, so we just skip over the protocol.
if (pos < len && buf[pos] == (QChar)':' ) if (pos < len && buf[pos] == (TQChar)':' )
pos++; pos++;
else { // can't happen, the caller checked all this already else { // can't happen, the caller checked all this already
reset(); reset();
@ -776,9 +776,9 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
const bool alpha = isalpha((int)x); const bool alpha = isalpha((int)x);
if (alpha && len<2) if (alpha && len<2)
goto NodeErr; goto NodeErr;
if (alpha && buf[pos]==(QChar)':' && (len==2 || (len>2 && (buf[pos+1]==(QChar)'/' || buf[pos+1]==(QChar)'\\')))) if (alpha && buf[pos]==(TQChar)':' && (len==2 || (len>2 && (buf[pos+1]==(TQChar)'/' || buf[pos+1]==(TQChar)'\\'))))
#else #else
if ( x == (QChar)'/' ) if ( x == (TQChar)'/' )
#endif #endif
goto Node9; goto Node9;
if ( !isalpha( (int)x ) ) if ( !isalpha( (int)x ) )
@ -788,14 +788,14 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
// '.' is not currently accepted, because current KURL may be confused. // '.' is not currently accepted, because current KURL may be confused.
// Proceed with :// :/ or : // Proceed with :// :/ or :
while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) ||
buf[pos] == (QChar)'+' || buf[pos] == (QChar)'-')) pos++; buf[pos] == (TQChar)'+' || buf[pos] == (TQChar)'-')) pos++;
// Note that m_strProtocol is already set here, so we just skip over the protocol. // Note that m_strProtocol is already set here, so we just skip over the protocol.
if ( pos+2 < len && buf[pos] == (QChar)':' && buf[pos+1] == (QChar)'/' && buf[pos+2] == (QChar)'/' ) if ( pos+2 < len && buf[pos] == (TQChar)':' && buf[pos+1] == (TQChar)'/' && buf[pos+2] == (TQChar)'/' )
{ {
pos += 3; pos += 3;
} }
else if (pos+1 < len && buf[pos] == (QChar)':' ) // Need to always compare length()-1 otherwise KURL passes "http:" as legal!! else if (pos+1 < len && buf[pos] == (TQChar)':' ) // Need to always compare length()-1 otherwise KURL passes "http:" as legal!!
{ {
pos++; pos++;
start = pos; start = pos;
@ -810,13 +810,13 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
start = pos; start = pos;
// Node 4: Accept any amount of characters. // Node 4: Accept any amount of characters.
if (buf[pos] == (QChar)'[') // An IPv6 host follows. if (buf[pos] == (TQChar)'[') // An IPv6 host follows.
goto Node8; goto Node8;
// Terminate on / or @ or ? or # or " or ; or < // Terminate on / or @ or ? or # or " or ; or <
x = buf[pos]; x = buf[pos];
while( (x != (QChar)':') && (x != (QChar)'@') && (x != (QChar)'/') && (x != (QChar)'?') && (x != (QChar)'#') ) while( (x != (TQChar)':') && (x != (TQChar)'@') && (x != (TQChar)'/') && (x != (TQChar)'?') && (x != (TQChar)'#') )
{ {
if ((x == (QChar)'\"') || (x == (QChar)';') || (x == (QChar)'<')) if ((x == (TQChar)'\"') || (x == (TQChar)';') || (x == (TQChar)'<'))
badHostName = true; badHostName = true;
if (++pos == len) if (++pos == len)
break; break;
@ -830,13 +830,13 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
setHost(decode(TQString( buf + start, pos - start ), encoding_hint)); setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
goto NodeOk; goto NodeOk;
} }
if ( x == (QChar)'@' ) if ( x == (TQChar)'@' )
{ {
m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint); m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint);
pos++; pos++;
goto Node7; goto Node7;
} }
else if ( (x == (QChar)'/') || (x == (QChar)'?') || (x == (QChar)'#')) else if ( (x == (TQChar)'/') || (x == (TQChar)'?') || (x == (TQChar)'#'))
{ {
if (badHostName) if (badHostName)
goto NodeErr; goto NodeErr;
@ -845,7 +845,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
start = pos; start = pos;
goto Node9; goto Node9;
} }
else if ( x != (QChar)':' ) else if ( x != (TQChar)':' )
goto NodeErr; goto NodeErr;
m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint); m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint);
pos++; pos++;
@ -857,13 +857,13 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
// Node 6: Read everything until @, /, ? or # // Node 6: Read everything until @, /, ? or #
while( (pos < len) && while( (pos < len) &&
(buf[pos] != (QChar)'@') && (buf[pos] != (TQChar)'@') &&
(buf[pos] != (QChar)'/') && (buf[pos] != (TQChar)'/') &&
(buf[pos] != (QChar)'?') && (buf[pos] != (TQChar)'?') &&
(buf[pos] != (QChar)'#')) pos++; (buf[pos] != (TQChar)'#')) pos++;
// If we now have a '@' the ':' seperates user and password. // If we now have a '@' the ':' seperates user and password.
// Otherwise it seperates host and port. // Otherwise it seperates host and port.
if ( (pos == len) || (buf[pos] != (QChar)'@') ) if ( (pos == len) || (buf[pos] != (TQChar)'@') )
{ {
// Ok the : was used to separate host and port // Ok the : was used to separate host and port
if (badHostName) if (badHostName)
@ -877,10 +877,10 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
goto NodeOk; goto NodeOk;
// there is more after the digits // there is more after the digits
pos -= strlen(endptr); pos -= strlen(endptr);
if ((buf[pos] != (QChar)'@') && if ((buf[pos] != (TQChar)'@') &&
(buf[pos] != (QChar)'/') && (buf[pos] != (TQChar)'/') &&
(buf[pos] != (QChar)'?') && (buf[pos] != (TQChar)'?') &&
(buf[pos] != (QChar)'#')) (buf[pos] != (TQChar)'#'))
goto NodeErr; goto NodeErr;
start = pos; start = pos;
@ -895,7 +895,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
goto NodeErr; goto NodeErr;
Node8: Node8:
if (buf[pos] == (QChar)'[') if (buf[pos] == (TQChar)'[')
{ {
// IPv6 address // IPv6 address
start = ++pos; // Skip '[' start = ++pos; // Skip '['
@ -908,9 +908,9 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
// Node 8a: Read everything until ] or terminate // Node 8a: Read everything until ] or terminate
badHostName = false; badHostName = false;
x = buf[pos]; x = buf[pos];
while( (x != (QChar)']') ) while( (x != (TQChar)']') )
{ {
if ((x == (QChar)'\"') || (x == (QChar)';') || (x == (QChar)'<')) if ((x == (TQChar)'\"') || (x == (TQChar)';') || (x == (TQChar)'<'))
badHostName = true; badHostName = true;
if (++pos == len) if (++pos == len)
{ {
@ -934,9 +934,9 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
// Node 8b: Read everything until / : or terminate // Node 8b: Read everything until / : or terminate
badHostName = false; badHostName = false;
x = buf[pos]; x = buf[pos];
while( (x != (QChar)':') && (x != (QChar)'@') && (x != (QChar)'/') && (x != (QChar)'?') && (x != (QChar)'#') ) while( (x != (TQChar)':') && (x != (TQChar)'@') && (x != (TQChar)'/') && (x != (TQChar)'?') && (x != (TQChar)'#') )
{ {
if ((x == (QChar)'\"') || (x == (QChar)';') || (x == (QChar)'<')) if ((x == (TQChar)'\"') || (x == (TQChar)';') || (x == (TQChar)'<'))
badHostName = true; badHostName = true;
if (++pos == len) if (++pos == len)
break; break;
@ -952,12 +952,12 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
setHost(decode(TQString( buf + start, pos - start ), encoding_hint)); setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
} }
x = buf[pos]; x = buf[pos];
if ( x == (QChar)'/' || x == (QChar)'#' || x == (QChar)'?' ) if ( x == (TQChar)'/' || x == (TQChar)'#' || x == (TQChar)'?' )
{ {
start = pos; start = pos;
goto Node9; goto Node9;
} }
else if ( x != (QChar)':' ) else if ( x != (TQChar)':' )
goto NodeErr; goto NodeErr;
pos++; pos++;
@ -978,7 +978,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
Node9: // parse path until query or reference reached Node9: // parse path until query or reference reached
while( pos < len && buf[pos] != (QChar)'#' && buf[pos]!=(QChar)'?' ) pos++; while( pos < len && buf[pos] != (TQChar)'#' && buf[pos]!=(TQChar)'?' ) pos++;
tmp = TQString( buf + start, pos - start ); tmp = TQString( buf + start, pos - start );
//kdDebug(126)<<" setting encoded path to:"<<tmp<<endl; //kdDebug(126)<<" setting encoded path to:"<<tmp<<endl;
@ -988,14 +988,14 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
goto NodeOk; goto NodeOk;
//Node10: // parse query or reference depending on what comes first //Node10: // parse query or reference depending on what comes first
delim = (buf[pos++]==(QChar)'#'?(QChar)'?':(QChar)'#'); delim = (buf[pos++]==(TQChar)'#'?(TQChar)'?':(TQChar)'#');
start = pos; start = pos;
while(pos < len && buf[pos]!=delim ) pos++; while(pos < len && buf[pos]!=delim ) pos++;
tmp = TQString(buf + start, pos - start); tmp = TQString(buf + start, pos - start);
if (delim==(QChar)'#') if (delim==(TQChar)'#')
_setQuery(tmp, encoding_hint); _setQuery(tmp, encoding_hint);
else else
m_strRef_encoded = tmp; m_strRef_encoded = tmp;
@ -1005,7 +1005,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
//Node11: // feed the rest into the remaining variable //Node11: // feed the rest into the remaining variable
tmp = TQString( buf + pos + 1, len - pos - 1); tmp = TQString( buf + pos + 1, len - pos - 1);
if (delim == (QChar)'#') if (delim == (TQChar)'#')
m_strRef_encoded = tmp; m_strRef_encoded = tmp;
else else
_setQuery(tmp, encoding_hint); _setQuery(tmp, encoding_hint);
@ -1219,7 +1219,7 @@ void KURL::setFileName( const TQString& _txt )
{ {
m_strRef_encoded = TQString::null; m_strRef_encoded = TQString::null;
int i = 0; int i = 0;
while( _txt[i] == (QChar)'/' ) ++i; while( _txt[i] == (TQChar)'/' ) ++i;
TQString tmp; TQString tmp;
if ( i ) if ( i )
tmp = _txt.mid( i ); tmp = _txt.mid( i );
@ -1271,7 +1271,7 @@ static TQString trailingSlash( int _trailing, const TQString &path )
else if ( _trailing == 1 ) else if ( _trailing == 1 )
{ {
int len = result.length(); int len = result.length();
if ( (len == 0) || (result[ len - 1 ] != (QChar)'/') ) if ( (len == 0) || (result[ len - 1 ] != (TQChar)'/') )
result += "/"; result += "/";
return result; return result;
} }
@ -1280,7 +1280,7 @@ static TQString trailingSlash( int _trailing, const TQString &path )
if ( result == "/" ) if ( result == "/" )
return result; return result;
int len = result.length(); int len = result.length();
while (len > 1 && result[ len - 1 ] == (QChar)'/') while (len > 1 && result[ len - 1 ] == (TQChar)'/')
{ {
len--; len--;
} }
@ -1749,14 +1749,14 @@ void KURL::addPath( const TQString& _txt )
int i = 0; int i = 0;
int len = m_strPath.length(); int len = m_strPath.length();
// Add the trailing '/' if it is missing // Add the trailing '/' if it is missing
if ( _txt[0] != (QChar)'/' && ( len == 0 || m_strPath[ len - 1 ] != (QChar)'/' ) ) if ( _txt[0] != (TQChar)'/' && ( len == 0 || m_strPath[ len - 1 ] != (TQChar)'/' ) )
m_strPath += "/"; m_strPath += "/";
// No double '/' characters // No double '/' characters
i = 0; i = 0;
if ( len != 0 && m_strPath[ len - 1 ] == (QChar)'/' ) if ( len != 0 && m_strPath[ len - 1 ] == (TQChar)'/' )
{ {
while( _txt[i] == (QChar)'/' ) while( _txt[i] == (TQChar)'/' )
++i; ++i;
} }
@ -1812,7 +1812,7 @@ bool KURL::cd( const TQString& _dir )
} }
// absolute path ? // absolute path ?
if ( _dir[0] == (QChar)'/' ) if ( _dir[0] == (TQChar)'/' )
{ {
m_strPath_encoded = TQString::null; m_strPath_encoded = TQString::null;
m_strPath = _dir; m_strPath = _dir;
@ -1822,7 +1822,7 @@ bool KURL::cd( const TQString& _dir )
} }
// Users home directory on the local disk ? // Users home directory on the local disk ?
if ( ( _dir[0] == (QChar)'~' ) && ( m_strProtocol == fileProt )) if ( ( _dir[0] == (TQChar)'~' ) && ( m_strProtocol == fileProt ))
{ {
m_strPath_encoded = TQString::null; m_strPath_encoded = TQString::null;
m_strPath = TQDir::homeDirPath(); m_strPath = TQDir::homeDirPath();
@ -2011,7 +2011,7 @@ void KURL::setDirectory( const TQString &dir)
void KURL::setQuery( const TQString &_txt, int encoding_hint) void KURL::setQuery( const TQString &_txt, int encoding_hint)
{ {
if (_txt[0] == (QChar)'?') if (_txt[0] == (TQChar)'?')
_setQuery( _txt.length() > 1 ? _txt.mid(1) : "" /*empty, not null*/, encoding_hint ); _setQuery( _txt.length() > 1 ? _txt.mid(1) : "" /*empty, not null*/, encoding_hint );
else else
_setQuery( _txt, encoding_hint ); _setQuery( _txt, encoding_hint );
@ -2249,7 +2249,7 @@ KURL KURL::fromPathOrURL( const TQString& text )
static TQString _relativePath(const TQString &base_dir, const TQString &path, bool &isParent) static TQString _relativePath(const TQString &base_dir, const TQString &path, bool &isParent)
{ {
TQString _base_dir(TQDir::cleanDirPath(base_dir)); TQString _base_dir(TQDir::cleanDirPath(base_dir));
TQString _path(TQDir::cleanDirPath(path.isEmpty() || (path[0] != (QChar)'/') ? _base_dir+"/"+path : path)); TQString _path(TQDir::cleanDirPath(path.isEmpty() || (path[0] != (TQChar)'/') ? _base_dir+"/"+path : path));
if (_base_dir.isEmpty()) if (_base_dir.isEmpty())
return _path; return _path;
@ -2262,7 +2262,7 @@ static TQString _relativePath(const TQString &base_dir, const TQString &path, bo
// Find where they meet // Find where they meet
uint level = 0; uint level = 0;
uint maxLevel = QMIN(list1.count(), list2.count()); uint maxLevel = TQMIN(list1.count(), list2.count());
while((level < maxLevel) && (list1[level] == list2[level])) level++; while((level < maxLevel) && (list1[level] == list2[level])) level++;
TQString result; TQString result;
@ -2274,7 +2274,7 @@ static TQString _relativePath(const TQString &base_dir, const TQString &path, bo
for(uint i = level; i < list2.count(); i++) for(uint i = level; i < list2.count(); i++)
result.append(list2[i]).append("/"); result.append(list2[i]).append("/");
if ((level < list2.count()) && (path[path.length()-1] != (QChar)'/')) if ((level < list2.count()) && (path[path.length()-1] != (TQChar)'/'))
result.truncate(result.length()-1); result.truncate(result.length()-1);
isParent = (level == list1.count()); isParent = (level == list1.count());

@ -302,7 +302,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
int h = (size.height()+1)>>1; int h = (size.height()+1)>>1;
for (y = 0; y < h; y++) { for (y = 0; y < h; y++) {
unsigned int *sl1 = (unsigned int *)image.scanLine(y); unsigned int *sl1 = (unsigned int *)image.scanLine(y);
unsigned int *sl2 = (unsigned int *)image.scanLine(QMAX(size.height()-y-1, y)); unsigned int *sl2 = (unsigned int *)image.scanLine(TQMAX(size.height()-y-1, y));
int w = (size.width()+1)>>1; int w = (size.width()+1)>>1;
int x2 = size.width()-1; int x2 = size.width()-1;
@ -316,19 +316,19 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
} }
if (eff == RectangleGradient) { if (eff == RectangleGradient) {
rgb = tqRgb(rcb - rSign * rgb = tqRgb(rcb - rSign *
QMAX(xtable[0][x], ytable[0][y]) * 2, TQMAX(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign * gcb - gSign *
QMAX(xtable[1][x], ytable[1][y]) * 2, TQMAX(xtable[1][x], ytable[1][y]) * 2,
bcb - bSign * bcb - bSign *
QMAX(xtable[2][x], ytable[2][y]) * 2); TQMAX(xtable[2][x], ytable[2][y]) * 2);
} }
if (eff == PipeCrossGradient) { if (eff == PipeCrossGradient) {
rgb = tqRgb(rcb - rSign * rgb = tqRgb(rcb - rSign *
QMIN(xtable[0][x], ytable[0][y]) * 2, TQMIN(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign * gcb - gSign *
QMIN(xtable[1][x], ytable[1][y]) * 2, TQMIN(xtable[1][x], ytable[1][y]) * 2,
bcb - bSign * bcb - bSign *
QMIN(xtable[2][x], ytable[2][y]) * 2); TQMIN(xtable[2][x], ytable[2][y]) * 2);
} }
if (eff == EllipticGradient) { if (eff == EllipticGradient) {
rgb = tqRgb(rcb - rSign * rgb = tqRgb(rcb - rSign *
@ -565,20 +565,20 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
else if (eff == RectangleGradient) else if (eff == RectangleGradient)
{ {
scanline[x] = tqRgb(rcb - rSign * scanline[x] = tqRgb(rcb - rSign *
QMAX(xtable[0][x], ytable[0][y]) * 2, TQMAX(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign * gcb - gSign *
QMAX(xtable[1][x], ytable[1][y]) * 2, TQMAX(xtable[1][x], ytable[1][y]) * 2,
bcb - bSign * bcb - bSign *
QMAX(xtable[2][x], ytable[2][y]) * 2); TQMAX(xtable[2][x], ytable[2][y]) * 2);
} }
else if (eff == PipeCrossGradient) else if (eff == PipeCrossGradient)
{ {
scanline[x] = tqRgb(rcb - rSign * scanline[x] = tqRgb(rcb - rSign *
QMIN(xtable[0][x], ytable[0][y]) * 2, TQMIN(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign * gcb - gSign *
QMIN(xtable[1][x], ytable[1][y]) * 2, TQMIN(xtable[1][x], ytable[1][y]) * 2,
bcb - bSign * bcb - bSign *
QMIN(xtable[2][x], ytable[2][y]) * 2); TQMIN(xtable[2][x], ytable[2][y]) * 2);
} }
else if (eff == EllipticGradient) else if (eff == EllipticGradient)
{ {
@ -1666,7 +1666,7 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
yvar = var / image_height * (image_height - y*2/unaffected -1); yvar = var / image_height * (image_height - y*2/unaffected -1);
if (eff == RectangleGradient) if (eff == RectangleGradient)
intensity = initial_intensity + QMAX(xvar, yvar); intensity = initial_intensity + TQMAX(xvar, yvar);
else else
intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar); intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar);
if (intensity > 1) intensity = 1; if (intensity > 1) intensity = 1;
@ -1710,7 +1710,7 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
yvar = var / image_height * (image_height - y*2/unaffected -1); yvar = var / image_height * (image_height - y*2/unaffected -1);
if (eff == RectangleGradient) if (eff == RectangleGradient)
intensity = initial_intensity + QMAX(xvar, yvar); intensity = initial_intensity + TQMAX(xvar, yvar);
else else
intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar); intensity = initial_intensity + sqrt(xvar * xvar + yvar * yvar);
if (intensity > 1) intensity = 1; if (intensity > 1) intensity = 1;
@ -1974,7 +1974,7 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca,
int b1 = ca.blue(); int b2 = cb.blue(); int b1 = ca.blue(); int b2 = cb.blue();
int min = 0, max = 255; int min = 0, max = 255;
QRgb col; TQRgb col;
// Get minimum and maximum greylevel. // Get minimum and maximum greylevel.
if (img.numColors()) { if (img.numColors()) {
@ -1982,8 +1982,8 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca,
for (int i = 0; i < img.numColors(); i++) { for (int i = 0; i < img.numColors(); i++) {
col = img.color(i); col = img.color(i);
int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3; int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3;
min = QMIN(min, mean); min = TQMIN(min, mean);
max = QMAX(max, mean); max = TQMAX(max, mean);
} }
} else { } else {
// truecolor // truecolor
@ -1991,8 +1991,8 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca,
for (int x=0; x < img.width(); x++) { for (int x=0; x < img.width(); x++) {
col = img.pixel(x, y); col = img.pixel(x, y);
int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3; int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3;
min = QMIN(min, mean); min = TQMIN(min, mean);
max = QMAX(max, mean); max = TQMAX(max, mean);
} }
} }
@ -2070,7 +2070,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
int green = color.green(); int green = color.green();
int blue = color.blue(); int blue = color.blue();
QRgb col; TQRgb col;
int r, g, b, cr, cg, cb; int r, g, b, cr, cg, cb;
if (img.depth() <= 8) { if (img.depth() <= 8) {
@ -2096,7 +2096,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
} else { } else {
// truecolor // truecolor
for (int y=0; y<img.height(); y++) { for (int y=0; y<img.height(); y++) {
QRgb *data = (QRgb *) img.scanLine(y); TQRgb *data = (TQRgb *) img.scanLine(y);
for (int x=0; x<img.width(); x++) { for (int x=0; x<img.width(); x++) {
col = *data; col = *data;
cr = tqRed(col); cg = tqGreen(col); cb = tqBlue(col); cr = tqRed(col); cg = tqGreen(col); cb = tqBlue(col);
@ -2490,15 +2490,15 @@ bool KImageEffect::blend(
// output.setAlphaBuffer(true); // I should do some benchmarks to see if // output.setAlphaBuffer(true); // I should do some benchmarks to see if
// this is worth the effort // this is worth the effort
register QRgb *i, *o, *b; register TQRgb *i, *o, *b;
register int a; register int a;
register int j,k; register int j,k;
for (j=0; j<ch; j++) for (j=0; j<ch; j++)
{ {
b=reinterpret_cast<QRgb *>(&const_cast<TQImage&>(lower).scanLine(y+j) [ (x+cw) << 2 ]); b=reinterpret_cast<TQRgb *>(&const_cast<TQImage&>(lower).scanLine(y+j) [ (x+cw) << 2 ]);
i=reinterpret_cast<QRgb *>(&const_cast<TQImage&>(upper).scanLine(cy+j)[ (cx+cw) << 2 ]); i=reinterpret_cast<TQRgb *>(&const_cast<TQImage&>(upper).scanLine(cy+j)[ (cx+cw) << 2 ]);
o=reinterpret_cast<QRgb *>(&const_cast<TQImage&>(output).scanLine(j) [ cw << 2 ]); o=reinterpret_cast<TQRgb *>(&const_cast<TQImage&>(output).scanLine(j) [ cw << 2 ]);
k=cw-1; k=cw-1;
--b; --i; --o; --b; --i; --o;
@ -2598,15 +2598,15 @@ void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset
{ {
// clip rect // clip rect
TQRect lr = lowerRect & lower.rect(); TQRect lr = lowerRect & lower.rect();
lr.setWidth( QMIN(lr.width(), upper.width()-upperOffset.x()) ); lr.setWidth( TQMIN(lr.width(), upper.width()-upperOffset.x()) );
lr.setHeight( QMIN(lr.height(), upper.height()-upperOffset.y()) ); lr.setHeight( TQMIN(lr.height(), upper.height()-upperOffset.y()) );
if ( !lr.isValid() ) return; if ( !lr.isValid() ) return;
// blend // blend
for (int y = 0; y < lr.height(); y++) { for (int y = 0; y < lr.height(); y++) {
for (int x = 0; x < lr.width(); x++) { for (int x = 0; x < lr.width(); x++) {
QRgb *b = reinterpret_cast<QRgb*>(const_cast<TQImage&>(lower).scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb)); TQRgb *b = reinterpret_cast<TQRgb*>(const_cast<TQImage&>(lower).scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(TQRgb));
QRgb *d = reinterpret_cast<QRgb*>(const_cast<TQImage&>(upper).scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb)); TQRgb *d = reinterpret_cast<TQRgb*>(const_cast<TQImage&>(upper).scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(TQRgb));
int a = tqAlpha(*d); int a = tqAlpha(*d);
*b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8), *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8),
tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8), tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8),
@ -2620,15 +2620,15 @@ void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset
{ {
// clip rect // clip rect
TQRect lr = lowerRect & lower.rect(); TQRect lr = lowerRect & lower.rect();
lr.setWidth( QMIN(lr.width(), upper.width()-upperOffset.x()) ); lr.setWidth( TQMIN(lr.width(), upper.width()-upperOffset.x()) );
lr.setHeight( QMIN(lr.height(), upper.height()-upperOffset.y()) ); lr.setHeight( TQMIN(lr.height(), upper.height()-upperOffset.y()) );
if ( !lr.isValid() ) return; if ( !lr.isValid() ) return;
// blend // blend
for (int y = 0; y < lr.height(); y++) { for (int y = 0; y < lr.height(); y++) {
for (int x = 0; x < lr.width(); x++) { for (int x = 0; x < lr.width(); x++) {
QRgb *b = reinterpret_cast<QRgb*>(const_cast<TQImage&>(lower).scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb)); TQRgb *b = reinterpret_cast<TQRgb*>(const_cast<TQImage&>(lower).scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(TQRgb));
QRgb *d = reinterpret_cast<QRgb*>(const_cast<TQImage&>(upper).scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb)); TQRgb *d = reinterpret_cast<TQRgb*>(const_cast<TQImage&>(upper).scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(TQRgb));
int a = tqRound(opacity * tqAlpha(*d)); int a = tqRound(opacity * tqAlpha(*d));
*b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8), *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8),
tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8), tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8),
@ -2708,7 +2708,7 @@ void KImageEffect::blendOnLower(TQImage &upper, TQImage &lower,
TQRect r = computeDestinationRect(lower.size(), disposition, upper); TQRect r = computeDestinationRect(lower.size(), disposition, upper);
for (int y = r.top(); y<r.bottom(); y += upper.height()) for (int y = r.top(); y<r.bottom(); y += upper.height())
for (int x = r.left(); x<r.right(); x += upper.width()) for (int x = r.left(); x<r.right(); x += upper.width())
blendOnLower(upper, TQPoint(-QMIN(x, 0), -QMIN(y, 0)), blendOnLower(upper, TQPoint(-TQMIN(x, 0), -TQMIN(y, 0)),
lower, TQRect(x, y, upper.width(), upper.height()), opacity); lower, TQRect(x, y, upper.width(), upper.height()), opacity);
} }
@ -2791,7 +2791,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
} }
else if(depth == 1) { else if(depth == 1) {
int r = src.bitOrder() == TQImage::LittleEndian; int r = src.bitOrder() == TQImage::LittleEndian;
memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(QRgb)); memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb));
for(int y=0; y < h; ++y){ for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y); unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[y]); unsigned char *srcData = src.scanLine(y_offset[y]);
@ -2806,7 +2806,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
} }
} }
else{ // PseudoClass source image else{ // PseudoClass source image
memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(QRgb)); memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb));
for(int y=0; y < h; ++y){ for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y); unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[y]); unsigned char *srcData = src.scanLine(y_offset[y]);
@ -3469,8 +3469,8 @@ TQImage KImageEffect::spread(TQImage &src, unsigned int amount)
for(x=0; x < src.width(); x++){ for(x=0; x < src.width(); x++){
x_distance = x + ((rand() & (amount+1))-quantum); x_distance = x + ((rand() & (amount+1))-quantum);
y_distance = y + ((rand() & (amount+1))-quantum); y_distance = y + ((rand() & (amount+1))-quantum);
x_distance = QMIN(x_distance, src.width()-1); x_distance = TQMIN(x_distance, src.width()-1);
y_distance = QMIN(y_distance, src.height()-1); y_distance = TQMIN(y_distance, src.height()-1);
if(x_distance < 0) if(x_distance < 0)
x_distance = 0; x_distance = 0;
if(y_distance < 0) if(y_distance < 0)
@ -3489,8 +3489,8 @@ TQImage KImageEffect::spread(TQImage &src, unsigned int amount)
for(x=0; x < src.width(); x++){ for(x=0; x < src.width(); x++){
x_distance = x + ((rand() & (amount+1))-quantum); x_distance = x + ((rand() & (amount+1))-quantum);
y_distance = y + ((rand() & (amount+1))-quantum); y_distance = y + ((rand() & (amount+1))-quantum);
x_distance = QMIN(x_distance, src.width()-1); x_distance = TQMIN(x_distance, src.width()-1);
y_distance = QMIN(y_distance, src.height()-1); y_distance = TQMIN(y_distance, src.height()-1);
if(x_distance < 0) if(x_distance < 0)
x_distance = 0; x_distance = 0;
if(y_distance < 0) if(y_distance < 0)
@ -3516,7 +3516,7 @@ TQImage KImageEffect::swirl(TQImage &src, double degrees,
// compute scaling factor // compute scaling factor
x_center = src.width()/2.0; x_center = src.width()/2.0;
y_center = src.height()/2.0; y_center = src.height()/2.0;
radius = QMAX(x_center,y_center); radius = TQMAX(x_center,y_center);
x_scale=1.0; x_scale=1.0;
y_scale=1.0; y_scale=1.0;
if(src.width() > src.height()) if(src.width() > src.height())
@ -4515,7 +4515,7 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth,
if(src.depth() > 8){ // DirectClass source image if(src.depth() > 8){ // DirectClass source image
unsigned int *p, *s0, *s1, *s2; unsigned int *p, *s0, *s1, *s2;
for(y=0; y < src.height(); ++y){ for(y=0; y < src.height(); ++y){
p = (unsigned int *)src.scanLine(QMIN(QMAX(y-1,0),src.height()-3)); p = (unsigned int *)src.scanLine(TQMIN(TQMAX(y-1,0),src.height()-3));
q = (unsigned int *)dest.scanLine(y); q = (unsigned int *)dest.scanLine(y);
// shade this row of pixels. // shade this row of pixels.
*q++=(*(p+src.width())); *q++=(*(p+src.width()));
@ -4568,7 +4568,7 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth,
int scanLineIdx; int scanLineIdx;
unsigned int *cTable = (unsigned int *)src.tqcolorTable(); unsigned int *cTable = (unsigned int *)src.tqcolorTable();
for(y=0; y < src.height(); ++y){ for(y=0; y < src.height(); ++y){
scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3); scanLineIdx = TQMIN(TQMAX(y-1,0),src.height()-3);
p = (unsigned char *)src.scanLine(scanLineIdx); p = (unsigned char *)src.scanLine(scanLineIdx);
q = (unsigned int *)dest.scanLine(y); q = (unsigned int *)dest.scanLine(y);
// shade this row of pixels. // shade this row of pixels.
@ -4811,7 +4811,7 @@ static void bumpmap_row( uint *src,
else { else {
shade = (int)( ndotl / sqrt(double(nx * nx + ny * ny + params->nz2)) ); shade = (int)( ndotl / sqrt(double(nx * nx + ny * ny + params->nz2)) );
shade = (int)( shade + QMAX(0.0, (255 * params->compensation - shade)) * shade = (int)( shade + TQMAX(0.0, (255 * params->compensation - shade)) *
ambient / 255 ); ambient / 255 );
} }
} }

@ -52,7 +52,7 @@ protected:
private: private:
int position_; int position_;
QPixmap pix_; TQPixmap pix_;
}; };
#endif #endif

@ -58,9 +58,9 @@ void ImagePreview::paintEvent(TQPaintEvent*){
QImage tmpImage = convertImage(image_,hue_,(bw_ ? 0 : saturation_),brightness_,gamma_); QImage tmpImage = convertImage(image_,hue_,(bw_ ? 0 : saturation_),brightness_,gamma_);
int x = (width()-tmpImage.width())/2, y = (height()-tmpImage.height())/2; int x = (width()-tmpImage.width())/2, y = (height()-tmpImage.height())/2;
QPixmap buffer(width(), height()); TQPixmap buffer(width(), height());
buffer.fill(parentWidget(), 0, 0); buffer.fill(parentWidget(), 0, 0);
QPainter p(&buffer); TQPainter p(&buffer);
p.drawImage(x,y,tmpImage); p.drawImage(x,y,tmpImage);
p.end(); p.end();

@ -446,7 +446,7 @@ char *yytext;
#include <tqvariant.h> #include <tqvariant.h>
#include <tqiodevice.h> #include <tqiodevice.h>
#define YYSTYPE QVariant #define YYSTYPE TQVariant
#include "fooparser.cpp.h" #include "fooparser.cpp.h"
#define yylval tdeprint_foomatic2lval #define yylval tdeprint_foomatic2lval

@ -20,7 +20,7 @@
#include <qvariant.h> #include <qvariant.h>
#include <qiodevice.h> #include <qiodevice.h>
#define YYSTYPE QVariant #define YYSTYPE TQVariant
#include "fooparser.cpp.h" #include "fooparser.cpp.h"
#define yylval tdeprint_foomatic2lval #define yylval tdeprint_foomatic2lval
@ -37,7 +37,7 @@
result = 0; \ result = 0; \
} }
QIODevice* tdeprint_foomatic2scanner_device = NULL; TQIODevice* tdeprint_foomatic2scanner_device = NULL;
%} %}
%option noyywrap %option noyywrap

@ -76,7 +76,7 @@ bool KMThreadJob::loadJobs()
line = t.readLine().stripWhiteSpace(); line = t.readLine().stripWhiteSpace();
if (line.isEmpty()) if (line.isEmpty())
continue; continue;
QStringList ll = TQStringList::split(CHARSEP,line,true); TQStringList ll = TQStringList::split(CHARSEP,line,true);
if (ll.count() == 5) if (ll.count() == 5)
{ {
KMJob *job = new KMJob(); KMJob *job = new KMJob();

@ -65,7 +65,7 @@ protected:
private: private:
KMManager *m_manager; KMManager *m_manager;
QDateTime m_checktime; TQDateTime m_checktime;
TQString m_defaultprinter; TQString m_defaultprinter;
}; };

@ -35,7 +35,7 @@ public:
} }
PrinterType type; PrinterType type;
QStringList printers; TQStringList printers;
TQWidget *parentWidget; TQWidget *parentWidget;
}; };

@ -858,7 +858,7 @@ void KPrintDialog::configChanged()
void KPrintDialog::expandDialog(bool on) void KPrintDialog::expandDialog(bool on)
{ {
QSize sz(size()); TQSize sz(size());
bool needResize(isVisible()); bool needResize(isVisible());
if (on) if (on)

@ -38,7 +38,7 @@ void KMIconViewItem::paintItem(TQPainter *p, const TQColorGroup& cg)
{ {
if (m_state != 0) if (m_state != 0)
{ {
QFont f(p->font()); TQFont f(p->font());
if (m_state & 0x1) f.setBold(true); if (m_state & 0x1) f.setBold(true);
if (m_state & 0x2) f.setItalic(true); if (m_state & 0x2) f.setItalic(true);
p->setFont(f); p->setFont(f);
@ -48,17 +48,17 @@ void KMIconViewItem::paintItem(TQPainter *p, const TQColorGroup& cg)
void KMIconViewItem::calcRect(const TQString&) void KMIconViewItem::calcRect(const TQString&)
{ {
QRect ir(rect()), pr, tr; TQRect ir(rect()), pr, tr;
// pixmap rect // pixmap rect
pr.setWidth(pixmap()->width()); pr.setWidth(pixmap()->width());
pr.setHeight(pixmap()->height()); pr.setHeight(pixmap()->height());
// text rect // text rect
QFont f(iconView()->font()); TQFont f(iconView()->font());
if (m_state & 0x1) f.setBold(true); if (m_state & 0x1) f.setBold(true);
if (m_state & 0x2) f.setItalic(true); if (m_state & 0x2) f.setItalic(true);
QFontMetrics fm(f); TQFontMetrics fm(f);
if (m_mode == TQIconView::Bottom) if (m_mode == TQIconView::Bottom)
tr = fm.boundingRect(0, 0, iconView()->maxItemWidth(), 0xFFFFFF, AlignHCenter|AlignTop|WordBreak|BreakAnywhere, text()+"X"); tr = fm.boundingRect(0, 0, iconView()->maxItemWidth(), 0xFFFFFF, AlignHCenter|AlignTop|WordBreak|BreakAnywhere, text()+"X");
else else

@ -96,7 +96,7 @@ void KMListViewItem::paintCell(TQPainter *p, const TQColorGroup& cg, int c, int
{ {
if (m_state != 0) if (m_state != 0)
{ {
QFont f(p->font()); TQFont f(p->font());
if (m_state & 0x1) f.setBold(true); if (m_state & 0x1) f.setBold(true);
if (m_state & 0x2) f.setItalic(true); if (m_state & 0x2) f.setItalic(true);
p->setFont(f); p->setFont(f);

@ -49,7 +49,7 @@ TQSize SidePixmap::tqsizeHint() const
void SidePixmap::drawContents(TQPainter *p) void SidePixmap::drawContents(TQPainter *p)
{ {
QRect r = contentsRect(); TQRect r = contentsRect();
if (r.height() <= m_side.height()) if (r.height() <= m_side.height())
{ {
// case where the main pixmap is enough, just center it // case where the main pixmap is enough, just center it

@ -36,7 +36,7 @@ protected:
void drawContents(TQPainter*); void drawContents(TQPainter*);
private: private:
QPixmap m_side, m_tileup, m_tiledown; TQPixmap m_side, m_tileup, m_tiledown;
}; };
#endif #endif

@ -93,15 +93,15 @@ void TreeListBoxItem::paint(TQPainter *p)
return; return;
} }
const QPixmap *pix = pixmap(); const TQPixmap *pix = pixmap();
QRect r = p->viewport(); TQRect r = p->viewport();
int h = height(listBox()); int h = height(listBox());
int xo = (m_depth * stepSize() + 2); int xo = (m_depth * stepSize() + 2);
int yo = (pix ? (h-pix->height())/2 : 0); int yo = (pix ? (h-pix->height())/2 : 0);
if (m_depth > 0) if (m_depth > 0)
{ {
QPen oldPen = p->pen(); TQPen oldPen = p->pen();
p->setPen(listBox()->tqcolorGroup().mid()); p->setPen(listBox()->tqcolorGroup().mid());
TreeListBoxItem *item = this; TreeListBoxItem *item = this;

@ -24,8 +24,8 @@ void urlToSmb(const KURL& url, TQString& work, TQString& server, TQString& print
{ {
if (url.protocol() != "smb") if (url.protocol() != "smb")
return; return;
QString h = url.host(); TQString h = url.host();
QStringList l = TQStringList::split('/', url.path(), false); TQStringList l = TQStringList::split('/', url.path(), false);
if (l.count() > 1) if (l.count() > 1)
{ {
work = h; work = h;

@ -1221,7 +1221,7 @@ KColorDialog::setDefaultColor( const TQColor& col )
d->l_right->addWidget( d->cbDefaultColor ); d->l_right->addWidget( d->cbDefaultColor );
mainWidget()->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); // cancel setFixedSize() mainWidget()->setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX ); // cancel setFixedSize()
d->tl_layout->activate(); d->tl_layout->activate();
mainWidget()->setMinimumSize( mainWidget()->tqsizeHint() ); mainWidget()->setMinimumSize( mainWidget()->tqsizeHint() );
disableResize(); disableResize();

@ -90,7 +90,7 @@ public:
~KMWSessionManaged() ~KMWSessionManaged()
{ {
} }
bool saveState( QSessionManager& ) bool saveState( TQSessionManager& )
{ {
KConfig* config = KApplication::kApplication()->sessionConfig(); KConfig* config = KApplication::kApplication()->sessionConfig();
if ( KMainWindow::memberList->first() ){ if ( KMainWindow::memberList->first() ){
@ -110,7 +110,7 @@ public:
return true; return true;
} }
bool commitData( QSessionManager& sm ) bool commitData( TQSessionManager& sm )
{ {
// not really a fast method but the only compatible one // not really a fast method but the only compatible one
if ( sm.allowsInteraction() ) { if ( sm.allowsInteraction() ) {

@ -215,7 +215,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
setLineWidth( d->lineWidth ); setLineWidth( d->lineWidth );
setMargin( d->margin ); setMargin( d->margin );
setMinimumSize( 0, 0 ); setMinimumSize( 0, 0 );
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX );
updateMenuBarSize(); updateMenuBarSize();
if ( parentWidget() ) if ( parentWidget() )
reparent( parentWidget(), TQPoint(0,0), !isHidden()); reparent( parentWidget(), TQPoint(0,0), !isHidden());
@ -314,7 +314,7 @@ void KMenuBar::updateFallbackSize()
d->fallback_mode = false; d->fallback_mode = false;
KWin::setStrut( winId(), 0, 0, 0, 0 ); KWin::setStrut( winId(), 0, 0, 0, 0 );
setMinimumSize( 0, 0 ); setMinimumSize( 0, 0 );
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); setMaximumSize( TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX );
updateMenuBarSize(); updateMenuBarSize();
} }
return; return;

@ -81,8 +81,8 @@ int KSeparator::orientation() const
void KSeparator::drawFrame(TQPainter *p) void KSeparator::drawFrame(TQPainter *p)
{ {
QPoint p1, p2; TQPoint p1, p2;
QRect r = frameRect(); TQRect r = frameRect();
const TQColorGroup & g = tqcolorGroup(); const TQColorGroup & g = tqcolorGroup();
if ( frameStyle() & HLine ) { if ( frameStyle() & HLine ) {

@ -176,7 +176,7 @@ static XKeyEvent last_key_event;
class QPublicWidget : public TQWidget class QPublicWidget : public TQWidget
{ {
public: public:
QTLWExtra* topData() { return TQWidget::topData(); } TQTLWExtra* topData() { return TQWidget::topData(); }
TQFocusData *focusData(){ return TQWidget::focusData(); } TQFocusData *focusData(){ return TQWidget::focusData(); }
bool focusNextPrev(bool b) { return focusNextPrevChild(b); } bool focusNextPrev(bool b) { return focusNextPrevChild(b); }
}; };
@ -443,7 +443,7 @@ static int qxembed_x11_event_filter( XEvent* e)
switch ( message) { switch ( message) {
case XEMBED_EMBEDDED_NOTIFY: { case XEMBED_EMBEDDED_NOTIFY: {
// L0675: We just have been embedded into a XEMBED aware widget. // L0675: We just have been embedded into a XEMBED aware widget.
QTLWExtra *extra = ((QPublicWidget*)w->tqtopLevelWidget())->topData(); TQTLWExtra *extra = ((QPublicWidget*)w->tqtopLevelWidget())->topData();
extra->embedded = 1; extra->embedded = 1;
#ifdef USE_QT4 #ifdef USE_QT4
// [FIXME] // [FIXME]

Loading…
Cancel
Save