No dependencies on STL
authorKuzma Shapran <kuzma.shapran@gmail.com>
Thu, 23 May 2013 06:32:17 +0000 (18:32 +1200)
committerKuzma Shapran <kuzma.shapran@gmail.com>
Thu, 23 May 2013 06:32:17 +0000 (18:32 +1200)
programfinder.cpp

index 1d07c9b..e5d5db2 100644 (file)
@@ -58,7 +58,7 @@ QStringList ProgramFinder::findPrograms(const QStringList& programs)
 QString ProgramFinder::programName(const QString& command)
 {
     wordexp_t we;
-    if (wordexp(command.toStdString().c_str(), &we, WRDE_NOCMD) == 0)
+    if (wordexp(command.toLocal8Bit().constData(), &we, WRDE_NOCMD) == 0)
         if (we.we_wordc > 0)
             return QString(we.we_wordv[0]);
     return QString();