src: applied clang-format
This commit is contained in:
+21
-15
@@ -8,18 +8,21 @@
|
||||
#include "utilityPathDetection.h"
|
||||
|
||||
QtProjectWizardContentPathsHeaderSearchGlobal::QtProjectWizardContentPathsHeaderSearchGlobal(
|
||||
QtProjectWizardWindow* window
|
||||
)
|
||||
: QtProjectWizardContentPaths(std::shared_ptr<SourceGroupSettings>(), window, QtPathListBox::SELECTION_POLICY_DIRECTORIES_ONLY)
|
||||
QtProjectWizardWindow* window)
|
||||
: QtProjectWizardContentPaths(
|
||||
std::shared_ptr<SourceGroupSettings>(),
|
||||
window,
|
||||
QtPathListBox::SELECTION_POLICY_DIRECTORIES_ONLY)
|
||||
{
|
||||
setTitleString("Global Include Paths");
|
||||
setHelpString(
|
||||
"The Global Include Paths will be used in all your projects in addition to the project specific Include Paths. "
|
||||
"The Global Include Paths will be used in all your projects in addition to the project "
|
||||
"specific Include Paths. "
|
||||
"These paths are usually passed to the compiler with the '-isystem' flag.<br />"
|
||||
"<br />"
|
||||
"Use them to add system header paths (See <a href=\"https://sourcetrail.com/documentation/#FindingSystemHeaderLocations\">"
|
||||
"Finding System Header Locations</a> or use the auto detection below)."
|
||||
);
|
||||
"Use them to add system header paths (See <a "
|
||||
"href=\"https://sourcetrail.com/documentation/#FindingSystemHeaderLocations\">"
|
||||
"Finding System Header Locations</a> or use the auto detection below).");
|
||||
|
||||
m_pathDetector = utility::getCxxHeaderPathDetector();
|
||||
m_makePathsRelativeToProjectFileLocation = false;
|
||||
@@ -33,7 +36,7 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::load()
|
||||
void QtProjectWizardContentPathsHeaderSearchGlobal::save()
|
||||
{
|
||||
std::vector<FilePath> paths;
|
||||
for (const FilePath& headerPath : m_list->getPathsAsDisplayed())
|
||||
for (const FilePath& headerPath: m_list->getPathsAsDisplayed())
|
||||
{
|
||||
if (headerPath != ResourcePaths::getCxxCompilerHeaderPath())
|
||||
{
|
||||
@@ -54,7 +57,7 @@ bool QtProjectWizardContentPathsHeaderSearchGlobal::check()
|
||||
|
||||
std::vector<FilePath> paths;
|
||||
QString compilerHeaderPaths;
|
||||
for (const FilePath& headerPath : m_list->getPathsAsDisplayed())
|
||||
for (const FilePath& headerPath: m_list->getPathsAsDisplayed())
|
||||
{
|
||||
if (headerPath != ResourcePaths::getCxxCompilerHeaderPath() &&
|
||||
headerPath.getCanonical().getConcatenated(L"/stdarg.h").exists())
|
||||
@@ -71,9 +74,12 @@ bool QtProjectWizardContentPathsHeaderSearchGlobal::check()
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Multiple Compiler Headers");
|
||||
msgBox.setInformativeText("Your Global Include Paths contain other paths that hold C/C++ compiler headers, "
|
||||
"probably those of your local C/C++ compiler. They are possibly in conflict with the compiler headers of "
|
||||
"Sourcetrail's C/C++ indexer. This can lead to compatiblity errors during indexing. Do you want to remove "
|
||||
msgBox.setInformativeText(
|
||||
"Your Global Include Paths contain other paths that hold C/C++ compiler headers, "
|
||||
"probably those of your local C/C++ compiler. They are possibly in conflict with the "
|
||||
"compiler headers of "
|
||||
"Sourcetrail's C/C++ indexer. This can lead to compatiblity errors during indexing. Do "
|
||||
"you want to remove "
|
||||
"these paths?");
|
||||
msgBox.setDetailedText(compilerHeaderPaths);
|
||||
msgBox.addButton("Remove", QMessageBox::ButtonRole::YesRole);
|
||||
@@ -81,7 +87,7 @@ bool QtProjectWizardContentPathsHeaderSearchGlobal::check()
|
||||
msgBox.setIcon(QMessageBox::Icon::Question);
|
||||
int ret = msgBox.exec();
|
||||
|
||||
if (ret == 0) // QMessageBox::Yes
|
||||
if (ret == 0) // QMessageBox::Yes
|
||||
{
|
||||
setPaths(paths);
|
||||
save();
|
||||
@@ -94,7 +100,7 @@ bool QtProjectWizardContentPathsHeaderSearchGlobal::check()
|
||||
void QtProjectWizardContentPathsHeaderSearchGlobal::detectedPaths(const std::vector<FilePath>& paths)
|
||||
{
|
||||
std::vector<FilePath> headerPaths;
|
||||
for (const FilePath& headerPath : paths)
|
||||
for (const FilePath& headerPath: paths)
|
||||
{
|
||||
if (headerPath != ResourcePaths::getCxxCompilerHeaderPath())
|
||||
{
|
||||
@@ -107,6 +113,6 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::detectedPaths(const std::vec
|
||||
void QtProjectWizardContentPathsHeaderSearchGlobal::setPaths(const std::vector<FilePath>& paths)
|
||||
{
|
||||
m_list->setPaths({});
|
||||
m_list->addPaths({ ResourcePaths::getCxxCompilerHeaderPath() }, true);
|
||||
m_list->addPaths({ResourcePaths::getCxxCompilerHeaderPath()}, true);
|
||||
m_list->addPaths(paths);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user