summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klibloader.cpp17
-rw-r--r--microkde/kdecore/kstandarddirs.cpp3
-rw-r--r--microkde/kdeui/ktoolbar.cpp2
-rw-r--r--microkde/kresources/factory.cpp3
-rw-r--r--microkde/microkde.pro10
5 files changed, 17 insertions, 18 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
@@ -31,32 +31,29 @@
#include "klocale.h"
/*US
#ifndef NDEBUG
#include "ltdl.h"
#endif
*/
//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
# include <dlfcn.h>
#endif
#ifdef RTLD_GLOBAL
# define LT_GLOBAL RTLD_GLOBAL
#else
@@ -183,25 +180,24 @@ KLibFactory* KLibrary::factory()
this, SLOT( slotObjectCreated( QObject * ) ) );
return m_factory;
}
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;
}
bool KLibrary::hasSymbol( const char* symname ) const
{
//US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname );
void* sym = m_handle->resolve( symname );
return (sym != 0L );
}
@@ -468,26 +464,29 @@ KLibrary* KLibLoader::library( const char *name )
if (wrap) {
d->pending_close.removeRef(wrap);
if (!wrap->lib) {
/* This lib only was in loaded_stack, but not in m_libs. */
wrap->lib = new KLibrary( name, wrap->filename, wrap->handle );
}
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();
char* errmsg;
sprintf(errmsg, "KLibLoader::library could not load library: %s", libfile.latin1());
qDebug(errmsg);
if(errmsg)
d->errorMessage = QString::fromLatin1(errmsg);
@@ -590,24 +589,25 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
/* Now ensure, that the libs are only unloaded in the reverse direction
they were loaded. */
if (!d->pending_close.containsRef( wrap )) {
if (!deleted_one)
/* Only diagnose, if we really haven't deleted anything. */
// 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
and placed that on the clipboard. */
/*kapp->clipboard()->clear();*/
/* Well.. let's do something more subtle... convert the clipboard context
to text. That should be safe as it only uses objects defined by Qt. */
@@ -619,24 +619,25 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
kapp->clipboard()->setText(kapp->clipboard()->text());
break;
}
co = widgetlist->next();
}
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 */
d->loaded_stack.remove();
}
}
void KLibLoader::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
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
@@ -34,25 +34,24 @@
//US #endif
//US#include <sys/types.h>
//US#include <dirent.h>
//US#include <pwd.h>
#include <qregexp.h>
#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"
//US#include <sys/param.h>
//US#include <unistd.h>
//US
QString KStandardDirs::mAppDir = QString::null;
@@ -1216,25 +1215,25 @@ void KStandardDirs::addKDEDefaults()
}
else
{
QString kdedir = readEnvPath("MICROKDEDIR");
if (!kdedir.isEmpty())
{
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
QString localKdeDir;
//US if (getuid())
if (true)
{
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 92cb8d2..79b0f9d 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -1015,25 +1015,25 @@ int KToolBar::iconSize() const
{
/*US
if ( !d->m_iconSize ) // default value?
{
if (!::qstrcmp(QObject::name(), "mainToolBar"))
return KGlobal::iconLoader()->currentSize(KIcon::MainToolbar);
else
return KGlobal::iconLoader()->currentSize(KIcon::Toolbar);
}
return d->m_iconSize;
*/
int ret = 18;
- if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 )
+ if ( QApplication::desktop()->width() > 320 )
ret = 30;
return ret;
}
void KToolBar::setEnableContextMenu(bool enable )
{
d->m_enableContext = enable;
}
bool KToolBar::contextMenuEnabled() const
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp
index 827ec38..2253de4 100644
--- a/microkde/kresources/factory.cpp
+++ b/microkde/kresources/factory.cpp
@@ -17,26 +17,27 @@
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.
*/
#include <kdebug.h>
#include <klocale.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kstaticdeleter.h>
+//#ifndef DESKTOP_VERSION
#include <klibloader.h>
-
+//#endif
#include <qfile.h>
#include "resource.h"
#include "factory.h"
using namespace KRES;
QDict<Factory> *Factory::mSelves = 0;
static KStaticDeleter< QDict<Factory> > staticDeleter;
Factory *Factory::self( const QString& resourceFamily )
{
diff --git a/microkde/microkde.pro b/microkde/microkde.pro
index 1e9b022..05833a9 100644
--- a/microkde/microkde.pro
+++ b/microkde/microkde.pro
@@ -89,25 +89,26 @@ KDGanttMinimizeSplitter.h \
kdecore/kstandarddirs.h \
kdecore/kstringhandler.h \
kdecore/kshortcut.h \
kutils/kcmultidialog.h \
kdeui/kxmlguiclient.h \
kdeui/kstdaction.h \
kdeui/kmainwindow.h \
kdeui/ktoolbar.h \
kdeui/ktoolbarbutton.h \
kdeui/ktoolbarhandler.h \
kdeui/kaction.h \
kdeui/kactionclasses.h \
- kdeui/kactioncollection.h
+ kdeui/kactioncollection.h \
+ kdecore/klibloader.h
# kdecore/klibloader.h \
SOURCES = \
KDGanttMinimizeSplitter.cpp \
kapplication.cpp \
kcalendarsystem.cpp \
kcalendarsystemgregorian.cpp \
kcolorbutton.cpp \
kcolordialog.cpp \
@@ -154,17 +155,14 @@ KDGanttMinimizeSplitter.cpp \
kresources/managerimpl.cpp \
kresources/resource.cpp \
kresources/selectdialog.cpp \
kutils/kcmultidialog.cpp \
kdeui/kaction.cpp \
kdeui/kactionclasses.cpp \
kdeui/kactioncollection.cpp \
kdeui/kmainwindow.cpp \
kdeui/ktoolbar.cpp \
kdeui/ktoolbarbutton.cpp \
kdeui/ktoolbarhandler.cpp \
kdeui/kstdaction.cpp \
- kdeui/kxmlguiclient.cpp
-
-
-
-# kdecore/klibloader.cpp \ \ No newline at end of file
+ kdeui/kxmlguiclient.cpp \
+ kdecore/klibloader.cpp \ No newline at end of file