- Timestamp:
- 09/25/12 22:50:11 (10 years ago)
- Branches:
- master, qt5
- Children:
- f1826af
- Parents:
- 5e50875
- Location:
- src/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/conferenceeditor.cpp
r5e50875 re2c612c 179 179 } 180 180 181 void ConferenceEditor::importFinished(const QString& title) 182 { 181 void ConferenceEditor::importFinished(int conferenceId) { 183 182 addBtn->show(); 184 183 // removeItem should be shown later, but it takes some time, … … 191 190 QApplication::processEvents(); 192 191 193 int num = model->rowCount(); 194 for (int i = 0; i < num; i++) { 195 QModelIndex item = model->index(i, 0); 196 if (model->data(item) == title) { 197 emit wantCurrent(item, QItemSelectionModel::SelectCurrent); 198 return; 199 } 200 } 201 itemSelected(QModelIndex(), QModelIndex()); 192 QModelIndex item = model->indexFromId(conferenceId); 193 if (item.isValid()) 194 emit wantCurrent(item, QItemSelectionModel::SelectCurrent); 195 else 196 itemSelected(QModelIndex(), QModelIndex()); 202 197 } 203 198 -
src/gui/conferenceeditor.h
r5e50875 re2c612c 56 56 public slots: 57 57 void importStarted(); 58 void importFinished( const QString& title);58 void importFinished(int conferenceId); 59 59 void conferenceRemoved(); 60 60 void showParsingProgress(int); -
src/gui/mainwindow.cpp
r5e50875 re2c612c 133 133 134 134 connect(mXmlParser, SIGNAL(parsingScheduleBegin()), conferenceModel, SLOT(newConferenceBegin())); 135 connect(mXmlParser, SIGNAL(parsingScheduleEnd( const QString&)), conferenceModel, SLOT(newConferenceEnd(const QString&)));135 connect(mXmlParser, SIGNAL(parsingScheduleEnd(int)), conferenceModel, SLOT(newConferenceEnd(int))); 136 136 } 137 137 … … 341 341 connect(mXmlParser, SIGNAL(parsingScheduleBegin()), &dialog, SLOT(importStarted())); 342 342 connect(mXmlParser, SIGNAL(progressStatus(int)), &dialog, SLOT(showParsingProgress(int))); 343 connect(mXmlParser, SIGNAL(parsingScheduleEnd( const QString&)), &dialog, SLOT(importFinished(const QString&)));343 connect(mXmlParser, SIGNAL(parsingScheduleEnd(int)), &dialog, SLOT(importFinished(int))); 344 344 345 345 connect(this, SIGNAL(conferenceRemoved()), &dialog, SLOT(conferenceRemoved()));
Note: See TracChangeset
for help on using the changeset viewer.