Skip to content

Commit

Permalink
Fix program freeze when starting application-provided help
Browse files Browse the repository at this point in the history
  • Loading branch information
sowelipililimute committed Aug 21, 2019
1 parent d1850df commit 4805372
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions i18n.qrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource prefix="/">
<file>i18n/qml_fr.qm</file>
<file>i18n/base.qm</file>
<file>i18n/qml_de.qm</file>
<file>i18n/qml_es.qm</file>
<file>i18n/qml_fr.qm</file>
<file>i18n/qml_de.qm</file>
</qresource>
</RCC>
2 changes: 1 addition & 1 deletion include/launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Launcher : public QObject
public:
explicit Launcher(QObject *parent = nullptr);
~Launcher();
Q_INVOKABLE QString launch(const QString &program);
Q_INVOKABLE void launch(const QString &program);
Q_INVOKABLE QString currentDE();
protected:
QProcess *m_process;
Expand Down
8 changes: 2 additions & 6 deletions src/launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@ Launcher::Launcher(QObject *parent) :
m_process(new QProcess(this))
{
}
QString Launcher::launch(const QString &program)
void Launcher::launch(const QString &program)
{
m_process->start(program);
m_process->waitForFinished(-1);
QByteArray bytes = m_process->readAllStandardOutput();
QString output = QString::fromLocal8Bit(bytes);
return output;
m_process->startDetached(program);
}
QString Launcher::currentDE()
{
Expand Down

0 comments on commit 4805372

Please sign in to comment.