2010-07-23 Balazs Kelemen <kb@inf.u-szeged.hu>
[WebKit-https.git] / WebKit2 / UIProcess / Launcher / qt / ProcessLauncherQt.cpp
index 9e4bdb6..5be4419 100644 (file)
 #include <wtf/PassRefPtr.h>
 #include <wtf/Threading.h>
 
-#if USE(MEEGOTOUCH)
-#include <meegotouch/MComponentData>
-#endif
-
 #include <QApplication>
 #include <QDebug>
 #include <QLocalServer>
 #include <sys/resource.h>
 #include <unistd.h>
 
-#if !defined(QWEBKIT_EXPORT)
-#  if defined(QT_SHARED)
-#    define QWEBKIT_EXPORT Q_DECL_EXPORT
-#  else
-#    define QWEBKIT_EXPORT
-#  endif
-#endif
-
 using namespace WebCore;
 
 namespace WebKit {
@@ -91,7 +79,7 @@ void ProcessLauncherHelper::launch(WebKit::ProcessLauncher* launcher)
 
     setpriority(PRIO_PROCESS, webProcess->pid(), 10);
 
-    m_items.append(WorkItem::create(launcher, &WebKit::ProcessLauncher::didFinishLaunchingProcess, webProcess, m_server.serverName()).release());
+    m_items.append(WorkItem::create(launcher, &WebKit::ProcessLauncher::didFinishLaunchingProcess, webProcess, m_server.serverName()).leakPtr());
 }
 
 QLocalSocket* ProcessLauncherHelper::takePendingConnection()
@@ -173,29 +161,4 @@ CoreIPC::Connection::Identifier ProcessLauncher::createWebThread()
 
 } // namespace WebKit
 
-QWEBKIT_EXPORT int webProcessMain(int argc, char** argv)
-{
-    QApplication* app = new QApplication(argc, argv);
-
-#if USE(MEEGOTOUCH)
-    new MComponentData(argc, argv);
-#endif
-
-    srandom(time(0));
-
-    JSC::initializeThreading();
-    WTF::initializeMainThread();
-    RunLoop::initializeMainRunLoop();
-
-    // Create the connection.
-    QString identifier(app->arguments().size() > 1 ? app->arguments().at(1) : "");
-    WebKit::WebProcess::shared().initialize(identifier, RunLoop::main());
-
-    RunLoop::run();
-
-    // FIXME: Do more cleanup here.
-
-    return 0;
-}
-
 #include "ProcessLauncherQt.moc"