summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore/klibloader.h
Side-by-side diff
Diffstat (limited to 'microkde/kdecore/klibloader.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klibloader.h10
1 files changed, 5 insertions, 5 deletions
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
@@ -1,79 +1,79 @@
/* This file is part of the KDE libraries
Copyright (C) 1999 Torben Weis <weis@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef KLIBLOADER_H
#define KLIBLOADER_H
#include <qobject.h>
#include <qstring.h>
#include <qstringlist.h>
-#include <qasciidict.h>
-#include <qptrlist.h>
+#include <q3asciidict.h>
+#include <q3ptrlist.h>
#include <kglobal.h>
#include <stdlib.h> // For backwards compatibility
class KInstance;
class QTimer;
class KLibrary;
class KLibFactory;
class KLibFactoryPrivate;
class KLibLoaderPrivate;
class KLibraryPrivate;
class QLibrary;
#define K_EXPORT_COMPONENT_FACTORY( libname, factory ) \
extern "C" { void *init_##libname() { return new factory; } }
/**
* @short Represents a dynamically loaded library.
*
* KLibrary allows you to look up symbols of the shared library.
* Use @ref KLibLoader to create a new instance of KLibrary.
*
* @see KLibLoader
* @author Torben Weis <weis@kde.org>
*/
class KLibrary : public QObject
{
friend class KLibLoader;
- friend class QAsciiDict<KLibrary>;
+ friend class Q3AsciiDict<KLibrary>;
Q_OBJECT
public:
/**
* @internal
* Don't create KLibrary objects on your own. Instead use @ref KLibLoader.
*/
//US KLibrary( const QString& libname, const QString& filename, void * handle );
KLibrary( const QString& libname, const QString& filename, QLibrary* handle );
/**
* Returns the name of the library.
* @return The name of the library like "libkspread".
*/
QString name() const;
/**
* Returns the file name of the library.
* @return The filename of the library, for example "/opt/kde2&/lib/libkspread.la"
*/
QString fileName() const;
/**
* Returns the factory of the library.
@@ -106,49 +106,49 @@ public:
/**
* Unloads the library.
* This typically results in the deletion of this object. You should
* not reference its pointer after calling this function.
*/
void unload() const;
private slots:
void slotObjectCreated( QObject *obj );
void slotObjectDestroyed();
void slotTimeout();
private:
/**
* @internal
* Don't destruct KLibrary objects yourself. Instead use @ref unload() instead.
*/
~KLibrary();
QString m_libname;
QString m_filename;
KLibFactory* m_factory;
//US void * m_handle;
QLibrary* m_handle;
- QPtrList<QObject> m_objs;
+ Q3PtrList<QObject> m_objs;
QTimer *m_timer;
KLibraryPrivate *d;
};
class KLibWrapPrivate;
/**
* The KLibLoader allows you to load libraries dynamically at runtime.
* Dependent libraries are loaded automatically.
*
* KLibLoader follows the singleton pattern. You can not create multiple
* instances. Use @ref self() to get a pointer to the loader.
*
* @see KLibrary
* @author Torben Weis <weis@kde.org>
*/
class KLibLoader : public QObject
{
friend class KLibrary;
Q_OBJECT
public:
/**
* You should NEVER destruct an instance of KLibLoader
@@ -266,49 +266,49 @@ public:
* being called in all cases, whether the library is unloaded
* while the application is running or when exiting.
*/
static void cleanUp();
/**
* Helper method which looks for a library in the standard paths
* ("module" and "lib" resources).
* Made public for code that doesn't use KLibLoader itself, but still
* wants to open modules.
* @param name of the library. If it is not a path, the function searches in
* the "module" and "lib" resources. If there is no extension,
* ".la" will be appended.
* @param instance a KInstance used to get the standard paths
*/
static QString findLibrary( const char * name/*US , const KInstance * instance = KGlobal::instance()*/ );
protected:
KLibLoader( QObject* parent = 0, const char* name = 0 );
private slots:
void slotLibraryDestroyed();
private:
void close_pending( KLibWrapPrivate * );
- QAsciiDict<KLibWrapPrivate> m_libs;
+ Q3AsciiDict<KLibWrapPrivate> m_libs;
static KLibLoader* s_self;
protected:
virtual void virtual_hook( int id, void* data );
private:
KLibLoaderPrivate *d;
};
/**
* If you develop a library that is to be loaded dynamically at runtime, then
* you should return a pointer to your factory. The K_EXPORT_COMPONENT_FACTORY
* macro is provided for this purpose:
* <pre>
* K_EXPORT_COMPONENT_FACTORY( libkspread, KSpreadFactory )
* </pre>
*
* The first macro argument is the name of your library, the second specifies the name
* of your factory.
*
* In the constructor of your factory you should create an instance of @ref KInstance
* like this:
* <pre>
* s_global = new KInstance( "kspread" );