summaryrefslogtreecommitdiff
path: root/src/clicktoflash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/clicktoflash.cpp')
-rw-r--r--src/clicktoflash.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/clicktoflash.cpp b/src/clicktoflash.cpp
index b908ac8d..982c8143 100644
--- a/src/clicktoflash.cpp
+++ b/src/clicktoflash.cpp
@@ -41,8 +41,8 @@
ClickToFlash::ClickToFlash(const QUrl &pluginUrl, QWidget *parent)
- : QWidget(parent)
- , m_url(pluginUrl)
+ : QWidget(parent)
+ , m_url(pluginUrl)
{
QHBoxLayout *l = new QHBoxLayout(this);
setLayout(l);
@@ -61,16 +61,16 @@ void ClickToFlash::load()
{
QWidget *parent = parentWidget();
QWebView *view = 0;
- while (parent)
+ while(parent)
{
- if (QWebView *aView = qobject_cast<QWebView*>(parent))
+ if(QWebView *aView = qobject_cast<QWebView*>(parent))
{
view = aView;
break;
}
parent = parent->parentWidget();
}
- if (!view)
+ if(!view)
return;
const QString selector = QL1S("%1[type=\"application/x-shockwave-flash\"]");
@@ -79,7 +79,7 @@ void ClickToFlash::load()
QList<QWebFrame*> frames;
frames.append(view->page()->mainFrame());
- while (!frames.isEmpty())
+ while(!frames.isEmpty())
{
QWebFrame *frame = frames.takeFirst();
QWebElement docElement = frame->documentElement();
@@ -90,7 +90,7 @@ void ClickToFlash::load()
foreach(QWebElement element, elements)
{
- if (checkElement(element))
+ if(checkElement(element))
{
QWebElement substitute = element.clone();
emit signalLoadClickToFlash(true);
@@ -116,19 +116,19 @@ bool ClickToFlash::checkElement(QWebElement el)
checkString = QUrl(el.attribute("src")).toString(QUrl::RemoveQuery);
urlString = m_url.toString(QUrl::RemoveQuery);
- if (urlString.contains(checkString))
+ if(urlString.contains(checkString))
return true;
QWebElementCollection collec = el.findAll("*");
int i = 0;
- while (i < collec.count())
+ while(i < collec.count())
{
QWebElement el = collec.at(i);
checkString = QUrl(el.attribute("src")).toString(QUrl::RemoveQuery);
urlString = m_url.toString(QUrl::RemoveQuery);
- if (urlString.contains(checkString))
+ if(urlString.contains(checkString))
return true;
i++;