Locked down more ambiguous datatypes

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

@ -90,7 +90,7 @@ class KAccelPrivate;
* @see KKeyDialog * @see KKeyDialog
*/ */
class KDECORE_EXPORT KAccel : public QAccel class KDECORE_EXPORT KAccel : public TQAccel
{ {
Q_OBJECT Q_OBJECT
public: public:

@ -457,7 +457,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress)) if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress))
{ {
static const KShortcut& _selectAll = KStdAccel::selectAll(); static const KShortcut& _selectAll = KStdAccel::selectAll();
TQLineEdit *edit = ::qt_cast<TQLineEdit *>(receiver); TQLineEdit *edit = tqqt_cast<TQLineEdit *>(receiver);
if (edit) if (edit)
{ {
// We have a keypress for a lineedit... // We have a keypress for a lineedit...
@ -495,7 +495,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
} }
} }
TQTextEdit *medit = ::qt_cast<TQTextEdit *>(receiver); TQTextEdit *medit = tqqt_cast<TQTextEdit *>(receiver);
if (medit) if (medit)
{ {
// We have a keypress for a multilineedit... // We have a keypress for a multilineedit...
@ -2009,13 +2009,13 @@ TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
TQColor kde34VisitedLink( 82, 24, 139 ); TQColor kde34VisitedLink( 82, 24, 139 );
TQColor background = config->readColorEntry( "background", &kde34Background ); TQColor background = config->readColorEntry( "background", &kde34Background );
TQColor foreground = config->readColorEntry( "foreground", &black ); TQColor foreground = config->readColorEntry( "foreground", tqblackptr );
TQColor button = config->readColorEntry( "buttonBackground", &kde34Button ); TQColor button = config->readColorEntry( "buttonBackground", &kde34Button );
TQColor buttonText = config->readColorEntry( "buttonForeground", &black ); TQColor buttonText = config->readColorEntry( "buttonForeground", tqblackptr );
TQColor highlight = config->readColorEntry( "selectBackground", &kde34Blue ); TQColor highlight = config->readColorEntry( "selectBackground", &kde34Blue );
TQColor highlightedText = config->readColorEntry( "selectForeground", &white ); TQColor highlightedText = config->readColorEntry( "selectForeground", tqwhiteptr );
TQColor base = config->readColorEntry( "windowBackground", &white ); TQColor base = config->readColorEntry( "windowBackground", tqwhiteptr );
TQColor baseText = config->readColorEntry( "windowForeground", &black ); TQColor baseText = config->readColorEntry( "windowForeground", tqblackptr );
TQColor link = config->readColorEntry( "linkColor", &kde34Link ); TQColor link = config->readColorEntry( "linkColor", &kde34Link );
TQColor visitedLink = config->readColorEntry( "visitedLinkColor", &kde34VisitedLink ); TQColor visitedLink = config->readColorEntry( "visitedLinkColor", &kde34VisitedLink );
@ -2447,14 +2447,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( KCodecs::base64Encode( _to.utf8(), false ) ); .arg( QString(KCodecs::base64Encode( _to.utf8(), false )) );
} }
if ( !_cc.isEmpty() ) if ( !_cc.isEmpty() )
cc = TQString( "=?utf8?b?%1?=" ) cc = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _cc.utf8(), false ) ); .arg( QString(KCodecs::base64Encode( _cc.utf8(), false )) );
if ( !_bcc.isEmpty() ) if ( !_bcc.isEmpty() )
bcc = TQString( "=?utf8?b?%1?=" ) bcc = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _bcc.utf8(), false ) ); .arg( QString(KCodecs::base64Encode( _bcc.utf8(), false )) );
} else { } else {
to = _to; to = _to;
cc = _cc; cc = _cc;
@ -2608,7 +2608,7 @@ void KApplication::broadcastKeyCode(unsigned int keyCode)
emit coreFakeKeyPress(keyCode); emit coreFakeKeyPress(keyCode);
} }
QCString TQCString
KApplication::launcher() KApplication::launcher()
{ {
return "klauncher"; return "klauncher";

@ -372,13 +372,13 @@ TQChar KCharsets::fromEntity(const TQString &str)
TQChar res = TQChar::null; TQChar res = TQChar::null;
int pos = 0; int pos = 0;
if(str[pos] == '&') pos++; if(str[pos] == (QChar)'&') pos++;
// Check for '&#000' or '&#x0000' sequence // Check for '&#000' or '&#x0000' sequence
if (str[pos] == '#' && str.length()-pos > 1) { if (str[pos] == (QChar)'#' && str.length()-pos > 1) {
bool ok; bool ok;
pos++; pos++;
if (str[pos] == 'x' || str[pos] == 'X') { if (str[pos] == (QChar)'x' || str[pos] == (QChar)'X') {
pos++; pos++;
// '&#x0000', hexadeciaml character reference // '&#x0000', hexadeciaml character reference
TQString tmp(str.unicode()+pos, str.length()-pos); TQString tmp(str.unicode()+pos, str.length()-pos);
@ -412,7 +412,7 @@ TQChar KCharsets::fromEntity(const TQString &str, int &len)
{ {
TQString tmp = str.left(len); TQString tmp = str.left(len);
TQChar res = fromEntity(tmp); TQChar res = fromEntity(tmp);
if( res != TQChar::null ) return res; if( res != (QChar)TQChar::null ) return res;
len--; len--;
} }
return TQChar::null; return TQChar::null;
@ -437,13 +437,13 @@ TQString KCharsets::resolveEntities( const TQString &input )
for ( ; p < end; ++p ) { for ( ; p < end; ++p ) {
const TQChar ch = *p; const TQChar ch = *p;
if ( ch == '&' ) { if ( ch == (QChar)'&' ) {
ampersand = p; ampersand = p;
scanForSemicolon = true; scanForSemicolon = true;
continue; continue;
} }
if ( ch != ';' || scanForSemicolon == false ) if ( ch != (QChar)';' || scanForSemicolon == false )
continue; continue;
assert( ampersand ); assert( ampersand );

@ -91,7 +91,7 @@ protected:
}; };
class KCmdLineParsedArgs : public QStrList class KCmdLineParsedArgs : public TQStrList
{ {
public: public:
KCmdLineParsedArgs() KCmdLineParsedArgs()
@ -483,7 +483,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled,
{ {
argument = _opt+p; argument = _opt+p;
} }
args->setOption(singleCharOption, argument); args->setOption(singleCharOption, (const char*)argument);
return; return;
} }
break; // Unknown argument break; // Unknown argument
@ -525,7 +525,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled,
} }
argument = argv[i]; argument = argv[i];
} }
args->setOption(opt, argument); args->setOption(opt, (const char*)argument);
} }
else else
{ {
@ -924,7 +924,7 @@ KCmdLineArgs::usage(const char *id)
name = name.mid(1); name = name.mid(1);
if ((name[0] == '[') && (name[name.length()-1] == ']')) if ((name[0] == '[') && (name[name.length()-1] == ']'))
name = name.mid(1, name.length()-2); name = name.mid(1, name.length()-2);
printQ(optionFormatString.arg(name, -25) printQ(optionFormatString.arg(QString(name), -25)
.arg(description)); .arg(description));
} }
else else
@ -948,12 +948,12 @@ KCmdLineArgs::usage(const char *id)
opt = opt + name; opt = opt + name;
if (!option->def) if (!option->def)
{ {
printQ(optionFormatString.arg(opt, -25) printQ(optionFormatString.arg(QString(opt), -25)
.arg(description)); .arg(description));
} }
else else
{ {
printQ(optionFormatStringDef.arg(opt, -25) printQ(optionFormatStringDef.arg(QString(opt), -25)
.arg(description).arg(option->def)); .arg(description).arg(option->def));
} }
opt = ""; opt = "";
@ -1113,7 +1113,7 @@ KCmdLineArgs::setOption(const TQCString &opt, const char *value)
parsedOptionList->insert( opt, new TQCString(value) ); parsedOptionList->insert( opt, new TQCString(value) );
} }
QCString TQCString
KCmdLineArgs::getOption(const char *_opt) const KCmdLineArgs::getOption(const char *_opt) const
{ {
TQCString *value = 0; TQCString *value = 0;

@ -927,7 +927,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey,
TQString aValue = readEntry( pKey ); TQString aValue = readEntry( pKey );
if( !aValue.isEmpty() ) if( !aValue.isEmpty() )
{ {
if ( aValue.at(0) == '#' ) if ( aValue.at(0) == (QChar)'#' )
{ {
aRetColor.setNamedColor(aValue); aRetColor.setNamedColor(aValue);
} }
@ -1358,7 +1358,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
} }
str_list += sep; str_list += sep;
} }
if( str_list.at(str_list.length() - 1) == sep ) if( str_list.at(str_list.length() - 1) == (QChar)sep )
str_list.truncate( str_list.length() -1 ); str_list.truncate( str_list.length() -1 );
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS ); writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS );
} }
@ -1402,7 +1402,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
} }
str_list += sep; str_list += sep;
} }
if( str_list.at(str_list.length() - 1) == sep ) if( str_list.at(str_list.length() - 1) == (QChar)sep )
str_list.truncate( str_list.length() -1 ); str_list.truncate( str_list.length() -1 );
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand ); writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand );
} }

