QmlDesigner: use Utils::FileName

No behavior change.

Change-Id: I7e8bc51bf1fed99159945c656402bb315aebc3f0
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-10-07 14:16:49 +02:00
parent bd8c12c94c
commit 4dffc26cd1
8 changed files with 22 additions and 19 deletions

View File

@@ -452,7 +452,7 @@ ViewManager &DesignModeWidget::viewManager()
void DesignModeWidget::setupNavigatorHistory(Core::IEditor *editor)
{
if (!m_keepNavigatorHistory)
addNavigatorHistoryEntry(editor->document()->filePath().toString());
addNavigatorHistoryEntry(editor->document()->filePath());
const bool canGoBack = m_navigatorHistoryCounter > 0;
const bool canGoForward = m_navigatorHistoryCounter < (m_navigatorHistory.size() - 1);
@@ -461,12 +461,12 @@ void DesignModeWidget::setupNavigatorHistory(Core::IEditor *editor)
m_toolBar->setCurrentEditor(editor);
}
void DesignModeWidget::addNavigatorHistoryEntry(const QString &fileName)
void DesignModeWidget::addNavigatorHistoryEntry(const Utils::FileName &fileName)
{
if (m_navigatorHistoryCounter > 0)
m_navigatorHistory.insert(m_navigatorHistoryCounter + 1, fileName);
m_navigatorHistory.insert(m_navigatorHistoryCounter + 1, fileName.toString());
else
m_navigatorHistory.append(fileName);
m_navigatorHistory.append(fileName.toString());
++m_navigatorHistoryCounter;
}