Changeset 172 for trunk/src/gui/util


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/util/qcompleter.cpp

    r2 r172  
    135135    To provide completions, QCompleter needs to know the path from an index.
    136136    This is provided by pathFromIndex(). The default implementation of
    137     pathFromIndex(), returns the data for the \l{Qt::EditRole}{edit role} 
     137    pathFromIndex(), returns the data for the \l{Qt::EditRole}{edit role}
    138138    for list models and the absolute file path if the mode is a QDirModel.
    139139
     
    483483        QString str = source->index(i, c->column).data().toString();
    484484        if (str.startsWith(c->prefix, c->cs)
    485 #if !defined(Q_OS_WIN) || defined(Q_OS_WINCE)
     485#if !defined(Q_OS_)
    486486            && (!dirModel || QDir::toNativeSeparators(str) != QDir::separator())
    487487#endif
     
    988988#ifndef QT_NO_DIRMODEL
    989989    if (qobject_cast<QDirModel *>(model)) {
    990 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
     990#if )
    991991        setCaseSensitivity(Qt::CaseInsensitive);
    992992#else
     
    16211621    } while (idx.isValid());
    16221622
    1623 #if !defined(Q_OS_WIN) || defined(Q_OS_WINCE)
     1623#if !defined(Q_OS_)
    16241624    if (list.count() == 1) // only the separator or some other text
    16251625        return list[0];
     
    16551655    QString pathCopy = QDir::toNativeSeparators(path);
    16561656    QString sep = QDir::separator();
    1657 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
     1657#if )
    16581658    if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\"))
    16591659        return QStringList(pathCopy);
     
    16681668    QStringList parts = pathCopy.split(re);
    16691669
    1670 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
     1670#if )
    16711671    if (!doubleSlash.isEmpty())
    16721672        parts[0].prepend(doubleSlash);
Note: See TracChangeset for help on using the changeset viewer.