Changeset View
Changeset View
Standalone View
Standalone View
tests/kmoretools/kmoretoolstest_interactive.cpp
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | |||||
109 | void KMoreToolsTestInteractive::testConfigDialogImpl(bool withNotInstalled, bool withMultipleItemsPerNotInstalledService, const QString& description) | 109 | void KMoreToolsTestInteractive::testConfigDialogImpl(bool withNotInstalled, bool withMultipleItemsPerNotInstalledService, const QString& description) | ||
110 | { | 110 | { | ||
111 | 111 | | |||
112 | KMoreTools kmt(_("unittest-kmoretools/2")); | 112 | KMoreTools kmt(_("unittest-kmoretools/2")); | ||
113 | const auto kateApp = kmt.registerServiceByDesktopEntryName(_("org.kde.kate")); | 113 | const auto kateApp = kmt.registerServiceByDesktopEntryName(_("org.kde.kate")); | ||
114 | const auto gitgApp = kmt.registerServiceByDesktopEntryName(_("gitg")); | 114 | const auto gitgApp = kmt.registerServiceByDesktopEntryName(_("gitg")); | ||
115 | const auto notinstApp = kmt.registerServiceByDesktopEntryName(_("mynotinstalledapp")); | 115 | const auto notinstApp = kmt.registerServiceByDesktopEntryName(_("mynotinstalledapp")); | ||
116 | const auto notinstApp2 = kmt.registerServiceByDesktopEntryName(_("mynotinstapp2")); | 116 | const auto notinstApp2 = kmt.registerServiceByDesktopEntryName(_("mynotinstapp2")); | ||
117 | notinstApp2->setHomepageUrl(QUrl(_("http://www.kde.org"))); | 117 | notinstApp2->setHomepageUrl(QUrl(_("https://www.kde.org"))); | ||
118 | const auto menuBuilder = kmt.menuBuilder(); | 118 | const auto menuBuilder = kmt.menuBuilder(); | ||
119 | menuBuilder->addMenuItem(kateApp); | 119 | menuBuilder->addMenuItem(kateApp); | ||
120 | menuBuilder->addMenuItem(gitgApp); | 120 | menuBuilder->addMenuItem(gitgApp); | ||
121 | if (withNotInstalled) { | 121 | if (withNotInstalled) { | ||
122 | auto item1 = menuBuilder->addMenuItem(notinstApp); | 122 | auto item1 = menuBuilder->addMenuItem(notinstApp); | ||
123 | item1->setInitialItemText(notinstApp->formatString(_("$Name - item 1"))); | 123 | item1->setInitialItemText(notinstApp->formatString(_("$Name - item 1"))); | ||
124 | 124 | | |||
125 | menuBuilder->addMenuItem(notinstApp2); | 125 | menuBuilder->addMenuItem(notinstApp2); | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
170 | { | 170 | { | ||
171 | testConfigDialogImpl(true, true, _("TEST more than one item for one not installed service")); | 171 | testConfigDialogImpl(true, true, _("TEST more than one item for one not installed service")); | ||
172 | } | 172 | } | ||
173 | 173 | | |||
174 | void KMoreToolsTestInteractive::testDialogForGroupingNames() | 174 | void KMoreToolsTestInteractive::testDialogForGroupingNames() | ||
175 | { | 175 | { | ||
176 | // show resulting menu | 176 | // show resulting menu | ||
177 | auto dlg = new QDialog(); | 177 | auto dlg = new QDialog(); | ||
178 | auto labelInfo = new QLabel(_("First, select a URL (leave the URL box empty to give no URL; don't forget to add file:// or http://). Then, select a grouping name. => A menu will be created that you can try out. KDE4/KF5: If an application does not start even there is the launch indicator, try: $ eval `dbus-launch`"), dlg); | 178 | auto labelInfo = new QLabel(_("First, select a URL (leave the URL box empty to give no URL; don't forget to add file:// or https://). Then, select a grouping name. => A menu will be created that you can try out. KDE4/KF5: If an application does not start even there is the launch indicator, try: $ eval `dbus-launch`"), dlg); | ||
179 | labelInfo->setWordWrap(true); | 179 | labelInfo->setWordWrap(true); | ||
180 | auto selectButton = new QPushButton(_("Select grouping name..."), dlg); | 180 | auto selectButton = new QPushButton(_("Select grouping name..."), dlg); | ||
181 | auto labelLineEdit = new QLabel(_("URL 1 (file://..., http://...)"), dlg); | 181 | auto labelLineEdit = new QLabel(_("URL 1 (file://..., https://...)"), dlg); | ||
182 | auto urlLineEdit = new QLineEdit(dlg); | 182 | auto urlLineEdit = new QLineEdit(dlg); | ||
183 | urlLineEdit->setText(_("file:///etc/bash.bashrc")); | 183 | urlLineEdit->setText(_("file:///etc/bash.bashrc")); | ||
184 | auto menuButton = new QPushButton(_("<wait for selection>"), dlg); | 184 | auto menuButton = new QPushButton(_("<wait for selection>"), dlg); | ||
185 | 185 | | |||
186 | const auto groupingNamesList = { | 186 | const auto groupingNamesList = { | ||
187 | _("disk-usage"), | 187 | _("disk-usage"), | ||
188 | _("disk-partitions"), | 188 | _("disk-partitions"), | ||
189 | _("files-find"), | 189 | _("files-find"), | ||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |