Changeset e2c612c in confclerk_git for src/gui


Ignore:
Timestamp:
09/25/12 22:50:11 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
f1826af
Parents:
5e50875
Message:

Reloading a conference works now.

Location:
src/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/gui/conferenceeditor.cpp

    r5e50875 re2c612c  
    179179}
    180180
    181 void ConferenceEditor::importFinished(const QString& title)
    182 {
     181void ConferenceEditor::importFinished(int conferenceId) {
    183182    addBtn->show();
    184183    // removeItem should be shown later, but it takes some time,
     
    191190    QApplication::processEvents();
    192191
    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());
    202197}
    203198
  • src/gui/conferenceeditor.h

    r5e50875 re2c612c  
    5656public slots:
    5757    void importStarted();
    58     void importFinished(const QString& title);
     58    void importFinished(int conferenceId);
    5959    void conferenceRemoved();
    6060    void showParsingProgress(int);
  • src/gui/mainwindow.cpp

    r5e50875 re2c612c  
    133133
    134134    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)));
    136136}
    137137
     
    341341    connect(mXmlParser, SIGNAL(parsingScheduleBegin()), &dialog, SLOT(importStarted()));
    342342    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)));
    344344
    345345    connect(this, SIGNAL(conferenceRemoved()), &dialog, SLOT(conferenceRemoved()));
Note: See TracChangeset for help on using the changeset viewer.