Fix compilation, and remove dependency on Qt
authorlars <lars@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2007 01:22:24 +0000 (01:22 +0000)
committerlars <lars@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2007 01:22:24 +0000 (01:22 +0000)
        private header.

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

WebCore/ChangeLog
WebCore/platform/qt/PlugInInfoStoreQt.cpp
WebKitQt/Api/qwebobjectplugin_p.h
WebKitQt/ChangeLog

index bf5c9b5beba809ca0160917ba8eaf871e7b997eb..281888c5384a03b6d38581cbd8ce4564ea7a2986 100644 (file)
@@ -1,3 +1,12 @@
+2007-06-13  Lars Knoll <lars@trolltech.com>
+
+        Reviewed by Niko.
+
+        Small cleanup
+
+        * platform/qt/PlugInInfoStoreQt.cpp:
+        (WebCore::PlugInInfoStore::supportsMIMEType):
+
 2007-06-13  Lars Knoll <lars@trolltech.com>
 
         Reviewed by Niko
index 157e3ecf5b6a81b9e8d4c3767f179e05bbf4af25..802c3ab4b531f36c80f95dd0c67e6d127bd61eae 100644 (file)
@@ -56,7 +56,7 @@ unsigned PlugInInfoStore::pluginCount() const
 
 bool PlugInInfoStore::supportsMIMEType(const WebCore::String& string)
 {
-    bool supports = !QWebFactoryLoader::self()->nameForMimetype(string).isEmpty();
+    bool supports = QWebFactoryLoader::self()->supportsMimeType(string);
     //qDebug() << ">>>>>>>>>>> PlugInInfoStore::supportsMIMEType(" << string << ") =" << supports;
     return supports;
 }
index 0e5861b754f9ae41de423eaccaf65d13b9b518a5..da70ff2230d9b21d8fa1548b534f0454c6bf0541 100644 (file)
@@ -4,7 +4,29 @@
 #include <qglobal.h>
 #include <qwebobjectplugin.h>
 
-#include <private/qfactoryloader_p.h>
+/*
+  FIXME: This is copied from qfactoryloader_p.h.
+  Remove this once we made qfactoryloader public in Qt
+*/
+class QFactoryLoaderPrivate;
+
+class Q_CORE_EXPORT QFactoryLoader : public QObject
+{
+    Q_OBJECT
+    Q_DECLARE_PRIVATE(QFactoryLoader)
+
+public:
+    QFactoryLoader(const char *iid,
+                   const QStringList &paths = QStringList(),
+                   const QString &suffix = QString(),
+                   Qt::CaseSensitivity = Qt::CaseSensitive);
+    ~QFactoryLoader();
+
+    QStringList keys() const;
+    QObject *instance(const QString &key) const;
+
+};
+
 class QWebFrame;
 
 class QWebFactoryLoader : public QFactoryLoader
@@ -23,6 +45,9 @@ public:
     QString descriptionForName(const QString &key) const;
     QStringList mimetypesForName(const QString &key) const;
     QString nameForMimetype(const QString &mimeType) const;
+    inline bool supportsMimeType(const QString &mimeType) const {
+        return !nameForMimetype(mimeType).isEmpty();
+    }
 
     QString mimeTypeForExtension(const QString &extension);
 
index df111bde325cbcca7b28f93003e2e47f73bfa252..3976582bb800dd5c9b951afdbfe49e618c32909c 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-13  Lars Knoll <lars@trolltech.com>
+
+        Reviewed by Niko.
+
+        Fix compilation, and remove dependency on Qt
+        private header.
+
+        * Api/qwebobjectplugin_p.h:
+        (QWebFactoryLoader::supportsMimeType):
+
 2007-06-13  Lars Knoll <lars@trolltech.com>
 
         Reviewed by Niko.