From 6468d1790a7091ea16fccd87dfd39462556f71d4 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sun, 24 Apr 2022 10:53:18 +0300 Subject: [PATCH] KPresenter: look in DATADIR/kpresenter for template This is because when the app is launched as part of KOShell, the appname is koshell instead of kpresenter, making usage of APPDATADIR fail. This resolves issue #21. Signed-off-by: Mavridis Philippe --- kpresenter/KPrDocument.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kpresenter/KPrDocument.cpp b/kpresenter/KPrDocument.cpp index c914b094c..bcab0f2e2 100644 --- a/kpresenter/KPrDocument.cpp +++ b/kpresenter/KPrDocument.cpp @@ -3601,7 +3601,7 @@ TQString KPrDocument::templateFileName( bool chooseTemplate, const TQString &the TQString fileName; if ( !chooseTemplate ) { if ( theFile.isEmpty() ) - fileName = locateLocal( "appdata", "default.kpr" ); + fileName = locateLocal( "data", "kpresenter/default.kpr" ); else fileName = theFile; } else { @@ -3617,7 +3617,7 @@ TQString KPrDocument::templateFileName( bool chooseTemplate, const TQString &the KURL src, dest; src.setPath( fileName ); - dest.setPath( locateLocal( "appdata", "default.kpr" ) ); + dest.setPath( locateLocal( "data", "kpresenter/default.kpr" ) ); kdDebug(33001) << "Copying template (in KPrDocument::templateFileName)" << endl << " from: " << src.prettyURL() << endl << " to: " << dest.prettyURL() << endl;