Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/uicontroller.cpp
Show First 20 Lines • Show All 587 Lines • ▼ Show 20 Line(s) | 587 | { | |||
---|---|---|---|---|---|
588 | KConfigGroup mainWindowConfig(&uiConfig, | 588 | KConfigGroup mainWindowConfig(&uiConfig, | ||
589 | QStringLiteral("Main Window %1").arg(w)); | 589 | QStringLiteral("Main Window %1").arg(w)); | ||
590 | 590 | | |||
591 | foreach (Sublime::Area* defaultArea, defaultAreas()) | 591 | foreach (Sublime::Area* defaultArea, defaultAreas()) | ||
592 | { | 592 | { | ||
593 | // FIXME: using object name seems ugly. | 593 | // FIXME: using object name seems ugly. | ||
594 | QString type = defaultArea->objectName(); | 594 | QString type = defaultArea->objectName(); | ||
595 | Sublime::Area* area = this->area(w, type); | 595 | Sublime::Area* area = this->area(w, type); | ||
596 | KConfigGroup areaConfig(&mainWindowConfig, "Area " + type); | 596 | KConfigGroup areaConfig(&mainWindowConfig, QLatin1String("Area ") + type); | ||
597 | 597 | | |||
598 | areaConfig.deleteGroup(); | 598 | areaConfig.deleteGroup(); | ||
599 | areaConfig.writeEntry("id", type); | 599 | areaConfig.writeEntry("id", type); | ||
600 | saveArea(area, areaConfig); | 600 | saveArea(area, areaConfig); | ||
601 | areaConfig.sync(); | 601 | areaConfig.sync(); | ||
602 | } | 602 | } | ||
603 | } | 603 | } | ||
604 | uiConfig.sync(); | 604 | uiConfig.sync(); | ||
Show All 36 Lines | 638 | /* We loop over default areas. This means that if | |||
641 | the model were a given mainwindow can has it's own | 641 | the model were a given mainwindow can has it's own | ||
642 | area types not represented in the default set is way | 642 | area types not represented in the default set is way | ||
643 | too complex. */ | 643 | too complex. */ | ||
644 | foreach (Sublime::Area* defaultArea, defaultAreas()) | 644 | foreach (Sublime::Area* defaultArea, defaultAreas()) | ||
645 | { | 645 | { | ||
646 | QString type = defaultArea->objectName(); | 646 | QString type = defaultArea->objectName(); | ||
647 | Sublime::Area* area = this->area(w, type); | 647 | Sublime::Area* area = this->area(w, type); | ||
648 | 648 | | |||
649 | KConfigGroup areaConfig(&mainWindowConfig, "Area " + type); | 649 | KConfigGroup areaConfig(&mainWindowConfig, QLatin1String("Area ") + type); | ||
650 | 650 | | |||
651 | qCDebug(SHELL) << "Trying to restore area " << type; | 651 | qCDebug(SHELL) << "Trying to restore area " << type; | ||
652 | 652 | | |||
653 | /* This is just an easy check that a group exists, to | 653 | /* This is just an easy check that a group exists, to | ||
654 | avoid "restoring" area from empty config group, wiping | 654 | avoid "restoring" area from empty config group, wiping | ||
655 | away programmatically installed defaults. */ | 655 | away programmatically installed defaults. */ | ||
656 | if (areaConfig.readEntry("id", "") == type) | 656 | if (areaConfig.readEntry("id", "") == type) | ||
657 | { | 657 | { | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |