Changeset View
Changeset View
Standalone View
Standalone View
kcms/componentchooser/componentchooserbrowser.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 70 | { | |||
---|---|---|---|---|---|
99 | // add a other option to add a new browser | 99 | // add a other option to add a new browser | ||
100 | addItem(QIcon::fromTheme(QStringLiteral("application-x-shellscript")), i18n("Other...")); | 100 | addItem(QIcon::fromTheme(QStringLiteral("application-x-shellscript")), i18n("Other...")); | ||
101 | 101 | | |||
102 | emit changed(false); | 102 | emit changed(false); | ||
103 | } | 103 | } | ||
104 | 104 | | |||
105 | void CfgBrowser::save(KConfig *) | 105 | void CfgBrowser::save(KConfig *) | ||
106 | { | 106 | { | ||
107 | if (currentIndex() == count() -1) { | ||||
bport: add a space between - and 1
By the way this check seems strange to me, can you confirm it… | |||||
Once the user has added browsers to the list, they appear as before last entries. meven: Once the user has added browsers to the list, they appear as before last entries.
`… | |||||
108 | // no browser installed, nor selected | ||||
109 | return; | ||||
110 | } | ||||
111 | | ||||
107 | const QString browserStorageId = currentData().toString(); | 112 | const QString browserStorageId = currentData().toString(); | ||
108 | 113 | | |||
109 | BrowserSettings settings; | 114 | BrowserSettings settings; | ||
110 | settings.setBrowserApplication(browserStorageId); | 115 | settings.setBrowserApplication(browserStorageId); | ||
111 | settings.save(); | 116 | settings.save(); | ||
112 | 117 | | |||
113 | // Save the default browser as scheme handler for http(s) in mimeapps.list | 118 | // Save the default browser as scheme handler for http(s) in mimeapps.list | ||
114 | KSharedConfig::Ptr mimeAppList = KSharedConfig::openConfig(QStringLiteral("mimeapps.list"), KConfig::NoGlobals, QStandardPaths::GenericConfigLocation); | 119 | KSharedConfig::Ptr mimeAppList = KSharedConfig::openConfig(QStringLiteral("mimeapps.list"), KConfig::NoGlobals, QStandardPaths::GenericConfigLocation); | ||
Show All 17 Lines |
add a space between - and 1
By the way this check seems strange to me, can you confirm it still allow to save custom browser ?