connect(textEdit, SIGNAL(search()),
this, SLOT(searchSelected()));
+ QFile file(":/xsl/xsl.xsl");
+ if(!file.open(QFile::ReadOnly))
+ qDebug()<<"can't open a xslt file";
+ else
+ xslt=file.readAll();
}
textEdit->repaint(this->rect());
update(this->rect());
- emit updateSize();
+ Q_EMIT updateSize();
}
QString TranslationWidget::XslConversion(QString translation)
{
QXmlQuery myQuery(QXmlQuery::XSLT20);
myQuery.setFocus(translation);
-
- QFile file(":/xsl/xsl.xsl");
- if(!file.open(QFile::ReadOnly)){
- qDebug()<<"can't open a xslt file";
- return translation;
- }
- QString xslt;
- xslt=file.readAll();
myQuery.setQuery(xslt);
QString result("");
myQuery.evaluateTo(&result);
#ifdef Q_WS_MAEMO_5
hide();
#endif
- emit search(textEdit->textCursor().selectedText());
+ Q_EMIT search(textEdit->textCursor().selectedText());
}
#ifdef Q_WS_MAEMO_5