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

List:       kde-commits
Subject:    extragear/office/tellico/src
From:       Robby Stephenson <robby () periapsis ! org>
Date:       2010-09-08 5:54:03
Message-ID: 20100908055403.0A254AC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1172889 by rstephenson:

add unit test for using gcstar plugin as fetcher

 M  +7 -7      fetch/gcstarpluginfetcher.cpp  
 M  +3 -0      tests/CMakeLists.txt  
 A             tests/gcstarfetchertest.cpp   [License: GPL (v2/3)]
 A             tests/gcstarfetchertest.h   [License: GPL (v2/3)]
 M  +4 -0      tests/tellicotest.config  


--- trunk/extragear/office/tellico/src/fetch/gcstarpluginfetcher.cpp #1172888:1172889
@@ -71,7 +71,7 @@
             int x = versionRx.cap(1).toInt();
             int y = versionRx.cap(2).toInt();
             int z = versionRx.cap(3).toInt(); // ok to be empty
-            myDebug() << QString::fromLatin1("GCstarPluginFetcher() - found \
%1.%2.%3").arg(x).arg(y).arg(z); +            myDebug() << QString::fromLatin1("found \
%1.%2.%3").arg(x).arg(y).arg(z);  // --list-plugins argument was added for 1.3 \
release  pluginParse = (x >= 1 && y >=3) ? New : Old;
           }
@@ -212,6 +212,12 @@
 }
 
 void GCstarPluginFetcher::search() {
+  if(m_plugin.isEmpty() || m_collType == -1) {
+    myWarning() << "no plugin information!";
+    stop();
+    return;
+  }
+
   m_started = true;
   m_data.clear();
 
@@ -224,12 +230,6 @@
 
   QString gcstarCollection = gcstarType(m_collType);
 
-  if(m_plugin.isEmpty()) {
-    myWarning() << "no plugin name! ";
-    stop();
-    return;
-  }
-
   m_process = new KProcess(this);
   connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(slotData()));
   connect(m_process, SIGNAL(readyReadStandardError()), SLOT(slotError()));
--- trunk/extragear/office/tellico/src/tests/CMakeLists.txt #1172888:1172889
@@ -122,6 +122,9 @@
     TARGET_LINK_LIBRARIES(freebasefetchertest fetch ${TELLICO_TEST_LIBS})
 ENDIF( QJSON_FOUND )
 
+KDE4_ADD_UNIT_TEST(gcstarfetchertest NOGUI gcstarfetchertest.cpp)
+TARGET_LINK_LIBRARIES(gcstarfetchertest fetch ${TELLICO_TEST_LIBS})
+
 KDE4_ADD_UNIT_TEST(giantbombfetchertest NOGUI giantbombfetchertest.cpp)
 TARGET_LINK_LIBRARIES(giantbombfetchertest fetch ${TELLICO_TEST_LIBS})
 
--- trunk/extragear/office/tellico/src/tests/tellicotest.config #1172888:1172889
@@ -1,2 +1,6 @@
 [IMDB]
 Custom Fields=alttitle
+
+[GCstar Video]
+CollectionType=3
+Plugin=IMDb
\ No newline at end of file


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

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