summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore
authorzautrix <zautrix>2004-07-07 11:56:39 (UTC)
committer zautrix <zautrix>2004-07-07 11:56:39 (UTC)
commit56721aac86c9ae5253abac8962474c8d1a7e648a (patch) (side-by-side diff)
treec12f41eba0d5724ee800cdb92727ffd6d3c1cf6c /microkde/kdecore
parent13d88c91f2916090bd45e23b504d0b665c68126f (diff)
downloadkdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.zip
kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.tar.gz
kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.tar.bz2
Changes for compiling on desktop
Diffstat (limited to 'microkde/kdecore') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klibloader.cpp17
-rw-r--r--microkde/kdecore/kstandarddirs.cpp3
2 files changed, 10 insertions, 10 deletions
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp
index c07d50f..c091e05 100644
--- a/microkde/kdecore/klibloader.cpp
+++ b/microkde/kdecore/klibloader.cpp
@@ -37,20 +37,17 @@
*/
//US do everything through qlibrary
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#include <qtopia/qlibrary.h>
+#else
+#include <qlibrary.h>
#endif
-/*US
-#ifdef Q_WS_X11
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#endif
-*/
+
template class QAsciiDict<KLibrary>;
#include <stdlib.h> //getenv
/*US
#if HAVE_DLFCN_H
@@ -189,13 +186,12 @@ void* KLibrary::symbol( const char* symname ) const
{
//US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname );
void* sym = m_handle->resolve( symname );
if ( !sym )
{
//US kdWarning(150) << "KLibrary: " << lt_dlerror() << endl;
- kdWarning(150) << "KLibrary: " << m_libname << ", symbol:" << symname << " not found " << endl;
return 0;
}
return sym;
}
@@ -474,14 +470,17 @@ KLibrary* KLibLoader::library( const char *name )
}
wrap->ref_count++;
} else {
QString libfile = findLibrary( name );
if ( libfile.isEmpty() )
return 0;
-
+#ifdef DESKTOP_VERSION
+ QLibrary *qlib = new QLibrary( libfile.latin1() );
+#else
QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately );
+#endif
//US lt_dlhandle handle = lt_dlopen( libfile.latin1() );
//US if ( !handle )
if ( !qlib )
{
//US const char* errmsg = lt_dlerror();
@@ -596,12 +595,13 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
// kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl;
break;
}
// kdDebug(150) << "try to dlclose " << wrap->name << ": yes, done." << endl;
+#if 0
#ifndef Q_WS_QWS
if ( !deleted_one ) {
/* Only do the hack once in this loop.
WABA: *HACK*
We need to make sure to clear the clipboard before unloading a DSO
because the DSO could have defined an object derived from QMimeSource
@@ -625,12 +625,13 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
delete widgetlist;
}
#else
// FIXME(E): Implement in Qt Embedded
#endif
+#endif // 0
deleted_one = true;
//US lt_dlclose(wrap->handle);
wrap->handle->unload();
d->pending_close.removeRef(wrap);
/* loaded_stack is AutoDelete, so wrap is freed */
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index 1a1e027..7f51d78 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -40,13 +40,12 @@
#include <qasciidict.h>
#include <qdict.h>
#include <qdir.h>
#include <qfileinfo.h>
#include <qstring.h>
#include <qstringlist.h>
-#include <qpe/qpeapplication.h>
#include "kstandarddirs.h"
#include "kconfig.h"
#include "kdebug.h"
//US #include "kinstance.h"
#include "kshell.h"
@@ -1222,13 +1221,13 @@ void KStandardDirs::addKDEDefaults()
kdedir = KShell::tildeExpand(kdedir);
kdedirList.append(kdedir);
}
}
//US kdedirList.append(KDEDIR);
//US for embedded, add qtopia dir as kdedir
- kdedirList.append(QPEApplication::qpeDir());
+ kdedirList.append(readEnvPath("QPEDIR" ));
#ifdef __KDE_EXECPREFIX
QString execPrefix(__KDE_EXECPREFIX);
if (execPrefix!="NONE")
kdedirList.append(execPrefix);
#endif