Index: ksycoca.cpp
===================================================================
--- ksycoca.cpp	(revision 774546)
+++ ksycoca.cpp	(working copy)
@@ -36,6 +36,10 @@
 #include <stdlib.h>
 #include <fcntl.h>
 
+#ifdef Q_OS_WIN
+#undef HAVE_MMAP
+#endif
+
 #ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
 #endif
@@ -181,7 +185,12 @@
      {
         kDebug(7011) << "mmap failed. (length = " << sycoca_size << ")";
 #endif
+#ifdef Q_OS_WIN
+        m_str = new QDataStream( m_database->readAll());
+        m_database->close();
+#else
         m_str = new QDataStream(m_database);
+#endif
         m_str->setVersion(QDataStream::Qt_3_1);
         sycoca_mmap = 0;
 #ifdef HAVE_MMAP
@@ -264,8 +273,10 @@
 {
     QDataStream* &m_str = KSycocaPrivate::_self->m_str;
    QIODevice *device = 0;
+#ifndef Q_OS_WIN
    if (m_str)
       device = m_str->device();
+#endif
 #ifdef HAVE_MMAP
    if (device && sycoca_mmap)
    {
