[Nepomuk] Need help in solving an error occurred while dealing with Nepmuk
శ్రీ కాంత్ తియ్యగూర
srikanth.tulasiram at gmail.com
Fri Jul 8 04:09:25 CEST 2011
Hi all,
I am using Nepomuk for implementing it as a backend tool for krita
application. Here, I need to store (filenames,tags) as pairs and I want to
call this function in the destructor, so that at the end I can store the key
and value pairs. And below is the code I used and got the error.
I already asked this in my blog but again asking here thinking that I can
get better answer here. . . Sorry, if this mail causes you trouble :(
This is the *code* :
void KoResourceTagging::writeNepomukRepo()
{
qDebug() << ” I am in ;”;
QStringList resourceNames = m_tagRepo.uniqueKeys();
qDebug() << “Resource Names List : ” << resourceNames;
foreach(QString resourceName, resourceNames) {
qDebug() << ” Resource name : ” << resourceName ;
KUrl kurl(resourceName);
qDebug() << ” Kurl : ” << kurl.url();
Nepomuk::File resourceFile = Nepomuk::Resource(kurl).toFile();
qDebug() << “Resource File Created : ” << resourceFile.url().url();
QStringList tagNameList = m_tagRepo.values(resourceName);
qDebug() << ” Tag names : ” << tagNameList;
foreach(QString tagName, tagNameList) {
Nepomuk::Tag tag( “ResourceTag” );
tag.setLabel(tagName);
qDebug() << “Tag Created “;
resourceFile.addTag( tag );
qDebug() << “Resources tagged “;
}
}
}
And the *output* for this is
###
# This one is the output of brush resourceServer when it called
writeNepomukRepo()
###
I am in ;
Resource Names List :
(“/home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”,
“/home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”)
Resource name :
“/home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”
Kurl :
“file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”
Resource File Created :
“file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-eroded-cercle-anim.gih”
Tag names : (“a”)
QObject::startTimer: QTimer can only be used with threads started with
QThread
Tag Created
Resources tagged
Resource name :
“/home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”
Kurl :
“file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”
Resource File Created :
“file:///home/legend/krita-build/inst/share/apps/krita/brushes/A-wall-texture.gih”
Tag names : (“bricks”)
Tag Created
Resources tagged
###
# This one is the output of pattern resourceServer. It ends with this error.
###
I am in ;
Resource Names List :
(“/home/legend/krita-build/inst/share/apps/krita/patterns/choc_swirl.pat”,
“/home/legend/krita-build/inst/share/apps/krita/patterns/java.pat”,
“/home/legend/krita-build/inst/share/apps/krita/patterns/wood4.pat”)
Resource name :
“/home/legend/krita-build/inst/share/apps/krita/patterns/choc_swirl.pat”
Kurl :
“file:///home/legend/krita-build/inst/share/apps/krita/patterns/choc_swirl.pat”
Fatal Error: Accessed global static ‘Nepomuk::ResourceManagerHelper
*instanceHelper()’ after destruction. Defined at
../../nepomuk/core/resourcemanager.cpp:310
Aborted.
Regards
Srikanth Tiyyagura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20110708/21a698e5/attachment.htm
More information about the Nepomuk
mailing list