~alecu/unity-scope-click/uninstallable-scopes

« back to all changes in this revision

Viewing changes to libclickscope/click/preview.cpp

  • Committer: Alejandro J. Cura
  • Date: 2014-06-16 14:09:21 UTC
  • Revision ID: alecu@canonical.com-20140616140921-jfzulfbmf5c2vhoh
Removed unused includes and added error messages requested in Pawel's review

Show diffs side-by-side

added added

removed removed

Lines of Context:
546
546
            qt::core::world::enter_with_task([this, name, callback] ()
547
547
            {
548
548
                click::Interface().get_dotdesktop_filename(name,
549
 
                                              [callback] (std::string val, click::InterfaceError error) {
 
549
                                              [callback, name] (std::string val, click::InterfaceError error) {
550
550
                                              std::string uri;
551
551
                                              if (error == click::InterfaceError::NoError) {
552
552
                                                  uri = "application:///" + val;
 
553
                                              } else {
 
554
                                                  qWarning() << "Can't get .desktop filename for"
 
555
                                                             << QString::fromStdString(name);
553
556
                                              }
554
557
                                              callback(uri);
555
558
                                     }