From kde-commits Sat Oct 13 09:13:24 2007 From: David Faure Date: Sat, 13 Oct 2007 09:13:24 +0000 To: kde-commits Subject: branches/KDE/3.5/kdelibs/kio/kio Message-Id: <1192266804.507410.24953.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=119226681614377 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::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())); } }