| 144 | } |
| 145 | |
| 146 | void StashModel::stashListReady(KJob* _job) |
| 147 | { |
| 148 | auto* job = qobject_cast<VcsJob*>(_job); |
| 149 | |
| 150 | for(const auto& s_item: job->fetchResults().value<QList<GitPlugin::StashItem>>()) { |
| 151 | const QString itemValue = i18nc("%1: stack depth, %2: branch, %3: parent description", "%1. %2: %3", |
| 152 | QString::number(s_item.stackDepth), s_item.branch, s_item.parentDescription); |
| 153 | auto* item = new QStandardItem(itemValue); |
| 154 | item->setData(s_item.shortRef, StashModel::RefRole); |
| 155 | item->setData(s_item.parentSHA, StashModel::CommitHashRole); |
| 156 | item->setData(s_item.parentDescription, StashModel::CommitDescRole); |
| 157 | item->setData(s_item.branch, StashModel::BranchRole); |
| 158 | item->setData(s_item.message, StashModel::MessageRole); |
| 159 | item->setData(s_item.creationTime, StashModel::DateRole); |
| 160 | item->setData( |
| 161 | i18n("%1 created on %2", s_item.branch, s_item.creationTime.toString()), |
| 162 | Qt::ToolTipRole |
| 163 | ); |
| 164 | appendRow(item); |
| 165 | }; |
| 166 | } |
| 167 | |
| 168 | #include "moc_stashmanagerdialog.cpp" |
nothing calls this directly
no test coverage detected