Reviewed/landed by Adam.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 18:32:46 +0000 (18:32 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 18:32:46 +0000 (18:32 +0000)
        Final cleanup to conform to WebKit coding style!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 files changed:
WebCore/ChangeLog
WebCore/kcanvas/device/qt/KCanvasClipperQt.cpp
WebCore/kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp
WebCore/kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp
WebCore/kcanvas/device/qt/KRenderingPaintServerQt.cpp
WebCore/kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp
WebCore/kcanvas/device/qt/RenderPathQt.cpp
WebCore/kcanvas/device/qt/RenderPathQt.h
WebCore/platform/qt/ColorQt.cpp
WebCore/platform/qt/ComboBoxQt.cpp
WebCore/platform/qt/CursorQt.cpp
WebCore/platform/qt/FontCacheQt.cpp
WebCore/platform/qt/FontPlatformData.h
WebCore/platform/qt/FontPlatformDataQt.cpp
WebCore/platform/qt/FontQt.cpp
WebCore/platform/qt/FrameQt.cpp
WebCore/platform/qt/FrameQt.h
WebCore/platform/qt/GraphicsContextQt.cpp
WebCore/platform/qt/ImageQt.cpp
WebCore/platform/qt/LineEditQt.cpp
WebCore/platform/qt/ListBoxQt.cpp
WebCore/platform/qt/PageQt.cpp
WebCore/platform/qt/PathQt.cpp
WebCore/platform/qt/PlatformKeyboardEventQt.cpp
WebCore/platform/qt/RenderThemeQt.cpp
WebCore/platform/qt/ResourceLoaderCurl.cpp
WebCore/platform/qt/ResourceLoaderManager.cpp
WebCore/platform/qt/ScrollViewCanvasQt.cpp
WebCore/platform/qt/SharedTimerQt.h
WebCore/platform/qt/StringQt.cpp
WebCore/platform/qt/TextEditQt.cpp
WebCore/platform/qt/WidgetQt.cpp

index fcdeddf1adb7db977df11d36e39ff2e6d2622e77..67e2040d21c1f5f1912c1bdb90c17960c15162ab 100644 (file)
@@ -1,3 +1,125 @@
+2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed/landed by Adam.
+
+        Final cleanup to conform to WebKit coding style!
+
+        * kcanvas/device/qt/KCanvasClipperQt.cpp:
+        (WebCore::KCanvasClipperQt::applyClip):
+        * kcanvas/device/qt/KCanvasClipperQt.h:
+        * kcanvas/device/qt/KCanvasPathQt.cpp:
+        * kcanvas/device/qt/KCanvasPathQt.h:
+        * kcanvas/device/qt/KRenderingDeviceQt.cpp:
+        * kcanvas/device/qt/KRenderingDeviceQt.h:
+        * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
+        (WebCore::KRenderingPaintServerLinearGradientQt::KRenderingPaintServerLinearGradientQt):
+        (WebCore::KRenderingPaintServerRadialGradientQt::KRenderingPaintServerRadialGradientQt):
+        * kcanvas/device/qt/KRenderingPaintServerGradientQt.h:
+        * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
+        (WebCore::KRenderingPaintServerPatternQt::KRenderingPaintServerPatternQt):
+        * kcanvas/device/qt/KRenderingPaintServerPatternQt.h:
+        * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
+        (WebCore::KRenderingPaintServerQt::setPenProperties):
+        * kcanvas/device/qt/KRenderingPaintServerQt.h:
+        * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
+        (WebCore::KRenderingPaintServerSolidQt::KRenderingPaintServerSolidQt):
+        (WebCore::KRenderingPaintServerSolidQt::renderPath):
+        * kcanvas/device/qt/KRenderingPaintServerSolidQt.h:
+        * kcanvas/device/qt/RenderPathQt.cpp:
+        * kcanvas/device/qt/RenderPathQt.h:
+        * platform/qt/AffineTransformQt.cpp:
+        * platform/qt/BrowserExtensionQt.cpp:
+        * platform/qt/BrowserExtensionQt.h:
+        * platform/qt/ColorQt.cpp:
+        (WebCore::Color::Color):
+        * platform/qt/ComboBoxQt.cpp:
+        (WebCore::PlatformComboBox::PlatformComboBox):
+        (WebCore::PlatformComboBox::~PlatformComboBox):
+        (WebCore::PlatformComboBox::setParentWidget):
+        (WebCore::PlatformComboBox::appendGroupLabel):
+        * platform/qt/CookieJarQt.cpp:
+        * platform/qt/CursorQt.cpp:
+        (WebCore::Cursors::Cursors::self):
+        * platform/qt/FloatPointQt.cpp:
+        * platform/qt/FloatRectQt.cpp:
+        * platform/qt/FontCacheQt.cpp:
+        (WebCore::FontCache::getSimilarFontPlatformData):
+        (WebCore::FontCache::createFontPlatformData):
+        * platform/qt/FontDataQt.cpp:
+        * platform/qt/FontPlatformData.h:
+        * platform/qt/FontPlatformDataQt.cpp:
+        * platform/qt/FontQt.cpp:
+        (WebCore::Font::operator QFont):
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::floatWidthForComplexText):
+        * platform/qt/FrameQt.cpp:
+        (WebCore::FrameQt::openURL):
+        (WebCore::FrameQt::submitForm):
+        (WebCore::FrameQt::urlSelected):
+        (WebCore::FrameQt::keyEvent):
+        * platform/qt/FrameQt.h:
+        * platform/qt/GlyphMapQt.cpp:
+        * platform/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
+        (WebCore::GraphicsContext::GraphicsContext):
+        (WebCore::GraphicsContext::drawConvexPolygon):
+        (WebCore::GraphicsContext::setFocusRingClip):
+        (WebCore::GraphicsContext::clip):
+        * platform/qt/ImageQt.cpp:
+        (WebCore::Image::draw):
+        (WebCore::Image::drawTiled):
+        * platform/qt/ImageSourceQt.cpp:
+        * platform/qt/IntPointQt.cpp:
+        * platform/qt/IntRectQt.cpp:
+        * platform/qt/IntSizeQt.cpp:
+        * platform/qt/LineEditQt.cpp:
+        (WebCore::PlatformLineEdit::PlatformLineEdit):
+        (WebCore::PlatformLineEdit::~PlatformLineEdit):
+        (WebCore::PlatformLineEdit::setParentWidget):
+        (WebCore::PlatformLineEdit::addSearchResult):
+        * platform/qt/ListBoxQt.cpp:
+        (WebCore::ListBox::ListBox):
+        (WebCore::ListBox::~ListBox):
+        (WebCore::ListBox::setParentWidget):
+        * platform/qt/PageQt.cpp:
+        (WebCore::Page::windowRect):
+        (WebCore::Page::setWindowRect):
+        * platform/qt/PathQt.cpp:
+        (WebCore::Path::addArc):
+        * platform/qt/PlatformKeyboardEventQt.cpp:
+        (WebCore::windowsKeyCodeForKeyEvent):
+        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+        * platform/qt/PlatformMouseEventQt.cpp:
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::getStylePainterAndWidgetFromPaintInfo):
+        (WebCore::RenderThemeQt::applyTheme):
+        (WebCore::RenderThemeQt::paintButton):
+        (WebCore::RenderThemeQt::paintTextField):
+        * platform/qt/ResourceLoaderCurl.cpp:
+        (WebCore::ResourceLoader::assembleResponseHeaders):
+        (WebCore::ResourceLoader::retrieveCharset):
+        (WebCore::ResourceLoader::receivedResponse):
+        * platform/qt/ResourceLoaderManager.cpp:
+        (WebCore::ResourceLoaderManager::add):
+        * platform/qt/ResourceLoaderManager.h:
+        * platform/qt/ScreenQt.cpp:
+        * platform/qt/ScrollViewCanvasQt.cpp:
+        (WebCore::ScrollViewCanvasQt::handleKeyEvent):
+        * platform/qt/ScrollViewCanvasQt.h:
+        * platform/qt/ScrollViewQt.cpp:
+        * platform/qt/SharedTimerQt.cpp:
+        * platform/qt/SharedTimerQt.h:
+        (WebCore::SharedTimerQt::inst):
+        * platform/qt/StringQt.cpp:
+        * platform/qt/SystemTimeQt.cpp:
+        * platform/qt/TemporaryLinkStubs.cpp:
+        * platform/qt/TextEditQt.cpp:
+        (WebCore::PlatformTextEdit::PlatformTextEdit):
+        (WebCore::PlatformTextEdit::~PlatformTextEdit):
+        (WebCore::PlatformTextEdit::setParentWidget):
+        * platform/qt/WidgetQt.cpp:
+        (WebCore::Widget::setQWidget):
+
 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed and landed by Anders.
index 35f2324932243f790cd7dd97287d1915673164f6..4aaa760a98753029934a234c901a050c90dc0122 100644 (file)
@@ -31,8 +31,8 @@ namespace WebCore {
 
 void KCanvasClipperQt::applyClip(const FloatRect& boundingBox) const
 {
-    KRenderingDeviceContext *context = renderingDevice()->currentContext();
-    KRenderingDeviceContextQt *qtContext = static_cast<KRenderingDeviceContextQt *>(context);
+    KRenderingDeviceContextcontext = renderingDevice()->currentContext();
+    KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
     if (m_clipData.count() < 1)
         return;
 
@@ -48,7 +48,7 @@ void KCanvasClipperQt::applyClip(const FloatRect& boundingBox) const
         if (clipData.windRule() != clipRule)
             heterogenousClipRules = true;
        
-        QPainterPath path = static_cast<KCanvasPathQt *>(clipData.path.get())->qtPath(); 
+        QPainterPath path = static_cast<KCanvasPathQt*>(clipData.path.get())->qtPath(); 
         if (path.isEmpty())
             continue;
 
@@ -104,11 +104,10 @@ void KCanvasClipperQt::applyClip(const FloatRect& boundingBox) const
         // we would have to detect such, draw to a mask, and then clip
         // to that mask
         // if (!CGContextIsPathEmpty(cgContext)) {
-            if (clipRule == RULE_EVENODD) {
+            if (clipRule == RULE_EVENODD)
                 newPath.setFillRule(Qt::OddEvenFill);
-            } else {
+            else
                 newPath.setFillRule(Qt::WindingFill);
-            }
         // }
     }
 
index 3e3a7282c59046b7dafb1aba992058d893e142f6..779a7af0005ae010b923be649374a38d69226776 100644 (file)
@@ -51,7 +51,7 @@ void fill_color_array(QGradient& gradient, const Vector<KCGradientStop>& stops,
 // KRenderingPaintServerLinearGradientQt
 KRenderingPaintServerLinearGradientQt::KRenderingPaintServerLinearGradientQt()
     : KRenderingPaintServerLinearGradient()
-      , KRenderingPaintServerQt()
+    , KRenderingPaintServerQt()
 {
 }
 
@@ -148,6 +148,7 @@ void KRenderingPaintServerLinearGradientQt::draw(KRenderingDeviceContext* contex
 // KRenderingPaintServerRadialGradientQt
 KRenderingPaintServerRadialGradientQt::KRenderingPaintServerRadialGradientQt()
     : KRenderingPaintServerRadialGradient()
+    , KRenderingPaintServerQt()
 {
 }
 
index 3833e038d532d3178323653a9e5f29db029601c5..1bb62fa1dfb84fcc0a555d921ec445d53791f275 100644 (file)
@@ -42,7 +42,7 @@ namespace WebCore {
 // KRenderingPaintServerPatternQt
 KRenderingPaintServerPatternQt::KRenderingPaintServerPatternQt()
     : KRenderingPaintServerPattern()
-      , KRenderingPaintServerQt()
+    , KRenderingPaintServerQt()
 {
 }
 
index 7b5bbd4609b9158bebbc11a845801298e11ada7e..bdcac034cb19d8b8a8ca6804fe09c3e9f5f6c469 100644 (file)
@@ -41,18 +41,16 @@ KRenderingPaintServerQt::~KRenderingPaintServerQt()
 void KRenderingPaintServerQt::setPenProperties(const KRenderingStrokePainter& strokePainter, QPen& pen) const
 {
     pen.setWidthF(strokePainter.strokeWidth());
-    if (strokePainter.strokeCapStyle() == CAP_BUTT) {
+    if (strokePainter.strokeCapStyle() == CAP_BUTT)
         pen.setCapStyle(Qt::FlatCap);
-    } else if (strokePainter.strokeCapStyle() == CAP_ROUND) {
+    else if (strokePainter.strokeCapStyle() == CAP_ROUND)
         pen.setCapStyle(Qt::RoundCap);
-    }
 
     if(strokePainter.strokeJoinStyle() == JOIN_MITER) {
         pen.setJoinStyle(Qt::MiterJoin);
         pen.setMiterLimit((qreal)strokePainter.strokeMiterLimit());
-    } else if(strokePainter.strokeJoinStyle() == JOIN_ROUND) {
+    else if(strokePainter.strokeJoinStyle() == JOIN_ROUND)
         pen.setJoinStyle(Qt::RoundJoin);
-    }
 
     KCDashArray dashes = strokePainter.dashArray();
     unsigned int dashLength = !dashes.isEmpty() ? dashes.count() : 0;
index ba4e18ba0b50e472cd80129cedf5dd499ac8d8ad..3a2ef49140c45e3bfc29a8b250a76a3c0920c6b1 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 KRenderingPaintServerSolidQt::KRenderingPaintServerSolidQt()
     : KRenderingPaintServerSolid()
-      , KRenderingPaintServerQt()
+    , KRenderingPaintServerQt()
 {
 }
 
@@ -96,7 +96,7 @@ void KRenderingPaintServerSolidQt::teardown(KRenderingDeviceContext*, const Rend
 void KRenderingPaintServerSolidQt::renderPath(KRenderingDeviceContext* context, const RenderPath* path, KCPaintTargetType type) const
 {
     RenderStyle* renderStyle = path->style();
-    KRenderingDeviceContextQt *qtContext = static_cast<KRenderingDeviceContextQt*>(context);
+    KRenderingDeviceContextQtqtContext = static_cast<KRenderingDeviceContextQt*>(context);
 
     if ((type & APPLY_TO_FILL) && KSVGPainterFactory::isFilled(renderStyle))
         qtContext->fillPath();
index 7b1d86408225d4ff11625390a86073b1b399ec8f..df210cbd0d157f29b2fde6e8f8d08e6ed18a6d32 100644 (file)
     Boston, MA 02111-1307, USA.
 */
 
-#include <QDebug>
-
 #include "config.h"
 #include "RenderPathQt.h"
 
+#include <QDebug>
+
 namespace WebCore {
     
 RenderPathQt::RenderPathQt(RenderStyle* style, SVGStyledElement* node)
index f2f360fd73a7c68980a62d14747c64f3cdc086aa..56837841f8a74d37a9c4d1f7d8161e6b368e6734 100644 (file)
@@ -34,7 +34,7 @@ public:
     RenderPathQt(RenderStyle*, SVGStyledElement*);
 
 protected:
-    virtual void drawMarkersIfNeeded(GraphicsContext*, const FloatRect&, const KCanvasPath *) const;
+    virtual void drawMarkersIfNeeded(GraphicsContext*, const FloatRect&, const KCanvasPath*) const;
 };
 
 }
index fd62e88065a9e7413b6529ada75b6b950cf2e430..5d167409b260e41c8efeb7fd8dcfb7a6de5bf978 100644 (file)
@@ -32,7 +32,7 @@
 
 namespace WebCore {
 
-Color::Color(const QColor &c)
+Color::Color(const QColorc)
     : m_color(makeRGBA(c.red(), c.green(), c.blue(), c.alpha()))
 {
     m_valid = c.isValid();
index 26943fa9b38d6fb0343cad4b0c633df950b71bdc..44ebffe6064ee04afab1e3857e0f31f2259c1b74 100644 (file)
@@ -40,17 +40,14 @@ PlatformComboBox::PlatformComboBox()
     : Widget()
     , m_comboBox(0)
 {
-    qDebug("PlatformComboBox::PlatformComboBox(), this=%p", this);
 }
 
 PlatformComboBox::~PlatformComboBox()
 {
-    qDebug("PlatformComboBox::~PlatformComboBox(), this=%p", this);
 }
 
 void PlatformComboBox::setParentWidget(QWidget* parent)
 {
-    qDebug("PlatformComboBox::setParentWidget(), parent=%p", parent);
     Widget::setParentWidget(parent);
 
     Q_ASSERT(m_comboBox == 0);
@@ -71,7 +68,7 @@ void PlatformComboBox::appendItem(const DeprecatedString& text, bool enabled)
 
 void PlatformComboBox::appendGroupLabel(const DeprecatedString& text)
 {
-    // TODO: Group label?
+    // FIXME: Group label?
     m_comboBox->addItem(text);
 }
 
index 182490161169c344728b54d56aa88337a2ea8b5a..c11a951a0dcbf6c4789bf7c22a828923cb2617d0 100644 (file)
@@ -90,8 +90,8 @@ protected:
     }
 
 public:
-    static Cursors *self();
-    static Cursors *s_self;
+    static Cursorsself();
+    static Cursorss_self;
 
     Cursor CrossCursor;
     Cursor MoveCursor;
@@ -111,9 +111,8 @@ Cursors* Cursors::s_self = 0;
 
 Cursors* Cursors::self()
 {
-    if (!s_self) {
-        s_self = new Cursors;
-    }
+    if (!s_self)
+        s_self = new Cursors();
 
     return s_self;
 }
index 97227e6dc31c213070ca7d1c60f9b4a45ffd0b9f..fb3020c1a62f53322be7cc39093f80987f541dd4 100644 (file)
@@ -48,7 +48,7 @@ const FontData* FontCache::getFontDataForCharacters(const Font& font, const UCha
 
 FontPlatformData* FontCache::getSimilarFontPlatformData(const Font& font)
 {
-    return new FontPlatformData(font.fontDescription(), font.family().family());
+    return 0;
 }
 
 FontPlatformData* FontCache::getLastResortFallbackFont(const Font& font)
@@ -61,7 +61,7 @@ FontPlatformData* FontCache::getLastResortFallbackFont(const Font& font)
 
 FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family)
 {
-    return 0;
+    return new FontPlatformData(fontDescription, family);
 }
 
 }
index ad1cddf5f1a534a42a8aa016118b8ceb5a0a2e1a..a07d6b3eae2a06c973463e8cb4c7ba57eb3841fc 100644 (file)
@@ -39,8 +39,8 @@ namespace WebCore {
 
 class FontPlatformData {
 public:
-    FontPlatformData(const FontPlatformData& other);
-    FontPlatformData& operator=(const FontPlatformData& other);
+    FontPlatformData(const FontPlatformData&);
+    FontPlatformData& operator=(const FontPlatformData&);
 
     class Deleted { };
     FontPlatformData(Deleted);
@@ -56,7 +56,7 @@ public:
 
     unsigned hash() const;
 
-    bool operator==(const FontPlatformData& other) const;
+    bool operator==(const FontPlatformData&) const;
 
 private:
     QFont m_font;
index 5b6e6d8a0c927adbe992186c22d0cd07caa41dfb..773135a7ca54de6751dd185b84ee07f79957ec7a 100644 (file)
@@ -34,7 +34,7 @@
 #include "DeprecatedString.h"
 #include "FontDescription.h"
 
-#include <QDebug>
+#include <QHash>
 #include <QFontInfo>
 
 namespace WebCore {
index 16098c17e7a8a52472913250fd9b424b2e343b05..ed9f15a120f456d05cc4a4513cc9957ddc70abd3 100644 (file)
@@ -41,7 +41,6 @@ namespace WebCore {
 
 Font::operator QFont() const
 {
-    Q_ASSERT(primaryFont() != 0);
     return primaryFont()->platformData().font();
 }
 
@@ -62,7 +61,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const FontData* font, co
 
 void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const TextStyle&, const FloatPoint& point) const
 {
-    // ### style, run.from()/length() cut-off
+    // FIXME: style, run.from()/length() cut-off
     ctx->platformContext()->drawText(point.x(),
                                      point.y(),
                                      QString::fromRawData(reinterpret_cast<const QChar*>(run.characters() + run.from()), run.length()));
@@ -70,7 +69,7 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const TextS
 
 float Font::floatWidthForComplexText(const TextRun& run, const TextStyle&) const
 {
-    // ### style
+    // FIXME: style
     QFontMetricsF metrics(primaryFont()->m_font.font());
     return metrics.width(QString::fromRawData(reinterpret_cast<const QChar*>(run.characters() + run.from()), run.length()));
 }
index 448fb6923f5bb9c4eb70f69b3884ad2472732c6d..0e0bb6cd9d3e598247b17ef2623ec68877191d2b 100644 (file)
@@ -143,10 +143,11 @@ bool FrameQt::openURL(const KURL& url)
 {
     qDebug("openURL(%s)", url.url().latin1());
     didOpenURL(url);
-    
-    ResourceRequest request(resourceRequest());
-    request.m_responseMIMEType = "image/svg+xml";
-    setResourceRequest(request);
+
+    // FIXME: Use mimetype logic from KIO!
+    // ResourceRequest request(resourceRequest());
+    // request.m_responseMIMEType = "image/svg+xml";
+    // setResourceRequest(request);
 
     begin(url);
     ResourceLoader* job = new ResourceLoader(this, "GET", url);
@@ -164,7 +165,7 @@ void FrameQt::submitForm(const ResourceRequest& request)
 
     d->m_submittedFormURL = request.url();
 
-    /* TODO: Once we have a KPart - named "FramePartQt" - we can let that inherit from FrameQtClient and implement the functions...)
+    /* FIXME: Once we have a KPart - named "FramePartQt" - we can let that inherit from FrameQtClient and implement the functions...)
     if(m_client)
         m_client->submitForm(request.doPost() ? "POST" : "GET", request.url(), &request.postData);
     */
@@ -181,7 +182,6 @@ void FrameQt::urlSelected(const ResourceRequest& request)
 {
     //need to potentially updateLocationBar(str.ascii()); or notify sys of new url mybe event or callback
     const KURL url = request.url();
-    printf("------------------> LOADING NEW URL %s \n", url.url().ascii());
     didOpenURL(url);
     begin(url);
     ResourceLoader* job = new ResourceLoader(this, "GET", url);
@@ -498,11 +498,11 @@ bool FrameQt::keyEvent(const PlatformKeyboardEvent& keyEvent)
 
     // Check for cases where we are too early for events -- possible unmatched key up
     // from pressing return in the location bar.
-    Document *doc = document();
+    Documentdoc = document();
     if(!doc)
         return false;
 
-    Node *node = doc->focusNode();
+    Nodenode = doc->focusNode();
     if(!node) {
         if (doc->isHTMLDocument())
             node = doc->body();
index 6608477ad32108ebd14de123ce445d89065ee254..aae58727621cfbd6ac980729e25be361c5481eb6 100644 (file)
@@ -49,7 +49,8 @@ public:
     virtual void submitForm(const String& method, const KURL&, const FormData*) = 0;
 };
 
-class FrameQt : public Frame, public ResourceLoaderClient {
+class FrameQt : public Frame,
+                public ResourceLoaderClient {
 public:
     FrameQt(QWidget* parent);
     FrameQt();
@@ -136,7 +137,7 @@ public:
 
     virtual void receivedResponse(ResourceLoader*, PlatformResponse);
     virtual void receivedData(ResourceLoader*, const char*, int);
-    virtual void receivedAllData(ResourceLoader*,PlatformData);
+    virtual void receivedAllData(ResourceLoader*, PlatformData);
 
     void setFrameGeometry(const IntRect&);
 
index 8e6c617618cdd085b2838206682572302978f085..617befde91af53dbdfb6bbc4789997748edf7921 100644 (file)
@@ -137,7 +137,7 @@ struct TransparencyLayer
     }
 
     QPixmap pixmap;
-    QPainter *painter;
+    QPainterpainter;
     qreal opacity;
 };
 
@@ -195,7 +195,7 @@ GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(QPainter* p)
     painter = p;
     redirect = 0;
 
-    // TODO: Maybe only enable in SVG mode?
+    // FIXME: Maybe only enable in SVG mode?
     painter->setRenderHint(QPainter::Antialiasing);
 }
 
@@ -205,7 +205,7 @@ GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate()
 
 GraphicsContext::GraphicsContext(PlatformGraphicsContext* context)
     : m_common(createGraphicsContextPrivate())
-      , m_data(new GraphicsContextPlatformPrivate(context))
+    , m_data(new GraphicsContextPlatformPrivate(context))
 {
     setPaintingDisabled(!context);
 }
@@ -243,7 +243,7 @@ void GraphicsContext::drawTextShadow(const TextRun& run, const IntPoint& point,
     if (m_data->shadow.isNull())
         return;
 
-    TextShadow *shadow = &m_data->shadow;
+    TextShadowshadow = &m_data->shadow;
 
     if (shadow->blur <= 0) {
         Pen p = pen();
@@ -252,7 +252,7 @@ void GraphicsContext::drawTextShadow(const TextRun& run, const IntPoint& point,
         setPen(p);
     } else {
         const int thickness = shadow->blur;
-        // ### OPTIMIZE: limit the area to only the actually painted area + 2*thickness
+        // FIXME: OPTIMIZE: limit the area to only the actually painted area + 2*thickness
         const int w = m_data->p().device()->width();
         const int h = m_data->p().device()->height();
         const QRgb color = qRgb(255, 255, 255);
@@ -421,7 +421,7 @@ void GraphicsContext::drawConvexPolygon(size_t npoints, const IntPoint* points)
     if (paintingDisabled())
         return;
 
-    m_data->p().drawConvexPolygon((QPoint*)points, npoints);
+    m_data->p().drawConvexPolygon(reinterpret_cast<const QPoint*>(points), npoints);
 }
 
 void GraphicsContext::fillRect(const IntRect& rect, const Color& c)
@@ -458,7 +458,7 @@ void GraphicsContext::drawFocusRing(const Color& color)
     notImplemented();
 }
 
-void GraphicsContext::setFocusRingClip(const IntRect &rect)
+void GraphicsContext::setFocusRingClip(const IntRectrect)
 {
     if (paintingDisabled())
         return;
@@ -626,7 +626,7 @@ void GraphicsContext::setCompositeOperation(CompositeOperator op)
     m_data->p().setCompositionMode(toQtCompositionMode(op));
 }
 
-void GraphicsContext::clip(const Path &path)
+void GraphicsContext::clip(const Pathpath)
 {
     if (paintingDisabled())
         return;
index 59d8e3c2c762eeff84258faf05ec0eb52fa46a1f..18aa014dbf9aec897af46f39ba7389348f22160b 100644 (file)
@@ -113,7 +113,7 @@ void Image::draw(GraphicsContext* ctxt, const FloatRect& dst,
     // Set the compositing operation.
     ctxt->setCompositeOperation(op);
 
-    QPainter *painter(ctxt->platformContext());
+    QPainterpainter(ctxt->platformContext());
 
     // Test using example site at
     // http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html    
@@ -158,7 +158,7 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const Flo
 
     // Set the compositing operation.
     ctxt->setCompositeOperation(op);
-    QPainter *p = ctxt->platformContext();
+    QPainterp = ctxt->platformContext();
     p->drawTiledPixmap(dstRect, pix);
 
     ctxt->restore();
index bbad274904b0e22703862e6241287404c02fa849..424f993818e1299926d6ee89bf329aad8416ae7c 100644 (file)
@@ -26,7 +26,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include <QDebug>
 #include <QLineEdit>
 
 #include <config.h>
@@ -45,17 +44,14 @@ PlatformLineEdit::PlatformLineEdit(PlatformLineEdit::Type type)
     : m_lineEdit(0)
     , m_type(type)
 {
-    qDebug("PlatformLineEdit::PlatformLineEdit(), this=%p", this);
 }
 
 PlatformLineEdit::~PlatformLineEdit()
 {
-    qDebug("PlatformLineEdit::~PlatformLineEdit()");
 }
 
 void PlatformLineEdit::setParentWidget(QWidget* parent)
 {
-    qDebug("PlatformLineEdit::setParentWidget(), parent=%p", parent);
     Widget::setParentWidget(parent);
 
     Q_ASSERT(m_lineEdit == 0);
index 408828ad46964f71fc3010d5cc45f140d072ab39..5502b8f56d38580a65731f5e4da5e2807b8887b7 100644 (file)
@@ -42,17 +42,14 @@ ListBox::ListBox()
     , _width(0.0)
     , _widthGood(false)
 {
-    qDebug("ListBox::ListBox(), this=%p", this);
 }
 
 ListBox::~ListBox()
 {
-    qDebug("ListBox::~ListBox(), this=%p", this);
 }
 
 void ListBox::setParentWidget(QWidget* parent)
 {
-    qDebug("ListBox::setParentWidget(), parent=%p", parent);
     ScrollView::setParentWidget(parent);
 
     Q_ASSERT(m_listWidget == 0);
index 928acc735d4b9a2a29d1aee04448a577620a8a03..b534bbcbc056819409ab98772ee5936c423abaf0 100644 (file)
@@ -27,7 +27,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include <QDebug>
 #include <QWidget>
 
 #include "config.h"
@@ -55,14 +54,11 @@ FloatRect Page::windowRect() const
     if (!widget)
         return FloatRect();
 
-    qDebug() << " Page::windowRect() -> " << (QRectF) widget->geometry();
     return (IntRect) widget->geometry();
 }
 
 void Page::setWindowRect(const FloatRect& r)
 {
-    qDebug() << " Page::setWindowRect() -> " << (QRectF) r;
-
     QWidget* widget = rootWindowForFrame(mainFrame());
     if (widget)
         widget->setGeometry(QRect(qRound(r.x()), qRound(r.y()), qRound(r.width()), qRound(r.height())));
index a3540e297f414804770d833f6ea5346cc8f74c05..01314f097999dce4ee34cd847955fdf3661dff18 100644 (file)
@@ -133,8 +133,8 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic
 
     double span = 0;
 
-    double xs     = xc - radius;
-    double ys     = yc - radius;
+    double xs = xc - radius;
+    double ys = yc - radius;
     double width  = radius*2;
     double height = radius*2;
 
@@ -143,7 +143,7 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic
     else if (anticlockwise && (sa < ea))
         span -= 360;
 
-    //### this is also due to switched coordinate system
+    // this is also due to switched coordinate system
     // we would end up with a 0 span instead of 360
     if (!(qFuzzyCompare(span + (ea - sa), 0.0) &&
           qFuzzyCompare(abs(span), 360.0))) {
@@ -152,6 +152,7 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic
 
     m_path->moveTo(QPointF(xc + radius  * cos(sar),
                           yc - radius  * sin(sar)));
+
     m_path->arcTo(xs, ys, width, height, sa, span);
 }
 
index c86ce184ff3957913b0d311c2eb244995955a7cf..b6313c8d59d1307322e562584abcac12622591da 100644 (file)
@@ -316,7 +316,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode)
             return VK_Z; //  (5A) Z key case 'z': case 'Z': return 0x5A;
         case Qt::Key_Meta:
             return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
-        //case Qt::Key_Meta_R: TODO: What to do here?
+        //case Qt::Key_Meta_R: FIXME: What to do here?
         //    return VK_RWIN; // (5C) Right Windows key (Natural keyboard)
             // VK_APPS (5D) Applications key (Natural keyboard)
             // VK_SLEEP (5F) Computer Sleep key
@@ -422,7 +422,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode)
 PlatformKeyboardEvent::PlatformKeyboardEvent(QKeyEvent* event, bool isKeyUp)
 {
     m_text = event->text();
-    m_unmodifiedText = event->text(); // TODO: not correct
+    m_unmodifiedText = event->text(); // FIXME: not correct
     m_keyIdentifier = keyIdentifierForQtKeyCode(event->key());
     m_isKeyUp = isKeyUp;
     m_autoRepeat = event->isAutoRepeat();
index c3faec25dc66eacffc47ccb8967ec162d375936d..c4c097fa93ec28389d58bf8c224f38f5f575e3e0 100644 (file)
  *
  */
 
+#include "config.h"
+
 #include <QStyle>
 #include <QWidget>
 #include <QPainter>
 #include <QStyleOptionButton>
 
-#include "config.h"
-
 #include "RenderTheme.h"
 #include "GraphicsContext.h"
 
@@ -79,7 +79,7 @@ private:
 
     bool supportsFocus(EAppearance) const;
 
-    bool stylePainterAndWidgetForPaintInfo(const RenderObject::PaintInfo&, QStyle*&, QPainter*&, QWidget*&) const;
+    bool getStylePainterAndWidgetFromPaintInfo(const RenderObject::PaintInfo&, QStyle*&, QPainter*&, QWidget*&) const;
     EAppearance applyTheme(QStyleOption&, RenderObject*) const;
 };
 
@@ -149,7 +149,7 @@ void RenderThemeQt::addIntrinsicMargins(RenderStyle* style) const
     }
 }
 
-bool RenderThemeQt::stylePainterAndWidgetForPaintInfo(const RenderObject::PaintInfo& i, QStyle*& style, QPainter*& painter, QWidget*& widget) const
+bool RenderThemeQt::getStylePainterAndWidgetFromPaintInfo(const RenderObject::PaintInfo& i, QStyle*& style, QPainter*& painter, QWidget*& widget) const
 {
     painter = (i.p ? static_cast<QPainter*>(i.p->platformContext()) : 0);
     widget = (painter ? static_cast<QWidget*>(painter->device()) : 0);
@@ -202,7 +202,8 @@ EAppearance RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
         option.state &= ~QStyle::State_Enabled;
 
     if (isReadOnlyControl(o))
-        option.state |= QStyle::State_ReadOnly; // Readonly is supported on textfields.
+        // Readonly is supported on textfields.
+        option.state |= QStyle::State_ReadOnly;
 
     if (supportsFocus(o->style()->appearance()) && isFocused(o))
         option.state |= QStyle::State_HasFocus;
@@ -231,7 +232,7 @@ bool RenderThemeQt::paintButton(RenderObject* o, const RenderObject::PaintInfo&
     QPainter* painter = 0;
     QWidget* widget = 0;
     
-    if (!stylePainterAndWidgetForPaintInfo(i, style, painter, widget))
+    if (!getStylePainterAndWidgetFromPaintInfo(i, style, painter, widget))
         return true;
     
     QStyleOptionButton option;
@@ -262,7 +263,7 @@ bool RenderThemeQt::paintTextField(RenderObject* o, const RenderObject::PaintInf
     QPainter* painter = 0;
     QWidget* widget = 0;
     
-    if (!stylePainterAndWidgetForPaintInfo(i, style, painter, widget))
+    if (!getStylePainterAndWidgetFromPaintInfo(i, style, painter, widget))
         return true;
   
     QStyleOption option;
@@ -272,7 +273,7 @@ bool RenderThemeQt::paintTextField(RenderObject* o, const RenderObject::PaintInf
     Q_ASSERT(appearance == TextFieldAppearance);
 
     // Now paint the text field.
-    // TODO: this is not enough for sure! (use 'option'...)
+    // FIXME: this is not enough for sure! (use 'option'...)
     painter->drawRect(r);
 
     return false;
index 82eda3a09dc1c6a099835b710316867280f2bee7..0aeafef26b21e3ffcc7d4e4b88022cb230d7183d 100644 (file)
@@ -65,7 +65,7 @@ void ResourceLoader::assembleResponseHeaders() const
         d->responseHeaders = DeprecatedString::fromUtf8(d->response.toUtf8(), d->response.length());
         d->assembledResponseHeaders = true;
  
-        // TODO: Move the client activation to receivedResponse(), once
+        // FIXME: Move the client activation to receivedResponse(), once
         // we use KIO, and receivedResponse() is called only once.
         if (d->client) {
             d->client->receivedResponse(const_cast<ResourceLoader *>(this), (char *) d->response.data());
@@ -81,7 +81,7 @@ void ResourceLoader::retrieveCharset() const
         d->retrievedCharset = true;
     }
 
-    // TODO: We can just parse the headers here, but once we use KIO
+    // FIXME: We can just parse the headers here, but once we use KIO
     // we can set the response parameter to sth. else than a "char*".
     // I save my time but not implementing it for now :-)
     notImplemented();
@@ -94,7 +94,7 @@ void ResourceLoader::receivedResponse(char* response)
     d->assembledResponseHeaders = false;
     d->retrievedCharset = false;
 
-    // TODO: This is flawed:
+    // FIXME: This is flawed:
     // - usually receivedResponse() should be called _once_, when the
     //   response is available - seems very unflexible to do that with libcurl
     //   (so let's wait until it dies and do it properly with KIO then.)
index aeec1f2ce37259b6283ec739eaa8d1b7438d28a1..bb03095291aba2289dd5ad0f2eb3a21f44d4b31c 100644 (file)
@@ -215,7 +215,7 @@ void ResourceLoaderManager::add(ResourceLoader* job)
         strncpy(postDataString, postData.ascii(), postData.length());
         postDataString[postData.length()] = '\0';
 
-        // TODO: Do it properly after we got rid of libcurl! (also leaks the headerlist. hmpf.)
+        // FIXME: Do it properly after we got rid of libcurl! (also leaks the headerlist. hmpf.)
         curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDS, postDataString);
     }
 
index 91ef15556bb7915342004c59d2702964288c274b..ab32ae8444a672b6dd16a747ebcf6e3a0f439e4e 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
+
 #include "ScrollViewCanvasQt.h"
 #include "ScrollViewCanvasQt.moc"
 
-#include "config.h"
 #include "FrameQt.h"
 #include "FrameView.h"
 #include "TypingCommand.h"
@@ -42,7 +43,6 @@
 #include "PlatformMouseEvent.h"
 #include "PlatformKeyboardEvent.h"
 
-#include <QDebug>
 #include <QPainter>
 #include <QPaintEvent>
 #include <QMouseEvent>
@@ -149,10 +149,11 @@ void ScrollViewCanvasQt::handleKeyEvent(QKeyEvent* ev, bool isKeyUp)
                     TypingCommand::insertText(frame->document(), kevent.text(), false);
 
             }
+
             handled = true;
         }
         
-        // TODO: doScroll stuff()!
+        // FIXME: doScroll stuff()!
     }
 }
 
index affff29ac95ecb3fa4eec9b2683786ff08a1c403..cda9c4e2778fdc3caccfdeba7c9b99576bb48487 100644 (file)
 #define SharedTimerQtQt_H
 
 #include "SharedTimerQt.h"
-
 #include "SystemTime.h"
-#include <wtf/Assertions.h>
-#include <stdio.h>
-#include <stdlib.h>
+
 #include <QTimer>
 
 namespace WebCore {
@@ -53,7 +50,7 @@ protected:
     }
 
 public:
-    static SharedTimerQt *inst()
+    static SharedTimerQtinst()
     {
         if (!s_self)
             s_self = new SharedTimerQt();
index 830b7c618af7fa6021a711608661c7d6f225d319..34b43d73842d04e58126303933674eaf73c7aedd 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include "config.h"
+
 #include "PlatformString.h"
 #include "DeprecatedString.h"
 
index 49ae4ca01c2d0dd05bd6c7dd1d1eb8b6b96edcd5..023905c60c212071237b5ca0b7709017d76b071c 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#include <QDebug>
+#include "config.h"
+
 #include <QTextEdit>
 
-#include <config.h>
 #include "GraphicsTypes.h"
 #include "ScrollView.h"
 #include "TextDirection.h"
@@ -42,17 +42,14 @@ namespace WebCore {
 PlatformTextEdit::PlatformTextEdit(Widget* parent)
     : ScrollView()
 {
-    qDebug("PlatformTextEdit::PlatformTextEdit(), this=%p", this);
 }
 
 PlatformTextEdit::~PlatformTextEdit()
 {
-    qDebug("PlatformTextEdit::~PlatformTextEdit()");
 }
 
 void PlatformTextEdit::setParentWidget(QWidget* parent)
 {
-    qDebug("PlatformTextEdit::setParentWidget(), parent=%p", parent);
     Widget::setParentWidget(parent);
 
     QTextEdit *widget = new QTextEdit(parent, "");
index 4e63649a0281b71651bcc2f128883c174c5584a9..25e16ea9ba43f91bf32f7bf108d1afd16c2b620c 100644 (file)
  */
 
 #include "config.h"
-#include "Widget.h"
 
-#include "Cursor.h"
 #include "Font.h"
-#include "GraphicsContext.h"
+#include "Widget.h"
+#include "Cursor.h"
 #include "IntRect.h"
 #include "RenderObject.h"
+#include "GraphicsContext.h"
 
-#include <QDebug>
 #include <QWidget>
 
 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
@@ -133,7 +132,7 @@ void Widget::hide()
         data->m_widget->hide();
 }
 
-void Widget::setQWidget(QWidget*child)
+void Widget::setQWidget(QWidget* child)
 {
     delete data->m_widget;
     data->m_widget = child;