Lines 33-39
Link Here
|
33 |
#include <QSqlError> |
33 |
#include <QSqlError> |
34 |
#include <QLabel> |
34 |
#include <QLabel> |
35 |
#include <QGroupBox> |
35 |
#include <QGroupBox> |
36 |
#include <QTimer> |
|
|
37 |
|
36 |
|
38 |
// KDE includes |
37 |
// KDE includes |
39 |
|
38 |
|
Lines 184-190
void DatabaseWidget::setupMainArea()
Link Here
|
184 |
this, SLOT(slotChangeDatabasePath(KUrl))); |
183 |
this, SLOT(slotChangeDatabasePath(KUrl))); |
185 |
|
184 |
|
186 |
connect(databasePathEdit, SIGNAL(textChanged(QString)), |
185 |
connect(databasePathEdit, SIGNAL(textChanged(QString)), |
187 |
this, SLOT(slotDatabasePathEditedDelayed())); |
186 |
this, SLOT(slotDatabasePathEdited(QString))); |
188 |
|
187 |
|
189 |
connect(databaseType, SIGNAL(currentIndexChanged(int)), |
188 |
connect(databaseType, SIGNAL(currentIndexChanged(int)), |
190 |
this, SLOT(slotHandleDBTypeIndexChanged(int))); |
189 |
this, SLOT(slotHandleDBTypeIndexChanged(int))); |
Lines 225-239
void DatabaseWidget::slotChangeDatabasePath(const KUrl& result)
Link Here
|
225 |
checkDBPath(); |
224 |
checkDBPath(); |
226 |
} |
225 |
} |
227 |
|
226 |
|
228 |
void DatabaseWidget::slotDatabasePathEditedDelayed() |
227 |
void DatabaseWidget::slotDatabasePathEdited(const QString& newPath) |
229 |
{ |
228 |
{ |
230 |
QTimer::singleShot(300, this, SLOT(slotDatabasePathEdited())); |
|
|
231 |
} |
232 |
|
233 |
void DatabaseWidget::slotDatabasePathEdited() |
234 |
{ |
235 |
QString newPath = databasePathEdit->text(); |
236 |
|
237 |
#ifndef _WIN32 |
229 |
#ifndef _WIN32 |
238 |
|
230 |
|
239 |
if (!newPath.isEmpty() && !QDir::isAbsolutePath(newPath)) |
231 |
if (!newPath.isEmpty() && !QDir::isAbsolutePath(newPath)) |
Lines 243-249
void DatabaseWidget::slotDatabasePathEdited()
Link Here
|
243 |
|
235 |
|
244 |
#endif |
236 |
#endif |
245 |
|
237 |
|
246 |
databasePathEdit->setText(QDir::toNativeSeparators(newPath)); |
238 |
databasePathEdit->setText(QDir::toNativeSeparators(databasePathEdit->text())); |
247 |
|
239 |
|
248 |
checkDBPath(); |
240 |
checkDBPath(); |
249 |
} |
241 |
} |