[webkit-qt] QtScript dependency optional?

Konstantin Tokarev annulen at yandex.ru
Fri Jan 14 09:06:39 PST 2011


I've found that QtWebKit does not actually depend on QtScript module (at least if configured without 
V8 support). 

The only thing actually used is enum QScriptEngine::ValueOwnership. If its definition is included into 
Source/WebCore/bridge/qt/qt_instance.h and WebKit/qt/Api/qwebframe.h, QtWebKit compiles fine if
QtScript module is disabled in Qt configuration.

Will it be OK if I add new header with the next code

#ifndef QT_NO_SCRIPT
#include <QtScript/qscriptengine.h>
#else
QT_BEGIN_NAMESPACE
namespace QScriptEngine {
    enum ValueOwnership {
        QtOwnership,
        ScriptOwnership,
        AutoOwnership
    };
}
QT_END_NAMESPACE
#endif

This header needs to be "public" because it's needed for qwebframe.h

-- 
Regards,
Konstantin


More information about the webkit-qt mailing list