mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-21 03:06:34 +01:00
Added "broken page" image to speed dial when loading fails.
+ updated translations
This commit is contained in:
parent
65f4bf1a1b
commit
4f8454a3d9
@ -19,5 +19,6 @@
|
|||||||
<file>html/loading.gif</file>
|
<file>html/loading.gif</file>
|
||||||
<file>html/reload.png</file>
|
<file>html/reload.png</file>
|
||||||
<file>html/qupzilla.ico</file>
|
<file>html/qupzilla.ico</file>
|
||||||
|
<file>html/broken-page.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -166,12 +166,18 @@ void SpeedDial::thumbnailCreated(const QPixmap &image)
|
|||||||
QString url = thumbnailer->url().toString();
|
QString url = thumbnailer->url().toString();
|
||||||
QString fileName = m_thumbnailsDir + QCryptographicHash::hash(url.toUtf8(), QCryptographicHash::Md4).toHex() + ".png";
|
QString fileName = m_thumbnailsDir + QCryptographicHash::hash(url.toUtf8(), QCryptographicHash::Md4).toHex() + ".png";
|
||||||
|
|
||||||
if (!image.save(fileName)) {
|
if (image.isNull()) {
|
||||||
qWarning() << "SpeedDial::thumbnailCreated Cannot save thumbnail to " << fileName;
|
fileName = "qrc:/html/broken-page.png";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!image.save(fileName)) {
|
||||||
|
qWarning() << "SpeedDial::thumbnailCreated Cannot save thumbnail to " << fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
fileName = QUrl::fromLocalFile(fileName).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_regenerateScript = true;
|
m_regenerateScript = true;
|
||||||
fileName = QUrl::fromLocalFile(fileName).toString();
|
|
||||||
|
|
||||||
for (int i = 0; i < m_webFrames.count(); i++) {
|
for (int i = 0; i < m_webFrames.count(); i++) {
|
||||||
QWebFrame* frame = m_webFrames.at(i).data();
|
QWebFrame* frame = m_webFrames.at(i).data();
|
||||||
|
@ -86,11 +86,16 @@ void PageThumbnailer::start()
|
|||||||
{
|
{
|
||||||
m_page->mainFrame()->load(m_url);
|
m_page->mainFrame()->load(m_url);
|
||||||
|
|
||||||
connect(m_page, SIGNAL(loadFinished(bool)), this, SLOT(createThumbnail()));
|
connect(m_page, SIGNAL(loadFinished(bool)), this, SLOT(createThumbnail(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PageThumbnailer::createThumbnail()
|
void PageThumbnailer::createThumbnail(bool status)
|
||||||
{
|
{
|
||||||
|
if (!status) {
|
||||||
|
emit thumbnailCreated(QPixmap());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QImage image(m_page->viewportSize(), QImage::Format_ARGB32);
|
QImage image(m_page->viewportSize(), QImage::Format_ARGB32);
|
||||||
QPainter painter(&image);
|
QPainter painter(&image);
|
||||||
m_page->mainFrame()->render(&painter);
|
m_page->mainFrame()->render(&painter);
|
||||||
|
@ -56,7 +56,7 @@ signals:
|
|||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createThumbnail();
|
void createThumbnail(bool status);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWebPage* m_page;
|
QWebPage* m_page;
|
||||||
|
@ -4384,7 +4384,7 @@ Po přidání či odstranění cest k certifikátům je nutné k projevení změ
|
|||||||
<translation>Hledat "%1 .." s %2</translation>
|
<translation>Hledat "%1 .." s %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>Bezejmenná stránka</translation>
|
<translation>Bezejmenná stránka</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4380,7 +4380,7 @@ Nachdem Speicherpfade hinzugefügt oder gelöscht wurden, muss QupZilla neu gest
|
|||||||
<translation>Suche "%1 .." mit %2</translation>
|
<translation>Suche "%1 .." mit %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>Unbekannte Seite</translation>
|
<translation>Unbekannte Seite</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4398,7 +4398,7 @@ Después de añadir o quitar rutas de certificados, es necesario reiniciar QupZi
|
|||||||
<translation>Buscar "%1 .." con %2</translation>
|
<translation>Buscar "%1 .." con %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>Página en blanco</translation>
|
<translation>Página en blanco</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4402,7 +4402,7 @@ Dopo l'aggiunta o la rimozione dei percorsi di certificazione, è necessari
|
|||||||
<translation>Cerca "%1 .." con %2</translation>
|
<translation>Cerca "%1 .." con %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>Pagina Senza Nome</translation>
|
<translation>Pagina Senza Nome</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4380,7 +4380,7 @@ Na het toevoegen of verwijderen van paden, is het noodzakelijk om de browser te
|
|||||||
<translation>Zoek "%1 .." met %2</translation>
|
<translation>Zoek "%1 .." met %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>Niet benoemde pagina</translation>
|
<translation>Niet benoemde pagina</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4467,7 +4467,7 @@ Nachdem Speicherpfade hinzugefügt oder gelöscht wurden, muss QupZilla neu gest
|
|||||||
<translation>Suche "%1 .." mit %2</translation>
|
<translation>Suche "%1 .." mit %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>Unbekannte Seite</translation>
|
<translation>Unbekannte Seite</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4377,7 +4377,7 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
|
|||||||
<translation>Hľadať "%1 .." s %2</translation>
|
<translation>Hľadať "%1 .." s %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>Nepomenovaná stránka</translation>
|
<translation>Nepomenovaná stránka</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4393,7 +4393,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
|
|||||||
<translation>使用 %2搜索"%1 .." </translation>
|
<translation>使用 %2搜索"%1 .." </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/webview/webview.cpp" line="887"/>
|
<location filename="../src/webview/webview.cpp" line="890"/>
|
||||||
<source>No Named Page</source>
|
<source>No Named Page</source>
|
||||||
<translation>无命名页面</translation>
|
<translation>无命名页面</translation>
|
||||||
</message>
|
</message>
|
||||||
|
Loading…
Reference in New Issue
Block a user