mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-09-23 16:49:07 +03:00
Database connections have been refactored
keepDbCredentials property has been added to Connection setPassPharse(QString& passPharse) method has been added to ReportEngine IDbCredentialsProvider interface has been added registerDbCredentialsProvider(IDbCredentialsProvider *provider) has been added to IDataSourceManager
This commit is contained in:
@@ -351,13 +351,13 @@ void ModelToDataSource::slotModelDestroed()
|
||||
ConnectionDesc::ConnectionDesc(QSqlDatabase db, QObject *parent)
|
||||
: QObject(parent), m_connectionName(db.connectionName()), m_connectionHost(db.hostName()), m_connectionDriver(db.driverName()),
|
||||
m_databaseName(db.databaseName()), m_user(db.userName()), m_password(db.password()), m_autoconnect(false),
|
||||
m_internal(false)
|
||||
m_internal(false), m_keepDBCredentials(true)
|
||||
{}
|
||||
|
||||
ConnectionDesc::ConnectionDesc(QObject *parent)
|
||||
:QObject(parent),m_connectionName(""),m_connectionHost(""),m_connectionDriver(""),
|
||||
m_databaseName(""), m_user(""), m_password(""), m_autoconnect(false),
|
||||
m_internal(false)
|
||||
m_internal(false), m_keepDBCredentials(true)
|
||||
{}
|
||||
|
||||
ConnectionDesc::Ptr ConnectionDesc::create(QSqlDatabase db, QObject *parent)
|
||||
@@ -391,6 +391,16 @@ QString ConnectionDesc::connectionNameForReport(const QString &connectionName)
|
||||
return connectionName.compare(tr("defaultConnection")) == 0 ? QSqlDatabase::defaultConnection : connectionName;
|
||||
}
|
||||
|
||||
bool ConnectionDesc::keepDBCredentials() const
|
||||
{
|
||||
return m_keepDBCredentials;
|
||||
}
|
||||
|
||||
void ConnectionDesc::setKeepDBCredentials(bool keepDBCredentals)
|
||||
{
|
||||
m_keepDBCredentials = keepDBCredentals;
|
||||
}
|
||||
|
||||
QueryDesc::QueryDesc(QString queryName, QString queryText, QString connection)
|
||||
:m_queryName(queryName), m_queryText(queryText), m_connectionName(connection)
|
||||
{}
|
||||
|
Reference in New Issue
Block a user