This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include "ApplicationSettings.h"
|
#include "ApplicationSettings.h"
|
||||||
#include "DialogView.h"
|
#include "DialogView.h"
|
||||||
#include "Project.h"
|
#include "Project.h"
|
||||||
|
#include "QtHelpButtonInfo.h"
|
||||||
#include "StorageAccess.h"
|
#include "StorageAccess.h"
|
||||||
#include "TabId.h"
|
#include "TabId.h"
|
||||||
|
|
||||||
@@ -140,7 +141,7 @@ void ErrorController::handleMessage(MessageErrorsHelpMessage* message)
|
|||||||
appSettings->setSeenErrorHelpMessage(true);
|
appSettings->setSeenErrorHelpMessage(true);
|
||||||
appSettings->save();
|
appSettings->save();
|
||||||
|
|
||||||
getView()->showErrorHelpMessage();
|
m_onQtThread([=]() { createErrorHelpButtonInfo().displayMessage(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void ErrorController::handleMessage(MessageIndexingFinished* message)
|
void ErrorController::handleMessage(MessageIndexingFinished* message)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "MessageIndexingStarted.h"
|
#include "MessageIndexingStarted.h"
|
||||||
#include "MessageListener.h"
|
#include "MessageListener.h"
|
||||||
#include "MessageShowError.h"
|
#include "MessageShowError.h"
|
||||||
|
#include "QtThreadedFunctor.h"
|
||||||
|
|
||||||
#include "Controller.h"
|
#include "Controller.h"
|
||||||
#include "ErrorView.h"
|
#include "ErrorView.h"
|
||||||
@@ -62,6 +63,7 @@ private:
|
|||||||
std::map<Id, bool> m_tabShowsErrors;
|
std::map<Id, bool> m_tabShowsErrors;
|
||||||
std::map<Id, FilePath> m_tabActiveFilePath;
|
std::map<Id, FilePath> m_tabActiveFilePath;
|
||||||
|
|
||||||
|
QtThreadedLambdaFunctor m_onQtThread;
|
||||||
bool m_newErrorsAdded = false;
|
bool m_newErrorsAdded = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ public:
|
|||||||
const std::vector<ErrorInfo>& errors, const ErrorCountInfo& errorCount, bool scrollTo) = 0;
|
const std::vector<ErrorInfo>& errors, const ErrorCountInfo& errorCount, bool scrollTo) = 0;
|
||||||
virtual void setErrorId(Id errorId) = 0;
|
virtual void setErrorId(Id errorId) = 0;
|
||||||
|
|
||||||
virtual void showErrorHelpMessage() = 0;
|
|
||||||
|
|
||||||
virtual ErrorFilter getErrorFilter() const = 0;
|
virtual ErrorFilter getErrorFilter() const = 0;
|
||||||
virtual void setErrorFilter(const ErrorFilter& filter) = 0;
|
virtual void setErrorFilter(const ErrorFilter& filter) = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -192,6 +192,8 @@ add_files(
|
|||||||
qt/utility/QtFilesAndDirectoriesDialog.h
|
qt/utility/QtFilesAndDirectoriesDialog.h
|
||||||
qt/utility/QtFlowLayout.cpp
|
qt/utility/QtFlowLayout.cpp
|
||||||
qt/utility/QtFlowLayout.h
|
qt/utility/QtFlowLayout.h
|
||||||
|
qt/utility/QtHelpButtonInfo.cpp
|
||||||
|
qt/utility/QtHelpButtonInfo.h
|
||||||
qt/utility/QtHighlighter.cpp
|
qt/utility/QtHighlighter.cpp
|
||||||
qt/utility/QtHighlighter.h
|
qt/utility/QtHighlighter.h
|
||||||
qt/utility/QtScrollSpeedChangeListener.cpp
|
qt/utility/QtScrollSpeedChangeListener.cpp
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
#include "QtHelpButton.h"
|
#include "QtHelpButton.h"
|
||||||
|
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
#include "ResourcePaths.h"
|
#include "ResourcePaths.h"
|
||||||
|
|
||||||
QtHelpButton::QtHelpButton(const QString& helpTitle, const QString& helpText, QWidget* parent)
|
QtHelpButton::QtHelpButton(const QtHelpButtonInfo& info, QWidget* parent)
|
||||||
: QtIconButton(
|
: QtIconButton(
|
||||||
ResourcePaths::getGuiPath().concatenate(L"window/help.png"),
|
ResourcePaths::getGuiPath().concatenate(L"window/help.png"),
|
||||||
ResourcePaths::getGuiPath().concatenate(L"window/help_hover.png"),
|
ResourcePaths::getGuiPath().concatenate(L"window/help_hover.png"),
|
||||||
parent)
|
parent)
|
||||||
, m_helpTitle(helpTitle)
|
, m_info(info)
|
||||||
, m_helpText(helpText)
|
|
||||||
{
|
{
|
||||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||||
@@ -27,12 +24,5 @@ QtHelpButton::QtHelpButton(const QString& helpTitle, const QString& helpText, QW
|
|||||||
|
|
||||||
void QtHelpButton::handleHelpPress()
|
void QtHelpButton::handleHelpPress()
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
m_info.displayMessage();
|
||||||
msgBox.setWindowTitle(QStringLiteral("Sourcetrail"));
|
|
||||||
msgBox.setIcon(QMessageBox::Information);
|
|
||||||
msgBox.setText("<b>" + m_helpTitle + "</b>");
|
|
||||||
msgBox.setInformativeText(m_helpText);
|
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
|
||||||
msgBox.exec();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef QT_HELP_BUTTON_H
|
#ifndef QT_HELP_BUTTON_H
|
||||||
#define QT_HELP_BUTTON_H
|
#define QT_HELP_BUTTON_H
|
||||||
|
|
||||||
|
#include "QtHelpButtonInfo.h"
|
||||||
#include "QtIconButton.h"
|
#include "QtIconButton.h"
|
||||||
|
|
||||||
class QtHelpButton: public QtIconButton
|
class QtHelpButton: public QtIconButton
|
||||||
@@ -8,14 +9,13 @@ class QtHelpButton: public QtIconButton
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QtHelpButton(const QString& helpTitle, const QString& helpText, QWidget* parent = nullptr);
|
QtHelpButton(const QtHelpButtonInfo& info, QWidget* parent = nullptr);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleHelpPress();
|
void handleHelpPress();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_helpTitle;
|
QtHelpButtonInfo m_info;
|
||||||
QString m_helpText;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_HELP_BUTTON_H
|
#endif // QT_HELP_BUTTON_H
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ QToolButton* QtProjectWizardContent::createSourceGroupButton(QString name, QStri
|
|||||||
QtHelpButton* QtProjectWizardContent::addHelpButton(
|
QtHelpButton* QtProjectWizardContent::addHelpButton(
|
||||||
const QString& helpTitle, const QString& helpText, QGridLayout* layout, int row) const
|
const QString& helpTitle, const QString& helpText, QGridLayout* layout, int row) const
|
||||||
{
|
{
|
||||||
QtHelpButton* button = new QtHelpButton(helpTitle, helpText);
|
QtHelpButton* button = new QtHelpButton(QtHelpButtonInfo(helpTitle, helpText));
|
||||||
layout->addWidget(button, row, QtProjectWizardWindow::HELP_COL, Qt::AlignTop);
|
layout->addWidget(button, row, QtProjectWizardWindow::HELP_COL, Qt::AlignTop);
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
#include "QtHelpButtonInfo.h"
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
QtHelpButtonInfo::QtHelpButtonInfo(const QString& title, const QString& text)
|
||||||
|
: m_title(title), m_text(text)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtHelpButtonInfo::displayMessage()
|
||||||
|
{
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setWindowTitle(QStringLiteral("Sourcetrail"));
|
||||||
|
msgBox.setIcon(QMessageBox::Information);
|
||||||
|
msgBox.setText("<b>" + m_title + "</b>");
|
||||||
|
msgBox.setInformativeText(m_text);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
QtHelpButtonInfo createErrorHelpButtonInfo()
|
||||||
|
{
|
||||||
|
return QtHelpButtonInfo(
|
||||||
|
QStringLiteral("Fixing Errors"),
|
||||||
|
QStringLiteral(
|
||||||
|
"Please read this if your project is showing errors after indexing.<br />"
|
||||||
|
"There are different types of errors:"
|
||||||
|
"<ul>"
|
||||||
|
"<li><b>Fatals</b> cause the indexer to stop. All or big parts of indexed "
|
||||||
|
"information "
|
||||||
|
"for the involved "
|
||||||
|
"source file is missing. <b>Make sure to fix all fatals.</li>"
|
||||||
|
"<li><b>Errors</b> are issues that the indexer considers as wrong code. Usually "
|
||||||
|
"the "
|
||||||
|
"indexer is able to "
|
||||||
|
"recover from these errors. The indexed information of the involved source file "
|
||||||
|
"may "
|
||||||
|
"not be complete, but "
|
||||||
|
"it is still useful.</li>"
|
||||||
|
"</ul>"
|
||||||
|
"You need to edit your Sourcetrail project and reindex it to fix errors. The "
|
||||||
|
"displayed "
|
||||||
|
"error messages are "
|
||||||
|
"generated by Sourcetrail's language specific indexers:"
|
||||||
|
"<ul>"
|
||||||
|
"<li><b>C/C++</b> error messages are generated by the <b>clang compiler "
|
||||||
|
"frontend</b>.</li>"
|
||||||
|
"<li><b>Java</b> error messages are generated by the <b>Eclipse JDT "
|
||||||
|
"library</b>.</li>"
|
||||||
|
"<li><b>Python</b> error messages are generated by the <b>Jedi static analysis "
|
||||||
|
"library</b>.</li>"
|
||||||
|
"</ul>"
|
||||||
|
"You should be able to find information about errors you are not familiar with "
|
||||||
|
"online. "
|
||||||
|
"<b>Double click</b> "
|
||||||
|
"an error message in the table to select it for <b>copying</b>.<br />"));
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef QT_HELP_BUTTON_INFO_H
|
||||||
|
#define QT_HELP_BUTTON_INFO_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
class QtHelpButtonInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QtHelpButtonInfo(const QString& helpTitle, const QString& helpText);
|
||||||
|
|
||||||
|
void displayMessage();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString m_title;
|
||||||
|
QString m_text;
|
||||||
|
};
|
||||||
|
|
||||||
|
QtHelpButtonInfo createErrorHelpButtonInfo();
|
||||||
|
|
||||||
|
#endif // QT_HELP_BUTTON_INFO_H
|
||||||
@@ -57,12 +57,8 @@ QtErrorView::QtErrorView(ViewLayout* viewLayout)
|
|||||||
m_table->setColumnHidden(Column::ID, true);
|
m_table->setColumnHidden(Column::ID, true);
|
||||||
|
|
||||||
QStringList headers;
|
QStringList headers;
|
||||||
headers << QStringLiteral("ID")
|
headers << QStringLiteral("ID") << QStringLiteral("Type") << QStringLiteral("Message")
|
||||||
<< QStringLiteral("Type")
|
<< QStringLiteral("File") << QStringLiteral("Line") << QStringLiteral("Indexed")
|
||||||
<< QStringLiteral("Message")
|
|
||||||
<< QStringLiteral("File")
|
|
||||||
<< QStringLiteral("Line")
|
|
||||||
<< QStringLiteral("Indexed")
|
|
||||||
<< QStringLiteral("Translation Unit");
|
<< QStringLiteral("Translation Unit");
|
||||||
m_model->setHorizontalHeaderLabels(headers);
|
m_model->setHorizontalHeaderLabels(headers);
|
||||||
|
|
||||||
@@ -88,40 +84,16 @@ QtErrorView::QtErrorView(ViewLayout* viewLayout)
|
|||||||
checkboxes->setSpacing(0);
|
checkboxes->setSpacing(0);
|
||||||
|
|
||||||
{
|
{
|
||||||
m_showFatals = createFilterCheckbox(QStringLiteral("Fatals"), m_errorFilter.fatal, checkboxes);
|
m_showFatals = createFilterCheckbox(
|
||||||
m_showErrors = createFilterCheckbox(QStringLiteral("Errors"), m_errorFilter.error, checkboxes);
|
QStringLiteral("Fatals"), m_errorFilter.fatal, checkboxes);
|
||||||
|
m_showErrors = createFilterCheckbox(
|
||||||
|
QStringLiteral("Errors"), m_errorFilter.error, checkboxes);
|
||||||
m_showNonIndexedFatals = createFilterCheckbox(
|
m_showNonIndexedFatals = createFilterCheckbox(
|
||||||
QStringLiteral("Fatals in non-indexed files"), m_errorFilter.unindexedFatal, checkboxes);
|
QStringLiteral("Fatals in non-indexed files"), m_errorFilter.unindexedFatal, checkboxes);
|
||||||
m_showNonIndexedErrors = createFilterCheckbox(
|
m_showNonIndexedErrors = createFilterCheckbox(
|
||||||
QStringLiteral("Errors in non-indexed files"), m_errorFilter.unindexedError, checkboxes);
|
QStringLiteral("Errors in non-indexed files"), m_errorFilter.unindexedError, checkboxes);
|
||||||
|
|
||||||
m_helpButton = new QtHelpButton(
|
m_helpButton = new QtHelpButton(createErrorHelpButtonInfo());
|
||||||
QStringLiteral("Fixing Errors"),
|
|
||||||
QStringLiteral("Please read this if your project is showing errors after indexing.<br />"
|
|
||||||
"There are different types of errors:"
|
|
||||||
"<ul>"
|
|
||||||
"<li><b>Fatals</b> cause the indexer to stop. All or big parts of indexed information "
|
|
||||||
"for the involved "
|
|
||||||
"source file is missing. <b>Make sure to fix all fatals.</li>"
|
|
||||||
"<li><b>Errors</b> are issues that the indexer considers as wrong code. Usually the "
|
|
||||||
"indexer is able to "
|
|
||||||
"recover from these errors. The indexed information of the involved source file may "
|
|
||||||
"not be complete, but "
|
|
||||||
"it is still useful.</li>"
|
|
||||||
"</ul>"
|
|
||||||
"You need to edit your Sourcetrail project and reindex it to fix errors. The displayed "
|
|
||||||
"error messages are "
|
|
||||||
"generated by Sourcetrail's language specific indexers:"
|
|
||||||
"<ul>"
|
|
||||||
"<li><b>C/C++</b> error messages are generated by the <b>clang compiler "
|
|
||||||
"frontend</b>.</li>"
|
|
||||||
"<li><b>Java</b> error messages are generated by the <b>Eclipse JDT library</b>.</li>"
|
|
||||||
"<li><b>Python</b> error messages are generated by the <b>Jedi static analysis "
|
|
||||||
"library</b>.</li>"
|
|
||||||
"</ul>"
|
|
||||||
"You should be able to find information about errors you are not familiar with online. "
|
|
||||||
"<b>Double click</b> "
|
|
||||||
"an error message in the table to select it for <b>copying</b>.<br />"));
|
|
||||||
m_helpButton->setObjectName(QStringLiteral("help_button"));
|
m_helpButton->setObjectName(QStringLiteral("help_button"));
|
||||||
checkboxes->addWidget(m_helpButton);
|
checkboxes->addWidget(m_helpButton);
|
||||||
}
|
}
|
||||||
@@ -222,7 +194,8 @@ void QtErrorView::addErrors(
|
|||||||
m_errorLabel->setText(
|
m_errorLabel->setText(
|
||||||
"<b>displaying " + QString::number(errorCount.total) + " error" +
|
"<b>displaying " + QString::number(errorCount.total) + " error" +
|
||||||
(errorCount.total != 1 ? "s" : "") +
|
(errorCount.total != 1 ? "s" : "") +
|
||||||
(errorCount.fatal > 0 ? " (" + QString::number(errorCount.fatal) + " fatal)" : QLatin1String("")) +
|
(errorCount.fatal > 0 ? " (" + QString::number(errorCount.fatal) + " fatal)"
|
||||||
|
: QLatin1String("")) +
|
||||||
"</b>");
|
"</b>");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -240,11 +213,6 @@ void QtErrorView::setErrorId(Id errorId)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtErrorView::showErrorHelpMessage()
|
|
||||||
{
|
|
||||||
m_onQtThread([=]() { m_helpButton->click(); });
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorFilter QtErrorView::getErrorFilter() const
|
ErrorFilter QtErrorView::getErrorFilter() const
|
||||||
{
|
{
|
||||||
return m_errorFilter;
|
return m_errorFilter;
|
||||||
@@ -328,8 +296,10 @@ void QtErrorView::addErrorToTable(const ErrorInfo& error)
|
|||||||
item->setData(QVariant(qlonglong(error.id)), Qt::DisplayRole);
|
item->setData(QVariant(qlonglong(error.id)), Qt::DisplayRole);
|
||||||
m_model->setItem(rowNumber, Column::ID, item);
|
m_model->setItem(rowNumber, Column::ID, item);
|
||||||
|
|
||||||
m_model->setItem(rowNumber, Column::TYPE, new QStandardItem(error.fatal ?
|
m_model->setItem(
|
||||||
QStringLiteral("FATAL") : QStringLiteral("ERROR")));
|
rowNumber,
|
||||||
|
Column::TYPE,
|
||||||
|
new QStandardItem(error.fatal ? QStringLiteral("FATAL") : QStringLiteral("ERROR")));
|
||||||
if (error.fatal)
|
if (error.fatal)
|
||||||
{
|
{
|
||||||
m_model->item(rowNumber, Column::TYPE)->setForeground(QBrush(Qt::red));
|
m_model->item(rowNumber, Column::TYPE)->setForeground(QBrush(Qt::red));
|
||||||
@@ -347,8 +317,10 @@ void QtErrorView::addErrorToTable(const ErrorInfo& error)
|
|||||||
item->setData(QVariant(qlonglong(error.lineNumber)), Qt::DisplayRole);
|
item->setData(QVariant(qlonglong(error.lineNumber)), Qt::DisplayRole);
|
||||||
m_model->setItem(rowNumber, Column::LINE, item);
|
m_model->setItem(rowNumber, Column::LINE, item);
|
||||||
|
|
||||||
m_model->setItem(rowNumber, Column::INDEXED, new QStandardItem(error.indexed ?
|
m_model->setItem(
|
||||||
QStringLiteral("yes") : QStringLiteral("no")));
|
rowNumber,
|
||||||
|
Column::INDEXED,
|
||||||
|
new QStandardItem(error.indexed ? QStringLiteral("yes") : QStringLiteral("no")));
|
||||||
|
|
||||||
m_model->setItem(
|
m_model->setItem(
|
||||||
rowNumber,
|
rowNumber,
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ public:
|
|||||||
const std::vector<ErrorInfo>& errors, const ErrorCountInfo& errorCount, bool scrollTo) override;
|
const std::vector<ErrorInfo>& errors, const ErrorCountInfo& errorCount, bool scrollTo) override;
|
||||||
void setErrorId(Id errorId) override;
|
void setErrorId(Id errorId) override;
|
||||||
|
|
||||||
void showErrorHelpMessage() override;
|
|
||||||
|
|
||||||
ErrorFilter getErrorFilter() const override;
|
ErrorFilter getErrorFilter() const override;
|
||||||
void setErrorFilter(const ErrorFilter& filter) override;
|
void setErrorFilter(const ErrorFilter& filter) override;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "ResourcePaths.h"
|
#include "ResourcePaths.h"
|
||||||
#include "utilityQt.h"
|
#include "utilityQt.h"
|
||||||
|
|
||||||
QLabel* QtIndexingDialog::createTitleLabel(const QString &title, QBoxLayout* layout)
|
QLabel* QtIndexingDialog::createTitleLabel(const QString& title, QBoxLayout* layout)
|
||||||
{
|
{
|
||||||
QLabel* label = new QLabel(title);
|
QLabel* label = new QLabel(title);
|
||||||
label->setObjectName(QStringLiteral("title"));
|
label->setObjectName(QStringLiteral("title"));
|
||||||
@@ -48,12 +48,8 @@ QWidget* QtIndexingDialog::createErrorWidget(QBoxLayout* layout)
|
|||||||
ResourcePaths::getGuiPath().concatenate(L"indexing_dialog/error.png").wstr())));
|
ResourcePaths::getGuiPath().concatenate(L"indexing_dialog/error.png").wstr())));
|
||||||
errorLayout->addWidget(errorCount);
|
errorLayout->addWidget(errorCount);
|
||||||
|
|
||||||
QtHelpButton* helpButton = new QtHelpButton(QStringLiteral("aaa"), QStringLiteral("bbb"));
|
QtHelpButton* helpButton = new QtHelpButton(QtHelpButtonInfo(createErrorHelpButtonInfo()));
|
||||||
helpButton->setColor(Qt::white);
|
helpButton->setColor(Qt::white);
|
||||||
|
|
||||||
helpButton->disconnect();
|
|
||||||
connect(helpButton, &QtHelpButton::clicked, []() { MessageErrorsHelpMessage(true).dispatch(); });
|
|
||||||
|
|
||||||
errorLayout->addWidget(helpButton);
|
errorLayout->addWidget(helpButton);
|
||||||
|
|
||||||
layout->addWidget(errorWidget, 0, Qt::AlignRight);
|
layout->addWidget(errorWidget, 0, Qt::AlignRight);
|
||||||
@@ -83,9 +79,9 @@ QtIndexingDialog::QtIndexingDialog(bool isSubWindow, QWidget* parent)
|
|||||||
m_window->setStyleSheet(
|
m_window->setStyleSheet(
|
||||||
m_window->styleSheet() +
|
m_window->styleSheet() +
|
||||||
QStringLiteral("#window { "
|
QStringLiteral("#window { "
|
||||||
"background: #2E3C86;"
|
"background: #2E3C86;"
|
||||||
"border: none;"
|
"border: none;"
|
||||||
"}"));
|
"}"));
|
||||||
|
|
||||||
setStyleSheet(
|
setStyleSheet(
|
||||||
(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"window/window.css")) +
|
(utility::getStyleSheet(ResourcePaths::getGuiPath().concatenate(L"window/window.css")) +
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ QtIndexingStartDialog::QtIndexingStartDialog(
|
|||||||
modeLabel->setText(QStringLiteral("Mode:"));
|
modeLabel->setText(QStringLiteral("Mode:"));
|
||||||
modeLabel->setAlignment(Qt::AlignLeft);
|
modeLabel->setAlignment(Qt::AlignLeft);
|
||||||
|
|
||||||
QtHelpButton* helpButton = new QtHelpButton(
|
QtHelpButton* helpButton = new QtHelpButton(QtHelpButtonInfo(
|
||||||
QStringLiteral("Indexing Modes"),
|
QStringLiteral("Indexing Modes"),
|
||||||
QString("<b>Updated files:</b> Reindexes all files that were modified since the last "
|
QString("<b>Updated files:</b> Reindexes all files that were modified since the last "
|
||||||
"indexing, all new files and all files depending "
|
"indexing, all new files and all files depending "
|
||||||
@@ -58,7 +58,7 @@ QtIndexingStartDialog::QtIndexingStartDialog(
|
|||||||
"<i>Hint: Use this option for a quick first indexing pass and start browsing "
|
"<i>Hint: Use this option for a quick first indexing pass and start browsing "
|
||||||
"the code base "
|
"the code base "
|
||||||
"while running a second pass for in-depth indexing.<br /><br />"
|
"while running a second pass for in-depth indexing.<br /><br />"
|
||||||
: ""));
|
: "")));
|
||||||
helpButton->setColor(Qt::white);
|
helpButton->setColor(Qt::white);
|
||||||
modeTitleLayout->addWidget(helpButton);
|
modeTitleLayout->addWidget(helpButton);
|
||||||
|
|
||||||
@@ -67,9 +67,11 @@ QtIndexingStartDialog::QtIndexingStartDialog(
|
|||||||
modeLayout->addLayout(modeTitleLayout);
|
modeLayout->addLayout(modeTitleLayout);
|
||||||
modeLayout->addSpacing(5);
|
modeLayout->addSpacing(5);
|
||||||
|
|
||||||
m_refreshModeButtons.emplace(REFRESH_UPDATED_FILES, new QRadioButton(QStringLiteral("Updated files")));
|
|
||||||
m_refreshModeButtons.emplace(
|
m_refreshModeButtons.emplace(
|
||||||
REFRESH_UPDATED_AND_INCOMPLETE_FILES, new QRadioButton(QStringLiteral("Incomplete && updated files")));
|
REFRESH_UPDATED_FILES, new QRadioButton(QStringLiteral("Updated files")));
|
||||||
|
m_refreshModeButtons.emplace(
|
||||||
|
REFRESH_UPDATED_AND_INCOMPLETE_FILES,
|
||||||
|
new QRadioButton(QStringLiteral("Incomplete && updated files")));
|
||||||
m_refreshModeButtons.emplace(REFRESH_ALL_FILES, new QRadioButton(QStringLiteral("All files")));
|
m_refreshModeButtons.emplace(REFRESH_ALL_FILES, new QRadioButton(QStringLiteral("All files")));
|
||||||
|
|
||||||
std::function<void(bool)> func = [=](bool checked) {
|
std::function<void(bool)> func = [=](bool checked) {
|
||||||
@@ -108,7 +110,8 @@ QtIndexingStartDialog::QtIndexingStartDialog(
|
|||||||
|
|
||||||
if (enabledShallowOption)
|
if (enabledShallowOption)
|
||||||
{
|
{
|
||||||
QCheckBox* shallowIndexingCheckBox = new QCheckBox(QStringLiteral("Shallow Python Indexing"));
|
QCheckBox* shallowIndexingCheckBox = new QCheckBox(
|
||||||
|
QStringLiteral("Shallow Python Indexing"));
|
||||||
connect(shallowIndexingCheckBox, &QCheckBox::toggled, [=]() {
|
connect(shallowIndexingCheckBox, &QCheckBox::toggled, [=]() {
|
||||||
emit setShallowIndexing(shallowIndexingCheckBox->isChecked());
|
emit setShallowIndexing(shallowIndexingCheckBox->isChecked());
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user