Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp...
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2007 14:30:50 +0000 (14:30 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2007 14:30:50 +0000 (14:30 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27549 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/qt/ImageQt.cpp
WebKit/qt/Api/qwebsettings.cpp
WebKit/qt/ChangeLog

index e072bd7d9b9c6842db4a273dd591cd608056900d..d4ae5c9427094f77ab2a7c77420c81c40f87c251 100644 (file)
@@ -1,3 +1,14 @@
+2007-11-07  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Lars.
+
+        Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp to ImageQt.cpp and made it static.
+
+        WARNING: NO TEST CASES ADDED OR CHANGED
+
+        * platform/graphics/qt/ImageQt.cpp:
+        (loadResourcePixmap):
+
 2007-11-07  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Lars.
index a703be7b06e0133f0c0d9baa3cce879febb8f790..136685cefb7d990cc4809284eaac7d9b34acf096 100644 (file)
@@ -36,6 +36,7 @@
 #include "GraphicsContext.h"
 #include "AffineTransform.h"
 #include "NotImplemented.h"
+#include "qwebsettings.h"
 
 #include <QPixmap>
 #include <QPainter>
 #include <math.h>
 
 // This function loads resources into WebKit
-QPixmap loadResourcePixmap(const char*);
+static QPixmap loadResourcePixmap(const char *name)
+{
+    const QWebSettings settings = QWebSettings::global();
+    const QString resource = name;
+
+    QPixmap pixmap;
+    if (resource == "missingImage")
+        pixmap = settings.webGraphic(QWebSettings::MissingImageGraphic);
+    else if (resource == "nullPlugin")
+        pixmap = settings.webGraphic(QWebSettings::MissingPluginGraphic);
+    else if (resource == "urlIcon")
+        pixmap = settings.webGraphic(QWebSettings::DefaultFaviconGraphic);
+    else if (resource == "textAreaResizeCorner")
+        pixmap = settings.webGraphic(QWebSettings::TextAreaResizeCornerGraphic);
+
+    return pixmap;
+}
 
 namespace WebCore {
 
index f17543992be5d118c876627329b5ff5f3d74cbf9..060bbcafbae043fdb41c95eabbb2722f7baf387d 100644 (file)
@@ -207,20 +207,3 @@ bool QWebSettings::testAttribute(WebAttribute attr) const
     return d->attributes[attr];
 }
 
-QPixmap loadResourcePixmap(const char *name)
-{
-    const QWebSettings settings = QWebSettings::global();
-    const QString resource = name;
-
-    QPixmap pixmap;
-    if (resource == "missingImage")
-        pixmap = settings.webGraphic(QWebSettings::MissingImageGraphic);
-    else if (resource == "nullPlugin")
-        pixmap = settings.webGraphic(QWebSettings::MissingPluginGraphic);
-    else if (resource == "urlIcon")
-        pixmap = settings.webGraphic(QWebSettings::DefaultFaviconGraphic);
-    else if (resource == "textAreaResizeCorner")
-        pixmap = settings.webGraphic(QWebSettings::TextAreaResizeCornerGraphic);
-
-    return pixmap;
-}
index ed819103d1cf153aeb406adddffbf05b1ee51ef2..b54c0b27a70920cb6d62c8b49b9382f6a6ab054d 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-07  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Lars.
+
+        Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp to ImageQt.cpp and made it static.
+
+        * Api/qwebsettings.cpp:
+
 2007-11-07  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Lars.