Ticket #205: foldernavigationwidget.diff
File foldernavigationwidget.diff, 1.1 KB (added by , 13 years ago) |
---|
-
foldernavigationwidget.cpp
80 80 private: 81 81 #if defined(Q_OS_UNIX) 82 82 const QVariant m_root; 83 #endif 84 #if defined(Q_OS_UNIX) || defined(Q_OS_OS2) 83 85 const QVariant m_dotdot; 84 86 #endif 85 87 const QVariant m_dot; … … 89 91 QSortFilterProxyModel(parent), 90 92 #if defined(Q_OS_UNIX) 91 93 m_root(QString(QLatin1Char('/'))), 94 #endif 95 #if defined(Q_OS_UNIX) || defined(Q_OS_OS2) 92 96 m_dotdot(QLatin1String("..")), 93 97 #endif 94 98 m_dot(QString(QLatin1Char('.'))) … … 102 106 if (sourceModel()->data(parent) == m_root && fileName == m_dotdot) 103 107 return false; 104 108 #endif 109 110 #if defined(Q_OS_OS2) 111 // Some (not all !!!) file systems on OS/2 report ".." as hidden entry in root 112 // directories. We disallow going up to "My computer" to achieve consitent behavior. 113 if (fileName == m_dotdot && QDir(sourceModel()->data(parent).toString()).isRoot()) 114 return false; 115 #endif 116 105 117 return fileName != m_dot; 106 118 } 107 119