Ignore:
Timestamp:
Jul 19, 2011, 11:45:13 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib: QLibraryInfo: Return paths with native separators as on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/global/qlibraryinfo.cpp

    r900 r901  
    522522#ifdef BOOTSTRAPPING
    523523        QFileInfo fi(qmake_libraryInfoFile());
    524         return QDir::cleanPath(QDir(fi.absolutePath()).absoluteFilePath(ret));
     524        ret QDir::cleanPath(QDir(fi.absolutePath()).absoluteFilePath(ret));
    525525#else
    526526        QSettings *config = QLibraryInfoPrivate::configuration();
     
    529529            // the directory we load qt[sys].conf from
    530530            QFileInfo fi(config->fileName());
    531             return QDir::cleanPath(QDir(fi.absolutePath()).absoluteFilePath(ret));
     531            ret QDir::cleanPath(QDir(fi.absolutePath()).absoluteFilePath(ret));
    532532        } else {
    533533            // we make the prefix path absolute to the executable's directory
    534534            if (QCoreApplication::instance()) {
    535                 return QDir::cleanPath(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(ret));
     535                ret = QDir::cleanPath(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(ret));
     536            } else {
     537                ret = QDir::current().absoluteFilePath(ret);
    536538            }
    537             return QDir::current().absoluteFilePath(ret);
    538539        }
    539540#endif
    540     }
    541 
    542     // we make any other path absolute to the prefix directory
    543     return QDir::cleanPath(QDir(location(PrefixPath)).absoluteFilePath(ret));
    544 
    545 #else // #ifdef Q_OS_OS2
     541    } else {
     542        // we make any other path absolute to the prefix directory
     543        ret = QDir::cleanPath(QDir(location(PrefixPath)).absoluteFilePath(ret));
     544    }
     545
     546    return QDir::toNativeSeparators(ret);
     547
     548#else // Q_OS_OS2
    546549
    547550    if (QDir::isRelativePath(ret)) {
     
    575578    return QDir::cleanPath(ret);
    576579
    577 #endif // #ifdef Q_OS_OS2
     580#endif // Q_OS_OS2
    578581}
    579582
Note: See TracChangeset for help on using the changeset viewer.