|
|
|
|
13543
|
cancelButton(new QPushButton(tr("Cancel"))),
|
13543
|
cancelButton(new QPushButton(tr("Cancel"))),
|
13544
|
connectButton(new QPushButton(tr("Connect")))@/
|
13544
|
connectButton(new QPushButton(tr("Connect")))@/
|
13545
|
{
|
13545
|
{
|
|
|
13546
|
+ QSettings settings;
|
13546
|
driver->addItem("PostgreSQL", "QPSQL");
|
13547
|
driver->addItem("PostgreSQL", "QPSQL");
|
13547
|
formLayout->addRow(tr("Database driver:"), driver);
|
13548
|
formLayout->addRow(tr("Database driver:"), driver);
|
13548
|
formLayout->addRow(tr("Host name:"), hostname);
|
13549
|
formLayout->addRow(tr("Host name:"), hostname);
|
|
|
13550
|
+ hostname->setText(settings.value("database/hostname").toString());
|
13549
|
formLayout->addRow(tr("Port number:"), portnumber);
|
13551
|
formLayout->addRow(tr("Port number:"), portnumber);
|
13550
|
- portnumber->setText("5432");
|
|
|
|
|
13552
|
+ portnumber->setText(settings.value("database/portnumber", "5432").toString());
|
13551
|
formLayout->addRow(tr("Database name:"), dbname);
|
13553
|
formLayout->addRow(tr("Database name:"), dbname);
|
|
|
13554
|
+ dbname->setText(settings.value("database/dbname").toString());
|
13552
|
formLayout->addRow(tr("User name:"), user);
|
13555
|
formLayout->addRow(tr("User name:"), user);
|
|
|
13556
|
+ user->setText(settings.value("database/user").toString());
|
13553
|
password->setEchoMode(QLineEdit::Password);
|
13557
|
password->setEchoMode(QLineEdit::Password);
|
13554
|
formLayout->addRow(tr("Password:"), password);
|
13558
|
formLayout->addRow(tr("Password:"), password);
|
|
|
13559
|
+ password->setText(settings.value("database/password").toString());
|
13555
|
layout->addLayout(formLayout);
|
13560
|
layout->addLayout(formLayout);
|
13556
|
buttons->addStretch(1);
|
13561
|
buttons->addStretch(1);
|
13557
|
buttons->addWidget(cancelButton);
|
13562
|
buttons->addWidget(cancelButton);
|