Commit c730a7da authored by Daniel Teske's avatar Daniel Teske
Browse files

SessionManager: More useless null checks

Change-Id: Ice94b56ffda04babbb66317f77d5b121f72b051f
Reviewed-by: default avatarTobias Hunger <>
parent 32ccf8ad
......@@ -734,27 +734,19 @@ QString BookmarkManager::bookmarkToString(const Bookmark *b)
/* Saves the bookmarks to the session settings. */
void BookmarkManager::saveBookmarks()
SessionManager *s = sessionManager();
if (!s)
QStringList list;
foreach (const FileNameBookmarksMap *bookmarksMap, m_bookmarksMap)
foreach (const Bookmark *bookmark, *bookmarksMap)
list << bookmarkToString(bookmark);
s->setValue("Bookmarks", list);
sessionManager()->setValue("Bookmarks", list);
/* Loads the bookmarks from the session settings. */
void BookmarkManager::loadBookmarks()
SessionManager *s = sessionManager();
if (!s)
const QStringList &list = s->value("Bookmarks").toStringList();
const QStringList &list = sessionManager()->value("Bookmarks").toStringList();
foreach (const QString &bookmarkString, list)
......@@ -104,9 +104,7 @@ void ResourceHandler::ensureInitialized()
if (m_sessionNode)
ProjectExplorer::ProjectExplorerPlugin *pe = ProjectExplorer::ProjectExplorerPlugin::instance();
ProjectExplorer::SessionManager *session = pe->session();
m_sessionNode = session->sessionNode();
m_sessionNode = pe->session()->sessionNode();
m_sessionWatcher = new ProjectExplorer::NodesWatcher();
connect(m_sessionWatcher, SIGNAL(filesAdded()), this, SLOT(updateResources()));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment