Changeset 172 for trunk/src/gui/dialogs
- Timestamp:
- Sep 9, 2009, 1:54:31 AM (16 years ago)
- Location:
- trunk/src/gui/dialogs
- Files:
-
- 4 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);
Note:
See TracChangeset
for help on using the changeset viewer.