Commit 821f08a9 authored by Alessandro Portale's avatar Alessandro Portale

ProjectExplorer: Native dir separator in project Tab Tooltip

Looks more familiar.

Change-Id: I206cfcc7a02b9c4331ea3e48dfed5092338933b1
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 60997f6a
......@@ -31,6 +31,7 @@
#include "doubletabwidget.h"
#include "ui_doubletabwidget.h"
#include <utils/fileutils.h>
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
......@@ -563,10 +564,12 @@ bool DoubleTabWidget::event(QEvent *event)
if (event->type() == QEvent::ToolTip) {
QHelpEvent *helpevent = static_cast<QHelpEvent*>(event);
QPair<HitArea, int> hit = convertPosToTab(helpevent->pos());
if (hit.first == HITTAB && m_tabs.at(m_currentTabIndices.at(hit.second)).nameIsUnique)
QToolTip::showText(helpevent->globalPos(), m_tabs.at(m_currentTabIndices.at(hit.second)).fullName, this);
else
if (hit.first == HITTAB && m_tabs.at(m_currentTabIndices.at(hit.second)).nameIsUnique) {
const QString &fileName = m_tabs.at(m_currentTabIndices.at(hit.second)).fullName;
QToolTip::showText(helpevent->globalPos(), FileName::fromString(fileName).toUserOutput(), this);
} else {
QToolTip::showText(helpevent->globalPos(), QString(), this);
}
}
return QWidget::event(event);
}
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