Changeset c0559b6
- Timestamp:
- 09/06/11 23:17:01 (11 years ago)
- Branches:
- master, qt5
- Children:
- 40849d7
- Parents:
- 1006c4f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/conferenceeditor.cpp
r1006c4f rc0559b6 131 131 void ConferenceEditor::changeUrlClicked() 132 132 { 133 if (selected_id < 0) { 134 return; 135 } 136 const Conference& selected = Conference::getById(selected_id); 133 if (selected_id < 0) return; 134 const Conference& selectedConf = Conference::getById(selected_id); 137 135 138 136 bool ok; 139 QString url = QInputDialog::getText(this, "URL Input", "Enter schedule URL", QLineEdit::Normal, selected .url(), &ok);137 QString url = QInputDialog::getText(this, "URL Input", "Enter schedule URL", QLineEdit::Normal, selectedConf.url(), &ok); 140 138 141 139 if (ok) { … … 146 144 void ConferenceEditor::refreshClicked() 147 145 { 148 if (selected_id < 0) { 149 return; 150 } 151 const Conference& selected = Conference::getById(selected_id); 152 153 QString url = selected.url(); 154 155 if (!url.isEmpty()) { 156 emit haveConferenceUrl(url); 157 } else { 146 if (selected_id < 0) return; 147 const Conference& selectedConf = Conference::getById(selected_id); 148 QString url = selectedConf.url(); 149 150 if (url.isEmpty()) { 158 151 static const QString format("Schedule URL for %1 is not set. Enter the schedule URL:"); 159 152 bool ok; 160 QString url = QInputDialog::getText(this, "URL Input", format.arg(selected.title()), QLineEdit::Normal, QString(), &ok); 161 162 if (ok) { 163 // first save it, to remain if fetch fails 164 emit changeUrlRequested(selected_id, url); 165 // then fetch 166 emit haveConferenceUrl(url); 167 } 168 } 153 QString url = QInputDialog::getText(this, "URL Input", format.arg(selectedConf.title()), QLineEdit::Normal, QString(), &ok); 154 if (!ok) return; 155 // first save it, to remain if fetch fails 156 emit changeUrlRequested(selected_id, url); 157 } 158 // fetch 159 importStarted(); // just to show the progress bar 160 emit haveConferenceUrl(url); 169 161 } 170 162
Note: See TracChangeset
for help on using the changeset viewer.