Ticket #6160: 00-6160-mythfrontend-showusage.2.patch

File 00-6160-mythfrontend-showusage.2.patch, 2.2 KB (added by Matthew Wire <devel@…>, 15 years ago)

Refresh against 20038

  • mythtv/programs/mythfrontend/main.cpp

     
    971971    query.exec();
    972972}
    973973
    974 void PrintHelp(const MythCommandLineParser &cmdlineparser)
     974void ShowUsage(const MythCommandLineParser &cmdlineparser)
    975975{
    976976    QString    help  = cmdlineparser.GetHelpString(false);
    977977    QByteArray ahelp = help.toLocal8Bit();
     
    10901090                !strcmp(a.argv()[argpos],"--help") ||
    10911091                !strcmp(a.argv()[argpos],"--usage"))
    10921092        {
    1093             PrintHelp(cmdline);
     1093            ShowUsage(cmdline);
    10941094            return FRONTEND_EXIT_OK;
    10951095        }
    10961096        else if (!strcmp(a.argv()[argpos],"--prompt") ||
     
    12401240                !strcmp(a.argv()[argpos],"--help") ||
    12411241                !strcmp(a.argv()[argpos],"--usage")))
    12421242                cerr << "Invalid argument: " << a.argv()[argpos] << endl;
    1243             PrintHelp(cmdline);
     1243            ShowUsage(cmdline);
    12441244            return FRONTEND_EXIT_INVALID_CMDLINE;
    12451245        }
    12461246    }
  • mythtv/programs/mythfrontend/exitprompt.cpp

     
    77#include "mythdialogbox.h"
    88#include "mythmainwindow.h"
    99#include "mythscreenstack.h"
     10#include "mythsystem.h"
    1011
    1112void ExitPrompter::quit()
    1213{
     
    1920                                            "sudo /sbin/halt -p");
    2021    if (!halt_cmd.isEmpty())
    2122    {
    22         QByteArray tmp = halt_cmd.toAscii();
    23         system(tmp.constData());
     23        myth_system(halt_cmd);
    2424    }
    2525    else
    2626        VERBOSE(VB_IMPORTANT, "Cannot halt - null command!");
     
    3232                                              "sudo /sbin/reboot");
    3333    if (!reboot_cmd.isEmpty())
    3434    {
    35         QByteArray tmp = reboot_cmd.toAscii();
    36         system(tmp.constData());
     35        myth_system(reboot_cmd);
    3736    }
    3837    else
    3938        VERBOSE(VB_IMPORTANT, "Cannot reboot - null command!");