-rw-r--r-- | microkde/kdecore/kcatalogue.cpp | 4 | ||||
-rw-r--r-- | microkde/kdecore/kconfigbase.h | 4 | ||||
-rw-r--r-- | microkde/kdecore/klibloader.cpp | 29 | ||||
-rw-r--r-- | microkde/kdecore/klibloader.h | 10 | ||||
-rw-r--r-- | microkde/kdecore/klocale.cpp | 23 | ||||
-rw-r--r-- | microkde/kdecore/klocale.h | 4 | ||||
-rw-r--r-- | microkde/kdecore/kmdcodec.cpp | 139 | ||||
-rw-r--r-- | microkde/kdecore/kmdcodec.h | 38 | ||||
-rw-r--r-- | microkde/kdecore/kprefs.cpp | 16 | ||||
-rw-r--r-- | microkde/kdecore/kprefs.h | 10 | ||||
-rw-r--r-- | microkde/kdecore/kshortcut.h | 8 | ||||
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 24 | ||||
-rw-r--r-- | microkde/kdecore/kstandarddirs.h | 10 |
13 files changed, 167 insertions, 152 deletions
diff --git a/microkde/kdecore/kcatalogue.cpp b/microkde/kdecore/kcatalogue.cpp index 97ac326..1600b08 100644 --- a/microkde/kdecore/kcatalogue.cpp +++ b/microkde/kdecore/kcatalogue.cpp @@ -21,4 +21,6 @@ #include <qfile.h> +//Added by qt3to4: +#include <Q3CString> #include <kdebug.h> @@ -89,5 +91,5 @@ void KCatalogue::setFileName( const QString & fileName ) doUnload(); - QCString newFileName = QFile::encodeName( fileName ); + Q3CString newFileName = QFile::encodeName( fileName ); if ( !fileName.isEmpty() ) diff --git a/microkde/kdecore/kconfigbase.h b/microkde/kdecore/kconfigbase.h index 7e56d11..1ef6a04 100644 --- a/microkde/kdecore/kconfigbase.h +++ b/microkde/kdecore/kconfigbase.h @@ -27,4 +27,6 @@ #include "kconfig.h" +//Added by qt3to4: +#include <Q3CString> /** @@ -83,5 +85,5 @@ public: { _config->setGroup( group ); } - KConfigGroupSaver( KConfig* config, const QCString &group ) + KConfigGroupSaver( KConfig* config, const Q3CString &group ) : _config(config), _oldgroup(config->group()) { _config->setGroup( group ); } diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp index 6d0475a..0b54eb6 100644 --- a/microkde/kdecore/klibloader.cpp +++ b/microkde/kdecore/klibloader.cpp @@ -21,7 +21,10 @@ #include <qfile.h> #include <qtimer.h> -#include <qobjectdict.h> -#include <qwidgetlist.h> +#include <q3objectdict.h> #include <qwidget.h> +#include <qwidget.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> #include "kapplication.h" @@ -46,5 +49,5 @@ -template class QAsciiDict<KLibrary>; +template class Q3AsciiDict<KLibrary>; #include <stdlib.h> //getenv @@ -121,5 +124,5 @@ KLibrary::~KLibrary() if ( m_objs.count() > 0 ) { - QPtrListIterator<QObject> it( m_objs ); + Q3PtrListIterator<QObject> it( m_objs ); for ( ; it.current() ; ++it ) { @@ -153,5 +156,5 @@ KLibFactory* KLibrary::factory() return m_factory; - QCString symname; + Q3CString symname; symname.sprintf("init_%s", name().latin1() ); @@ -306,6 +309,6 @@ class KLibLoaderPrivate { public: - QPtrList<KLibWrapPrivate> loaded_stack; - QPtrList<KLibWrapPrivate> pending_close; + Q3PtrList<KLibWrapPrivate> loaded_stack; + Q3PtrList<KLibWrapPrivate> pending_close; enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode; @@ -349,5 +352,5 @@ KLibLoader::~KLibLoader() // kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl; - QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); + Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs ); for (; it.current(); ++it ) { @@ -365,5 +368,5 @@ KLibLoader::~KLibLoader() QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ ) { - QCString libname( name ); + Q3CString libname( name ); // only append ".la" if there is no extension @@ -422,5 +425,5 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta #ifndef NDEBUG kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl; - self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname); + self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(QString(libname)); qDebug("KLibLoader::library could not find library: %s", libname.data()); @@ -470,5 +473,5 @@ KLibrary* KLibLoader::library( const char *name ) /* Test if this library was loaded at some time, but got unloaded meanwhile, whithout being dlclose()'ed. */ - QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); + Q3PtrListIterator<KLibWrapPrivate> it(d->loaded_stack); for (; it.current(); ++it) { if (it.current()->name == name) @@ -551,5 +554,5 @@ void KLibLoader::slotLibraryDestroyed() const KLibrary *lib = static_cast<const KLibrary *>( sender() ); - QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); + Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs ); for (; it.current(); ++it ) if ( it.current()->lib == lib ) @@ -570,5 +573,5 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) /* First delete all KLibrary objects in pending_close, but _don't_ unload the DSO behind it. */ - QPtrListIterator<KLibWrapPrivate> it(d->pending_close); + Q3PtrListIterator<KLibWrapPrivate> it(d->pending_close); for (; it.current(); ++it) { wrap = it.current(); diff --git a/microkde/kdecore/klibloader.h b/microkde/kdecore/klibloader.h index ed57109..53d146e 100644 --- a/microkde/kdecore/klibloader.h +++ b/microkde/kdecore/klibloader.h @@ -22,6 +22,6 @@ #include <qstring.h> #include <qstringlist.h> -#include <qasciidict.h> -#include <qptrlist.h> +#include <q3asciidict.h> +#include <q3ptrlist.h> #include <kglobal.h> @@ -53,5 +53,5 @@ class KLibrary : public QObject { friend class KLibLoader; - friend class QAsciiDict<KLibrary>; + friend class Q3AsciiDict<KLibrary>; Q_OBJECT @@ -128,5 +128,5 @@ private: //US void * m_handle; QLibrary* m_handle; - QPtrList<QObject> m_objs; + Q3PtrList<QObject> m_objs; QTimer *m_timer; KLibraryPrivate *d; @@ -288,5 +288,5 @@ private slots: private: void close_pending( KLibWrapPrivate * ); - QAsciiDict<KLibWrapPrivate> m_libs; + Q3AsciiDict<KLibWrapPrivate> m_libs; static KLibLoader* s_self; diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 1d8ae9f..dd310fa 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -1,4 +1,5 @@ #include <qregexp.h> #include <qapplication.h> +#include <QDesktopWidget> #include "kdebug.h" @@ -12,6 +13,6 @@ -QDict<QString> *mLocaleDict = 0; -void setLocaleDict( QDict<QString> * dict ) +Q3Dict<QString> *mLocaleDict = 0; +void setLocaleDict( Q3Dict<QString> * dict ) { mLocaleDict = dict; @@ -46,5 +47,5 @@ void addExist(const char *text,QString trans ) #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #endif @@ -54,8 +55,8 @@ void dumpMissing() QString fileName = "/tmp/usernewtrans.txt"; QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -71,8 +72,8 @@ void dumpMissing() QString fileName = "/tmp/usertrans.txt"; QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -468,5 +469,5 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime, else if ( intIntDateFormat == Format1 ) format = "%1 %2"; - else if ( intIntDateFormat == ISODate ) + else if ( intIntDateFormat == Qt::ISODate ) format = "%1T%2"; @@ -528,5 +529,5 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con c = fmt.at(fmtpos++); - switch (c) + switch (c.unicode()) { case 'a': @@ -639,5 +640,5 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const c = Format.at(Formatpos++); - switch (c) + switch (c.unicode()) { case 'p': @@ -735,5 +736,5 @@ QDateTime KLocale::readDateTime(const QString &intstr, QDate m_date = readDate(date, dformat, &ok1); - QTime m_time = readTime(time, tformat, &ok2); + QTime m_time = readTime(time, !tformat.isEmpty(), &ok2); QDateTime m_dt; diff --git a/microkde/kdecore/klocale.h b/microkde/kdecore/klocale.h index 58e0b39..840fc9d 100644 --- a/microkde/kdecore/klocale.h +++ b/microkde/kdecore/klocale.h @@ -5,5 +5,5 @@ #include <qstringlist.h> #include <qdatetime.h> -#include <qdict.h> +#include <q3dict.h> #ifndef I18N_NOOP @@ -12,5 +12,5 @@ class KCalendarSystem; -void setLocaleDict( QDict<QString> * dict ); +void setLocaleDict( Q3Dict<QString> * dict ); QString i18n(const char *text); QString i18n(const char *hint, const char *text); diff --git a/microkde/kdecore/kmdcodec.cpp b/microkde/kdecore/kmdcodec.cpp index bc03569..db11e52 100644 --- a/microkde/kdecore/kmdcodec.cpp +++ b/microkde/kdecore/kmdcodec.cpp @@ -40,4 +40,6 @@ #include <kdebug.h> #include "kmdcodec.h" +//Added by qt3to4: +#include <Q3CString> #define KMD5_S11 7 @@ -148,12 +150,12 @@ static int rikFindChar(register const char * _s, const char c) } -QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF) +Q3CString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF) { QByteArray out; quotedPrintableEncode (in, out, useCRLF); - return QCString (out.data(), out.size()+1); + return Q3CString (out.data(), out.size()+1); } -QCString KCodecs::quotedPrintableEncode(const QCString& str, bool useCRLF) +Q3CString KCodecs::quotedPrintableEncode(const Q3CString& str, bool useCRLF) { if (str.isEmpty()) @@ -281,12 +283,12 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool } -QCString KCodecs::quotedPrintableDecode(const QByteArray & in) +Q3CString KCodecs::quotedPrintableDecode(const QByteArray & in) { QByteArray out; quotedPrintableDecode (in, out); - return QCString (out.data(), out.size()+1); + return Q3CString (out.data(), out.size()+1); } -QCString KCodecs::quotedPrintableDecode(const QCString & str) +Q3CString KCodecs::quotedPrintableDecode(const Q3CString & str) { if (str.isEmpty()) @@ -356,5 +358,5 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out) } -QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) +Q3CString KCodecs::base64Encode( const Q3CString& str, bool insertLFs ) { if ( str.isEmpty() ) @@ -366,9 +368,9 @@ QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) } -QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) +Q3CString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) { QByteArray out; base64Encode( in, out, insertLFs ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -406,13 +408,13 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, { if ( count && (count%76) == 0 ) - out.at(didx++) = '\n'; + out[didx++] = '\n'; count += 4; } - out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077]; + out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = Base64EncMap[(data[sidx+2] >> 6) & 003 | + out[didx++] = Base64EncMap[(data[sidx+2] >> 6) & 003 | (data[sidx+1] << 2) & 077]; - out.at(didx++) = Base64EncMap[data[sidx+2] & 077]; + out[didx++] = Base64EncMap[data[sidx+2] & 077]; sidx += 3; } @@ -422,16 +424,16 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, { if ( insertLFs && (count > 0) && (count%76) == 0 ) - out.at(didx++) = '\n'; + out[didx++] = '\n'; - out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; + out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077]; if (sidx < len-1) { - out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = Base64EncMap[(data[sidx+1] << 2) & 077]; + out[didx++] = Base64EncMap[(data[sidx+1] << 2) & 077]; } else { - out.at(didx++) = Base64EncMap[(data[sidx] << 4) & 077]; + out[didx++] = Base64EncMap[(data[sidx] << 4) & 077]; } } @@ -439,11 +441,8 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, // Add padding while (didx < out.size()) - { - out.at(didx) = '='; - didx++; - } + out[didx++] = '='; } -QCString KCodecs::base64Decode( const QCString& str ) +Q3CString KCodecs::base64Decode( const Q3CString& str ) { if ( str.isEmpty() ) @@ -455,9 +454,9 @@ QCString KCodecs::base64Decode( const QCString& str ) } -QCString KCodecs::base64Decode( const QByteArray& in ) +Q3CString KCodecs::base64Decode( const QByteArray& in ) { QByteArray out; base64Decode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -506,5 +505,5 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) (ch > 96 && ch < 123) || ch == '+' || ch == '/' || ch == '=') { - out.at(outIdx++) = Base64DecMap[ch]; + out[outIdx++] = Base64DecMap[ch]; } else @@ -524,7 +523,7 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) while (didx < len-2) { - out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); - out.at(didx+1) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); - out.at(didx+2) = (((out.at(sidx+2) << 6) & 255) | (out.at(sidx+3) & 077)); + out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003)); + out[didx+1] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017)); + out[didx+2] = (((out[sidx+2] << 6) & 255) | (out[sidx+3] & 077)); sidx += 4; didx += 3; @@ -533,8 +532,8 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) if (didx < len) - out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); + out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003)); if (++didx < len ) - out.at(didx) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); + out[didx] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017)); // Resize the output buffer @@ -543,5 +542,5 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) } -QCString KCodecs::uuencode( const QCString& str ) +Q3CString KCodecs::uuencode( const Q3CString& str ) { if ( str.isEmpty() ) @@ -554,9 +553,9 @@ QCString KCodecs::uuencode( const QCString& str ) } -QCString KCodecs::uuencode( const QByteArray& in ) +Q3CString KCodecs::uuencode( const QByteArray& in ) { QByteArray out; uuencode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -581,20 +580,20 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) { // line length - out.at(didx++) = UUEncMap[line_len]; + out[didx++] = UUEncMap[line_len]; // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion for (unsigned int end = sidx+line_len; sidx < end; sidx += 3) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | + out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 | (data[sidx+1] << 2) & 077]; - out.at(didx++) = UUEncMap[data[sidx+2] & 077]; + out[didx++] = UUEncMap[data[sidx+2] & 077]; } // line terminator //for (unsigned int idx=0; idx < nl_len; idx++) - //out.at(didx++) = nl[idx]; + //out[didx++] = nl[idx]; memcpy(out.data()+didx, nl, nl_len); didx += nl_len; @@ -602,14 +601,14 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) // line length - out.at(didx++) = UUEncMap[len-sidx]; + out[didx++] = UUEncMap[len-sidx]; // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion while (sidx+2 < len) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | + out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 | (data[sidx+1] << 2) & 077]; - out.at(didx++) = UUEncMap[data[sidx+2] & 077]; + out[didx++] = UUEncMap[data[sidx+2] & 077]; sidx += 3; } @@ -617,16 +616,16 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) if (sidx < len-1) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] << 2) & 077]; - out.at(didx++) = UUEncMap[0]; + out[didx++] = UUEncMap[(data[sidx+1] << 2) & 077]; + out[didx++] = UUEncMap[0]; } else if (sidx < len) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[0]; - out.at(didx++) = UUEncMap[0]; + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx] << 4) & 077]; + out[didx++] = UUEncMap[0]; + out[didx++] = UUEncMap[0]; } @@ -640,5 +639,5 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) } -QCString KCodecs::uudecode( const QCString& str ) +Q3CString KCodecs::uudecode( const Q3CString& str ) { if ( str.isEmpty() ) @@ -651,9 +650,9 @@ QCString KCodecs::uudecode( const QCString& str ) } -QCString KCodecs::uudecode( const QByteArray& in ) +Q3CString KCodecs::uudecode( const QByteArray& in ) { QByteArray out; uudecode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -706,7 +705,7 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) C = UUDecMap[(unsigned char) data[sidx+2]]; D = UUDecMap[(unsigned char) data[sidx+3]]; - out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); - out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); - out.at(didx++) = ( ((C << 6) & 255) | (D & 077) ); + out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) ); + out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) ); + out[didx++] = ( ((C << 6) & 255) | (D & 077) ); sidx += 4; } @@ -717,5 +716,5 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) A = UUDecMap[(unsigned char) data[sidx]]; B = UUDecMap[(unsigned char) data[sidx+1]]; - out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); + out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) ); } @@ -724,5 +723,5 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) B = UUDecMap[(unsigned char) data[sidx+1]]; C = UUDecMap[(unsigned char) data[sidx+2]]; - out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); + out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) ); } @@ -762,5 +761,5 @@ KMD5::KMD5(const QByteArray& in) } -KMD5::KMD5(const QCString& in) +KMD5::KMD5(const Q3CString& in) { init(); @@ -773,5 +772,5 @@ void KMD5::update(const QByteArray& in) } -void KMD5::update(const QCString& in) +void KMD5::update(const Q3CString& in) { update(in.data(), int(in.length())); @@ -874,5 +873,5 @@ bool KMD5::verify( const KMD5::Digest& digest) } -bool KMD5::verify( const QCString& hexdigest) +bool KMD5::verify( const Q3CString& hexdigest) { finalize(); @@ -893,7 +892,7 @@ void KMD5::rawDigest( KMD5::Digest& bin ) -QCString KMD5::hexDigest() +Q3CString KMD5::hexDigest() { - QCString s(33); + Q3CString s(33); finalize(); @@ -906,5 +905,5 @@ QCString KMD5::hexDigest() } -void KMD5::hexDigest(QCString& s) +void KMD5::hexDigest(Q3CString& s) { finalize(); @@ -916,5 +915,5 @@ void KMD5::hexDigest(QCString& s) } -QCString KMD5::base64Digest() +Q3CString KMD5::base64Digest() { QByteArray ba(16); @@ -957,5 +956,5 @@ void KMD5::transform( const unsigned char block[64] ) //US Q_ASSERT(!m_finalized); // not just a user error, since the method is private - ASSERT(!m_finalized); // not just a user error, since the method is private + Q_ASSERT(!m_finalized); // not just a user error, since the method is private /* Round 1 */ diff --git a/microkde/kdecore/kmdcodec.h b/microkde/kdecore/kmdcodec.h index 2c4d611..616b683 100644 --- a/microkde/kdecore/kmdcodec.h +++ b/microkde/kdecore/kmdcodec.h @@ -40,4 +40,6 @@ #include <qstring.h> #include <qiodevice.h> +//Added by qt3to4: +#include <Q3CString> /** @@ -82,5 +84,5 @@ public: * @return quoted-printable encoded data. */ - static QCString quotedPrintableEncode(const QByteArray & in, + static Q3CString quotedPrintableEncode(const QByteArray & in, bool useCRLF = true); @@ -97,5 +99,5 @@ public: * @return quoted-printable encoded data. */ - static QCString quotedPrintableEncode(const QCString & str, + static Q3CString quotedPrintableEncode(const Q3CString & str, bool useCRLF = true); @@ -130,5 +132,5 @@ public: * @return decoded data. */ - static QCString quotedPrintableDecode(const QByteArray & in); + static Q3CString quotedPrintableDecode(const QByteArray & in); /** @@ -141,5 +143,5 @@ public: * @return decoded data. */ - static QCString quotedPrintableDecode(const QCString & str); + static Q3CString quotedPrintableDecode(const Q3CString & str); /** @@ -176,5 +178,5 @@ public: * @return a uuencoded data. */ - static QCString uuencode( const QByteArray& in ); + static Q3CString uuencode( const QByteArray& in ); /** @@ -187,5 +189,5 @@ public: * @return the encoded string. */ - static QCString uuencode( const QCString& str ); + static Q3CString uuencode( const Q3CString& str ); /** @@ -216,5 +218,5 @@ public: * @return a decoded string. */ - static QCString uudecode( const QByteArray& in ); + static Q3CString uudecode( const QByteArray& in ); /** @@ -227,5 +229,5 @@ public: * @return a uudecoded string. */ - static QCString uudecode( const QCString& str ); + static Q3CString uudecode( const Q3CString& str ); /** @@ -264,5 +266,5 @@ public: * @return a base64 encoded string. */ - static QCString base64Encode( const QByteArray& in, bool insertLFs = false); + static Q3CString base64Encode( const QByteArray& in, bool insertLFs = false); /** @@ -276,5 +278,5 @@ public: * @return the decoded string. */ - static QCString base64Encode( const QCString& str, bool insertLFs = false ); + static Q3CString base64Encode( const Q3CString& str, bool insertLFs = false ); /** @@ -309,5 +311,5 @@ public: * @return the decoded data. */ - static QCString base64Decode( const QByteArray& in ); + static Q3CString base64Decode( const QByteArray& in ); /** @@ -320,5 +322,5 @@ public: * @return the decoded string. */ - static QCString base64Decode( const QCString& str ); + static Q3CString base64Decode( const Q3CString& str ); /** @@ -432,5 +434,5 @@ public: * Same as above except it accepts a QByteArray as its argument. */ - KMD5(const QCString& a ); + KMD5(const Q3CString& a ); /** @@ -461,5 +463,5 @@ public: * @param in message to be added to the digest (QByteArray). */ - void update(const QCString& in ); + void update(const Q3CString& in ); /** @@ -503,10 +505,10 @@ public: * a hexadecimal representation. */ - QCString hexDigest (); + Q3CString hexDigest (); /** * @overload */ - void hexDigest(QCString&); + void hexDigest(Q3CString&); /** @@ -514,5 +516,5 @@ public: * a base64-encoded representation. */ - QCString base64Digest (); + Q3CString base64Digest (); /** @@ -525,5 +527,5 @@ public: * @overload */ - bool verify(const QCString&); + bool verify(const Q3CString&); protected: diff --git a/microkde/kdecore/kprefs.cpp b/microkde/kdecore/kprefs.cpp index 0220a34..d4010fa 100644 --- a/microkde/kdecore/kprefs.cpp +++ b/microkde/kdecore/kprefs.cpp @@ -22,4 +22,6 @@ #include <qcolor.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kconfig.h> @@ -141,6 +143,6 @@ class KPrefsItemStringList : public KPrefsItem { class KPrefsItemIntList : public KPrefsItem { public: - KPrefsItemIntList(const QString &group,const QString &name,QValueList<int> *, - const QValueList<int> &defaultValue=QValueList<int>()); + KPrefsItemIntList(const QString &group,const QString &name,Q3ValueList<int> *, + const Q3ValueList<int> &defaultValue=Q3ValueList<int>()); virtual ~KPrefsItemIntList() {} @@ -150,6 +152,6 @@ class KPrefsItemIntList : public KPrefsItem { private: - QValueList<int> *mReference; - QValueList<int> mDefault; + Q3ValueList<int> *mReference; + Q3ValueList<int> mDefault; }; @@ -365,5 +367,5 @@ void KPrefsItemStringList::readConfig(KConfig *config) KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name, - QValueList<int> *reference,const QValueList<int> &defaultValue) : + Q3ValueList<int> *reference,const Q3ValueList<int> &defaultValue) : KPrefsItem(group,name) { @@ -506,6 +508,6 @@ void KPrefs::addItemStringList(const QString &key,QStringList *reference, } -void KPrefs::addItemIntList(const QString &key,QValueList<int> *reference, - const QValueList<int> &defaultValue) +void KPrefs::addItemIntList(const QString &key,Q3ValueList<int> *reference, + const Q3ValueList<int> &defaultValue) { addItem(new KPrefsItemIntList(*mCurrentGroup,key,reference,defaultValue)); diff --git a/microkde/kdecore/kprefs.h b/microkde/kdecore/kprefs.h index 95d2724..d9d1572 100644 --- a/microkde/kdecore/kprefs.h +++ b/microkde/kdecore/kprefs.h @@ -22,9 +22,11 @@ // $Id$ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qcolor.h> #include <qfont.h> #include <qsize.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3ValueList> class KConfig; @@ -284,6 +286,6 @@ class KPrefs { this item. */ - void addItemIntList(const QString &key,QValueList<int> *reference, - const QValueList<int> &defaultValue=QValueList<int>()); + void addItemIntList(const QString &key,Q3ValueList<int> *reference, + const Q3ValueList<int> &defaultValue=Q3ValueList<int>()); protected: @@ -311,5 +313,5 @@ class KPrefs { KConfig *mConfig; // pointer to KConfig object - QPtrList<KPrefsItem> mItems; + Q3PtrList<KPrefsItem> mItems; }; diff --git a/microkde/kdecore/kshortcut.h b/microkde/kdecore/kshortcut.h index 4813734..244d590 100644 --- a/microkde/kdecore/kshortcut.h +++ b/microkde/kdecore/kshortcut.h @@ -564,5 +564,5 @@ class KShortcut * @see Qt::Key */ - KShortcut( int keyQt ) {} + KShortcut( int /*keyQt */) {} /** @@ -600,5 +600,5 @@ class KShortcut * @see KKeySequence::KKeySequence(const QString&) */ - KShortcut( const char* shortcut ) {} + KShortcut( const char* /*shortcut */) {} /** @@ -609,5 +609,5 @@ class KShortcut * @see KKeySequence::KKeySequence(const QString&) */ - KShortcut( const QString& shortcut ) {} + KShortcut( const QString& /*shortcut */) {} ~KShortcut() {} @@ -817,5 +817,5 @@ class KShortcut * @internal */ - QString toStringInternal( const KShortcut* pcutDefault = 0 ) const + QString toStringInternal( const KShortcut* /*pcutDefault*/ = 0 ) const { return "EMPTY IMPL."; diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index d5bfefd..f10934b 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp @@ -38,6 +38,6 @@ #include <qregexp.h> -#include <qasciidict.h> -#include <qdict.h> +#include <q3asciidict.h> +#include <q3dict.h> #include <qdir.h> #include <qfileinfo.h> @@ -47,4 +47,6 @@ #include <qstringlist.h> +//Added by qt3to4: +#include <Q3CString> #include "kstandarddirs.h" @@ -60,13 +62,13 @@ QString KStandardDirs::mAppDir = QString::null; -template class QDict<QStringList>; +template class Q3Dict<QStringList>; #if 0 -#include <qtextedit.h> +#include <q3textedit.h> void ddd( QString op ) { - static QTextEdit * dot = 0; + static Q3TextEdit * dot = 0; if ( ! dot ) - dot = new QTextEdit(); + dot = new Q3TextEdit(); dot->show(); @@ -86,5 +88,5 @@ public: bool restrictionsActive; bool dataRestrictionActive; - QAsciiDict<bool> restrictions; + Q3AsciiDict<bool> restrictions; QStringList xdgdata_prefixes; QStringList xdgconf_prefixes; @@ -446,5 +448,5 @@ static void lookupDirectory(const QString& path, const QString &relPart, */ //US this should do the same: - int pos = regexp.match(fn); + int pos = regexp.exactMatch(fn); if (!recursive && !pos == 0) continue; // No match @@ -483,5 +485,5 @@ static void lookupDirectory(const QString& path, const QString &relPart, */ //US this should do the same: - pos = regexp.match(fn); + pos = regexp.exactMatch(fn); if (!pos == 0) continue; // No match @@ -1109,5 +1111,5 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode) int pos = target.find('/', i); base += target.mid(i - 1, pos - i + 1); - QCString baseEncoded = QFile::encodeName(base); + Q3CString baseEncoded = QFile::encodeName(base); // bail out if we encountered a problem //US if (stat(baseEncoded, &st) != 0) @@ -1209,5 +1211,5 @@ QString readEnvPath(const char *env) // return ""; //#else - QCString c_path; + Q3CString c_path; if ( getenv(env) != NULL ) c_path = QString ( getenv(env) ); diff --git a/microkde/kdecore/kstandarddirs.h b/microkde/kdecore/kstandarddirs.h index 901384e..f0e28fc 100644 --- a/microkde/kdecore/kstandarddirs.h +++ b/microkde/kdecore/kstandarddirs.h @@ -25,5 +25,5 @@ #include <qstring.h> -#include <qdict.h> +#include <q3dict.h> #include <qstringlist.h> #include <kglobal.h> @@ -575,9 +575,9 @@ public: // Directory dictionaries - QDict<QStringList> absolutes; - QDict<QStringList> relatives; + Q3Dict<QStringList> absolutes; + Q3Dict<QStringList> relatives; - mutable QDict<QStringList> dircache; - mutable QDict<QString> savelocations; + mutable Q3Dict<QStringList> dircache; + mutable Q3Dict<QString> savelocations; // Disallow assignment and copy-construction |