void ConnectDbDialogWidget::saveSettings()
{
    ConnectionSettings settings;
    settings.setEventName(ui->edEventName->text());
    settings.setConnectionType(static_cast<Event::EventPlugin::ConnectionType>(ui->tabWidget->currentIndex()));
    settings.setServerHost(ui->edServerHost->text());
    settings.setServerPort(ui->edServerPort->value());
    settings.setServerUser(ui->edServerUser->text());
    settings.setServerPassword(ui->edServerPassword->text());
    settings.setSingleWorkingDir(ui->edSingleWorkingDir->text());
}
Beispiel #2
0
    MongoServer* App::continueOpenServer(ConnectionSettings *connection, bool visible, int localport) {
        ConnectionSettings* settings = connection->clone();

        // Modify connection settings when SSH tunnel is used
        if (visible && settings->sshSettings()->enabled()) {
            settings->setServerHost("127.0.0.1");
            settings->setServerPort(localport);
        }

        MongoServer *server = new MongoServer(settings, visible);
        _servers.push_back(server);

        server->runWorkerThread();

        LOG_MSG(QString("Connecting to %1...").arg(QtUtils::toQString(server->connectionRecord()->getFullAddress())), mongo::logger::LogSeverity::Info());
        server->tryConnect();
        return server;
    }