Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/projectsourcepage.cpp
Show First 20 Lines • Show All 260 Lines • ▼ Show 20 Line(s) | 260 | else | |||
---|---|---|---|---|---|
261 | clearStatus(); | 261 | clearStatus(); | ||
262 | } | 262 | } | ||
263 | 263 | | |||
264 | void ProjectSourcePage::locationChanged() | 264 | void ProjectSourcePage::locationChanged() | ||
265 | { | 265 | { | ||
266 | Q_ASSERT(m_locationWidget); | 266 | Q_ASSERT(m_locationWidget); | ||
267 | if(m_locationWidget->isCorrect()) { | 267 | if(m_locationWidget->isCorrect()) { | ||
268 | QString currentUrl = m_ui->workingDir->text(); | 268 | QString currentUrl = m_ui->workingDir->text(); | ||
269 | currentUrl = currentUrl.left(currentUrl.lastIndexOf('/')+1); | 269 | currentUrl = currentUrl.left(currentUrl.lastIndexOf(QLatin1Char('/'))+1); | ||
270 | 270 | | |||
271 | QUrl current = QUrl::fromUserInput(currentUrl + m_locationWidget->projectName()); | 271 | QUrl current = QUrl::fromUserInput(currentUrl + m_locationWidget->projectName()); | ||
272 | m_ui->workingDir->setUrl(current); | 272 | m_ui->workingDir->setUrl(current); | ||
273 | } | 273 | } | ||
274 | else | 274 | else | ||
275 | reevaluateCorrection(); | 275 | reevaluateCorrection(); | ||
276 | } | 276 | } | ||
277 | 277 | | |||
278 | void ProjectSourcePage::projectChanged(const QString& name) | 278 | void ProjectSourcePage::projectChanged(const QString& name) | ||
279 | { | 279 | { | ||
280 | Q_ASSERT(m_providerWidget); | 280 | Q_ASSERT(m_providerWidget); | ||
281 | QString currentUrl = m_ui->workingDir->text(); | 281 | QString currentUrl = m_ui->workingDir->text(); | ||
282 | currentUrl = currentUrl.left(currentUrl.lastIndexOf('/')+1); | 282 | currentUrl = currentUrl.left(currentUrl.lastIndexOf(QLatin1Char('/'))+1); | ||
283 | 283 | | |||
284 | QUrl current = QUrl::fromUserInput(currentUrl + name); | 284 | QUrl current = QUrl::fromUserInput(currentUrl + name); | ||
285 | m_ui->workingDir->setUrl(current); | 285 | m_ui->workingDir->setUrl(current); | ||
286 | } | 286 | } | ||
287 | 287 | | |||
288 | void ProjectSourcePage::setStatus(const QString& message) | 288 | void ProjectSourcePage::setStatus(const QString& message) | ||
289 | { | 289 | { | ||
290 | m_ui->status->setText(message); | 290 | m_ui->status->setText(message); | ||
Show All 25 Lines |