Bug 475735 - kdevelop : wizard does not create new classes
Summary: kdevelop : wizard does not create new classes
Status: RESOLVED UPSTREAM
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: appwizard (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-17 13:11 UTC by nmset
Modified: 2023-11-21 08:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.112.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nmset 2023-10-17 13:11:04 UTC
Hi,

The new 'class wizard' in kdevelop creates empty and unsaved files.

The preview in the first page of the wizard is empty also.

Since:

Version 5.12.230802 (23.08.2)

Running on:

Operating System: Arch Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.11
Kernel Version: 6.5.7-arch1-1 (64-bit)
Graphics Platform: X11
This is observed on 2 machines.

Please note it's not about the 'new app wizard'.

Thank you.
Comment 1 Igor Kushnir 2023-10-17 17:14:22 UTC
This is likely a KArchive-related recent regression (not in KDevelop code, I think). Here is some of the output in systemd journal after trying to create a class from a template:
kdevplatform.language: could not open template "/usr/share/kdevfiletemplates/templates/c_gobject.tar.bz2"
...
kdevplatform.language: could not open template "/usr/share/kdevfiletemplates/templates/qwidget_pimpl.tar.bz2"
kdevplatform.language: Entry "class.h" is mentioned in group "Header" but is not present in the archive
kdevplatform.language: Entry "class.c" is mentioned in group "Implementation" but is not present in the archive
kdevplatform.language: Entry "class.cpp" is mentioned in group "Implementation" but is not present in the archive

Template-related KDevelop tests started failing recently with similar output. See also https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/499.
Comment 2 yudahsshadow 2023-11-02 14:32:40 UTC
I am getting this on opensuse tumbleweed as well. When I go to the folder via "Load template from file" the folder (/usr/share/kdevfiletemplates/templates for me) has nothing showing, despite both ls and dolphin showing the bzip archives.

I installed a template via ghns and it also failed with a similar message and a blank folder it its location (~/.local/share/kdevfiletemplates/templates)

Unzipping the installed template from ghns showed the .desktop files (but not the bzip archive) in the "Load template from file" picker window. Selecting the desktop file, once proper ownership and permissions were set, did nothing to add the template to the wizard. 

I also tried copying one of the default templates to ~/Downloads and unpacking it there. The file picker once again saw the .desktop but not .tar.bz2 files and selecting the .desktop file did not add the template, though no new messages appeared on the console.
Comment 3 yudahsshadow 2023-11-02 14:39:00 UTC
Upon closing the wizard, I got a new message of
kdevplatform.language: Could not find a template archive for description ""   archive file ""
Comment 4 Igor Kushnir 2023-11-07 08:21:43 UTC
This is actually a regression in shared-mime-info 2.3. Fixed in KArchive 5.112.0 (https://commits.kde.org/karchive/4455503ce4910c65758138b44bc136de9fe32cd4).
Comment 5 Igor Kushnir 2023-11-21 08:55:27 UTC
The regression is fixed in shared-mime-info 2.4: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/918d2610830d52c6b13cf7f7e35f68dcb1438ee7
Comment 6 nmset 2023-11-21 08:58:01 UTC
(In reply to Igor Kushnir from comment #5)
> The regression is fixed in shared-mime-info 2.4:

Yes, it works as expected now, thanks.