forked from qt-creator/qt-creator
Welcome: Store examples search text in settings
in QtCreator.ini under "WelcomePage/ExamplesSearchString". The installer pre-set that setting, and in that way pre- select a set of examples. Change-Id: I8ac5a38ad0bd3f33875ef1997ccbf0352410dcc3 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -54,6 +54,7 @@ static bool debugExamples()
|
||||
}
|
||||
|
||||
static const char kSelectedExampleSetKey[] = "WelcomePage/SelectedExampleSet";
|
||||
static const char kExamplesSearchStringKey[] = "WelcomePage/ExamplesSearchString";
|
||||
|
||||
void ExampleSetModel::writeCurrentIdToSettings(int currentIndex) const
|
||||
{
|
||||
@@ -841,6 +842,16 @@ void ExamplesListModelFilter::filterForExampleSet(int index)
|
||||
m_sourceModel->selectExampleSet(index);
|
||||
}
|
||||
|
||||
void ExamplesListModelFilter::writeSearchStringToSettings(const QString &string)
|
||||
{
|
||||
Core::ICore::settings()->setValue(QLatin1String(kExamplesSearchStringKey), string);
|
||||
}
|
||||
|
||||
QString ExamplesListModelFilter::readSearchStringsFromSettings()
|
||||
{
|
||||
return Core::ICore::settings()->value(QLatin1String(kExamplesSearchStringKey)).toString();
|
||||
}
|
||||
|
||||
void ExamplesListModelFilter::setShowTutorialsOnly(bool showTutorialsOnly)
|
||||
{
|
||||
m_showTutorialsOnly = showTutorialsOnly;
|
||||
|
||||
Reference in New Issue
Block a user