]> git.lyx.org Git - features.git/commitdiff
don't reinvent the wheel
authorPeter Kümmel <syntheticpp@gmx.net>
Sat, 4 Oct 2008 15:57:26 +0000 (15:57 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sat, 4 Oct 2008 15:57:26 +0000 (15:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26729 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/FileName.cpp

index 5c95553a99ec3fc4c0c32f102de857c422265902..f101bba8925ea2354f11cd1e107514f4fb286a03 100644 (file)
@@ -121,23 +121,6 @@ struct FileName::Private
 #endif
        }
 
-       static QString longPathName(QString const & path)
-       {
-#ifndef Q_OS_WIN
-               return path;
-#else
-               if (path.isEmpty()) {
-                       return QString();
-               }
-               QString maybeShort = QDir::toNativeSeparators(path);
-               QByteArray shortName = maybeShort.toLocal8Bit();;
-               char longPath[MAX_PATH];
-               int err = GetLongPathName(shortName.constData(), longPath, MAX_PATH);
-               (void)err;
-               return QDir::fromNativeSeparators(QString::fromLocal8Bit(longPath));
-#endif
-       }
-
        ///
        QFileInfo fi;
 };
@@ -443,7 +426,7 @@ FileName FileName::getcwd()
 
 FileName FileName::tempPath()
 {
-       return FileName(fromqstr(Private::longPathName(QDir::tempPath())));
+       return FileName(os::internal_path(fromqstr(QDir::tempPath())));
 }