Changeset View
Changeset View
Standalone View
Standalone View
plugins/qthelp/qthelp_config_shared.cpp
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #include "qthelp_config_shared.h" | 21 | #include "qthelp_config_shared.h" | ||
22 | 22 | | |||
23 | #include <KSharedConfig> | 23 | #include <KSharedConfig> | ||
24 | #include <KConfigGroup> | 24 | #include <KConfigGroup> | ||
25 | 25 | | |||
26 | void qtHelpReadConfig(QStringList& iconList, QStringList& nameList, | 26 | void qtHelpReadConfig(QStringList& iconList, QStringList& nameList, | ||
27 | QStringList& pathList, QStringList& ghnsList, | 27 | QStringList& pathList, QStringList& ghnsList, | ||
28 | QString& searchDir, bool& loadQtDoc) | 28 | QString& searchDir, bool& loadQtDoc, bool& extViewer) | ||
29 | { | 29 | { | ||
30 | KConfigGroup cg(KSharedConfig::openConfig(), "QtHelp Documentation"); | 30 | KConfigGroup cg(KSharedConfig::openConfig(), "QtHelp Documentation"); | ||
31 | iconList = cg.readEntry("iconList", QStringList()); | 31 | iconList = cg.readEntry("iconList", QStringList()); | ||
32 | nameList = cg.readEntry("nameList", QStringList()); | 32 | nameList = cg.readEntry("nameList", QStringList()); | ||
33 | pathList = cg.readEntry("pathList", QStringList()); | 33 | pathList = cg.readEntry("pathList", QStringList()); | ||
34 | ghnsList = cg.readEntry("ghnsList", QStringList()); | 34 | ghnsList = cg.readEntry("ghnsList", QStringList()); | ||
35 | searchDir = cg.readEntry("searchDir", QString()); | 35 | searchDir = cg.readEntry("searchDir", QString()); | ||
36 | loadQtDoc = cg.readEntry("loadQtDocs", true); | 36 | loadQtDoc = cg.readEntry("loadQtDocs", true); | ||
37 | extViewer = cg.readEntry("useExternalViewer", false); | ||||
mwolff: I'd prefer if this setting becomes global, and not per-plugin. Plugins can then decide whether… | |||||
rjvbb: marking that as a TODO for now | |||||
37 | } | 38 | } | ||
38 | 39 | | |||
39 | void qtHelpWriteConfig(const QStringList& iconList, const QStringList& nameList, | 40 | void qtHelpWriteConfig(const QStringList& iconList, const QStringList& nameList, | ||
40 | const QStringList& pathList, const QStringList& ghnsList, | 41 | const QStringList& pathList, const QStringList& ghnsList, | ||
41 | const QString& searchDir, const bool loadQtDoc) | 42 | const QString& searchDir, const bool loadQtDoc, const bool extViewer) | ||
42 | { | 43 | { | ||
43 | KConfigGroup cg(KSharedConfig::openConfig(), "QtHelp Documentation"); | 44 | KConfigGroup cg(KSharedConfig::openConfig(), "QtHelp Documentation"); | ||
44 | cg.writeEntry("iconList", iconList); | 45 | cg.writeEntry("iconList", iconList); | ||
45 | cg.writeEntry("nameList", nameList); | 46 | cg.writeEntry("nameList", nameList); | ||
46 | cg.writeEntry("pathList", pathList); | 47 | cg.writeEntry("pathList", pathList); | ||
47 | cg.writeEntry("ghnsList", ghnsList); | 48 | cg.writeEntry("ghnsList", ghnsList); | ||
48 | cg.writeEntry("searchDir", searchDir); | 49 | cg.writeEntry("searchDir", searchDir); | ||
49 | cg.writeEntry("loadQtDocs", loadQtDoc); | 50 | cg.writeEntry("loadQtDocs", loadQtDoc); | ||
51 | cg.writeEntry("useExternalViewer", extViewer); | ||||
50 | } | 52 | } |
I'd prefer if this setting becomes global, and not per-plugin. Plugins can then decide whether they are capable of external viewing or not.