summaryrefslogtreecommitdiff
path: root/src/rekonqpage/newtabpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rekonqpage/newtabpage.cpp')
-rw-r--r--src/rekonqpage/newtabpage.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/rekonqpage/newtabpage.cpp b/src/rekonqpage/newtabpage.cpp
index 3cd79326..845dcf51 100644
--- a/src/rekonqpage/newtabpage.cpp
+++ b/src/rekonqpage/newtabpage.cpp
@@ -59,16 +59,19 @@ NewTabPage::NewTabPage(QWebFrame *frame)
, m_url(KUrl())
{
QString htmlFilePath = KStandardDirs::locate("data", "rekonq/htmls/home.html");
+ QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics");
QFile file(htmlFilePath);
bool isOpened = file.open(QIODevice::ReadOnly);
if (!isOpened)
- kWarning() << "Couldn't open the home.html file";
-
- QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics");
-
- m_html = file.readAll();
- m_html.replace(QString("%2"), imagesPath);
+ {
+ kDebug() << "Couldn't open the home.html file";
+ }
+ else
+ {
+ m_html = file.readAll();
+ m_html.replace(QString("%2"), imagesPath);
+ }
}