summaryrefslogtreecommitdiffstats
path: root/kdecore
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-06 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-06 19:48:06 +0000
commit0761ef3c62e43ffed5a81854b7b45e579016f5b7 (patch)
tree5aa48590c295ad6d29aafe4782d7f762f2ee38d3 /kdecore
parentcb4a5d685bd5a3129e1edb8bac1ee6c41939fe7b (diff)
downloadtdelibs-0761ef3c62e43ffed5a81854b7b45e579016f5b7.tar.gz
tdelibs-0761ef3c62e43ffed5a81854b7b45e579016f5b7.zip
Locked down more ambiguous datatypes
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1160010 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore')
-rw-r--r--kdecore/kaccel.h2
-rw-r--r--kdecore/kapplication.cpp22
-rw-r--r--kdecore/kcharsets.cpp12
-rw-r--r--kdecore/kcmdlineargs.cpp14
-rw-r--r--kdecore/kconfigbase.cpp6
-rw-r--r--kdecore/kdebug.cpp8
-rw-r--r--kdecore/kiconeffect.cpp4
-rw-r--r--kdecore/kidna.cpp4
-rw-r--r--kdecore/klibloader.cpp2
-rw-r--r--kdecore/klocale.cpp48
-rw-r--r--kdecore/kmacroexpander.cpp6
-rw-r--r--kdecore/kmimesourcefactory.h2
-rw-r--r--kdecore/kmultipledrag.h2
-rw-r--r--kdecore/kpalette.cpp4
-rw-r--r--kdecore/kprocio.cpp2
-rw-r--r--kdecore/krandomsequence.cpp2
-rw-r--r--kdecore/krfcdate.cpp2
-rw-r--r--kdecore/ksavefile.cpp2
-rw-r--r--kdecore/kshortcutmenu.cpp16
-rw-r--r--kdecore/kshortcutmenu.h2
-rw-r--r--kdecore/kstandarddirs.cpp42
-rw-r--r--kdecore/kstartupinfo.cpp10
-rw-r--r--kdecore/kstringhandler.cpp6
-rw-r--r--kdecore/kurldrag.h2
24 files changed, 111 insertions, 111 deletions
diff --git a/kdecore/kaccel.h b/kdecore/kaccel.h
index 3d9dacf0a..7bdf9e0e7 100644
--- a/kdecore/kaccel.h
+++ b/kdecore/kaccel.h
@@ -90,7 +90,7 @@ class KAccelPrivate;
* @see KKeyDialog
*/
-class KDECORE_EXPORT KAccel : public QAccel
+class KDECORE_EXPORT KAccel : public TQAccel
{
Q_OBJECT
public:
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index ed302875a..bdee53c29 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -457,7 +457,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress))
{
static const KShortcut& _selectAll = KStdAccel::selectAll();
- TQLineEdit *edit = ::qt_cast<TQLineEdit *>(receiver);
+ TQLineEdit *edit = tqqt_cast<TQLineEdit *>(receiver);
if (edit)
{
// 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)
{
// We have a keypress for a multilineedit...
@@ -2009,13 +2009,13 @@ TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
TQColor kde34VisitedLink( 82, 24, 139 );
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 buttonText = config->readColorEntry( "buttonForeground", &black );
+ TQColor buttonText = config->readColorEntry( "buttonForeground", tqblackptr );
TQColor highlight = config->readColorEntry( "selectBackground", &kde34Blue );
- TQColor highlightedText = config->readColorEntry( "selectForeground", &white );
- TQColor base = config->readColorEntry( "windowBackground", &white );
- TQColor baseText = config->readColorEntry( "windowForeground", &black );
+ TQColor highlightedText = config->readColorEntry( "selectForeground", tqwhiteptr );
+ TQColor base = config->readColorEntry( "windowBackground", tqwhiteptr );
+ TQColor baseText = config->readColorEntry( "windowForeground", tqblackptr );
TQColor link = config->readColorEntry( "linkColor", &kde34Link );
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
// this isn't correct, but KMail understands it nonetheless
to = TQString( "=?utf8?b?%1?=" )
- .arg( KCodecs::base64Encode( _to.utf8(), false ) );
+ .arg( QString(KCodecs::base64Encode( _to.utf8(), false )) );
}
if ( !_cc.isEmpty() )
cc = TQString( "=?utf8?b?%1?=" )
- .arg( KCodecs::base64Encode( _cc.utf8(), false ) );
+ .arg( QString(KCodecs::base64Encode( _cc.utf8(), false )) );
if ( !_bcc.isEmpty() )
bcc = TQString( "=?utf8?b?%1?=" )
- .arg( KCodecs::base64Encode( _bcc.utf8(), false ) );
+ .arg( QString(KCodecs::base64Encode( _bcc.utf8(), false )) );
} else {
to = _to;
cc = _cc;
@@ -2608,7 +2608,7 @@ void KApplication::broadcastKeyCode(unsigned int keyCode)
emit coreFakeKeyPress(keyCode);
}
-QCString
+TQCString
KApplication::launcher()
{
return "klauncher";
diff --git a/kdecore/kcharsets.cpp b/kdecore/kcharsets.cpp
index f4ae826f5..52cf87849 100644
--- a/kdecore/kcharsets.cpp
+++ b/kdecore/kcharsets.cpp
@@ -372,13 +372,13 @@ TQChar KCharsets::fromEntity(const TQString &str)
TQChar res = TQChar::null;
int pos = 0;
- if(str[pos] == '&') pos++;
+ if(str[pos] == (QChar)'&') pos++;
// Check for '&#000' or '&#x0000' sequence
- if (str[pos] == '#' && str.length()-pos > 1) {
+ if (str[pos] == (QChar)'#' && str.length()-pos > 1) {
bool ok;
pos++;
- if (str[pos] == 'x' || str[pos] == 'X') {
+ if (str[pos] == (QChar)'x' || str[pos] == (QChar)'X') {
pos++;
// '&#x0000', hexadeciaml character reference
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);
TQChar res = fromEntity(tmp);
- if( res != TQChar::null ) return res;
+ if( res != (QChar)TQChar::null ) return res;
len--;
}
return TQChar::null;
@@ -437,13 +437,13 @@ TQString KCharsets::resolveEntities( const TQString &input )
for ( ; p < end; ++p ) {
const TQChar ch = *p;
- if ( ch == '&' ) {
+ if ( ch == (QChar)'&' ) {
ampersand = p;
scanForSemicolon = true;
continue;
}
- if ( ch != ';' || scanForSemicolon == false )
+ if ( ch != (QChar)';' || scanForSemicolon == false )
continue;
assert( ampersand );
diff --git a/kdecore/kcmdlineargs.cpp b/kdecore/kcmdlineargs.cpp
index 3e70156cd..9600da39c 100644
--- a/kdecore/kcmdlineargs.cpp
+++ b/kdecore/kcmdlineargs.cpp
@@ -91,7 +91,7 @@ protected:
};
-class KCmdLineParsedArgs : public QStrList
+class KCmdLineParsedArgs : public TQStrList
{
public:
KCmdLineParsedArgs()
@@ -483,7 +483,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled,
{
argument = _opt+p;
}
- args->setOption(singleCharOption, argument);
+ args->setOption(singleCharOption, (const char*)argument);
return;
}
break; // Unknown argument
@@ -525,7 +525,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled,
}
argument = argv[i];
}
- args->setOption(opt, argument);
+ args->setOption(opt, (const char*)argument);
}
else
{
@@ -924,7 +924,7 @@ KCmdLineArgs::usage(const char *id)
name = name.mid(1);
if ((name[0] == '[') && (name[name.length()-1] == ']'))
name = name.mid(1, name.length()-2);
- printQ(optionFormatString.arg(name, -25)
+ printQ(optionFormatString.arg(QString(name), -25)
.arg(description));
}
else
@@ -948,12 +948,12 @@ KCmdLineArgs::usage(const char *id)
opt = opt + name;
if (!option->def)
{
- printQ(optionFormatString.arg(opt, -25)
+ printQ(optionFormatString.arg(QString(opt), -25)
.arg(description));
}
else
{
- printQ(optionFormatStringDef.arg(opt, -25)
+ printQ(optionFormatStringDef.arg(QString(opt), -25)
.arg(description).arg(option->def));
}
opt = "";
@@ -1113,7 +1113,7 @@ KCmdLineArgs::setOption(const TQCString &opt, const char *value)
parsedOptionList->insert( opt, new TQCString(value) );
}
-QCString
+TQCString
KCmdLineArgs::getOption(const char *_opt) const
{
TQCString *value = 0;
diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp
index 3c80e5710..771e9b643 100644
--- a/kdecore/kconfigbase.cpp
+++ b/kdecore/kconfigbase.cpp
@@ -927,7 +927,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey,
TQString aValue = readEntry( pKey );
if( !aValue.isEmpty() )
{
- if ( aValue.at(0) == '#' )
+ if ( aValue.at(0) == (QChar)'#' )
{
aRetColor.setNamedColor(aValue);
}
@@ -1358,7 +1358,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
}
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 );
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS );
}
@@ -1402,7 +1402,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
}
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 );
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand );
}
diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp
index 38e45daf6..2370d406f 100644
--- a/kdecore/kdebug.cpp
+++ b/kdecore/kdebug.cpp
@@ -282,7 +282,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
break;
}
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.close();
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
// TQMessageBox instead
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") );
break;
}
@@ -376,7 +376,7 @@ kdbgstream& kdbgstream::operator << (TQChar ch)
output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0');
else {
output += ch;
- if (ch == '\n') flush();
+ if (ch == (QChar)'\n') flush();
}
return *this;
}
@@ -415,7 +415,7 @@ kdbgstream& kdbgstream::operator << (const TQWidget* widget)
return *this;
}
output += string;
- if (output.at(output.length() -1 ) == '\n')
+ if (output.at(output.length() -1 ) == (QChar)'\n')
{
flush();
}
diff --git a/kdecore/kiconeffect.cpp b/kdecore/kiconeffect.cpp
index cf0095ca9..8315eab6b 100644
--- a/kdecore/kiconeffect.cpp
+++ b/kdecore/kiconeffect.cpp
@@ -520,8 +520,8 @@ void KIconEffect::semiTransparent(TQPixmap &pix)
}
TQImage img;
- if (pix.mask() != 0L)
- img = pix.mask()->convertToImage();
+ if (pix.tqmask() != 0L)
+ img = pix.tqmask()->convertToImage();
else
{
img.create(pix.size(), 1, 2, TQImage::BigEndian);
diff --git a/kdecore/kidna.cpp b/kdecore/kidna.cpp
index c7e1ccdb5..ca41fecdf 100644
--- a/kdecore/kidna.cpp
+++ b/kdecore/kidna.cpp
@@ -41,7 +41,7 @@ TQCString KIDNA::toAsciiCString(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)));
if (host.isEmpty())
@@ -54,7 +54,7 @@ TQString KIDNA::toAscii(const TQString &idna)
TQString KIDNA::toUnicode(const TQString &idna)
{
#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 KResolver::domainToUnicode(idna);
#else
diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp
index 61155e7c9..e2f55fe67 100644
--- a/kdecore/klibloader.cpp
+++ b/kdecore/klibloader.cpp
@@ -422,7 +422,7 @@ KLibrary* KLibLoader::library( const char *name )
#ifndef NDEBUG
kdDebug(150) << "library=" << name << ": No file named " << libname << " found in paths." << endl;
#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;
}
diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp
index f8a82e3f5..810103e9f 100644
--- a/kdecore/klocale.cpp
+++ b/kdecore/klocale.cpp
@@ -1212,34 +1212,34 @@ static void _inc_by_one(TQString &str, int position)
switch(last_char)
{
case '0':
- str[i] = '1';
+ str[i] = (QChar)'1';
break;
case '1':
- str[i] = '2';
+ str[i] = (QChar)'2';
break;
case '2':
- str[i] = '3';
+ str[i] = (QChar)'3';
break;
case '3':
- str[i] = '4';
+ str[i] = (QChar)'4';
break;
case '4':
- str[i] = '5';
+ str[i] = (QChar)'5';
break;
case '5':
- str[i] = '6';
+ str[i] = (QChar)'6';
break;
case '6':
- str[i] = '7';
+ str[i] = (QChar)'7';
break;
case '7':
- str[i] = '8';
+ str[i] = (QChar)'8';
break;
case '8':
- str[i] = '9';
+ str[i] = (QChar)'9';
break;
case '9':
- str[i] = '0';
+ str[i] = (QChar)'0';
if (i == 0) str.prepend('1');
continue;
case '.':
@@ -1304,8 +1304,8 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round,
// Skip the sign (for now)
- bool neg = (tmpString[0] == '-');
- if (neg || tmpString[0] == '+') tmpString.remove(0, 1);
+ bool neg = (tmpString[0] == (QChar)'-');
+ if (neg || tmpString[0] == (QChar)'+') tmpString.remove(0, 1);
// Split off exponential part (including 'e'-symbol)
TQString mantString = tmpString.section('e', 0, 0,
@@ -1345,7 +1345,7 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
{
if ( !escape )
{
- if ( rst.at( format_index ).unicode() == '%' )
+ if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' )
escape = true;
else
buffer.append(rst.at(format_index));
@@ -1466,7 +1466,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const
}
TQString tot;
- if (neg) tot = '-';
+ if (neg) tot = (QChar)'-';
tot += major + '.' + minor + exponentialPart;
@@ -1496,7 +1496,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
// (with a special case for parenthesis)
if (negativeMonetarySignPosition() == ParensAround)
{
- if (str[0] == '(' && str[str.length()-1] == ')')
+ if (str[0] == (QChar)'(' && str[str.length()-1] == (QChar)')')
{
neg = true;
str.remove(str.length()-1,1);
@@ -1563,7 +1563,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
}
TQString tot;
- if (neg) tot = '-';
+ if (neg) tot = (QChar)'-';
tot += major + '.' + minior;
return tot.toDouble(ok);
}
@@ -1620,7 +1620,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
TQChar c = fmt.at(fmtpos++);
- if (c != '%') {
+ if (c != (QChar)'%') {
if (c.isSpace() && str.at(strpos).isSpace())
strpos++;
else if (c != str.at(strpos++))
@@ -1642,7 +1642,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
error = true;
j = 1;
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();
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) {
j = 1;
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();
if (str.mid(strpos, len) == s) {
month = j;
@@ -1671,7 +1671,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
}
j = 1;
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();
if (str.mid(strpos, len) == s) {
month = j;
@@ -1760,7 +1760,7 @@ TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok)
TQChar c = Format.at(Formatpos++);
- if (c != '%')
+ if (c != (QChar)'%')
{
if (c.isSpace())
strpos++;
@@ -1869,7 +1869,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
{
if ( !escape )
{
- if ( rst.at( format_index ).unicode() == '%' )
+ if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' )
escape = true;
else
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() )
{
case '%':
- buffer[index++] = '%';
+ buffer[index++] = (QChar)'%';
break;
case 'H':
put_it_in( buffer, index, pTime.hour() );
@@ -1908,7 +1908,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
number = pTime.hour();
case 'l':
// 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;
if ( number / 10 )
buffer[index++] = number / 10 + '0';
diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp
index 3c421574e..5516c1b61 100644
--- a/kdecore/kmacroexpander.cpp
+++ b/kdecore/kmacroexpander.cpp
@@ -55,7 +55,7 @@ void KMacroExpanderBase::expandMacros( TQString &str )
TQString rsts;
for (pos = 0; pos < str.length(); ) {
- if (ec != (char)0) {
+ if (ec != (QChar)0) {
if (str.unicode()[pos] != ec)
goto nohit;
if (!(len = expandEscapedMacro( str, pos, rst )))
@@ -110,7 +110,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
while (pos < str.length()) {
TQChar cc( str.unicode()[pos] );
- if (ec != (char)0) {
+ if (ec != (QChar)0) {
if (cc != ec)
goto nohit;
if (!(len = expandEscapedMacro( str, pos, rst )))
@@ -315,7 +315,7 @@ static TQStringList &operator+=( TQStringList &s, const TQString &n) { s << n; r
static bool
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');
}
////////
diff --git a/kdecore/kmimesourcefactory.h b/kdecore/kmimesourcefactory.h
index ce91ee0f8..536ead0b8 100644
--- a/kdecore/kmimesourcefactory.h
+++ b/kdecore/kmimesourcefactory.h
@@ -37,7 +37,7 @@ class KInstance;
*
* @author Peter Putzer <putzer@kde.org>
*/
-class KDECORE_EXPORT KMimeSourceFactory : public QMimeSourceFactory
+class KDECORE_EXPORT KMimeSourceFactory : public TQMimeSourceFactory
{
public:
diff --git a/kdecore/kmultipledrag.h b/kdecore/kmultipledrag.h
index 85a0a66a3..47bfbd378 100644
--- a/kdecore/kmultipledrag.h
+++ b/kdecore/kmultipledrag.h
@@ -51,7 +51,7 @@ class KMultipleDragPrivate;
*
* @author David Faure <faure@kde.org>
*/
-class KDECORE_EXPORT KMultipleDrag : public QDragObject
+class KDECORE_EXPORT KMultipleDrag : public TQDragObject
{
Q_OBJECT
diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp
index 49cacc79b..bc446367a 100644
--- a/kdecore/kpalette.cpp
+++ b/kdecore/kpalette.cpp
@@ -65,10 +65,10 @@ KPalette::KPalette(const TQString &name)
// Read first line
// Expected "GIMP Palette"
- if (paletteFile.readLine(line, maxLength) == -1) return;
+ if (paletteFile.readLine(line.ascii(), maxLength) == -1) return;
if (line.find(" Palette") == -1) return;
- while( paletteFile.readLine(line, maxLength) != -1)
+ while( paletteFile.readLine(line.ascii(), maxLength) != -1)
{
if (line[0] == '#')
{
diff --git a/kdecore/kprocio.cpp b/kdecore/kprocio.cpp
index 15a2f70bc..9159edab5 100644
--- a/kdecore/kprocio.cpp
+++ b/kdecore/kprocio.cpp
@@ -104,7 +104,7 @@ bool KProcIO::start (RunMode runmode, bool includeStderr)
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)
diff --git a/kdecore/krandomsequence.cpp b/kdecore/krandomsequence.cpp
index 8e4c88297..04240733f 100644
--- a/kdecore/krandomsequence.cpp
+++ b/kdecore/krandomsequence.cpp
@@ -217,7 +217,7 @@ KRandomSequence::getBool()
return (((unsigned long) m_lngShufflePos) & 1);
}
-class KRandomSequenceList : public QGList
+class KRandomSequenceList : public TQGList
{
friend class KRandomSequence;
public:
diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp
index fc57bc2d3..d9a374d0c 100644
--- a/kdecore/krfcdate.cpp
+++ b/kdecore/krfcdate.cpp
@@ -394,7 +394,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ )
mday = l[2].toUInt();
// 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);
}
diff --git a/kdecore/ksavefile.cpp b/kdecore/ksavefile.cpp
index 77b0a6b41..16887a677 100644
--- a/kdecore/ksavefile.cpp
+++ b/kdecore/ksavefile.cpp
@@ -171,7 +171,7 @@ bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir
else
nameOnly = cFilename.mid(slash + 1);
cBackup = TQFile::encodeName(backupDir);
- if ( backupDir[backupDir.length()-1] != '/' )
+ if ( backupDir[backupDir.length()-1] != (QChar)'/' )
cBackup += '/';
cBackup += nameOnly;
}
diff --git a/kdecore/kshortcutmenu.cpp b/kdecore/kshortcutmenu.cpp
index 399096877..3df389f07 100644
--- a/kdecore/kshortcutmenu.cpp
+++ b/kdecore/kshortcutmenu.cpp
@@ -84,14 +84,14 @@ void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent )
KKey key( pEvent );
switch( pEvent->key() ) {
- case Key_Shift:
- case Key_Control:
- case Key_Alt:
- case Key_Meta:
- case Key_Super_L:
- case Key_Super_R:
- case Key_Hyper_L:
- case Key_Hyper_R:
+ case TQ_Key_Shift:
+ case TQ_Key_Control:
+ case TQ_Key_Alt:
+ case TQ_Key_Meta:
+ case TQ_Key_Super_L:
+ case TQ_Key_Super_R:
+ case TQ_Key_Hyper_L:
+ case TQ_Key_Hyper_R:
break;
default:
int iItem = searchForKey( key );
diff --git a/kdecore/kshortcutmenu.h b/kdecore/kshortcutmenu.h
index 10f486094..aa641e201 100644
--- a/kdecore/kshortcutmenu.h
+++ b/kdecore/kshortcutmenu.h
@@ -32,7 +32,7 @@ class KAccelActions;
/**
* @internal
*/
-class KDECORE_EXPORT KShortcutMenu : public QPopupMenu
+class KDECORE_EXPORT KShortcutMenu : public TQPopupMenu
{
Q_OBJECT
public:
diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp
index 6ec8eb1bc..f64acbd90 100644
--- a/kdecore/kstandarddirs.cpp
+++ b/kdecore/kstandarddirs.cpp
@@ -189,7 +189,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
return;
TQString dir = _dir;
- if (dir.at(dir.length() - 1) != '/')
+ if (dir.at(dir.length() - 1) != (QChar)'/')
dir += '/';
if (!prefixes.contains(dir)) {
@@ -209,7 +209,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
return;
TQString dir = _dir;
- if (dir.at(dir.length() - 1) != '/')
+ if (dir.at(dir.length() - 1) != (QChar)'/')
dir += '/';
if (!d->xdgconf_prefixes.contains(dir)) {
@@ -229,7 +229,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
return;
TQString dir = _dir;
- if (dir.at(dir.length() - 1) != '/')
+ if (dir.at(dir.length() - 1) != (QChar)'/')
dir += '/';
if (!d->xdgdata_prefixes.contains(dir)) {
@@ -271,7 +271,7 @@ bool KStandardDirs::addResourceType( const char *type,
relatives.insert(type, rels);
}
TQString copy = relativename;
- if (copy.at(copy.length() - 1) != '/')
+ if (copy.at(copy.length() - 1) != (QChar)'/')
copy += '/';
if (!rels->contains(copy)) {
if (priority)
@@ -301,7 +301,7 @@ bool KStandardDirs::addResourceDir( const char *type,
absolutes.insert(type, paths);
}
TQString copy = absdir;
- if (copy.at(copy.length() - 1) != '/')
+ if (copy.at(copy.length() - 1) != (QChar)'/')
copy += '/';
if (!paths->contains(copy)) {
@@ -452,7 +452,7 @@ bool KStandardDirs::exists(const TQString &fullPath)
{
KDE_struct_stat buff;
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 ))
return true;
} else
@@ -478,9 +478,9 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
return;
#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
- assert(path.at(path.length() - 1) == '/');
+ assert(path.at(path.length() - 1) == (QChar)'/');
#endif
struct dirent *ep;
@@ -492,7 +492,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
while( ( ep = readdir( dp ) ) != 0L )
{
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;
if (!recursive && !regexp.exactMatch(fn))
@@ -569,9 +569,9 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
if (prefix.isEmpty()) //for sanity
return;
#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
- assert(prefix.at(prefix.length() - 1) == '/');
+ assert(prefix.at(prefix.length() - 1) == (QChar)'/');
#endif
KDE_struct_stat buff;
@@ -591,7 +591,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
while( ( ep = readdir( dp ) ) != 0L )
{
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;
if ( !pathExp.exactMatch(fn) )
@@ -692,7 +692,7 @@ KStandardDirs::realPath(const TQString &dirname)
if (realpath( TQFile::encodeName(dirname).data(), realpath_buffer) != 0) {
// success, use result from realpath
int len = strlen(realpath_buffer);
- realpath_buffer[len] = '/';
+ realpath_buffer[len] = (QChar)'/';
realpath_buffer[len+1] = 0;
return TQFile::decodeName(realpath_buffer);
}
@@ -771,7 +771,7 @@ void KStandardDirs::createSpecialResource(const char *type)
if (result > 0)
{
link[result] = 0;
- if (link[0] == '/')
+ if (link[0] == (int)'/')
dir = TQFile::decodeName(link);
else
dir = TQDir::cleanDirPath(dir+TQFile::decodeName(link));
@@ -892,7 +892,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr )
{
p = tokens[ i ];
- if ( p[ 0 ] == '~' )
+ if ( p[ 0 ] == (QChar)'~' )
{
int len = p.find( '/' );
if ( len == -1 )
@@ -1167,7 +1167,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode)
uint len = target.length();
// append trailing slash if missing
- if (dir.at(len - 1) != '/')
+ if (dir.at(len - 1) != (QChar)'/')
target += '/';
TQString base("");
@@ -1220,7 +1220,7 @@ static TQString executablePrefix()
if (length == -1)
return TQString::null;
- path_buffer[length] = '\0';
+ path_buffer[length] = (QChar)'\0';
TQString path = TQFile::decodeName(path_buffer);
@@ -1314,7 +1314,7 @@ void KStandardDirs::addKDEDefaults()
TQString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
if (!localKdeDir.isEmpty())
{
- if (localKdeDir[localKdeDir.length()-1] != '/')
+ if (localKdeDir[localKdeDir.length()-1] != (QChar)'/')
localKdeDir += '/';
}
else
@@ -1358,7 +1358,7 @@ void KStandardDirs::addKDEDefaults()
TQString localXdgDir = readEnvPath("XDG_CONFIG_HOME");
if (!localXdgDir.isEmpty())
{
- if (localXdgDir[localXdgDir.length()-1] != '/')
+ if (localXdgDir[localXdgDir.length()-1] != (QChar)'/')
localXdgDir += '/';
}
else
@@ -1390,7 +1390,7 @@ void KStandardDirs::addKDEDefaults()
it != kdedirList.end(); ++it)
{
TQString dir = *it;
- if (dir[dir.length()-1] != '/')
+ if (dir[dir.length()-1] != (QChar)'/')
dir += '/';
xdgdirList.append(dir+"share/");
}
@@ -1402,7 +1402,7 @@ void KStandardDirs::addKDEDefaults()
localXdgDir = readEnvPath("XDG_DATA_HOME");
if (!localXdgDir.isEmpty())
{
- if (localXdgDir[localXdgDir.length()-1] != '/')
+ if (localXdgDir[localXdgDir.length()-1] != (QChar)'/')
localXdgDir += '/';
}
else
diff --git a/kdecore/kstartupinfo.cpp b/kdecore/kstartupinfo.cpp
index 40f06127e..673e5e6ab 100644
--- a/kdecore/kstartupinfo.cpp
+++ b/kdecore/kstartupinfo.cpp
@@ -1140,9 +1140,9 @@ TQString KStartupInfoData::to_text() const
ret += TQString::fromLatin1( " DESKTOP=%1" )
.arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0
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())
- 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();
it != d->pids.end();
++it )
@@ -1466,7 +1466,7 @@ static
TQString get_str( const TQString& item_P )
{
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( '\"' );
if( pos2 < 0 )
@@ -1522,8 +1522,8 @@ static TQString escape_str( const TQString& str_P )
pos < str_P.length();
++pos )
{
- if( str_P[ pos ] == '\\'
- || str_P[ pos ] == '"' )
+ if( str_P[ pos ] == (QChar)'\\'
+ || str_P[ pos ] == (QChar)'"' )
ret += '\\';
ret += str_P[ pos ];
}
diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp
index 6f786d904..3184c18e2 100644
--- a/kdecore/kstringhandler.cpp
+++ b/kdecore/kstringhandler.cpp
@@ -419,8 +419,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa
return false;
// Patterns like "Makefile*"
- if ( pattern[ pattern_len - 1 ] == '*' && len + 1 >= pattern_len ) {
- if ( pattern[ 0 ] == '*' )
+ if ( pattern[ pattern_len - 1 ] == (QChar)'*' && len + 1 >= pattern_len ) {
+ if ( pattern[ 0 ] == (QChar)'*' )
{
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"
- 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 *c2 = filename.unicode() + len - 1;
diff --git a/kdecore/kurldrag.h b/kdecore/kurldrag.h
index fd911dfb7..eb1f9522a 100644
--- a/kdecore/kurldrag.h
+++ b/kdecore/kurldrag.h
@@ -41,7 +41,7 @@ class KURLDragPrivate;
* To create a drag object, use the KURLDrag constructor.
* To handle drops, use TQUriDrag::canDecode() and KURLDrag::decode()
*/
-class KDECORE_EXPORT KURLDrag : public QUriDrag
+class KDECORE_EXPORT KURLDrag : public TQUriDrag
{
public:
/**