0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-09 05:57:14 +03:00

Using variables in the connection describer has been extended

This commit is contained in:
Arin Alexander
2020-05-08 14:19:02 +03:00
parent 36b60319ce
commit ccf8134012
10 changed files with 77 additions and 23 deletions

View File

@@ -808,12 +808,12 @@ bool DataSourceManager::initAndOpenDB(QSqlDatabase& db, ConnectionDesc& connecti
bool connected = false;
db.setHostName(replaceVariables(connectionDesc.host()));
db.setUserName(replaceVariables(connectionDesc.userName()));
db.setPassword(replaceVariables(connectionDesc.password()));
if (connectionDesc.port()!=-1)
db.setPort(connectionDesc.port());
db.setDatabaseName(replaceVariables(connectionDesc.databaseName()));
if (connectionDesc.port()!="")
db.setPort(replaceVariables(connectionDesc.port()).toInt());
if (!connectionDesc.keepDBCredentials() && m_dbCredentialsProvider){
if (!m_dbCredentialsProvider->getUserName(connectionDesc.name()).isEmpty())