~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to digikam/databaseguierrorhandler.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
};
69
69
 
70
70
DatabaseConnectionChecker::DatabaseConnectionChecker(const DatabaseParameters& parameters)
71
 
                         : d(new DatabaseConnectionCheckerPriv)
 
71
    : d(new DatabaseConnectionCheckerPriv)
72
72
{
73
73
    d->parameters = parameters;
74
74
}
93
93
    databaseHandler.setConnectOptions(d->parameters.connectOptions);
94
94
 
95
95
    int iteration = 1;
 
96
 
96
97
    while (!d->stop)
97
98
    {
98
99
        if (databaseHandler.open())
153
154
};
154
155
 
155
156
DatabaseGUIErrorHandler::DatabaseGUIErrorHandler(const DatabaseParameters& parameters)
156
 
                       : d(new DatabaseGUIErrorHandlerPriv)
 
157
    : d(new DatabaseGUIErrorHandlerPriv)
157
158
{
158
159
    d->parameters = parameters;
159
160
}
179
180
    loop.exec();
180
181
 
181
182
    if (d->dialog)
 
183
    {
182
184
        delete d->dialog;
 
185
    }
183
186
 
184
187
    // ensure that the connection thread is closed
185
188
    d->checker->wait();
192
195
void DatabaseGUIErrorHandler::showProgressDialog()
193
196
{
194
197
    if (d->dialog || !d->checker)
 
198
    {
195
199
        return;
 
200
    }
196
201
 
197
202
    d->dialog = new KProgressDialog;
198
203
    d->dialog->setModal(true);
201
206
    d->dialog->progressBar()->setMinimum(0);
202
207
    d->dialog->progressBar()->setMaximum(0);
203
208
    d->dialog->setLabelText(i18n("Error while opening the database.\n"
204
 
                                "digiKam will try to automatically reconnect to the database."));
 
209
                                 "digiKam will try to automatically reconnect to the database."));
205
210
 
206
211
    connect(d->dialog, SIGNAL(rejected()),
207
212
            d->checker, SLOT(stopChecking()));