Ralf Habacker schrieb: > Hi, > > there are several places in the kde code which needs a check if a path > is absolute. On unix this is mainly done by using > QString::startsWith('/'), which does not work as expected on windows. > > The only static method Qt provides to handle this platform independent > is QDir::isAbsolutePath(). Unfortunally this method seems to be very > time expensive because it creates a temporary QDir instance. One little correction: I fact QDir::isAbsolutePath() creates a QFileInfo instance instead of QDir but the problems still remains. qdir.h static bool isRelativePath(const QString &path); inline static bool isAbsolutePath(const QString &path) { return !isRelativePath(path); } qdir.cpp bool QDir::isRelativePath(const QString &path) { return QFileInfo(path).isRelative(); } Ralf _______________________________________________ Kde-windows mailing list Kde-windows@kde.org https://mail.kde.org/mailman/listinfo/kde-windows