Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 914766

Summary: dev-qt/qttools: make desktop files for installed tools
Product: Gentoo Linux Reporter: i.Dark_Templar <idarktemplar>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal CC: ionen
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description i.Dark_Templar 2023-09-26 20:28:59 UTC
dev-qt/qttools may install various tools, but they're missing from main menu in KDE. For qt-5 such tools usually install desktop files, like here:

https://github.com/gentoo/gentoo/blob/master/dev-qt/assistant/assistant-5.15.10.ebuild#L47-L49

When installing corresponding tools from qt-6, no such desktop files are present.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-qt/qttools
Actual Results:  
No desktop entries for installed tools

Expected Results:  
Desktop entries are installed for tools like in qt-5

I'd propose lines like following at the end of install section:

	if use assistant; then
		newicon -s 32 src/assistant/assistant/images/assistant.png assistant-qt6.png
		newicon -s 128 src/assistant/assistant/images/assistant-128.png assistant-qt6.png
		make_desktop_entry "${QT6_BINDIR}"/assistant 'Qt 6 Assistant' assistant-qt6 'Qt;Development;Documentation' Comment="Tool for viewing on-line documentation in Qt help file format"
	fi

	if use designer; then
		newicon -s 128 src/designer/src/designer/images/designer.png designer-qt6.png
		make_desktop_entry "${QT6_BINDIR}"/designer 'Qt 6 Designer' designer-qt6 'Qt;Development;GUIDesigner' Comment="WYSIWYG tool for designing and building graphical user interfaces with QtWidgets"
	fi

	if use linguist; then
		local size
		for size in 128; do
			newicon -s ${size} src/linguist/linguist/images/icons/linguist-${size}-32.png linguist-qt6.png
		done
		make_desktop_entry "${QT6_BINDIR}"/linguist 'Qt 6 Linguist' linguist-qt6 'Qt;Development;Translation' Comment="Graphical tool for translating Qt applications"
	fi

	if use qdbus; then
		newicon -s 32 src/qdbus/qdbusviewer/images/qdbusviewer.png qdbusviewer-qt6.png
		newicon -s 128 src/qdbus/qdbusviewer/images/qdbusviewer-128.png qdbusviewer-qt6.png
		make_desktop_entry "${QT6_BINDIR}"/qdbusviewer 'Qt 6 QDBusViewer' qdbusviewer-qt6 'Qt;Development' Comment="Graphical tool that lets you introspect D-Bus objects and messages"
	fi

	if stat "${ED}/usr/share/applications/"*.desktop &>/dev/null ; then
		# Hack: remove hardcoded original comment
		sed -i -e "/Comment=Qt Tools Collection/d" "${ED}/usr/share/applications/"*.desktop
	fi
Comment 1 Ionen Wolkens gentoo-dev 2023-09-26 22:23:32 UTC
Thanks, completely forgot about doing these.
Comment 2 Larry the Git Cow gentoo-dev 2023-09-26 23:08:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6efbe0b4f1713563754986f128d973206c7bc011

commit 6efbe0b4f1713563754986f128d973206c7bc011
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-09-26 22:26:53 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-09-26 23:07:00 +0000

    dev-qt/qttools: install .desktop files
    
    Not very worth a revbump considering 6.5.3 is around the corner,
    but does not hurt to have it for stable early as this just should
    not be missing.
    
    Descriptions and categories may need extra work, but should do
    for now.
    
    Also sync with live while revbumping.
    
    Closes: https://bugs.gentoo.org/914766
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 ...ols-6.5.2-r1.ebuild => qttools-6.5.2-r2.ebuild} | 58 +++++++++++++++++++++-
 dev-qt/qttools/qttools-6.5.9999.ebuild             | 56 ++++++++++++++++++++-
 ...-6.6.0_rc.ebuild => qttools-6.6.0_rc-r1.ebuild} | 56 ++++++++++++++++++++-
 dev-qt/qttools/qttools-6.6.9999.ebuild             | 56 ++++++++++++++++++++-
 dev-qt/qttools/qttools-6.9999.ebuild               | 56 ++++++++++++++++++++-
 5 files changed, 276 insertions(+), 6 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2025-06-07 12:02:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c0e9c2f84be75bfb4ddfd22685976cd0758d8e8

commit 9c0e9c2f84be75bfb4ddfd22685976cd0758d8e8
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2025-06-07 03:32:45 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2025-06-07 12:01:15 +0000

    dev-qt/qttools: update live
    
    wrt bug #9146766, this loses some .desktop for the minor
    tools, but given upstream added its own mechanism to install
    these would rather stick to the ones that they want to be
    installed. Ideally please ask upstream if you want more to be
    installed.
    
    wrt clang, upstream dropped support for using clang with lupdate
    (USE=linguist) and so it is now only used by qdoc, may as well
    merge USE=clang into it.
    
    Bug: https://bugs.gentoo.org/914766
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-qt/qttools/qttools-6.9999.ebuild | 87 +++++++-----------------------------
 1 file changed, 16 insertions(+), 71 deletions(-)