build: allow to disable language support in cmake
* in addition: add unloadable sourcegroup to visualize, load and save information when loading a project that contains source groups that are not supported by the build
This commit is contained in:
@@ -208,6 +208,8 @@ add_files(
|
||||
qt/project_wizard/content/QtProjectWizardContentSourceGroupData.h
|
||||
qt/project_wizard/content/QtProjectWizardContentSourceGroupInfoText.cpp
|
||||
qt/project_wizard/content/QtProjectWizardContentSourceGroupInfoText.h
|
||||
qt/project_wizard/content/QtProjectWizardContentUnloadable.cpp
|
||||
qt/project_wizard/content/QtProjectWizardContentUnloadable.h
|
||||
qt/project_wizard/content/QtProjectWizardContentVS.cpp
|
||||
qt/project_wizard/content/QtProjectWizardContentVS.h
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <QSysInfo>
|
||||
#include <QTimer>
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
#include "QtProjectWizardContentCppStandard.h"
|
||||
#include "QtProjectWizardContentCrossCompilationOptions.h"
|
||||
@@ -37,6 +39,7 @@
|
||||
#include "QtProjectWizardContentSelect.h"
|
||||
#include "QtProjectWizardContentSourceGroupData.h"
|
||||
#include "QtProjectWizardContentSourceGroupInfoText.h"
|
||||
#include "QtProjectWizardContentUnloadable.h"
|
||||
#include "QtProjectWizardContentVS.h"
|
||||
#include "QtSourceGroupWizardPage.h"
|
||||
#include "SourceGroupSettingsCEmpty.h"
|
||||
@@ -49,6 +52,7 @@
|
||||
#include "SourceGroupSettingsJavaGradle.h"
|
||||
#include "SourceGroupSettingsJavaMaven.h"
|
||||
#include "SourceGroupSettingsPythonEmpty.h"
|
||||
#include "SourceGroupSettingsUnloadable.h"
|
||||
#include "MessageLoadProject.h"
|
||||
#include "MessageStatus.h"
|
||||
#include "ResourcePaths.h"
|
||||
@@ -62,6 +66,9 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
bool applicationSettingsContainVisualStudioHeaderSearchPaths()
|
||||
{
|
||||
std::vector<FilePath> expandedPaths;
|
||||
@@ -102,9 +109,13 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
template <typename SettingsType>
|
||||
std::vector<QtSourceGroupWizardPage<SettingsType>> getSourceGroupWizardPages();
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
template <>
|
||||
std::vector<QtSourceGroupWizardPage<SourceGroupSettingsCEmpty>> getSourceGroupWizardPages<SourceGroupSettingsCEmpty>()
|
||||
{
|
||||
@@ -310,6 +321,10 @@ namespace
|
||||
return pages;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
template<>
|
||||
std::vector<QtSourceGroupWizardPage<SourceGroupSettingsJavaEmpty>> getSourceGroupWizardPages<SourceGroupSettingsJavaEmpty>()
|
||||
{
|
||||
@@ -375,6 +390,8 @@ namespace
|
||||
return pages;
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
template<>
|
||||
std::vector<QtSourceGroupWizardPage<SourceGroupSettingsPythonEmpty>> getSourceGroupWizardPages<SourceGroupSettingsPythonEmpty>()
|
||||
@@ -392,6 +409,8 @@ namespace
|
||||
return pages;
|
||||
}
|
||||
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
template<>
|
||||
std::vector<QtSourceGroupWizardPage<SourceGroupSettingsCustomCommand>> getSourceGroupWizardPages<SourceGroupSettingsCustomCommand>()
|
||||
{
|
||||
@@ -407,6 +426,18 @@ namespace
|
||||
return pages;
|
||||
}
|
||||
|
||||
template<>
|
||||
std::vector<QtSourceGroupWizardPage<SourceGroupSettingsUnloadable>> getSourceGroupWizardPages<SourceGroupSettingsUnloadable>()
|
||||
{
|
||||
std::vector<QtSourceGroupWizardPage<SourceGroupSettingsUnloadable>> pages;
|
||||
{
|
||||
QtSourceGroupWizardPage<SourceGroupSettingsUnloadable> page("");
|
||||
page.addContentCreatorWithSettings<QtProjectWizardContentUnloadable>(WIZARD_CONTENT_CONTEXT_ALL);
|
||||
pages.push_back(page);
|
||||
}
|
||||
return pages;
|
||||
}
|
||||
|
||||
template <typename SettingsType>
|
||||
void fillSummary(QtProjectWizardContentGroup* summary, std::shared_ptr<SettingsType> settings, QtProjectWizardWindow* window)
|
||||
{
|
||||
@@ -456,6 +487,7 @@ void QtProjectWizard::newProject()
|
||||
|
||||
void QtProjectWizard::newProjectFromCDB(const FilePath& filePath)
|
||||
{
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
if (!m_projectSettings)
|
||||
{
|
||||
m_projectSettings = std::make_shared<ProjectSettings>();
|
||||
@@ -482,6 +514,7 @@ void QtProjectWizard::newProjectFromCDB(const FilePath& filePath)
|
||||
sourceGroupSettings->setCompilationDatabasePath(filePath);
|
||||
|
||||
executeSourceGroupSetup<SourceGroupSettingsCxxCdbVs>(sourceGroupSettings);
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
}
|
||||
|
||||
void QtProjectWizard::editProject(const FilePath& settingsPath)
|
||||
@@ -790,7 +823,16 @@ void QtProjectWizard::selectedSourceGroupChanged(int index)
|
||||
summary->addContent(content);
|
||||
summary->addSpace();
|
||||
|
||||
if (std::shared_ptr<SourceGroupSettingsCEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsCEmpty>(group))
|
||||
if (std::shared_ptr<SourceGroupSettingsCustomCommand> settings = std::dynamic_pointer_cast<SourceGroupSettingsCustomCommand>(group))
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
}
|
||||
if (std::shared_ptr<SourceGroupSettingsUnloadable> settings = std::dynamic_pointer_cast<SourceGroupSettingsUnloadable>(group))
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
}
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
else if (std::shared_ptr<SourceGroupSettingsCEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsCEmpty>(group))
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
}
|
||||
@@ -810,6 +852,8 @@ void QtProjectWizard::selectedSourceGroupChanged(int index)
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
}
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
else if (std::shared_ptr<SourceGroupSettingsJavaEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsJavaEmpty>(group))
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
@@ -822,14 +866,13 @@ void QtProjectWizard::selectedSourceGroupChanged(int index)
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
}
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
else if (std::shared_ptr<SourceGroupSettingsPythonEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsPythonEmpty>(group))
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
}
|
||||
else if (std::shared_ptr<SourceGroupSettingsCustomCommand> settings = std::dynamic_pointer_cast<SourceGroupSettingsCustomCommand>(group))
|
||||
{
|
||||
fillSummary(summary, settings, this);
|
||||
}
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
setContent(summary);
|
||||
|
||||
@@ -1004,6 +1047,7 @@ void QtProjectWizard::selectedProjectType(SourceGroupType sourceGroupType)
|
||||
|
||||
switch (sourceGroupType)
|
||||
{
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_C_EMPTY:
|
||||
{
|
||||
std::shared_ptr<SourceGroupSettingsCEmpty> settings = std::make_shared<SourceGroupSettingsCEmpty>(sourceGroupId, m_projectSettings.get());
|
||||
@@ -1037,6 +1081,8 @@ void QtProjectWizard::selectedProjectType(SourceGroupType sourceGroupType)
|
||||
executeSourceGroupSetup<SourceGroupSettingsCxxCdbVs>(settings);
|
||||
}
|
||||
break;
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_JAVA_EMPTY:
|
||||
{
|
||||
std::shared_ptr<SourceGroupSettingsJavaEmpty> settings = std::make_shared<SourceGroupSettingsJavaEmpty>(sourceGroupId, m_projectSettings.get());
|
||||
@@ -1055,12 +1101,15 @@ void QtProjectWizard::selectedProjectType(SourceGroupType sourceGroupType)
|
||||
executeSourceGroupSetup<SourceGroupSettingsJavaGradle>(settings);
|
||||
}
|
||||
break;
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_PYTHON_EMPTY:
|
||||
{
|
||||
std::shared_ptr<SourceGroupSettingsPythonEmpty> settings = std::make_shared<SourceGroupSettingsPythonEmpty>(sourceGroupId, m_projectSettings.get());
|
||||
executeSourceGroupSetup<SourceGroupSettingsPythonEmpty>(settings);
|
||||
}
|
||||
break;
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
case SOURCE_GROUP_CUSTOM_COMMAND:
|
||||
{
|
||||
std::shared_ptr<SourceGroupSettingsCustomCommand> settings = std::make_shared<SourceGroupSettingsCustomCommand>(sourceGroupId, m_projectSettings.get());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentCStandard.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
|
||||
@@ -46,3 +48,5 @@ void QtProjectWizardContentCStandard::save()
|
||||
m_sourceGroupSettings->setCStandard(m_standard->currentText().toStdWString());
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_C_STANDARD
|
||||
#define QT_PROJECT_WIZARD_CONTENT_C_STANDARD
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class QComboBox;
|
||||
@@ -28,4 +32,6 @@ private:
|
||||
QComboBox* m_standard;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_C_STANDARD
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentCppStandard.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
|
||||
@@ -46,3 +48,5 @@ void QtProjectWizardContentCppStandard::save()
|
||||
m_sourceGroupSettings->setCppStandard(m_standard->currentText().toStdWString());
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_CPP_STANDARD
|
||||
#define QT_PROJECT_WIZARD_CONTENT_CPP_STANDARD
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class QComboBox;
|
||||
@@ -28,4 +32,6 @@ private:
|
||||
QComboBox* m_standard;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_CPP_STANDARD
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentCrossCompilationOptions.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
@@ -165,3 +167,5 @@ void QtProjectWizardContentCrossCompilationOptions::updateTargetOptionsEnabled()
|
||||
m_sys->setEnabled(useTargetOptions);
|
||||
m_abi->setEnabled(useTargetOptions);
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_CROSS_COMPILATION_OPTIONS
|
||||
#define QT_PROJECT_WIZARD_CONTENT_CROSS_COMPILATION_OPTIONS
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class QCheckBox;
|
||||
@@ -38,4 +42,6 @@ private:
|
||||
QComboBox* m_abi;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_CROSS_COMPILATION_OPTIONS
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentCxxPchFlags.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QMessageBox>
|
||||
|
||||
@@ -83,3 +85,5 @@ bool QtProjectWizardContentCxxPchFlags::check()
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_CXX_PCH_FLAGS_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_CXX_PCH_FLAGS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class QCheckBox;
|
||||
@@ -34,4 +38,6 @@ private:
|
||||
QtStringListBox* m_list;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_CXX_PCH_FLAGS_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentFlags.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QFormLayout>
|
||||
#include <QMessageBox>
|
||||
|
||||
@@ -69,3 +71,5 @@ bool QtProjectWizardContentFlags::check()
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_FLAGS_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_FLAGS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class QtStringListBox;
|
||||
@@ -32,4 +36,6 @@ private:
|
||||
QtStringListBox* m_list;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_FLAGS_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentJavaStandard.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
|
||||
@@ -46,3 +48,5 @@ void QtProjectWizardContentJavaStandard::save()
|
||||
m_sourceGroupSettings->setJavaStandard(m_standard->currentText().toStdWString());
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_JAVA_STANDARD
|
||||
#define QT_PROJECT_WIZARD_CONTENT_JAVA_STANDARD
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class QComboBox;
|
||||
@@ -28,4 +32,6 @@ private:
|
||||
QComboBox* m_standard;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_JAVA_STANDARD
|
||||
|
||||
@@ -48,6 +48,7 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row)
|
||||
|
||||
// define which kind of source groups are available for each language
|
||||
std::map<LanguageType, std::vector<SourceGroupInfo>> sourceGroupInfos;
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
sourceGroupInfos[LANGUAGE_C].push_back(SourceGroupInfo(SOURCE_GROUP_CXX_CDB, true));
|
||||
sourceGroupInfos[LANGUAGE_C].push_back(SourceGroupInfo(SOURCE_GROUP_CXX_VS));
|
||||
sourceGroupInfos[LANGUAGE_C].push_back(SourceGroupInfo(SOURCE_GROUP_CXX_CODEBLOCKS));
|
||||
@@ -56,25 +57,37 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row)
|
||||
sourceGroupInfos[LANGUAGE_CPP].push_back(SourceGroupInfo(SOURCE_GROUP_CXX_VS));
|
||||
sourceGroupInfos[LANGUAGE_CPP].push_back(SourceGroupInfo(SOURCE_GROUP_CXX_CODEBLOCKS));
|
||||
sourceGroupInfos[LANGUAGE_CPP].push_back(SourceGroupInfo(SOURCE_GROUP_CPP_EMPTY));
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
sourceGroupInfos[LANGUAGE_JAVA].push_back(SourceGroupInfo(SOURCE_GROUP_JAVA_MAVEN));
|
||||
sourceGroupInfos[LANGUAGE_JAVA].push_back(SourceGroupInfo(SOURCE_GROUP_JAVA_GRADLE));
|
||||
sourceGroupInfos[LANGUAGE_JAVA].push_back(SourceGroupInfo(SOURCE_GROUP_JAVA_EMPTY));
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
sourceGroupInfos[LANGUAGE_PYTHON].push_back(SourceGroupInfo(SOURCE_GROUP_PYTHON_EMPTY));
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
sourceGroupInfos[LANGUAGE_CUSTOM].push_back(SourceGroupInfo(SOURCE_GROUP_CUSTOM_COMMAND));
|
||||
|
||||
// define which icons should be used for which kind of source group
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_C_EMPTY] = L"empty_icon";
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_CPP_EMPTY] = L"empty_icon";
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_CXX_CDB] = L"cdb_icon";
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_CXX_VS] = L"vs_icon";
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_CXX_CODEBLOCKS] = L"cbp_icon";
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_JAVA_EMPTY] = L"empty_icon";
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_JAVA_MAVEN] = L"mvn_icon";
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_JAVA_GRADLE] = L"gradle_icon";
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_PYTHON_EMPTY] = L"empty_icon";
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeIconName[SOURCE_GROUP_CUSTOM_COMMAND] = L"empty_icon";
|
||||
|
||||
// define descriptions for each kind of Source Group
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_C_EMPTY] = "Create a new Source Group by defining which C files will be indexed.";
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_CPP_EMPTY] = "Create a new Source Group by defining which C++ files will be indexed.";
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_CDB] =
|
||||
@@ -89,9 +102,13 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row)
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_CXX_CODEBLOCKS] =
|
||||
"<p>Create a new Source Group from an existing Code::Blocks project file.</p>"
|
||||
"<p><b>Note</b>: A \".cbp\" file will also get generated by the <b>Qt Creator</b> if a CMakeLists file is imported.</p>";
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_EMPTY] = "Create a new Source Group by defining which Java files will be indexed.";
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_MAVEN] = "Create a new Source Group from an existing Maven project.";
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_JAVA_GRADLE] = "Create a new Source Group from an existing Gradle project.";
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_PYTHON_EMPTY] =
|
||||
"<p>Create a new Source Group by defining which Python files will be indexed. This Source Group type uses the "
|
||||
"<a href=\"https://github.com/CoatiSoftware/SourcetrailPythonIndexer\">SourcetrailPythonIndexer</a> " + pythonIndexerVersion + "in the "
|
||||
@@ -99,6 +116,7 @@ void QtProjectWizardContentSelect::populate(QGridLayout* layout, int& row)
|
||||
"<p><b>Note</b>: Python support is still in its <b>beta</b> phase. If you want to update the version of the SourcetrailPythonIndexer which is used "
|
||||
"by Sourcetrail, download the latest release package for your operating system from the linked repository and completely replace the contents of your "
|
||||
"\"Sourcetrail/data/python\" folder with the contents of the downloaded package.</p>";
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
m_sourceGroupTypeDescriptions[SOURCE_GROUP_CUSTOM_COMMAND] = "Create a new Source Group executing a custom command on each source file. "
|
||||
"This Source Group type can be used on <a href=\"https://github.com/CoatiSoftware/SourcetrailDB\">SourcetrailDB</a> binaries that add "
|
||||
"custom language support to Sourcetrail.<br /><br />Current Database Version: " + std::to_string(SqliteIndexStorage::getStorageVersion());
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
QtProjectWizardContentSourceGroupInfoText(QtProjectWizardWindow* window);
|
||||
|
||||
// QtProjectWizardContent implementation
|
||||
virtual void populate(QGridLayout* layout, int& row) override;
|
||||
void populate(QGridLayout* layout, int& row) override;
|
||||
};
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_SOURCE_GROUP_INFO_TEXT_H
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#include "QtProjectWizardContentUnloadable.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QLineEdit>
|
||||
#include <QMessageBox>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include "FileSystem.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "SourceGroupSettingsCustomCommand.h"
|
||||
#include "SqliteIndexStorage.h"
|
||||
|
||||
QtProjectWizardContentUnloadable::QtProjectWizardContentUnloadable(
|
||||
std::shared_ptr<SourceGroupSettingsUnloadable> settings,
|
||||
QtProjectWizardWindow* window
|
||||
)
|
||||
: QtProjectWizardContent(window)
|
||||
, m_settings(settings)
|
||||
{
|
||||
}
|
||||
|
||||
void QtProjectWizardContentUnloadable::populate(QGridLayout* layout, int& row)
|
||||
{
|
||||
QHBoxLayout* layoutHorz = new QHBoxLayout();
|
||||
layout->addLayout(
|
||||
layoutHorz,
|
||||
row, QtProjectWizardWindow::FRONT_COL,
|
||||
1, 1 + QtProjectWizardWindow::BACK_COL - QtProjectWizardWindow::FRONT_COL,
|
||||
Qt::AlignTop
|
||||
);
|
||||
|
||||
layoutHorz->addSpacing(60);
|
||||
|
||||
QLabel* infoLabel = new QLabel(
|
||||
"<p>The selected item uses a Source Group type that is not supportetd by this version of Sourcetrail.</p>"
|
||||
);
|
||||
infoLabel->setObjectName("info");
|
||||
infoLabel->setWordWrap(true);
|
||||
layoutHorz->addWidget(infoLabel);
|
||||
|
||||
layoutHorz->addSpacing(40);
|
||||
|
||||
row++;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_UNLOADABLE_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_UNLOADABLE_H
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class SourceGroupSettingsUnloadable;
|
||||
|
||||
class QtProjectWizardContentUnloadable
|
||||
: public QtProjectWizardContent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtProjectWizardContentUnloadable(
|
||||
std::shared_ptr<SourceGroupSettingsUnloadable> settings,
|
||||
QtProjectWizardWindow* window);
|
||||
|
||||
// QtProjectWizardContent implementation
|
||||
void populate(QGridLayout* layout, int& row) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<SourceGroupSettingsUnloadable> m_settings;
|
||||
};
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_UNLOADABLE_H
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentVS.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "MessageIDECreateCDB.h"
|
||||
|
||||
QtProjectWizardContentVS::QtProjectWizardContentVS(QtProjectWizardWindow* window)
|
||||
@@ -44,3 +46,5 @@ void QtProjectWizardContentVS::handleVSCDBClicked()
|
||||
{
|
||||
MessageIDECreateCDB().dispatch();
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_VS_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_VS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContent.h"
|
||||
|
||||
class QtProjectWizardContentVS
|
||||
@@ -17,4 +21,6 @@ private slots:
|
||||
void handleVSCDBClicked();
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_VS_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathCDB.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPathsIndexedHeaders.h"
|
||||
#include "SourceGroupCxxCdb.h"
|
||||
#include "SourceGroupSettingsCxxCdb.h"
|
||||
@@ -133,3 +135,5 @@ std::shared_ptr<SourceGroupSettings> QtProjectWizardContentPathCDB::getSourceGro
|
||||
{
|
||||
return m_settings;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATH_CDB_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATH_CDB_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPath.h"
|
||||
#include "SingleValueCache.h"
|
||||
|
||||
@@ -37,4 +41,6 @@ private:
|
||||
mutable SingleValueCache<std::vector<FilePath>> m_filePaths;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATH_CDB_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathCodeblocksProject.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPathsIndexedHeaders.h"
|
||||
#include "SourceGroupCxxCodeblocks.h"
|
||||
#include "SourceGroupSettingsCxxCodeblocks.h"
|
||||
@@ -113,3 +115,5 @@ std::shared_ptr<SourceGroupSettings> QtProjectWizardContentPathCodeblocksProject
|
||||
{
|
||||
return m_settings;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATH_CODE_BLOCKS_PROJECT_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATH_CODE_BLOCKS_PROJECT_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPath.h"
|
||||
#include "SingleValueCache.h"
|
||||
|
||||
@@ -37,4 +41,6 @@ private:
|
||||
mutable SingleValueCache<std::vector<FilePath>> m_filePaths;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATH_CODE_BLOCKS_PROJECT_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathCxxPch.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "IndexerCommandCxx.h"
|
||||
@@ -108,3 +110,5 @@ std::shared_ptr<SourceGroupSettings> QtProjectWizardContentPathCxxPch::getSource
|
||||
{
|
||||
return m_settings;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATH_CXX_PCH_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATH_CXX_PCH_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPath.h"
|
||||
#include "SingleValueCache.h"
|
||||
|
||||
@@ -31,4 +35,6 @@ private:
|
||||
std::shared_ptr<SourceGroupSettingsWithCxxPchOptions> m_settingsCxxPch;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATH_CXX_PCH_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathPythonEnvironment.h"
|
||||
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ResourcePaths.h"
|
||||
#include "SourceGroupSettingsPythonEmpty.h"
|
||||
#include "utilityApp.h"
|
||||
@@ -89,3 +91,5 @@ std::shared_ptr<SourceGroupSettings> QtProjectWizardContentPathPythonEnvironment
|
||||
{
|
||||
return m_settings;
|
||||
}
|
||||
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATH_PYTHON_ENVIRONMENT_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATH_PYTHON_ENVIRONMENT_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPath.h"
|
||||
#include "QtThreadedFunctor.h"
|
||||
|
||||
@@ -27,4 +31,6 @@ private:
|
||||
QLabel* m_resultLabel;
|
||||
};
|
||||
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATH_PYTHON_ENVIRONMENT_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathSourceGradle.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QCheckBox>
|
||||
|
||||
#include "Application.h"
|
||||
@@ -71,3 +73,5 @@ std::shared_ptr<SourceGroupSettings> QtProjectWizardContentPathSourceGradle::get
|
||||
{
|
||||
return m_settings;
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATH_SOURCE_GRADLE_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATH_SOURCE_GRADLE_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPath.h"
|
||||
|
||||
class QCheckBox;
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
QCheckBox* m_shouldIndexTests;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATH_SOURCE_GRADLE_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathSourceMaven.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QCheckBox>
|
||||
|
||||
#include "Application.h"
|
||||
@@ -101,3 +103,5 @@ std::shared_ptr<SourceGroupSettings> QtProjectWizardContentPathSourceMaven::getS
|
||||
{
|
||||
return m_settings;
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATH_SOURCE_MAVEN_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATH_SOURCE_MAVEN_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPath.h"
|
||||
|
||||
class QCheckBox;
|
||||
@@ -30,4 +34,6 @@ private:
|
||||
QCheckBox* m_shouldIndexTests;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATH_SOURCE_MAVEN_H
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathsClassJava.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QCheckBox>
|
||||
|
||||
#include "SourceGroupSettings.h"
|
||||
@@ -54,3 +56,5 @@ void QtProjectWizardContentPathsClassJava::save()
|
||||
settings->setUseJreSystemLibrary(m_useJreSystemLibraryCheckBox->isChecked());
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATHS_CLASS_JAVA_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATHS_CLASS_JAVA_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPaths.h"
|
||||
|
||||
class QCheckBox;
|
||||
@@ -21,4 +25,6 @@ private:
|
||||
QCheckBox* m_useJreSystemLibraryCheckBox;
|
||||
};
|
||||
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATHS_CLASS_JAVA_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathsFrameworkSearch.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "SourceGroupSettings.h"
|
||||
#include "SourceGroupSettingsWithCxxPathsAndFlags.h"
|
||||
|
||||
@@ -41,3 +43,5 @@ bool QtProjectWizardContentPathsFrameworkSearch::isScrollAble() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATHS_FRAMEWORK_SEARCH_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATHS_FRAMEWORK_SEARCH_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPaths.h"
|
||||
|
||||
class QtProjectWizardContentPathsFrameworkSearch
|
||||
@@ -18,4 +22,6 @@ public:
|
||||
virtual bool isScrollAble() const override;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATHS_FRAMEWORK_SEARCH_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathsFrameworkSearchGlobal.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "ApplicationSettings.h"
|
||||
#include "utilityPathDetection.h"
|
||||
|
||||
@@ -32,3 +34,5 @@ void QtProjectWizardContentPathsFrameworkSearchGlobal::save()
|
||||
ApplicationSettings::getInstance()->setFrameworkSearchPaths(m_list->getPathsAsDisplayed());
|
||||
ApplicationSettings::getInstance()->save();
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATHS_FRAMEWORK_SEARCH_GLOBAL_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATHS_FRAMEWORK_SEARCH_GLOBAL_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPaths.h"
|
||||
|
||||
class QtProjectWizardContentPathsFrameworkSearchGlobal
|
||||
@@ -15,4 +19,6 @@ public:
|
||||
virtual void save() override;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATHS_FRAMEWORK_SEARCH_GLOBAL_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathsHeaderSearch.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <QMessageBox>
|
||||
@@ -397,3 +399,5 @@ void QtProjectWizardContentPathsHeaderSearch::showValidationResult(const std::ve
|
||||
connect(m_filesDialog.get(), &QtTextEditDialog::canceled, this, &QtProjectWizardContentPathsHeaderSearch::closedFilesDialog);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATHS_HEADER_SEARCH_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATHS_HEADER_SEARCH_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "FilePathFilter.h"
|
||||
#include "QtProjectWizardContentPaths.h"
|
||||
|
||||
@@ -39,4 +43,6 @@ private:
|
||||
const bool m_indicateAsAdditional;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATHS_HEADER_SEARCH_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathsHeaderSearchGlobal.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "ApplicationSettings.h"
|
||||
@@ -110,3 +112,5 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::setPaths(const std::vector<F
|
||||
m_list->addPaths({ ResourcePaths::getCxxCompilerHeaderPath() }, true);
|
||||
m_list->addPaths(paths);
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATHS_HEADER_SEARCH_GLOBAL_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATHS_HEADER_SEARCH_GLOBAL_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPaths.h"
|
||||
|
||||
class QtProjectWizardContentPathsHeaderSearchGlobal
|
||||
@@ -23,4 +27,6 @@ private:
|
||||
void setPaths(const std::vector<FilePath>& paths);
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATHS_HEADER_SEARCH_GLOBAL_H
|
||||
|
||||
+4
@@ -1,5 +1,7 @@
|
||||
#include "QtProjectWizardContentPathsIndexedHeaders.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "CodeblocksProject.h"
|
||||
@@ -251,3 +253,5 @@ void QtProjectWizardContentPathsIndexedHeaders::savedFilesDialog()
|
||||
m_list->setPaths(dynamic_cast<QtSelectPathsDialog*>(m_filesDialog.get())->getPathsList());
|
||||
closedFilesDialog();
|
||||
}
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
+6
@@ -1,6 +1,10 @@
|
||||
#ifndef QT_PROJECT_WIZARD_CONTENT_PATHS_INDEXED_HEADER_PATHS_H
|
||||
#define QT_PROJECT_WIZARD_CONTENT_PATHS_INDEXED_HEADER_PATHS_H
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#include "QtProjectWizardContentPaths.h"
|
||||
|
||||
class SourceGroupSettingsCxxCdb;
|
||||
@@ -34,4 +38,6 @@ private:
|
||||
const std::string m_projectKindName;
|
||||
};
|
||||
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#endif // QT_PROJECT_WIZARD_CONTENT_PATHS_INDEXED_HEADER_PATHS_H
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
#include "QtProjectWizardContentPathsSource.h"
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#include "SourceGroupCustomCommand.h"
|
||||
#include "SourceGroupCxxEmpty.h"
|
||||
#include "SourceGroupJavaEmpty.h"
|
||||
#include "SourceGroupPythonEmpty.h"
|
||||
#include "SourceGroupSettingsCustomCommand.h"
|
||||
#include "SourceGroupSettingsJavaEmpty.h"
|
||||
#include "SourceGroupSettingsPythonEmpty.h"
|
||||
#include "SourceGroupSettingsWithCxxPathsAndFlags.h"
|
||||
#include "SourceGroupSettingsWithSourcePaths.h"
|
||||
#include "utility.h"
|
||||
#include "utilityFile.h"
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#include "SourceGroupCxxEmpty.h"
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#include "SourceGroupJavaEmpty.h"
|
||||
#include "SourceGroupSettingsJavaEmpty.h"
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
#include "SourceGroupPythonEmpty.h"
|
||||
#include "SourceGroupSettingsPythonEmpty.h"
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
QtProjectWizardContentPathsSource::QtProjectWizardContentPathsSource(
|
||||
std::shared_ptr<SourceGroupSettings> settings, QtProjectWizardWindow* window
|
||||
)
|
||||
@@ -50,19 +61,29 @@ void QtProjectWizardContentPathsSource::save()
|
||||
std::vector<FilePath> QtProjectWizardContentPathsSource::getFilePaths() const
|
||||
{
|
||||
std::set<FilePath> allSourceFilePaths;
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
if (std::dynamic_pointer_cast<SourceGroupSettingsWithCxxPathsAndFlags>(m_settings))
|
||||
{
|
||||
allSourceFilePaths = SourceGroupCxxEmpty(m_settings).getAllSourceFilePaths();
|
||||
}
|
||||
else if (std::shared_ptr<SourceGroupSettingsJavaEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsJavaEmpty>(m_settings))
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
if (std::shared_ptr<SourceGroupSettingsJavaEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsJavaEmpty>(m_settings))
|
||||
{
|
||||
allSourceFilePaths = SourceGroupJavaEmpty(settings).getAllSourceFilePaths();
|
||||
}
|
||||
else if (std::shared_ptr<SourceGroupSettingsPythonEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsPythonEmpty>(m_settings))
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
if (std::shared_ptr<SourceGroupSettingsPythonEmpty> settings = std::dynamic_pointer_cast<SourceGroupSettingsPythonEmpty>(m_settings))
|
||||
{
|
||||
allSourceFilePaths = SourceGroupPythonEmpty(settings).getAllSourceFilePaths();
|
||||
}
|
||||
else if (std::shared_ptr<SourceGroupSettingsCustomCommand> settings = std::dynamic_pointer_cast<SourceGroupSettingsCustomCommand>(m_settings))
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
|
||||
if (std::shared_ptr<SourceGroupSettingsCustomCommand> settings = std::dynamic_pointer_cast<SourceGroupSettingsCustomCommand>(m_settings))
|
||||
{
|
||||
allSourceFilePaths = SourceGroupCustomCommand(settings).getAllSourceFilePaths();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "QtPreferencesWindow.h"
|
||||
|
||||
#include "language_packages.h"
|
||||
|
||||
#include "MessageLoadProject.h"
|
||||
#include "MessagePluginPortChange.h"
|
||||
#include "MessageRefreshUI.h"
|
||||
@@ -32,11 +34,13 @@ QtPreferencesWindow::QtPreferencesWindow(QWidget* parent)
|
||||
summary->setIsForm(true);
|
||||
summary->addContent(new QtProjectWizardContentPreferences(this));
|
||||
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
summary->addContent(new QtProjectWizardContentPathsHeaderSearchGlobal(this));
|
||||
if (utility::getOsType() == OS_MAC)
|
||||
{
|
||||
summary->addContent(new QtProjectWizardContentPathsFrameworkSearchGlobal(this));
|
||||
}
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
|
||||
setPreferredSize(QSize(750, 500));
|
||||
setContent(summary);
|
||||
|
||||
@@ -107,18 +107,24 @@ void QtStartScreen::updateButtons()
|
||||
LanguageType lang = ProjectSettings::getLanguageOfProject(recentProjects[i]);
|
||||
switch (lang)
|
||||
{
|
||||
case LanguageType::LANGUAGE_C:
|
||||
#if BUILD_CXX_LANGUAGE_PACKAGE
|
||||
case LanguageType::LANGUAGE_C:
|
||||
button->setIcon(m_cIcon);
|
||||
break;
|
||||
case LANGUAGE_CPP:
|
||||
button->setIcon(m_cppIcon);
|
||||
break;
|
||||
case LANGUAGE_PYTHON:
|
||||
button->setIcon(m_pythonIcon);
|
||||
break;
|
||||
#endif // BUILD_CXX_LANGUAGE_PACKAGE
|
||||
#if BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
case LANGUAGE_JAVA:
|
||||
button->setIcon(m_javaIcon);
|
||||
break;
|
||||
#endif // BUILD_JAVA_LANGUAGE_PACKAGE
|
||||
#if BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
case LANGUAGE_PYTHON:
|
||||
button->setIcon(m_pythonIcon);
|
||||
break;
|
||||
#endif // BUILD_PYTHON_LANGUAGE_PACKAGE
|
||||
default:
|
||||
button->setIcon(m_projectIcon);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user