summaryrefslogtreecommitdiff
path: root/src/clicktoflash.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
commit82167d2422a4b6e3071dca68cf65a66e1da41ab4 (patch)
tree03c1f95a2aa60c48822a463cc3812b5c3415991e /src/clicktoflash.cpp
parentImproving tab previews (diff)
downloadrekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz
A round of the "new" astyle 2.01...
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++;