@ -282,7 +282,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
break; break;
} }
TQFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") ); TQFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") );
aOutputFile.open( IO_WriteOnly | IO_Append | IO_Raw ); aOutputFile.open( (QIODevice::OpenModeFlag)((int)IO_WriteOnly | (int)IO_Append | (int)IO_Raw) );
aOutputFile.writeBlock( buf, strlen( buf ) ); aOutputFile.writeBlock( buf, strlen( buf ) );
aOutputFile.close(); aOutputFile.close();
break; break;
@ -292,7 +292,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
// Since we are in kdecore here, we cannot use KMsgBox and use // Since we are in kdecore here, we cannot use KMsgBox and use
// TQMessageBox instead // TQMessageBox instead
if ( !kDebug_data->aAreaName.isEmpty() ) if ( !kDebug_data->aAreaName.isEmpty() )
aCaption += TQString("(%1)").arg( kDebug_data->aAreaName ); aCaption += TQString("(%1)").arg( QString(kDebug_data->aAreaName) );
TQMessageBox::warning( 0L, aCaption, data, i18n("&OK") ); TQMessageBox::warning( 0L, aCaption, data, i18n("&OK") );
break; break;
} }
@ -376,7 +376,7 @@ kdbgstream& kdbgstream::operator << (TQChar ch)
output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0'); output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0');
else { else {
output += ch; output += ch;
if (ch == '\n') flush(); if (ch == (QChar)'\n') flush();
} }
return *this; return *this;
} }
@ -415,7 +415,7 @@ kdbgstream& kdbgstream::operator << (const TQWidget* widget)
return *this; return *this;
} }
output += string; output += string;
if (output.at(output.length() -1 ) == '\n') if (output.at(output.length() -1 ) == (QChar)'\n')
{ {
flush(); flush();
} }

