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

List:       kde-commits
Subject:    kdebase/kioslave/thumbnail
From:       Rob Buis <rwlbuis () xs4all ! nl>
Date:       2003-08-24 10:00:41
[Download RAW message or body]

CVS commit by buis: 

<wildfox> use the iconengine for svg previews.


  A            configure.in.in   1.1
  M +16 -1     picturecreator.cpp   1.5


--- kdebase/kioslave/thumbnail/picturecreator.cpp  #1.4:1.5
@@ -20,4 +20,5 @@
 
 
+#include <config.h>
 
 #include <qpicture.h>
@@ -27,4 +28,5 @@
 
 #include "picturecreator.h"
+#include <ksvgiconengine.h>
 
 extern "C"
@@ -38,4 +40,16 @@ extern "C"
 bool PictureCreator::create(const QString &path, int width, int height, QImage &img)
 {
+#ifdef HAVE_LIBART
+        QImage *result = 0;
+        KSVGIconEngine engine;
+        if(engine.load(width, height, path))
+        {
+                result = engine.image();
+                img = result->copy();
+        }
+
+        delete result;
+        return result != 0;
+#else
     QPicture pict;
     if ( !pict.load(path,"svg") )
@@ -77,4 +91,5 @@ bool PictureCreator::create(const QStrin
     img = pix.convertToImage();
     return true;
+#endif
 }
 


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

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