aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/help/libkvihelp.cpp
diff options
context:
space:
mode:
authorGravatar Noldor2011-03-13 12:20:32 +0000
committerGravatar Noldor2011-03-13 12:20:32 +0000
commitcba5b65658676e2817ef72bf2c6b66e42a801ca9 (patch)
tree2f1ab6a389bdfafd9e2ad41e684386a8b0a3d186 /src/modules/help/libkvihelp.cpp
parentFix the webView preview painting (diff)
downloadKVIrc-cba5b65658676e2817ef72bf2c6b66e42a801ca9.tar.gz
KVIrc-cba5b65658676e2817ef72bf2c6b66e42a801ca9.tar.bz2
KVIrc-cba5b65658676e2817ef72bf2c6b66e42a801ca9.zip
Code improvements in help window when using webkit(wip)
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5570 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/help/libkvihelp.cpp')
-rw-r--r--src/modules/help/libkvihelp.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/help/libkvihelp.cpp b/src/modules/help/libkvihelp.cpp
index 039d4fbef..d276f4a39 100644
--- a/src/modules/help/libkvihelp.cpp
+++ b/src/modules/help/libkvihelp.cpp
@@ -181,21 +181,34 @@ static bool help_kvs_cmd_open(KviKvsModuleCommandCall * c)
if(w)
{
+ #ifdef COMPILE_WEBKIT_SUPPORT
+ w->textBrowser()->load(QUrl::fromLocalFile(f.absoluteFilePath()));
+ #else
w->textBrowser()->setSource(QUrl::fromLocalFile(f.absoluteFilePath()));
+ #endif
return true;
}
}
if(c->switches()->find('m',"mdi"))
{
HelpWindow *w = new HelpWindow(c->window()->frame(),"Help browser");
+ #ifdef COMPILE_WEBKIT_SUPPORT
+ w->textBrowser()->load(QUrl::fromLocalFile(f.absoluteFilePath()));
+ #else
w->textBrowser()->setSource(QUrl::fromLocalFile(f.absoluteFilePath()));
+ #endif
c->window()->frame()->addWindow(w);
} else {
HelpWidget *w = new HelpWidget(c->window()->frame()->splitter(),
c->window()->frame(),true);
+ #ifdef COMPILE_WEBKIT_SUPPORT
+ w->textBrowser()->load(QUrl::fromLocalFile(f.absoluteFilePath()));
+ #else
w->textBrowser()->setSource(QUrl::fromLocalFile(f.absoluteFilePath()));
+ #endif
w->show();
}
+#include <QtWebKit/QWebView>
return true;
}
@@ -221,6 +234,7 @@ static bool help_module_init(KviModule * m)
KVSM_REGISTER_SIMPLE_COMMAND(m,"open",help_kvs_cmd_open);
+
return true;
}