Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/panelfunc.cpp
Context not available. | |||||
283 | panel->view->clearSavedSelection(); | 283 | panel->view->clearSavedSelection(); | ||
---|---|---|---|---|---|
284 | } | 284 | } | ||
285 | 285 | | |||
286 | if(panel->vfsError) | 286 | if(panel->vfsError) { | ||
287 | panel->vfsError->hide(); | 287 | panel->vfsError->hide(); | ||
288 | 288 | } | |||
289 | bool refreshFailed = false; | | |||
290 | while (true) { | | |||
291 | QUrl url = history->currentUrl(); | | |||
292 | 289 | | |||
293 | isEqualUrl = files()->currentDirectory().matches(url, QUrl::StripTrailingSlash); | 290 | isEqualUrl = files()->currentDirectory().matches(url, QUrl::StripTrailingSlash); | ||
294 | 291 | | |||
Context not available. | |||||
332 | 329 | | |||
333 | int savedHistoryState = history->state(); | 330 | int savedHistoryState = history->state(); | ||
334 | 331 | | |||
332 | panel->urlNavigator->setLocationUrl(url); | ||||
335 | // NOTE: this is blocking. Returns false on error or interruption (cancel requested or panel | 333 | // NOTE: this is blocking. Returns false on error or interruption (cancel requested or panel | ||
336 | // was deleted) | 334 | // was deleted) | ||
337 | const bool refreshed = vfsP->refresh(url); | 335 | const bool refreshed = vfsP->refresh(url); | ||
Context not available. | |||||
339 | // update the history and address bar, as the actual url might differ from the one requested | 337 | // update the history and address bar, as the actual url might differ from the one requested | ||
340 | history->setCurrentUrl(vfsP->currentDirectory()); | 338 | history->setCurrentUrl(vfsP->currentDirectory()); | ||
341 | panel->urlNavigator->setLocationUrl(vfsP->currentDirectory()); | 339 | panel->urlNavigator->setLocationUrl(vfsP->currentDirectory()); | ||
342 | break; // we have a valid refreshed URL now | | |||
343 | } | 340 | } | ||
344 | if (!panel || !panel->view) | | |||
345 | // this panel was deleted while refreshing | | |||
346 | return; | | |||
347 | | ||||
348 | refreshFailed = true; | | |||
349 | 341 | | |||
350 | panel->view->setNameToMakeCurrent(QString()); | | |||
351 | | ||||
352 | if(history->state() != savedHistoryState) // don't go back if the history was touched | | |||
353 | break; | | |||
354 | if(!history->goBack()) { | | |||
355 | // put the root dir to the beginning of history, if it's not there yet | | |||
356 | if (!url.matches(QUrl::fromLocalFile(ROOT_DIR), QUrl::StripTrailingSlash)) | | |||
357 | history->pushBackRoot(); | | |||
358 | else | | |||
359 | break; | | |||
360 | } | | |||
361 | _ignoreVFSErrors = true; | | |||
362 | } | | |||
363 | _ignoreVFSErrors = false; | | |||
364 | panel->view->setNameToMakeCurrent(QString()); | 342 | panel->view->setNameToMakeCurrent(QString()); | ||
365 | 343 | | |||
366 | panel->setCursor(Qt::ArrowCursor); | 344 | panel->setCursor(Qt::ArrowCursor); | ||
Context not available. | |||||
371 | 349 | | |||
372 | // see if the open url operation failed, and if so, | 350 | // see if the open url operation failed, and if so, | ||
373 | // put the attempted url in the navigator bar and let the user change it | 351 | // put the attempted url in the navigator bar and let the user change it | ||
374 | if (refreshFailed) { | 352 | if (!refreshed) { | ||
375 | if(isSyncing(url)) | 353 | if(isSyncing(url)) | ||
376 | panel->otherPanel()->gui->syncBrowseButton->setChecked(false); | 354 | panel->otherPanel()->gui->syncBrowseButton->setChecked(false); | ||
377 | else if(urlManuallyEntered) { | 355 | else if(urlManuallyEntered) { | ||
Context not available. |