1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Fixed crash on some pages with flash content and click2flash plugin

enabled
This commit is contained in:
nowrep 2011-05-04 18:22:54 +02:00
parent 4924f91f0e
commit 1f9d08ea73
4 changed files with 11 additions and 4 deletions

View File

@ -18,6 +18,7 @@
#ifndef MAINAPPLICATION_H
#define MAINAPPLICATION_H
#define mApp MainApplication::getInstance()
#define mStyle MainApplication::appStyle
#include <QToolBar>
#include <QWebSettings>
@ -43,6 +44,7 @@ class DownloadManager;
class AutoFillModel;
class DesktopNotificationsFactory;
class IconProvider;
class Style;
class MainApplication : public QtSingleApplication
{
@ -88,6 +90,8 @@ public:
DesktopNotificationsFactory* desktopNotifications();
IconProvider* iconProvider() { return m_iconProvider; }
static Style* appStyle;
public slots:
bool saveStateSlot();
void quitApplication();

View File

@ -154,7 +154,7 @@ void LocationBar::rssIconClicked()
void LocationBar::showUrl(const QUrl &url, bool empty)
{
if (url.isEmpty() && empty)
if (hasFocus() || (url.isEmpty() && empty))
return;
if (url.toEncoded()!=text()) {

View File

@ -61,7 +61,6 @@ ClickToFlash::ClickToFlash(const QUrl &pluginUrl, const QStringList &argumentNam
return;
}
}
QHBoxLayout* horizontalLayout;
QFrame* frame;
QHBoxLayout* horizontalLayout_2;
@ -112,7 +111,7 @@ void ClickToFlash::hideAdBlocked()
findElement();
if (!m_element.isNull()) {
m_element.setAttribute("style", "display:none;");
deleteLater();
//deleteLater(); //Well, it should be there, but therefore it sometimes crashes
}
}

View File

@ -27,11 +27,15 @@ WebPluginFactory::WebPluginFactory(QObject* parent)
QObject* WebPluginFactory::create(const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const
{
if (mimeType.isEmpty())
return 0;
if (mimeType != "application/x-shockwave-flash") {
if (mimeType != "application/futuresplash")
qDebug() << mimeType;
qDebug() << "missing mimeType handler for: " << mimeType;
return 0;
}
if (!mApp->plugins()->c2f_isEnabled())
return 0;