| 323 | } |
| 324 | |
| 325 | void 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 | |
| 349 | bool Area::wantToolView(const QString& id) |
| 350 | { |
no test coverage detected