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

List:       kde-commits
Subject:    playground/base/strigiplasmoid
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2007-04-02 15:14:12
Message-ID: 1175526852.355833.4254.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 649369 by alexmerry:

It now builds again.

Fixes:
* Now finds the JStreams library as installed by Strigi
* KInstance -> KComponentData
* EBN fixes
* Works with new Strigi API



 M  +3 -0      cmake/FindJStreams.cmake  
 M  +7 -7      src/jstream/jstream.cpp  
 M  +2 -2      src/jstream/jstream.h  
 M  +8 -8      src/jstream/kio_jstream_test.cpp  
 M  +1 -1      src/kickerapplet/strigiapplet.h  
 M  +1 -1      src/kickerapplet/strigilineedit.cpp  
 M  +1 -1      src/streamindexer/kfile/kfilethroughanalyzer.cpp  


--- trunk/playground/base/strigiplasmoid/cmake/FindJStreams.cmake #649368:649369
@@ -10,8 +10,11 @@
 FIND_PATH(JSTREAMS_INCLUDE_DIR streambase.h
   PATHS
   ${CMAKE_INSTALL_PREFIX}/include
+  ${CMAKE_INSTALL_PREFIX}/include/strigi
   /usr/include
+  /usr/include/strigi
   /usr/local/include
+  /usr/local/include/strigi
 )
 
 FIND_LIBRARY(JSTREAMS_LIBRARY NAMES streams
--- trunk/playground/base/strigiplasmoid/src/jstream/jstream.cpp #649368:649369
@@ -25,7 +25,7 @@
 // KDE
 #include <kmimetype.h>
 #include <kdebug.h>
-#include <kinstance.h>
+#include <kcomponentdata.h>
 // Qt
 #include <QFileInfo>
 #include <QDir>
@@ -33,7 +33,7 @@
 
 using namespace KIO;
 using namespace std;
-using namespace jstreams;
+using namespace Strigi;
 
 class QFileStreamOpener : public StreamOpener {
 public:
@@ -44,7 +44,7 @@
 StreamBase<char>*
 QFileStreamOpener::openStream(const string& url) {
     StreamBase<char>* stream = new FileInputStream(url.c_str());
-    if (stream->getStatus() != Ok) {
+    if (stream->status() != Ok) {
         delete stream;
         stream = 0;
     }
@@ -90,7 +90,7 @@
     string path = (const char*)url.path().toUtf8();
     if (path.size() && path[path.size()-1] == '/') path.resize(path.size()-1);
 
-    jstreams::StreamBase<char>* in = reader->openStream(path);
+    StreamBase<char>* in = reader->openStream(path);
     if (in == 0) {
         error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
         return;
@@ -133,7 +133,7 @@
         if (path.size() && path[path.size() - 1] == '/') {
             path.resize(path.size() - 1);
         }
-        DirLister dl = reader->getDirEntries(path);
+        DirLister dl = reader->dirEntries(path);
         EntryInfo e;
         if (dl.nextEntry(e)) {
             entry = QFileInfoToUDSEntry(f, true);
@@ -217,7 +217,7 @@
     if (path.size() && path[path.size() - 1] == '/') {
         path.resize(path.size() - 1);
     }
-    DirLister dl = reader->getDirEntries(path);
+    DirLister dl = reader->dirEntries(path);
     EntryInfo e;
     while (dl.nextEntry(e)) {
         kDebug(7182) << e.type << " " << e.filename.c_str();
@@ -232,7 +232,7 @@
 {
     int KDE_EXPORT kdemain(int argc, char **argv)
     {
-        KInstance instance( "kio_jstream" );
+        KComponentData componentData( "kio_jstream" );
         
         kDebug(7182) << "*** Starting kio_jstream " << endl;
         
--- trunk/playground/base/strigiplasmoid/src/jstream/jstream.h #649368:649369
@@ -24,7 +24,7 @@
 #include <kio/global.h>
 #include <kio/slavebase.h>
 
-namespace jstreams {
+namespace Strigi {
     class ArchiveReader;
 }
 class QFileStreamOpener;
@@ -32,7 +32,7 @@
 class kio_jstreamProtocol : public KIO::SlaveBase
 {
 private:
-    jstreams::ArchiveReader* reader;
+    Strigi::ArchiveReader* reader;
     QFileStreamOpener* opener;
 
     KIO::UDSEntry statQFileInfo(const QFileInfo& f) const;
--- trunk/playground/base/strigiplasmoid/src/jstream/kio_jstream_test.cpp \
#649368:649369 @@ -91,18 +91,18 @@
         error(KIO::ERR_SLAVE_DEFINED, i18n("The jstream URI is invalid: \
%1").arg(path));  return;
     }
-    jstreams::FileInputStream file(subpath.local8Bit());
-    if (file.getStatus() != jstreams::Ok) {
+    Strigi::FileInputStream file(subpath.local8Bit());
+    if (file.status() != Strigi::Ok) {
         error(KIO::ERR_SLAVE_DEFINED, i18n("Could not open file %1").arg(subpath));
         return;
     }
 
-    jstreams::StreamBase<char>* in = &file;
-    jstreams::SubStreamProviderProvider pp;
-    vector<jstreams::SubStreamProvider*> providers;
+    Strigi::StreamBase<char>* in = &file;
+    Strigi::SubStreamProviderProvider pp;
+    vector<Strigi::SubStreamProvider*> providers;
     while (subpath != path) {
         subpath += '/';
-        jstreams::SubStreamProvider* p = pp.getSubStreamProvider(in);
+        Strigi::SubStreamProvider* p = pp.subStreamProvider(in);
         if (p == 0) {
             in = 0;
             break;
@@ -111,11 +111,11 @@
         in = p->nextEntry();
         QString end = path.mid(subpath.length());
         while (in) {
-            if (p->getEntryInfo().type == jstreams::EntryInfo::Dir) {
+            if (p->entryInfo().type == Strigi::EntryInfo::Dir) {
                 in = p->nextEntry();
                 continue;
             }
-            QString name(p->getEntryInfo().filename.c_str());
+            QString name(p->entryInfo().filename.c_str());
             if (name.length() > 0 && end.startsWith(name)) {
                 if (name.endsWith("/")) {
                     subpath += name.left(name.length()-1);
--- trunk/playground/base/strigiplasmoid/src/kickerapplet/strigiapplet.h \
#649368:649369 @@ -66,7 +66,7 @@
      * @param parent The pointer to the parent widget handed over in the factory \
                function.
      * @param name A Qt object name for your applet.
      **/
-    StrigiApplet(const QString& configFile, Type t = Normal, int actions = 0,
+    explicit StrigiApplet(const QString& configFile, Type t = Normal, int actions = \
0,  QWidget *parent = 0, const char *name = 0);
     /** destructor */
     ~StrigiApplet();
--- trunk/playground/base/strigiplasmoid/src/kickerapplet/strigilineedit.cpp \
#649368:649369 @@ -143,7 +143,7 @@
 HitMenuItem*
 StrigiLineEdit::createHit(const jstreams::IndexedDocument& hit) const {
     // get the appropriate icon
-    QString iconname = \
KMimeType::mimeType(hit.mimetype.c_str())->icon(QString::null,0); +    QString \
iconname = KMimeType::mimeType(hit.mimetype.c_str())->icon(QString(),0);  QPixmap \
icon = strigiiconloader.loadIcon(iconname, KIcon::Panel);  
     // get the filename
--- trunk/playground/base/strigiplasmoid/src/streamindexer/kfile/kfilethroughanalyzer.cpp \
#649368:649369 @@ -53,7 +53,7 @@
  
         // Then create a new KFileMetaInfo object
         KFileMetaInfo info( KURL::fromPathOrURL( idx->getName().c_str() ),
-            QString::null,
+            QString(),
             KFileMetaInfo::TechnicalInfo|KFileMetaInfo::ContentInfo);
         // See: http://developer.kde.org/documentation/library/cvs-api/kdelibs-apidocs/kio/kio/html/classKFileMetaInfo.html
  


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

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