summaryrefslogtreecommitdiffabout
path: root/microkde/kapplication.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kapplication.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kapplication.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index f0de71e..ad0b78e 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -41,14 +41,18 @@ int KApplication::execDialog( QDialog* d )
void KApplication::showLicence()
{
- QString fileName ;
+ KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/LICENCE.TXT" );
+}
+
+void KApplication::showFile(QString caption, QString fn)
+{
QString text;
+ QString fileName;
#ifndef DESKTOP_VERSION
fileName = getenv("QPEDIR");
- fileName += "/pics/kdepim/LICENCE.TXT" ;
+ fileName += "/pics/" + fn ;
#else
- fileName = qApp->applicationDirPath () + "/kdepim/LICENCE.TXT";
+ fileName = qApp->applicationDirPath () + "/" + fn;
#endif
QFile file( fileName );
- qDebug("Licence file name %s ",fileName.latin1() );
if (!file.open( IO_ReadOnly ) ) {
return ;
@@ -59,5 +63,5 @@ void KApplication::showLicence()
QDialog dia( 0, "name", true ); ;
- dia.setCaption( "KDE-Pim/Pi licence" );
+ dia.setCaption( caption );
QVBoxLayout* lay = new QVBoxLayout( &dia );
lay->setSpacing( 3 );