[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kio/kio
From:       David Faure <faure () kde ! org>
Date:       2007-10-13 9:13:24
Message-ID: 1192266804.507410.24953.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 724748 by dfaure:

Don't write out empty UntranslatedGenericName for most kservices into ksycoca.
Reduces the size of ksycoca by 5%.


 M  +7 -2      kservice.cpp  


--- branches/KDE/3.5/kdelibs/kio/kio/kservice.cpp #724747:724748
@@ -109,6 +109,7 @@
   entryMap.remove("Hidden");
   if (m_bDeleted)
   {
+    //kdDebug() << "Hidden=true for " << entryPath() << endl;
     m_bValid = false;
     return;
   }
@@ -119,6 +120,8 @@
   {
     if (config->readEntry( "Exec" ).isEmpty())
     {
+      //kdWarning(7012) << "The desktop entry file " << entryPath()
+      //              << " has no Name and no Exec" << endl;
       m_bValid = false;
       return;
     }
@@ -152,6 +155,7 @@
 
   // In case Try Exec is set, check if the application is available
   if (!config->tryExec()) {
+      //kdDebug(7012) << "tryExec said false for " << entryPath() << endl;
       m_bDeleted = true;
       m_bValid = false;
       return;
@@ -207,7 +211,8 @@
   m_strGenName = config->readEntry( "GenericName" );
   entryMap.remove("GenericName");
   QString untranslatedGenericName = config->readEntryUntranslated( "GenericName" );
-  entryMap.insert("UntranslatedGenericName", untranslatedGenericName);
+  if (!untranslatedGenericName.isEmpty())
+    entryMap.insert("UntranslatedGenericName", untranslatedGenericName);
 
   m_lstKeywords = config->readListEntry("Keywords");
   entryMap.remove("Keywords");
@@ -254,7 +259,7 @@
   QMap<QString,QString>::ConstIterator it = entryMap.begin();
   for( ; it != entryMap.end();++it)
   {
-//     qWarning("   Key = %s Data = %s", it.key().latin1(), it.data().latin1());
+     //qDebug("   Key = %s Data = %s", it.key().latin1(), it.data().latin1());
      m_mapProps.insert( it.key(), QVariant( it.data()));
   }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic