Revision 1790 trunk/client/gui_qt/WidgetConfigFolders.cpp
| WidgetConfigFolders.cpp (revision 1790) | ||
|---|---|---|
| 9 | 9 |
this->glue = glue; |
| 10 | 10 |
|
| 11 | 11 |
if (glue->getIsStandalone()) {
|
| 12 |
model = new QFileSystemModel(); |
|
| 13 |
model->setRootPath(QDir::rootPath()); |
|
| 12 |
/* We use QDirModel instead of QFileSystemModel because of QT-BUG #12934 */ |
|
| 13 |
model = new QDirModel(); |
|
| 14 |
//model->setRootPath(QDir::rootPath()); |
|
| 14 | 15 |
model->setReadOnly(true); |
| 16 |
model->setResolveSymlinks(true); |
|
| 15 | 17 |
model->setFilter(QDir::Dirs | QDir::AllDirs | QDir::Drives | QDir::Hidden | QDir::System | QDir::NoDotAndDotDot); |
| 16 | 18 |
|
| 17 | 19 |
ui->treeViewDownloadFolder->setModel(model); |
| ... | ... | |
| 72 | 74 |
|
| 73 | 75 |
if (glue->getIsStandalone()) {
|
| 74 | 76 |
/* Set the tree views */ |
| 75 |
QModelIndex idx = model->setRootPath(opts.download_directory); |
|
| 77 |
//QModelIndex idx = model->setRootPath(opts.download_directory); |
|
| 78 |
QModelIndex idx = model->index(opts.download_directory); |
|
| 76 | 79 |
ui->treeViewDownloadFolder->scrollTo(idx); |
| 77 | 80 |
ui->treeViewDownloadFolder->setCurrentIndex(idx); |
| 78 | 81 |
|
| 79 |
idx = model->setRootPath(opts.temp_directory); |
|
| 82 |
//idx = model->setRootPath(opts.temp_directory); |
|
| 83 |
idx = model->index(opts.temp_directory); |
|
| 80 | 84 |
ui->treeViewTempFolder->scrollTo(idx); |
| 81 | 85 |
ui->treeViewTempFolder->setCurrentIndex(idx); |
| 82 | 86 |
} else {
|
Also available in: Unified diff
NNTPGrab

