diff options
Diffstat (limited to 'WebKit/qt/QtLauncher')
-rw-r--r-- | WebKit/qt/QtLauncher/QtLauncher.pro | 5 | ||||
-rw-r--r-- | WebKit/qt/QtLauncher/main.cpp | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/WebKit/qt/QtLauncher/QtLauncher.pro b/WebKit/qt/QtLauncher/QtLauncher.pro index 5b10dea..133869c 100644 --- a/WebKit/qt/QtLauncher/QtLauncher.pro +++ b/WebKit/qt/QtLauncher/QtLauncher.pro @@ -10,4 +10,7 @@ QT += network macx:QT+=xml QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -symbian:TARGET.UID3 = 0xA000E543 +symbian { + TARGET.UID3 = 0xA000E543 + TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices +} diff --git a/WebKit/qt/QtLauncher/main.cpp b/WebKit/qt/QtLauncher/main.cpp index 8cc8a09..e3c6116 100644 --- a/WebKit/qt/QtLauncher/main.cpp +++ b/WebKit/qt/QtLauncher/main.cpp @@ -34,6 +34,7 @@ #include <qwebview.h> #include <qwebframe.h> #include <qwebsettings.h> +#include <qwebplugindatabase.h> #include <qwebelement.h> #include <qwebinspector.h> @@ -232,6 +233,16 @@ protected slots: formatMenuAction->setVisible(on); } + void dumpPlugins() { + QList<QWebPluginInfo> plugins = QWebSettings::pluginDatabase()->plugins(); + foreach (const QWebPluginInfo plugin, plugins) { + qDebug() << "Plugin:" << plugin.name(); + foreach (const QWebPluginInfo::MimeType mime, plugin.mimeTypes()) { + qDebug() << " " << mime.name; + } + } + } + void dumpHtml() { qDebug() << "HTML: " << view->page()->mainFrame()->toHtml(); } @@ -242,7 +253,7 @@ protected slots: QLineEdit::Normal, "a", &ok); if (ok && !str.isEmpty()) { - QList<QWebElement> result = view->page()->mainFrame()->findAllElements(str); + QWebElementCollection result = view->page()->mainFrame()->findAllElements(str); foreach (QWebElement e, result) e.setStyleProperty("background-color", "yellow"); statusBar()->showMessage(QString("%1 element(s) selected").arg(result.count()), 5000); @@ -292,7 +303,7 @@ private: QMenu *fileMenu = menuBar()->addMenu("&File"); QAction *newWindow = fileMenu->addAction("New Window", this, SLOT(newWindow())); #if QT_VERSION >= 0x040400 - fileMenu->addAction(tr("Print"), this, SLOT(print())); + fileMenu->addAction(tr("Print"), this, SLOT(print()), QKeySequence::Print); #endif QAction* screenshot = fileMenu->addAction("Screenshot", this, SLOT(screenshot())); fileMenu->addAction("Close", this, SLOT(close())); @@ -320,6 +331,7 @@ private: zoomTextOnly->setChecked(false); viewMenu->addSeparator(); viewMenu->addAction("Dump HTML", this, SLOT(dumpHtml())); + viewMenu->addAction("Dump plugins", this, SLOT(dumpPlugins())); QMenu *formatMenu = new QMenu("F&ormat", this); formatMenuAction = menuBar()->addMenu(formatMenu); |