MCPcopy Create free account
hub / github.com/KDE/labplot / showDatabaseManager

Method showDatabaseManager

src/frontend/datasources/ImportSQLDatabaseWidget.cpp:649–667  ·  view source on GitHub ↗

! shows the database manager where the connections are created and edited. The selected connection is selected in the connection combo box in this widget. **/

Source from the content-addressed store, hash-verified

647 The selected connection is selected in the connection combo box in this widget.
648**/
649void 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
669void ImportSQLDatabaseWidget::setInvalid() {
670 if (m_valid) {

Callers

nothing calls this directly

Calls 5

currentTextMethod · 0.80
execMethod · 0.80
clearMethod · 0.45
connectionMethod · 0.45
setCurrentIndexMethod · 0.45

Tested by

no test coverage detected