[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdegraphics/kuickshow/src
From:       David Faure <faure () kde ! org>
Date:       2004-11-22 16:05:16
Message-ID: 20041122160516.94CEC171E0 () office ! kde ! org
[Download RAW message or body]

CVS commit by faure: 

Yeah it's a hack, but it works


  M +4 -3      kuickshow.cpp   1.91


--- kdegraphics/kuickshow/src/kuickshow.cpp  #1.90:1.91
@@ -146,10 +146,11 @@ KuickShow::KuickShow( const char *name )
             KMimeType::Ptr mime = KMimeType::findByURL( url );
             QString name = mime->name();
-#if KDE_VERSION >= 310
             if ( name == "application/octet-stream" ) // unknown -> stat()
                 name = KIO::NetAccess::mimetype( url, this );
-#endif
 
-            if ( name.startsWith( "image/" ) )
+            // text/* is a hack for bugs.kde.org-attached-images urls.
+            // The real problem here is that NetAccess::mimetype does a HTTP HEAD, which doesn't
+            // always return the right mimetype. The rest of KDE start a get() instead....
+            if ( name.startsWith( "image/" ) || name.startsWith( "text/" ) )
             {
                 FileWidget::setImage( item, true );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic