Commit bf970a59 authored by Tobias Hunger's avatar Tobias Hunger

ProjectExplorer: Split up settingsaccessor.h

Split up settingsaccessor.h/settingsaccessor.cpp by moving
the userfileaccessor code into its own set of files called
userfileaccessor.h/userfileaccessor.cpp.

Change-Id: I634550b7ebba29a94791b163dcf05aacf61cfdd4
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent 23d72b69
......@@ -34,7 +34,7 @@
#include "projectnodes.h"
#include "target.h"
#include "session.h"
#include "settingsaccessor.h"
#include "userfileaccessor.h"
#include <coreplugin/idocument.h>
#include <coreplugin/documentmanager.h>
......
......@@ -15,6 +15,7 @@ HEADERS += projectexplorer.h \
gcctoolchain.h \
importwidget.h \
runnables.h \
userfileaccessor.h \
localenvironmentaspect.h \
osparser.h \
projectexplorer_export.h \
......@@ -165,6 +166,7 @@ SOURCES += projectexplorer.cpp \
importwidget.cpp \
projectconfigurationmodel.cpp \
runnables.cpp \
userfileaccessor.cpp \
localenvironmentaspect.cpp \
osparser.cpp \
projectimporter.cpp \
......
......@@ -147,6 +147,7 @@ Project {
"toolchainconfigwidget.cpp", "toolchainconfigwidget.h",
"toolchainmanager.cpp", "toolchainmanager.h",
"toolchainoptionspage.cpp", "toolchainoptionspage.h",
"userfileaccessor.cpp", "userfileaccessor.h",
"vcsannotatetaskhandler.cpp", "vcsannotatetaskhandler.h",
"waitforstopdialog.cpp", "waitforstopdialog.h",
"xcodebuildparser.cpp", "xcodebuildparser.h"
......
......@@ -31,8 +31,6 @@
#include <QVariantMap>
#include <QMessageBox>
namespace Utils { class PersistentSettingsWriter; }
namespace ProjectExplorer {
// --------------------------------------------------------------------
......@@ -150,26 +148,4 @@ private:
friend class SettingsAccessorPrivate;
};
class Project;
namespace Internal {
class UserFileAccessor : public SettingsAccessor
{
public:
UserFileAccessor(Project *project);
Project *project() const;
protected:
QVariantMap prepareSettings(const QVariantMap &data) const final;
QVariantMap prepareToSaveSettings(const QVariantMap &data) const final;
void storeSharedSettings(const QVariantMap &data) const final;
QVariant retrieveSharedSettings() const final;
private:
Project *m_project;
};
} // namespace Internal
} // namespace ProjectExplorer
This diff is collapsed.
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include "settingsaccessor.h"
#include <utils/fileutils.h>
#include <QHash>
#include <QVariantMap>
#include <QMessageBox>
namespace ProjectExplorer {
class Project;
namespace Internal {
class UserFileAccessor : public SettingsAccessor
{
public:
UserFileAccessor(Project *project);
Project *project() const;
protected:
QVariantMap prepareSettings(const QVariantMap &data) const final;
QVariantMap prepareToSaveSettings(const QVariantMap &data) const final;
void storeSharedSettings(const QVariantMap &data) const final;
QVariant retrieveSharedSettings() const final;
private:
Project *m_project;
};
} // namespace Internal
} // namespace ProjectExplorer
Markdown is supported
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