Removed script error message support. Now it should return empty result if fails.

This commit is contained in:
Gres 2015-10-09 23:20:03 +03:00
parent 67a4c8e0ea
commit 6bacb14c56
3 changed files with 0 additions and 8 deletions

View File

@ -27,7 +27,6 @@ WebTranslator::WebTranslator ()
translationTimeout_.setSingleShot (true);
connect (&translationTimeout_, SIGNAL (timeout ()), SLOT (abortTranslation ()));
connect (proxy_, SIGNAL (error (QString)), SLOT (proxyError (QString)));
connect (proxy_, SIGNAL (translated (QString)), SLOT (proxyTranslated (QString)));
applySettings ();
@ -61,11 +60,6 @@ void WebTranslator::runScriptForItem (const ProcessingItem &item) {
view_->page ()->mainFrame ()->evaluateJavaScript ("translate();");
}
void WebTranslator::proxyError (const QString &message) {
emit error (message);
finishTranslation ();
}
void WebTranslator::proxyTranslated (const QString &text) {
if (!queue_.isEmpty () && queue_.first ().recognized == proxy_->sourceText ()) {
ProcessingItem &item = queue_.first ();

View File

@ -33,7 +33,6 @@ class WebTranslator : public QObject {
void replyFinished (QNetworkReply *reply);
void addProxyToView ();
void abortTranslation ();
void proxyError (const QString &message);
void proxyTranslated (const QString &text);
private:

View File

@ -25,7 +25,6 @@ class WebTranslatorProxy : public QObject {
signals:
void translated (const QString &text);
void error (const QString &message);
void resourceLoaded (const QString &url);