Commit fd9a9ca9 authored by WINTZ Julien's avatar WINTZ Julien

Merge branch 'finder-correction' into 'master'

Correct finder user folders

See merge request !44
parents 81f37090 1b4311d1
......@@ -262,20 +262,20 @@ void dtkFinderSideView::populate(void)
QTreeWidgetItem *item21 = new QTreeWidgetItem(item2, QStringList() << "Desktop");
item21->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// item21->setData(0, Qt::FontRole, itemFont);
item21->setData(0, Qt::UserRole, QStandardPaths::displayName(QStandardPaths::DesktopLocation));
item21->setIcon(0, provider.icon(QFileInfo(QStandardPaths::displayName(QStandardPaths::DesktopLocation))));
item21->setData(0, Qt::UserRole, QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
item21->setIcon(0, provider.icon(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation))));
QTreeWidgetItem *item22 = new QTreeWidgetItem(item2, QStringList() << "Home");
item22->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// item22->setData(0, Qt::FontRole, itemFont);
item22->setData(0, Qt::UserRole, QStandardPaths::displayName(QStandardPaths::HomeLocation));
item22->setIcon(0, provider.icon(QFileInfo(QStandardPaths::displayName(QStandardPaths::HomeLocation))));
item22->setData(0, Qt::UserRole, QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
item22->setIcon(0, provider.icon(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::HomeLocation))));
QTreeWidgetItem *item23 = new QTreeWidgetItem(item2, QStringList() << "Documents");
item23->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// item23->setData(0, Qt::FontRole, itemFont);
item23->setData(0, Qt::UserRole, QStandardPaths::displayName(QStandardPaths::DocumentsLocation));
item23->setIcon(0, provider.icon(QFileInfo(QStandardPaths::displayName(QStandardPaths::DocumentsLocation))));
item23->setData(0, Qt::UserRole, QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
item23->setIcon(0, provider.icon(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation))));
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