LimeReport save pasword as crypted
I checked your code, and since it is "open source" password is really unsafe, because everything needed to decrypt the password is right there in the code.
Send me any of your lrxml files and i will read database credentials within minutes.
You added the possibility to send those credentals as variables, but that complicates a little development, and it is like workaround solution.
It didn't come to my mind that limereport library has integrated designer, i allways assumed that designer is separate application. Anyway i executed lrdesigner from application and there is "qt_sql_default_connection" item in select list.
That is realy strange that standalone lrdesigner is not able to create report for any application. there is some hidden design flaw. Something is not where it should be or something is not named right.
I think that the connection should not be part of report but part of application that runs the report. Standalone LRDesigner should manage its own db connections by name
Qt has a way of creating multiple connections by name
QSqlDatabase::database()
is actually default connection named "defaultConnection". The full function is
QSqlDatabase::database(const QString &connectionName = QLatin1String( defaultConnection ), bool open = true)
you should use the same logic, and the same mechanism. That item in the list should be called "defaultConnection" instead of "qt_sql_default_connection", and standalone lrdesigner should be able to create one defaultConnection, and manage/save connection parameters outside report, maybe in some settings file (even if it is unsafe), or popup ask user dynamicly when needed. So that i you can use lrdesigner for any application you have.
When executing the report, the engine should search for connection by name defined when report was designed.
QSqlDatabase::contains(const QString &connectionName = QLatin1String( defaultConnection ))
can check for connection, if found it can be used.
Report is part of source code, and database passwords do not belong there
Anyway i am looking forward for your solution for managing report connection.