summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore
Side-by-side diff
Diffstat (limited to 'microkde/kdecore') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/kstandarddirs.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index e1c78f6..75205d6 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -64,6 +64,6 @@ template class QDict<QStringList>;
#include <qtextedit.h>
-void ddd( QString op )
+void ddd( QString op )
{
static QTextEdit * dot = 0;
- if ( ! dot )
+ if ( ! dot )
dot = new QTextEdit();
@@ -93,5 +93,5 @@ static const char* const types[] = {"html", "icon", "apps", "sound",
"data", "locale", "services", "mime",
- "servicetypes", "config", "exe",
- "wallpaper", "lib", "pixmap", "templates",
- "module", "qtplugins",
+ "servicetypes", "config", "exe", "tmp",
+ "wallpaper", "lib", "pixmap", "templates",
+ "module", "qtplugins",
"xdgdata-apps", "xdgdata-dirs", "xdgconf-menu", 0 };
@@ -360,3 +360,3 @@ QString KStandardDirs::findResourceDir( const char *type,
#endif
- for (QStringList::ConstIterator it = candidates.begin(); it != candidates.end(); it++)
+ for (QStringList::ConstIterator it = candidates.begin(); it != candidates.end(); it++)
{
@@ -370,3 +370,3 @@ QString KStandardDirs::findResourceDir( const char *type,
qDebug("KStdDirs::findResDir(): can't find %s ", filename.latin1());
-
+
#endif
@@ -383,3 +383,3 @@ bool KStandardDirs::exists(const QString &fullPath)
if (fullPathInfo.isReadable())
- {
+ {
if (fullPath.at(fullPath.length() - 1) != '/') {
@@ -388,6 +388,6 @@ bool KStandardDirs::exists(const QString &fullPath)
return true;
- }
+ }
else {
-//US if (S_ISDIR( buff.st_mode ))
- if (fullPathInfo.isDir())
+//US if (S_ISDIR( buff.st_mode ))
+ if (fullPathInfo.isDir())
return true;
@@ -410,3 +410,3 @@ static void lookupDirectory(const QString& path, const QString &relPart,
QDir dp(QFile::encodeName(path));
-
+
if (!dp.exists())
@@ -428,6 +428,6 @@ static void lookupDirectory(const QString& path, const QString &relPart,
QStringList::Iterator it = direntries.begin();
-
+
while ( it != list.end() ) // for each file...
{
-
+
//US QString fn( QFile::decodeName(ep->d_name));
@@ -437,3 +437,3 @@ static void lookupDirectory(const QString& path, const QString &relPart,
break;
-
+
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~' )
@@ -451,3 +451,3 @@ static void lookupDirectory(const QString& path, const QString &relPart,
QString pathfn = path + fn;
-/*US
+/*US
if ( stat( QFile::encodeName(pathfn), &buff ) != 0 ) {
@@ -456,4 +456,4 @@ static void lookupDirectory(const QString& path, const QString &relPart,
}
-
- if ( recursive )
+
+ if ( recursive )
{
@@ -470,4 +470,4 @@ static void lookupDirectory(const QString& path, const QString &relPart,
}
-
- if ( recursive )
+
+ if ( recursive )
{
@@ -476,5 +476,5 @@ static void lookupDirectory(const QString& path, const QString &relPart,
}
-
-
-/*US
+
+
+/*US
if (!regexp.exactMatch(fn))
@@ -512,3 +512,3 @@ static void lookupDirectory(const QString& path, const QString &relPart,
return; // File not found
-
+
//US if ( S_ISREG( buff.st_mode))
@@ -558,4 +558,4 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
QDir dp(QFile::encodeName(prefix));
-
-//US if (!dp)
+
+//US if (!dp)
if (!dp.exists())
@@ -573,3 +573,3 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
QStringList::Iterator it = direntries.begin();
-
+
while ( it != list.end() ) // for each file...
@@ -579,3 +579,3 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
it++;
-
+
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == '~')
@@ -604,3 +604,3 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
if ( fnInfo.isDir() )
-
+
lookupPrefix(fn + '/', rest, rfn + '/', regexp, list, relList, recursive, uniq);
@@ -673,3 +673,3 @@ KStandardDirs::findAllResources( const char *type,
-QString
+QString
KStandardDirs::realPath(const QString &dirname)
@@ -734,3 +734,3 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
if (!candidates) { // filling cache
-/*US
+/*US
if (strcmp(type, "socket") == 0)
@@ -770,3 +770,3 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
prefixList = &prefixes;
-
+
for (QStringList::ConstIterator pit = prefixList->begin();
@@ -837,3 +837,3 @@ QString KStandardDirs::findExe( const QString& appname,
qDebug("KStandardDirs::findExe this is probably wrong");
-
+
info.setFile( p );
@@ -1009,3 +1009,3 @@ QString KStandardDirs::saveLocation(const char *type,
if (!dirs && (
- (strcmp(type, "socket") == 0) ||
+ (strcmp(type, "socket") == 0) ||
(strcmp(type, "tmp") == 0) ||
@@ -1032,13 +1032,13 @@ QString KStandardDirs::saveLocation(const char *type,
}
-
+
savelocations.insert(type, pPath);
}
-
+
QString fullPath = *pPath + suffix;
//US struct stat st;
-//US if (stat(QFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode)))
+//US if (stat(QFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode)))
QFileInfo fullPathInfo(QFile::encodeName(fullPath));
- if (fullPathInfo.isReadable() || !fullPathInfo.isDir())
-
-
+ if (fullPathInfo.isReadable() || !fullPathInfo.isDir())
+
+
{
@@ -1137,3 +1137,3 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
-
+
// we want an absolute path
@@ -1143,3 +1143,3 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
#endif
-
+
QString target = dir;
@@ -1167,3 +1167,3 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
//QMessageBox::information( 0,"cap111", base, 1 );
-/*US
+/*US
QCString baseEncoded = QFile::encodeName(base);
@@ -1176,3 +1176,3 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
(void)unlink(baseEncoded); // try removing
-
+
@@ -1183,4 +1183,4 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
}
-*/
-
+*/
+
if (dirObj.exists(base) == false)
@@ -1235,3 +1235,3 @@ void KStandardDirs::addKDEDefaults()
//US kdedirList.append(KDEDIR);
-//US for embedded, add qtopia dir as kdedir
+//US for embedded, add qtopia dir as kdedir
@@ -1248,3 +1248,3 @@ void KStandardDirs::addKDEDefaults()
QString localKdeDir;
-
+
//US if (getuid())
@@ -1277,3 +1277,3 @@ void KStandardDirs::addKDEDefaults()
//US localKdeDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.microkde/";
- qDebug("KStandardDirs::addKDEDefaults: 1 has to be fixed");
+ qDebug("KStandardDirs::addKDEDefaults: 1 has to be fixed");
}
@@ -1285,3 +1285,3 @@ void KStandardDirs::addKDEDefaults()
//US
-// qDebug("KStandardDirs::addKDEDefaults: localKdeDir=%s", localKdeDir.latin1());
+// qDebug("KStandardDirs::addKDEDefaults: localKdeDir=%s", localKdeDir.latin1());
if (localKdeDir != "-/")
@@ -1330,3 +1330,3 @@ void KStandardDirs::addKDEDefaults()
//US localXdgDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.config/";
- qDebug("KStandardDirs::addKDEDefaults: 2 has to be fixed");
+ qDebug("KStandardDirs::addKDEDefaults: 2 has to be fixed");
}
@@ -1362,3 +1362,3 @@ void KStandardDirs::addKDEDefaults()
}
-
+
xdgdirList.append("/usr/local/share/");
@@ -1384,3 +1384,3 @@ void KStandardDirs::addKDEDefaults()
//US localXdgDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.local/share/";
- qDebug("KStandardDirs::addKDEDefaults: 3 has to be fixed");
+ qDebug("KStandardDirs::addKDEDefaults: 3 has to be fixed");
}
@@ -1395,3 +1395,3 @@ void KStandardDirs::addKDEDefaults()
QString dir = KShell::tildeExpand(*it);
-
+
addXdgDataPrefix(dir);
@@ -1412,3 +1412,3 @@ void KStandardDirs::checkConfig() const
{
-/*US
+/*US
if (!addedCustoms && KGlobal::_instance && KGlobal::_instance->_config)
@@ -1441,3 +1441,3 @@ bool KStandardDirs::addCustomized(KConfig *config)
// to find entries that start with dir_$type
-/*US
+/*US
QMap<QString, QString> entries = config->entryMap("Directories");
@@ -1503,3 +1503,3 @@ void KStandardDirs::setAppDir( const QString &appDir )
- if ( mAppDir.right( 1 ) != "/" )
+ if ( mAppDir.right( 1 ) != "/" )
mAppDir += "/";
@@ -1508,4 +1508,4 @@ void KStandardDirs::setAppDir( const QString &appDir )
QString KStandardDirs::appDir()
-{
- return mAppDir;
+{
+ return mAppDir;
}
@@ -1525,3 +1525,3 @@ QString locateLocal( const char *type,
QString path = locateLocal(type, filename, true /*US, inst*/);
-
+
@@ -1539,3 +1539,3 @@ why not staying with the original directorystructure ?
-
+
QString escapedFilename = filename;
@@ -1549,3 +1549,3 @@ why not staying with the original directorystructure ?
*/
-//US so my proposal is this:
+//US so my proposal is this:
@@ -1560,9 +1560,9 @@ why not staying with the original directorystructure ?
#endif
-
+
//US Create the containing dir if needed
QFileInfo fi ( path );
-
+
// QString dir=pathurl.directory();
// QMessageBox::information( 0,"path", path, 1 );
-
+
#ifdef _WIN32_
@@ -1571,4 +1571,4 @@ why not staying with the original directorystructure ?
KStandardDirs::makeDir(fi.dirPath( true ));
-#endif
-
+#endif
+
qDebug("locate22: %s" , path.latin1());
@@ -1577,3 +1577,3 @@ why not staying with the original directorystructure ?
#endif
-
+
}
@@ -1602,3 +1602,3 @@ why not staying with the original directorystructure ?
-
+
QString escapedFilename = filename;
@@ -1612,3 +1612,3 @@ why not staying with the original directorystructure ?
*/
-//US so my proposal is this:
+//US so my proposal is this:
@@ -1622,3 +1622,3 @@ why not staying with the original directorystructure ?
#endif
-
+
//US Create the containing dir if needed
@@ -1632,4 +1632,4 @@ why not staying with the original directorystructure ?
KStandardDirs::makeDir(dir);
-#endif
-
+#endif
+
return path;