-rw-r--r-- | microkde/kdecore/klibloader.cpp | 17 | ||||
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 3 |
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 | |||
@@ -19,56 +19,53 @@ | |||
19 | //US #include <config.h> | 19 | //US #include <config.h> |
20 | #include <qclipboard.h> | 20 | #include <qclipboard.h> |
21 | #include <qfile.h> | 21 | #include <qfile.h> |
22 | #include <qtimer.h> | 22 | #include <qtimer.h> |
23 | #include <qobjectdict.h> | 23 | #include <qobjectdict.h> |
24 | #include <qwidgetlist.h> | 24 | #include <qwidgetlist.h> |
25 | #include <qwidget.h> | 25 | #include <qwidget.h> |
26 | 26 | ||
27 | #include "kapplication.h" | 27 | #include "kapplication.h" |
28 | #include "klibloader.h" | 28 | #include "klibloader.h" |
29 | #include "kstandarddirs.h" | 29 | #include "kstandarddirs.h" |
30 | #include "kdebug.h" | 30 | #include "kdebug.h" |
31 | #include "klocale.h" | 31 | #include "klocale.h" |
32 | 32 | ||
33 | /*US | 33 | /*US |
34 | #ifndef NDEBUG | 34 | #ifndef NDEBUG |
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 | */ | ||
51 | template class QAsciiDict<KLibrary>; | 48 | template 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 |
59 | 56 | ||
60 | #ifdef RTLD_GLOBAL | 57 | #ifdef RTLD_GLOBAL |
61 | # define LT_GLOBAL RTLD_GLOBAL | 58 | # define LT_GLOBAL RTLD_GLOBAL |
62 | #else | 59 | #else |
63 | # ifdef DL_GLOBAL | 60 | # ifdef DL_GLOBAL |
64 | # define LT_GLOBAL DL_GLOBAL | 61 | # define LT_GLOBAL DL_GLOBAL |
65 | # endif | 62 | # endif |
66 | #endif | 63 | #endif |
67 | #ifndef LT_GLOBAL | 64 | #ifndef LT_GLOBAL |
68 | # define LT_GLOBAL 0 | 65 | # define LT_GLOBAL 0 |
69 | #endif | 66 | #endif |
70 | */ | 67 | */ |
71 | 68 | ||
72 | /*US | 69 | /*US |
73 | extern "C" { | 70 | extern "C" { |
74 | extern int lt_dlopen_flag; | 71 | extern int lt_dlopen_flag; |
@@ -171,49 +168,48 @@ KLibFactory* KLibrary::factory() | |||
171 | 168 | ||
172 | typedef KLibFactory* (*t_func)(); | 169 | typedef KLibFactory* (*t_func)(); |
173 | t_func func = (t_func)sym; | 170 | t_func func = (t_func)sym; |
174 | m_factory = func(); | 171 | m_factory = func(); |
175 | 172 | ||
176 | if( !m_factory ) | 173 | if( !m_factory ) |
177 | { | 174 | { |
178 | kdWarning(150) << "KLibrary: The library " << name() << " does not offer a KDE compatible factory" << endl; | 175 | kdWarning(150) << "KLibrary: The library " << name() << " does not offer a KDE compatible factory" << endl; |
179 | return 0; | 176 | return 0; |
180 | } | 177 | } |
181 | 178 | ||
182 | connect( m_factory, SIGNAL( objectCreated( QObject * ) ), | 179 | connect( m_factory, SIGNAL( objectCreated( QObject * ) ), |
183 | this, SLOT( slotObjectCreated( QObject * ) ) ); | 180 | this, SLOT( slotObjectCreated( QObject * ) ) ); |
184 | 181 | ||
185 | return m_factory; | 182 | return m_factory; |
186 | } | 183 | } |
187 | 184 | ||
188 | void* KLibrary::symbol( const char* symname ) const | 185 | void* 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 | ||
202 | bool KLibrary::hasSymbol( const char* symname ) const | 198 | bool KLibrary::hasSymbol( const char* symname ) const |
203 | { | 199 | { |
204 | //US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname ); | 200 | //US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname ); |
205 | void* sym = m_handle->resolve( symname ); | 201 | void* sym = m_handle->resolve( symname ); |
206 | return (sym != 0L ); | 202 | return (sym != 0L ); |
207 | } | 203 | } |
208 | 204 | ||
209 | void KLibrary::unload() const | 205 | void KLibrary::unload() const |
210 | { | 206 | { |
211 | if (KLibLoader::s_self) | 207 | if (KLibLoader::s_self) |
212 | KLibLoader::s_self->unloadLibrary(QFile::encodeName(name())); | 208 | KLibLoader::s_self->unloadLibrary(QFile::encodeName(name())); |
213 | } | 209 | } |
214 | 210 | ||
215 | void KLibrary::slotObjectCreated( QObject *obj ) | 211 | void KLibrary::slotObjectCreated( QObject *obj ) |
216 | { | 212 | { |
217 | if ( !obj ) | 213 | if ( !obj ) |
218 | return; | 214 | return; |
219 | 215 | ||
@@ -456,50 +452,53 @@ KLibrary* KLibLoader::library( const char *name ) | |||
456 | /* Nothing to do to load the library. */ | 452 | /* Nothing to do to load the library. */ |
457 | wrap->ref_count++; | 453 | wrap->ref_count++; |
458 | return wrap->lib; | 454 | return wrap->lib; |
459 | } | 455 | } |
460 | 456 | ||
461 | /* Test if this library was loaded at some time, but got | 457 | /* Test if this library was loaded at some time, but got |
462 | unloaded meanwhile, whithout being dlclose()'ed. */ | 458 | unloaded meanwhile, whithout being dlclose()'ed. */ |
463 | QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); | 459 | QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); |
464 | for (; it.current(); ++it) { | 460 | for (; it.current(); ++it) { |
465 | if (it.current()->name == name) | 461 | if (it.current()->name == name) |
466 | wrap = it.current(); | 462 | wrap = it.current(); |
467 | } | 463 | } |
468 | 464 | ||
469 | if (wrap) { | 465 | if (wrap) { |
470 | d->pending_close.removeRef(wrap); | 466 | d->pending_close.removeRef(wrap); |
471 | if (!wrap->lib) { | 467 | if (!wrap->lib) { |
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()); |
490 | qDebug(errmsg); | 489 | qDebug(errmsg); |
491 | 490 | ||
492 | if(errmsg) | 491 | if(errmsg) |
493 | d->errorMessage = QString::fromLatin1(errmsg); | 492 | d->errorMessage = QString::fromLatin1(errmsg); |
494 | else | 493 | else |
495 | d->errorMessage = QString::null; | 494 | d->errorMessage = QString::null; |
496 | kdWarning(150) << "library=" << name << ": file=" << libfile << ": " << d->errorMessage << endl; | 495 | kdWarning(150) << "library=" << name << ": file=" << libfile << ": " << d->errorMessage << endl; |
497 | return 0; | 496 | return 0; |
498 | } | 497 | } |
499 | else | 498 | else |
500 | d->errorMessage = QString::null; | 499 | d->errorMessage = QString::null; |
501 | 500 | ||
502 | KLibrary *lib = new KLibrary( name, libfile, qlib ); | 501 | KLibrary *lib = new KLibrary( name, libfile, qlib ); |
503 | wrap = new KLibWrapPrivate(lib, qlib); | 502 | wrap = new KLibWrapPrivate(lib, qlib); |
504 | d->loaded_stack.prepend(wrap); | 503 | d->loaded_stack.prepend(wrap); |
505 | } | 504 | } |
@@ -578,70 +577,72 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) | |||
578 | 577 | ||
579 | if (d->unload_mode == KLibLoaderPrivate::DONT_UNLOAD) return; | 578 | if (d->unload_mode == KLibLoaderPrivate::DONT_UNLOAD) return; |
580 | 579 | ||
581 | bool deleted_one = false; | 580 | bool deleted_one = false; |
582 | while ((wrap = d->loaded_stack.first())) { | 581 | while ((wrap = d->loaded_stack.first())) { |
583 | /* Let's first see, if we want to try to unload this lib. | 582 | /* Let's first see, if we want to try to unload this lib. |
584 | If the env. var KDE_DOUNLOAD is set, we try to unload every lib. | 583 | If the env. var KDE_DOUNLOAD is set, we try to unload every lib. |
585 | If not, we look at the lib itself, and unload it only, if it exports | 584 | If not, we look at the lib itself, and unload it only, if it exports |
586 | the symbol __kde_do_unload. */ | 585 | the symbol __kde_do_unload. */ |
587 | if (d->unload_mode != KLibLoaderPrivate::UNLOAD | 586 | if (d->unload_mode != KLibLoaderPrivate::UNLOAD |
588 | && wrap->unload_mode != KLibWrapPrivate::UNLOAD) | 587 | && wrap->unload_mode != KLibWrapPrivate::UNLOAD) |
589 | break; | 588 | break; |
590 | 589 | ||
591 | /* Now ensure, that the libs are only unloaded in the reverse direction | 590 | /* Now ensure, that the libs are only unloaded in the reverse direction |
592 | they were loaded. */ | 591 | they were loaded. */ |
593 | if (!d->pending_close.containsRef( wrap )) { | 592 | if (!d->pending_close.containsRef( 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();*/ |
610 | 610 | ||
611 | /* Well.. let's do something more subtle... convert the clipboard context | 611 | /* Well.. let's do something more subtle... convert the clipboard context |
612 | to text. That should be safe as it only uses objects defined by Qt. */ | 612 | to text. That should be safe as it only uses objects defined by Qt. */ |
613 | 613 | ||
614 | QWidgetList *widgetlist = QApplication::topLevelWidgets(); | 614 | QWidgetList *widgetlist = QApplication::topLevelWidgets(); |
615 | QWidget *co = widgetlist->first(); | 615 | QWidget *co = widgetlist->first(); |
616 | while (co) { | 616 | while (co) { |
617 | if (qstrcmp(co->name(), "internal clipboard owner") == 0) { | 617 | if (qstrcmp(co->name(), "internal clipboard owner") == 0) { |
618 | if (XGetSelectionOwner(co->x11Display(), XA_PRIMARY) == co->winId()) | 618 | if (XGetSelectionOwner(co->x11Display(), XA_PRIMARY) == co->winId()) |
619 | kapp->clipboard()->setText(kapp->clipboard()->text()); | 619 | kapp->clipboard()->setText(kapp->clipboard()->text()); |
620 | 620 | ||
621 | break; | 621 | break; |
622 | } | 622 | } |
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 | } |
639 | } | 640 | } |
640 | 641 | ||
641 | void KLibLoader::virtual_hook( int, void* ) | 642 | void KLibLoader::virtual_hook( int, void* ) |
642 | { /*BASE::virtual_hook( id, data );*/ } | 643 | { /*BASE::virtual_hook( id, data );*/ } |
643 | 644 | ||
644 | void KLibFactory::virtual_hook( int, void* ) | 645 | void KLibFactory::virtual_hook( int, void* ) |
645 | { /*BASE::virtual_hook( id, data );*/ } | 646 | { /*BASE::virtual_hook( id, data );*/ } |
646 | 647 | ||
647 | //US #include "klibloader.moc" | 648 | //US #include "klibloader.moc" |
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 | |||
@@ -22,49 +22,48 @@ | |||
22 | * Author: Stephan Kulow <coolo@kde.org> and Sirtaj Singh Kang <taj@kde.org> | 22 | * Author: Stephan Kulow <coolo@kde.org> and Sirtaj Singh Kang <taj@kde.org> |
23 | * Version:$Id$ | 23 | * Version:$Id$ |
24 | * Generated:Thu Mar 5 16:05:28 EST 1998 | 24 | * Generated:Thu Mar 5 16:05:28 EST 1998 |
25 | */ | 25 | */ |
26 | 26 | ||
27 | //US #include "config.h" | 27 | //US #include "config.h" |
28 | 28 | ||
29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | #include <assert.h> | 30 | #include <assert.h> |
31 | //US#include <errno.h> | 31 | //US#include <errno.h> |
32 | //US #ifdef HAVE_SYS_STAT_H | 32 | //US #ifdef HAVE_SYS_STAT_H |
33 | //US #include <sys/stat.h> | 33 | //US #include <sys/stat.h> |
34 | //US #endif | 34 | //US #endif |
35 | //US#include <sys/types.h> | 35 | //US#include <sys/types.h> |
36 | //US#include <dirent.h> | 36 | //US#include <dirent.h> |
37 | //US#include <pwd.h> | 37 | //US#include <pwd.h> |
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> |
55 | 54 | ||
56 | //US | 55 | //US |
57 | QString KStandardDirs::mAppDir = QString::null; | 56 | QString KStandardDirs::mAppDir = QString::null; |
58 | 57 | ||
59 | 58 | ||
60 | template class QDict<QStringList>; | 59 | template class QDict<QStringList>; |
61 | 60 | ||
62 | #if 0 | 61 | #if 0 |
63 | #include <qtextedit.h> | 62 | #include <qtextedit.h> |
64 | void ddd( QString op ) | 63 | void ddd( QString op ) |
65 | { | 64 | { |
66 | static QTextEdit * dot = 0; | 65 | static QTextEdit * dot = 0; |
67 | if ( ! dot ) | 66 | if ( ! dot ) |
68 | dot = new QTextEdit(); | 67 | dot = new QTextEdit(); |
69 | 68 | ||
70 | dot->show(); | 69 | dot->show(); |
@@ -1204,49 +1203,49 @@ static QString readEnvPath(const char *env) | |||
1204 | 1203 | ||
1205 | void KStandardDirs::addKDEDefaults() | 1204 | void KStandardDirs::addKDEDefaults() |
1206 | { | 1205 | { |
1207 | //qDebug("ERROR: KStandardDirs::addKDEDefaults() called "); | 1206 | //qDebug("ERROR: KStandardDirs::addKDEDefaults() called "); |
1208 | //return; | 1207 | //return; |
1209 | QStringList kdedirList; | 1208 | QStringList kdedirList; |
1210 | 1209 | ||
1211 | // begin KDEDIRS | 1210 | // begin KDEDIRS |
1212 | QString kdedirs = readEnvPath("MICROKDEDIRS"); | 1211 | QString kdedirs = readEnvPath("MICROKDEDIRS"); |
1213 | if (!kdedirs.isEmpty()) | 1212 | if (!kdedirs.isEmpty()) |
1214 | { | 1213 | { |
1215 | tokenize(kdedirList, kdedirs, ":"); | 1214 | tokenize(kdedirList, kdedirs, ":"); |
1216 | } | 1215 | } |
1217 | else | 1216 | else |
1218 | { | 1217 | { |
1219 | QString kdedir = readEnvPath("MICROKDEDIR"); | 1218 | QString kdedir = readEnvPath("MICROKDEDIR"); |
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; |
1237 | 1236 | ||
1238 | //US if (getuid()) | 1237 | //US if (getuid()) |
1239 | if (true) | 1238 | if (true) |
1240 | { | 1239 | { |
1241 | localKdeDir = readEnvPath("MICROKDEHOME"); | 1240 | localKdeDir = readEnvPath("MICROKDEHOME"); |
1242 | if (!localKdeDir.isEmpty()) | 1241 | if (!localKdeDir.isEmpty()) |
1243 | { | 1242 | { |
1244 | if (localKdeDir.at(localKdeDir.length()-1) != '/') | 1243 | if (localKdeDir.at(localKdeDir.length()-1) != '/') |
1245 | localKdeDir += '/'; | 1244 | localKdeDir += '/'; |
1246 | } | 1245 | } |
1247 | else | 1246 | else |
1248 | { | 1247 | { |
1249 | localKdeDir = QDir::homeDirPath() + "/kdepim/"; | 1248 | localKdeDir = QDir::homeDirPath() + "/kdepim/"; |
1250 | } | 1249 | } |
1251 | } | 1250 | } |
1252 | else | 1251 | else |