Commit f1ea4155 authored by Alessandro Portale's avatar Alessandro Portale

ProjectExplorer: Don't display alien dir separators on Windows

In case you opened more than one project with the same name, it shows
the full path incl. dir separators in the first-level tabs in the
project mode.

Change-Id: Idbf5dfe6ef0c20eecf3a3473011bb2d9b1794cea
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 71855e6b
......@@ -35,6 +35,7 @@
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
#include <QDir>
#include <QRect>
#include <QPainter>
#include <QMouseEvent>
......@@ -573,3 +574,8 @@ bool DoubleTabWidget::event(QEvent *event)
}
return QWidget::event(event);
}
QString DoubleTabWidget::Tab::displayName() const
{
return nameIsUnique ? name : QDir::toNativeSeparators(fullName);
}
......@@ -80,9 +80,7 @@ private:
bool nameIsUnique;
QStringList subTabs;
int currentSubTab;
QString displayName() const {
return nameIsUnique ? name : fullName;
}
QString displayName() const;
};
void updateNameIsUniqueAdd(Tab *tab);
void updateNameIsUniqueRemove(const Tab &tab);
......
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