[webkit-reviews] review granted: [Bug 11649] Fix Qt build : [Attachment 11572] fix the qt/kde build

bugzilla-request-daemon at macosforge.org bugzilla-request-daemon at macosforge.org
Sun Nov 19 06:41:57 PST 2006


Zack Rusin <zack at kde.org> has granted Zack Rusin <zack at kde.org>'s request for
review:
Bug 11649: Fix Qt build
http://bugs.webkit.org/show_bug.cgi?id=11649

Attachment 11572: fix the qt/kde build
http://bugs.webkit.org/attachment.cgi?id=11572&action=edit

------- Additional Comments from Zack Rusin <zack at kde.org>
>Index: CMakeLists.txt
>===================================================================
>--- CMakeLists.txt	(revision 17852)
>+++ CMakeLists.txt	(working copy)
>@@ -39,9 +39,30 @@ IF (WEBKIT_USE_XBL_SUPPORT)
> ENDIF (WEBKIT_USE_XBL_SUPPORT)
> 
> # search packages used by KDE
>-find_package (KDE4 REQUIRED)
>-include (KDE4Defaults)
>-include (MacroLibrary)
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    find_package (KDE4 REQUIRED)
>+    include (KDE4Defaults)
>+    include (MacroLibrary)
>+
>+    # use the KDE modules for finding these
>+    find_package (LibXml2 REQUIRED)
>+    find_package (LibXslt REQUIRED)
>+
>+ELSE (WEBKIT_USE_KDE_SUPPORT)
>+    INCLUDE(UsePkgConfig)
>+
>+    PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags
_LibXml2CFlags)
>+    SET(LIBXML2_LIBRARIES ${_LibXml2LinkFlags})
>+    # I'd like to use the output of --cflags directly but cmake craps out on
it ;(
>+    SET(LIBXML2_INCLUDE_DIR ${_LibXml2IncDir}/libxml2)
>+
>+    PKGCONFIG(libxslt _LibXslt2IncDir _LibXslt2LinkDir _LibXslt2LinkFlags
_LibXslt2CFlags)
>+    SET(LIBXSLT_LIBRARIES ${_LibXslt2LinkFlags})
>+    SET(LIBXSLT_INCLUDE_DIR ${_LibXslt2IncDir})
>+
>+    include(CheckLibraryExists)
>+    include(FindQt4)
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> # Special option for BuildBot, to disable output colorization (must be done
after KDE4Defaults is loaded)
> OPTION (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT "Do not colorize compilation
output." OFF)
>@@ -50,8 +71,6 @@ IF (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT)
>     set(CMAKE_COLOR_MAKEFILE OFF)
> ENDIF (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT)
> 
>-find_package (LibXml2 REQUIRED)
>-find_package (LibXslt REQUIRED)
> find_package (JPEG REQUIRED)
> find_package (PNG REQUIRED)
> 
>@@ -82,7 +101,9 @@ add_definitions (-DUSE_SYSTEM_MALLOC=1)
> 
> add_subdirectory (JavaScriptCore)
> add_subdirectory (WebCore)
>-add_subdirectory (WebKitTools/DumpRenderTree/DumpRenderTree.qtproj)
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    add_subdirectory (WebKitTools/DumpRenderTree/DumpRenderTree.qtproj)
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> add_subdirectory (WebKitQt/QtLauncher)
> 
>Index: ChangeLog
>===================================================================
>--- ChangeLog	(revision 17852)
>+++ ChangeLog	(working copy)
>@@ -1,3 +1,11 @@
>+2006-11-19  Simon Hausmann  <hausmann at kde.org>
>+
>+	  Reviewed by NOBODY (OOPS!).
>+
>+	http://bugs.webkit.org/show_bug.cgi?id=11649
>+
>+	  * CMakeLists.txt: Fix Qt-only build without KDE cmake files
>+
> 2006-10-30  Timothy Hatcher  <timothy at apple.com>
> 
>	  Reviewed by Brady.
>Index: JavaScriptCore/CMakeLists.txt
>===================================================================
>--- JavaScriptCore/CMakeLists.txt	(revision 17852)
>+++ JavaScriptCore/CMakeLists.txt	(working copy)
>@@ -10,6 +10,7 @@ check_library_exists(pthread pthread_att
> check_library_exists(pthread pthread_getattr_np "" HAVE_PTHREAD_GETATTR_NP)
> 
> include_directories(
>+    ${CMAKE_CURRENT_SOURCE_DIR}
>     ${CMAKE_CURRENT_SOURCE_DIR}/pcre
>     ${CMAKE_CURRENT_SOURCE_DIR}/bindings
>     ${CMAKE_CURRENT_SOURCE_DIR}/bindings/c
>@@ -55,12 +56,21 @@ add_custom_command(
> 
> ########### next target ###############
> 
>-kde4_add_library(wtf-unity SHARED
>-    wtf/TCSystemAlloc.cpp
>-    wtf/Assertions.cpp
>-    wtf/HashTable.cpp
>-    wtf/FastMalloc.cpp
>-)
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    kde4_add_library(wtf-unity SHARED
>+	  wtf/TCSystemAlloc.cpp
>+	  wtf/Assertions.cpp
>+	  wtf/HashTable.cpp
>+	  wtf/FastMalloc.cpp
>+    )
>+ELSE (WEBKIT_USE_KDE_SUPPORT)
>+    add_library(wtf-unity SHARED
>+	  wtf/TCSystemAlloc.cpp
>+	  wtf/Assertions.cpp
>+	  wtf/HashTable.cpp
>+	  wtf/FastMalloc.cpp
>+    )
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> set(kjs-unity_LIB_SRCS
>     ${kjs-unity_LIB_SRCS}
>@@ -118,23 +128,29 @@ set(kjs-unity_LIB_SRCS
>     kjs/ExecState.cpp
> )
> 
>-kde4_add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS})
> 
> IF (WEBKIT_USE_KDE_SUPPORT)
> if(UNIX)
>+   kde4_add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS})
>    target_link_libraries(kjs-unity  ${KDE4_KDECORE_LIBS} m )
> else(UNIX)
>    target_link_libraries(kjs-unity  ${KDE4_KDECORE_LIBS})
> endif(UNIX)
>+ELSE (WEBKIT_USE_KDE_SUPPORT)
>+   add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS})
> ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> target_link_libraries(kjs-unity wtf-unity)
> set_target_properties(kjs-unity PROPERTIES VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION} )
> 
>-install (TARGETS wtf-unity DESTINATION ${LIB_INSTALL_DIR})
>-install (TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR})
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    install (TARGETS wtf-unity DESTINATION ${LIB_INSTALL_DIR})
>+    install (TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR})
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> # testkjs
>-set(testkjs_SRCS kjs/testkjs.cpp)
>-kde4_add_executable(testkjs RUN_UNINSTALLED ${testkjs_SRCS})
>-target_link_libraries(testkjs ${KDE4_KDECORE_LIBS} kjs-unity pcre-unity
icuuc)
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    set(testkjs_SRCS kjs/testkjs.cpp)
>+    kde4_add_executable(testkjs RUN_UNINSTALLED ${testkjs_SRCS})
>+    target_link_libraries(testkjs ${KDE4_KDECORE_LIBS} kjs-unity pcre-unity
icuuc)
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
>Index: JavaScriptCore/ChangeLog
>===================================================================
>--- JavaScriptCore/ChangeLog	(revision 17852)
>+++ JavaScriptCore/ChangeLog	(working copy)
>@@ -1,3 +1,13 @@
>+2006-11-19  Simon Hausmann  <hausmann at kde.org>
>+
>+	  Reviewed by NOBODY (OOPS!).
>+
>+	  http://bugs.webkit.org/show_bug.cgi?id=11649
>+	Fix CMake Qt-only build without KDE CMake files
>+
>+	  * CMakeLists.txt:
>+	  * pcre/CMakeLists.txt:
>+
> 2006-11-17  Anders Carlsson  <acarlsson at apple.com>
> 
>	  Reviewed by Adam.
>Index: JavaScriptCore/pcre/CMakeLists.txt
>===================================================================
>--- JavaScriptCore/pcre/CMakeLists.txt (revision 17852)
>+++ JavaScriptCore/pcre/CMakeLists.txt (working copy)
>@@ -1,7 +1,11 @@
> 
> project( pcre-unity )
> 
>-include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/../wtf )
>+include_directories( 
>+    ${CMAKE_CURRENT_BINARY_DIR}
>+    ${CMAKE_CURRENT_SOURCE_DIR}/..
>+    ${CMAKE_CURRENT_SOURCE_DIR}/../wtf
>+    )
> #compile dftables.c -> dftables
> #run dftables to generate chartables.c
> 
>@@ -36,6 +40,10 @@ set(pcre-unity_LIB_SRCS
>    pcre_fullinfo.c
>    )
> 
>-kde4_add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS})
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    kde4_add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS})
>+ELSE (WEBKIT_USE_KDE_SUPPORT)
>+    add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS})
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> 
>Index: WebCore/CMakeLists.txt
>===================================================================
>--- WebCore/CMakeLists.txt	(revision 17852)
>+++ WebCore/CMakeLists.txt	(working copy)
>@@ -1,7 +1,9 @@
> 
> project( WebCore )
> 
>-include (CheckCXXCompilerFlag)
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    include (CheckCXXCompilerFlag)
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> include_directories(
>    BEFORE ${CMAKE_CURRENT_BINARY_DIR}
>@@ -51,20 +53,28 @@ include_directories(
>    ${CMAKE_CURRENT_SOURCE_DIR}/rendering
>    ${CMAKE_CURRENT_BINARY_DIR}/xml
>    ${CMAKE_CURRENT_SOURCE_DIR}/xml
>+   ${LIBXML2_INCLUDE_DIR}
>+   ${QT_INCLUDES}
> )
> 
>-include_directories( ${LIBXML2_INCLUDE_DIR} ${QT_INCLUDES} )
>-
> add_definitions( -DQT3_SUPPORT -Wno-undef -Wno-unused-parameter )
>-check_cxx_compiler_flag( -Wno-variadic-macros __KDE_HAVE_WVARIADIC_MACROS )
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    check_cxx_compiler_flag( -Wno-variadic-macros __KDE_HAVE_WVARIADIC_MACROS
)
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> IF ( __KDE_HAVE_WVARIADIC_MACROS )
>   add_definitions( -Wno-variadic-macros )
> ENDIF (__KDE_HAVE_WVARIADIC_MACROS)
> 
>-kde4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp )
>-kde4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp )
>-kde4_automoc( WebCore platform/qt/SharedTimerQt.cpp )
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    kde4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp )
>+    kde4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp )
>+    kde4_automoc( WebCore platform/qt/SharedTimerQt.cpp )
>+ELSE (WEBKIT_USE_KDE_SUPPORT)
>+    qt4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp )
>+    qt4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp )
>+    qt4_automoc( WebCore platform/qt/SharedTimerQt.cpp )
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> SET (FEATURE_DEFINES_JAVASCRIPT LANGUAGE_JAVASCRIPT)
> 
>@@ -1069,6 +1079,7 @@ set(WebCore_SRCS
>     platform/graphics/svg/qt/SVGResourceClipperQt.cpp
>     platform/graphics/svg/qt/SVGResourceImageQt.cpp
>     platform/graphics/svg/qt/SVGResourceMaskerQt.cpp
>+    platform/graphics/svg/qt/SVGResourceFilterQt.cpp
> 
>     platform/image-decoders/bmp/BMPImageDecoder.cpp
>     platform/image-decoders/gif/GIFImageDecoder.cpp
>@@ -1256,7 +1267,11 @@ set(WebCore_SRCS
>     ${WebCore-unity-IDLGeneratedSources}
> )
> 
>-kde4_add_library( WebCore-unity SHARED  ${WebCore_SRCS} )
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    kde4_add_library( WebCore-unity SHARED  ${WebCore_SRCS} )
>+ELSE (WEBKIT_USE_KDE_SUPPORT)
>+    add_library( WebCore-unity SHARED  ${WebCore_SRCS} )
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
> IF (WEBKIT_USE_KDE_SUPPORT)
> target_link_libraries(WebCore-unity
>@@ -1291,4 +1306,6 @@ target_link_libraries(WebCore-unity
> )
> ENDIF (WEBKIT_USE_KDE_SUPPORT)
> 
>-install( TARGETS WebCore-unity DESTINATION ${LIB_INSTALL_DIR} )
>+IF (WEBKIT_USE_KDE_SUPPORT)
>+    install( TARGETS WebCore-unity DESTINATION ${LIB_INSTALL_DIR} )
>+ENDIF (WEBKIT_USE_KDE_SUPPORT)
>Index: WebCore/ChangeLog
>===================================================================
>--- WebCore/ChangeLog	(revision 17852)
>+++ WebCore/ChangeLog	(working copy)
>@@ -1,3 +1,31 @@
>+2006-11-19  Simon Hausmann  <hausmann at kde.org>
>+
>+	  Reviewed by NOBODY (OOPS!).
>+
>+	  http://bugs.webkit.org/show_bug.cgi?id=11649
>+	  Fix CMake files for Qt-only build without KDE cmake files.
>+	  Fix Qt/KDE build for the SVG support.
>+	  Fix Qt-only build in the resource handler.
>+
>+	  * CMakeLists.txt:
>+	  * platform/graphics/svg/qt/SVGResourceFilterQt.cpp: Added.
>+	  (WebCore::SVGResourceFilter::SVGResourceFilter):
>+	  (WebCore::SVGResourceFilter::~SVGResourceFilter):
>+	  (WebCore::SVGResourceFilter::prepareFilter):
>+	  (WebCore::SVGResourceFilter::applyFilter):
>+	  * platform/network/qt/ResourceHandleManager.cpp:
>+	  (WebCore::ResourceHandleManager::cancel):
>+	  (WebCore::ResourceHandleManager::slotData):
>+	  (WebCore::ResourceHandleManager::slotMimetype):
>+	  (WebCore::ResourceHandleManager::slotResult):
>+	  (WebCore::ResourceHandleManager::deliverJobData):
>+	  * platform/network/qt/ResourceHandleManager.h:
>+	  * platform/network/qt/ResourceHandleQt.cpp:
>+	  * platform/qt/CursorQt.cpp:
>+	  (WebCore::noDropCursor):
>+	  (WebCore::progressCursor):
>+	  (WebCore::aliasCursor):
>+
> 2006-11-19  Mitz Pettel  <mitz at webkit.org>
> 
>	  Reviewed by Maciej.
>Index: WebCore/platform/graphics/svg/qt/SVGResourceFilterQt.cpp
>===================================================================
>--- WebCore/platform/graphics/svg/qt/SVGResourceFilterQt.cpp	(revision 0)
>+++ WebCore/platform/graphics/svg/qt/SVGResourceFilterQt.cpp	(revision 0)
>@@ -0,0 +1,51 @@
>+/*
>+    Copyright (C) 2006 Nikolas Zimmermann <wildfox at kde.org>
>+
>+    This file is part of the KDE project
>+
>+    This library is free software; you can redistribute it and/or
>+    modify it under the terms of the GNU Library General Public
>+    License as published by the Free Software Foundation; either
>+    version 2 of the License, or (at your option) any later version.
>+
>+    This library is distributed in the hope that it will be useful,
>+    but WITHOUT ANY WARRANTY; without even the implied warranty of
>+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>+    Library General Public License for more details.
>+
>+    You should have received a copy of the GNU Library General Public License

>+    aint with this library; see the file COPYING.LIB.  If not, write to
>+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
>+    Boston, MA 02111-1307, USA.
>+*/
>+
>+#include "config.h"
>+#include "SVGResourceFilter.h"
>+
>+#ifdef SVG_SUPPORT
>+
>+namespace WebCore {
>+
>+SVGResourceFilter::SVGResourceFilter()
>+{
>+}
>+
>+SVGResourceFilter::~SVGResourceFilter()
>+{
>+}
>+
>+void SVGResourceFilter::prepareFilter(const FloatRect& bbox)
>+{
>+    // FIXME: implement me :-)
>+}
>+
>+void SVGResourceFilter::applyFilter(const FloatRect& bbox)
>+{
>+    // FIXME: implement me :-)
>+}
>+
>+} // namespace WebCore
>+
>+#endif
>+
>+// vim:ts=4:noet
>Index: WebCore/platform/network/qt/ResourceHandleManager.cpp
>===================================================================
>--- WebCore/platform/network/qt/ResourceHandleManager.cpp	(revision
17852)
>+++ WebCore/platform/network/qt/ResourceHandleManager.cpp	(working copy)
>@@ -284,7 +284,23 @@ void ResourceHandleManager::add(Resource
> void ResourceHandleManager::cancel(ResourceHandle* job)
> {
>     remove(job);
>-    job->setError(1);
>+    //FIXME set an error state
>+    //job->setError(1);
>+}
>+
>+void ResourceHandleManager::slotData(KIO::Job*, const QByteArray& data)
>+{
>+    // dummy, never called in a Qt-only build
>+}
>+
>+void ResourceHandleManager::slotMimetype(KIO::Job*, const QString& type)
>+{
>+    // dummy, never called in a Qt-only build
>+}
>+
>+void ResourceHandleManager::slotResult(KJob*)
>+{
>+    // dummy, never called in a Qt-only build
> }
> 
> void ResourceHandleManager::deliverJobData(QtJob* job, const QByteArray&
data)
>@@ -299,7 +315,8 @@ void ResourceHandleManager::deliverJobDa
> 
>     d->m_client->didReceiveData(handle, data.data(), data.size());
> 
>-    handle->setError(0);
>+    //FIXME: should report an error
>+    //handle->setError(0);
>     remove(handle);
> 
>     ASSERT(m_frameClient);
>Index: WebCore/platform/network/qt/ResourceHandleManager.h
>===================================================================
>--- WebCore/platform/network/qt/ResourceHandleManager.h	(revision
17852)
>+++ WebCore/platform/network/qt/ResourceHandleManager.h	(working copy)
>@@ -33,6 +33,12 @@
> 
> #include "ResourceHandle.h"
> 
>+// forward declarations for Qt-only build
>+namespace KIO {
>+class Job;
>+}
>+class KJob;
>+
> namespace WebCore {
> 
> class FrameQtClient;
>Index: WebCore/platform/network/qt/ResourceHandleQt.cpp
>===================================================================
>--- WebCore/platform/network/qt/ResourceHandleQt.cpp	(revision 17852)
>+++ WebCore/platform/network/qt/ResourceHandleQt.cpp	(working copy)
>@@ -27,7 +27,11 @@
> 
> #include "config.h"
> 
>+#if PLATFORM(KDE)
> #include <kio/job.h>
>+#endif
>+
>+#include <QRegExp>
> 
> #include "FrameQt.h"
> #include "DocLoader.h"
>Index: WebCore/platform/qt/CursorQt.cpp
>===================================================================
>--- WebCore/platform/qt/CursorQt.cpp	(revision 17852)
>+++ WebCore/platform/qt/CursorQt.cpp	(working copy)
>@@ -241,6 +241,21 @@ const Cursor& contextMenuCursor()
>     return Cursors::self()->PointerCursor;
> }
> 
>+const Cursor& noDropCursor()
>+{
>+    return Cursors::self()->PointerCursor;
>+}
>+
>+const Cursor& progressCursor()
>+{
>+    return Cursors::self()->PointerCursor;
>+}
>+
>+const Cursor& aliasCursor()
>+{
>+    return Cursors::self()->PointerCursor;
>+}
>+
> }
> 
> // vim: ts=4 sw=4 et
>Index: WebKitQt/ChangeLog
>===================================================================
>--- WebKitQt/ChangeLog (revision 17852)
>+++ WebKitQt/ChangeLog (working copy)
>@@ -1,3 +1,12 @@
>+2006-11-19  Simon Hausmann  <hausmann at kde.org>
>+
>+	  Reviewed by NOBODY (OOPS!).
>+
>+	  http://bugs.webkit.org/show_bug.cgi?id=11649
>+	  Fix Qt-only build
>+
>+	  * QtLauncher/CMakeLists.txt:
>+
> 2006-11-17  Zack Rusin  <zack at kde.org>
> 
>	  Reviewed by Mitz. Landed by Niko.
>Index: WebKitQt/QtLauncher/CMakeLists.txt
>===================================================================
>--- WebKitQt/QtLauncher/CMakeLists.txt (revision 17852)
>+++ WebKitQt/QtLauncher/CMakeLists.txt (working copy)
>@@ -23,10 +23,13 @@ include_directories(
> add_definitions(-Wno-undef -Wno-unused-parameter)
> 
> set(testunity_SRCS main.cpp)
>-kde4_automoc(testunity ${testunity_SRCS})
>-kde4_add_executable(testunity RUN_UNINSTALLED ${testunity_SRCS})
> IF (WEBKIT_USE_KDE_SUPPORT)
>-target_link_libraries(testunity  ${KDE4_KDECORE_LIBS} WebCore-unity )
>+    kde4_add_executable(testunity RUN_UNINSTALLED ${testunity_SRCS})
>+    target_link_libraries(testunity  ${KDE4_KDECORE_LIBS} WebCore-unity)
>+    kde4_automoc(testunity ${testunity_SRCS})
> ELSE (WEBKIT_USE_KDE_SUPPORT)
>-target_link_libraries(testunity WebCore-unity )
>+    include_directories(${QT_INCLUDES})
>+    add_executable(testunity ${testunity_SRCS})
>+    target_link_libraries(testunity WebCore-unity)
>+    qt4_automoc(testunity ${testunity_SRCS})
> ENDIF (WEBKIT_USE_KDE_SUPPORT)



More information about the webkit-reviews mailing list