diff --git a/kcms/kfontinst/dbus/FontInst.cpp b/kcms/kfontinst/dbus/FontInst.cpp --- a/kcms/kfontinst/dbus/FontInst.cpp +++ b/kcms/kfontinst/dbus/FontInst.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -426,12 +425,10 @@ static bool renameFontFile(const QString &from, const QString &to, int uid=-1, int gid=-1) { - QByteArray src(QFile::encodeName(from)), - dest(QFile::encodeName(to)); - - if(KDE_rename(src.data(), dest.data())) + if (!QFile::rename(from, to)) return false; + QByteArray dest(QFile::encodeName(to)); Misc::setFilePerms(dest); if(-1!=uid && -1!=gid) ::chown(dest.data(), uid, gid); diff --git a/kcms/kfontinst/dbus/Helper.cpp b/kcms/kfontinst/dbus/Helper.cpp --- a/kcms/kfontinst/dbus/Helper.cpp +++ b/kcms/kfontinst/dbus/Helper.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/kcms/kfontinst/kcmfontinst/FontList.cpp b/kcms/kfontinst/kcmfontinst/FontList.cpp --- a/kcms/kfontinst/kcmfontinst/FontList.cpp +++ b/kcms/kfontinst/kcmfontinst/FontList.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/kcms/kfontinst/kcmfontinst/GroupList.cpp b/kcms/kfontinst/kcmfontinst/GroupList.cpp --- a/kcms/kfontinst/kcmfontinst/GroupList.cpp +++ b/kcms/kfontinst/kcmfontinst/GroupList.cpp @@ -24,7 +24,6 @@ #include "GroupList.h" #include "FontList.h" #include -#include #include #include #include diff --git a/kcms/kfontinst/kio/KioFonts.cpp b/kcms/kfontinst/kio/KioFonts.cpp --- a/kcms/kfontinst/kio/KioFonts.cpp +++ b/kcms/kfontinst/kio/KioFonts.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -106,19 +105,19 @@ static int getSize(const QString &file) { - KDE_struct_stat buff; + QT_STATBUF buff; QByteArray f(QFile::encodeName(file)); - if(-1!=KDE_lstat(f.constData(), &buff)) + if(-1!=QT_LSTAT(f.constData(), &buff)) { if (S_ISLNK(buff.st_mode)) { char buffer2[1000]; int n=readlink(f.constData(), buffer2, 999); if(n!= -1) buffer2[n]='\0'; - if(-1==KDE_stat(f.constData(), &buff)) + if(-1==QT_STAT(f.constData(), &buff)) return -1; } return buff.st_size; @@ -359,7 +358,7 @@ QSet files; QString realPath; - KDE_struct_stat buff; + QT_STATBUF buff; bool multiple=false; for(; it!=end; ++it) @@ -408,15 +407,15 @@ QByteArray realPathC(QFile::encodeName(realPath)); KFI_DBUG << "real: " << realPathC; - if (-2==KDE_stat(realPathC.constData(), &buff)) + if (-2==QT_STAT(realPathC.constData(), &buff)) error(EACCES==errno ? KIO::ERR_ACCESS_DENIED : KIO::ERR_DOES_NOT_EXIST, url.toDisplayString()); else if (S_ISDIR(buff.st_mode)) error(KIO::ERR_IS_DIRECTORY, url.toDisplayString()); else if (!S_ISREG(buff.st_mode)) error(KIO::ERR_CANNOT_OPEN_FOR_READING, url.toDisplayString()); else { - int fd = KDE_open(realPathC.constData(), O_RDONLY); + int fd = QT_OPEN(realPathC.constData(), O_RDONLY); if (fd < 0) error(KIO::ERR_CANNOT_OPEN_FOR_READING, url.toDisplayString()); @@ -694,9 +693,9 @@ for(; it!=end; ++it) { QByteArray cPath(QFile::encodeName((*it).path())); - KDE_struct_stat buff; + QT_STATBUF buff; - if(-1!=KDE_lstat(cPath, &buff)) + if(-1!=QT_LSTAT(cPath, &buff)) { QString fileName(Misc::getFile((*it).path())), mt; diff --git a/kcms/kfontinst/lib/Misc.cpp b/kcms/kfontinst/lib/Misc.cpp --- a/kcms/kfontinst/lib/Misc.cpp +++ b/kcms/kfontinst/lib/Misc.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -223,18 +222,18 @@ time_t getTimeStamp(const QString &item) { - KDE_struct_stat info; + QT_STATBUF info; - return !item.isEmpty() && 0==KDE_lstat(QFile::encodeName(item), &info) ? info.st_mtime : 0; + return !item.isEmpty() && 0==QT_LSTAT(QFile::encodeName(item), &info) ? info.st_mtime : 0; } bool check(const QString &path, bool file, bool checkW) { - KDE_struct_stat info; + QT_STATBUF info; QByteArray pathC(QFile::encodeName(path)); - return 0==KDE_lstat(pathC, &info) && + return 0==QT_LSTAT(pathC, &info) && (file ? (S_ISREG(info.st_mode) || S_ISLNK(info.st_mode)) : S_ISDIR(info.st_mode)) && (!checkW || 0==::access(pathC, W_OK));