diff --git a/common.pri b/common.pri
index 24a0708..558ecc7 100644
--- a/common.pri
+++ b/common.pri
@@ -133,7 +133,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
LIMEREPORT_VERSION_MAJOR = 1
LIMEREPORT_VERSION_MINOR = 5
-LIMEREPORT_VERSION_RELEASE = 50
+LIMEREPORT_VERSION_RELEASE = 51
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
diff --git a/limereport/databrowser/images/closed_eye.png b/limereport/databrowser/images/closed_eye.png
new file mode 100755
index 0000000..7548406
Binary files /dev/null and b/limereport/databrowser/images/closed_eye.png differ
diff --git a/limereport/databrowser/images/eye.png b/limereport/databrowser/images/eye.png
new file mode 100755
index 0000000..e1b7e24
Binary files /dev/null and b/limereport/databrowser/images/eye.png differ
diff --git a/limereport/databrowser/lrconnectiondialog.cpp b/limereport/databrowser/lrconnectiondialog.cpp
index 96204c4..07c53a5 100644
--- a/limereport/databrowser/lrconnectiondialog.cpp
+++ b/limereport/databrowser/lrconnectiondialog.cpp
@@ -118,7 +118,7 @@ ConnectionDesc *ConnectionDialog::uiToConnection(LimeReport::ConnectionDesc* con
result ->setName(ConnectionDesc::connectionNameForReport(ui->leConnectionName->text()));
result ->setHost(ui->leServerName->text());
if (!ui->lePort->text().isEmpty())
- result->setPort(ui->lePort->text().toInt());
+ result->setPort(ui->lePort->text());
result ->setDriver(ui->cbbDrivers->currentText());
result ->setUserName(ui->leUserName->text());
result ->setPassword(ui->lePassword->text());
@@ -141,7 +141,7 @@ void ConnectionDialog::connectionToUI()
ui->cbbDrivers->setCurrentIndex(ui->cbbDrivers->findText(m_connection->driver()));
ui->cbAutoConnect->setChecked(m_connection->autoconnect());
ui->cbbKeepCredentials->setChecked(!m_connection->keepDBCredentials());
- ui->lePort->setText(m_connection->port()!=-1?QString::number(m_connection->port()):"");
+ ui->lePort->setText(m_connection->port());
}
void ConnectionDialog::on_toolButton_clicked()
@@ -160,6 +160,10 @@ void ConnectionDialog::on_cbbUseDefaultConnection_toggled(bool checked)
ui->leConnectionName->setEnabled(true);
}
}
+void ConnectionDialog::on_toolButton_2_toggled(bool checked)
+{
+ ui->lePassword->setEchoMode(checked ? QLineEdit::Normal : QLineEdit::Password);
+}
} // namespace LimeReport
@@ -167,3 +171,5 @@ void ConnectionDialog::on_cbbUseDefaultConnection_toggled(bool checked)
+
+
diff --git a/limereport/databrowser/lrconnectiondialog.h b/limereport/databrowser/lrconnectiondialog.h
index 531666a..12140b1 100644
--- a/limereport/databrowser/lrconnectiondialog.h
+++ b/limereport/databrowser/lrconnectiondialog.h
@@ -60,6 +60,8 @@ private slots:
void on_toolButton_clicked();
void on_cbbUseDefaultConnection_toggled(bool checked);
+ void on_toolButton_2_toggled(bool checked);
+
private:
Ui::ConnectionDialog *ui;
ConnectionDesc* m_connection;
diff --git a/limereport/databrowser/lrconnectiondialog.ui b/limereport/databrowser/lrconnectiondialog.ui
index d76b765..4b0e996 100644
--- a/limereport/databrowser/lrconnectiondialog.ui
+++ b/limereport/databrowser/lrconnectiondialog.ui
@@ -7,7 +7,7 @@
0
0
420
- 323
+ 363
@@ -44,7 +44,7 @@
-
-
+
-
-
@@ -114,14 +114,39 @@
-
-
-
-
+
+
+ 2
-
- QLineEdit::Password
-
-
+
-
+
+
+
+
+
+ QLineEdit::Password
+
+
+
+ -
+
+
+ Qt::ClickFocus
+
+
+
+
+
+
+ :/databrowser/images/closed_eye.png
+ :/databrowser/images/eye.png:/databrowser/images/closed_eye.png
+
+
+ true
+
+
+
+
-
@@ -137,6 +162,9 @@
-
+
+ Qt::ClickFocus
+
...
@@ -221,8 +249,24 @@
+
+ leConnectionName
+ cbbUseDefaultConnection
+ cbbDrivers
+ leServerName
+ lePort
+ leUserName
+ lePassword
+ leDataBase
+ cbAutoConnect
+ cbbKeepCredentials
+ pbCheckConnection
+ pbCancel
+ pbOk
+
+
diff --git a/limereport/databrowser/lrdatabrowser.qrc b/limereport/databrowser/lrdatabrowser.qrc
index aa4f852..de2ce88 100644
--- a/limereport/databrowser/lrdatabrowser.qrc
+++ b/limereport/databrowser/lrdatabrowser.qrc
@@ -44,5 +44,7 @@
images/value_edit2.png
images/value1.png
images/varToReport.png
+ images/eye.png
+ images/closed_eye.png
diff --git a/limereport/lrdatadesignintf.cpp b/limereport/lrdatadesignintf.cpp
index aca04e3..b16d77d 100644
--- a/limereport/lrdatadesignintf.cpp
+++ b/limereport/lrdatadesignintf.cpp
@@ -336,13 +336,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_port(-1), m_autoconnect(false),
+ m_databaseName(db.databaseName()), m_user(db.userName()), m_password(db.password()), m_port(""), m_autoconnect(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_port(-1), m_autoconnect(false),
+ m_databaseName(""), m_user(""), m_password(""), m_port(""), m_autoconnect(false),
m_internal(false), m_keepDBCredentials(true)
{}
@@ -377,12 +377,12 @@ QString ConnectionDesc::connectionNameForReport(const QString &connectionName)
return connectionName.compare(tr("defaultConnection")) == 0 ? QSqlDatabase::defaultConnection : connectionName;
}
-int ConnectionDesc::port() const
+QString ConnectionDesc::port() const
{
return m_port;
}
-void ConnectionDesc::setPort(int port)
+void ConnectionDesc::setPort(QString port)
{
m_port = port;
}
diff --git a/limereport/lrdatadesignintf.h b/limereport/lrdatadesignintf.h
index 867cbbb..71543cb 100644
--- a/limereport/lrdatadesignintf.h
+++ b/limereport/lrdatadesignintf.h
@@ -78,7 +78,7 @@ class ConnectionDesc : public QObject{
Q_PROPERTY(QString host READ host WRITE setHost)
Q_PROPERTY(bool autoconnect READ autoconnect WRITE setAutoconnect)
Q_PROPERTY(bool keepDBCredentials READ keepDBCredentials WRITE setKeepDBCredentials)
- Q_PROPERTY(int port READ port WRITE setPort)
+ Q_PROPERTY(QString port READ port WRITE setPort)
public:
typedef QSharedPointer Ptr;
ConnectionDesc(QSqlDatabase db, QObject* parent=0);
@@ -103,8 +103,8 @@ public:
void setInternal(bool value) {m_internal = value;}
bool keepDBCredentials() const;
void setKeepDBCredentials(bool keepDBCredentials);
- int port() const;
- void setPort(int port);
+ QString port() const;
+ void setPort(QString port);
public:
static QString connectionNameForUser(const QString& connectionName);
static QString connectionNameForReport(const QString& connectionName);
@@ -117,7 +117,7 @@ private:
QString m_databaseName;
QString m_user;
QString m_password;
- int m_port;
+ QString m_port;
bool m_autoconnect;
bool m_internal;
bool m_keepDBCredentials;
diff --git a/limereport/lrdatasourcemanager.cpp b/limereport/lrdatasourcemanager.cpp
index 9b9b876..668aa71 100644
--- a/limereport/lrdatasourcemanager.cpp
+++ b/limereport/lrdatasourcemanager.cpp
@@ -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())