You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lxqt-runner-packaging/debian/patches/make-genericName-searchable...

44 lines
1.5 KiB

Description: AppLinkItem: Make genericName searchable
Author: Palo Kisa <palo.kisa@gmail.com>
Origin: backport
Bug: https://github.com/lxde/lxqt/issues/1278
Applied-Upstream: commit:c47a674
Last-Update: 2018-02-05
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
-set(REQUIRED_MENUCACHE_VERSION "0.3.3")
+set(REQUIRED_MENUCACHE_VERSION "1.1.0")
include(CMakeDependentOption)
include(GNUInstallDirs)
--- a/providers.cpp
+++ b/providers.cpp
@@ -192,8 +192,8 @@ AppLinkItem::AppLinkItem(MenuCacheApp* a
MenuCacheItem* item = MENU_CACHE_ITEM(app);
mIconName = QString::fromUtf8(menu_cache_item_get_icon(item));
mTitle = QString::fromUtf8(menu_cache_item_get_name(item));
- mComment = QString::fromUtf8(menu_cache_item_get_comment(item));
- mToolTip = mComment;
+ mComment = QString::fromUtf8(menu_cache_app_get_generic_name(app));
+ mToolTip = QString::fromUtf8(menu_cache_item_get_comment(item));
mCommand = menu_cache_app_get_exec(app);
mProgram = QFileInfo(mCommand).baseName().section(" ", 0, 0);
char* path = menu_cache_item_get_file_path(MENU_CACHE_ITEM(app));
@@ -271,8 +271,10 @@ bool AppLinkItem::compare(const QRegExp
if (regExp.isEmpty())
return false;
- return mProgram.contains(regExp) ||
- mTitle.contains(regExp) ;
+ return mProgram.contains(regExp)
+ || mTitle.contains(regExp)
+ || mComment.contains(regExp)
+ || mToolTip.contains(regExp);
}