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/stylehelper.h>
|
||||||
#include <utils/theme/theme.h>
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
@@ -573,3 +574,8 @@ bool DoubleTabWidget::event(QEvent *event)
|
|||||||
}
|
}
|
||||||
return QWidget::event(event);
|
return QWidget::event(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString DoubleTabWidget::Tab::displayName() const
|
||||||
|
{
|
||||||
|
return nameIsUnique ? name : QDir::toNativeSeparators(fullName);
|
||||||
|
}
|
||||||
|
@@ -80,9 +80,7 @@ private:
|
|||||||
bool nameIsUnique;
|
bool nameIsUnique;
|
||||||
QStringList subTabs;
|
QStringList subTabs;
|
||||||
int currentSubTab;
|
int currentSubTab;
|
||||||
QString displayName() const {
|
QString displayName() const;
|
||||||
return nameIsUnique ? name : fullName;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
void updateNameIsUniqueAdd(Tab *tab);
|
void updateNameIsUniqueAdd(Tab *tab);
|
||||||
void updateNameIsUniqueRemove(const Tab &tab);
|
void updateNameIsUniqueRemove(const Tab &tab);
|
||||||
|
Reference in New Issue
Block a user