mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Fixed crash on some pages with flash content and click2flash plugin
enabled
This commit is contained in:
parent
4924f91f0e
commit
1f9d08ea73
@ -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();
|
||||
|
@ -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()) {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user