Ticket #5935: 00-5935-mythfrontend-showusage.patch

File 00-5935-mythfrontend-showusage.patch, 1.5 KB (added by Matthew Wire <devel@…>, 15 years ago)
  • mythtv/programs/mythfrontend/main.cpp

     
    605605    if (!halt_cmd.isEmpty())
    606606    {
    607607        QByteArray tmp = halt_cmd.toAscii();
    608         system(tmp.constData());
     608        myth_system(tmp);
    609609    }
    610610}
    611611
     
    616616    if (!reboot_cmd.isEmpty())
    617617    {
    618618        QByteArray tmp = reboot_cmd.toAscii();
    619         system(tmp.constData());
     619        myth_system(tmp);
    620620    }
    621621}
    622622
     
    10091009    query.exec();
    10101010}
    10111011
    1012 void PrintHelp(const MythCommandLineParser &cmdlineparser)
     1012void showUsage(const MythCommandLineParser &cmdlineparser)
    10131013{
    10141014    QString    help  = cmdlineparser.GetHelpString(false);
    10151015    QByteArray ahelp = help.toLocal8Bit();
     
    11281128                !strcmp(a.argv()[argpos],"--help") ||
    11291129                !strcmp(a.argv()[argpos],"--usage"))
    11301130        {
    1131             PrintHelp(cmdline);
     1131            showUsage(cmdline);
    11321132            return FRONTEND_EXIT_OK;
    11331133        }
    11341134        else if (!strcmp(a.argv()[argpos],"--prompt") ||
     
    12541254                !strcmp(a.argv()[argpos],"--help") ||
    12551255                !strcmp(a.argv()[argpos],"--usage")))
    12561256                cerr << "Invalid argument: " << a.argv()[argpos] << endl;
    1257             PrintHelp(cmdline);
     1257            showUsage(cmdline);
    12581258            return FRONTEND_EXIT_INVALID_CMDLINE;
    12591259        }
    12601260    }