MCPcopy Create free account
hub / github.com/KDE/kdevelop / load

Method load

kdevplatform/sublime/area.cpp:325–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325void Area::load(const KConfigGroup& group)
326{
327 Q_D(Area);
328
329 qCDebug(SUBLIME) << this << "loading area config";
330 d->desiredToolViews.clear();
331 const QStringList desired = group.readEntry("desired views", QStringList());
332 for (const QString& s : desired) {
333 int i = s.indexOf(QLatin1Char(':'));
334 if (i != -1)
335 {
336 const auto id = s.first(i);
337 const auto pos_i = QStringView{s}.sliced(i + 1).toInt();
338 auto pos = static_cast<Sublime::Position>(pos_i);
339 if (pos != Sublime::Left && pos != Sublime::Right && pos != Sublime::Top && pos != Sublime::Bottom)
340 {
341 pos = Sublime::Bottom;
342 }
343
344 d->desiredToolViews[id] = pos;
345 }
346 }
347}
348
349bool Area::wantToolView(const QString& id)
350{

Callers 8

initializeMethod · 0.45
loadAreaMethod · 0.45
EditStyleDialogMethod · 0.45
defaultsMethod · 0.45
applyMethod · 0.45
resetMethod · 0.45
isCanceledMethod · 0.45
applyMethod · 0.45

Calls 6

QStringListClass · 0.85
readEntryMethod · 0.80
toIntMethod · 0.80
clearMethod · 0.45
indexOfMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected