Fixed tde branding of services in tdebuildsycoca. This was creating old

kde-* entries in profilerc when updating file type preferences. This
relates to bug 3083.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/79/head
Michele Calgaro 5 years ago
parent 55b56c2e50
commit 9cd27dbaa3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -775,8 +775,8 @@ VFolderMenu::locateMenuFile(const TQString &fileName)
TQString result; TQString result;
//TQString xdgMenuPrefix = TQString::fromLocal8Bit(getenv("XDG_MENU_PREFIX")); //TQString xdgMenuPrefix = TQString::fromLocal8Bit(getenv("XDG_MENU_PREFIX"));
// hardcode xdgMenuPrefix to "kde-" string until proper upstream fix // hardcode xdgMenuPrefix to "tde-" string until proper upstream fix
TQString xdgMenuPrefix = "kde-"; TQString xdgMenuPrefix = "tde-";
if (!xdgMenuPrefix.isEmpty()) if (!xdgMenuPrefix.isEmpty())
{ {
TQFileInfo fileInfo(fileName); TQFileInfo fileInfo(fileName);
@ -1032,7 +1032,7 @@ VFolderMenu::processKDELegacyDirs()
kdDebug(7021) << "processKDELegacyDirs()" << endl; kdDebug(7021) << "processKDELegacyDirs()" << endl;
TQDict<KService> items; TQDict<KService> items;
TQString prefix = "kde-"; TQString prefix = "tde-";
TQStringList relFiles; TQStringList relFiles;
TQRegExp files("\\.(desktop|kdelnk)$"); TQRegExp files("\\.(desktop|kdelnk)$");

@ -103,8 +103,8 @@ static KService::Ptr locateModule(const TQCString& module)
} }
// avoid finding random non-TDE applications // avoid finding random non-TDE applications
if ( module.left( 4 ) != "kde-" && service->library().isEmpty() ) if ( module.left( 4 ) != "tde-" && service->library().isEmpty() )
return locateModule( "kde-" + module ); return locateModule( "tde-" + module );
if(!TDECModuleLoader::testModule( module )) if(!TDECModuleLoader::testModule( module ))
{ {

@ -680,8 +680,8 @@ KService::Ptr KService::serviceByDesktopPath( const TQString& _name )
KService::Ptr KService::serviceByDesktopName( const TQString& _name ) KService::Ptr KService::serviceByDesktopName( const TQString& _name )
{ {
KService * s = KServiceFactory::self()->findServiceByDesktopName( _name.lower() ); KService * s = KServiceFactory::self()->findServiceByDesktopName( _name.lower() );
if (!s && !_name.startsWith("kde-")) if (!s && !_name.startsWith("tde-"))
s = KServiceFactory::self()->findServiceByDesktopName( "kde-"+_name.lower() ); s = KServiceFactory::self()->findServiceByDesktopName( "tde-"+_name.lower() );
return KService::Ptr( s ); return KService::Ptr( s );
} }
@ -866,7 +866,7 @@ TQString KService::newServicePath(bool showInMenu, const TQString &suggestedName
{ {
TQString base = suggestedName; TQString base = suggestedName;
if (!showInMenu) if (!showInMenu)
base.prepend("kde-"); base.prepend("tde-");
TQString result; TQString result;
for(int i = 1; true; i++) for(int i = 1; true; i++)
@ -891,7 +891,7 @@ TQString KService::newServicePath(bool showInMenu, const TQString &suggestedName
} }
else else
{ {
TQString file = result.mid(4); // Strip "kde-" TQString file = result.mid(4); // Strip "tde-"
if (!locate("apps", ".hidden/"+file).isEmpty()) if (!locate("apps", ".hidden/"+file).isEmpty())
continue; continue;
} }
@ -907,7 +907,7 @@ TQString KService::newServicePath(bool showInMenu, const TQString &suggestedName
} }
else else
{ {
TQString file = result.mid(4); // Strip "kde-" TQString file = result.mid(4); // Strip "tde-"
return ::locateLocal("apps", ".hidden/"+file); return ::locateLocal("apps", ".hidden/"+file);
} }
} }

Loading…
Cancel
Save