diff --git a/CMakeLists.txt b/CMakeLists.txt index 40e491bc..8a4ded92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,64 +1,83 @@ cmake_minimum_required (VERSION 3.0) project (kdelibs) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) if (NOT CMAKE_BUILD_TYPE) # set(CMAKE_BUILD_TYPE Release) endif() # additional cmake files list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(PNG REQUIRED) find_package(JPEG REQUIRED) find_package(TIFF REQUIRED) find_package(X11 REQUIRED) find_package(Qt1 REQUIRED) find_package(Gettext REQUIRED) include(CMakePackageConfigHelpers) include(GNUInstallDirs) include(Qt1Macros) include(KDE1Macros) -include(KDE1InstallDirs) + +set(KDE1_PREFIX "${CMAKE_INSTALL_PREFIX}") +set(KDE1_APPSDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/applnk") +set(KDE1_BINDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_BINDIR}") +set(KDE1_CGIDIR "${KDE1_PREFIX}/cgi-bin") +set(KDE1_CONFDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/config") +set(KDE1_DATADIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/apps") +set(KDE1_HTMLDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/doc/HTML") +set(KDE1_ICONDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons") +set(KDE1_INCLUDES "${KDE1_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/kde1") +set(KDE1_LIBRARIES "${KDE1_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +set(KDE1_LIBDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +set(KDE1_LOCALE "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/locale") +set(KDE1_MIMEDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mimelnk") +set(KDE1_MINIDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/mini") +set(KDE1_PARTSDIR "${KDE1_PREFIX}/parts") +set(KDE1_SOUNDDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/sounds") +set(KDE1_TOOLBARDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/toolbar") +set(KDE1_WALLPAPERDIR "${KDE1_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/wallpapers") set(KDELIBS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") configure_package_config_file(cmake/KDE1InstallDirs.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/KDE1InstallDirs.cmake INSTALL_DESTINATION ${LIB_INSTALL_DIR}/KDE1/cmake ) -include_directories(common) +configure_file(common/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_definitions( -DHAVE_CONFIG_H ) if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -std=c++98") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KDE1InstallDirs.cmake cmake/FindKDE1.cmake cmake/KDE1Macros.cmake cmake/KDE1Macros.cmake cmake/Qt1Macros.cmake DESTINATION ${CMAKE_ROOT}/Modules) add_subdirectory(doc) add_subdirectory(kdecore) add_subdirectory(kdeui) add_subdirectory(kfile) add_subdirectory(kfmlib) add_subdirectory(jscript) add_subdirectory(kimgio) add_subdirectory(khtmlw) add_subdirectory(mediatool) add_subdirectory(kspell) add_subdirectory(kab) add_subdirectory(toolbar) add_subdirectory(po) diff --git a/cmake/KDE1InstallDirs.cmake.in b/cmake/KDE1InstallDirs.cmake.in index 37961fd5..2c957f41 100644 --- a/cmake/KDE1InstallDirs.cmake.in +++ b/cmake/KDE1InstallDirs.cmake.in @@ -1,18 +1,18 @@ -set(KDE1_PREFIX "@CMAKE_INSTALL_PREFIX@") -set(KDE1_APPSDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/applnk") -set(KDE1_BINDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_BINDIR@") -set(KDE1_CGIDIR "${KDE1_PREFIX}/cgi-bin") -set(KDE1_CONFDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/config") -set(KDE1_DATADIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/apps") -set(KDE1_HTMLDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/doc/HTML") -set(KDE1_ICONDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/icons") -set(KDE1_INCLUDES "${KDE1_PREFIX}/@CMAKE_INSTALL_INCLUDEDIR@") -set(KDE1_LIBRARIES "${KDE1_PREFIX}/@CMAKE_INSTALL_LIBDIR@") -set(KDE1_LIBDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_LIBDIR@") -set(KDE1_LOCALE "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/locale") -set(KDE1_MIMEDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/mimelnk") -set(KDE1_MINIDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/icons/mini") -set(KDE1_PARTSDIR "${KDE1_PREFIX}/parts") -set(KDE1_SOUNDDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/sounds") -set(KDE1_TOOLBARDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/toolbar") -set(KDE1_WALLPAPERDIR "${KDE1_PREFIX}/@CMAKE_INSTALL_DATAROOTDIR@/wallpapers") +set(KDE1_PREFIX "@KDE1_PREFIX@") +set(KDE1_APPSDIR "@KDE1_APPSDIR@") +set(KDE1_BINDIR "@KDE1_BINDIR@") +set(KDE1_CGIDIR "@KDE1_CGIDIR@") +set(KDE1_CONFDIR "@KDE1_CONFDIR@") +set(KDE1_DATADIR "@KDE1_DATADIR@") +set(KDE1_HTMLDIR "@KDE1_HTMLDIR@") +set(KDE1_ICONDIR "@KDE1_ICONDIR@") +set(KDE1_INCLUDES "@KDE1_INCLUDES@") +set(KDE1_LIBRARIES "@KDE1_LIBRARIES@") +set(KDE1_LIBDIR "@KDE1_LIBDIR@") +set(KDE1_LOCALE "@KDE1_LOCALE@") +set(KDE1_MIMEDIR "@KDE1_MIMEDIR@") +set(KDE1_MINIDIR "@KDE1_MINIDIR@") +set(KDE1_PARTSDIR "@KDE1_PARTSDIR@") +set(KDE1_SOUNDDIR "@KDE1_SOUNDDIR@") +set(KDE1_TOOLBARDIR "@KDE1_TOOLBARDIR@") +set(KDE1_WALLPAPERDIR "@KDE1_WALLPAPERDIR@") diff --git a/common/config.h b/common/config.h.in similarity index 93% rename from common/config.h rename to common/config.h.in index ba4b0997..f4f5dca1 100644 --- a/common/config.h +++ b/common/config.h.in @@ -1,370 +1,370 @@ /* config.h. Generated automatically by configure. */ /* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE /* #undef _ALL_SOURCE */ #endif /* Define if using alloca.c. */ /* #undef C_ALLOCA */ /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define if you have alloca, as a function or macro. */ #define HAVE_ALLOCA 1 /* Define if you have and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* Define if you have a working `mmap' system call. */ /* #undef HAVE_MMAP */ /* Define as __inline if that's what the C compiler calls it. */ /* #undef inline */ /* Define if on MINIX. */ /* #undef _MINIX */ /* Define to `long' if doesn't define. */ /* #undef off_t */ /* Define if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define if you need to in order for stat and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define to `unsigned' if doesn't define. */ /* #undef size_t */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define if the C++ compiler supports BOOL */ #define HAVE_BOOL 1 /* defines if having libjpeg (always 1) */ #define HAVE_LIBJPEG 1 /* defines if having libtiff */ #define HAVE_LIBTIFF 1 /* defines if having libpng */ #define HAVE_LIBPNG 1 /* defines which to take for ksize_t */ #define ksize_t socklen_t /* define if you have setenv */ #define HAVE_FUNC_SETENV 1 /* Define to 1 if NLS is requested. */ #define ENABLE_NLS 1 /* Define if your locale.h file contains LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 /* Define if you have getdomainname */ #define HAVE_GETDOMAINNAME 1 /* Define if you have gethostname */ #define HAVE_GETHOSTNAME 1 /* Define if you have usleep */ #define HAVE_USLEEP 1 /* Define if you have random */ #define HAVE_RANDOM 1 /* Define if you have S_ISSOCK */ #define HAVE_S_ISSOCK 1 /* This is the prefix of the below paths. This may change in the future */ -#define KDEDIR "/opt/kde1" +#define KDEDIR "@KDE1_PREFIX@" /* Where your docs should go to. */ -#define KDE_HTMLDIR "/opt/kde1/share/doc/HTML" +#define KDE_HTMLDIR "@KDE1_HTMLDIR@" /* Where your application file (.kdelnk) should go to. */ -#define KDE_APPSDIR "/opt/kde1/share/applnk" +#define KDE_APPSDIR "@KDE1_APPSDIR@" /* Where your icon should go to. */ -#define KDE_ICONDIR "/opt/kde1/share/icons" +#define KDE_ICONDIR "@KDE1_ICONDIR@" /* Where your sound data should go to. */ -#define KDE_SOUNDDIR "/opt/kde1/share/sounds" +#define KDE_SOUNDDIR "@KDE1_SOUNDDIR@" /* Where you install application data. */ -#define KDE_DATADIR "/opt/kde1/share/apps" +#define KDE_DATADIR "@KDE1_DATADIR@" /* Where translation files should go to. */ -#define KDE_LOCALE "/opt/kde1/share/locale" +#define KDE_LOCALE "@KDE1_LOCALE@" /* Where cgi-bin executables should go to. */ -#define KDE_CGIDIR "/opt/kde1/cgi-bin" +#define KDE_CGIDIR "@KDE1_CGIDIR@" /* Where mimetypes should go to. */ -#define KDE_MIMEDIR "/opt/kde1/share/mimelnk" +#define KDE_MIMEDIR "@KDE1_MIMEDIR@" /* Where mimetypes should go to. */ -#define KDE_TOOLBARDIR "/opt/kde1/share/toolbar" +#define KDE_TOOLBARDIR "@KDE1_TOOLBARDIR@" /* Where general wallpapers should go to. */ -#define KDE_WALLPAPERDIR "/opt/kde1/share/wallpapers" +#define KDE_WALLPAPERDIR "@KDE1_WALLPAPERDIR@" /* Where binaries should be installed. */ -#define KDE_BINDIR "/opt/kde1/bin" +#define KDE_BINDIR "@KDE1_BINDIR@" /* Where KDE parts should be installed. */ -#define KDE_PARTSDIR "/opt/kde1/parts" +#define KDE_PARTSDIR "@KDE1_PARTSDIR@" /* Where KDE config files should be installed */ -#define KDE_CONFIGDIR "/opt/kde1/share/config" +#define KDE_CONFIGDIR "@KDE1_CONFDIR@" /* If the platform supports strdup */ #define HAVE_STRDUP 1 /* Define if you have an SGI like STL implementation */ #define HAVE_SGI_STL 1 /* Define if you have an HP like STL implementation */ /* #undef HAVE_HP_STL */ #ifndef HAVE_BOOL #define HAVE_BOOL typedef int bool; #ifdef __cplusplus const bool false = 0; const bool true = 1; #else #define false (bool)0; #define true (bool)1; #endif #endif /* this is needed for Solaris and others */ #ifndef HAVE_USLEEP #ifndef HAVE_USLEEP_DEFINED #define HAVE_USLEEP_DEFINED #ifdef __cplusplus extern "C" #endif void usleep(unsigned int usec); #endif #endif #ifndef HAVE_GETDOMAINNAME #ifndef HAVE_GETDOMAINNAME_DEFINED #define HAVE_GETDOMAINNAME_DEFINED #ifdef __cplusplus extern "C" #endif int getdomainname (char *Name, int Namelen); #endif #endif #ifndef HAVE_GETHOSTNAME #ifndef HAVE_GETHOSTNAME_DEFINED #define HAVE_GETHOSTNAME_DEFINED #ifdef __cplusplus extern "C" #endif int gethostname (char *Name, int Namelen); #endif #endif /* * This is needed for systems with broken headers that won't work with * gcc -ansi */ #ifndef HAVE_STRDUP #define kstrdup qstrdup #else #define kstrdup strdup #endif /* * This is an ugly little hack incase someone uses the inline keyword, * in a straight C file with AIX's xlc. */ #ifndef __AIX32 #ifndef __cplusplus #define inline __inline #endif #endif /* * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system * headers and I'm too lazy to write a configure test as long as only * unixware is related */ #ifdef _UNIXWARE #define HAVE_BOOLEAN #endif #ifndef HAVE_RANDOM #ifndef HAVE_RANDOM_DEFINED #define HAVE_RANDOM_DEFINED long int random(void); // defined in fakes.cpp void srandom(unsigned int seed); #endif #endif #ifndef HAVE_S_ISSOCK #define HAVE_S_ISSOCK #define S_ISSOCK(mode) (1==0) #endif /* Define if you have the __argz_count function. */ #define HAVE___ARGZ_COUNT 1 /* Define if you have the __argz_next function. */ #define HAVE___ARGZ_NEXT 1 /* Define if you have the __argz_stringify function. */ #define HAVE___ARGZ_STRINGIFY 1 /* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 /* Define if you have the getpagesize function. */ #define HAVE_GETPAGESIZE 1 /* Define if you have the munmap function. */ #define HAVE_MUNMAP 1 /* Define if you have the putenv function. */ #define HAVE_PUTENV 1 /* Define if you have the setegid function. */ #define HAVE_SETEGID 1 /* Define if you have the setenv function. */ #define HAVE_SETENV 1 /* Define if you have the seteuid function. */ #define HAVE_SETEUID 1 /* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 /* Define if you have the socket function. */ #define HAVE_SOCKET 1 /* Define if you have the stpcpy function. */ #define HAVE_STPCPY 1 /* Define if you have the strcasecmp function. */ #define HAVE_STRCASECMP 1 /* Define if you have the strchr function. */ #define HAVE_STRCHR 1 /* Define if you have the vsnprintf function. */ #define HAVE_VSNPRINTF 1 /* Define if you have the header file. */ #define HAVE_X11_EXTENSIONS_SHAPE_H 1 /* Define if you have the header file. */ #define HAVE_ALLOCA_H 1 /* Define if you have the header file. */ #define HAVE_ARGZ_H 1 /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define if you have the header file. */ #define HAVE_FNMATCH_H 1 /* Define if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define if you have the header file. */ #define HAVE_LINUX_SOCKET_H 1 /* Define if you have the header file. */ #define HAVE_LOCALE_H 1 /* Define if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define if you have the header file. */ /* #undef HAVE_NDIR_H */ /* Define if you have the header file. */ #define HAVE_NL_TYPES_H 1 /* Define if you have the header file. */ #define HAVE_PATHS_H 1 /* Define if you have the header file. */ /* #undef HAVE_SIGACTION_H */ /* Define if you have the header file. */ /* #undef HAVE_SOCKETBITS_H */ /* Define if you have the header file. */ #define HAVE_STRING_H 1 /* Define if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define if you have the header file. */ #define HAVE_SYS_CDEFS_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_DIR_H */ /* Define if you have the header file. */ /* #undef HAVE_SYS_NDIR_H */ /* Define if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYSENT_H */ /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define if you have the header file. */ #define HAVE_VALUES_H 1 /* Name of package */ #define PACKAGE "kdelibs" /* Version number of package */ #define VERSION "1.1.2.1" diff --git a/kdecore/kstddirs.cpp b/kdecore/kstddirs.cpp index fc4dfd80..8ea0aa9f 100644 --- a/kdecore/kstddirs.cpp +++ b/kdecore/kstddirs.cpp @@ -1,341 +1,341 @@ /* * kstddirs.cpp -- Implementation of class KStandardDirs. * Author: Sirtaj Singh Kang * Version: $Id: kstddirs.cpp,v 1.3 1998/11/01 10:37:49 bieker Exp $ * Generated: Thu Mar 5 16:05:28 EST 1998 */ #include"kstddirs.h" #include"config.h" #include #include #include #include #include #include -#define KDEDIR "/opt/kde" -#define KDEDIR_LEN 6 +#define KDEDIR KDE1_PREFIX +#define KDEDIR_LEN sizeof(KDE1_PREFIX) static const char *tokenize( QString& token, const char *str, const char *delim ); static const char *selectStr( const char *env, const char *builtin ); KStandardDirs::KStandardDirs( const char *appName ) : UserDir ( QDir::homeDirPath() ), KDEDir ( selectStr( "KDEDIR", KDEDIR ) ), _appPath( 0 ), _appName( new QString( appName ) ), _app ( new QDict ), _sysapp ( new QDict ), _sys ( new QDict ), _user ( new QDict ) { if( _app ) _app->setAutoDelete( true ); if( _sysapp ) _sysapp->setAutoDelete( true ); if( _sys ) _sys->setAutoDelete( true ); if( _user) _user->setAutoDelete( true ); } KStandardDirs::~KStandardDirs() { delete _app; delete _sysapp; delete _sys; delete _user; delete _appName; } QString KStandardDirs::findExe( const char *appname, const char *pathstr, bool ignore) { if( pathstr == 0 ) { pathstr = getenv( "PATH" ); } QString onepath; QFileInfo info; const char *p = pathstr; // split path using : or \b as delimiters while( (p = tokenize( onepath, p, ":\b") ) != 0 ) { onepath += "/"; onepath += appname; // Check for executable in this tokenized path info.setFile( onepath ); if( info.exists() && ( ignore || info.isExecutable() ) && info.isFile() ) { return onepath; } } // If we reach here, the executable wasn't found. // So return empty string. onepath = (const char *)0; return onepath; } int KStandardDirs::findAllExe( QStrList& list, const char *appname, const char *pathstr=0, bool ignore ) { if( pathstr == 0 ) { pathstr = getenv( "PATH" ); } QString onepath; QFileInfo info; const char *p = pathstr; list.clear(); // split path using : or \b as delimiters while( (p = tokenize( onepath, p, ":\b") ) != 0 ) { onepath += "/"; onepath += appname; // Check for executable in this tokenized path info.setFile( onepath ); if( info.exists() && (ignore || info.isExecutable()) && info.isFile() ) { list.append( onepath ); } } return list.count(); } const char *KStandardDirs::closest( DirScope method, const char *suffix ) const { CHECK_PTR( suffix ); CHECK_PTR( _app ); CHECK_PTR( _sys ); CHECK_PTR( _user ); const char *sys, *sysapp, *user, *app; QString *found = _user->find( suffix ); // check dict for previous full-string insertion if( found == 0 ) { // not already inserted, so insert them now. const char *realsuffix = suffix; if( !strncmp( suffix, "KDEDIR", KDEDIR_LEN ) ) { // remove prefix KDEDIR from path realsuffix += KDEDIR_LEN; } // system dir QString *name = new QString( KDEDir ); *name += realsuffix; sys = name->data(); const_cast(this)->_sys->insert( suffix, name ); // system app dir name = new QString( KDEDir ); name->detach(); *name += "/share/apps/"; *name += realsuffix; sysapp = name->data(); const_cast(this)->_sysapp->insert( suffix, name ); // user dir name = new QString( UserDir ); name->detach(); *name += "/.kde"; *name += realsuffix; user = name->data(); const_cast(this)->_user->insert( suffix, name ); // app dir name = new QString( UserDir ); name->detach(); *name += "/.kde/share/apps/"; *name += *_appName; *name += realsuffix; app = name->data(); const_cast(this)->_app->insert( suffix, name ); } else { // string's already in there user = found->data(); sys = _sys->find( suffix )->data(); sysapp = _sysapp->find( suffix )->data(); app = _app->find( suffix )->data(); } // return specific dirs switch( method ) { case User: return user; case System: return sys; case SysApp: return sysapp; case App: return app; default: break; } // find closest QFileInfo info( app ); // app if( info.isDir() ) { return app; } info.setFile( user ); // user if( info.isDir() ) { return user; } info.setFile( sysapp ); // sysapp if( info.isDir() ) { return sysapp; } return sys; // sys } const char *KStandardDirs::app( KStandardDirs::DirScope s ) const { if( _appPath == 0 ) { QString app( "/share/apps/" ); app += _appName->data(); const_cast(this)->_appPath = closest( s, app.data() ); } return _appPath; } const char *KStandardDirs::bin( DirScope s ) const { return closest( s, KDE_BINDIR ); } const char *KStandardDirs::cgi( DirScope s ) const { return closest( s, KDE_CGIDIR ); } const char *KStandardDirs::config( DirScope s ) const { return closest( s, KDE_CONFIGDIR ); } const char *KStandardDirs::apps( DirScope s ) const { return closest( s, KDE_DATADIR ); } const char *KStandardDirs::html( DirScope s ) const { return closest( s, KDE_HTMLDIR ); } const char *KStandardDirs::icon( DirScope s ) const { return closest( s, KDE_ICONDIR ); } const char *KStandardDirs::locale( DirScope s ) const { return closest( s, KDE_LOCALE ); } const char *KStandardDirs::mime( DirScope s ) const { return closest( s, KDE_MIMEDIR ); } const char *KStandardDirs::parts( DirScope s ) const { return closest( s, KDE_PARTSDIR ); } const char *KStandardDirs::toolbar( DirScope s ) const { return closest( s, KDE_TOOLBARDIR ); } const char *KStandardDirs::wallpaper( DirScope s ) const { return closest( s, KDE_WALLPAPERDIR ); } const char *KStandardDirs::sound( DirScope s ) const { return closest( s, KDE_SOUNDDIR ); } static const char *tokenize( QString& token, const char *str, const char *delim ) { token = ""; if( !str || !*str ) { return 0; } // find first non-delimiter character while( *str && strchr( delim, *str ) ) { str++; } if( !*str ) { return 0; } // find first delimiter or end, storing each non-qualifier into token while( *str && !strchr( delim, *str ) ) { token += *str; str++; } return str; } static const char *selectStr( const char *env, const char *builtin ) { const char *result = getenv( env ); if( result == 0 ) { result = builtin; } return result; } diff --git a/kdeui/CMakeLists.txt b/kdeui/CMakeLists.txt index 00f708aa..5f07486f 100644 --- a/kdeui/CMakeLists.txt +++ b/kdeui/CMakeLists.txt @@ -1,57 +1,57 @@ include_directories( ${QT_INCLUDE_DIR} ${KDELIBS_SOURCE_DIR}/kdecore ${KDELIBS_SOURCE_DIR}/kfile ) set(KDEUI_SRCS kledlamp.cpp kprogress.cpp kpanner.cpp kcolordlg.cpp kselect.cpp kdatepik.cpp kdatetbl.cpp kfontdialog.cpp kmsgbox.cpp kpopmenu.cpp ktabctl.cpp ktreelist.cpp kstatusbar.cpp ktopwidget.cpp ktmainwindow.cpp kmenubar.cpp ktoolbar.cpp kbutton.cpp kslider.cpp kseparator.cpp klined.cpp kcombo.cpp krestrictedline.cpp kintegerline.cpp kspinbox.cpp kcontrol.cpp kcolorbtn.cpp kiconloaderdialog.cpp kwmmapp.cpp kbuttonbox.cpp ktablistbox.cpp knewpanner.cpp keditcl1.cpp keditcl2.cpp ktoolboxmgr.cpp kled.cpp kdbtn.cpp knotebook.cpp ktabbar.cpp kwizard.cpp kcontainer.cpp kkeydialog.cpp kurllabel.cpp kruler.cpp kquickhelp.cpp kcursor.cpp) set(KDEUI_MOC kbutton.h kbuttonbox.h kcolorbtn.h kcolordlg.h kcombo.h kcontainer.h kcontrol.h kdatepik.h kdatetbl.h kdbtn.h keditcl.h kfontdialog.h kiconloaderdialog.h kintegerline.h kkeydialog.h kled.h kledlamp.h klined.h kmenubar.h kmsgbox.h knewpanner.h knotebook.h kpanner.h kpopmenu.h kprogress.h kquickhelp.h krestrictedline.h kruler.h kselect.h kslider.h kspinbox.h kstatusbar.h ktabbar.h ktabctl.h ktablistbox.h ktmainwindow.h ktoolbar.h ktoolboxmgr.h ktopwidget.h ktreelist.h kurllabel.h kwizard.h kwmmapp.h) qt1_wrap_moc(MOC_FILES ${KDEUI_MOC}) add_library(kdeui SHARED ${KDEUI_SRCS} ${MOC_FILES}) set_target_properties(kdeui PROPERTIES VERSION 2.0.0 SOVERSION 2) target_link_libraries(kdeui kdecore ${QT_LIBRARIES} ${X11_LIBRARIES}) install(TARGETS kdeui LIBRARY DESTINATION ${KDE1_LIBRARIES}) install(FILES kledlamp.h kprogress.h kpanner.h kcolordlg.h kselect.h kdatepik.h kdatetbl.h kfontdialog.h kmsgbox.h kpopmenu.h ktabctl.h ktreelist.h kstatusbar.h ktopwidget.h ktmainwindow.h ktoolbar.h kmenubar.h kbutton.h kslider.h kseparator.h klined.h kcombo.h krestrictedline.h kintegerline.h kspinbox.h kcolorbtn.h kiconloaderdialog.h kwmmapp.h kbuttonbox.h ktablistbox.h kcontainer.h knewpanner.h kcontrol.h keditcl.h ktoolboxmgr.h kled.h kdbtn.h knotebook.h ktabbar.h kwizard.h kkeydialog.h kurllabel.h kruler.h kquickhelp.h kcursor.h - DESTINATION ${KDE1_INCLUDES}) + DESTINATION include/kde1) install(FILES error.xpm exclamation.xpm info.xpm stopsign.xpm question.xpm arrow_up.xbm arrow_down.xbm arrow_left.xbm arrow_right.xbm - DESTINATION ${KDE1_DATADIR}/kde/pics) + DESTINATION share/kde/pics)