ui: Use QtTextEditDialog for include directive validation results
This commit is contained in:
@@ -46,6 +46,7 @@ void QtTextEditDialog::populateWindow(QWidget* widget)
|
|||||||
|
|
||||||
QLabel* description = new QLabel(m_description);
|
QLabel* description = new QLabel(m_description);
|
||||||
description->setObjectName("description");
|
description->setObjectName("description");
|
||||||
|
description->setWordWrap(true);
|
||||||
layout->addWidget(description);
|
layout->addWidget(description);
|
||||||
|
|
||||||
m_text = new QPlainTextEdit();
|
m_text = new QPlainTextEdit();
|
||||||
|
|||||||
@@ -484,33 +484,22 @@ void QtProjectWizzardContentPathsHeaderSearch::showValidationResult(const std::v
|
|||||||
detailedText += unresolvedInclude.getIncludingFile().str() + "[" + std::to_string(unresolvedInclude.getLineNumber()) + "]: " + unresolvedInclude.getDirective() + "\n";
|
detailedText += unresolvedInclude.getIncludingFile().str() + "[" + std::to_string(unresolvedInclude.getLineNumber()) + "]: " + unresolvedInclude.getDirective() + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
QMessageBox msgBox;
|
m_filesDialog = std::make_shared<QtTextEditDialog>("Unresolved Include Directives",
|
||||||
msgBox.setText(QString::fromStdString(
|
("<p>The indexed files contain <b>" + std::to_string(unresolvedIncludes.size()) + "</b> include directive" + (unresolvedIncludes.size() == 1 ? "" : "s") + " that could "
|
||||||
"<p>The indexed files contain <b>" + std::to_string(unresolvedIncludes.size()) + "</b> include directive" + (unresolvedIncludes.size() == 1 ? "" : "s") + " that could "
|
|
||||||
"not be resolved correctly. Please check the details and add the respective header search paths.</p>"
|
"not be resolved correctly. Please check the details and add the respective header search paths.</p>"
|
||||||
"<p><b>Note</b>: This is only a quick pass that does not regard block commenting or conditional preprocessor directives. This means that "
|
"<p><b>Note</b>: This is only a quick pass that does not regard block commenting or conditional preprocessor directives. This means that "
|
||||||
"some of the unresolved includes may actually not be required by the indexer.</p>"));
|
"some of the unresolved includes may actually not be required by the indexer.</p>").c_str()
|
||||||
msgBox.setDetailedText(QString::fromStdString(detailedText));
|
);
|
||||||
msgBox.exec();
|
m_filesDialog->setup();
|
||||||
|
m_filesDialog->setCloseVisible(false);
|
||||||
|
m_filesDialog->setReadOnly(true);
|
||||||
|
|
||||||
|
m_filesDialog->setText(detailedText);
|
||||||
|
m_filesDialog->showWindow();
|
||||||
|
|
||||||
|
connect(m_filesDialog.get(), &QtTextEditDialog::finished, this, &QtProjectWizzardContentPathsHeaderSearch::closedFilesDialog);
|
||||||
|
connect(m_filesDialog.get(), &QtTextEditDialog::canceled, this, &QtProjectWizzardContentPathsHeaderSearch::closedFilesDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//if (!m_filesDialog)
|
|
||||||
//{
|
|
||||||
// m_filesDialog = std::make_shared<QtTextEditDialog>(
|
|
||||||
// getFileNamesTitle(), QString::number(fileNames.size()) + " " + getFileNamesDescription());
|
|
||||||
// m_filesDialog->setup();
|
|
||||||
|
|
||||||
// m_filesDialog->setText(utility::join(fileNames, "\n"));
|
|
||||||
// m_filesDialog->setCloseVisible(false);
|
|
||||||
// m_filesDialog->setReadOnly(true);
|
|
||||||
|
|
||||||
// connect(m_filesDialog.get(), SIGNAL(finished()), this, SLOT(closedFilesDialog()));
|
|
||||||
// connect(m_filesDialog.get(), SIGNAL(canceled()), this, SLOT(closedFilesDialog()));
|
|
||||||
//}
|
|
||||||
|
|
||||||
//m_filesDialog->showWindow();
|
|
||||||
//m_filesDialog->raise();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QtProjectWizzardContentPathsHeaderSearchGlobal::QtProjectWizzardContentPathsHeaderSearchGlobal(
|
QtProjectWizzardContentPathsHeaderSearchGlobal::QtProjectWizzardContentPathsHeaderSearchGlobal(
|
||||||
|
|||||||
Reference in New Issue
Block a user