Ticket #6160: 00-6160-mythfrontend-showusage.2.patch
File 00-6160-mythfrontend-showusage.2.patch, 2.2 KB (added by , 15 years ago) |
---|
-
mythtv/programs/mythfrontend/main.cpp
971 971 query.exec(); 972 972 } 973 973 974 void PrintHelp(const MythCommandLineParser &cmdlineparser)974 void ShowUsage(const MythCommandLineParser &cmdlineparser) 975 975 { 976 976 QString help = cmdlineparser.GetHelpString(false); 977 977 QByteArray ahelp = help.toLocal8Bit(); … … 1090 1090 !strcmp(a.argv()[argpos],"--help") || 1091 1091 !strcmp(a.argv()[argpos],"--usage")) 1092 1092 { 1093 PrintHelp(cmdline);1093 ShowUsage(cmdline); 1094 1094 return FRONTEND_EXIT_OK; 1095 1095 } 1096 1096 else if (!strcmp(a.argv()[argpos],"--prompt") || … … 1240 1240 !strcmp(a.argv()[argpos],"--help") || 1241 1241 !strcmp(a.argv()[argpos],"--usage"))) 1242 1242 cerr << "Invalid argument: " << a.argv()[argpos] << endl; 1243 PrintHelp(cmdline);1243 ShowUsage(cmdline); 1244 1244 return FRONTEND_EXIT_INVALID_CMDLINE; 1245 1245 } 1246 1246 } -
mythtv/programs/mythfrontend/exitprompt.cpp
7 7 #include "mythdialogbox.h" 8 8 #include "mythmainwindow.h" 9 9 #include "mythscreenstack.h" 10 #include "mythsystem.h" 10 11 11 12 void ExitPrompter::quit() 12 13 { … … 19 20 "sudo /sbin/halt -p"); 20 21 if (!halt_cmd.isEmpty()) 21 22 { 22 QByteArray tmp = halt_cmd.toAscii(); 23 system(tmp.constData()); 23 myth_system(halt_cmd); 24 24 } 25 25 else 26 26 VERBOSE(VB_IMPORTANT, "Cannot halt - null command!"); … … 32 32 "sudo /sbin/reboot"); 33 33 if (!reboot_cmd.isEmpty()) 34 34 { 35 QByteArray tmp = reboot_cmd.toAscii(); 36 system(tmp.constData()); 35 myth_system(reboot_cmd); 37 36 } 38 37 else 39 38 VERBOSE(VB_IMPORTANT, "Cannot reboot - null command!");