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 <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2017-11-15 14:14:38 +01:00
parent 23d72b6911
commit bf970a5929
7 changed files with 2084 additions and 2009 deletions

View File

@@ -34,7 +34,7 @@
#include "projectnodes.h" #include "projectnodes.h"
#include "target.h" #include "target.h"
#include "session.h" #include "session.h"
#include "settingsaccessor.h" #include "userfileaccessor.h"
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
#include <coreplugin/documentmanager.h> #include <coreplugin/documentmanager.h>

View File

@@ -15,6 +15,7 @@ HEADERS += projectexplorer.h \
gcctoolchain.h \ gcctoolchain.h \
importwidget.h \ importwidget.h \
runnables.h \ runnables.h \
userfileaccessor.h \
localenvironmentaspect.h \ localenvironmentaspect.h \
osparser.h \ osparser.h \
projectexplorer_export.h \ projectexplorer_export.h \
@@ -165,6 +166,7 @@ SOURCES += projectexplorer.cpp \
importwidget.cpp \ importwidget.cpp \
projectconfigurationmodel.cpp \ projectconfigurationmodel.cpp \
runnables.cpp \ runnables.cpp \
userfileaccessor.cpp \
localenvironmentaspect.cpp \ localenvironmentaspect.cpp \
osparser.cpp \ osparser.cpp \
projectimporter.cpp \ projectimporter.cpp \

View File

@@ -147,6 +147,7 @@ Project {
"toolchainconfigwidget.cpp", "toolchainconfigwidget.h", "toolchainconfigwidget.cpp", "toolchainconfigwidget.h",
"toolchainmanager.cpp", "toolchainmanager.h", "toolchainmanager.cpp", "toolchainmanager.h",
"toolchainoptionspage.cpp", "toolchainoptionspage.h", "toolchainoptionspage.cpp", "toolchainoptionspage.h",
"userfileaccessor.cpp", "userfileaccessor.h",
"vcsannotatetaskhandler.cpp", "vcsannotatetaskhandler.h", "vcsannotatetaskhandler.cpp", "vcsannotatetaskhandler.h",
"waitforstopdialog.cpp", "waitforstopdialog.h", "waitforstopdialog.cpp", "waitforstopdialog.h",
"xcodebuildparser.cpp", "xcodebuildparser.h" "xcodebuildparser.cpp", "xcodebuildparser.h"

File diff suppressed because it is too large Load Diff

View File

@@ -31,8 +31,6 @@
#include <QVariantMap> #include <QVariantMap>
#include <QMessageBox> #include <QMessageBox>
namespace Utils { class PersistentSettingsWriter; }
namespace ProjectExplorer { namespace ProjectExplorer {
// -------------------------------------------------------------------- // --------------------------------------------------------------------
@@ -150,26 +148,4 @@ private:
friend class SettingsAccessorPrivate; 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 } // namespace ProjectExplorer

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,60 @@
/****************************************************************************
**
** 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