Ignore:
Timestamp:
Sep 9, 2009, 1:54:31 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib/io, gui/dialogs: Handle DOS-like filesystem details (drives, slashes) on OS/2 similarly to Win32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/dialogs/qfilesystemmodel.cpp

    r2 r172  
    356356    QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
    357357    if ((pathElements.isEmpty())
    358 #if !defined(Q_OS_WIN) || defined(Q_OS_WINCE)
     358#if !defined(Q_OS_OS2) && (!defined(Q_OS_WIN) || defined(Q_OS_WINCE))
    359359        && QDir::fromNativeSeparators(longPath) != QLatin1String("/")
    360360#endif
     
    362362        return const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root);
    363363    QModelIndex index = QModelIndex(); // start with "My Computer"
    364 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
     364#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_OS2)
    365365    if (absolutePath.startsWith(QLatin1String("//"))) { // UNC path
    366366        QString host = QLatin1String("\\\\") + pathElements.first();
     
    401401    for (int i = 0; i < pathElements.count(); ++i) {
    402402        QString element = pathElements.at(i);
    403 #ifdef Q_OS_WIN
    404         // On Windows, "filename......." and "filename" are equivalent Task #133928
     403#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
     404        // On Windows and OS/2, "filename......." and "filename" are equivalent Task #133928
    405405        while (element.endsWith(QLatin1Char('.')))
    406406            element.chop(1);
     
    12661266    }
    12671267    QString fullPath = QDir::fromNativeSeparators(path.join(QDir::separator()));
    1268 #if !defined(Q_OS_WIN) || defined(Q_OS_WINCE)
     1268#if !defined(Q_OS_OS2) && (!defined(Q_OS_WIN) || defined(Q_OS_WINCE))
    12691269    if ((fullPath.length() > 2) && fullPath[0] == QLatin1Char('/') && fullPath[1] == QLatin1Char('/'))
    12701270        fullPath = fullPath.mid(1);
Note: See TracChangeset for help on using the changeset viewer.