forked from qt-creator/qt-creator
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:
@@ -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"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
2010
src/plugins/projectexplorer/userfileaccessor.cpp
Normal file
2010
src/plugins/projectexplorer/userfileaccessor.cpp
Normal file
File diff suppressed because it is too large
Load Diff
60
src/plugins/projectexplorer/userfileaccessor.h
Normal file
60
src/plugins/projectexplorer/userfileaccessor.h
Normal 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
|
||||
Reference in New Issue
Block a user