summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore
Unidiff
Diffstat (limited to 'microkde/kdecore') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/kcatalogue.cpp4
-rw-r--r--microkde/kdecore/kconfigbase.h4
-rw-r--r--microkde/kdecore/klibloader.cpp29
-rw-r--r--microkde/kdecore/klibloader.h10
-rw-r--r--microkde/kdecore/klocale.cpp23
-rw-r--r--microkde/kdecore/klocale.h4
-rw-r--r--microkde/kdecore/kmdcodec.cpp139
-rw-r--r--microkde/kdecore/kmdcodec.h38
-rw-r--r--microkde/kdecore/kprefs.cpp16
-rw-r--r--microkde/kdecore/kprefs.h10
-rw-r--r--microkde/kdecore/kshortcut.h8
-rw-r--r--microkde/kdecore/kstandarddirs.cpp24
-rw-r--r--microkde/kdecore/kstandarddirs.h10
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
@@ -20,6 +20,8 @@
20//US #include <config.h> 20//US #include <config.h>
21 21
22#include <qfile.h> 22#include <qfile.h>
23//Added by qt3to4:
24#include <Q3CString>
23 25
24#include <kdebug.h> 26#include <kdebug.h>
25 27
@@ -88,7 +90,7 @@ void KCatalogue::setFileName( const QString & fileName )
88 90
89 doUnload(); 91 doUnload();
90 92
91 QCString newFileName = QFile::encodeName( fileName ); 93 Q3CString newFileName = QFile::encodeName( fileName );
92 94
93 if ( !fileName.isEmpty() ) 95 if ( !fileName.isEmpty() )
94 { 96 {
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
@@ -26,6 +26,8 @@
26#define _KCONFIGBASE_H 26#define _KCONFIGBASE_H
27 27
28#include "kconfig.h" 28#include "kconfig.h"
29//Added by qt3to4:
30#include <Q3CString>
29 31
30/** 32/**
31 * Helper class to facilitate working with @ref KConfig / @ref KSimpleConfig 33 * Helper class to facilitate working with @ref KConfig / @ref KSimpleConfig
@@ -82,7 +84,7 @@ public:
82 : _config(config), _oldgroup(config->group()) 84 : _config(config), _oldgroup(config->group())
83 { _config->setGroup( group ); } 85 { _config->setGroup( group ); }
84 86
85 KConfigGroupSaver( KConfig* config, const QCString &group ) 87 KConfigGroupSaver( KConfig* config, const Q3CString &group )
86 : _config(config), _oldgroup(config->group()) 88 : _config(config), _oldgroup(config->group())
87 { _config->setGroup( group ); } 89 { _config->setGroup( group ); }
88 90
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
@@ -20,9 +20,12 @@
20#include <qclipboard.h> 20#include <qclipboard.h>
21#include <qfile.h> 21#include <qfile.h>
22#include <qtimer.h> 22#include <qtimer.h>
23#include <qobjectdict.h> 23#include <q3objectdict.h>
24#include <qwidgetlist.h>
25#include <qwidget.h> 24#include <qwidget.h>
25#include <qwidget.h>
26//Added by qt3to4:
27#include <Q3CString>
28#include <Q3PtrList>
26 29
27#include "kapplication.h" 30#include "kapplication.h"
28#include "klibloader.h" 31#include "klibloader.h"
@@ -45,7 +48,7 @@
45#endif 48#endif
46 49
47 50
48template class QAsciiDict<KLibrary>; 51template class Q3AsciiDict<KLibrary>;
49 52
50#include <stdlib.h> //getenv 53#include <stdlib.h> //getenv
51 54
@@ -120,7 +123,7 @@ KLibrary::~KLibrary()
120 // If any object is remaining, delete 123 // If any object is remaining, delete
121 if ( m_objs.count() > 0 ) 124 if ( m_objs.count() > 0 )
122 { 125 {
123 QPtrListIterator<QObject> it( m_objs ); 126 Q3PtrListIterator<QObject> it( m_objs );
124 for ( ; it.current() ; ++it ) 127 for ( ; it.current() ; ++it )
125 { 128 {
126 kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl; 129 kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl;
@@ -152,7 +155,7 @@ KLibFactory* KLibrary::factory()
152 if ( m_factory ) 155 if ( m_factory )
153 return m_factory; 156 return m_factory;
154 157
155 QCString symname; 158 Q3CString symname;
156 symname.sprintf("init_%s", name().latin1() ); 159 symname.sprintf("init_%s", name().latin1() );
157 160
158 void* sym = symbol( symname ); 161 void* sym = symbol( symname );
@@ -305,8 +308,8 @@ KLibWrapPrivate::KLibWrapPrivate(KLibrary *l, QLibrary* h)
305class KLibLoaderPrivate 308class KLibLoaderPrivate
306{ 309{
307public: 310public:
308 QPtrList<KLibWrapPrivate> loaded_stack; 311 Q3PtrList<KLibWrapPrivate> loaded_stack;
309 QPtrList<KLibWrapPrivate> pending_close; 312 Q3PtrList<KLibWrapPrivate> pending_close;
310 enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode; 313 enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode;
311 314
312 QString errorMessage; 315 QString errorMessage;
@@ -348,7 +351,7 @@ KLibLoader::~KLibLoader()
348{ 351{
349// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl; 352// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl;
350 353
351 QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); 354 Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs );
352 for (; it.current(); ++it ) 355 for (; it.current(); ++it )
353 { 356 {
354 kdDebug(150) << "The KLibLoader contains the library " << it.current()->name 357 kdDebug(150) << "The KLibLoader contains the library " << it.current()->name
@@ -364,7 +367,7 @@ KLibLoader::~KLibLoader()
364//static 367//static
365QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ ) 368QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ )
366{ 369{
367 QCString libname( name ); 370 Q3CString libname( name );
368 371
369 // only append ".la" if there is no extension 372 // only append ".la" if there is no extension
370 // this allows to load non-libtool libraries as well 373 // this allows to load non-libtool libraries as well
@@ -421,7 +424,7 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
421 { 424 {
422#ifndef NDEBUG 425#ifndef NDEBUG
423 kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl; 426 kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl;
424 self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname); 427 self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(QString(libname));
425 428
426 qDebug("KLibLoader::library could not find library: %s", libname.data()); 429 qDebug("KLibLoader::library could not find library: %s", libname.data());
427#endif 430#endif
@@ -469,7 +472,7 @@ KLibrary* KLibLoader::library( const char *name )
469 472
470 /* Test if this library was loaded at some time, but got 473 /* Test if this library was loaded at some time, but got
471 unloaded meanwhile, whithout being dlclose()'ed. */ 474 unloaded meanwhile, whithout being dlclose()'ed. */
472 QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); 475 Q3PtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
473 for (; it.current(); ++it) { 476 for (; it.current(); ++it) {
474 if (it.current()->name == name) 477 if (it.current()->name == name)
475 wrap = it.current(); 478 wrap = it.current();
@@ -550,7 +553,7 @@ void KLibLoader::slotLibraryDestroyed()
550{ 553{
551 const KLibrary *lib = static_cast<const KLibrary *>( sender() ); 554 const KLibrary *lib = static_cast<const KLibrary *>( sender() );
552 555
553 QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); 556 Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs );
554 for (; it.current(); ++it ) 557 for (; it.current(); ++it )
555 if ( it.current()->lib == lib ) 558 if ( it.current()->lib == lib )
556 { 559 {
@@ -569,7 +572,7 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
569 572
570 /* First delete all KLibrary objects in pending_close, but _don't_ unload 573 /* First delete all KLibrary objects in pending_close, but _don't_ unload
571 the DSO behind it. */ 574 the DSO behind it. */
572 QPtrListIterator<KLibWrapPrivate> it(d->pending_close); 575 Q3PtrListIterator<KLibWrapPrivate> it(d->pending_close);
573 for (; it.current(); ++it) { 576 for (; it.current(); ++it) {
574 wrap = it.current(); 577 wrap = it.current();
575 if (wrap->lib) { 578 if (wrap->lib) {
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
@@ -21,8 +21,8 @@
21#include <qobject.h> 21#include <qobject.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qstringlist.h> 23#include <qstringlist.h>
24#include <qasciidict.h> 24#include <q3asciidict.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <kglobal.h> 26#include <kglobal.h>
27 27
28#include <stdlib.h> // For backwards compatibility 28#include <stdlib.h> // For backwards compatibility
@@ -52,7 +52,7 @@ class QLibrary;
52class KLibrary : public QObject 52class KLibrary : public QObject
53{ 53{
54 friend class KLibLoader; 54 friend class KLibLoader;
55 friend class QAsciiDict<KLibrary>; 55 friend class Q3AsciiDict<KLibrary>;
56 56
57 Q_OBJECT 57 Q_OBJECT
58public: 58public:
@@ -127,7 +127,7 @@ private:
127 KLibFactory* m_factory; 127 KLibFactory* m_factory;
128//US void * m_handle; 128//US void * m_handle;
129 QLibrary* m_handle; 129 QLibrary* m_handle;
130 QPtrList<QObject> m_objs; 130 Q3PtrList<QObject> m_objs;
131 QTimer *m_timer; 131 QTimer *m_timer;
132 KLibraryPrivate *d; 132 KLibraryPrivate *d;
133}; 133};
@@ -287,7 +287,7 @@ private slots:
287 void slotLibraryDestroyed(); 287 void slotLibraryDestroyed();
288private: 288private:
289 void close_pending( KLibWrapPrivate * ); 289 void close_pending( KLibWrapPrivate * );
290 QAsciiDict<KLibWrapPrivate> m_libs; 290 Q3AsciiDict<KLibWrapPrivate> m_libs;
291 291
292 static KLibLoader* s_self; 292 static KLibLoader* s_self;
293 293
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,5 +1,6 @@
1#include <qregexp.h> 1#include <qregexp.h>
2#include <qapplication.h> 2#include <qapplication.h>
3#include <QDesktopWidget>
3 4
4#include "kdebug.h" 5#include "kdebug.h"
5#include "kcalendarsystemgregorian.h" 6#include "kcalendarsystemgregorian.h"
@@ -11,8 +12,8 @@
11//#define COLLECT_TRANSLATION 12//#define COLLECT_TRANSLATION
12 13
13 14
14QDict<QString> *mLocaleDict = 0; 15Q3Dict<QString> *mLocaleDict = 0;
15void setLocaleDict( QDict<QString> * dict ) 16void setLocaleDict( Q3Dict<QString> * dict )
16{ 17{
17 mLocaleDict = dict; 18 mLocaleDict = dict;
18 19
@@ -45,7 +46,7 @@ void addExist(const char *text,QString trans )
45} 46}
46 47
47#include <qfile.h> 48#include <qfile.h>
48#include <qtextstream.h> 49#include <q3textstream.h>
49#include <qtextcodec.h> 50#include <qtextcodec.h>
50#endif 51#endif
51void dumpMissing() 52void dumpMissing()
@@ -53,10 +54,10 @@ void dumpMissing()
53#ifdef COLLECT_TRANSLATION 54#ifdef COLLECT_TRANSLATION
54 QString fileName = "/tmp/usernewtrans.txt"; 55 QString fileName = "/tmp/usernewtrans.txt";
55 QFile file( fileName ); 56 QFile file( fileName );
56 if (!file.open( IO_WriteOnly ) ) { 57 if (!file.open( QIODevice::WriteOnly ) ) {
57 return ; 58 return ;
58 } 59 }
59 QTextStream ts( &file ); 60 Q3TextStream ts( &file );
60 ts.setCodec( QTextCodec::codecForName("utf8") ); 61 ts.setCodec( QTextCodec::codecForName("utf8") );
61 62
62 int i; 63 int i;
@@ -70,10 +71,10 @@ void dumpMissing()
70 { 71 {
71 QString fileName = "/tmp/usertrans.txt"; 72 QString fileName = "/tmp/usertrans.txt";
72 QFile file( fileName ); 73 QFile file( fileName );
73 if (!file.open( IO_WriteOnly ) ) { 74 if (!file.open( QIODevice::WriteOnly ) ) {
74 return ; 75 return ;
75 } 76 }
76 QTextStream ts( &file ); 77 Q3TextStream ts( &file );
77 ts.setCodec( QTextCodec::codecForName("utf8") ); 78 ts.setCodec( QTextCodec::codecForName("utf8") );
78 79
79 int i; 80 int i;
@@ -467,7 +468,7 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime,
467 format = "%1 %2"; 468 format = "%1 %2";
468 else if ( intIntDateFormat == Format1 ) 469 else if ( intIntDateFormat == Format1 )
469 format = "%1 %2"; 470 format = "%1 %2";
470 else if ( intIntDateFormat == ISODate ) 471 else if ( intIntDateFormat == Qt::ISODate )
471 format = "%1T%2"; 472 format = "%1T%2";
472 473
473 QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat )) 474 QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat ))
@@ -527,7 +528,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
527 strpos++; 528 strpos++;
528 529
529 c = fmt.at(fmtpos++); 530 c = fmt.at(fmtpos++);
530 switch (c) 531 switch (c.unicode())
531 { 532 {
532 case 'a': 533 case 'a':
533 case 'A': 534 case 'A':
@@ -638,7 +639,7 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const
638 strpos++; 639 strpos++;
639 640
640 c = Format.at(Formatpos++); 641 c = Format.at(Formatpos++);
641 switch (c) 642 switch (c.unicode())
642 { 643 {
643 case 'p': 644 case 'p':
644 { 645 {
@@ -734,7 +735,7 @@ QDateTime KLocale::readDateTime(const QString &intstr,
734 QString tformat = timeFormat(intIntDateFormat); 735 QString tformat = timeFormat(intIntDateFormat);
735 736
736 QDate m_date = readDate(date, dformat, &ok1); 737 QDate m_date = readDate(date, dformat, &ok1);
737 QTime m_time = readTime(time, tformat, &ok2); 738 QTime m_time = readTime(time, !tformat.isEmpty(), &ok2);
738 739
739 QDateTime m_dt; 740 QDateTime m_dt;
740 741
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
@@ -4,14 +4,14 @@
4#include <qstring.h> 4#include <qstring.h>
5#include <qstringlist.h> 5#include <qstringlist.h>
6#include <qdatetime.h> 6#include <qdatetime.h>
7#include <qdict.h> 7#include <q3dict.h>
8 8
9#ifndef I18N_NOOP 9#ifndef I18N_NOOP
10#define I18N_NOOP(x) (x) 10#define I18N_NOOP(x) (x)
11#endif 11#endif
12 12
13class KCalendarSystem; 13class KCalendarSystem;
14void setLocaleDict( QDict<QString> * dict ); 14void setLocaleDict( Q3Dict<QString> * dict );
15QString i18n(const char *text); 15QString i18n(const char *text);
16QString i18n(const char *hint, const char *text); 16QString i18n(const char *hint, const char *text);
17QString i18n(const char *text1, const char *textn, int num); 17QString i18n(const char *text1, const char *textn, int num);
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
@@ -39,6 +39,8 @@
39 39
40#include <kdebug.h> 40#include <kdebug.h>
41#include "kmdcodec.h" 41#include "kmdcodec.h"
42//Added by qt3to4:
43#include <Q3CString>
42 44
43#define KMD5_S11 7 45#define KMD5_S11 7
44#define KMD5_S12 12 46#define KMD5_S12 12
@@ -147,14 +149,14 @@ static int rikFindChar(register const char * _s, const char c)
147 return s - _s; 149 return s - _s;
148} 150}
149 151
150QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF) 152Q3CString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF)
151{ 153{
152 QByteArray out; 154 QByteArray out;
153 quotedPrintableEncode (in, out, useCRLF); 155 quotedPrintableEncode (in, out, useCRLF);
154 return QCString (out.data(), out.size()+1); 156 return Q3CString (out.data(), out.size()+1);
155} 157}
156 158
157QCString KCodecs::quotedPrintableEncode(const QCString& str, bool useCRLF) 159Q3CString KCodecs::quotedPrintableEncode(const Q3CString& str, bool useCRLF)
158{ 160{
159 if (str.isEmpty()) 161 if (str.isEmpty())
160 return ""; 162 return "";
@@ -280,14 +282,14 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool
280 out.truncate(cursor - out.data()); 282 out.truncate(cursor - out.data());
281} 283}
282 284
283QCString KCodecs::quotedPrintableDecode(const QByteArray & in) 285Q3CString KCodecs::quotedPrintableDecode(const QByteArray & in)
284{ 286{
285 QByteArray out; 287 QByteArray out;
286 quotedPrintableDecode (in, out); 288 quotedPrintableDecode (in, out);
287 return QCString (out.data(), out.size()+1); 289 return Q3CString (out.data(), out.size()+1);
288} 290}
289 291
290QCString KCodecs::quotedPrintableDecode(const QCString & str) 292Q3CString KCodecs::quotedPrintableDecode(const Q3CString & str)
291{ 293{
292 if (str.isEmpty()) 294 if (str.isEmpty())
293 return ""; 295 return "";
@@ -355,7 +357,7 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out)
355 out.truncate(cursor - out.data()); 357 out.truncate(cursor - out.data());
356} 358}
357 359
358QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) 360Q3CString KCodecs::base64Encode( const Q3CString& str, bool insertLFs )
359{ 361{
360 if ( str.isEmpty() ) 362 if ( str.isEmpty() )
361 return ""; 363 return "";
@@ -365,11 +367,11 @@ QCString KCodecs::base64Encode( const QCString& str, bool insertLFs )
365 return base64Encode( in, insertLFs ); 367 return base64Encode( in, insertLFs );
366} 368}
367 369
368QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) 370Q3CString KCodecs::base64Encode( const QByteArray& in, bool insertLFs )
369{ 371{
370 QByteArray out; 372 QByteArray out;
371 base64Encode( in, out, insertLFs ); 373 base64Encode( in, out, insertLFs );
372 return QCString( out.data(), out.size()+1 ); 374 return Q3CString( out.data(), out.size()+1 );
373} 375}
374 376
375void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, 377void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
@@ -405,15 +407,15 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
405 if ( insertLFs ) 407 if ( insertLFs )
406 { 408 {
407 if ( count && (count%76) == 0 ) 409 if ( count && (count%76) == 0 )
408 out.at(didx++) = '\n'; 410 out[didx++] = '\n';
409 count += 4; 411 count += 4;
410 } 412 }
411 out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; 413 out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077];
412 out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | 414 out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 |
413 (data[sidx] << 4) & 077]; 415 (data[sidx] << 4) & 077];
414 out.at(didx++) = Base64EncMap[(data[sidx+2] >> 6) & 003 | 416 out[didx++] = Base64EncMap[(data[sidx+2] >> 6) & 003 |
415 (data[sidx+1] << 2) & 077]; 417 (data[sidx+1] << 2) & 077];
416 out.at(didx++) = Base64EncMap[data[sidx+2] & 077]; 418 out[didx++] = Base64EncMap[data[sidx+2] & 077];
417 sidx += 3; 419 sidx += 3;
418 } 420 }
419 } 421 }
@@ -421,30 +423,27 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
421 if (sidx < len) 423 if (sidx < len)
422 { 424 {
423 if ( insertLFs && (count > 0) && (count%76) == 0 ) 425 if ( insertLFs && (count > 0) && (count%76) == 0 )
424 out.at(didx++) = '\n'; 426 out[didx++] = '\n';
425 427
426 out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; 428 out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077];
427 if (sidx < len-1) 429 if (sidx < len-1)
428 { 430 {
429 out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | 431 out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 |
430 (data[sidx] << 4) & 077]; 432 (data[sidx] << 4) & 077];
431 out.at(didx++) = Base64EncMap[(data[sidx+1] << 2) & 077]; 433 out[didx++] = Base64EncMap[(data[sidx+1] << 2) & 077];
432 } 434 }
433 else 435 else
434 { 436 {
435 out.at(didx++) = Base64EncMap[(data[sidx] << 4) & 077]; 437 out[didx++] = Base64EncMap[(data[sidx] << 4) & 077];
436 } 438 }
437 } 439 }
438 440
439 // Add padding 441 // Add padding
440 while (didx < out.size()) 442 while (didx < out.size())
441 { 443 out[didx++] = '=';
442 out.at(didx) = '=';
443 didx++;
444 }
445} 444}
446 445
447QCString KCodecs::base64Decode( const QCString& str ) 446Q3CString KCodecs::base64Decode( const Q3CString& str )
448{ 447{
449 if ( str.isEmpty() ) 448 if ( str.isEmpty() )
450 return ""; 449 return "";
@@ -454,11 +453,11 @@ QCString KCodecs::base64Decode( const QCString& str )
454 return base64Decode( in ); 453 return base64Decode( in );
455} 454}
456 455
457QCString KCodecs::base64Decode( const QByteArray& in ) 456Q3CString KCodecs::base64Decode( const QByteArray& in )
458{ 457{
459 QByteArray out; 458 QByteArray out;
460 base64Decode( in, out ); 459 base64Decode( in, out );
461 return QCString( out.data(), out.size()+1 ); 460 return Q3CString( out.data(), out.size()+1 );
462} 461}
463 462
464void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) 463void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
@@ -505,7 +504,7 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
505 if ((ch > 47 && ch < 58) || (ch > 64 && ch < 91) || 504 if ((ch > 47 && ch < 58) || (ch > 64 && ch < 91) ||
506 (ch > 96 && ch < 123) || ch == '+' || ch == '/' || ch == '=') 505 (ch > 96 && ch < 123) || ch == '+' || ch == '/' || ch == '=')
507 { 506 {
508 out.at(outIdx++) = Base64DecMap[ch]; 507 out[outIdx++] = Base64DecMap[ch];
509 } 508 }
510 else 509 else
511 { 510 {
@@ -523,26 +522,26 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
523 { 522 {
524 while (didx < len-2) 523 while (didx < len-2)
525 { 524 {
526 out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); 525 out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003));
527 out.at(didx+1) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); 526 out[didx+1] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017));
528 out.at(didx+2) = (((out.at(sidx+2) << 6) & 255) | (out.at(sidx+3) & 077)); 527 out[didx+2] = (((out[sidx+2] << 6) & 255) | (out[sidx+3] & 077));
529 sidx += 4; 528 sidx += 4;
530 didx += 3; 529 didx += 3;
531 } 530 }
532 } 531 }
533 532
534 if (didx < len) 533 if (didx < len)
535 out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); 534 out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003));
536 535
537 if (++didx < len ) 536 if (++didx < len )
538 out.at(didx) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); 537 out[didx] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017));
539 538
540 // Resize the output buffer 539 // Resize the output buffer
541 if ( len == 0 || len < out.size() ) 540 if ( len == 0 || len < out.size() )
542 out.resize(len); 541 out.resize(len);
543} 542}
544 543
545QCString KCodecs::uuencode( const QCString& str ) 544Q3CString KCodecs::uuencode( const Q3CString& str )
546{ 545{
547 if ( str.isEmpty() ) 546 if ( str.isEmpty() )
548 return ""; 547 return "";
@@ -553,11 +552,11 @@ QCString KCodecs::uuencode( const QCString& str )
553 return uuencode( in ); 552 return uuencode( in );
554} 553}
555 554
556QCString KCodecs::uuencode( const QByteArray& in ) 555Q3CString KCodecs::uuencode( const QByteArray& in )
557{ 556{
558 QByteArray out; 557 QByteArray out;
559 uuencode( in, out ); 558 uuencode( in, out );
560 return QCString( out.data(), out.size()+1 ); 559 return Q3CString( out.data(), out.size()+1 );
561} 560}
562 561
563void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) 562void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
@@ -580,54 +579,54 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
580 while (sidx+line_len < len) 579 while (sidx+line_len < len)
581 { 580 {
582 // line length 581 // line length
583 out.at(didx++) = UUEncMap[line_len]; 582 out[didx++] = UUEncMap[line_len];
584 583
585 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion 584 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion
586 for (unsigned int end = sidx+line_len; sidx < end; sidx += 3) 585 for (unsigned int end = sidx+line_len; sidx < end; sidx += 3)
587 { 586 {
588 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 587 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
589 out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | 588 out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
590 (data[sidx] << 4) & 077]; 589 (data[sidx] << 4) & 077];
591 out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | 590 out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 |
592 (data[sidx+1] << 2) & 077]; 591 (data[sidx+1] << 2) & 077];
593 out.at(didx++) = UUEncMap[data[sidx+2] & 077]; 592 out[didx++] = UUEncMap[data[sidx+2] & 077];
594 } 593 }
595 594
596 // line terminator 595 // line terminator
597 //for (unsigned int idx=0; idx < nl_len; idx++) 596 //for (unsigned int idx=0; idx < nl_len; idx++)
598 //out.at(didx++) = nl[idx]; 597 //out[didx++] = nl[idx];
599 memcpy(out.data()+didx, nl, nl_len); 598 memcpy(out.data()+didx, nl, nl_len);
600 didx += nl_len; 599 didx += nl_len;
601 } 600 }
602 601
603 // line length 602 // line length
604 out.at(didx++) = UUEncMap[len-sidx]; 603 out[didx++] = UUEncMap[len-sidx];
605 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion 604 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion
606 while (sidx+2 < len) 605 while (sidx+2 < len)
607 { 606 {
608 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 607 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
609 out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | 608 out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
610 (data[sidx] << 4) & 077]; 609 (data[sidx] << 4) & 077];
611 out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | 610 out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 |
612 (data[sidx+1] << 2) & 077]; 611 (data[sidx+1] << 2) & 077];
613 out.at(didx++) = UUEncMap[data[sidx+2] & 077]; 612 out[didx++] = UUEncMap[data[sidx+2] & 077];
614 sidx += 3; 613 sidx += 3;
615 } 614 }
616 615
617 if (sidx < len-1) 616 if (sidx < len-1)
618 { 617 {
619 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 618 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
620 out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | 619 out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
621 (data[sidx] << 4) & 077]; 620 (data[sidx] << 4) & 077];
622 out.at(didx++) = UUEncMap[(data[sidx+1] << 2) & 077]; 621 out[didx++] = UUEncMap[(data[sidx+1] << 2) & 077];
623 out.at(didx++) = UUEncMap[0]; 622 out[didx++] = UUEncMap[0];
624 } 623 }
625 else if (sidx < len) 624 else if (sidx < len)
626 { 625 {
627 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 626 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
628 out.at(didx++) = UUEncMap[(data[sidx] << 4) & 077]; 627 out[didx++] = UUEncMap[(data[sidx] << 4) & 077];
629 out.at(didx++) = UUEncMap[0]; 628 out[didx++] = UUEncMap[0];
630 out.at(didx++) = UUEncMap[0]; 629 out[didx++] = UUEncMap[0];
631 } 630 }
632 631
633 // line terminator 632 // line terminator
@@ -639,7 +638,7 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
639 out.resize( 0 ); 638 out.resize( 0 );
640} 639}
641 640
642QCString KCodecs::uudecode( const QCString& str ) 641Q3CString KCodecs::uudecode( const Q3CString& str )
643{ 642{
644 if ( str.isEmpty() ) 643 if ( str.isEmpty() )
645 return ""; 644 return "";
@@ -650,11 +649,11 @@ QCString KCodecs::uudecode( const QCString& str )
650 return uudecode( in ); 649 return uudecode( in );
651} 650}
652 651
653QCString KCodecs::uudecode( const QByteArray& in ) 652Q3CString KCodecs::uudecode( const QByteArray& in )
654{ 653{
655 QByteArray out; 654 QByteArray out;
656 uudecode( in, out ); 655 uudecode( in, out );
657 return QCString( out.data(), out.size()+1 ); 656 return Q3CString( out.data(), out.size()+1 );
658} 657}
659 658
660void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) 659void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
@@ -705,9 +704,9 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
705 B = UUDecMap[(unsigned char) data[sidx+1]]; 704 B = UUDecMap[(unsigned char) data[sidx+1]];
706 C = UUDecMap[(unsigned char) data[sidx+2]]; 705 C = UUDecMap[(unsigned char) data[sidx+2]];
707 D = UUDecMap[(unsigned char) data[sidx+3]]; 706 D = UUDecMap[(unsigned char) data[sidx+3]];
708 out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); 707 out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) );
709 out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); 708 out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) );
710 out.at(didx++) = ( ((C << 6) & 255) | (D & 077) ); 709 out[didx++] = ( ((C << 6) & 255) | (D & 077) );
711 sidx += 4; 710 sidx += 4;
712 } 711 }
713 } 712 }
@@ -716,14 +715,14 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
716 { 715 {
717 A = UUDecMap[(unsigned char) data[sidx]]; 716 A = UUDecMap[(unsigned char) data[sidx]];
718 B = UUDecMap[(unsigned char) data[sidx+1]]; 717 B = UUDecMap[(unsigned char) data[sidx+1]];
719 out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); 718 out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) );
720 } 719 }
721 720
722 if (didx < end) 721 if (didx < end)
723 { 722 {
724 B = UUDecMap[(unsigned char) data[sidx+1]]; 723 B = UUDecMap[(unsigned char) data[sidx+1]];
725 C = UUDecMap[(unsigned char) data[sidx+2]]; 724 C = UUDecMap[(unsigned char) data[sidx+2]];
726 out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); 725 out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) );
727 } 726 }
728 727
729 // skip padding 728 // skip padding
@@ -761,7 +760,7 @@ KMD5::KMD5(const QByteArray& in)
761 update( in ); 760 update( in );
762} 761}
763 762
764KMD5::KMD5(const QCString& in) 763KMD5::KMD5(const Q3CString& in)
765{ 764{
766 init(); 765 init();
767 update( in ); 766 update( in );
@@ -772,7 +771,7 @@ void KMD5::update(const QByteArray& in)
772 update(in.data(), int(in.size())); 771 update(in.data(), int(in.size()));
773} 772}
774 773
775void KMD5::update(const QCString& in) 774void KMD5::update(const Q3CString& in)
776{ 775{
777 update(in.data(), int(in.length())); 776 update(in.data(), int(in.length()));
778} 777}
@@ -873,7 +872,7 @@ bool KMD5::verify( const KMD5::Digest& digest)
873 return (0 == memcmp(rawDigest(), digest, sizeof(KMD5::Digest))); 872 return (0 == memcmp(rawDigest(), digest, sizeof(KMD5::Digest)));
874} 873}
875 874
876bool KMD5::verify( const QCString& hexdigest) 875bool KMD5::verify( const Q3CString& hexdigest)
877{ 876{
878 finalize(); 877 finalize();
879 return (0 == strcmp(hexDigest().data(), hexdigest)); 878 return (0 == strcmp(hexDigest().data(), hexdigest));
@@ -892,9 +891,9 @@ void KMD5::rawDigest( KMD5::Digest& bin )
892} 891}
893 892
894 893
895QCString KMD5::hexDigest() 894Q3CString KMD5::hexDigest()
896{ 895{
897 QCString s(33); 896 Q3CString s(33);
898 897
899 finalize(); 898 finalize();
900 sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", 899 sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -905,7 +904,7 @@ QCString KMD5::hexDigest()
905 return s; 904 return s;
906} 905}
907 906
908void KMD5::hexDigest(QCString& s) 907void KMD5::hexDigest(Q3CString& s)
909{ 908{
910 finalize(); 909 finalize();
911 s.resize(33); 910 s.resize(33);
@@ -915,7 +914,7 @@ void KMD5::hexDigest(QCString& s)
915 m_digest[12], m_digest[13], m_digest[14], m_digest[15]); 914 m_digest[12], m_digest[13], m_digest[14], m_digest[15]);
916} 915}
917 916
918QCString KMD5::base64Digest() 917Q3CString KMD5::base64Digest()
919{ 918{
920 QByteArray ba(16); 919 QByteArray ba(16);
921 920
@@ -956,7 +955,7 @@ void KMD5::transform( const unsigned char block[64] )
956 //memcpy( x, block, 64 ); 955 //memcpy( x, block, 64 );
957 956
958//US Q_ASSERT(!m_finalized); // not just a user error, since the method is private 957//US Q_ASSERT(!m_finalized); // not just a user error, since the method is private
959 ASSERT(!m_finalized); // not just a user error, since the method is private 958 Q_ASSERT(!m_finalized); // not just a user error, since the method is private
960 959
961 /* Round 1 */ 960 /* Round 1 */
962 FF (a, b, c, d, x[ 0], KMD5_S11, 0xd76aa478); /* 1 */ 961 FF (a, b, c, d, x[ 0], KMD5_S11, 0xd76aa478); /* 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
@@ -39,6 +39,8 @@
39#include <qglobal.h> 39#include <qglobal.h>
40#include <qstring.h> 40#include <qstring.h>
41#include <qiodevice.h> 41#include <qiodevice.h>
42//Added by qt3to4:
43#include <Q3CString>
42 44
43/** 45/**
44 * A wrapper class for the most commonly used encoding and 46 * A wrapper class for the most commonly used encoding and
@@ -81,7 +83,7 @@ public:
81 * breaks, too. 83 * breaks, too.
82 * @return quoted-printable encoded data. 84 * @return quoted-printable encoded data.
83 */ 85 */
84 static QCString quotedPrintableEncode(const QByteArray & in, 86 static Q3CString quotedPrintableEncode(const QByteArray & in,
85 bool useCRLF = true); 87 bool useCRLF = true);
86 88
87 /** 89 /**
@@ -96,7 +98,7 @@ public:
96 * breaks, too. 98 * breaks, too.
97 * @return quoted-printable encoded data. 99 * @return quoted-printable encoded data.
98 */ 100 */
99 static QCString quotedPrintableEncode(const QCString & str, 101 static Q3CString quotedPrintableEncode(const Q3CString & str,
100 bool useCRLF = true); 102 bool useCRLF = true);
101 103
102 /** 104 /**
@@ -129,7 +131,7 @@ public:
129 * @param in the data to be decoded. 131 * @param in the data to be decoded.
130 * @return decoded data. 132 * @return decoded data.
131 */ 133 */
132 static QCString quotedPrintableDecode(const QByteArray & in); 134 static Q3CString quotedPrintableDecode(const QByteArray & in);
133 135
134 /** 136 /**
135 * @overload 137 * @overload
@@ -140,7 +142,7 @@ public:
140 * @param str the data to be decoded. 142 * @param str the data to be decoded.
141 * @return decoded data. 143 * @return decoded data.
142 */ 144 */
143 static QCString quotedPrintableDecode(const QCString & str); 145 static Q3CString quotedPrintableDecode(const Q3CString & str);
144 146
145 /** 147 /**
146 * Decodes a quoted-printable encoded data. 148 * Decodes a quoted-printable encoded data.
@@ -175,7 +177,7 @@ public:
175 * @param in the data to be uuencoded 177 * @param in the data to be uuencoded
176 * @return a uuencoded data. 178 * @return a uuencoded data.
177 */ 179 */
178 static QCString uuencode( const QByteArray& in ); 180 static Q3CString uuencode( const QByteArray& in );
179 181
180 /** 182 /**
181 * @overload 183 * @overload
@@ -186,7 +188,7 @@ public:
186 * @param str the string to be uuencoded. 188 * @param str the string to be uuencoded.
187 * @return the encoded string. 189 * @return the encoded string.
188 */ 190 */
189 static QCString uuencode( const QCString& str ); 191 static Q3CString uuencode( const Q3CString& str );
190 192
191 /** 193 /**
192 * Encodes the given data using the uuencode algorithm. 194 * Encodes the given data using the uuencode algorithm.
@@ -215,7 +217,7 @@ public:
215 * @param in the data uuencoded data to be decoded. 217 * @param in the data uuencoded data to be decoded.
216 * @return a decoded string. 218 * @return a decoded string.
217 */ 219 */
218 static QCString uudecode( const QByteArray& in ); 220 static Q3CString uudecode( const QByteArray& in );
219 221
220 /** 222 /**
221 * @overload 223 * @overload
@@ -226,7 +228,7 @@ public:
226 * @param str the string to be decoded. 228 * @param str the string to be decoded.
227 * @return a uudecoded string. 229 * @return a uudecoded string.
228 */ 230 */
229 static QCString uudecode( const QCString& str ); 231 static Q3CString uudecode( const Q3CString& str );
230 232
231 /** 233 /**
232 * Decodes the given data using the uudecode algorithm. 234 * Decodes the given data using the uudecode algorithm.
@@ -263,7 +265,7 @@ public:
263 * 265 *
264 * @return a base64 encoded string. 266 * @return a base64 encoded string.
265 */ 267 */
266 static QCString base64Encode( const QByteArray& in, bool insertLFs = false); 268 static Q3CString base64Encode( const QByteArray& in, bool insertLFs = false);
267 269
268 /** 270 /**
269 * @overload 271 * @overload
@@ -275,7 +277,7 @@ public:
275 * @param insertLFs limit the number of characters per line. 277 * @param insertLFs limit the number of characters per line.
276 * @return the decoded string. 278 * @return the decoded string.
277 */ 279 */
278 static QCString base64Encode( const QCString& str, bool insertLFs = false ); 280 static Q3CString base64Encode( const Q3CString& str, bool insertLFs = false );
279 281
280 /** 282 /**
281 * Encodes the given data using the base64 algorithm. 283 * Encodes the given data using the base64 algorithm.
@@ -308,7 +310,7 @@ public:
308 * @param in the base64-encoded data to be decoded. 310 * @param in the base64-encoded data to be decoded.
309 * @return the decoded data. 311 * @return the decoded data.
310 */ 312 */
311 static QCString base64Decode( const QByteArray& in ); 313 static Q3CString base64Decode( const QByteArray& in );
312 314
313 /** 315 /**
314 * @overload 316 * @overload
@@ -319,7 +321,7 @@ public:
319 * @param str the base64-encoded string. 321 * @param str the base64-encoded string.
320 * @return the decoded string. 322 * @return the decoded string.
321 */ 323 */
322 static QCString base64Decode( const QCString& str ); 324 static Q3CString base64Decode( const Q3CString& str );
323 325
324 /** 326 /**
325 * Decodes the given data that was encoded with the base64 327 * Decodes the given data that was encoded with the base64
@@ -431,7 +433,7 @@ public:
431 * 433 *
432 * Same as above except it accepts a QByteArray as its argument. 434 * Same as above except it accepts a QByteArray as its argument.
433 */ 435 */
434 KMD5(const QCString& a ); 436 KMD5(const Q3CString& a );
435 437
436 /** 438 /**
437 * Updates the message to be digested. Be sure to add all data 439 * Updates the message to be digested. Be sure to add all data
@@ -460,7 +462,7 @@ public:
460 * 462 *
461 * @param in message to be added to the digest (QByteArray). 463 * @param in message to be added to the digest (QByteArray).
462 */ 464 */
463 void update(const QCString& in ); 465 void update(const Q3CString& in );
464 466
465 /** 467 /**
466 * @overload 468 * @overload
@@ -502,18 +504,18 @@ public:
502 * Returns the value of the calculated message digest in 504 * Returns the value of the calculated message digest in
503 * a hexadecimal representation. 505 * a hexadecimal representation.
504 */ 506 */
505 QCString hexDigest (); 507 Q3CString hexDigest ();
506 508
507 /** 509 /**
508 * @overload 510 * @overload
509 */ 511 */
510 void hexDigest(QCString&); 512 void hexDigest(Q3CString&);
511 513
512 /** 514 /**
513 * Returns the value of the calculated message digest in 515 * Returns the value of the calculated message digest in
514 * a base64-encoded representation. 516 * a base64-encoded representation.
515 */ 517 */
516 QCString base64Digest (); 518 Q3CString base64Digest ();
517 519
518 /** 520 /**
519 * returns true if the calculated digest for the given 521 * returns true if the calculated digest for the given
@@ -524,7 +526,7 @@ public:
524 /** 526 /**
525 * @overload 527 * @overload
526 */ 528 */
527 bool verify(const QCString&); 529 bool verify(const Q3CString&);
528 530
529protected: 531protected:
530 /** 532 /**
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
@@ -21,6 +21,8 @@
21// $Id$ 21// $Id$
22 22
23#include <qcolor.h> 23#include <qcolor.h>
24//Added by qt3to4:
25#include <Q3ValueList>
24 26
25#include <kconfig.h> 27#include <kconfig.h>
26#include <kstandarddirs.h> 28#include <kstandarddirs.h>
@@ -140,8 +142,8 @@ class KPrefsItemStringList : public KPrefsItem {
140 142
141class KPrefsItemIntList : public KPrefsItem { 143class KPrefsItemIntList : public KPrefsItem {
142 public: 144 public:
143 KPrefsItemIntList(const QString &group,const QString &name,QValueList<int> *, 145 KPrefsItemIntList(const QString &group,const QString &name,Q3ValueList<int> *,
144 const QValueList<int> &defaultValue=QValueList<int>()); 146 const Q3ValueList<int> &defaultValue=Q3ValueList<int>());
145 virtual ~KPrefsItemIntList() {} 147 virtual ~KPrefsItemIntList() {}
146 148
147 void setDefault(); 149 void setDefault();
@@ -149,8 +151,8 @@ class KPrefsItemIntList : public KPrefsItem {
149 void writeConfig(KConfig *); 151 void writeConfig(KConfig *);
150 152
151 private: 153 private:
152 QValueList<int> *mReference; 154 Q3ValueList<int> *mReference;
153 QValueList<int> mDefault; 155 Q3ValueList<int> mDefault;
154}; 156};
155 157
156 158
@@ -364,7 +366,7 @@ void KPrefsItemStringList::readConfig(KConfig *config)
364 366
365 367
366KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name, 368KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name,
367 QValueList<int> *reference,const QValueList<int> &defaultValue) : 369 Q3ValueList<int> *reference,const Q3ValueList<int> &defaultValue) :
368 KPrefsItem(group,name) 370 KPrefsItem(group,name)
369{ 371{
370 mReference = reference; 372 mReference = reference;
@@ -505,8 +507,8 @@ void KPrefs::addItemStringList(const QString &key,QStringList *reference,
505 addItem(new KPrefsItemStringList(*mCurrentGroup,key,reference,defaultValue)); 507 addItem(new KPrefsItemStringList(*mCurrentGroup,key,reference,defaultValue));
506} 508}
507 509
508void KPrefs::addItemIntList(const QString &key,QValueList<int> *reference, 510void KPrefs::addItemIntList(const QString &key,Q3ValueList<int> *reference,
509 const QValueList<int> &defaultValue) 511 const Q3ValueList<int> &defaultValue)
510{ 512{
511 addItem(new KPrefsItemIntList(*mCurrentGroup,key,reference,defaultValue)); 513 addItem(new KPrefsItemIntList(*mCurrentGroup,key,reference,defaultValue));
512} 514}
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
@@ -21,11 +21,13 @@
21#define _KPREFS_H 21#define _KPREFS_H
22// $Id$ 22// $Id$
23 23
24#include <qptrlist.h> 24#include <q3ptrlist.h>
25#include <qcolor.h> 25#include <qcolor.h>
26#include <qfont.h> 26#include <qfont.h>
27#include <qsize.h> 27#include <qsize.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29//Added by qt3to4:
30#include <Q3ValueList>
29 31
30class KConfig; 32class KConfig;
31 33
@@ -283,8 +285,8 @@ class KPrefs {
283 when the config file does not yet contain the key of 285 when the config file does not yet contain the key of
284 this item. 286 this item.
285 */ 287 */
286 void addItemIntList(const QString &key,QValueList<int> *reference, 288 void addItemIntList(const QString &key,Q3ValueList<int> *reference,
287 const QValueList<int> &defaultValue=QValueList<int>()); 289 const Q3ValueList<int> &defaultValue=Q3ValueList<int>());
288 290
289 protected: 291 protected:
290 /** 292 /**
@@ -310,7 +312,7 @@ class KPrefs {
310 312
311 KConfig *mConfig; // pointer to KConfig object 313 KConfig *mConfig; // pointer to KConfig object
312 314
313 QPtrList<KPrefsItem> mItems; 315 Q3PtrList<KPrefsItem> mItems;
314}; 316};
315 317
316#endif 318#endif
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
@@ -563,7 +563,7 @@ class KShortcut
563 * @param keyQt the qt keycode 563 * @param keyQt the qt keycode
564 * @see Qt::Key 564 * @see Qt::Key
565 */ 565 */
566 KShortcut( int keyQt ) {} 566 KShortcut( int /*keyQt */) {}
567 567
568 /** 568 /**
569 * Creates a new shortcut that contains only the given qt key 569 * Creates a new shortcut that contains only the given qt key
@@ -599,7 +599,7 @@ class KShortcut
599 * @param shortcut the description of the key 599 * @param shortcut the description of the key
600 * @see KKeySequence::KKeySequence(const QString&) 600 * @see KKeySequence::KKeySequence(const QString&)
601 */ 601 */
602 KShortcut( const char* shortcut ) {} 602 KShortcut( const char* /*shortcut */) {}
603 603
604 /** 604 /**
605 * Creates a new key sequence that contains the given key sequence. 605 * Creates a new key sequence that contains the given key sequence.
@@ -608,7 +608,7 @@ class KShortcut
608 * @param shortcut the description of the key 608 * @param shortcut the description of the key
609 * @see KKeySequence::KKeySequence(const QString&) 609 * @see KKeySequence::KKeySequence(const QString&)
610 */ 610 */
611 KShortcut( const QString& shortcut ) {} 611 KShortcut( const QString& /*shortcut */) {}
612 ~KShortcut() {} 612 ~KShortcut() {}
613 613
614 /** 614 /**
@@ -816,7 +816,7 @@ class KShortcut
816 /** 816 /**
817 * @internal 817 * @internal
818 */ 818 */
819 QString toStringInternal( const KShortcut* pcutDefault = 0 ) const 819 QString toStringInternal( const KShortcut* /*pcutDefault*/ = 0 ) const
820 { 820 {
821 return "EMPTY IMPL."; 821 return "EMPTY IMPL.";
822 } 822 }
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
@@ -37,8 +37,8 @@
37//US#include <pwd.h> 37//US#include <pwd.h>
38 38
39#include <qregexp.h> 39#include <qregexp.h>
40#include <qasciidict.h> 40#include <q3asciidict.h>
41#include <qdict.h> 41#include <q3dict.h>
42#include <qdir.h> 42#include <qdir.h>
43#include <qfileinfo.h> 43#include <qfileinfo.h>
44#include <qstring.h> 44#include <qstring.h>
@@ -46,6 +46,8 @@
46#include <qapplication.h> 46#include <qapplication.h>
47 47
48#include <qstringlist.h> 48#include <qstringlist.h>
49//Added by qt3to4:
50#include <Q3CString>
49 51
50#include "kstandarddirs.h" 52#include "kstandarddirs.h"
51#include "kconfig.h" 53#include "kconfig.h"
@@ -59,15 +61,15 @@
59QString KStandardDirs::mAppDir = QString::null; 61QString KStandardDirs::mAppDir = QString::null;
60 62
61 63
62template class QDict<QStringList>; 64template class Q3Dict<QStringList>;
63 65
64#if 0 66#if 0
65#include <qtextedit.h> 67#include <q3textedit.h>
66void ddd( QString op ) 68void ddd( QString op )
67{ 69{
68 static QTextEdit * dot = 0; 70 static Q3TextEdit * dot = 0;
69 if ( ! dot ) 71 if ( ! dot )
70 dot = new QTextEdit(); 72 dot = new Q3TextEdit();
71 73
72 dot->show(); 74 dot->show();
73 75
@@ -85,7 +87,7 @@ public:
85 87
86 bool restrictionsActive; 88 bool restrictionsActive;
87 bool dataRestrictionActive; 89 bool dataRestrictionActive;
88 QAsciiDict<bool> restrictions; 90 Q3AsciiDict<bool> restrictions;
89 QStringList xdgdata_prefixes; 91 QStringList xdgdata_prefixes;
90 QStringList xdgconf_prefixes; 92 QStringList xdgconf_prefixes;
91}; 93};
@@ -445,7 +447,7 @@ static void lookupDirectory(const QString& path, const QString &relPart,
445 continue; // No match 447 continue; // No match
446*/ 448*/
447//US this should do the same: 449//US this should do the same:
448 int pos = regexp.match(fn); 450 int pos = regexp.exactMatch(fn);
449 if (!recursive && !pos == 0) 451 if (!recursive && !pos == 0)
450 continue; // No match 452 continue; // No match
451 453
@@ -482,7 +484,7 @@ static void lookupDirectory(const QString& path, const QString &relPart,
482 continue; // No match 484 continue; // No match
483*/ 485*/
484//US this should do the same: 486//US this should do the same:
485 pos = regexp.match(fn); 487 pos = regexp.exactMatch(fn);
486 if (!pos == 0) 488 if (!pos == 0)
487 continue; // No match 489 continue; // No match
488 } 490 }
@@ -1108,7 +1110,7 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
1108//US struct stat st; 1110//US struct stat st;
1109 int pos = target.find('/', i); 1111 int pos = target.find('/', i);
1110 base += target.mid(i - 1, pos - i + 1); 1112 base += target.mid(i - 1, pos - i + 1);
1111 QCString baseEncoded = QFile::encodeName(base); 1113 Q3CString baseEncoded = QFile::encodeName(base);
1112 // bail out if we encountered a problem 1114 // bail out if we encountered a problem
1113//US if (stat(baseEncoded, &st) != 0) 1115//US if (stat(baseEncoded, &st) != 0)
1114 QFileInfo baseEncodedInfo(baseEncoded); 1116 QFileInfo baseEncodedInfo(baseEncoded);
@@ -1208,7 +1210,7 @@ QString readEnvPath(const char *env)
1208 //#ifdef _WIN32_ 1210 //#ifdef _WIN32_
1209 // return ""; 1211 // return "";
1210 //#else 1212 //#else
1211 QCString c_path; 1213 Q3CString c_path;
1212 if ( getenv(env) != NULL ) 1214 if ( getenv(env) != NULL )
1213 c_path = QString ( getenv(env) ); 1215 c_path = QString ( getenv(env) );
1214 if (c_path.isEmpty()) 1216 if (c_path.isEmpty())
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
@@ -24,7 +24,7 @@
24#define SSK_KSTDDIRS_H 24#define SSK_KSTDDIRS_H
25 25
26#include <qstring.h> 26#include <qstring.h>
27#include <qdict.h> 27#include <q3dict.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29#include <kglobal.h> 29#include <kglobal.h>
30 30
@@ -574,11 +574,11 @@ public:
574 QStringList prefixes; 574 QStringList prefixes;
575 575
576 // Directory dictionaries 576 // Directory dictionaries
577 QDict<QStringList> absolutes; 577 Q3Dict<QStringList> absolutes;
578 QDict<QStringList> relatives; 578 Q3Dict<QStringList> relatives;
579 579
580 mutable QDict<QStringList> dircache; 580 mutable Q3Dict<QStringList> dircache;
581 mutable QDict<QString> savelocations; 581 mutable Q3Dict<QString> savelocations;
582 582
583 // Disallow assignment and copy-construction 583 // Disallow assignment and copy-construction
584 KStandardDirs( const KStandardDirs& ); 584 KStandardDirs( const KStandardDirs& );