! shows the database manager where the connections are created and edited. The selected connection is selected in the connection combo box in this widget. **/
| 647 | The selected connection is selected in the connection combo box in this widget. |
| 648 | **/ |
| 649 | void ImportSQLDatabaseWidget::showDatabaseManager() { |
| 650 | auto* dlg = new DatabaseManagerDialog(this, ui.cbConnection->currentText()); |
| 651 | |
| 652 | if (dlg->exec() == QDialog::Accepted) { |
| 653 | // re-read the available connections to be in sync with the changes in DatabaseManager |
| 654 | m_initializing = true; |
| 655 | ui.cbConnection->clear(); |
| 656 | readConnections(); |
| 657 | |
| 658 | // select the connection the user has selected in DatabaseManager |
| 659 | const QString& conn = dlg->connection(); |
| 660 | ui.cbConnection->setCurrentIndex(ui.cbConnection->findText(conn)); |
| 661 | m_initializing = false; |
| 662 | |
| 663 | connectionChanged(); |
| 664 | } |
| 665 | |
| 666 | delete dlg; |
| 667 | } |
| 668 | |
| 669 | void ImportSQLDatabaseWidget::setInvalid() { |
| 670 | if (m_valid) { |
nothing calls this directly
no test coverage detected