Bug 353729

Summary: macro (kig-types) support seems broken
Product: [Applications] kig Reporter: Maurizio Paolini <maurizio.paolini>
Component: generalAssignee: David E. Narvaez <david.narvaez>
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kig macro to create a "segment" in the Poincare' half-plane model

Description Maurizio Paolini 2015-10-09 17:59:48 UTC
Created attachment 94919 [details]
kig macro to create a "segment" in the Poincare' half-plane model

After defining a new macro I cannot find it anywhere.
E.g., by clicking "Types" menu, then "Manage Types", the list of macros is empty
also I could not find it in the Objects menu or in the various panels.

Also, I am not able to "import" macros from files that I created some time ago.
Find as an attachment the macro that I tried to import.
Comment 1 Maurizio Paolini 2015-10-10 14:25:24 UTC
After some digging, it seems that the problem is related to a change in the Data directory
in the transition from KDE version 4 to version 5.

After creating the folder "$HOME/.local/share/kig/kig-types/" now everything seems
to work (kig is able to create and remember new macros, and I guess that now I could
also import macros).

In kde version 4 it seems that the standard location was ".kde/share/apps/kig/kig-types/"

It seems that there is no provision for path creation when it is not present... Also one could
also consider the problem of backward compatibility when a user has kig data (macros or
other stuff) in the "old" path. E.g. with a warning if kig does not find a "macros.kigt" file
in the new location.
Comment 2 David E. Narvaez 2015-10-14 10:24:07 UTC
Git commit c97e58162255db43e2030a39c79583872efed83c by David E. Narvaez.
Committed on 14/10/2015 at 10:18.
Pushed by narvaez into branch 'Applications/15.08'.

Use mkpath Instead of mkdir to Prevent Cold Start Bug

M  +1    -1    kig/kig_part.cpp

http://commits.kde.org/kig/c97e58162255db43e2030a39c79583872efed83c
Comment 3 David E. Narvaez 2015-10-14 10:26:16 UTC
I will be working on migrating the old macros next. For now, manual migration from ~/.kde/share/apps/kig/kig-types/macros.kigt should work. Some distros have ~/.kde4 instead, too.
Comment 4 Maurizio Paolini 2015-10-14 11:46:08 UTC
Migration from pre-kf5 seems to be a problem for many kde applications, not only kig.  Actually I expected a "global" migration at kde level for all kde applications.
Comment 5 David E. Narvaez 2017-10-23 14:12:46 UTC
Git commit 4b30935ae56794352757c4915b56de772a67ea42 by David E. Narváez.
Committed on 23/10/2017 at 14:12.
Pushed by narvaez into branch 'master'.

Optional Migration Code for KF5

Summary:
This is long overdue and the fact that it has not caused more trouble in
bugzilla means it is probably a non-issue, but just to be complete,
here's code that migrates the old configuration to the new directories.

Test Plan:
Delete the kigrc config file, and the kig/kig-types/macros.kigt files if you have them.
Run the application.
Run it with existing kig/kig-types/macros.kigt too to make sure it does not delete the files.

Reviewers: #kde_edu, apol

Reviewed By: apol

Subscribers: cfeck, apol

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D8225

M  +1    -0    CMakeLists.txt
M  +38   -2    kig/main.cpp

https://commits.kde.org/kig/4b30935ae56794352757c4915b56de772a67ea42