| 170 | } |
| 171 | |
| 172 | void ProjectSourcePage::checkoutVcsProject() |
| 173 | { |
| 174 | QUrl url=m_ui->workingDir->url(); |
| 175 | QDir d(url.toLocalFile()); |
| 176 | if(!url.isLocalFile() && !d.exists()) { |
| 177 | bool corr = d.mkpath(d.path()); |
| 178 | if(!corr) { |
| 179 | KMessageBox::error(nullptr, i18n("Could not create the directory: %1", d.path())); |
| 180 | return; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | VcsJob* job=jobPerCurrent(); |
| 185 | if (!job) { |
| 186 | return; |
| 187 | } |
| 188 | |
| 189 | m_ui->sources->setEnabled(false); |
| 190 | m_ui->sourceBox->setEnabled(false); |
| 191 | m_ui->workingDir->setEnabled(false); |
| 192 | m_ui->get->setEnabled(false); |
| 193 | m_ui->creationProgress->setValue(m_ui->creationProgress->minimum()); |
| 194 | connect(job, &VcsJob::result, this, &ProjectSourcePage::projectReceived); |
| 195 | connect(job, &KJob::percentChanged, this, &ProjectSourcePage::progressChanged); |
| 196 | connect(job, &VcsJob::infoMessage, this, &ProjectSourcePage::infoMessage); |
| 197 | ICore::self()->runController()->registerJob(job); |
| 198 | } |
| 199 | |
| 200 | void ProjectSourcePage::progressChanged(KJob*, unsigned long value) |
| 201 | { |
nothing calls this directly
no test coverage detected