Remove Qt code from Platform/
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 21:45:01 +0000 (21:45 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 21:45:01 +0000 (21:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122240

Reviewed by Andreas Kling.

* Platform/CoreIPC/Connection.h:
* Platform/Logging.cpp:
* Platform/Logging.h:
* Platform/Module.h:
* Platform/PlatformProcessIdentifier.h:
* Platform/SharedMemory.h:
* Platform/WorkQueue.h:
* Platform/qt/LoggingQt.cpp: Removed.
* Platform/qt/ModuleQt.cpp: Removed.
* Platform/qt/WorkQueueQt.cpp: Removed.

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

Source/WebKit2/ChangeLog
Source/WebKit2/Platform/CoreIPC/Connection.h
Source/WebKit2/Platform/Logging.cpp
Source/WebKit2/Platform/Logging.h
Source/WebKit2/Platform/Module.h
Source/WebKit2/Platform/PlatformProcessIdentifier.h
Source/WebKit2/Platform/SharedMemory.h
Source/WebKit2/Platform/WorkQueue.h
Source/WebKit2/Platform/qt/LoggingQt.cpp [deleted file]
Source/WebKit2/Platform/qt/ModuleQt.cpp [deleted file]
Source/WebKit2/Platform/qt/WorkQueueQt.cpp [deleted file]

index ba1f6f1a795e25242e49497b5aa83e3d2e47bc6c..e263e9cd8a16484ce278865dc0cc76423afffd9d 100644 (file)
@@ -1,3 +1,21 @@
+2013-10-02  Anders Carlsson  <andersca@apple.com>
+
+        Remove Qt code from Platform/
+        https://bugs.webkit.org/show_bug.cgi?id=122240
+
+        Reviewed by Andreas Kling.
+
+        * Platform/CoreIPC/Connection.h:
+        * Platform/Logging.cpp:
+        * Platform/Logging.h:
+        * Platform/Module.h:
+        * Platform/PlatformProcessIdentifier.h:
+        * Platform/SharedMemory.h:
+        * Platform/WorkQueue.h:
+        * Platform/qt/LoggingQt.cpp: Removed.
+        * Platform/qt/ModuleQt.cpp: Removed.
+        * Platform/qt/WorkQueueQt.cpp: Removed.
+
 2013-10-02  Tim Horton  <timothy_horton@apple.com>
 
         [mac] Stop using DrawingAreaImpl on PLATFORM(MAC) 
index ae002a46649c9b3cb478623bc7004e31d25dd9e4..ba800410e5d11f8592372f3b0011c7db8509b704 100644 (file)
 #if HAVE(XPC)
 #include <xpc/xpc.h>
 #endif
-#elif PLATFORM(QT)
-QT_BEGIN_NAMESPACE
-class QSocketNotifier;
-QT_END_NAMESPACE
 #endif
 
-#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(GTK) || PLATFORM(EFL)
 #include "PlatformProcessIdentifier.h"
 #endif
 
@@ -139,8 +135,6 @@ public:
 
 #if OS(DARWIN)
     void setShouldCloseConnectionOnMachExceptions();
-#elif PLATFORM(QT)
-    void setShouldCloseConnectionOnProcessTermination(WebKit::PlatformProcessIdentifier);
 #endif
 
     void setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(bool);
@@ -318,9 +312,6 @@ private:
     Vector<int> m_fileDescriptors;
     size_t m_fileDescriptorsSize;
     int m_socketDescriptor;
-#if PLATFORM(QT)
-    QSocketNotifier* m_socketNotifier;
-#endif
 #endif
 };
 
index 1328a7a4b27dab2e731aae07535d5325a1148e9e..a26beadc4557e7a44a2ba88c2d697f0053b008f6 100644 (file)
@@ -59,14 +59,14 @@ void initializeLogChannelsIfNecessary()
     WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, logLevelString().utf8().data());
 }
 
-#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
+#if PLATFORM(GTK) || PLATFORM(EFL)
 WTFLogChannel* logChannelByName(const String& name)
 {
     return WTFLogChannelByName(logChannels, logChannelCount, name.utf8().data());
 }
 #endif
 
