forked from qt-creator/qt-creator
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 <orgads@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user