forked from qt-creator/qt-creator
C++ Preprocessor additions widget.
Introducing a Widget with a SnippetEditor and a C++ Highlighter which should provide additional information to the C++ preprocessor for a specific file. Change-Id: I27f9498c7e52d1493d6ea92a02a2c6d26130fe07 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
1a8ef7f312
commit
d411c07643
@@ -71,6 +71,7 @@ const char TARGET_KEY_PREFIX[] = "ProjectExplorer.Project.Target.";
|
||||
const char TARGET_COUNT_KEY[] = "ProjectExplorer.Project.TargetCount";
|
||||
const char EDITOR_SETTINGS_KEY[] = "ProjectExplorer.Project.EditorSettings";
|
||||
const char PLUGIN_SETTINGS_KEY[] = "ProjectExplorer.Project.PluginSettings";
|
||||
const char CPP_SETTINGS_KEY[] = "ProjectExplorer.Project.CppSettings";
|
||||
} // namespace
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -90,6 +91,7 @@ public:
|
||||
Core::Context m_projectContext;
|
||||
Core::Context m_projectLanguages;
|
||||
QVariantMap m_pluginSettings;
|
||||
QVariantMap m_additionalCppDefines;
|
||||
SettingsAccessor *m_accessor;
|
||||
};
|
||||
|
||||
@@ -329,6 +331,7 @@ QVariantMap Project::toMap() const
|
||||
|
||||
map.insert(QLatin1String(EDITOR_SETTINGS_KEY), d->m_editorConfiguration->toMap());
|
||||
map.insert(QLatin1String(PLUGIN_SETTINGS_KEY), d->m_pluginSettings);
|
||||
map.insert(QLatin1String(CPP_SETTINGS_KEY), d->m_additionalCppDefines);
|
||||
|
||||
return map;
|
||||
}
|
||||
@@ -356,6 +359,8 @@ bool Project::fromMap(const QVariantMap &map)
|
||||
|
||||
if (map.contains(QLatin1String(PLUGIN_SETTINGS_KEY)))
|
||||
d->m_pluginSettings = map.value(QLatin1String(PLUGIN_SETTINGS_KEY)).toMap();
|
||||
if (map.contains(QLatin1String(CPP_SETTINGS_KEY)))
|
||||
d->m_additionalCppDefines = map.value(QLatin1String(CPP_SETTINGS_KEY)).toMap();
|
||||
|
||||
bool ok;
|
||||
int maxI(map.value(QLatin1String(TARGET_COUNT_KEY), 0).toInt(&ok));
|
||||
@@ -460,6 +465,16 @@ void Project::setNamedSettings(const QString &name, const QVariant &value)
|
||||
d->m_pluginSettings.insert(name, value);
|
||||
}
|
||||
|
||||
QVariantMap Project::additionalCppDefines() const
|
||||
{
|
||||
return d->m_additionalCppDefines;
|
||||
}
|
||||
|
||||
void Project::setAdditionalCppDefines(const QVariantMap value) const
|
||||
{
|
||||
d->m_additionalCppDefines = value;
|
||||
}
|
||||
|
||||
bool Project::needsConfiguration() const
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user