db.setPassword(dbPassword);
ok = db.open();
-//printf("Error: %s\n", db.lastError().databaseText().toAscii().data());
-//printf("Error: %s\n", db.lastError().driverText().toAscii().data());
-
// If unsuccessful, run the SQL settings/test dialog
if (!ok)
{
+//printf("Error: %s\n", db.lastError().databaseText().toAscii().data());
+//printf("Error: %s\n", db.lastError().driverText().toAscii().data());
+ sqlSettings.error1->setText(db.lastError().databaseText());
+ sqlSettings.error2->setText(db.lastError().driverText());
+
if (sqlSettings.exec())
{
// User thinks this will work (hit OK button), so prime the variables
edit2(new QLineEdit()),
edit3(new QLineEdit()),
edit4(new QLineEdit()),
- edit5(new QLineEdit())
+ edit5(new QLineEdit()),
+ error1(new QLabel()),
+ error2(new QLabel())
{
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
edit5->setEchoMode(QLineEdit::Password);
+ error1->setWordWrap(true);
+ error2->setWordWrap(true);
QFormLayout * formLayout = new QFormLayout;
formLayout->addRow(tr("&Database Driver:"), edit1);
QVBoxLayout * mainLayout = new QVBoxLayout;
mainLayout->addLayout(formLayout);
+ mainLayout->addWidget(error1);
+ mainLayout->addWidget(error2);
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);