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

List:       kde-commits
Subject:    KDE/kdepimlibs/kblog
From:       Christian Weilbach <christian () whiletaker ! homeip ! net>
Date:       2009-09-14 2:12:32
Message-ID: 1252894352.657140.13264.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1023160 by weilbach:

Fix the internal setCategories structure. Categories work now.


 M  +5 -3      movabletype.cpp  


--- trunk/KDE/kdepimlibs/kblog/movabletype.cpp #1023159:1023160
@@ -245,6 +245,7 @@
   unsigned int i = mCallCounter++;
   mCallMap[ i ] = post;
   mPublishAfterCategories[ i ] = publishAfterCategories;
+  QList<QVariant> catList;
   QList<QVariant> args( defaultArgs( post->postId() ) );
 
   // map the categoryId of the server to the name
@@ -252,12 +253,12 @@
   for( int j=0; j<categories.count(); j++ ){
      for( int k=0; k<mCategoriesList.count(); k++ ){
        if(mCategoriesList[k]["name"]==categories[j]){
-         kDebug() << "Matched category with name: " << categories[ j ];
+         kDebug() << "Matched category with name: " << categories[ j ] << " and id: \
" << mCategoriesList[ k ][ "categoryId" ];  QMap<QString,QVariant> category;
          //the first in the QStringList of post->categories()
          // is the primary category
-         category["categoryId"]=mCategoriesList[k]["categoryId"];
-         args<<QVariant(category);
+         category["categoryId"]=mCategoriesList[k]["categoryId"].toInt();
+         catList<<QVariant( category );
          break;
        }
        if(k==mCategoriesList.count()){
@@ -265,6 +266,7 @@
        }
      }
   }
+  args<<QVariant( catList );
 
   mXmlRpcClient->call(
     "mt.setPostCategories", args,


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

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