Changeset View
Changeset View
Standalone View
Standalone View
src/core/kfileitemlistproperties.cpp
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 75 | { | |||
---|---|---|---|---|---|
82 | m_isDirectory = initialValue; | 82 | m_isDirectory = initialValue; | ||
83 | m_isFile = initialValue; | 83 | m_isFile = initialValue; | ||
84 | m_isLocal = true; | 84 | m_isLocal = true; | ||
85 | m_mimeType.clear(); | 85 | m_mimeType.clear(); | ||
86 | m_mimeGroup.clear(); | 86 | m_mimeGroup.clear(); | ||
87 | 87 | | |||
88 | QFileInfo parentDirInfo; | 88 | QFileInfo parentDirInfo; | ||
89 | foreach (const KFileItem &item, items) { | 89 | foreach (const KFileItem &item, items) { | ||
90 | const QUrl url = item.url(); | 90 | bool isLocal = false; | ||
91 | m_isLocal = m_isLocal && url.isLocalFile(); | 91 | const QUrl url = item.mostLocalUrl(&isLocal); | ||
92 | m_isLocal = m_isLocal && isLocal; | ||||
92 | m_supportsReading = m_supportsReading && KProtocolManager::supportsReading(url); | 93 | m_supportsReading = m_supportsReading && KProtocolManager::supportsReading(url); | ||
93 | m_supportsDeleting = m_supportsDeleting && KProtocolManager::supportsDeleting(url); | 94 | m_supportsDeleting = m_supportsDeleting && KProtocolManager::supportsDeleting(url); | ||
94 | m_supportsWriting = m_supportsWriting && KProtocolManager::supportsWriting(url) && item.isWritable(); | 95 | m_supportsWriting = m_supportsWriting && KProtocolManager::supportsWriting(url) && item.isWritable(); | ||
95 | m_supportsMoving = m_supportsMoving && KProtocolManager::supportsMoving(url); | 96 | m_supportsMoving = m_supportsMoving && KProtocolManager::supportsMoving(url); | ||
96 | 97 | | |||
97 | // For local files we can do better: check if we have write permission in parent directory | 98 | // For local files we can do better: check if we have write permission in parent directory | ||
98 | // TODO: if we knew about the parent KFileItem, we could even do that for remote protocols too | 99 | // TODO: if we knew about the parent KFileItem, we could even do that for remote protocols too | ||
99 | #ifndef Q_OS_WIN | 100 | #ifndef Q_OS_WIN | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |