summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore/klibloader.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdecore/klibloader.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klibloader.cpp29
1 files changed, 16 insertions, 13 deletions
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
@@ -19,11 +19,14 @@
//US #include <config.h>
#include <qclipboard.h>
#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"
#include "klibloader.h"
#include "kstandarddirs.h"
@@ -44,9 +47,9 @@
#include <qlibrary.h>
#endif
-template class QAsciiDict<KLibrary>;
+template class Q3AsciiDict<KLibrary>;
#include <stdlib.h> //getenv
/*US
@@ -119,9 +122,9 @@ KLibrary::~KLibrary()
// If any object is remaining, delete
if ( m_objs.count() > 0 )
{
- QPtrListIterator<QObject> it( m_objs );
+ Q3PtrListIterator<QObject> it( m_objs );
for ( ; it.current() ; ++it )
{
kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl;
disconnect( it.current(), SIGNAL( destroyed() ),
@@ -151,9 +154,9 @@ KLibFactory* KLibrary::factory()
{
if ( m_factory )
return m_factory;
- QCString symname;
+ Q3CString symname;
symname.sprintf("init_%s", name().latin1() );
void* sym = symbol( symname );
if ( !sym )
@@ -304,10 +307,10 @@ KLibWrapPrivate::KLibWrapPrivate(KLibrary *l, QLibrary* h)
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;
QString errorMessage;
};
@@ -347,9 +350,9 @@ KLibLoader::KLibLoader( QObject* parent, const char* name )
KLibLoader::~KLibLoader()
{
// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl;
- QAsciiDictIterator<KLibWrapPrivate> it( m_libs );
+ Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs );
for (; it.current(); ++it )
{
kdDebug(150) << "The KLibLoader contains the library " << it.current()->name
<< " (" << it.current()->lib << ")" << endl;
@@ -363,9 +366,9 @@ 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
// (mhk, 20000228)
@@ -420,9 +423,9 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
if ( libfile.isEmpty() )
{
#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
@@ -468,9 +471,9 @@ 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)
wrap = it.current();
}
@@ -549,9 +552,9 @@ KLibFactory* KLibLoader::factory( const char* name )
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 )
{
KLibWrapPrivate *wrap = it.current();
@@ -568,9 +571,9 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
d->pending_close.append( 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();
if (wrap->lib) {
disconnect( wrap->lib, SIGNAL( destroyed() ),