File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
app/src/launcher/implementation/attractmode Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 33
44// Qx Includes
55#include < qx/core/qx-regularexpression.h>
6+ #include < qx/core/qx-system.h>
67
78namespace Am
89{
@@ -12,24 +13,8 @@ namespace Am
1213
1314QString Install::versionFromExecutable () const
1415{
15- QProcess attract;
16- attract.setProgram (MAIN_EXE_PATH);
17- attract.setArguments ({" --version" });
18-
19- attract.start ();
20- if (!attract.waitForStarted (1000 ))
21- return QString ();
22-
23- if (!attract.waitForFinished (1000 ))
24- {
25- attract.kill (); // Force close
26- attract.waitForFinished ();
27-
28- return QString ();
29- }
30-
31- QString versionInfo = QString::fromLatin1 (attract.readAllStandardOutput ());
32- QRegularExpressionMatch sv = Qx::RegularExpression::SEMANTIC_VERSION.match (versionInfo);
16+ ExecuteResult res = Qx::execute (MAIN_EXE_PATH, {" --version" }, 1000 );
17+ QRegularExpressionMatch sv = Qx::RegularExpression::SEMANTIC_VERSION.match (res.output );
3318 return sv.hasMatch () ? sv.captured () : QString ();
3419}
3520
You can’t perform that action at this time.
0 commit comments