Fix 'format not a string literal' error

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 6 years ago
parent ea783a62fc
commit 4eb075d1a3
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -90,32 +90,32 @@ void KDocker::printVersion(void)
// Prints the CLI arguments. Does not return
void KDocker::printUsage(char optopt)
{
if (optopt != 'h') qDebug(i18n("kdocker: invalid option -- %1").arg(optopt).local8Bit());
qDebug(i18n("Usage: KDocker [options] command\n").local8Bit());
qDebug(i18n("Docks any application into the system tray\n").local8Bit());
qDebug(i18n("command \tCommand to execute\n").local8Bit());
qDebug(i18n("Options").local8Bit());
qDebug(i18n("-a \tShow author information").local8Bit());
qDebug(i18n("-b \tDont warn about non-normal windows (blind mode)").local8Bit());
qDebug(i18n("-d \tDisable session management").local8Bit());
qDebug(i18n("-e \tEnable session management").local8Bit());
qDebug(i18n("-f \tDock window that has the focus(active window)").local8Bit());
qDebug(i18n("-h \tDisplay this help").local8Bit());
qDebug(i18n("-i icon\tCustom dock Icon").local8Bit());
qDebug(i18n("-l \tLaunch on startup").local8Bit());
qDebug(i18n("-m \tKeep application window mapped (dont hide on dock)").local8Bit());
qDebug(i18n("-o \tDock when obscured").local8Bit());
qDebug(i18n("-p secs\tSet ballooning timeout (popup time)").local8Bit());
qDebug(i18n("-q \tDisable ballooning title changes (quiet)").local8Bit());
qDebug(i18n("-t \tRemove this application from the task bar").local8Bit());
qDebug(i18n("-v \tDisplay version").local8Bit());
qDebug(i18n("-w wid \tWindow id of the application to dock\n").local8Bit());
qDebug(i18n("NOTE: Use -d for all startup scripts.\n").local8Bit());
qDebug(i18n("Bugs and wishes to gramakri@uiuc.edu").local8Bit());
qDebug(i18n("Project information at http://kdocker.sourceforge.net").local8Bit());
if (optopt != 'h') qDebug("%s", i18n("kdocker: invalid option -- %1").arg(optopt).local8Bit().data());
qDebug("%s", i18n("Usage: KDocker [options] command\n").local8Bit().data());
qDebug("%s", i18n("Docks any application into the system tray\n").local8Bit().data());
qDebug("%s", i18n("command \tCommand to execute\n").local8Bit().data());
qDebug("%s", i18n("Options").local8Bit().data());
qDebug("%s", i18n("-a \tShow author information").local8Bit().data());
qDebug("%s", i18n("-b \tDont warn about non-normal windows (blind mode)").local8Bit().data());
qDebug("%s", i18n("-d \tDisable session management").local8Bit().data());
qDebug("%s", i18n("-e \tEnable session management").local8Bit().data());
qDebug("%s", i18n("-f \tDock window that has the focus(active window)").local8Bit().data());
qDebug("%s", i18n("-h \tDisplay this help").local8Bit().data());
qDebug("%s", i18n("-i icon\tCustom dock Icon").local8Bit().data());
qDebug("%s", i18n("-l \tLaunch on startup").local8Bit().data());
qDebug("%s", i18n("-m \tKeep application window mapped (dont hide on dock)").local8Bit().data());
qDebug("%s", i18n("-o \tDock when obscured").local8Bit().data());
qDebug("%s", i18n("-p secs\tSet ballooning timeout (popup time)").local8Bit().data());
qDebug("%s", i18n("-q \tDisable ballooning title changes (quiet)").local8Bit().data());
qDebug("%s", i18n("-t \tRemove this application from the task bar").local8Bit().data());
qDebug("%s", i18n("-v \tDisplay version").local8Bit().data());
qDebug("%s", i18n("-w wid \tWindow id of the application to dock\n").local8Bit().data());
qDebug("%s", i18n("NOTE: Use -d for all startup scripts.\n").local8Bit().data());
qDebug("%s", i18n("Bugs and wishes to gramakri@uiuc.edu").local8Bit().data());
qDebug("%s", i18n("Project information at http://kdocker.sourceforge.net").local8Bit().data());
}
void KDocker::notifyPreviousInstance(Window prevInstance)

@ -39,8 +39,8 @@ static void sighandler(int sig)
DUMP_TRACE(QDir::homeDirPath() + "/kdocker.trace");
return;
}
qDebug(i18n("Caught signal %1. Cleaning up.").arg(sig).local8Bit());
qDebug("%s", i18n("Caught signal %1. Cleaning up.").arg(sig).local8Bit().data());
((KDocker *)qApp)->trayLabelMgr()->undockAll();
}

@ -206,7 +206,7 @@ bool TrayLabelMgr::processCommand(int argc, char** argv)
case '?':
return false;
case 'a':
qDebug(i18n("Girish Ramakrishnan (gramakri@uiuc.edu)").local8Bit());
qDebug("%s", i18n("Girish Ramakrishnan (gramakri@uiuc.edu)").local8Bit().data());
return false;
case 'b':
check_normality = false;
@ -281,8 +281,8 @@ QTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality)
{
if (w == None)
{
qDebug(i18n("Select the application/window to dock with button1.").local8Bit());
qDebug(i18n("Click any other button to abort\n").local8Bit());
qDebug("%s", i18n("Select the application/window to dock with button1.").local8Bit().data());
qDebug("%s", i18n("Click any other button to abort\n").local8Bit().data());
const char *err = NULL;
@ -352,7 +352,7 @@ QTrayLabel *TrayLabelMgr::dockApplication(char *argv[])
if (execvp(argv[0], argv) == -1)
{
qDebug(i18n("Failed to exec [%1]: %2").arg(argv[0]).arg(strerror(errno)).local8Bit());
qDebug("%s", i18n("Failed to exec [%1]: %2").arg(argv[0]).arg(strerror(errno)).local8Bit().data());
::exit(0); // will become a zombie in some systems :(
return NULL;
}

Loading…
Cancel
Save