- QString url_default;
- try {
- url_default = Conference::getById(Conference::activeConference()).getUrl();
- } catch (OrmException& e) {
- qWarning() << "failed to get default URL:" << e.text();
+ // FIXME: it will throw
+ // GUI should not show this button if there is no active conf
+ importFromNetwork(Conference::getById(Conference::activeConference()).getUrl());
+}
+
+void ImportScheduleWidget::on_changeUrl()
+{
+ // FIXME: it will throw
+ // GUI should not show this button if there is no active conf
+ Conference active_conference = Conference::getById(Conference::activeConference());
+ bool ok = false;
+ QString new_url =
+ QInputDialog::getText(this, "URL request", "Enter the new URL for conference schedule"
+ , QLineEdit::Normal
+ , active_conference.getUrl()
+ , &ok);
+ if (ok) {
+ active_conference.setUrl(new_url);