Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6ce3f4c8 authored by Michael Reeves's avatar Michael Reeves

fix qt 5.10+ warning

parent 44d4120c
......@@ -810,7 +810,11 @@ class FormatRangeHelper
void DiffTextWindowData::prepareTextLayout(QTextLayout& textLayout, bool /*bFirstLine*/, int visibleTextWidth)
{
QTextOption textOption;
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
textOption.setTabStop(QFontMetricsF(m_pDiffTextWindow->font()).width(' ') * m_pOptions->m_tabSize);
#else
textOption.setTabStopDistance(QFontMetricsF(m_pDiffTextWindow->font()).width(' ') * m_pOptions->m_tabSize);
#endif
if(m_pOptions->m_bShowWhiteSpaceCharacters)
textOption.setFlags(QTextOption::ShowTabsAndSpaces);
if(m_pOptions->m_bRightToLeftLanguage)
......
......@@ -1706,7 +1706,11 @@ QVector<QTextLayout::FormatRange> MergeResultWindow::getTextLayoutForLine(int li
{
// tabs
QTextOption textOption;
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
textOption.setTabStop(QFontMetricsF(font()).width(' ') * m_pOptions->m_tabSize);
#else
textOption.setTabStopDistance(QFontMetricsF(font()).width(' ') * m_pOptions->m_tabSize);
#endif
if(m_pOptions->m_bShowWhiteSpaceCharacters)
{
textOption.setFlags(QTextOption::ShowTabsAndSpaces);
......
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