diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-29 09:14:20 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-29 20:53:49 +0200 |
| commit | 39fb8198febde1937019db1c300ec363aab5aa56 (patch) | |
| tree | 52bc32134e8ae2b5587b3a62130baa9acf815b60 /src/wx/qube_certificate_panel.cc | |
| parent | b249700e1da7dd6631a8b4440587f4093a2bdef1 (diff) | |
C++11 tidying.
Diffstat (limited to 'src/wx/qube_certificate_panel.cc')
| -rw-r--r-- | src/wx/qube_certificate_panel.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/wx/qube_certificate_panel.cc b/src/wx/qube_certificate_panel.cc index c67cc46f2..e1c6bfb41 100644 --- a/src/wx/qube_certificate_panel.cc +++ b/src/wx/qube_certificate_panel.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2019 Carl Hetherington <cth@carlh.net> + Copyright (C) 2019-2021 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -18,6 +18,7 @@ */ + #include "qube_certificate_panel.h" #include "download_certificate_dialog.h" #include "wx_util.h" @@ -26,6 +27,7 @@ #include "lib/config.h" #include <boost/algorithm/string/predicate.hpp> + using std::string; using std::list; using boost::optional; @@ -33,8 +35,10 @@ using boost::optional; using namespace boost::placeholders; #endif + static string const base = "ftp://certificates.qubecinema.com/"; + QubeCertificatePanel::QubeCertificatePanel (DownloadCertificateDialog* dialog, string type) : DownloadCertificatePanel (dialog) , _type (type) @@ -42,16 +46,17 @@ QubeCertificatePanel::QubeCertificatePanel (DownloadCertificateDialog* dialog, s } + void QubeCertificatePanel::do_download () { - list<string> files = ls_url(String::compose("%1SMPTE-%2/", base, _type)); + auto files = ls_url(String::compose("%1SMPTE-%2/", base, _type)); if (files.empty()) { error_dialog (this, _("Could not read certificates from Qube server.")); return; } - string const serial = wx_to_std(_serial->GetValue()); + auto const serial = wx_to_std(_serial->GetValue()); optional<string> name; for (auto i: files) { if (boost::algorithm::starts_with(i, String::compose("%1-%2-", _type, serial))) { @@ -66,7 +71,7 @@ QubeCertificatePanel::do_download () return; } - optional<string> error = get_from_url (String::compose("%1SMPTE-%2/%3", base, _type, *name), true, false, boost::bind(&DownloadCertificatePanel::load_certificate, this, _1)); + auto error = get_from_url (String::compose("%1SMPTE-%2/%3", base, _type, *name), true, false, boost::bind(&DownloadCertificatePanel::load_certificate, this, _1)); if (error) { _dialog->message()->SetLabel(wxT("")); @@ -77,6 +82,7 @@ QubeCertificatePanel::do_download () } } + wxString QubeCertificatePanel::name () const { |
