Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 521992
Collapse All | Expand All

(-)a/libs/widgets/common/databasewidget.cpp (-11 / +3 lines)
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
}
(-)a/libs/widgets/common/databasewidget.h (-9 / +5 lines)
Lines 36-43 Link Here
36
// KDE includes
36
// KDE includes
37
37
38
#include <kdialog.h>
38
#include <kdialog.h>
39
#include <kurl.h>
40
#include <kurlrequester.h>
39
#include <kurlrequester.h>
40
#include <kurl.h>
41
41
42
// Local includes
42
// Local includes
43
43
Lines 83-88 public: Link Here
83
83
84
public Q_SLOTS:
84
public Q_SLOTS:
85
85
86
    void slotChangeDatabasePath(const KUrl&);
87
    void slotDatabasePathEdited(const QString&);
88
    void slotHandleDBTypeIndexChanged(int index);
89
    void slotHandleInternalServerCheckbox(int enableFields);
86
    void checkDatabaseConnection();
90
    void checkDatabaseConnection();
87
91
88
private:
92
private:
Lines 90-103 private: Link Here
90
    void checkDBPath();
94
    void checkDBPath();
91
    void setupMainArea();
95
    void setupMainArea();
92
96
93
private Q_SLOTS:
94
95
    void slotHandleInternalServerCheckbox(int enableFields);
96
    void slotHandleDBTypeIndexChanged(int index);
97
    void slotChangeDatabasePath(const KUrl&);
98
    void slotDatabasePathEditedDelayed();
99
    void slotDatabasePathEdited();
100
101
private:
97
private:
102
98
103
    class Private;
99
    class Private;

Return to bug 521992