plasma dataengine question

Farhad Hedayati-Fard hf.farhad at gmail.com
Tue Mar 15 17:19:46 CET 2011


Hi!
I've written a translation dataengine... It needs 3 arguments to initialize 
the translator object ( plugin name, source language and destination 
language). I've put a Q_ASSERT on args.size() in dataengine's constructor but 
now I can't test my dataengine using plasmaengineexplorer because it crashes 
on the Q_ASSERT (no argument is passed to the constructor):

TranslatorEngine::TranslatorEngine(QObject* parent, const QVariantList& args): 
DataEngine(parent, args)
{
   Q_ASSERT(args.size() >= 3);
   QString from = args[0].toString();
   QString to = args[1].toString();
   QString name = args[2].toString();
   translator = new Translator((QWidget*)this, from, to, name);
   ....
}

What should I do to get this working??

Thanks in advance :)
Farhad


More information about the Plasma-devel mailing list