[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/base/blazer
From:       Ian Reinhart Geiser <geiseri () kde ! org>
Date:       2009-02-15 13:15:32
Message-ID: 1234703732.527348.22470.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 926469 by geiseri:

use readPath to expand shell values

 M  +6 -3      launcher.cpp  


--- trunk/playground/base/blazer/launcher.cpp #926468:926469
@@ -38,6 +38,7 @@
 #include <KDE/KMimeType>
 #include <KDE/KApplication>
 #include <KDE/KSycoca>
+#include <KDE/KMessageBox>
 
 #include <QDir>
 #include <QFileInfo>
@@ -84,14 +85,16 @@
 
     if( m_desktopFilePath.isEmpty() )
     {
-        new KRun( KUrl( m_desktopStartUrl ), this);
+        kDebug() << "Prepare to launch" << m_desktopStartUrl;
+         new KRun( KUrl( m_desktopStartUrl ), this);
     }
     else
     {
         QString errorString;
         if( KToolInvocation::startServiceByDesktopPath( m_desktopFilePath, urls, \
&errorString ) > 0)  {
-            qDebug() << "Error:"  << errorString;
+            KMessageBox::detailedSorry( this, i18n("Failed to execute command"),  \
errorString ); +            kDebug() << "Error:"  << errorString;
         }
     }
 
@@ -177,7 +180,7 @@
     configureButtonFromDesktopFile( m_ui->settings, QLatin1String("systemsettings") \
);  
     KConfigGroup paths = KGlobal::config()->group(QLatin1String("Paths"));
-    QString documentsDirectory = paths.readEntry( QLatin1String("Documents"),
+    QString documentsDirectory = paths.readPathEntry( QLatin1String("Documents"),
                                                   \
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) );  \
m_ui->documents->setIcon( KIcon("folder.png") );  \
m_ui->documents->setDesktopStartUrl( documentsDirectory );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic