logic: removed preprocessor only option when indexing CXX source groups

This commit is contained in:
Eberhard Graether
2017-08-03 16:54:41 +02:00
parent 299b3a1cf7
commit d80b1fc848
15 changed files with 8 additions and 96 deletions
-5
View File
@@ -17,17 +17,12 @@ public:
: startIndexing(false)
, fullRefreshVisible(false)
, fullRefresh(false)
, preprocessorOnlyVisible(false)
, preprocessorOnly(false)
{}
bool startIndexing;
bool fullRefreshVisible;
bool fullRefresh;
bool preprocessorOnlyVisible;
bool preprocessorOnly;
};
DialogView(StorageAccess* storageAccess);
-3
View File
@@ -21,9 +21,6 @@ public:
const std::set<FilePath>& getIndexedPaths() const;
const std::set<FilePath>& getExcludedPath() const;
virtual bool preprocessorOnly() const = 0;
virtual void setPreprocessorOnly(bool preprocessorOnly) = 0;
private:
FilePath m_sourceFilePath;
std::set<FilePath> m_indexedPaths;
@@ -21,7 +21,6 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
setCompilerFlags(cmd->getCompilerFlags());
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
setFrameworkSearchhPaths(cmd->getFrameworkSearchPaths());
setPreprocessorOnly(cmd->preprocessorOnly());
setShouldApplyAnonymousTypedefTransformation(cmd->shouldApplyAnonymousTypedefTransformation());
}
else if (dynamic_cast<IndexerCommandCxxManual*>(indexerCommand) != NULL)
@@ -33,7 +32,6 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
setCompilerFlags(cmd->getCompilerFlags());
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
setFrameworkSearchhPaths(cmd->getFrameworkSearchPaths());
setPreprocessorOnly(cmd->preprocessorOnly());
setShouldApplyAnonymousTypedefTransformation(cmd->shouldApplyAnonymousTypedefTransformation());
}
else if (dynamic_cast<IndexerCommandJava*>(indexerCommand) != NULL)
@@ -65,7 +63,6 @@ std::shared_ptr<IndexerCommand> SharedIndexerCommand::fromShared(const SharedInd
indexerCommand.getFrameworkSearchhPaths(),
indexerCommand.shouldApplyAnonymousTypedefTransformation()
);
command->setPreprocessorOnly(indexerCommand.preprocessorOnly());
return command;
}
else if (indexerCommand.getType() == CXX_MANUAL)
@@ -80,7 +77,6 @@ std::shared_ptr<IndexerCommand> SharedIndexerCommand::fromShared(const SharedInd
indexerCommand.getCompilerFlags(),
indexerCommand.shouldApplyAnonymousTypedefTransformation()
);
command->setPreprocessorOnly(indexerCommand.preprocessorOnly());
return command;
}
else if (indexerCommand.getType() == JAVA)
@@ -112,7 +108,6 @@ SharedIndexerCommand::SharedIndexerCommand(SharedMemory::Allocator* allocator)
, m_compilerFlags(allocator)
, m_systemHeaderSearchPaths(allocator)
, m_frameworkSearchPaths(allocator)
, m_preprocessorOnly(false)
, m_classPaths(allocator)
{
}
@@ -277,16 +272,6 @@ void SharedIndexerCommand::setFrameworkSearchhPaths(const std::vector<FilePath>&
}
}
bool SharedIndexerCommand::preprocessorOnly() const
{
return m_preprocessorOnly;
}
void SharedIndexerCommand::setPreprocessorOnly(bool preprocessorOnly)
{
m_preprocessorOnly = preprocessorOnly;
}
bool SharedIndexerCommand::shouldApplyAnonymousTypedefTransformation() const
{
return m_shouldApplyAnonymousTypedefTransformation;
@@ -41,9 +41,6 @@ public:
std::vector<FilePath> getFrameworkSearchhPaths() const;
void setFrameworkSearchhPaths(const std::vector<FilePath>& searchPaths);
bool preprocessorOnly() const;
void setPreprocessorOnly(bool preprocessorOnly);
bool shouldApplyAnonymousTypedefTransformation() const;
void setShouldApplyAnonymousTypedefTransformation(bool shouldApplyAnonymousTypedefTransformation);
@@ -75,7 +72,6 @@ private:
SharedMemory::Vector<SharedMemory::String> m_compilerFlags;
SharedMemory::Vector<SharedMemory::String> m_systemHeaderSearchPaths;
SharedMemory::Vector<SharedMemory::String> m_frameworkSearchPaths;
bool m_preprocessorOnly;
bool m_shouldApplyAnonymousTypedefTransformation;
// java
+2 -8
View File
@@ -372,7 +372,6 @@ bool Project::requestIndex(bool forceRefresh, bool needsFullRefresh)
}
bool fullRefresh = forceRefresh | needsFullRefresh;
bool preprocessorOnly = false;
if (Application::getInstance()->hasGUI())
{
@@ -380,9 +379,6 @@ bool Project::requestIndex(bool forceRefresh, bool needsFullRefresh)
options.fullRefreshVisible = !needsFullRefresh;
options.fullRefresh = forceRefresh;
options.preprocessorOnlyVisible = hasCxxSourceGroup();
options.preprocessorOnly = false;
Application::getInstance()->getDialogView()->hideUnknownProgressDialog();
options = Application::getInstance()->getDialogView()->startIndexingDialog(
@@ -394,7 +390,6 @@ bool Project::requestIndex(bool forceRefresh, bool needsFullRefresh)
}
fullRefresh = options.fullRefresh | needsFullRefresh;
preprocessorOnly = options.preprocessorOnly;
}
if (fullRefresh)
@@ -411,13 +406,13 @@ bool Project::requestIndex(bool forceRefresh, bool needsFullRefresh)
MessageStatus((fullRefresh ? "Reindexing Project" : "Refreshing Project"), false, true).dispatch();
buildIndex(filesToIndex, filesToClean, fullRefresh, preprocessorOnly);
buildIndex(filesToIndex, filesToClean, fullRefresh);
return true;
}
void Project::buildIndex(
const std::set<FilePath>& filesToIndex, const std::set<FilePath>& filesToClean, bool fullRefresh, bool preprocessorOnly)
const std::set<FilePath>& filesToIndex, const std::set<FilePath>& filesToClean, bool fullRefresh)
{
MessageClearErrorCount().dispatch();
if (fullRefresh)
@@ -444,7 +439,6 @@ void Project::buildIndex(
{
for (std::shared_ptr<IndexerCommand> command: sourceGroup->getIndexerCommands(&filesToIndexTemp, fullRefresh))
{
command->setPreprocessorOnly(preprocessorOnly);
indexerCommandList->addCommand(command);
}
}
+1 -5
View File
@@ -47,11 +47,7 @@ public: // todo: make private again
private:
bool requestIndex(bool forceRefresh, bool needsFullRefresh);
void buildIndex(
const std::set<FilePath>& filesToIndex,
const std::set<FilePath>& filesToClean,
bool fullRefresh,
bool preprocessorOnly);
void buildIndex(const std::set<FilePath>& filesToIndex, const std::set<FilePath>& filesToClean, bool fullRefresh);
bool hasCxxSourceGroup() const;