~osomon/webbrowser-app/use-grabToImage

« back to all changes in this revision

Viewing changes to src/app/webbrowser/settings.cpp

  • Committer: CI Train Bot
  • Author(s): Olivier Tilloy
  • Date: 2015-02-17 20:54:12 UTC
  • mfrom: (897.1.1 setting-no-restore-session)
  • Revision ID: ci-train-bot@canonical.com-20150217205412-246oc8fcngugktsq
Add a config option to allow users to turn off automatic session restore.

To turn off session restore, add the following line to ~/.config/webbrowser-app/settings.conf :

    restoreSession = false Fixes: #1366530
Approved by: Michael Zanetti

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2013 Canonical Ltd.
 
2
 * Copyright 2013-2015 Canonical Ltd.
3
3
 *
4
4
 * This file is part of webbrowser-app.
5
5
 *
33
33
    QString name = settings.value("searchengine", QString(DEFAULT_SEARCH_ENGINE)).toString();
34
34
    m_searchengine = new SearchEngine(name, this);
35
35
    m_allowOpenInBackgroundTab = settings.value("allowOpenInBackgroundTab", "default").toString().toLower();
 
36
    m_restoreSession = settings.value("restoreSession", true).toBool();
36
37
}
37
38
 
38
39
const QUrl& Settings::homepage() const
49
50
{
50
51
    return m_allowOpenInBackgroundTab;
51
52
}
 
53
 
 
54
bool Settings::restoreSession() const
 
55
{
 
56
    return m_restoreSession;
 
57
}