second try
This commit is contained in:
@@ -309,7 +309,7 @@ void ProjectFilesystemWidget::createProjectTree(void * p) {
|
|||||||
if (!p) return;
|
if (!p) return;
|
||||||
ProjectExplorer::Project * pr = (ProjectExplorer::Project *)p;
|
ProjectExplorer::Project * pr = (ProjectExplorer::Project *)p;
|
||||||
QTreeWidgetItem * ri = new QTreeWidgetItem();
|
QTreeWidgetItem * ri = new QTreeWidgetItem();
|
||||||
QString dir = pr->projectDirectory().toString();
|
QString dir = pr->projectDirectory().toUrlishString();
|
||||||
QFile logo(dir + "/logo.png");
|
QFile logo(dir + "/logo.png");
|
||||||
if (logo.exists())
|
if (logo.exists())
|
||||||
ri->setIcon(0, QIcon(logo.fileName()));
|
ri->setIcon(0, QIcon(logo.fileName()));
|
||||||
@@ -341,7 +341,7 @@ void ProjectFilesystemWidget::filterClicked() {
|
|||||||
void ProjectFilesystemWidget::currentFileChanged() {
|
void ProjectFilesystemWidget::currentFileChanged() {
|
||||||
Core::IDocument * cd = Core::EditorManager::instance()->currentDocument();
|
Core::IDocument * cd = Core::EditorManager::instance()->currentDocument();
|
||||||
if (!cd) return;
|
if (!cd) return;
|
||||||
QString np = cd->filePath().toString();
|
QString np = cd->filePath().toUrlishString();
|
||||||
QTreeWidgetItem * ti = item_map.value(np);
|
QTreeWidgetItem * ti = item_map.value(np);
|
||||||
if (!ti) return;
|
if (!ti) return;
|
||||||
tree->setCurrentItem(ti);
|
tree->setCurrentItem(ti);
|
||||||
@@ -357,7 +357,7 @@ void ProjectFilesystemWidget::startupProjectChanged() {
|
|||||||
QTreeWidgetItem * ti = tree->topLevelItem(i);
|
QTreeWidgetItem * ti = tree->topLevelItem(i);
|
||||||
ti->setFont(0, f);
|
ti->setFont(0, f);
|
||||||
if (!sp) continue;
|
if (!sp) continue;
|
||||||
if (sp->projectDirectory().toString() == ti->data(0, roleFullPath).toString())
|
if (sp->projectDirectory().toUrlishString() == ti->data(0, roleFullPath).toString())
|
||||||
ti->setFont(0, bf);
|
ti->setFont(0, bf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -496,7 +496,7 @@ void ProjectFilesystemWidget::on_actionOpen_external_triggered() {
|
|||||||
|
|
||||||
void ProjectFilesystemWidget::on_actionShow_external_triggered() {
|
void ProjectFilesystemWidget::on_actionShow_external_triggered() {
|
||||||
if (projectfs_menu_target.path().isEmpty()) return;
|
if (projectfs_menu_target.path().isEmpty()) return;
|
||||||
Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(), Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath()));
|
Core::FileUtils::showInGraphicalShell(Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user