moved more to qbrowserlib, added download manager functions; refs #167
This commit is contained in:
341
src/qbrowserlib/downloadmanager.hxx
Normal file
341
src/qbrowserlib/downloadmanager.hxx
Normal file
@@ -0,0 +1,341 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#ifndef __DOWNLOAD_MANAGER_HXX
|
||||
#define __DOWNLOAD_MANAGER_HXX
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QtNetwork/QSslError>
|
||||
#include <QtNetwork/QSslConfiguration>
|
||||
#include <map>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
//! @addtogroup qbrowserlib
|
||||
//! @{
|
||||
namespace qbrowserlib {
|
||||
|
||||
class DownloadManager: public QObject {
|
||||
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
|
||||
//! Append a Network Manager
|
||||
DownloadManager& operator+=(QNetworkAccessManager* n) {
|
||||
TRC;
|
||||
assert(connect(n, SIGNAL(created(QNetworkReply*)),
|
||||
SLOT(add(QNetworkReply*))));
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! Append a Network Reply
|
||||
DownloadManager& operator+=(QNetworkReply* reply) {
|
||||
TRC;
|
||||
add(reply);
|
||||
return *this;
|
||||
}
|
||||
|
||||
static QString networkError(QNetworkReply::NetworkError err) {
|
||||
TRC_FN; LOG<<err;
|
||||
switch (err) {
|
||||
case QNetworkReply::NoError:
|
||||
return tr("Network connection successful, remote host can be"
|
||||
" reached.");
|
||||
case QNetworkReply::ConnectionRefusedError:
|
||||
return tr("The remote server refused the connection (the server is"
|
||||
" not accepting requests).");
|
||||
case QNetworkReply::RemoteHostClosedError:
|
||||
return tr("The remote server closed the connection prematurely,"
|
||||
" before the entire reply was received and processed.");
|
||||
case QNetworkReply::HostNotFoundError:
|
||||
return tr("The remote host name was not found (invalid hostname).");
|
||||
case QNetworkReply::TimeoutError:
|
||||
return tr("The connection to the remote server timed out.");
|
||||
case QNetworkReply::OperationCanceledError:
|
||||
return tr("The operation was canceled via calls to abort() or"
|
||||
" close() before it was finished.");
|
||||
case QNetworkReply::SslHandshakeFailedError:
|
||||
return tr("The SSL/TLS handshake failed and the encrypted channel"
|
||||
" could not be established. See SSL-Errors above.");
|
||||
case QNetworkReply::ProxyConnectionRefusedError:
|
||||
return tr("The connection to the proxy server was refused (the"
|
||||
" proxy server is not accepting requests).");
|
||||
case QNetworkReply::ProxyConnectionClosedError:
|
||||
return tr("The proxy server closed the connection prematurely,"
|
||||
" before the entire reply was received and processed.");
|
||||
case QNetworkReply::ProxyNotFoundError:
|
||||
return tr("The proxy host name was not found (invalid proxy"
|
||||
" hostname).");
|
||||
case QNetworkReply::ProxyTimeoutError:
|
||||
return tr("The connection to the proxy timed out or the proxy did"
|
||||
" not reply in time to the request sent.");
|
||||
case QNetworkReply::ProxyAuthenticationRequiredError:
|
||||
return tr("The proxy requires authentication in order to honour the"
|
||||
" request but did not accept any credentials offered"
|
||||
" (if any).");
|
||||
case QNetworkReply::ContentAccessDenied:
|
||||
return tr("The access to the remote content was denied (similar to"
|
||||
" HTTP error 401).");
|
||||
case QNetworkReply::ContentOperationNotPermittedError:
|
||||
return tr("The operation requested on the remote content is not"
|
||||
" permitted.");
|
||||
case QNetworkReply::ContentNotFoundError:
|
||||
return tr("The remote content was not found at the server (similar"
|
||||
" to HTTP error 404).");
|
||||
case QNetworkReply::AuthenticationRequiredError:
|
||||
return tr("The remote server requires authentication to serve the"
|
||||
" content but the credentials provided were not accepted"
|
||||
" (if any).");
|
||||
case QNetworkReply::ProtocolUnknownError:
|
||||
return tr("The Network Access API cannot honor the request because"
|
||||
" the protocol is not known.");
|
||||
case QNetworkReply::ProtocolInvalidOperationError:
|
||||
return tr("The requested operation is invalid for this protocol.");
|
||||
case QNetworkReply::UnknownNetworkError:
|
||||
return tr("An unknown network-related error was detected.");
|
||||
case QNetworkReply::UnknownProxyError:
|
||||
return tr("An unknown proxy-related error was detected.");
|
||||
case QNetworkReply::UnknownContentError:
|
||||
return tr("An unknonwn error related to the remote content was"
|
||||
" detected.");
|
||||
case QNetworkReply::ProtocolFailure:
|
||||
return tr("A breakdown in protocol was detected (parsing error,"
|
||||
" invalid or unexpected responses, etc.).");
|
||||
default:
|
||||
return tr("Unknown network error (code: %1).").arg(err);
|
||||
}
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
void progress(qint64 done, qint64 total);
|
||||
void started();
|
||||
void finished();
|
||||
void error(QString);
|
||||
void metaDataChanged(QNetworkReply*);
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
void add(QNetworkReply* reply) {
|
||||
TRC; LOG<<_downloads.size()<<reply->url().toString();
|
||||
LOG<<reply;
|
||||
_downloads[reply].progress = Progress(0, 0);
|
||||
assert(connect(reply, SIGNAL(downloadProgress(qint64, qint64)),
|
||||
SLOT(downloadProgress(qint64, qint64))));
|
||||
assert(connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
|
||||
SLOT(error(QNetworkReply::NetworkError))));
|
||||
assert(connect(reply, SIGNAL(destroyed(QObject*)),
|
||||
SLOT(slotDestroyed(QObject*))));
|
||||
assert(connect(reply, SIGNAL(finished()),
|
||||
SLOT(slotFinished())));
|
||||
assert(connect(reply, SIGNAL(metaDataChanged()),
|
||||
SLOT(slotMetaDataChanged())));
|
||||
assert(connect(reply, SIGNAL(sslErrors(const QList<QSslError>&)),
|
||||
SLOT(sslErrors(const QList<QSslError>&))));
|
||||
assert(connect(reply, SIGNAL(uploadProgress(qint64, qint64)),
|
||||
SLOT(uploadProgress(qint64, qint64))));
|
||||
if (_downloads.size()==1) started();
|
||||
}
|
||||
|
||||
void abort() {
|
||||
while (_downloads.size()) _downloads.begin()->first->abort();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void calcProgress() {
|
||||
//TRC;
|
||||
qint64 done(0);
|
||||
qint64 total(0);
|
||||
for (Downloads::iterator it(_downloads.begin());
|
||||
it!=_downloads.end(); ++it) {
|
||||
done += it->second.progress.first;
|
||||
total += it->second.progress.second;
|
||||
}
|
||||
progress(done, total);
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) {
|
||||
//TRC; LOG<<bytesReceived<<bytesTotal;
|
||||
_downloads[qobject_cast<QNetworkReply*>(sender())].progress.first
|
||||
= bytesReceived;
|
||||
_downloads[qobject_cast<QNetworkReply*>(sender())].progress.second
|
||||
= bytesTotal;
|
||||
calcProgress();
|
||||
}
|
||||
void error(QNetworkReply::NetworkError code) {
|
||||
TRC; LOG<<"Status:"<<networkError(code);
|
||||
QNetworkReply* reply(qobject_cast<QNetworkReply*>(sender()));
|
||||
_downloads[reply].error +=
|
||||
tr("<h1>Network Error</h1>"
|
||||
"<dl><dt>URL:</dt><dd>%1</dd>"
|
||||
"<dt>Error Code:</dt><dd>%3</dd>"
|
||||
"<dt>Error Details:</dt><dd>%2</dd></dl>")
|
||||
.arg(reply->url().toString())
|
||||
.arg(networkError(code))
|
||||
.arg(code);
|
||||
}
|
||||
void slotDestroyed(QObject* obj) {
|
||||
TRC; LOG<<_downloads.size();
|
||||
_downloads.erase((QNetworkReply*)obj);
|
||||
}
|
||||
void slotFinished() {
|
||||
TRC; LOG<<_downloads.size();
|
||||
QNetworkReply* reply(qobject_cast<QNetworkReply*>(sender()));
|
||||
if (_downloads[reply].error.size())
|
||||
error(_downloads[reply].error);
|
||||
_downloads.erase(reply);
|
||||
if (_downloads.size()==0) finished();
|
||||
}
|
||||
void slotMetaDataChanged() {
|
||||
TRC;
|
||||
QNetworkReply* reply(qobject_cast<QNetworkReply*>(sender()));
|
||||
if (!reply) return;
|
||||
LOG<<"Location:"<<reply->header(QNetworkRequest::LocationHeader)
|
||||
.toString();
|
||||
LOG<<"Content-Type:"<<reply->header(QNetworkRequest::ContentTypeHeader)
|
||||
.toString();
|
||||
LOG<<"Content-Disposition:"<<reply->rawHeader("Content-Disposition");
|
||||
LOG<<"Status:"<<networkError(reply->error());
|
||||
LOG<<"URL:"<<reply->url().toString();
|
||||
LOG<<"File:"<<reply->url().toLocalFile();
|
||||
LOG<<"Path:"<<reply->url().path();
|
||||
metaDataChanged(reply);
|
||||
}
|
||||
void sslErrors(const QList<QSslError> & errors) {
|
||||
TRC;
|
||||
QNetworkReply* reply(qobject_cast<QNetworkReply*>(sender()));
|
||||
for (QList<QSslError>::const_iterator err(errors.begin());
|
||||
err!=errors.end(); ++err) {
|
||||
LOG<<"SSL-Error: "<<(int)err->error()<<": "<<err->errorString();
|
||||
LOG<<"Certificate Issuer: "
|
||||
<<"O="
|
||||
<<err->certificate().issuerInfo(QSslCertificate::Organization)
|
||||
<<"CN="<<err->certificate().issuerInfo(QSslCertificate::CommonName)
|
||||
<<"L="
|
||||
<<err->certificate().issuerInfo(QSslCertificate::LocalityName)
|
||||
<<"OU="
|
||||
<<err->certificate()
|
||||
.issuerInfo(QSslCertificate::OrganizationalUnitName)
|
||||
<<"C="<<err->certificate().issuerInfo(QSslCertificate::CountryName)
|
||||
<<"ST="
|
||||
<<err->certificate()
|
||||
.issuerInfo(QSslCertificate::StateOrProvinceName);
|
||||
LOG<<"Certificate Subject: "
|
||||
<<"O="
|
||||
<<err->certificate().subjectInfo(QSslCertificate::Organization)
|
||||
<<"CN="
|
||||
<<err->certificate().subjectInfo(QSslCertificate::CommonName)
|
||||
<<"L="
|
||||
<<err->certificate().subjectInfo(QSslCertificate::LocalityName)
|
||||
<<"OU="
|
||||
<<err->certificate()
|
||||
.subjectInfo(QSslCertificate::OrganizationalUnitName)
|
||||
<<"C="
|
||||
<<err->certificate().subjectInfo(QSslCertificate::CountryName)
|
||||
<<"ST="
|
||||
<<err->certificate()
|
||||
.subjectInfo(QSslCertificate::StateOrProvinceName);
|
||||
LOG<<"Certificate:\n"<<err->certificate().toPem();
|
||||
switch (err->error()) {
|
||||
case QSslError::SelfSignedCertificate:
|
||||
case QSslError::SelfSignedCertificateInChain: {
|
||||
QSslConfiguration sslConfig
|
||||
(QSslConfiguration::defaultConfiguration());
|
||||
QList<QSslCertificate> certs(sslConfig.caCertificates());
|
||||
for (QList<QSslCertificate>::iterator cert(certs.begin());
|
||||
cert!=certs.end(); ++cert) {
|
||||
if (err->certificate().subjectInfo(QSslCertificate::CommonName)
|
||||
== cert->subjectInfo(QSslCertificate::CommonName)) {
|
||||
LOG<<"Found matching CN:"
|
||||
<<cert->subjectInfo(QSslCertificate::CommonName);
|
||||
if (err->certificate()==*cert) {
|
||||
LOG<<"QT-BUG! Certificate matches known certificate";
|
||||
//! @bug work around qt bug (Qt Mac 4.8.2)
|
||||
reply->ignoreSslErrors(errors);
|
||||
} else {
|
||||
LOG<<"CERTIFICATE ERROR! Certificates are different";
|
||||
}
|
||||
}
|
||||
}
|
||||
} break;
|
||||
default:; // ignore
|
||||
}
|
||||
_downloads[reply].error +=
|
||||
tr("<h1>SSL Error</h1>"
|
||||
"<dl><dt>URL:</dt><dd>%1</dd>"
|
||||
"<dt>Error Code:</dt><dd>%3</dd>"
|
||||
"<dt>Error Details:</dt><dd>%2</dd></dl>"
|
||||
"<table>"
|
||||
"<caption>Certificate Issuer</caption>"
|
||||
"<tr><th>Organization:</th><td>%4</td></tr>"
|
||||
"<tr><th>Common Name:</th><td>%5</td></tr>"
|
||||
"<tr><th>Location:</th><td>%6</td></tr>"
|
||||
"<tr><th>Organizational Unit:</th><td>%7</td></tr>"
|
||||
"<tr><th>Country:</th><td>%8</td></tr>"
|
||||
"<tr><th>State or Provive:</th><td>%9</td></tr>"
|
||||
"</table>"
|
||||
"<table>"
|
||||
"<caption>Certificate Subject</caption>"
|
||||
"<tr><th>Organization:</th><td>%10</td></tr>"
|
||||
"<tr><th>Common Name:</th><td>%11</td></tr>"
|
||||
"<tr><th>Location:</th><td>%12</td></tr>"
|
||||
"<tr><th>Organizational Unit:</th><td>%13</td></tr>"
|
||||
"<tr><th>Country:</th><td>%14</td></tr>"
|
||||
"<tr><th>State or Province:</th><td>%15</td></tr>"
|
||||
"</table>")
|
||||
.arg(reply->url().toString())
|
||||
.arg(err->errorString())
|
||||
.arg(err->error())
|
||||
.arg(err->certificate().issuerInfo(QSslCertificate::Organization))
|
||||
.arg(err->certificate().issuerInfo(QSslCertificate::CommonName))
|
||||
.arg(err->certificate().issuerInfo(QSslCertificate::LocalityName))
|
||||
.arg(err->certificate()
|
||||
.issuerInfo(QSslCertificate::OrganizationalUnitName))
|
||||
.arg(err->certificate().issuerInfo(QSslCertificate::CountryName))
|
||||
.arg(err->certificate()
|
||||
.issuerInfo(QSslCertificate::StateOrProvinceName))
|
||||
.arg(err->certificate().subjectInfo(QSslCertificate::Organization))
|
||||
.arg(err->certificate().subjectInfo(QSslCertificate::CommonName))
|
||||
.arg(err->certificate().subjectInfo(QSslCertificate::LocalityName))
|
||||
.arg(err->certificate()
|
||||
.subjectInfo(QSslCertificate::OrganizationalUnitName))
|
||||
.arg(err->certificate().subjectInfo(QSslCertificate::CountryName))
|
||||
.arg(err->certificate()
|
||||
.subjectInfo(QSslCertificate::StateOrProvinceName));
|
||||
}
|
||||
}
|
||||
|
||||
void uploadProgress(qint64 bytesSent, qint64 bytesTotal) {
|
||||
//TRC; LOG<<bytesSent<<bytesTotal;
|
||||
_downloads[qobject_cast<QNetworkReply*>(sender())].progress.first
|
||||
= bytesSent;
|
||||
_downloads[qobject_cast<QNetworkReply*>(sender())].progress.second
|
||||
= bytesTotal;
|
||||
calcProgress();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typedef std::pair<qint64, qint64> Progress;
|
||||
struct Download {
|
||||
Progress progress;
|
||||
QString error;
|
||||
};
|
||||
typedef std::map<QNetworkReply*, Download> Downloads;
|
||||
|
||||
Downloads _downloads;
|
||||
};
|
||||
|
||||
}
|
||||
//! @}
|
||||
|
||||
#endif
|
||||
59
src/qbrowserlib/errorlog.hxx
Normal file
59
src/qbrowserlib/errorlog.hxx
Normal file
@@ -0,0 +1,59 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id$
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#ifndef ERRORLOG_HXX
|
||||
#define ERRORLOG_HXX
|
||||
|
||||
#include <qbrowserlib/log.hxx>
|
||||
#include <qbrowserlib/ui_errorlog.h>
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
//! @addtogroup qbrowserlib
|
||||
//! @{
|
||||
|
||||
namespace qbrowserlib {
|
||||
|
||||
//! Collect and Show Errors
|
||||
/*! Singleton */
|
||||
class ErrorLog: public QDialog, protected Ui::ErrorLog {
|
||||
Q_OBJECT;
|
||||
Q_SIGNALS:
|
||||
void reset();
|
||||
public:
|
||||
//! Singleton
|
||||
static ErrorLog& instance(QWidget* p=0) {
|
||||
static ErrorLog _instance(p);
|
||||
return _instance;
|
||||
}
|
||||
private: // singleton
|
||||
ErrorLog(const ErrorLog&);
|
||||
ErrorLog(QWidget* p): QDialog(p) {
|
||||
TRC;
|
||||
setupUi(this);
|
||||
}
|
||||
public:
|
||||
void append(QString text) {
|
||||
TRC; LOG<<text;
|
||||
_errors->append(text);
|
||||
}
|
||||
protected Q_SLOTS:
|
||||
void on__buttons_clicked(QAbstractButton* button) {
|
||||
TRC;
|
||||
switch (_buttons->buttonRole(button)) {
|
||||
case QDialogButtonBox::ResetRole: {
|
||||
_errors->clear();
|
||||
reset();
|
||||
} break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//! @}
|
||||
|
||||
#endif
|
||||
67
src/qbrowserlib/errorlog.ui
Normal file
67
src/qbrowserlib/errorlog.ui
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ErrorLog</class>
|
||||
<widget class="QDialog" name="ErrorLog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>534</width>
|
||||
<height>353</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Error Log</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="_errors"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="_buttons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Reset</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>_buttons</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>ErrorLog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>_buttons</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>ErrorLog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -2,6 +2,14 @@
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="de_DE">
|
||||
<defaultcodec>UTF-8</defaultcodec>
|
||||
<context>
|
||||
<name>ErrorLog</name>
|
||||
<message>
|
||||
<location filename="errorlog.ui" line="14"/>
|
||||
<source>Error Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogDialog</name>
|
||||
<message>
|
||||
@@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::DownloadManager</name>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="48"/>
|
||||
<source>Network connection successful, remote host can be reached.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="51"/>
|
||||
<source>The remote server refused the connection (the server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="54"/>
|
||||
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="57"/>
|
||||
<source>The remote host name was not found (invalid hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="59"/>
|
||||
<source>The connection to the remote server timed out.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="61"/>
|
||||
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="64"/>
|
||||
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="67"/>
|
||||
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="70"/>
|
||||
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="73"/>
|
||||
<source>The proxy host name was not found (invalid proxy hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="76"/>
|
||||
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="79"/>
|
||||
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="83"/>
|
||||
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="86"/>
|
||||
<source>The operation requested on the remote content is not permitted.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="89"/>
|
||||
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="92"/>
|
||||
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="96"/>
|
||||
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="99"/>
|
||||
<source>The requested operation is invalid for this protocol.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="101"/>
|
||||
<source>An unknown network-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="103"/>
|
||||
<source>An unknown proxy-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="105"/>
|
||||
<source>An unknonwn error related to the remote content was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="108"/>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="111"/>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="178"/>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="273"/>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SaveOrRun</name>
|
||||
<message>
|
||||
@@ -695,7 +831,7 @@ Specify full path to executable program</source>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="69"/>
|
||||
<location filename="swisswebwidget.hxx" line="73"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="en_US">
|
||||
<defaultcodec>UTF-8</defaultcodec>
|
||||
<context>
|
||||
<name>ErrorLog</name>
|
||||
<message>
|
||||
<location filename="errorlog.ui" line="14"/>
|
||||
<source>Error Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogDialog</name>
|
||||
<message>
|
||||
@@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::DownloadManager</name>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="48"/>
|
||||
<source>Network connection successful, remote host can be reached.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="51"/>
|
||||
<source>The remote server refused the connection (the server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="54"/>
|
||||
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="57"/>
|
||||
<source>The remote host name was not found (invalid hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="59"/>
|
||||
<source>The connection to the remote server timed out.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="61"/>
|
||||
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="64"/>
|
||||
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="67"/>
|
||||
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="70"/>
|
||||
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="73"/>
|
||||
<source>The proxy host name was not found (invalid proxy hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="76"/>
|
||||
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="79"/>
|
||||
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="83"/>
|
||||
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="86"/>
|
||||
<source>The operation requested on the remote content is not permitted.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="89"/>
|
||||
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="92"/>
|
||||
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="96"/>
|
||||
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="99"/>
|
||||
<source>The requested operation is invalid for this protocol.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="101"/>
|
||||
<source>An unknown network-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="103"/>
|
||||
<source>An unknown proxy-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="105"/>
|
||||
<source>An unknonwn error related to the remote content was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="108"/>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="111"/>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="178"/>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="273"/>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SaveOrRun</name>
|
||||
<message>
|
||||
@@ -695,7 +831,7 @@ Specify full path to executable program</source>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="69"/>
|
||||
<location filename="swisswebwidget.hxx" line="73"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="fr_FR">
|
||||
<defaultcodec>UTF-8</defaultcodec>
|
||||
<context>
|
||||
<name>ErrorLog</name>
|
||||
<message>
|
||||
<location filename="errorlog.ui" line="14"/>
|
||||
<source>Error Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogDialog</name>
|
||||
<message>
|
||||
@@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::DownloadManager</name>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="48"/>
|
||||
<source>Network connection successful, remote host can be reached.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="51"/>
|
||||
<source>The remote server refused the connection (the server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="54"/>
|
||||
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="57"/>
|
||||
<source>The remote host name was not found (invalid hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="59"/>
|
||||
<source>The connection to the remote server timed out.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="61"/>
|
||||
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="64"/>
|
||||
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="67"/>
|
||||
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="70"/>
|
||||
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="73"/>
|
||||
<source>The proxy host name was not found (invalid proxy hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="76"/>
|
||||
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="79"/>
|
||||
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="83"/>
|
||||
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="86"/>
|
||||
<source>The operation requested on the remote content is not permitted.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="89"/>
|
||||
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="92"/>
|
||||
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="96"/>
|
||||
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="99"/>
|
||||
<source>The requested operation is invalid for this protocol.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="101"/>
|
||||
<source>An unknown network-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="103"/>
|
||||
<source>An unknown proxy-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="105"/>
|
||||
<source>An unknonwn error related to the remote content was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="108"/>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="111"/>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="178"/>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="273"/>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SaveOrRun</name>
|
||||
<message>
|
||||
@@ -695,7 +831,7 @@ Specify full path to executable program</source>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="69"/>
|
||||
<location filename="swisswebwidget.hxx" line="73"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="it_IT">
|
||||
<defaultcodec>UTF-8</defaultcodec>
|
||||
<context>
|
||||
<name>ErrorLog</name>
|
||||
<message>
|
||||
<location filename="errorlog.ui" line="14"/>
|
||||
<source>Error Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LogDialog</name>
|
||||
<message>
|
||||
@@ -629,6 +637,134 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::DownloadManager</name>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="48"/>
|
||||
<source>Network connection successful, remote host can be reached.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="51"/>
|
||||
<source>The remote server refused the connection (the server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="54"/>
|
||||
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="57"/>
|
||||
<source>The remote host name was not found (invalid hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="59"/>
|
||||
<source>The connection to the remote server timed out.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="61"/>
|
||||
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="64"/>
|
||||
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. See SSL-Errors above.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="67"/>
|
||||
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="70"/>
|
||||
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="73"/>
|
||||
<source>The proxy host name was not found (invalid proxy hostname).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="76"/>
|
||||
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="79"/>
|
||||
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="83"/>
|
||||
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="86"/>
|
||||
<source>The operation requested on the remote content is not permitted.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="89"/>
|
||||
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="92"/>
|
||||
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="96"/>
|
||||
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="99"/>
|
||||
<source>The requested operation is invalid for this protocol.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="101"/>
|
||||
<source>An unknown network-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="103"/>
|
||||
<source>An unknown proxy-related error was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="105"/>
|
||||
<source>An unknonwn error related to the remote content was detected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="108"/>
|
||||
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="111"/>
|
||||
<source>Unknown network error (code: %1).</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="178"/>
|
||||
<source><h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="downloadmanager.hxx" line="273"/>
|
||||
<source><h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Province:</th><td>%15</td></tr></table></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>qbrowserlib::SaveOrRun</name>
|
||||
<message>
|
||||
@@ -695,7 +831,7 @@ Specify full path to executable program</source>
|
||||
<context>
|
||||
<name>qbrowserlib::SwissWebWidget</name>
|
||||
<message>
|
||||
<location filename="swisswebwidget.hxx" line="69"/>
|
||||
<location filename="swisswebwidget.hxx" line="73"/>
|
||||
<source>Browser Tools</source>
|
||||
<comment>name of the browser's toolbar</comment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -34,18 +34,18 @@ TRANSLATIONS = @srcdir@/qbrowserlib_en.ts \
|
||||
|
||||
SOURCES = @srcdir@/log.cxx @srcdir@/certs.cxx
|
||||
|
||||
HEADERS = @srcdir@/log.hxx \
|
||||
HEADERS = @srcdir@/log.hxx @srcdir@/downloadmanager.hxx \
|
||||
@srcdir@/swisswebview.hxx @srcdir@/swisswebpage.hxx \
|
||||
@srcdir@/swisswebwidget.hxx \
|
||||
@srcdir@/pluginfactory.hxx @srcdir@/saveorrun.hxx \
|
||||
@srcdir@/settings.hxx \
|
||||
@srcdir@/settings.hxx @srcdir@/errorlog.hxx \
|
||||
@srcdir@/buttonlineedit.hxx \
|
||||
@srcdir@/filestorage.hxx @srcdir@/certs.hxx \
|
||||
@srcdir@/executor.hxx \
|
||||
@srcdir@/temporaryfile.hxx
|
||||
|
||||
FORMS = @srcdir@/saveorrun.ui @srcdir@/settings.ui @srcdir@/log.ui \
|
||||
@srcdir@/swisswebwidget.ui
|
||||
@srcdir@/swisswebwidget.ui @srcdir@/errorlog.ui
|
||||
|
||||
RESOURCES = languages.qrc
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#define __SWISSWEBWIDGET_HXX__
|
||||
|
||||
#include <qbrowserlib/ui_swisswebwidget.h>
|
||||
#include <qbrowserlib/downloadmanager.hxx>
|
||||
#include <qbrowserlib/errorlog.hxx>
|
||||
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QToolBar>
|
||||
@@ -43,9 +45,11 @@ namespace qbrowserlib {
|
||||
class SwissWebWidget: public QWidget, private Ui::SwissWebWidget {
|
||||
|
||||
Q_OBJECT;
|
||||
|
||||
|
||||
//..............................................................properties
|
||||
CREATE_QT_PROPERTY(QUrl, homeUrl);
|
||||
|
||||
//................................................................methods
|
||||
public:
|
||||
|
||||
SwissWebWidget(QWidget* p=0): QWidget(p) {
|
||||
@@ -87,12 +91,103 @@ namespace qbrowserlib {
|
||||
_webview->load(_homeUrl);
|
||||
}
|
||||
|
||||
void progress(qint64 total, qint64 done) {
|
||||
TRC;
|
||||
_progress->setMaximum(total);
|
||||
_progress->setValue(done);
|
||||
}
|
||||
|
||||
void started() {
|
||||
TRC;
|
||||
_abort->setVisible(true);
|
||||
_reload->setVisible(false);
|
||||
_progress->setRange(0, 0);
|
||||
_progress->setValue(0);
|
||||
_progress->setEnabled(true);
|
||||
_progress->show();
|
||||
}
|
||||
|
||||
void finished() {
|
||||
TRC;
|
||||
_abort->setVisible(false);
|
||||
_reload->setVisible(true);
|
||||
_progress->setRange(0, 1);
|
||||
_progress->setValue(1);
|
||||
_progress->setEnabled(false);
|
||||
}
|
||||
|
||||
void finished(QNetworkReply *r) {
|
||||
TRC;
|
||||
if (r->error()!=QNetworkReply::NoError &&
|
||||
r->error()!=QNetworkReply::OperationCanceledError) {
|
||||
// statusBar()->showMessage
|
||||
// (qbrowserlib::DownloadManager::networkError(r->error()));
|
||||
// badUrl();
|
||||
// if (!_showErrorLog) {
|
||||
// statusBar()->addPermanentWidget
|
||||
// ((_showErrorLog = new QPushButton(QIcon(":/icons/error"),
|
||||
// tr("errors", "show error log"))));
|
||||
// assert(connect(_showErrorLog, SIGNAL(clicked(bool)),
|
||||
// actionErrorLog, SLOT(trigger())));
|
||||
// }
|
||||
// _showErrorLog->show();
|
||||
}
|
||||
}
|
||||
|
||||
void metaDataChanged(QNetworkReply* reply) {
|
||||
TRC;
|
||||
QString filename
|
||||
(QString::fromUtf8(reply->rawHeader("Content-Disposition")));
|
||||
if (filename.contains
|
||||
(QRegExp("^\\s*attachment\\s*;\\s*filename\\s*=\\s*\"[^\"]+\""))) {
|
||||
LOG<<"From Content-Disposition";
|
||||
filename = filename.replace
|
||||
(QRegExp("^\\s*attachment\\s*;\\s*filename\\s*=\\s*\"([^\"]+)\".*"),
|
||||
"\\1");
|
||||
} else {
|
||||
LOG<<"From path";
|
||||
filename =
|
||||
QFileInfo(!reply->url().toLocalFile().isEmpty()
|
||||
?reply->url().toLocalFile()
|
||||
:reply->url().path()).fileName();
|
||||
}
|
||||
LOG<<"Filename:"<<filename;
|
||||
QStringList type
|
||||
(qbrowserlib::Settings::instance().mimetype
|
||||
(reply->header(QNetworkRequest::ContentTypeHeader).toString(),
|
||||
filename));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
void connects() {
|
||||
_downloadmanager+=_webview->page()->networkAccessManager();
|
||||
assert(connect(_webview->page()->networkAccessManager(),
|
||||
SIGNAL(finished(QNetworkReply*)),
|
||||
SLOT(finished(QNetworkReply*))));
|
||||
assert(connect(_url, SIGNAL(returnPressed()), SLOT(load())));
|
||||
assert(connect(_home, SIGNAL(pressed()), SLOT(goHome())));
|
||||
assert(connect(_abort, SIGNAL(pressed()),
|
||||
&_downloadmanager, SLOT(abort())));
|
||||
assert(connect(&_downloadmanager, SIGNAL(progress(qint64, qint64)),
|
||||
SLOT(progress(qint64, qint64))));
|
||||
assert(connect(&_downloadmanager, SIGNAL(started()),
|
||||
SLOT(started())));
|
||||
assert(connect(&_downloadmanager, SIGNAL(finished()),
|
||||
SLOT(finished())));
|
||||
assert(connect(&_downloadmanager, SIGNAL(error(QString)),
|
||||
&qbrowserlib::ErrorLog::instance(),
|
||||
SLOT(append(QString))));
|
||||
assert(connect(&_downloadmanager,
|
||||
SIGNAL(metaDataChanged(QNetworkReply*)),
|
||||
SLOT(metaDataChanged(QNetworkReply*))));
|
||||
}
|
||||
|
||||
//..............................................................variables
|
||||
protected:
|
||||
|
||||
void connects() {
|
||||
connect(_url, SIGNAL(returnPressed()), SLOT(load()));
|
||||
connect(_home, SIGNAL(pressed()), SLOT(goHome()));
|
||||
}
|
||||
qbrowserlib::DownloadManager _downloadmanager;
|
||||
QPushButton _showErrorLog;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user