Commit 1b4311d1 authored by Olivier Commowick's avatar Olivier Commowick

Correct finder user folders

parent 81f37090
...@@ -262,20 +262,20 @@ void dtkFinderSideView::populate(void) ...@@ -262,20 +262,20 @@ void dtkFinderSideView::populate(void)
QTreeWidgetItem *item21 = new QTreeWidgetItem(item2, QStringList() << "Desktop"); QTreeWidgetItem *item21 = new QTreeWidgetItem(item2, QStringList() << "Desktop");
item21->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item21->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// item21->setData(0, Qt::FontRole, itemFont); // item21->setData(0, Qt::FontRole, itemFont);
item21->setData(0, Qt::UserRole, QStandardPaths::displayName(QStandardPaths::DesktopLocation)); item21->setData(0, Qt::UserRole, QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
item21->setIcon(0, provider.icon(QFileInfo(QStandardPaths::displayName(QStandardPaths::DesktopLocation)))); item21->setIcon(0, provider.icon(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation))));
QTreeWidgetItem *item22 = new QTreeWidgetItem(item2, QStringList() << "Home"); QTreeWidgetItem *item22 = new QTreeWidgetItem(item2, QStringList() << "Home");
item22->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item22->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// item22->setData(0, Qt::FontRole, itemFont); // item22->setData(0, Qt::FontRole, itemFont);
item22->setData(0, Qt::UserRole, QStandardPaths::displayName(QStandardPaths::HomeLocation)); item22->setData(0, Qt::UserRole, QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
item22->setIcon(0, provider.icon(QFileInfo(QStandardPaths::displayName(QStandardPaths::HomeLocation)))); item22->setIcon(0, provider.icon(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::HomeLocation))));
QTreeWidgetItem *item23 = new QTreeWidgetItem(item2, QStringList() << "Documents"); QTreeWidgetItem *item23 = new QTreeWidgetItem(item2, QStringList() << "Documents");
item23->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item23->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// item23->setData(0, Qt::FontRole, itemFont); // item23->setData(0, Qt::FontRole, itemFont);
item23->setData(0, Qt::UserRole, QStandardPaths::displayName(QStandardPaths::DocumentsLocation)); item23->setData(0, Qt::UserRole, QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
item23->setIcon(0, provider.icon(QFileInfo(QStandardPaths::displayName(QStandardPaths::DocumentsLocation)))); item23->setIcon(0, provider.icon(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation))));
d->items << item21 << item22 << item23; d->items << item21 << item22 << item23;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment