Skip to content

Commit 0f06758

Browse files
committed
don't show message box when only one provisioning file
1 parent ca821eb commit 0f06758

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

apps/cmstapp/code/provisioning/prov_ed.cpp

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,12 @@ void ProvisioningEditor::inputFreeForm(QAction* act)
340340
act == ui.actionService ? key = "[service_%1]\n" : key.append(" = %1\n");
341341

342342
// get the string from the user
343-
QString text = "";
344-
text = QInputDialog::getText(this,
345-
tr("%1 - Text Input").arg(TranslateStrings::cmtr("cmst")),
346-
str,
347-
echomode,
348-
"",
349-
&ok);
343+
QString text = QInputDialog::getText(this,
344+
tr("%1 - Text Input").arg(TranslateStrings::cmtr("cmst")),
345+
str,
346+
echomode,
347+
"",
348+
&ok);
350349

351350
if (ok) ui.plainTextEdit_main->insertPlainText(key.arg(text));
352351
} // else
@@ -517,11 +516,6 @@ void ProvisioningEditor::processFileList(const QStringList& sl_conf)
517516
QMessageBox::Ok);
518517
break;
519518
case 1:
520-
QMessageBox::information(this,
521-
tr("%1 - Information").arg(TranslateStrings::cmtr("cmst")),
522-
tr("<center>Reading configuration file: %1").arg(sl_conf.at(0)),
523-
QMessageBox::Ok,
524-
QMessageBox::Ok);
525519
filename = sl_conf.at(0);
526520
break;
527521
default:
@@ -558,7 +552,7 @@ void ProvisioningEditor::processFileList(const QStringList& sl_conf)
558552
qid->setWindowTitle(tr("%1 - Select File").arg(TranslateStrings::cmtr("cmst")) );
559553
qid->setLabelText(tr("Select a file to be deleted.") );
560554
qid->setComboBoxItems(sl_conf);
561-
qid->exec();
555+
qid->exec();
562556
if (qid->result() == QDialog::Accepted)
563557
filename = qid->textValue();
564558
break;
@@ -579,10 +573,7 @@ void ProvisioningEditor::processFileList(const QStringList& sl_conf)
579573
qid->setLabelText(tr("Enter a new file name or select<br>an existing file to overwrite.") );
580574
qid->setComboBoxEditable(true);
581575
qid->setComboBoxItems(sl_conf);
582-
qid->exec();
583-
if (qid->result() == QDialog::Accepted)
584-
filename = qid->textValue();
585-
576+
qid->exec();
586577
if (qid->result() == QDialog::Accepted) {
587578
filename = qid->textValue();
588579
filename = filename.simplified(); // multiple whitespace to one space

0 commit comments

Comments
 (0)