-#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(EFL)
+#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(EFL)
 String logLevelString()
 {
     // FIXME: Each platform will need to define their own logLevelString();
index 50c15f2b1f0ab9befcbb3e545bddd206f7ff626c..3fe50cdc9d3eea21410d5246785d9a2d1a8a7bad 100644 (file)
@@ -59,7 +59,7 @@ WEBKIT2_LOG_CHANNELS(DECLARE_LOG_CHANNEL)
 void initializeLogChannelsIfNecessary(void);
 String logLevelString();
 
-#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
+#if PLATFORM(GTK) || PLATFORM(EFL)
 WTFLogChannel* logChannelByName(const String&);
 #endif
 
index c43343bb1504040bc422af7c58c07ca979f10246..e5de8bc450bff16ebb5456f9ca39b698295e24c4 100644 (file)
 #include <wtf/RetainPtr.h>
 #endif
 
-#if PLATFORM(QT)
-#include <QLibrary>
-#endif
-
 #if PLATFORM(GTK)
 typedef struct _GModule GModule;
 #endif
@@ -77,8 +73,6 @@ private:
 #if !defined(__LP64__)
     CFBundleRefNum m_bundleResourceMap;
 #endif
-#elif PLATFORM(QT)
-    QLibrary m_lib;
 #elif PLATFORM(GTK)
     GModule* m_handle;
 #elif PLATFORM(EFL)
index 1699d35b6c1479b9e780e0b7b475e0d59404b350..deafa9c8fdcee728d5584031a7174884c5848009 100644 (file)
@@ -39,8 +39,6 @@ namespace WebKit {
 
 #if PLATFORM(MAC)
 typedef pid_t PlatformProcessIdentifier;
-#elif PLATFORM(QT)
-typedef QProcess* PlatformProcessIdentifier;
 #elif PLATFORM(GTK)
 #ifdef G_OS_WIN32
 typedef void* GPid;
index 05289b052a55e5f1ab25fe6b00856bf82cc96658..3f430dd73a2126f4b908b58db8cf5b4bcae00990 100644 (file)
@@ -30,7 +30,7 @@
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
-#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(GTK) || PLATFORM(EFL)
 #include "Attachment.h"
 #include <wtf/text/WTFString.h>
 #endif
index a4fa9dcf2fb5aab7c58eebadf1509e89a0507dee..9a28d90b6114b46a4152a7e74144a977f9893bd9 100644 (file)
 #include <wtf/Threading.h>
 #include <wtf/Vector.h>
 
-#if (PLATFORM(QT) && !OS(DARWIN)) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(GTK) || PLATFORM(EFL)
 #include "PlatformProcessIdentifier.h"
 #endif
 
-#if PLATFORM(QT) && !OS(DARWIN)
-#include <QSocketNotifier>
-QT_BEGIN_NAMESPACE
-class QObject;
-class QThread;
-QT_END_NAMESPACE
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
 #include <wtf/gobject/GRefPtr.h>
 typedef gboolean (*GSourceFunc) (gpointer data);
 #elif PLATFORM(EFL)
@@ -71,9 +65,6 @@ public:
 
 #if OS(DARWIN)
     dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
-#elif PLATFORM(QT)
-    QSocketNotifier* registerSocketEventHandler(int, QSocketNotifier::Type, const Function<void()>&);
-    void dispatchOnTermination(WebKit::PlatformProcessIdentifier, const Function<void()>&);
 #elif PLATFORM(GTK)
     void registerSocketEventHandler(int, int, const Function<void()>& function, const Function<void()>& closeFunction);
     void unregisterSocketEventHandler(int);
@@ -92,10 +83,6 @@ private:
 #if OS(DARWIN)
     static void executeFunction(void*);
     dispatch_queue_t m_dispatchQueue;
-#elif PLATFORM(QT)
-    class WorkItemQt;
-    QThread* m_workThread;
-    friend class WorkItemQt;
 #elif PLATFORM(GTK)
     static void startWorkQueueThread(WorkQueue*);
     void workQueueThreadBody();
diff --git a/Source/WebKit2/Platform/qt/LoggingQt.cpp b/Source/WebKit2/Platform/qt/LoggingQt.cpp
deleted file mode 100644 (file)
index 6f79518..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2011 Samsung Electronics
- * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "Logging.h"
-
-#include <QDebug>
-
-namespace WebKit {
-
-#if !LOG_DISABLED
-
-String logLevelString()
-{
-    return QString::fromLocal8Bit(qgetenv("QT_WEBKIT_LOG"));
-}
-
-#endif // !LOG_DISABLED
-
-}
diff --git a/Source/WebKit2/Platform/qt/ModuleQt.cpp b/Source/WebKit2/Platform/qt/ModuleQt.cpp
deleted file mode 100644 (file)
index fa67766..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 University of Szeged.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "Module.h"
-
-namespace WebKit {
-
-bool Module::load()
-{
-    m_lib.setFileName(static_cast<QString>(m_path));
-    m_lib.setLoadHints(QLibrary::ResolveAllSymbolsHint);
-    return m_lib.load();
-}
-
-void Module::unload()
-{
-    m_lib.unload();
-}
-
-void* Module::platformFunctionPointer(const char* functionName) const
-{
-    // Unfortunately QLibrary::resolve is not const.
-    return reinterpret_cast<void*>(const_cast<QLibrary*>(&m_lib)->resolve(functionName));
-}
-
-}
diff --git a/Source/WebKit2/Platform/qt/WorkQueueQt.cpp b/Source/WebKit2/Platform/qt/WorkQueueQt.cpp
deleted file mode 100644 (file)
index 5b1edeb..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WorkQueue.h"
-
-#include <QLocalSocket>
-#include <QObject>
-#include <QThread>
-#include <QProcess>
-#include <wtf/Threading.h>
-
-class WorkQueue::WorkItemQt : public QObject {
-    Q_OBJECT
-public:
-    WorkItemQt(WorkQueue* workQueue, const Function<void()>& function)
-        : m_queue(workQueue)
-        , m_source(0)
-        , m_signal(0)
-        , m_function(function)
-    {
-    }
-
-    WorkItemQt(WorkQueue* workQueue, QObject* source, const char* signal, const Function<void()>& function)
-        : m_queue(workQueue)
-        , m_source(source)
-        , m_signal(signal)
-        , m_function(function)
-    {
-        connect(m_source, m_signal, SLOT(execute()), Qt::QueuedConnection);
-    }
-
-    ~WorkItemQt()
-    {
-        m_queue->deref();
-    }
-
-    Q_SLOT void execute() 
-    { 
-        m_function();
-    }
-
-    Q_SLOT void executeAndDelete()
-    {
-        execute();
-        delete this;
-    }
-
-    virtual void timerEvent(QTimerEvent*)
-    {
-        executeAndDelete();
-    }
-
-    WorkQueue* m_queue;
-    QObject* m_source;
-    const char* m_signal;
-    Function<void()> m_function;
-};
-
-QSocketNotifier* WorkQueue::registerSocketEventHandler(int socketDescriptor, QSocketNotifier::Type type, const Function<void()>& function)
-{
-    ASSERT(m_workThread);
-
-    QSocketNotifier* notifier = new QSocketNotifier(socketDescriptor, type, 0);
-    notifier->setEnabled(false);
-    notifier->moveToThread(m_workThread);
-    WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, notifier, SIGNAL(activated(int)), function);
-    itemQt->moveToThread(m_workThread);
-    QMetaObject::invokeMethod(notifier, "setEnabled", Q_ARG(bool, true));
-    return notifier;
-}
-
-void WorkQueue::platformInitialize(const char*)
-{
-    m_workThread = new QThread();
-    m_workThread->start();
-}
-
-void WorkQueue::platformInvalidate()
-{
-    m_workThread->exit();
-    m_workThread->wait();
-    delete m_workThread;
-}
-
-void WorkQueue::dispatch(const Function<void()>& function)
-{
-    ref();
-    WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, function);
-    itemQt->moveToThread(m_workThread);
-    QMetaObject::invokeMethod(itemQt, "executeAndDelete", Qt::QueuedConnection);
-}
-
-void WorkQueue::dispatchAfterDelay(const Function<void()>& function, double delayInSecond)
-{
-    ref();
-    WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, function);
-    itemQt->startTimer(static_cast<int>(delayInSecond * 1000));
-    itemQt->moveToThread(m_workThread);
-}
-
-void WorkQueue::dispatchOnTermination(WebKit::PlatformProcessIdentifier process, const Function<void()>& function)
-{
-    WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, process, SIGNAL(finished(int, QProcess::ExitStatus)), function);
-    itemQt->moveToThread(m_workThread);
-}
-
-#include "WorkQueueQt.moc"