Changeset 794
- Timestamp:
- Oct 14, 2010, 6:12:21 PM (15 years ago)
- Location:
- trunk/src/corelib/io
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/io/qfsfileengine_iterator.cpp
r651 r794 72 72 } 73 73 74 74 75 QFileInfo QFSFileEngineIterator::currentFileInfo() const 75 76 { 76 77 return QAbstractFileEngineIterator::currentFileInfo(); 77 78 } 79 78 80 79 81 QT_END_NAMESPACE -
trunk/src/corelib/io/qfsfileengine_iterator_os2.cpp
r716 r794 42 42 ****************************************************************************/ 43 43 44 45 46 44 47 #include "qplatformdefs.h" 45 48 #include "qfsfileengine_iterator_p.h" … … 49 52 #include <QtCore/qvariant.h> 50 53 54 51 55 #include <dirent.h> 52 56 #include <unistd.h> 57 58 59 60 61 53 62 54 63 #ifndef QT_NO_FSFILEENGINE 55 64 56 65 QT_BEGIN_NAMESPACE 66 67 57 68 58 69 class QFSFileEngineIteratorPlatformSpecificData … … 76 87 }; 77 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 78 111 void QFSFileEngineIterator::advance() 79 112 { 113 114 80 115 currentEntry = platform->dirEntry ? QFile::decodeName(QByteArray(platform->dirEntry->d_name)) : QString(); 81 116 … … 99 134 #endif 100 135 } 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 101 158 } 102 159 … … 108 165 void QFSFileEngineIterator::deletePlatformSpecifics() 109 166 { 167 168 110 169 if (platform->dir) { 111 170 ::closedir(platform->dir); … … 115 174 #endif 116 175 } 176 177 178 179 180 181 182 183 117 184 delete platform; 118 185 platform = 0; … … 121 188 bool QFSFileEngineIterator::hasNext() const 122 189 { 190 123 191 if (!platform->done && !platform->dir) { 192 193 194 124 195 QFSFileEngineIterator *that = const_cast<QFSFileEngineIterator *>(this); 125 196 QString path = that->path(); … … 149 220 } 150 221 } 222 151 223 if (arc == ERROR_NOT_READY || arc == ERROR_DISK_CHANGE || 152 224 arc == ERROR_SECTOR_NOT_FOUND || arc == ERROR_INVALID_DRIVE) { 153 that->platform->dir = 0;154 225 that->platform->done = true; 226 155 227 } else if ((that->platform->dir = ::opendir(QFile::encodeName(path).data())) == 0) { 156 228 that->platform->done = true; … … 163 235 that->platform->mt_file = (dirent *)new char[maxPathName]; 164 236 #endif 165 166 237 that->advance(); 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 167 253 } 168 254 } 255 169 256 return !platform->done; 170 257 } 171 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 172 338 QT_END_NAMESPACE 173 339 -
trunk/src/corelib/io/qfsfileengine_os2.cpp
r793 r794 42 42 ****************************************************************************/ 43 43 44 45 46 44 47 #include "qplatformdefs.h" 45 48 #include "qabstractfileengine.h" … … 661 664 is_link = false; // drive/share names are never symlinks 662 665 } else { 666 667 668 663 669 QT_STATBUF st; // don't clobber our main one 664 670 that->is_link = (QT_LSTAT(nativeFilePath.constData(), &st) == 0) ? 665 671 S_ISLNK(st.st_mode) : false; 672 666 673 } 667 674 }
Note:
See TracChangeset
for help on using the changeset viewer.