Commit 033638822c7638199fe04a3ce936a3ce0871b566
1 parent
bdfb95f6
Exists in
master
Console modificado para aceitar QString como parâmetro.
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
src/console.h
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | #include <QString> | 6 | #include <QString> |
7 | #include <QSysInfo> | 7 | #include <QSysInfo> |
8 | 8 | ||
9 | -class ConsoleObject:public std::unary_function<std::string,QString> | 9 | +class ConsoleObject:public std::unary_function<QString,QString> |
10 | { | 10 | { |
11 | 11 | ||
12 | public: | 12 | public: |
@@ -18,10 +18,10 @@ public: | @@ -18,10 +18,10 @@ public: | ||
18 | 18 | ||
19 | #if defined(Q_OS_LINUX) | 19 | #if defined(Q_OS_LINUX) |
20 | QStringList options; | 20 | QStringList options; |
21 | - options << "-c" << QString::fromStdString(input); | 21 | + options << "-c" << input; |
22 | process->start("/bin/sh", options); | 22 | process->start("/bin/sh", options); |
23 | #elif defined(Q_OS_WIN) | 23 | #elif defined(Q_OS_WIN) |
24 | - process->start(QString::fromStdString(input)); | 24 | + process->start(input); |
25 | #endif | 25 | #endif |
26 | process->waitForFinished(); | 26 | process->waitForFinished(); |
27 | QString output = process->readAll(); | 27 | QString output = process->readAll(); |