[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdevplatform] shell: Don't save/restore active area across restarts
From: Niko Sams <niko.sams () gmail ! com>
Date: 2013-12-29 10:50:15
Message-ID: E1VxDwl-00051r-0R () scm ! kde ! org
[Download RAW message or body]
Git commit 2e26d0bcf1c15beac3e3d9e8592cdb3d94dd2297 by Niko Sams.
Committed on 29/12/2013 at 10:49.
Pushed by nsams into branch 'master'.
Don't save/restore active area across restarts
REIVEW: 103764
M +2 -13 shell/uicontroller.cpp
http://commits.kde.org/kdevplatform/2e26d0bcf1c15beac3e3d9e8592cdb3d94dd2297
diff --git a/shell/uicontroller.cpp b/shell/uicontroller.cpp
index c6ce844..fbce314 100644
--- a/shell/uicontroller.cpp
+++ b/shell/uicontroller.cpp
@@ -489,11 +489,8 @@ void UiController::saveAllAreas(KSharedConfig::Ptr config)
uiConfig.writeEntry("Main Windows Count", wc);
for (int w = 0; w < wc; ++w)
{
- Sublime::MainWindow *mw = mainWindows()[w];
-
KConfigGroup mainWindowConfig(&uiConfig,
QString("Main Window %1").arg(w));
- mainWindowConfig.writeEntry("currentArea", mw->area()->objectName());
foreach (Sublime::Area* defaultArea, defaultAreas())
{
@@ -539,10 +536,6 @@ void UiController::loadAllAreas(KSharedConfig::Ptr config)
{
KConfigGroup mainWindowConfig(&uiConfig,
QString("Main Window %1").arg(w));
- QString currentArea = mainWindowConfig.readEntry("currentArea", "");
-
- if(currentArea == "test") ///@todo The area was renamed, and it will lead to \
a crash, so this is a dirty temporary workaround
- currentArea = "review";
Sublime::MainWindow *mw = mainWindows()[w];
@@ -580,12 +573,8 @@ void UiController::loadAllAreas(KSharedConfig::Ptr config)
}
}
- // FIXME: check that an area of this name exists.
- if (!currentArea.isEmpty())
- showArea(currentArea, mw);
- else
- // Force reload of the changes.
- showAreaInternal(mw->area(), mw);
+ // Force reload of the changes.
+ showAreaInternal(mw->area(), mw);
mw->enableAreaSettingsSave();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic