equal
deleted
inserted
replaced
1359 |
1359 |
1360 bool showDrives = (longNewPath.isEmpty() || longNewPath == d->myComputer()); |
1360 bool showDrives = (longNewPath.isEmpty() || longNewPath == d->myComputer()); |
1361 if (!showDrives && !newPathDir.exists()) |
1361 if (!showDrives && !newPathDir.exists()) |
1362 return d->index(rootPath()); |
1362 return d->index(rootPath()); |
1363 |
1363 |
|
1364 //We remove the watcher on the previous path |
|
1365 if (!rootPath().isEmpty() && rootPath() != QLatin1String(".")) { |
|
1366 //This remove the watcher for the old rootPath |
|
1367 d->fileInfoGatherer.removePath(rootPath()); |
|
1368 //This line "marks" the node as dirty, so the next fetchMore |
|
1369 //call on the path will ask the gatherer to install a watcher again |
|
1370 //But it doesn't re-fetch everything |
|
1371 d->node(rootPath())->populatedChildren = false; |
|
1372 } |
|
1373 |
1364 // We have a new valid root path |
1374 // We have a new valid root path |
1365 d->rootDir = newPathDir; |
1375 d->rootDir = newPathDir; |
1366 QModelIndex newRootIndex; |
1376 QModelIndex newRootIndex; |
1367 if (showDrives) { |
1377 if (showDrives) { |
1368 // otherwise dir will become '.' |
1378 // otherwise dir will become '.' |