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

List:       kde-devel
Subject:    Re: kioslave implementation help
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2012-03-22 22:42:48
Message-ID: 1903886.IjbtdCUrk4 () xps
[Download RAW message or body]

El Dijous, 22 de març de 2012, a les 17:38:52, fluca1978@infinito.it va 
escriure:
> > Do you have the listing entry in your .protocol file?
> 
> The following is my protocol file:
> 
> [Protocol]
> DocPath=kioslave/kio_rolefs.html
> exec=kio_rolefs
> input=none
> output=filesystem
> protocol=rolefs
> reading=true
> Icon=folder
> listing=Name,Type
> 
> so I guess the listing entry is right. I've tried to change the list method
> to force emitting the folders (that I have saved into a QList):
> 
> void RoleFS::listDir( const KUrl& url ){
>   kDebug(7000) <<  "[Entering RoleFS::listDir] URL = " <<
> url.toMimeDataString();
> 
>   for( int i = 0; i < rootFolders.size(); i++ ){
>       KIO::UDSEntry& dirEntry = *(rootFolders.at( i ));
>     // emit a signal to list this entry
>     listEntry( dirEntry, true );
>   }
> 
>   //totalSize( rootFolders.size() );
>   data( QByteArray() );
>   finished();
>   kDebug(7000) <<  "[Exiting RoleFS::listDir]";
> }
> 
> However this still does not work. My get method is almost empty:
> 
> void RoleFS::get( const KUrl &url ){
>   kDebug(7000) <<  "[Entering RoleFS::get] URL = " <<
> url.toMimeDataString();
> 
>   finished(); // success
> 
> 
>   kDebug(7000) <<  "[Exiting RoleFS::get]";
> }
> 
> Am I doing something wrong?

Without looking at the code, don't know. But no, don't send me the code, you 
said yourself that you wanted to do something similar to what audiocd:/ does, 
so get the code of audiocd and start stripping it down and modifying it until 
it does what you want. And then you'll find the difference with yours.

Cheers,
  Albert

> 
> Thanks,
> Luca
> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
> >> <<

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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