#include "dolphinsettings.h"
-#include <assert.h>
-#include <qdir.h>
-
#include <kbookmark.h>
#include <kbookmarkmanager.h>
#include <kcomponentdata.h>
-#include <kicontheme.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include "dolphin_iconsmodesettings.h"
#include "dolphin_detailsmodesettings.h"
-#include <Q3IconView>
-
DolphinSettings& DolphinSettings::instance()
{
static DolphinSettings* instance = 0;
//TODO: wow this is ugly. or .. is it? ;) we need a way to determine
// if a protocol is appropriate for use in a file manager. hum!
//if (KProtocolInfo::capabilities(*it).findIndex("filemanager") == -1)
+
+ // DF: why not just supportsListing?
+
if (KProtocolInfo::protocolClass(*it) == ":" ||
!KProtocolManager::supportsWriting(*it))
{
bool showHidden = urlNavigator()->showHiddenFiles();
while (it != itEnd) {
- QString name;
- //bool isDir = false;
- KIO::UDSEntry entry = *it;
-
- /* KDE3 reference:
- KIO::UDSEntry::const_iterator atomIt = entry.constBegin();
- KIO::UDSEntry::const_iterator atomEndIt = entry.constEnd();
-
- while (atomIt != atomEndIt) {
- switch ((*atomIt).m_uds) {
- case KIO::UDS_NAME:
- name = (*atomIt).m_str;
- break;
- case KIO::UDS_FILE_TYPE:
- isDir = S_ISDIR((*atomIt).m_long);
- break;
- default:
- break;
- }
- ++atomIt;
- }
- if (isDir) {
- m_subdirs.append(name);
- }
- */
-
+ const KIO::UDSEntry entry = *it;
if (entry.isDir()) {
- QString dir = entry.stringValue(KIO::UDS_NAME);
+ QString name = entry.stringValue(KIO::UDS_NAME);
- if (!showHidden || (dir != "." && dir != "..")) {
- m_subdirs.append(entry.stringValue(KIO::UDS_NAME));
+ if (!showHidden || (name != "." && name != "..")) {
+ m_subdirs.append(name);
}
}