From 2f646a70a48a2d6d69e622f71f253229b81ca5a0 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 1 Apr 2021 10:50:46 +0200 Subject: [PATCH] GUI: add option to "special index" for setting the diagnostics file --- src/qtgui/rclm_idx.cpp | 19 +++++++++++++++++- src/qtgui/specialindex.h | 7 +++++-- src/qtgui/specialindex.ui | 42 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/src/qtgui/rclm_idx.cpp b/src/qtgui/rclm_idx.cpp index 7eda431a..35b41776 100644 --- a/src/qtgui/rclm_idx.cpp +++ b/src/qtgui/rclm_idx.cpp @@ -399,12 +399,18 @@ void RclMain::rebuildIndex() } } -void SpecIdxW::onBrowsePB_clicked() +void SpecIdxW::onTargBrowsePB_clicked() { QString dir = myGetFileName(true, tr("Top indexed entity"), true); targLE->setText(dir); } +void SpecIdxW::onDiagsBrowsePB_clicked() +{ + QString fn = myGetFileName(false, tr("Diagnostics file")); + diagsLE->setText(fn); +} + bool SpecIdxW::noRetryFailed() { return !retryFailedCB->isChecked(); @@ -430,6 +436,11 @@ std::string SpecIdxW::toptarg() return qs2utf8s(targLE->text()); } +std::string SpecIdxW::diagsfile() +{ + return qs2utf8s(diagsLE->text()); +} + void SpecIdxW::onTargLE_textChanged(const QString& text) { if (text.isEmpty()) @@ -484,6 +495,12 @@ void RclMain::specialIndex() args.push_back("-r"); } + string diagsfile = specidx->diagsfile(); + if (!diagsfile.empty()) { + args.push_back("--diagfile"); + args.push_back(diagsfile); + } + if (specidx->eraseFirst()) { if (top.empty()) { args.push_back("-Z"); diff --git a/src/qtgui/specialindex.h b/src/qtgui/specialindex.h index 321cac24..ec3e97a5 100644 --- a/src/qtgui/specialindex.h +++ b/src/qtgui/specialindex.h @@ -33,19 +33,22 @@ public: : QDialog(parent) { setupUi(this); selPatsLE->setEnabled(false); - connect(browsePB, SIGNAL(clicked()), this, SLOT(onBrowsePB_clicked())); + connect(targBrowsePB, SIGNAL(clicked()), this, SLOT(onTargBrowsePB_clicked())); connect(targLE, SIGNAL(textChanged(const QString&)), this, SLOT(onTargLE_textChanged(const QString&))); + connect(diagsBrowsePB, SIGNAL(clicked()), this, SLOT(onDiagsBrowsePB_clicked())); } bool noRetryFailed(); bool eraseFirst(); std::vector selpatterns(); std::string toptarg(); + std::string diagsfile(); public slots: void onTargLE_textChanged(const QString&); - void onBrowsePB_clicked(); + void onTargBrowsePB_clicked(); + void onDiagsBrowsePB_clicked(); }; diff --git a/src/qtgui/specialindex.ui b/src/qtgui/specialindex.ui index 67b7dbe6..4b9b5441 100644 --- a/src/qtgui/specialindex.ui +++ b/src/qtgui/specialindex.ui @@ -58,7 +58,7 @@ - + Browse @@ -98,6 +98,46 @@ + + + + + + + 8 + 0 + + + + + 300 + 0 + + + + + + + + Browse + + + false + + + + + + + Diagnostics output file. Will be truncated and receive indexing diagnostics (reasons for files not being indexed). + + + false + + + + +