Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp to ImageQt.cpp and made it static.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e072bd7..d4ae5c9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,17 @@
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.
+
Restructure the context menu classes for the Qt port. ContextMenu and ContextMenuItem don't store
QActions/QMenus anymore but just store the action type, tag, title and optionally submenu as created
in ContextMenu::populate().
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index a703be7..136685c 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -36,6 +36,7 @@
#include "GraphicsContext.h"
#include "AffineTransform.h"
#include "NotImplemented.h"
+#include "qwebsettings.h"
#include <QPixmap>
#include <QPainter>
@@ -50,7 +51,23 @@
#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 {
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index f175439..060bbca 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -207,20 +207,3 @@
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;
-}
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index ed81910..b54c0b2 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -2,6 +2,14 @@
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.
+
Changed the icondatabase accessor to be a static function because it doesn't change the QWebSettings object.
* Api/qwebsettings.cpp: