Ubuntu Pastebin

Paste from acheron at Mon, 13 Jun 2016 15:59:51 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@@ -195,49 +220,54 @@
     return hasControllingTTY;
 }
 
-void fillCommandLineOptions(KCmdLineOptions& options)
-{
-    options.add("profile <name>",
-                ki18nc("@info:shell", "Name of profile to use for new Konsole instance"));
-    options.add("fallback-profile",
-                ki18nc("@info:shell", "Use the internal FALLBACK profile"));
-    options.add("workdir <dir>",
-                ki18nc("@info:shell", "Set the initial working directory of the new tab or"
-                      " window to 'dir'"));
-    options.add("hold");
-    options.add("noclose",
-                ki18nc("@info:shell", "Do not close the initial session automatically when it"
-                      " ends."));
-    options.add("new-tab",
-                ki18nc("@info:shell", "Create a new tab in an existing window rather than"
-                      " creating a new window"));
-    options.add("tabs-from-file <file>",
-                ki18nc("@info:shell", "Create tabs as specified in given tabs configuration"
-                      " file"));
-    options.add("background-mode",
-                ki18nc("@info:shell", "Start Konsole in the background and bring to the front"
-                      " when Ctrl+Shift+F12 (by default) is pressed"));
-    options.add("separate", ki18n("Run in a separate process"));
-    options.add("show-menubar", ki18nc("@info:shell", "Show the menubar, overriding the default setting"));
-    options.add("hide-menubar", ki18nc("@info:shell", "Hide the menubar, overriding the default setting"));
-    options.add("show-tabbar", ki18nc("@info:shell", "Show the tabbar, overriding the default setting"));
-    options.add("hide-tabbar", ki18nc("@info:shell", "Hide the tabbar, overriding the default setting"));
-    options.add("fullscreen", ki18nc("@info:shell", "Start Konsole in fullscreen mode"));
-    options.add("notransparency",
-                ki18nc("@info:shell", "Disable transparent backgrounds, even if the system"
-                      " supports them."));
-    options.add("list-profiles", ki18nc("@info:shell", "List the available profiles"));
-    options.add("list-profile-properties",
-                ki18nc("@info:shell", "List all the profile properties names and their type"
-                      " (for use with -p)"));
-    options.add("p <property=value>",
-                ki18nc("@info:shell", "Change the value of a profile property."));
-    options.add("!e <cmd>",
-                ki18nc("@info:shell", "Command to execute. This option will catch all following"
-                      " arguments, so use it as the last option."));
-    options.add("+[args]", ki18nc("@info:shell", "Arguments passed to command"));
-    options.add("", ki18nc("@info:shell", "Use --nofork to run in the foreground (helpful"
-                          " with the -e option)."));
+void fillCommandLineOptions(QCommandLineParser &parser)
+{
+    parser.addOption(QCommandLineOption(QStringList() << "profile",
+                                        i18nc("@info:shell", "Name of profile to use for new Konsole instance"),
+                                        QStringLiteral("name")));
+    parser.addOption(QCommandLineOption(QStringList() << "fallback-profile",
+                                        i18nc("@info:shell", "Use the internal FALLBACK profile")));
+    parser.addOption(QCommandLineOption(QStringList() << "workdir",
+                                        i18nc("@info:shell", "Set the initial working directory of the new tab or"
+                                              " window to 'dir'"),
+                                        QStringLiteral("dir")));
+    parser.addOption(QCommandLineOption(QStringList() << "hold" << "noclose",
+                                        i18nc("@info:shell", "Do not close the initial session automatically when it"
+                                        " ends.")));
+    parser.addOption(QCommandLineOption(QStringList() << "new-tab",
+                                        i18nc("@info:shell", "Create a new tab in an existing window rather than"
+                                              " creating a new window")));
+    parser.addOption(QCommandLineOption(QStringList() << "tabs-from-file",
+                                        i18nc("@info:shell", "Create tabs as specified in given tabs configuration"
+                                        " file"),
+                                        QStringLiteral("file")));
+    parser.addOption(QCommandLineOption(QStringList() << "background-mode",
+                                        i18nc("@info:shell", "Start Konsole in the background and bring to the front"
+                                              " when Ctrl+Shift+F12 (by default) is pressed")));
+    parser.addOption(QCommandLineOption(QStringList() << "separate", i18n("Run in a separate process")));
+    parser.addOption(QCommandLineOption(QStringList() << "show-menubar", i18nc("@info:shell", "Show the menubar, overriding the default setting")));
+    parser.addOption(QCommandLineOption(QStringList() << "hide-menubar", i18nc("@info:shell", "Hide the menubar, overriding the default setting")));
+    parser.addOption(QCommandLineOption(QStringList() << "show-tabbar", i18nc("@info:shell", "Show the tabbar, overriding the default setting")));
+    parser.addOption(QCommandLineOption(QStringList() << "hide-tabbar", i18nc("@info:shell", "Hide the tabbar, overriding the default setting")));
+    parser.addOption(QCommandLineOption(QStringList() << "fullscreen", i18nc("@info:shell", "Start Konsole in fullscreen mode")));
+    parser.addOption(QCommandLineOption(QStringList() << "notransparency",
+                                        i18nc("@info:shell", "Disable transparent backgrounds, even if the system"
+                                              " supports them.")));
+    parser.addOption(QCommandLineOption(QStringList() << "list-profiles",
+                                        i18nc("@info:shell", "List the available profiles")));
+    parser.addOption(QCommandLineOption(QStringList() << "list-profile-properties",
+                                        i18nc("@info:shell", "List all the profile properties names and their type"
+                                              " (for use with -p)")));
+    parser.addOption(QCommandLineOption(QStringList() << "p",
+                                        i18nc("@info:shell", "Change the value of a profile property."),
+                                        QStringLiteral("property=value")));
+    parser.addOption(QCommandLineOption(QStringList() << "e",
+                                        i18nc("@info:shell", "Command to execute. This option will catch all following"
+                                              " arguments, so use it as the last option."),
+                                        QStringLiteral("cmd")));
+    parser.addPositionalArgument(QStringLiteral("[args]"),
+                                 i18nc("@info:shell", "Arguments passed to command"));
+
 }
Download as text