[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/kioslave/man
From: David Faure <faure () kde ! org>
Date: 2008-06-17 10:21:07
Message-ID: 1213698067.257644.19854.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 821388 by dfaure:
Show folders for the manpage sections when listing man:/ in dolphin,
and support for listing those dirs (URL like "man:/(1)"). Fixes crashes when browsing man:/ in dolphin.
Patch by Stas Verberkt / LegolasV. Thanks!
BUG: 154173
M +23 -3 kio_man.cpp
--- trunk/KDE/kdebase/runtime/kioslave/man/kio_man.cpp #821387:821388
@@ -109,8 +109,15 @@
title = title.left(pos);
section = url.mid(pos+1);
- section = section.left(section.length()-1);
+ pos = section.indexOf(')');
+ if (pos >= 0) {
+ if (pos < section.length() - 2 && title.isEmpty()) {
+ title = section.mid(pos + 2);
+ }
+ section = section.left(pos);
+ }
+
// man:ls(2) -> title="ls", section="2"
return true;
@@ -1506,10 +1513,23 @@
return;
}
+ UDSEntryList uds_entry_list;
+
+ if (section.isEmpty()) {
+ for (QStringList::ConstIterator it = section_names.begin(); it != section_names.end(); ++it) {
+ UDSEntry uds_entry;
+
+ QString name = "man:/(" + *it + ")";
+ uds_entry.insert( KIO::UDSEntry::UDS_NAME, sectionName( *it ) );
+ uds_entry.insert( KIO::UDSEntry::UDS_URL, name );
+ uds_entry.insert( KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR );
+
+ uds_entry_list.append( uds_entry );
+ }
+ }
+
QStringList list = findPages( section, QString(), false );
- UDSEntryList uds_entry_list;
-
QStringList::Iterator it = list.begin();
const QStringList::Iterator end = list.end();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic