~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to kleopatra/commands/encryptclipboardcommand.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
#include "encryptclipboardcommand.h"
36
36
 
 
37
#ifndef QT_NO_CLIPBOARD
 
38
 
37
39
#include "command_p.h"
38
40
 
39
41
#include <crypto/encryptemailcontroller.h>
40
42
 
41
43
#include <utils/input.h>
42
44
#include <utils/output.h>
43
 
#include <utils/stl_util.h>
 
45
 
 
46
#include <kleo/stl_util.h>
44
47
 
45
48
#include <KLocale>
46
49
#include <KMessageBox>
140
143
        d->controller.startResolveRecipients();
141
144
 
142
145
    } catch ( const std::exception & e ) {
143
 
        KMessageBox::information( d->parentWidgetOrView(),
144
 
                                  i18n("An error occurred: %1",
145
 
                                       QString::fromLocal8Bit( e.what() ) ),
146
 
                                  i18n("Encrypt Clipboard Error") );
 
146
        d->information( i18n("An error occurred: %1",
 
147
                             QString::fromLocal8Bit( e.what() ) ),
 
148
                        i18n("Encrypt Clipboard Error") );
147
149
        d->finished();
148
150
    }
149
151
}
154
156
        input.reset(); // no longer needed, so don't keep a reference
155
157
        controller.start();
156
158
    } catch ( const std::exception & e ) {
157
 
        KMessageBox::information( parentWidgetOrView(),
158
 
                                  i18n("An error occurred: %1",
159
 
                                       QString::fromLocal8Bit( e.what() ) ),
160
 
                                  i18n("Encrypt Clipboard Error") );
 
159
        information( i18n("An error occurred: %1",
 
160
                          QString::fromLocal8Bit( e.what() ) ),
 
161
                     i18n("Encrypt Clipboard Error") );
161
162
        finished();
162
163
    }
163
164
}
167
168
    d->controller.cancel();
168
169
}
169
170
 
170
 
void EncryptClipboardCommand::applyWindowID( QWidget * wid ) const {
171
 
    if ( wid )
172
 
        wid->setParent( d->parentWidgetOrView(), wid->windowFlags() );
173
 
}
174
 
 
175
171
#undef d
176
172
#undef q
177
173
 
178
174
#include "moc_encryptclipboardcommand.cpp"
 
175
 
 
176
#endif // QT_NO_CLIPBOARD