Changeset 172 for trunk/src/gui
- Timestamp:
- Sep 9, 2009, 1:54:31 AM (16 years ago)
- Location:
- trunk/src/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/dialogs/qfiledialog.cpp
r2 r172 782 782 text.remove(current); 783 783 if (text.at(0) == QDir::separator() 784 #if def Q_OS_WIN785 //On Windows both cases can happen784 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 785 //On Windows and OS/2 both cases can happen 786 786 || text.at(0) == QLatin1Char('/') 787 787 #endif … … 3171 3171 QString pathCopy = QDir::toNativeSeparators(path); 3172 3172 QString sep = QDir::separator(); 3173 #if def Q_OS_WIN3173 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 3174 3174 if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\")) 3175 3175 return QStringList(pathCopy); … … 3183 3183 QRegExp re(QLatin1String("[") + QRegExp::escape(sep) + QLatin1String("]")); 3184 3184 3185 #if def Q_OS_WIN3185 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 3186 3186 QStringList parts = pathCopy.split(re, QString::SkipEmptyParts); 3187 3187 if (!doubleSlash.isEmpty() && !parts.isEmpty()) … … 3195 3195 #endif 3196 3196 3197 #if def Q_OS_WIN3197 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 3198 3198 bool startsFromRoot = !parts.isEmpty() && parts[0].endsWith(QLatin1Char(':')); 3199 3199 #else -
trunk/src/gui/dialogs/qfiledialog_p.h
r2 r172 100 100 QFSCompletor(QAbstractItemModel *model, QObject *parent = 0) : QCompleter(model, parent), proxyModel(0), sourceModel(0) 101 101 { 102 #if def Q_OS_WIN102 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 103 103 setCaseSensitivity(Qt::CaseInsensitive); 104 104 #endif … … 196 196 return MAX_PATH; 197 197 #endif //Q_OS_WINCE 198 #elif defined(Q_OS_OS2) 199 Q_UNUSED(path); 200 return CCHMAXPATH; 198 201 #else 199 202 Q_UNUSED(path); … … 296 299 bool fileNameLabelExplicitlySat; 297 300 QStringList nameFilters; 298 301 299 302 // Members for using native dialogs: 300 303 bool nativeDialogInUse; -
trunk/src/gui/dialogs/qfileinfogatherer.cpp
r2 r172 285 285 { 286 286 QString driveName = drive.absoluteFilePath(); 287 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)287 #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_OS2) 288 288 if (driveName.startsWith(QLatin1Char('/'))) // UNC host 289 289 return drive.fileName(); -
trunk/src/gui/dialogs/qfilesystemmodel.cpp
r2 r172 356 356 QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts); 357 357 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)) 359 359 && QDir::fromNativeSeparators(longPath) != QLatin1String("/") 360 360 #endif … … 362 362 return const_cast<QFileSystemModelPrivate::QFileSystemNode*>(&root); 363 363 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) 365 365 if (absolutePath.startsWith(QLatin1String("//"))) { // UNC path 366 366 QString host = QLatin1String("\\\\") + pathElements.first(); … … 401 401 for (int i = 0; i < pathElements.count(); ++i) { 402 402 QString element = pathElements.at(i); 403 #if def Q_OS_WIN404 // On Windows , "filename......." and "filename" are equivalent Task #133928403 #if defined(Q_OS_WIN) || defined(Q_OS_OS2) 404 // On Windows and OS/2, "filename......." and "filename" are equivalent Task #133928 405 405 while (element.endsWith(QLatin1Char('.'))) 406 406 element.chop(1); … … 1266 1266 } 1267 1267 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)) 1269 1269 if ((fullPath.length() > 2) && fullPath[0] == QLatin1Char('/') && fullPath[1] == QLatin1Char('/')) 1270 1270 fullPath = fullPath.mid(1); -
trunk/src/gui/util/qcompleter.cpp
r2 r172 135 135 To provide completions, QCompleter needs to know the path from an index. 136 136 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} 138 138 for list models and the absolute file path if the mode is a QDirModel. 139 139 … … 483 483 QString str = source->index(i, c->column).data().toString(); 484 484 if (str.startsWith(c->prefix, c->cs) 485 #if !defined(Q_OS_ WIN) || defined(Q_OS_WINCE)485 #if !defined(Q_OS_OS2) && (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) 486 486 && (!dirModel || QDir::toNativeSeparators(str) != QDir::separator()) 487 487 #endif … … 988 988 #ifndef QT_NO_DIRMODEL 989 989 if (qobject_cast<QDirModel *>(model)) { 990 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)990 #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_OS2) 991 991 setCaseSensitivity(Qt::CaseInsensitive); 992 992 #else … … 1621 1621 } while (idx.isValid()); 1622 1622 1623 #if !defined(Q_OS_ WIN) || defined(Q_OS_WINCE)1623 #if !defined(Q_OS_OS2) && (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) 1624 1624 if (list.count() == 1) // only the separator or some other text 1625 1625 return list[0]; … … 1655 1655 QString pathCopy = QDir::toNativeSeparators(path); 1656 1656 QString sep = QDir::separator(); 1657 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)1657 #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_OS2) 1658 1658 if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\")) 1659 1659 return QStringList(pathCopy); … … 1668 1668 QStringList parts = pathCopy.split(re); 1669 1669 1670 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)1670 #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_OS2) 1671 1671 if (!doubleSlash.isEmpty()) 1672 1672 parts[0].prepend(doubleSlash);
Note:
See TracChangeset
for help on using the changeset viewer.