From 714bcacfe491d384ec2499fb3c3d0d935635828b Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 9 Aug 2021 00:57:40 +0300 Subject: [PATCH] khotkeys: remove unused get_menu_entry_from_path() function Signed-off-by: Ivailo Monev --- .../libkhotkeysprivate/khotkeysglobal.cpp | 19 ------------------- khotkeys/libkhotkeysprivate/khotkeysglobal.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/khotkeys/libkhotkeysprivate/khotkeysglobal.cpp b/khotkeys/libkhotkeysprivate/khotkeysglobal.cpp index 0e4933ce..8db771f0 100644 --- a/khotkeys/libkhotkeysprivate/khotkeysglobal.cpp +++ b/khotkeys/libkhotkeysprivate/khotkeysglobal.cpp @@ -57,24 +57,5 @@ bool khotkeys_active() { return _khotkeys_active; } - -// does the opposite of KStandardDirs::findResource() i.e. e.g. -// "/opt/kde2/share/applnk/System/konsole.desktop" -> "System/konsole.desktop" -QString get_menu_entry_from_path( const QString& path_P ) - { - const QStringList dirs = KGlobal::dirs()->resourceDirs( "apps" ); - for( QStringList::ConstIterator it = dirs.constBegin(); - it != dirs.constEnd(); - ++it ) - if( path_P.indexOf( *it ) == 0 ) - { - QString ret = path_P; - ret.remove( 0, (*it).length()); - if( ret[ 0 ] == '/' ) - ret.remove( 0, 1 ); - return ret; - } - return path_P; - } } // namespace KHotKeys diff --git a/khotkeys/libkhotkeysprivate/khotkeysglobal.h b/khotkeys/libkhotkeysprivate/khotkeysglobal.h index 9740c32c..5c41d7f8 100644 --- a/khotkeys/libkhotkeysprivate/khotkeysglobal.h +++ b/khotkeys/libkhotkeysprivate/khotkeysglobal.h @@ -34,8 +34,6 @@ extern QPointer windows_handler; KDE_EXPORT bool khotkeys_active(); KDE_EXPORT void khotkeys_set_active( bool active_P ); -QString get_menu_entry_from_path( const QString& path_P ); - KDE_EXPORT void init_global_data( bool active_P, QObject* owner_P ); const char* const MENU_EDITOR_ENTRIES_GROUP_NAME = I18N_NOOP( "Menu Editor entries" );