diff --git a/src/lib/component/view/DialogView.h b/src/lib/component/view/DialogView.h index 4d027927..439894ff 100644 --- a/src/lib/component/view/DialogView.h +++ b/src/lib/component/view/DialogView.h @@ -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); diff --git a/src/lib/data/indexer/IndexerCommand.h b/src/lib/data/indexer/IndexerCommand.h index f9a20a02..edba398b 100644 --- a/src/lib/data/indexer/IndexerCommand.h +++ b/src/lib/data/indexer/IndexerCommand.h @@ -21,9 +21,6 @@ public: const std::set& getIndexedPaths() const; const std::set& getExcludedPath() const; - virtual bool preprocessorOnly() const = 0; - virtual void setPreprocessorOnly(bool preprocessorOnly) = 0; - private: FilePath m_sourceFilePath; std::set m_indexedPaths; diff --git a/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.cpp b/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.cpp index beb988ba..e5f5e8d7 100644 --- a/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.cpp +++ b/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.cpp @@ -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(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(indexerCommand) != NULL) @@ -65,7 +63,6 @@ std::shared_ptr 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 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& } } -bool SharedIndexerCommand::preprocessorOnly() const -{ - return m_preprocessorOnly; -} - -void SharedIndexerCommand::setPreprocessorOnly(bool preprocessorOnly) -{ - m_preprocessorOnly = preprocessorOnly; -} - bool SharedIndexerCommand::shouldApplyAnonymousTypedefTransformation() const { return m_shouldApplyAnonymousTypedefTransformation; diff --git a/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.h b/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.h index 85ae2af3..33c75699 100644 --- a/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.h +++ b/src/lib/data/indexer/interprocess/shared_types/SharedIndexerCommand.h @@ -41,9 +41,6 @@ public: std::vector getFrameworkSearchhPaths() const; void setFrameworkSearchhPaths(const std::vector& searchPaths); - bool preprocessorOnly() const; - void setPreprocessorOnly(bool preprocessorOnly); - bool shouldApplyAnonymousTypedefTransformation() const; void setShouldApplyAnonymousTypedefTransformation(bool shouldApplyAnonymousTypedefTransformation); @@ -75,7 +72,6 @@ private: SharedMemory::Vector m_compilerFlags; SharedMemory::Vector m_systemHeaderSearchPaths; SharedMemory::Vector m_frameworkSearchPaths; - bool m_preprocessorOnly; bool m_shouldApplyAnonymousTypedefTransformation; // java diff --git a/src/lib/project/Project.cpp b/src/lib/project/Project.cpp index 91ba7641..3b10b2b1 100644 --- a/src/lib/project/Project.cpp +++ b/src/lib/project/Project.cpp @@ -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& filesToIndex, const std::set& filesToClean, bool fullRefresh, bool preprocessorOnly) + const std::set& filesToIndex, const std::set& filesToClean, bool fullRefresh) { MessageClearErrorCount().dispatch(); if (fullRefresh) @@ -444,7 +439,6 @@ void Project::buildIndex( { for (std::shared_ptr command: sourceGroup->getIndexerCommands(&filesToIndexTemp, fullRefresh)) { - command->setPreprocessorOnly(preprocessorOnly); indexerCommandList->addCommand(command); } } diff --git a/src/lib/project/Project.h b/src/lib/project/Project.h index 27ffaebc..a466cd8d 100644 --- a/src/lib/project/Project.h +++ b/src/lib/project/Project.h @@ -47,11 +47,7 @@ public: // todo: make private again private: bool requestIndex(bool forceRefresh, bool needsFullRefresh); - void buildIndex( - const std::set& filesToIndex, - const std::set& filesToClean, - bool fullRefresh, - bool preprocessorOnly); + void buildIndex(const std::set& filesToIndex, const std::set& filesToClean, bool fullRefresh); bool hasCxxSourceGroup() const; diff --git a/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp b/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp index a4c69b5e..fd24e760 100644 --- a/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp +++ b/src/lib_cxx/data/indexer/IndexerCommandCxx.cpp @@ -14,7 +14,6 @@ IndexerCommandCxx::IndexerCommandCxx( , m_frameworkSearchPaths(frameworkSearchPaths) , m_compilerFlags(compilerFlags) , m_shouldApplyAnonymousTypedefTransformation(shouldApplyAnonymousTypedefTransformation) - , m_preprocessorOnly(false) { } @@ -59,16 +58,6 @@ std::vector IndexerCommandCxx::getCompilerFlags() const return m_compilerFlags; } -bool IndexerCommandCxx::preprocessorOnly() const -{ - return m_preprocessorOnly; -} - -void IndexerCommandCxx::setPreprocessorOnly(bool preprocessorOnly) -{ - m_preprocessorOnly = preprocessorOnly; -} - bool IndexerCommandCxx::shouldApplyAnonymousTypedefTransformation() const { return m_shouldApplyAnonymousTypedefTransformation; diff --git a/src/lib_cxx/data/indexer/IndexerCommandCxx.h b/src/lib_cxx/data/indexer/IndexerCommandCxx.h index 6cc3e6e2..fccd0ab0 100644 --- a/src/lib_cxx/data/indexer/IndexerCommandCxx.h +++ b/src/lib_cxx/data/indexer/IndexerCommandCxx.h @@ -28,9 +28,6 @@ public: std::vector getFrameworkSearchPaths() const; std::vector getCompilerFlags() const; - bool preprocessorOnly() const override; - void setPreprocessorOnly(bool preprocessorOnly) override; - bool shouldApplyAnonymousTypedefTransformation() const; private: @@ -38,8 +35,6 @@ private: std::vector m_frameworkSearchPaths; std::vector m_compilerFlags; bool m_shouldApplyAnonymousTypedefTransformation; - - bool m_preprocessorOnly; }; #endif // INDEXER_COMMAND_CXXL_H diff --git a/src/lib_cxx/data/indexer/IndexerCxx.h b/src/lib_cxx/data/indexer/IndexerCxx.h index acea7c65..4de8f20c 100644 --- a/src/lib_cxx/data/indexer/IndexerCxx.h +++ b/src/lib_cxx/data/indexer/IndexerCxx.h @@ -40,7 +40,7 @@ std::shared_ptr IndexerCxx: parserClient->resetStorage(); - if (parserClient->hasFatalErrors() || indexerCommand->preprocessorOnly()) + if (parserClient->hasFatalErrors()) { storage->setAllFilesIncomplete(); } diff --git a/src/lib_cxx/data/parser/cxx/CxxParser.cpp b/src/lib_cxx/data/parser/cxx/CxxParser.cpp index c44f759b..62427359 100644 --- a/src/lib_cxx/data/parser/cxx/CxxParser.cpp +++ b/src/lib_cxx/data/parser/cxx/CxxParser.cpp @@ -90,7 +90,7 @@ void CxxParser::buildIndex(std::shared_ptr indexerCommand) std::shared_ptr diagnostics = getDiagnostics(canonicalFilePathCache, true); tool.setDiagnosticConsumer(diagnostics.get()); - ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache, indexerCommand->preprocessorOnly()); + ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache, false); tool.run(&actionFactory); } @@ -109,7 +109,7 @@ void CxxParser::buildIndex(std::shared_ptr indexerComma std::shared_ptr diagnostics = getDiagnostics(canonicalFilePathCache, true); tool.setDiagnosticConsumer(diagnostics.get()); - ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache, indexerCommand->preprocessorOnly()); + ASTActionFactory actionFactory(m_client, m_fileRegister, canonicalFilePathCache, false); tool.run(&actionFactory); } diff --git a/src/lib_gui/qt/window/QtIndexingDialog.cpp b/src/lib_gui/qt/window/QtIndexingDialog.cpp index 0af6244b..df0ae0dd 100644 --- a/src/lib_gui/qt/window/QtIndexingDialog.cpp +++ b/src/lib_gui/qt/window/QtIndexingDialog.cpp @@ -24,7 +24,6 @@ QtIndexingDialog::QtIndexingDialog(QWidget* parent) , m_filePathLabel(nullptr) , m_errorLabel(nullptr) , m_fullRefreshCheckBox(nullptr) - , m_preprocessorOnlyCheckBox(nullptr) , m_sizeHint(QSize(450, 450)) , m_callback([](DialogView::IndexingOptions){}) { @@ -89,27 +88,7 @@ void QtIndexingDialog::setupStart( indexLabel->hide(); } - if (options.preprocessorOnlyVisible) - { - m_preprocessorOnlyCheckBox = new QCheckBox("C/C++ preprocessor only", this); - m_preprocessorOnlyCheckBox->setObjectName("message"); - m_preprocessorOnlyCheckBox->setChecked(options.preprocessorOnly); - - QtHelpButton* button = new QtHelpButton( - "Run only the C/C++ preprocessor on the files. This will quickly show include errors and help fix problems " - "in the project setup faster.\n\nThe files will not be indexed and show up as incomplete."); - button->setColor(Qt::white); - - QHBoxLayout* subLayout = new QHBoxLayout(); - subLayout->addStretch(); - subLayout->addWidget(m_preprocessorOnlyCheckBox); - subLayout->addSpacing(10); - subLayout->addWidget(button); - - layout->addLayout(subLayout); - } - - if (m_fullRefreshCheckBox || m_preprocessorOnlyCheckBox) + if (m_fullRefreshCheckBox) { layout->addSpacing(20); } @@ -304,7 +283,6 @@ void QtIndexingDialog::handleNext() DialogView::IndexingOptions options; options.startIndexing = true; options.fullRefresh = m_fullRefreshCheckBox && m_fullRefreshCheckBox->isChecked(); - options.preprocessorOnly = m_preprocessorOnlyCheckBox && m_preprocessorOnlyCheckBox->isChecked(); m_callback(options); } diff --git a/src/lib_gui/qt/window/QtIndexingDialog.h b/src/lib_gui/qt/window/QtIndexingDialog.h index 84bceddc..e26d013f 100644 --- a/src/lib_gui/qt/window/QtIndexingDialog.h +++ b/src/lib_gui/qt/window/QtIndexingDialog.h @@ -82,7 +82,6 @@ private: // start indexing QCheckBox* m_fullRefreshCheckBox; - QCheckBox* m_preprocessorOnlyCheckBox; QSize m_sizeHint; diff --git a/src/lib_java/data/indexer/IndexerCommandJava.cpp b/src/lib_java/data/indexer/IndexerCommandJava.cpp index 34930d4f..a3ed4d59 100644 --- a/src/lib_java/data/indexer/IndexerCommandJava.cpp +++ b/src/lib_java/data/indexer/IndexerCommandJava.cpp @@ -41,12 +41,3 @@ std::vector IndexerCommandJava::getClassPath() const { return m_classPath; } - -bool IndexerCommandJava::preprocessorOnly() const -{ - return false; -} - -void IndexerCommandJava::setPreprocessorOnly(bool preprocessorOnly) -{ -} diff --git a/src/lib_java/data/indexer/IndexerCommandJava.h b/src/lib_java/data/indexer/IndexerCommandJava.h index aefddc9b..e8948cb7 100644 --- a/src/lib_java/data/indexer/IndexerCommandJava.h +++ b/src/lib_java/data/indexer/IndexerCommandJava.h @@ -25,9 +25,6 @@ public: std::vector getClassPath() const; - bool preprocessorOnly() const override; - void setPreprocessorOnly(bool preprocessorOnly) override; - private: std::vector m_classPath; }; diff --git a/src/lib_java/data/indexer/IndexerJava.cpp b/src/lib_java/data/indexer/IndexerJava.cpp index d7e46fdc..424ef03e 100644 --- a/src/lib_java/data/indexer/IndexerJava.cpp +++ b/src/lib_java/data/indexer/IndexerJava.cpp @@ -25,7 +25,7 @@ std::shared_ptr IndexerJava::doIndex( parserClient->resetStorage(); - if (parserClient->hasFatalErrors() || indexerCommand->preprocessorOnly()) + if (parserClient->hasFatalErrors()) { storage->setAllFilesIncomplete(); }