Summary: | Extra lines in kdialog output | ||
---|---|---|---|
Product: | [Applications] kdialog | Reporter: | Brad Hards <bhards> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | fixes for blank lines for --menu and --checklist |
Description
Brad Hards
2003-08-31 14:43:14 UTC
Created attachment 2341 [details]
fixes for blank lines for --menu and --checklist
Per original report, second part of change could break existing scripts.
Subject: kdebase/kdialog CVS commit by faure: Fix for "When using --menu, if you press cancel you get a blank line" Patch by Brad Hards <bhards@bigpond.net.au> - thanks! CCMAIL: 63517-done@bugs.kde.org M +6 -2 kdialog.cpp 1.16 --- kdebase/kdialog/kdialog.cpp #1.15:1.16 @@ -281,5 +281,7 @@ int directCommand(KCmdLineArgs *args) QString result; bool retcode = Widgets::listBox(0, title, text, list, result); + if (1 == retcode) { // OK was selected cout << result.local8Bit().data() << endl; + } return retcode ? 0 : 1; } @@ -302,5 +304,7 @@ int directCommand(KCmdLineArgs *args) unsigned int i; for (i=0; i<result.count(); i++) + if (!result[i].local8Bit().isEmpty()) { cout << result[i].local8Bit().data() << endl; + } exit( retcode ? 0 : 1 ); } |