[Kst] branches/work/kst/kst1kde4/kst/src/datasources/qimagesource

Zongyi Zhang freebody.kst at gmail.com
Sat Feb 27 02:11:42 CET 2010


SVN commit 1096604 by zhang:

continue kst1kde4

 M  +8 -6      qimagesource.cpp  


--- branches/work/kst/kst1kde4/kst/src/datasources/qimagesource/qimagesource.cpp #1096603:1096604
@@ -241,10 +241,11 @@
   return rc;
 }
 
-//int understands_qimagesource(KConfig*, const QString& filename)
-int understands_qimagesource(KConfig*, const QString& filename, const QImage& _image) {
-  QString ftype( _image.QImage::format() );
 
+int understands_qimagesource(KConfig*, const QString& filename) {
+  QImage image(filename);
+  QString ftype( image.format() );
+
   if ( ftype.isEmpty() ) return 0;
 
   if ( ftype == "TIFF" ) {
@@ -256,10 +257,11 @@
 
 }
 
-//QStringList fieldList_qimagesource(KConfig*, const QString& filename, const QString& type, QString *typeSuggestion, bool *complete)
-QStringList fieldList_qimagesource(KConfig*, const QImage& _image, const QString& type, QString *typeSuggestion, bool *complete) {
+
+QStringList fieldList_qimagesource(KConfig*, const QString& filename, const QString& type, QString *typeSuggestion, bool *complete) {
   Q_UNUSED(type)
   QStringList fieldList;
+  QImage image(filename);
 
   if (complete) {
     *complete = true;
@@ -268,7 +270,7 @@
   if (typeSuggestion) {
     *typeSuggestion = "QImage compatible Image";
   }
-  if ( _image.QImage::format()) {
+  if (image.format()) {
     fieldList.append("INDEX");
     fieldList.append( "GRAY" );
     fieldList.append( "RED" );


More information about the Kst mailing list