diff --git a/src/kde/kioslave/recoll/CMakeLists.txt b/src/kde/kioslave/recoll/CMakeLists.txt
new file mode 100644
index 00000000..07a50677
--- /dev/null
+++ b/src/kde/kioslave/recoll/CMakeLists.txt
@@ -0,0 +1,46 @@
+project(kio_recoll)
+set(VERSION_MAJOR "1")
+set(VERSION_MINOR "11")
+set(VERSION_PATCH "0")
+set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules )
+
+include(InstallRequiredSystemLibraries)
+
+#set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Recoll KIO Slave")
+#set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
+#set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
+#set(CPACK_PACKAGE_VERSION "${VERSION}")
+#set(CPACK_GENERATOR TGZ)
+#set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}" CACHE INTERNAL "
+#tarball basename")
+#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${CPACK_PACKAGE_VERSION}")
+#include(CPack)
+
+# search packages used by KDE
+find_package(KDE4 REQUIRED)
+include (UsePkgConfig)
+include (KDE4Defaults)
+include (MacroLibrary)
+include(MacroOptionalAddSubdirectory)
+
+add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
+
+set(depth ../../../)
+
+include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}
+${depth}/utils ${depth}/rcldb ${depth}/query ${depth}/unac
+${depth}/common ${depth}/internfile ${depth}/index ${depth}/bincimapmime
+)
+
+set(kio_recoll_SRCS
+ kio_recoll.cpp
+)
+
+kde4_add_plugin(kio_recoll ${kio_recoll_SRCS})
+link_directories(/home/dockes/projets/fulltext/recoll/src/lib)
+target_link_libraries(kio_recoll rcl xapian ${KDE4_KIO_LIBS})
+
+
+install(TARGETS kio_recoll DESTINATION ${PLUGIN_INSTALL_DIR})
+install(FILES recoll.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
diff --git a/src/kde/kioslave/recoll/Makefile b/src/kde/kioslave/recoll/Makefile
index 634087f7..2ae9a1ce 100644
--- a/src/kde/kioslave/recoll/Makefile
+++ b/src/kde/kioslave/recoll/Makefile
@@ -1,59 +1,269 @@
-depth=../../..
-include $(depth)/mk/sysconf
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 2.6
-# Need to set this by hand until we decide how to autoconf this without
-# bringing 2mbytes of kde config files.
-# May also need to adjust stuff such as the --rpath's below
-#
-KDE_INCLUDES=/usr/include/kde
-QT_INCLUDES=/usr/include/qt3
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canoncical targets will work.
+.SUFFIXES:
+
+# Remove some rules from gmake that .SUFFIXES does not remove.
+SUFFIXES =
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /usr/bin/cmake
+
+# The command to remove a file.
+RM = /usr/bin/cmake -E remove -f
+
+# The program to use to edit the cache.
+CMAKE_EDIT_COMMAND = /usr/bin/ccmake
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /home/dockes/projets/fulltext/recoll/src/kde/kioslave/recoll
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /home/dockes/projets/fulltext/recoll/src/kde/kioslave/recoll
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target edit_cache
+edit_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
+ /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+.PHONY : edit_cache/fast
+
+# Special rule for the target install
+install: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install
+
+# Special rule for the target install
+install/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install/fast
+
+# Special rule for the target install/local
+install/local: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+ /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local
+
+# Special rule for the target install/local
+install/local/fast: install/local
+.PHONY : install/local/fast
+
+# Special rule for the target install/strip
+install/strip: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+ /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip
+
+# Special rule for the target install/strip
+install/strip/fast: install/strip
+.PHONY : install/strip/fast
+
+# Special rule for the target list_install_components
+list_install_components:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
+.PHONY : list_install_components
+
+# Special rule for the target list_install_components
+list_install_components/fast: list_install_components
+.PHONY : list_install_components/fast
+
+# Special rule for the target package
+package: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..."
+ /usr/bin/cpack --config /home/dockes/projets/fulltext/recoll/src/kde/kioslave/recoll/CPackConfig.cmake
+.PHONY : package
+
+# Special rule for the target package
+package/fast: package
+.PHONY : package/fast
+
+# Special rule for the target package_source
+package_source:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..."
+ /usr/bin/cpack --config /home/dockes/projets/fulltext/recoll/src/kde/kioslave/recoll/CPackSourceConfig.cmake
+.PHONY : package_source
+
+# Special rule for the target package_source
+package_source/fast: package_source
+.PHONY : package_source/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+ /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+.PHONY : rebuild_cache/fast
+
+# Special rule for the target test
+test:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
+ /usr/bin/ctest --force-new-ctest-process $(ARGS)
+.PHONY : test
+
+# Special rule for the target test
+test/fast: test
+.PHONY : test/fast
+
+# The main all target
+all: cmake_check_build_system
+ $(CMAKE_COMMAND) -E cmake_progress_start /home/dockes/projets/fulltext/recoll/src/kde/kioslave/recoll/CMakeFiles /home/dockes/projets/fulltext/recoll/src/kde/kioslave/recoll/CMakeFiles/progress.make
+ $(MAKE) -f CMakeFiles/Makefile2 all
+ $(CMAKE_COMMAND) -E cmake_progress_start /home/dockes/projets/fulltext/recoll/src/kde/kioslave/recoll/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
+clean:
+ $(MAKE) -f CMakeFiles/Makefile2 clean
+.PHONY : clean
+
+# The main clean target
+clean/fast: clean
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+ $(MAKE) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+ $(MAKE) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+ $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+#=============================================================================
+# Target rules for targets named kio_recoll
+
+# Build rule for target.
+kio_recoll: cmake_check_build_system
+ $(MAKE) -f CMakeFiles/Makefile2 kio_recoll
+.PHONY : kio_recoll
+
+# fast build rule for target.
+kio_recoll/fast:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/build
+.PHONY : kio_recoll/fast
+
+# Manual pre-install relink rule for target.
+kio_recoll/preinstall:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/preinstall
+.PHONY : kio_recoll/preinstall
+
+#=============================================================================
+# Target rules for targets named uninstall
+
+# Build rule for target.
+uninstall: cmake_check_build_system
+ $(MAKE) -f CMakeFiles/Makefile2 uninstall
+.PHONY : uninstall
+
+# fast build rule for target.
+uninstall/fast:
+ $(MAKE) -f CMakeFiles/uninstall.dir/build.make CMakeFiles/uninstall.dir/build
+.PHONY : uninstall/fast
+
+# target to build an object file
+kio_recoll.o:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/kio_recoll.o
+.PHONY : kio_recoll.o
+
+# target to preprocess a source file
+kio_recoll.i:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/kio_recoll.i
+.PHONY : kio_recoll.i
+
+# target to generate assembly for a file
+kio_recoll.s:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/kio_recoll.s
+.PHONY : kio_recoll.s
+
+# target to build an object file
+kio_recoll_automoc.o:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/kio_recoll_automoc.o
+.PHONY : kio_recoll_automoc.o
+
+# target to preprocess a source file
+kio_recoll_automoc.i:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/kio_recoll_automoc.i
+.PHONY : kio_recoll_automoc.i
+
+# target to generate assembly for a file
+kio_recoll_automoc.s:
+ $(MAKE) -f CMakeFiles/kio_recoll.dir/build.make CMakeFiles/kio_recoll.dir/kio_recoll_automoc.s
+.PHONY : kio_recoll_automoc.s
+
+# Help Target
+help:
+ @echo "The following are some of the valid targets for this Makefile:"
+ @echo "... all (the default if no target is provided)"
+ @echo "... clean"
+ @echo "... depend"
+ @echo "... edit_cache"
+ @echo "... install"
+ @echo "... install/local"
+ @echo "... install/strip"
+ @echo "... kio_recoll"
+ @echo "... list_install_components"
+ @echo "... package"
+ @echo "... package_source"
+ @echo "... rebuild_cache"
+ @echo "... test"
+ @echo "... uninstall"
+ @echo "... kio_recoll.o"
+ @echo "... kio_recoll.i"
+ @echo "... kio_recoll.s"
+ @echo "... kio_recoll_automoc.o"
+ @echo "... kio_recoll_automoc.i"
+ @echo "... kio_recoll_automoc.s"
+.PHONY : help
-all: kio_recoll.so
-DEPS_CXXFLAGS = -MT pop3.lo -MD -MP -MF .deps/pop3.Tpo
+#=============================================================================
+# Special targets to cleanup operation of make.
-INC_CXXFLAGS = -I. \
- -I$(KDE_INCLUDES) -I$(QT_INCLUDES) \
- -I$(depth)/common -I$(depth)/query -I$(depth)/utils \
- -I$(depth)/qtgui -I$(depth)/rcldb
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+ $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
-PIC_CXXFLAGS = -fPIC -DPIC
-DEBUG_CXXFLAGS = -DNDEBUG -DNO_DEBUG -O2 -O
-LANG_CXXFLAGS = -fno-exceptions -fno-check-new -fno-common
-QT_CXXFLAGS = -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL \
- -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT
-SYS_CXXFLAGS = -D_GNU_SOURCE
-THREAD_CXXFLAGS = -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread
-
-
-# -rpath=/usr/lib:/usr/local/lib \
-
-LDFLAGS = \
- -Wl,--rpath -Wl,/usr/local/lib \
- -Wl,--rpath -Wl,/usr/X11R6/lib \
- -Wl,-export-dynamic -Wl,-soname -Wl,kio_recoll.so
-THREAD_LDFLAGS = -pthread
-
-kio_recoll.so : kio_recoll.o libpic
- c++ -shared $(LDFLAGS) $(THREAD_LDFLAGS) \
- -Wl,--no-undefined \
- kio_recoll.o piclib/librcl.a \
- $(LIBXAPIAN) $(LIBICONV) \
- -L/opt/kde3/lib -L/usr/local/lib -L/usr/X11R6/lib -lkio -lkdecore \
- -L/usr/lib/qt3/lib -lqt-mt \
- -L/usr/lib -lstdc++ -lm -lc \
- -o kio_recoll.so
-
-kio_recoll.o : kio_recoll.cpp kio_recoll.h
- $(CXX) -c -pipe kio_recoll.cpp $(INC_CXXFLAGS) $(PIC_CXXFLAGS) \
- $(DEBUG_CXXFLAGS) $(LANG_CXXFLAGS) $(QT_CXXFLAGS) $(SYS_CXXFLAGS) \
- $(THREAD_CXXFLAGS) \
- -o kio_recoll.o
-
-libpic:
- cd piclib;test -f Makefile || depth=$(depth)/.. sh $(depth)/../lib/mkMake
- cd piclib;$(MAKE) CXXFLAGS="$(CXXFLAGS) $(PIC_CXXFLAGS)" \
- CFLAGS="$(CFLAGS) $(PIC_CXXFLAGS)"
-
-.PHONY: all libpic
diff --git a/src/kde/kioslave/recoll/Makefile.kde3 b/src/kde/kioslave/recoll/Makefile.kde3
new file mode 100644
index 00000000..634087f7
--- /dev/null
+++ b/src/kde/kioslave/recoll/Makefile.kde3
@@ -0,0 +1,59 @@
+depth=../../..
+include $(depth)/mk/sysconf
+
+# Need to set this by hand until we decide how to autoconf this without
+# bringing 2mbytes of kde config files.
+# May also need to adjust stuff such as the --rpath's below
+#
+KDE_INCLUDES=/usr/include/kde
+QT_INCLUDES=/usr/include/qt3
+
+
+all: kio_recoll.so
+
+DEPS_CXXFLAGS = -MT pop3.lo -MD -MP -MF .deps/pop3.Tpo
+
+INC_CXXFLAGS = -I. \
+ -I$(KDE_INCLUDES) -I$(QT_INCLUDES) \
+ -I$(depth)/common -I$(depth)/query -I$(depth)/utils \
+ -I$(depth)/qtgui -I$(depth)/rcldb
+
+PIC_CXXFLAGS = -fPIC -DPIC
+DEBUG_CXXFLAGS = -DNDEBUG -DNO_DEBUG -O2 -O
+LANG_CXXFLAGS = -fno-exceptions -fno-check-new -fno-common
+QT_CXXFLAGS = -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL \
+ -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT
+SYS_CXXFLAGS = -D_GNU_SOURCE
+THREAD_CXXFLAGS = -D_THREAD_SAFE -pthread -D_THREAD_SAFE -pthread
+
+
+# -rpath=/usr/lib:/usr/local/lib \
+
+LDFLAGS = \
+ -Wl,--rpath -Wl,/usr/local/lib \
+ -Wl,--rpath -Wl,/usr/X11R6/lib \
+ -Wl,-export-dynamic -Wl,-soname -Wl,kio_recoll.so
+THREAD_LDFLAGS = -pthread
+
+kio_recoll.so : kio_recoll.o libpic
+ c++ -shared $(LDFLAGS) $(THREAD_LDFLAGS) \
+ -Wl,--no-undefined \
+ kio_recoll.o piclib/librcl.a \
+ $(LIBXAPIAN) $(LIBICONV) \
+ -L/opt/kde3/lib -L/usr/local/lib -L/usr/X11R6/lib -lkio -lkdecore \
+ -L/usr/lib/qt3/lib -lqt-mt \
+ -L/usr/lib -lstdc++ -lm -lc \
+ -o kio_recoll.so
+
+kio_recoll.o : kio_recoll.cpp kio_recoll.h
+ $(CXX) -c -pipe kio_recoll.cpp $(INC_CXXFLAGS) $(PIC_CXXFLAGS) \
+ $(DEBUG_CXXFLAGS) $(LANG_CXXFLAGS) $(QT_CXXFLAGS) $(SYS_CXXFLAGS) \
+ $(THREAD_CXXFLAGS) \
+ -o kio_recoll.o
+
+libpic:
+ cd piclib;test -f Makefile || depth=$(depth)/.. sh $(depth)/../lib/mkMake
+ cd piclib;$(MAKE) CXXFLAGS="$(CXXFLAGS) $(PIC_CXXFLAGS)" \
+ CFLAGS="$(CFLAGS) $(PIC_CXXFLAGS)"
+
+.PHONY: all libpic
diff --git a/src/kde/kioslave/recoll/kio_recoll.cpp b/src/kde/kioslave/recoll/kio_recoll.cpp
index 3f1377c1..60e0b106 100644
--- a/src/kde/kioslave/recoll/kio_recoll.cpp
+++ b/src/kde/kioslave/recoll/kio_recoll.cpp
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "@(#$Id: kio_recoll.cpp,v 1.12 2008-11-14 15:49:03 dockes Exp $ (C) 2005 J.F.Dockes";
+static char rcsid[] = "@(#$Id: kio_recoll.cpp,v 1.13 2008-11-17 14:51:38 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
#include Actual query performed: " << endl;
os << explain.c_str() << "" + "";
- string abst = escapeHtml(doc.meta["abstract"]);
- result += string(perbuf) + " " + doc.meta["title"] + "
" +
+ string abst = escapeHtml(doc.meta[Rcl::Doc::keyabs]);
+ result += string(perbuf) + " " + doc.meta[Rcl::Doc::keytt] + "
" +
doc.mimetype + " " +
(datebuf[0] ? string(datebuf) + "
" : string("
")) +
(!abst.empty() ? abst + "
" : string("")) +
- (!doc.meta["keywords"].empty() ? doc.meta["keywords"] +
+ (!doc.meta[Rcl::Doc::keytt].empty() ? doc.meta[Rcl::Doc::keykw] +
"
" : string("")) +
"" + doc.url + "