Re: wierd QT warnings and ksycoca errors

Ralf Habacker <[email protected]>
Newsgroups gmane.comp.kde.devel.cygwin
Message-ID <[email protected]>
On Sunday 08 May 2005 22:34, Sunil wrote:
> Hi Everyone,
>
> I am facing the following problems with my kde install
> on cygwin. Any help with these would be greatly
> appreciated.
>
> 1. updating the sycoca database. When I update the
> menu or add a new application association etc., it
> creates a temp ksycoca database and tries to rename it
> to the one in /var/tmp/kdecache. This fails because
> windows doesn't allow renaming to an open file. I am
> not sure which all processes mmap into this file
> during runtime and how to close it in all of them
> before rename. What would be a good strategy to tackle
> this?

There are some places in the kde sources where something like this happens. 
Usually there is only a file close required. See the appended patch, which 
fixes several problems 


> 2. I get these in my kde session log all the time:
>
> QObject::disconnect: Unexpected null parameter
> QObject::connect: Cannot connect (null)::hide() to
> Baghira::DeMaximizer::hide()
>
> I am not sure if they are errors or warnings. Anyone
> any idea?
Which application causes this warnings ?  It seems that a qt signal/slot 
connection couldn't be established. The slot is named in DeMaximizer::hide() 
in namespace Baghira.  

Regards
Ralf

_______________________________________________
kde-cygwin mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-cygwin
cygwin-shared-file-fix.patch (text/x-diff, 2.2 KB)
Index: kded/kbuildsycoca.cpp
===================================================================
RCS file: /home/kde/kdelibs/kded/kbuildsycoca.cpp,v
retrieving revision 1.111
diff -u -3 -p -B -r1.111 kbuildsycoca.cpp
--- kded/kbuildsycoca.cpp	18 Feb 2005 18:03:12 -0000	1.111
+++ kded/kbuildsycoca.cpp	9 May 2005 07:07:27 -0000
@@ -535,6 +535,9 @@ bool KBuildSycoca::recreate()
        if (tmp.status() == 0)
        {
           QString tmpFile = tmp.name();
+#ifdef __CYGWIN__
+          tmp.close();
+#endif 
           tmp.unlink();
           symlink(QFile::encodeName(path), QFile::encodeName(tmpFile));
           rename(QFile::encodeName(tmpFile), QFile::encodeName(oldPath));
Index: kinit/klauncher.cpp
===================================================================
RCS file: /home/kde/kdelibs/kinit/klauncher.cpp,v
retrieving revision 1.104.2.1
diff -u -3 -p -B -r1.104.2.1 klauncher.cpp
--- kinit/klauncher.cpp	21 Mar 2005 14:16:44 -0000	1.104.2.1
+++ kinit/klauncher.cpp	9 May 2005 07:07:31 -0000
@@ -188,6 +188,10 @@ KLauncher::KLauncher(int _kdeinitSocket)
       ::exit(1);
    }
    mPoolSocketName = domainname.name();
+#ifdef __CYGWIN__
+   domainname.close();
+   domainname.unlink();
+#endif
    mPoolSocket = new KServerSocket(QFile::encodeName(mPoolSocketName));
    connect(mPoolSocket, SIGNAL(accepted( KSocket *)),
            SLOT(acceptSlave(KSocket *)));
Index: kio/kio/slave.cpp
===================================================================
RCS file: /home/kde/kdelibs/kio/kio/slave.cpp,v
retrieving revision 1.63
diff -u -3 -p -B -r1.63 slave.cpp
--- kio/kio/slave.cpp	8 Sep 2004 12:39:04 -0000	1.63
+++ kio/kio/slave.cpp	9 May 2005 07:07:33 -0000
@@ -371,6 +371,11 @@ Slave* Slave::createSlave( const QString
 	error = KIO::ERR_CANNOT_LAUNCH_PROCESS;
 	return 0;
     }
+
+#ifdef __CYGWIN__
+   socketfile.close();
+#endif
+    
 #ifndef Q_WS_WIN
     KServerSocket *kss = new KServerSocket(QFile::encodeName(socketfile.name()));
 
@@ -468,6 +473,11 @@ Slave* Slave::holdSlave( const QString &
     if ( socketfile.status() != 0 )
 	return 0;
 
+#ifdef __CYGWIN__
+   socketfile.close();
+   socketfile.unlink();
+#endif
+
 #ifndef Q_WS_WIN
     KServerSocket *kss = new KServerSocket(QFile::encodeName(socketfile.name()));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.