48 QList <CSwordModuleInfo*> indexedModules;
49 for (
auto *
const m : modules) {
56 indexedModules.append(m);
58 std::array<QMetaObject::Connection, 3u> connections{
59 BT_CONNECT(
this, &BtModuleIndexDialog::canceled,
60 m , [m]{ m->cancelIndexing(); }),
65 qApp->processEvents();
69 [
this](
int percentage) {
71 qApp->processEvents();
75 setLabelText(tr(
"Creating index for work: %1").arg(m->name()));
83 }
catch (std::exception
const & e) {
86 msg = tr(
"<UNKNOWN EXCEPTION>");
90 tr(
"Indexing aborted"),
91 tr(
"An internal error occurred while building "
92 "the index:<br/><br/>%1").arg(msg));
98 for (
auto & connection : connections) {
103 if (wasCanceled()) success =
false;
110 for (
auto *
const m : indexedModules)
QMessageBox::StandardButton showWarning(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)