Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
ui: improve help message for cxx "source file extensions" in project …
Browse files Browse the repository at this point in the history
…settings (#1039)
  • Loading branch information
mlangkabel authored Jun 8, 2020
1 parent 0294589 commit 6d39039
Showing 1 changed file with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#include "QtProjectWizardContentExtensions.h"

#include "language_packages.h"

#include <QFormLayout>

#include "QtStringListBox.h"
#include "SourceGroupSettingsWithSourceExtensions.h"

#if BUILD_CXX_LANGUAGE_PACKAGE
# include "SourceGroupSettingsWithSourceExtensionsC.h"
# include "SourceGroupSettingsWithSourceExtensionsCpp.h"
# include "SourceGroupSettingsWithSourceExtensionsCxx.h"
#endif

QtProjectWizardContentExtensions::QtProjectWizardContentExtensions(
std::shared_ptr<SourceGroupSettingsWithSourceExtensions> settings, QtProjectWizardWindow* window)
: QtProjectWizardContent(window), m_settings(settings)
Expand All @@ -16,9 +24,23 @@ void QtProjectWizardContentExtensions::populate(QGridLayout* layout, int& row)
QLabel* sourceLabel = createFormLabel(QStringLiteral("Source File Extensions"));
layout->addWidget(sourceLabel, row, QtProjectWizardWindow::FRONT_COL, Qt::AlignTop);

QString cxxAddition("");
#if BUILD_CXX_LANGUAGE_PACKAGE
if (std::dynamic_pointer_cast<SourceGroupSettingsWithSourceExtensionsC>(m_settings) ||
std::dynamic_pointer_cast<SourceGroupSettingsWithSourceExtensionsCpp>(m_settings) ||
std::dynamic_pointer_cast<SourceGroupSettingsWithSourceExtensionsCxx>(m_settings))
{
cxxAddition = QStringLiteral(
" Files with these extensions will serve as entry points for the indexer. Headers that "
"are included by these files will be traversed on the fly.");
}
#endif

addHelpButton(
QStringLiteral("Source File Extensions"),
QStringLiteral("Define extensions for source files including the dot (e.g. .cpp or .java)"),
QStringLiteral(
"Define extensions for source files including the dot (e.g. \".cpp\" or \".java\").") +
cxxAddition,
layout,
row);

Expand Down

0 comments on commit 6d39039

Please sign in to comment.