[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/kio
From: David Faure <faure () kde ! org>
Date: 2007-07-04 23:31:10
Message-ID: 1183591870.279283.15763.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 683564 by dfaure:
Fix diagnoseMimeType bug found in kde4 by aacid: it included trailing spaces due to \
the padding done internally in ksycoca.
M +1 -1 kio/kservicetypefactory.cpp
M +9 -0 tests/kmimetypetest.cpp
--- branches/KDE/3.5/kdelibs/kio/kio/kservicetypefactory.cpp #683563:683564
@@ -156,7 +156,7 @@
// don't return newServiceType - there may be an "other" pattern that
// matches best this file, like *.tar.bz
if (match)
- *match = "*."+pattern;
+ *match = "*."+pattern.stripWhiteSpace();
break; // but get out of the fast patterns
}
else
--- branches/KDE/3.5/kdelibs/kio/tests/kmimetypetest.cpp #683563:683564
@@ -63,5 +63,14 @@
checkIcon( "trash:/foo/", "folder" );
}
+ QString pdf;
+ KMimeType::diagnoseFileName("foo.pdf", pdf);
+ qDebug("extension: '%s'", pdf.latin1());
+ assert(pdf == QString("*.pdf"));
+ QString ps;
+ KMimeType::diagnoseFileName("foo.ps", ps);
+ qDebug("extension: '%s'", ps.latin1());
+ assert(ps == QString("*.ps"));
+
return 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic