Ticket #5935: 00-5935-mythfrontend-showusage.patch
File 00-5935-mythfrontend-showusage.patch, 1.5 KB (added by , 15 years ago) |
---|
-
mythtv/programs/mythfrontend/main.cpp
605 605 if (!halt_cmd.isEmpty()) 606 606 { 607 607 QByteArray tmp = halt_cmd.toAscii(); 608 system(tmp.constData());608 myth_system(tmp); 609 609 } 610 610 } 611 611 … … 616 616 if (!reboot_cmd.isEmpty()) 617 617 { 618 618 QByteArray tmp = reboot_cmd.toAscii(); 619 system(tmp.constData());619 myth_system(tmp); 620 620 } 621 621 } 622 622 … … 1009 1009 query.exec(); 1010 1010 } 1011 1011 1012 void PrintHelp(const MythCommandLineParser &cmdlineparser)1012 void showUsage(const MythCommandLineParser &cmdlineparser) 1013 1013 { 1014 1014 QString help = cmdlineparser.GetHelpString(false); 1015 1015 QByteArray ahelp = help.toLocal8Bit(); … … 1128 1128 !strcmp(a.argv()[argpos],"--help") || 1129 1129 !strcmp(a.argv()[argpos],"--usage")) 1130 1130 { 1131 PrintHelp(cmdline);1131 showUsage(cmdline); 1132 1132 return FRONTEND_EXIT_OK; 1133 1133 } 1134 1134 else if (!strcmp(a.argv()[argpos],"--prompt") || … … 1254 1254 !strcmp(a.argv()[argpos],"--help") || 1255 1255 !strcmp(a.argv()[argpos],"--usage"))) 1256 1256 cerr << "Invalid argument: " << a.argv()[argpos] << endl; 1257 PrintHelp(cmdline);1257 showUsage(cmdline); 1258 1258 return FRONTEND_EXIT_INVALID_CMDLINE; 1259 1259 } 1260 1260 }