From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'microkde/kdecore/klibloader.cpp') 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 @@ #include #include #include -#include -#include +#include #include +#include +//Added by qt3to4: +#include +#include #include "kapplication.h" #include "klibloader.h" @@ -45,7 +48,7 @@ #endif -template class QAsciiDict; +template class Q3AsciiDict; #include //getenv @@ -120,7 +123,7 @@ KLibrary::~KLibrary() // If any object is remaining, delete if ( m_objs.count() > 0 ) { - QPtrListIterator it( m_objs ); + Q3PtrListIterator it( m_objs ); for ( ; it.current() ; ++it ) { kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl; @@ -152,7 +155,7 @@ KLibFactory* KLibrary::factory() if ( m_factory ) return m_factory; - QCString symname; + Q3CString symname; symname.sprintf("init_%s", name().latin1() ); void* sym = symbol( symname ); @@ -305,8 +308,8 @@ KLibWrapPrivate::KLibWrapPrivate(KLibrary *l, QLibrary* h) class KLibLoaderPrivate { public: - QPtrList loaded_stack; - QPtrList pending_close; + Q3PtrList loaded_stack; + Q3PtrList pending_close; enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode; QString errorMessage; @@ -348,7 +351,7 @@ KLibLoader::~KLibLoader() { // kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl; - QAsciiDictIterator it( m_libs ); + Q3AsciiDictIterator it( m_libs ); for (; it.current(); ++it ) { kdDebug(150) << "The KLibLoader contains the library " << it.current()->name @@ -364,7 +367,7 @@ KLibLoader::~KLibLoader() //static QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ ) { - QCString libname( name ); + Q3CString libname( name ); // only append ".la" if there is no extension // this allows to load non-libtool libraries as well @@ -421,7 +424,7 @@ 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()); #endif @@ -469,7 +472,7 @@ KLibrary* KLibLoader::library( const char *name ) /* Test if this library was loaded at some time, but got unloaded meanwhile, whithout being dlclose()'ed. */ - QPtrListIterator it(d->loaded_stack); + Q3PtrListIterator it(d->loaded_stack); for (; it.current(); ++it) { if (it.current()->name == name) wrap = it.current(); @@ -550,7 +553,7 @@ void KLibLoader::slotLibraryDestroyed() { const KLibrary *lib = static_cast( sender() ); - QAsciiDictIterator it( m_libs ); + Q3AsciiDictIterator it( m_libs ); for (; it.current(); ++it ) if ( it.current()->lib == lib ) { @@ -569,7 +572,7 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) /* First delete all KLibrary objects in pending_close, but _don't_ unload the DSO behind it. */ - QPtrListIterator it(d->pending_close); + Q3PtrListIterator it(d->pending_close); for (; it.current(); ++it) { wrap = it.current(); if (wrap->lib) { -- cgit v0.9.0.2