summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (show 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
@@ -35,24 +35,21 @@
35#include "ltdl.h" 35#include "ltdl.h"
36#endif 36#endif
37*/ 37*/
38 38
39//US do everything through qlibrary 39//US do everything through qlibrary
40#ifndef DESKTOP_VERSION 40#ifndef DESKTOP_VERSION
41#include <qpe/qpeapplication.h> 41#include <qpe/qpeapplication.h>
42#include <qtopia/qlibrary.h> 42#include <qtopia/qlibrary.h>
43#else
44#include <qlibrary.h>
43#endif 45#endif
44 46
45/*US 47
46#ifdef Q_WS_X11
47#include <X11/Xlib.h>
48#include <X11/Xatom.h>
49#endif
50*/
51template class QAsciiDict<KLibrary>; 48template class QAsciiDict<KLibrary>;
52 49
53#include <stdlib.h> //getenv 50#include <stdlib.h> //getenv
54 51
55/*US 52/*US
56#if HAVE_DLFCN_H 53#if HAVE_DLFCN_H
57# include <dlfcn.h> 54# include <dlfcn.h>
58#endif 55#endif
@@ -187,17 +184,16 @@ KLibFactory* KLibrary::factory()
187 184
188void* KLibrary::symbol( const char* symname ) const 185void* KLibrary::symbol( const char* symname ) const
189{ 186{
190//US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname ); 187//US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname );
191 void* sym = m_handle->resolve( symname ); 188 void* sym = m_handle->resolve( symname );
192 if ( !sym ) 189 if ( !sym )
193 { 190 {
194//US kdWarning(150) << "KLibrary: " << lt_dlerror() << endl; 191//US kdWarning(150) << "KLibrary: " << lt_dlerror() << endl;
195 kdWarning(150) << "KLibrary: " << m_libname << ", symbol:" << symname << " not found " << endl;
196 return 0; 192 return 0;
197 } 193 }
198 194
199 return sym; 195 return sym;
200} 196}
201 197
202bool KLibrary::hasSymbol( const char* symname ) const 198bool KLibrary::hasSymbol( const char* symname ) const
203{ 199{
@@ -472,18 +468,21 @@ KLibrary* KLibLoader::library( const char *name )
472 /* This lib only was in loaded_stack, but not in m_libs. */ 468 /* This lib only was in loaded_stack, but not in m_libs. */
473 wrap->lib = new KLibrary( name, wrap->filename, wrap->handle ); 469 wrap->lib = new KLibrary( name, wrap->filename, wrap->handle );
474 } 470 }
475 wrap->ref_count++; 471 wrap->ref_count++;
476 } else { 472 } else {
477 QString libfile = findLibrary( name ); 473 QString libfile = findLibrary( name );
478 if ( libfile.isEmpty() ) 474 if ( libfile.isEmpty() )
479 return 0; 475 return 0;
480 476#ifdef DESKTOP_VERSION
477 QLibrary *qlib = new QLibrary( libfile.latin1() );
478#else
481 QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately ); 479 QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately );
480#endif
482 481
483//US lt_dlhandle handle = lt_dlopen( libfile.latin1() ); 482//US lt_dlhandle handle = lt_dlopen( libfile.latin1() );
484//US if ( !handle ) 483//US if ( !handle )
485 if ( !qlib ) 484 if ( !qlib )
486 { 485 {
487//US const char* errmsg = lt_dlerror(); 486//US const char* errmsg = lt_dlerror();
488 char* errmsg; 487 char* errmsg;
489 sprintf(errmsg, "KLibLoader::library could not load library: %s", libfile.latin1()); 488 sprintf(errmsg, "KLibLoader::library could not load library: %s", libfile.latin1());
@@ -594,16 +593,17 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
594 if (!deleted_one) 593 if (!deleted_one)
595 /* Only diagnose, if we really haven't deleted anything. */ 594 /* Only diagnose, if we really haven't deleted anything. */
596// kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl; 595// kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl;
597 break; 596 break;
598 } 597 }
599 598
600// kdDebug(150) << "try to dlclose " << wrap->name << ": yes, done." << endl; 599// kdDebug(150) << "try to dlclose " << wrap->name << ": yes, done." << endl;
601 600
601#if 0
602#ifndef Q_WS_QWS 602#ifndef Q_WS_QWS
603 if ( !deleted_one ) { 603 if ( !deleted_one ) {
604 /* Only do the hack once in this loop. 604 /* Only do the hack once in this loop.
605 WABA: *HACK* 605 WABA: *HACK*
606 We need to make sure to clear the clipboard before unloading a DSO 606 We need to make sure to clear the clipboard before unloading a DSO
607 because the DSO could have defined an object derived from QMimeSource 607 because the DSO could have defined an object derived from QMimeSource
608 and placed that on the clipboard. */ 608 and placed that on the clipboard. */
609 /*kapp->clipboard()->clear();*/ 609 /*kapp->clipboard()->clear();*/
@@ -623,16 +623,17 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
623 co = widgetlist->next(); 623 co = widgetlist->next();
624 } 624 }
625 delete widgetlist; 625 delete widgetlist;
626 } 626 }
627#else 627#else
628 // FIXME(E): Implement in Qt Embedded 628 // FIXME(E): Implement in Qt Embedded
629#endif 629#endif
630 630
631#endif // 0
631 deleted_one = true; 632 deleted_one = true;
632//US lt_dlclose(wrap->handle); 633//US lt_dlclose(wrap->handle);
633 wrap->handle->unload(); 634 wrap->handle->unload();
634 635
635 d->pending_close.removeRef(wrap); 636 d->pending_close.removeRef(wrap);
636 /* loaded_stack is AutoDelete, so wrap is freed */ 637 /* loaded_stack is AutoDelete, so wrap is freed */
637 d->loaded_stack.remove(); 638 d->loaded_stack.remove();
638 } 639 }
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
@@ -38,17 +38,16 @@
38 38
39#include <qregexp.h> 39#include <qregexp.h>
40#include <qasciidict.h> 40#include <qasciidict.h>
41#include <qdict.h> 41#include <qdict.h>
42#include <qdir.h> 42#include <qdir.h>
43#include <qfileinfo.h> 43#include <qfileinfo.h>
44#include <qstring.h> 44#include <qstring.h>
45#include <qstringlist.h> 45#include <qstringlist.h>
46#include <qpe/qpeapplication.h>
47 46
48#include "kstandarddirs.h" 47#include "kstandarddirs.h"
49#include "kconfig.h" 48#include "kconfig.h"
50#include "kdebug.h" 49#include "kdebug.h"
51//US #include "kinstance.h" 50//US #include "kinstance.h"
52#include "kshell.h" 51#include "kshell.h"
53//US#include <sys/param.h> 52//US#include <sys/param.h>
54//US#include <unistd.h> 53//US#include <unistd.h>
@@ -1220,17 +1219,17 @@ void KStandardDirs::addKDEDefaults()
1220 if (!kdedir.isEmpty()) 1219 if (!kdedir.isEmpty())
1221 { 1220 {
1222 kdedir = KShell::tildeExpand(kdedir); 1221 kdedir = KShell::tildeExpand(kdedir);
1223 kdedirList.append(kdedir); 1222 kdedirList.append(kdedir);
1224 } 1223 }
1225 } 1224 }
1226//US kdedirList.append(KDEDIR); 1225//US kdedirList.append(KDEDIR);
1227//US for embedded, add qtopia dir as kdedir 1226//US for embedded, add qtopia dir as kdedir
1228 kdedirList.append(QPEApplication::qpeDir()); 1227 kdedirList.append(readEnvPath("QPEDIR" ));
1229 1228
1230#ifdef __KDE_EXECPREFIX 1229#ifdef __KDE_EXECPREFIX
1231 QString execPrefix(__KDE_EXECPREFIX); 1230 QString execPrefix(__KDE_EXECPREFIX);
1232 if (execPrefix!="NONE") 1231 if (execPrefix!="NONE")
1233 kdedirList.append(execPrefix); 1232 kdedirList.append(execPrefix);
1234#endif 1233#endif
1235 1234
1236 QString localKdeDir; 1235 QString localKdeDir;
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
@@ -1019,17 +1019,17 @@ int KToolBar::iconSize() const
1019 if (!::qstrcmp(QObject::name(), "mainToolBar")) 1019 if (!::qstrcmp(QObject::name(), "mainToolBar"))
1020 return KGlobal::iconLoader()->currentSize(KIcon::MainToolbar); 1020 return KGlobal::iconLoader()->currentSize(KIcon::MainToolbar);
1021 else 1021 else
1022 return KGlobal::iconLoader()->currentSize(KIcon::Toolbar); 1022 return KGlobal::iconLoader()->currentSize(KIcon::Toolbar);
1023 } 1023 }
1024 return d->m_iconSize; 1024 return d->m_iconSize;
1025*/ 1025*/
1026 int ret = 18; 1026 int ret = 18;
1027 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) 1027 if ( QApplication::desktop()->width() > 320 )
1028 ret = 30; 1028 ret = 30;
1029 return ret; 1029 return ret;
1030} 1030}
1031 1031
1032 1032
1033void KToolBar::setEnableContextMenu(bool enable ) 1033void KToolBar::setEnableContextMenu(bool enable )
1034{ 1034{
1035 d->m_enableContext = enable; 1035 d->m_enableContext = enable;
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
@@ -21,18 +21,19 @@
21 Boston, MA 02111-1307, USA. 21 Boston, MA 02111-1307, USA.
22*/ 22*/
23 23
24#include <kdebug.h> 24#include <kdebug.h>
25#include <klocale.h> 25#include <klocale.h>
26#include <ksimpleconfig.h> 26#include <ksimpleconfig.h>
27#include <kstandarddirs.h> 27#include <kstandarddirs.h>
28#include <kstaticdeleter.h> 28#include <kstaticdeleter.h>
29//#ifndef DESKTOP_VERSION
29#include <klibloader.h> 30#include <klibloader.h>
30 31//#endif
31#include <qfile.h> 32#include <qfile.h>
32 33
33#include "resource.h" 34#include "resource.h"
34#include "factory.h" 35#include "factory.h"
35 36
36using namespace KRES; 37using namespace KRES;
37 38
38QDict<Factory> *Factory::mSelves = 0; 39QDict<Factory> *Factory::mSelves = 0;
diff --git a/microkde/microkde.pro b/microkde/microkde.pro
index 1e9b022..05833a9 100644
--- a/microkde/microkde.pro
+++ b/microkde/microkde.pro
@@ -93,17 +93,18 @@ KDGanttMinimizeSplitter.h \
93 kdeui/kxmlguiclient.h \ 93 kdeui/kxmlguiclient.h \
94 kdeui/kstdaction.h \ 94 kdeui/kstdaction.h \
95 kdeui/kmainwindow.h \ 95 kdeui/kmainwindow.h \
96 kdeui/ktoolbar.h \ 96 kdeui/ktoolbar.h \
97 kdeui/ktoolbarbutton.h \ 97 kdeui/ktoolbarbutton.h \
98 kdeui/ktoolbarhandler.h \ 98 kdeui/ktoolbarhandler.h \
99 kdeui/kaction.h \ 99 kdeui/kaction.h \
100 kdeui/kactionclasses.h \ 100 kdeui/kactionclasses.h \
101 kdeui/kactioncollection.h 101 kdeui/kactioncollection.h \
102 kdecore/klibloader.h
102 103
103 104
104# kdecore/klibloader.h \ 105# kdecore/klibloader.h \
105 106
106 107
107SOURCES = \ 108SOURCES = \
108KDGanttMinimizeSplitter.cpp \ 109KDGanttMinimizeSplitter.cpp \
109 kapplication.cpp \ 110 kapplication.cpp \
@@ -158,13 +159,10 @@ KDGanttMinimizeSplitter.cpp \
158 kdeui/kaction.cpp \ 159 kdeui/kaction.cpp \
159 kdeui/kactionclasses.cpp \ 160 kdeui/kactionclasses.cpp \
160 kdeui/kactioncollection.cpp \ 161 kdeui/kactioncollection.cpp \
161 kdeui/kmainwindow.cpp \ 162 kdeui/kmainwindow.cpp \
162 kdeui/ktoolbar.cpp \ 163 kdeui/ktoolbar.cpp \
163 kdeui/ktoolbarbutton.cpp \ 164 kdeui/ktoolbarbutton.cpp \
164 kdeui/ktoolbarhandler.cpp \ 165 kdeui/ktoolbarhandler.cpp \
165 kdeui/kstdaction.cpp \ 166 kdeui/kstdaction.cpp \
166 kdeui/kxmlguiclient.cpp 167 kdeui/kxmlguiclient.cpp \
167 168 kdecore/klibloader.cpp \ No newline at end of file
168
169
170# kdecore/klibloader.cpp \ \ No newline at end of file