Ticket #6160: 00-6160-mythfrontend-showusage.patch
File 00-6160-mythfrontend-showusage.patch, 2.2 KB (added by , 15 years ago) |
---|
-
mythtv/programs/mythfrontend/main.cpp
952 952 query.exec(); 953 953 } 954 954 955 void PrintHelp(const MythCommandLineParser &cmdlineparser)955 void ShowUsage(const MythCommandLineParser &cmdlineparser) 956 956 { 957 957 QString help = cmdlineparser.GetHelpString(false); 958 958 QByteArray ahelp = help.toLocal8Bit(); … … 1071 1071 !strcmp(a.argv()[argpos],"--help") || 1072 1072 !strcmp(a.argv()[argpos],"--usage")) 1073 1073 { 1074 PrintHelp(cmdline);1074 ShowUsage(cmdline); 1075 1075 return FRONTEND_EXIT_OK; 1076 1076 } 1077 1077 else if (!strcmp(a.argv()[argpos],"--prompt") || … … 1197 1197 !strcmp(a.argv()[argpos],"--help") || 1198 1198 !strcmp(a.argv()[argpos],"--usage"))) 1199 1199 cerr << "Invalid argument: " << a.argv()[argpos] << endl; 1200 PrintHelp(cmdline);1200 ShowUsage(cmdline); 1201 1201 return FRONTEND_EXIT_INVALID_CMDLINE; 1202 1202 } 1203 1203 } -
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!");