@ -520,8 +520,8 @@ void KIconEffect::semiTransparent(TQPixmap &pix)
} }
TQImage img; TQImage img;
if (pix.mask() != 0L) if (pix.tqmask() != 0L)
img = pix.mask()->convertToImage(); img = pix.tqmask()->convertToImage();
else else
{ {
img.create(pix.size(), 1, 2, TQImage::BigEndian); img.create(pix.size(), 1, 2, TQImage::BigEndian);

@ -41,7 +41,7 @@ TQCString KIDNA::toAsciiCString(const TQString &idna)
TQString KIDNA::toAscii(const TQString &idna) TQString KIDNA::toAscii(const TQString &idna)
{ {
if (idna.length() && (idna[0] == ".")) if (idna.length() && (idna[0] == (QChar)'.'))
{ {
TQString host = TQString::fromLatin1(toAsciiCString(idna.mid(1))); TQString host = TQString::fromLatin1(toAsciiCString(idna.mid(1)));
if (host.isEmpty()) if (host.isEmpty())
@ -54,7 +54,7 @@ TQString KIDNA::toAscii(const TQString &idna)
TQString KIDNA::toUnicode(const TQString &idna) TQString KIDNA::toUnicode(const TQString &idna)
{ {
#ifndef Q_WS_WIN //TODO kresolver not ported #ifndef Q_WS_WIN //TODO kresolver not ported
if (idna.length() && (idna[0] == ".")) if (idna.length() && (idna[0] == (QChar)'.'))
return idna[0] + KResolver::domainToUnicode(idna.mid(1)); return idna[0] + KResolver::domainToUnicode(idna.mid(1));
return KResolver::domainToUnicode(idna); return KResolver::domainToUnicode(idna);
#else #else

@ -422,7 +422,7 @@ KLibrary* KLibLoader::library( const char *name )
#ifndef NDEBUG #ifndef NDEBUG
kdDebug(150) << "library=" << name << ": No file named " << libname << " found in paths." << endl; kdDebug(150) << "library=" << name << ": No file named " << libname << " found in paths." << endl;
#endif #endif
d->errorMessage = i18n("Library files for \"%1\" not found in paths.").arg(libname); d->errorMessage = i18n("Library files for \"%1\" not found in paths.").arg(TQString(libname));
return 0; return 0;
} }

@ -1212,34 +1212,34 @@ static void _inc_by_one(TQString &str, int position)
switch(last_char) switch(last_char)
{ {
case '0': case '0':
str[i] = '1'; str[i] = (QChar)'1';
break; break;
case '1': case '1':
str[i] = '2'; str[i] = (QChar)'2';
break; break;
case '2': case '2':
str[i] = '3'; str[i] = (QChar)'3';
break; break;
case '3': case '3':
str[i] = '4'; str[i] = (QChar)'4';
break; break;
case '4': case '4':
str[i] = '5'; str[i] = (QChar)'5';
break; break;
case '5': case '5':
str[i] = '6'; str[i] = (QChar)'6';
break; break;
case '6': case '6':
str[i] = '7'; str[i] = (QChar)'7';
break; break;
case '7': case '7':
str[i] = '8'; str[i] = (QChar)'8';
break; break;
case '8': case '8':
str[i] = '9'; str[i] = (QChar)'9';
break; break;
case '9': case '9':
str[i] = '0'; str[i] = (QChar)'0';
if (i == 0) str.prepend('1'); if (i == 0) str.prepend('1');
continue; continue;
case '.': case '.':
@ -1304,8 +1304,8 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round,
// Skip the sign (for now) // Skip the sign (for now)
bool neg = (tmpString[0] == '-'); bool neg = (tmpString[0] == (QChar)'-');
if (neg || tmpString[0] == '+') tmpString.remove(0, 1); if (neg || tmpString[0] == (QChar)'+') tmpString.remove(0, 1);
// Split off exponential part (including 'e'-symbol) // Split off exponential part (including 'e'-symbol)
TQString mantString = tmpString.section('e', 0, 0, TQString mantString = tmpString.section('e', 0, 0,
@ -1345,7 +1345,7 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
{ {
if ( !escape ) if ( !escape )
{ {
if ( rst.at( format_index ).unicode() == '%' ) if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' )
escape = true; escape = true;
else else
buffer.append(rst.at(format_index)); buffer.append(rst.at(format_index));
@ -1466,7 +1466,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const
} }
TQString tot; TQString tot;
if (neg) tot = '-'; if (neg) tot = (QChar)'-';
tot += major + '.' + minor + exponentialPart; tot += major + '.' + minor + exponentialPart;
@ -1496,7 +1496,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
// (with a special case for parenthesis) // (with a special case for parenthesis)
if (negativeMonetarySignPosition() == ParensAround) if (negativeMonetarySignPosition() == ParensAround)
{ {
if (str[0] == '(' && str[str.length()-1] == ')') if (str[0] == (QChar)'(' && str[str.length()-1] == (QChar)')')
{ {
neg = true; neg = true;
str.remove(str.length()-1,1); str.remove(str.length()-1,1);
@ -1563,7 +1563,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
} }
TQString tot; TQString tot;
if (neg) tot = '-'; if (neg) tot = (QChar)'-';
tot += major + '.' + minior; tot += major + '.' + minior;
return tot.toDouble(ok); return tot.toDouble(ok);
} }
@ -1620,7 +1620,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
TQChar c = fmt.at(fmtpos++); TQChar c = fmt.at(fmtpos++);
if (c != '%') { if (c != (QChar)'%') {
if (c.isSpace() && str.at(strpos).isSpace()) if (c.isSpace() && str.at(strpos).isSpace())
strpos++; strpos++;
else if (c != str.at(strpos++)) else if (c != str.at(strpos++))
@ -1642,7 +1642,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
error = true; error = true;
j = 1; j = 1;
while (error && (j < 8)) { while (error && (j < 8)) {
TQString s = calendar()->weekDayName(j, c == 'a').lower(); TQString s = calendar()->weekDayName(j, c == (QChar)'a').lower();
int len = s.length(); int len = s.length();
if (str.mid(strpos, len) == s) if (str.mid(strpos, len) == s)
{ {
@ -1659,7 +1659,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
if (d->nounDeclension && d->dateMonthNamePossessive) { if (d->nounDeclension && d->dateMonthNamePossessive) {
j = 1; j = 1;
while (error && (j < 13)) { while (error && (j < 13)) {
TQString s = calendar()->monthNamePossessive(j, year, c == 'b').lower(); TQString s = calendar()->monthNamePossessive(j, year, c == (QChar)'b').lower();
int len = s.length(); int len = s.length();
if (str.mid(strpos, len) == s) { if (str.mid(strpos, len) == s) {
month = j; month = j;
@ -1671,7 +1671,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
} }
j = 1; j = 1;
while (error && (j < 13)) { while (error && (j < 13)) {
TQString s = calendar()->monthName(j, year, c == 'b').lower(); TQString s = calendar()->monthName(j, year, c == (QChar)'b').lower();
int len = s.length(); int len = s.length();
if (str.mid(strpos, len) == s) { if (str.mid(strpos, len) == s) {
month = j; month = j;
@ -1760,7 +1760,7 @@ TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok)
TQChar c = Format.at(Formatpos++); TQChar c = Format.at(Formatpos++);
if (c != '%') if (c != (QChar)'%')
{ {
if (c.isSpace()) if (c.isSpace())
strpos++; strpos++;
@ -1869,7 +1869,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
{ {
if ( !escape ) if ( !escape )
{ {
if ( rst.at( format_index ).unicode() == '%' ) if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' )
escape = true; escape = true;
else else
buffer[index++] = rst.at( format_index ); buffer[index++] = rst.at( format_index );
@ -1879,7 +1879,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
switch ( rst.at( format_index ).unicode() ) switch ( rst.at( format_index ).unicode() )
{ {
case '%': case '%':
buffer[index++] = '%'; buffer[index++] = (QChar)'%';
break; break;
case 'H': case 'H':
put_it_in( buffer, index, pTime.hour() ); put_it_in( buffer, index, pTime.hour() );
@ -1908,7 +1908,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
number = pTime.hour(); number = pTime.hour();
case 'l': case 'l':
// to share the code // to share the code
if ( rst.at( format_index ).unicode() == 'l' ) if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'l' )
number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1; number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1;
if ( number / 10 ) if ( number / 10 )
buffer[index++] = number / 10 + '0'; buffer[index++] = number / 10 + '0';

@ -55,7 +55,7 @@ void KMacroExpanderBase::expandMacros( TQString &str )
TQString rsts; TQString rsts;
for (pos = 0; pos < str.length(); ) { for (pos = 0; pos < str.length(); ) {
if (ec != (char)0) { if (ec != (QChar)0) {
if (str.unicode()[pos] != ec) if (str.unicode()[pos] != ec)
goto nohit; goto nohit;
if (!(len = expandEscapedMacro( str, pos, rst ))) if (!(len = expandEscapedMacro( str, pos, rst )))
@ -110,7 +110,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
while (pos < str.length()) { while (pos < str.length()) {
TQChar cc( str.unicode()[pos] ); TQChar cc( str.unicode()[pos] );
if (ec != (char)0) { if (ec != (QChar)0) {
if (cc != ec) if (cc != ec)
goto nohit; goto nohit;
if (!(len = expandEscapedMacro( str, pos, rst ))) if (!(len = expandEscapedMacro( str, pos, rst )))
@ -315,7 +315,7 @@ static TQStringList &operator+=( TQStringList &s, const TQString &n) { s << n; r
static bool static bool
isIdentifier( uint c ) isIdentifier( uint c )
{ {
return c == (QChar)'_' || (c >= (QChar)'A' && c <= (QChar)'Z') || (c >= (QChar)'a' && c <= (QChar)'z') || (c >= (QChar)'0' && c <= (QChar)'9'); return c == '_' || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9');
} }
//////// ////////

@ -37,7 +37,7 @@ class KInstance;
* *
* @author Peter Putzer <putzer@kde.org> * @author Peter Putzer <putzer@kde.org>
*/ */
class KDECORE_EXPORT KMimeSourceFactory : public QMimeSourceFactory class KDECORE_EXPORT KMimeSourceFactory : public TQMimeSourceFactory
{ {
public: public:

@ -51,7 +51,7 @@ class KMultipleDragPrivate;
* *
* @author David Faure <faure@kde.org> * @author David Faure <faure@kde.org>
*/ */
class KDECORE_EXPORT KMultipleDrag : public QDragObject class KDECORE_EXPORT KMultipleDrag : public TQDragObject
{ {
Q_OBJECT Q_OBJECT

@ -65,10 +65,10 @@ KPalette::KPalette(const TQString &name)
// Read first line // Read first line
// Expected "GIMP Palette" // Expected "GIMP Palette"
if (paletteFile.readLine(line, maxLength) == -1) return; if (paletteFile.readLine(line.ascii(), maxLength) == -1) return;
if (line.find(" Palette") == -1) return; if (line.find(" Palette") == -1) return;
while( paletteFile.readLine(line, maxLength) != -1) while( paletteFile.readLine(line.ascii(), maxLength) != -1)
{ {
if (line[0] == '#') if (line[0] == '#')
{ {

@ -104,7 +104,7 @@ bool KProcIO::start (RunMode runmode, bool includeStderr)
bool KProcIO::writeStdin (const TQString &line, bool appendnewline) bool KProcIO::writeStdin (const TQString &line, bool appendnewline)
{ {
return writeStdin(codec->fromUnicode(line), appendnewline); return writeStdin(TQCString(codec->fromUnicode(line)), appendnewline);
} }
bool KProcIO::writeStdin (const TQCString &line, bool appendnewline) bool KProcIO::writeStdin (const TQCString &line, bool appendnewline)

@ -217,7 +217,7 @@ KRandomSequence::getBool()
return (((unsigned long) m_lngShufflePos) & 1); return (((unsigned long) m_lngShufflePos) & 1);
} }
class KRandomSequenceList : public QGList class KRandomSequenceList : public TQGList
{ {
friend class KRandomSequence; friend class KRandomSequence;
public: public:

@ -394,7 +394,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ )
mday = l[2].toUInt(); mday = l[2].toUInt();
// Z suffix means UTC. // Z suffix means UTC.
if ('Z' == timeString.at(timeString.length() - 1)) { if ((QChar)'Z' == timeString.at(timeString.length() - 1)) {
timeString.remove(timeString.length() - 1, 1); timeString.remove(timeString.length() - 1, 1);
} }

@ -171,7 +171,7 @@ bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir
else else
nameOnly = cFilename.mid(slash + 1); nameOnly = cFilename.mid(slash + 1);
cBackup = TQFile::encodeName(backupDir); cBackup = TQFile::encodeName(backupDir);
if ( backupDir[backupDir.length()-1] != '/' ) if ( backupDir[backupDir.length()-1] != (QChar)'/' )
cBackup += '/'; cBackup += '/';
cBackup += nameOnly; cBackup += nameOnly;
} }

@ -84,14 +84,14 @@ void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent )
KKey key( pEvent ); KKey key( pEvent );
switch( pEvent->key() ) { switch( pEvent->key() ) {
case Key_Shift: case TQ_Key_Shift:
case Key_Control: case TQ_Key_Control:
case Key_Alt: case TQ_Key_Alt:
case Key_Meta: case TQ_Key_Meta:
case Key_Super_L: case TQ_Key_Super_L:
case Key_Super_R: case TQ_Key_Super_R:
case Key_Hyper_L: case TQ_Key_Hyper_L:
case Key_Hyper_R: case TQ_Key_Hyper_R:
break; break;
default: default:
int iItem = searchForKey( key ); int iItem = searchForKey( key );

@ -32,7 +32,7 @@ class KAccelActions;
/** /**
* @internal * @internal
*/ */
class KDECORE_EXPORT KShortcutMenu : public QPopupMenu class KDECORE_EXPORT KShortcutMenu : public TQPopupMenu
{ {
Q_OBJECT Q_OBJECT
public: public:

@ -189,7 +189,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
return; return;
TQString dir = _dir; TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/') if (dir.at(dir.length() - 1) != (QChar)'/')
dir += '/'; dir += '/';
if (!prefixes.contains(dir)) { if (!prefixes.contains(dir)) {
@ -209,7 +209,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
return; return;
TQString dir = _dir; TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/') if (dir.at(dir.length() - 1) != (QChar)'/')
dir += '/'; dir += '/';
if (!d->xdgconf_prefixes.contains(dir)) { if (!d->xdgconf_prefixes.contains(dir)) {
@ -229,7 +229,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
return; return;
TQString dir = _dir; TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/') if (dir.at(dir.length() - 1) != (QChar)'/')
dir += '/'; dir += '/';
if (!d->xdgdata_prefixes.contains(dir)) { if (!d->xdgdata_prefixes.contains(dir)) {
@ -271,7 +271,7 @@ bool KStandardDirs::addResourceType( const char *type,
relatives.insert(type, rels); relatives.insert(type, rels);
} }
TQString copy = relativename; TQString copy = relativename;
if (copy.at(copy.length() - 1) != '/') if (copy.at(copy.length() - 1) != (QChar)'/')
copy += '/'; copy += '/';
if (!rels->contains(copy)) { if (!rels->contains(copy)) {
if (priority) if (priority)
@ -301,7 +301,7 @@ bool KStandardDirs::addResourceDir( const char *type,
absolutes.insert(type, paths); absolutes.insert(type, paths);
} }
TQString copy = absdir; TQString copy = absdir;
if (copy.at(copy.length() - 1) != '/') if (copy.at(copy.length() - 1) != (QChar)'/')
copy += '/'; copy += '/';
if (!paths->contains(copy)) { if (!paths->contains(copy)) {
@ -452,7 +452,7 @@ bool KStandardDirs::exists(const TQString &fullPath)
{ {
KDE_struct_stat buff; KDE_struct_stat buff;
if (access(TQFile::encodeName(fullPath), R_OK) == 0 && KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0) if (access(TQFile::encodeName(fullPath), R_OK) == 0 && KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0)
if (fullPath.at(fullPath.length() - 1) != '/') { if (fullPath.at(fullPath.length() - 1) != (QChar)'/') {
if (S_ISREG( buff.st_mode )) if (S_ISREG( buff.st_mode ))
return true; return true;
} else } else
@ -478,9 +478,9 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
return; return;
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
assert(path.at(path.length() - 1) == '/' || path.at(path.length() - 1) == '\\'); assert(path.at(path.length() - 1) == (QChar)'/' || path.at(path.length() - 1) == (QChar)'\\');
#else #else
assert(path.at(path.length() - 1) == '/'); assert(path.at(path.length() - 1) == (QChar)'/');
#endif #endif
struct dirent *ep; struct dirent *ep;
@ -492,7 +492,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
while( ( ep = readdir( dp ) ) != 0L ) while( ( ep = readdir( dp ) ) != 0L )
{ {
TQString fn( TQFile::decodeName(ep->d_name)); TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~') if (fn == _dot || fn == _dotdot || (TQCString)(fn.at(fn.length() - 1).latin1()) == (QChar)'~')
continue; continue;
if (!recursive && !regexp.exactMatch(fn)) if (!recursive && !regexp.exactMatch(fn))
@ -569,9 +569,9 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
if (prefix.isEmpty()) //for sanity if (prefix.isEmpty()) //for sanity
return; return;
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
assert(prefix.at(prefix.length() - 1) == '/' || prefix.at(prefix.length() - 1) == '\\'); assert(prefix.at(prefix.length() - 1) == (QChar)'/' || prefix.at(prefix.length() - 1) == (QChar)'\\');
#else #else
assert(prefix.at(prefix.length() - 1) == '/'); assert(prefix.at(prefix.length() - 1) == (QChar)'/');
#endif #endif
KDE_struct_stat buff; KDE_struct_stat buff;
@ -591,7 +591,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
while( ( ep = readdir( dp ) ) != 0L ) while( ( ep = readdir( dp ) ) != 0L )
{ {
TQString fn( TQFile::decodeName(ep->d_name)); TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == '~') if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == (QChar)'~')
continue; continue;
if ( !pathExp.exactMatch(fn) ) if ( !pathExp.exactMatch(fn) )
@ -692,7 +692,7 @@ KStandardDirs::realPath(const TQString &dirname)
if (realpath( TQFile::encodeName(dirname).data(), realpath_buffer) != 0) { if (realpath( TQFile::encodeName(dirname).data(), realpath_buffer) != 0) {
// success, use result from realpath // success, use result from realpath
int len = strlen(realpath_buffer); int len = strlen(realpath_buffer);
realpath_buffer[len] = '/'; realpath_buffer[len] = (QChar)'/';
realpath_buffer[len+1] = 0; realpath_buffer[len+1] = 0;
return TQFile::decodeName(realpath_buffer); return TQFile::decodeName(realpath_buffer);
} }
@ -771,7 +771,7 @@ void KStandardDirs::createSpecialResource(const char *type)
if (result > 0) if (result > 0)
{ {
link[result] = 0; link[result] = 0;
if (link[0] == '/') if (link[0] == (int)'/')
dir = TQFile::decodeName(link); dir = TQFile::decodeName(link);
else else
dir = TQDir::cleanDirPath(dir+TQFile::decodeName(link)); dir = TQDir::cleanDirPath(dir+TQFile::decodeName(link));
@ -892,7 +892,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr )
{ {
p = tokens[ i ]; p = tokens[ i ];
if ( p[ 0 ] == '~' ) if ( p[ 0 ] == (QChar)'~' )
{ {
int len = p.find( '/' ); int len = p.find( '/' );
if ( len == -1 ) if ( len == -1 )
@ -1167,7 +1167,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode)
uint len = target.length(); uint len = target.length();
// append trailing slash if missing // append trailing slash if missing
if (dir.at(len - 1) != '/') if (dir.at(len - 1) != (QChar)'/')
target += '/'; target += '/';
TQString base(""); TQString base("");
@ -1220,7 +1220,7 @@ static TQString executablePrefix()
if (length == -1) if (length == -1)
return TQString::null; return TQString::null;
path_buffer[length] = '\0'; path_buffer[length] = (QChar)'\0';
TQString path = TQFile::decodeName(path_buffer); TQString path = TQFile::decodeName(path_buffer);
@ -1314,7 +1314,7 @@ void KStandardDirs::addKDEDefaults()
TQString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME"); TQString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
if (!localKdeDir.isEmpty()) if (!localKdeDir.isEmpty())
{ {
if (localKdeDir[localKdeDir.length()-1] != '/') if (localKdeDir[localKdeDir.length()-1] != (QChar)'/')
localKdeDir += '/'; localKdeDir += '/';
} }
else else
@ -1358,7 +1358,7 @@ void KStandardDirs::addKDEDefaults()
TQString localXdgDir = readEnvPath("XDG_CONFIG_HOME"); TQString localXdgDir = readEnvPath("XDG_CONFIG_HOME");
if (!localXdgDir.isEmpty()) if (!localXdgDir.isEmpty())
{ {
if (localXdgDir[localXdgDir.length()-1] != '/') if (localXdgDir[localXdgDir.length()-1] != (QChar)'/')
localXdgDir += '/'; localXdgDir += '/';
} }
else else
@ -1390,7 +1390,7 @@ void KStandardDirs::addKDEDefaults()
it != kdedirList.end(); ++it) it != kdedirList.end(); ++it)
{ {
TQString dir = *it; TQString dir = *it;
if (dir[dir.length()-1] != '/') if (dir[dir.length()-1] != (QChar)'/')
dir += '/'; dir += '/';
xdgdirList.append(dir+"share/"); xdgdirList.append(dir+"share/");
} }
@ -1402,7 +1402,7 @@ void KStandardDirs::addKDEDefaults()
localXdgDir = readEnvPath("XDG_DATA_HOME"); localXdgDir = readEnvPath("XDG_DATA_HOME");
if (!localXdgDir.isEmpty()) if (!localXdgDir.isEmpty())
{ {
if (localXdgDir[localXdgDir.length()-1] != '/') if (localXdgDir[localXdgDir.length()-1] != (QChar)'/')
localXdgDir += '/'; localXdgDir += '/';
} }
else else

@ -1140,9 +1140,9 @@ TQString KStartupInfoData::to_text() const
ret += TQString::fromLatin1( " DESKTOP=%1" ) ret += TQString::fromLatin1( " DESKTOP=%1" )
.arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0 .arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0
if( !d->wmclass.isEmpty()) if( !d->wmclass.isEmpty())
ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( d->wmclass ); ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) );
if( !d->hostname.isEmpty()) if( !d->hostname.isEmpty())
ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( d->hostname ); ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) );
for( TQValueList< pid_t >::ConstIterator it = d->pids.begin(); for( TQValueList< pid_t >::ConstIterator it = d->pids.begin();
it != d->pids.end(); it != d->pids.end();
++it ) ++it )
@ -1466,7 +1466,7 @@ static
TQString get_str( const TQString& item_P ) TQString get_str( const TQString& item_P )
{ {
unsigned int pos = item_P.find( '=' ); unsigned int pos = item_P.find( '=' );
if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == '\"' ) if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == (QChar)'\"' )
{ {
int pos2 = item_P.left( pos + 2 ).find( '\"' ); int pos2 = item_P.left( pos + 2 ).find( '\"' );
if( pos2 < 0 ) if( pos2 < 0 )
@ -1522,8 +1522,8 @@ static TQString escape_str( const TQString& str_P )
pos < str_P.length(); pos < str_P.length();
++pos ) ++pos )
{ {
if( str_P[ pos ] == '\\' if( str_P[ pos ] == (QChar)'\\'
|| str_P[ pos ] == '"' ) || str_P[ pos ] == (QChar)'"' )
ret += '\\'; ret += '\\';
ret += str_P[ pos ]; ret += str_P[ pos ];
} }

@ -419,8 +419,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa
return false; return false;
// Patterns like "Makefile*" // Patterns like "Makefile*"
if ( pattern[ pattern_len - 1 ] == '*' && len + 1 >= pattern_len ) { if ( pattern[ pattern_len - 1 ] == (QChar)'*' && len + 1 >= pattern_len ) {
if ( pattern[ 0 ] == '*' ) if ( pattern[ 0 ] == (QChar)'*' )
{ {
return filename.find(pattern.mid(1, pattern_len - 2)) != -1; return filename.find(pattern.mid(1, pattern_len - 2)) != -1;
} }
@ -434,7 +434,7 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa
} }
// Patterns like "*~", "*.extension" // Patterns like "*~", "*.extension"
if ( pattern[ 0 ] == '*' && len + 1 >= pattern_len ) if ( pattern[ 0 ] == (QChar)'*' && len + 1 >= pattern_len )
{ {
const TQChar *c1 = pattern.unicode() + pattern_len - 1; const TQChar *c1 = pattern.unicode() + pattern_len - 1;
const TQChar *c2 = filename.unicode() + len - 1; const TQChar *c2 = filename.unicode() + len - 1;

@ -41,7 +41,7 @@ class KURLDragPrivate;
* To create a drag object, use the KURLDrag constructor. * To create a drag object, use the KURLDrag constructor.
* To handle drops, use TQUriDrag::canDecode() and KURLDrag::decode() * To handle drops, use TQUriDrag::canDecode() and KURLDrag::decode()
*/ */
class KDECORE_EXPORT KURLDrag : public QUriDrag class KDECORE_EXPORT KURLDrag : public TQUriDrag
{ {
public: public:
/** /**

Loading…
Cancel
Save