2010-08-25 Balazs Kelemen <kb@inf.u-szeged.hu>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Implement WebKit::Module for qt
        https://bugs.webkit.org/show_bug.cgi?id=44527

        * Platform/Module.h:
        * Platform/qt/ModuleQt.cpp:
        (WebKit::Module::load):
        (WebKit::Module::unload):
        (WebKit::Module::platformFunctionPointer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2f1e6410
2010-08-25 Balazs Kelemen <kb@inf.u-szeged.hu>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Implement WebKit::Module for qt
https://bugs.webkit.org/show_bug.cgi?id=44527
* Platform/Module.h:
* Platform/qt/ModuleQt.cpp:
(WebKit::Module::load):
(WebKit::Module::unload):
(WebKit::Module::platformFunctionPointer):
2010-08-24 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
......
......@@ -33,6 +33,10 @@
#include <wtf/RetainPtr.h>
#endif
#if PLATFORM(QT)
#include <QLibrary>
#endif
namespace WebKit {
class Module : public Noncopyable {
......@@ -55,6 +59,8 @@ private:
RetainPtr<CFBundleRef> m_bundle;
#elif PLATFORM(WIN)
HMODULE m_module;
#elif PLATFORM(QT)
QLibrary m_lib;
#endif
};
......
/*
* 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
......@@ -25,25 +26,23 @@
#include "Module.h"
#include "NotImplemented.h"
namespace WebKit {
bool Module::load()
{
notImplemented();
return false;
m_lib.setFileName(static_cast<QString>(m_path));
return m_lib.load();
}
void Module::unload()
{
notImplemented();
m_lib.unload();
}
void* Module::platformFunctionPointer(const char* functionName) const
{
notImplemented();
return 0;
// Unfortunately QLibrary::resolve is not const.
return const_cast<QLibrary*>(&m_lib)->resolve(functionName);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment