Commit 67d0ab3f authored by Leandro Melo's avatar Leandro Melo
Browse files

Remove option to extend tooltips.

parent ba12a339
......@@ -114,7 +114,7 @@ void CppHoverHandler::decorateToolTip(TextEditor::ITextEditor *editor)
const TextEditor::HelpItem &help = lastHelpItemIdentified();
if (help.isValid()) {
const QString &contents = help.extractContent(extendToolTips(editor));
const QString &contents = help.extractContent(false);
if (!contents.isEmpty()) {
if (help.category() == TextEditor::HelpItem::ClassOrNamespace)
appendToolTip(contents);
......
......@@ -152,7 +152,7 @@ void BaseHoverHandler::decorateToolTip(ITextEditor *editor)
return;
if (lastHelpItemIdentified().isValid()) {
const QString &contents = lastHelpItemIdentified().extractContent(extendToolTips(editor));
const QString &contents = lastHelpItemIdentified().extractContent(false);
if (!contents.isEmpty()) {
appendToolTip(contents);
} else {
......@@ -179,11 +179,3 @@ BaseTextEditor *BaseHoverHandler::baseTextEditor(ITextEditor *editor)
return 0;
return qobject_cast<BaseTextEditor *>(editor->widget());
}
bool BaseHoverHandler::extendToolTips(ITextEditor *editor)
{
BaseTextEditor *baseEditor = baseTextEditor(editor);
if (baseEditor && baseEditor->displaySettings().m_extendTooltips)
return true;
return false;
}
......@@ -73,7 +73,6 @@ protected:
const HelpItem &lastHelpItemIdentified() const;
static BaseTextEditor *baseTextEditor(ITextEditor *editor);
static bool extendToolTips(ITextEditor *editor);
private:
void clear();
......
......@@ -44,7 +44,6 @@ static const char * const animateMatchingParenthesesKey= "AnimateMatchingParenth
static const char * const markTextChangesKey = "MarkTextChanges";
static const char * const autoFoldFirstCommentKey = "AutoFoldFirstComment";
static const char * const centerCursorOnScrollKey = "CenterCursorOnScroll";
static const char * const extendTooltips = "ExtendTooltips";
static const char * const groupPostfix = "DisplaySettings";
namespace TextEditor {
......@@ -61,8 +60,7 @@ DisplaySettings::DisplaySettings() :
m_animateMatchingParentheses(true),
m_markTextChanges(true),
m_autoFoldFirstComment(true),
m_centerCursorOnScroll(false),
m_extendTooltips(false)
m_centerCursorOnScroll(false)
{
}
......@@ -84,7 +82,6 @@ void DisplaySettings::toSettings(const QString &category, QSettings *s) const
s->setValue(QLatin1String(markTextChangesKey), m_markTextChanges);
s->setValue(QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment);
s->setValue(QLatin1String(centerCursorOnScrollKey), m_centerCursorOnScroll);
s->setValue(QLatin1String(extendTooltips), m_extendTooltips);
s->endGroup();
}
......@@ -109,7 +106,6 @@ void DisplaySettings::fromSettings(const QString &category, const QSettings *s)
m_markTextChanges = s->value(group + QLatin1String(markTextChangesKey), m_markTextChanges).toBool();
m_autoFoldFirstComment = s->value(group + QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment).toBool();
m_centerCursorOnScroll = s->value(group + QLatin1String(centerCursorOnScrollKey), m_centerCursorOnScroll).toBool();
m_extendTooltips = s->value(group + QLatin1String(extendTooltips), m_extendTooltips).toBool();
}
bool DisplaySettings::equals(const DisplaySettings &ds) const
......@@ -126,7 +122,6 @@ bool DisplaySettings::equals(const DisplaySettings &ds) const
&& m_markTextChanges == ds.m_markTextChanges
&& m_autoFoldFirstComment== ds.m_autoFoldFirstComment
&& m_centerCursorOnScroll == ds.m_centerCursorOnScroll
&& m_extendTooltips == ds.m_extendTooltips
;
}
......
......@@ -58,7 +58,6 @@ public:
bool m_markTextChanges;
bool m_autoFoldFirstComment;
bool m_centerCursorOnScroll;
bool m_extendTooltips;
bool equals(const DisplaySettings &ds) const;
};
......
......@@ -93,8 +93,7 @@ QWidget *DisplaySettingsPage::createPage(QWidget *parent)
<< ' ' << m_d->m_page.animateMatchingParentheses->text()
<< ' ' << m_d->m_page.enableTextWrapping->text()
<< ' ' << m_d->m_page.autoFoldFirstComment->text()
<< ' ' << m_d->m_page.centerOnScroll->text()
<< ' ' << m_d->m_page.extendTooltips->text();
<< ' ' << m_d->m_page.centerOnScroll->text();
m_d->m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
......@@ -122,7 +121,6 @@ void DisplaySettingsPage::settingsFromUI(DisplaySettings &displaySettings) const
displaySettings.m_markTextChanges = m_d->m_page.markTextChanges->isChecked();
displaySettings.m_autoFoldFirstComment = m_d->m_page.autoFoldFirstComment->isChecked();
displaySettings.m_centerCursorOnScroll = m_d->m_page.centerOnScroll->isChecked();
displaySettings.m_extendTooltips = m_d->m_page.extendTooltips->isChecked();
}
void DisplaySettingsPage::settingsToUI()
......@@ -140,7 +138,6 @@ void DisplaySettingsPage::settingsToUI()
m_d->m_page.markTextChanges->setChecked(displaySettings.m_markTextChanges);
m_d->m_page.autoFoldFirstComment->setChecked(displaySettings.m_autoFoldFirstComment);
m_d->m_page.centerOnScroll->setChecked(displaySettings.m_centerCursorOnScroll);
m_d->m_page.extendTooltips->setChecked(displaySettings.m_extendTooltips);
}
const DisplaySettings &DisplaySettingsPage::displaySettings() const
......
......@@ -96,13 +96,6 @@
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="extendTooltips">
<property name="text">
<string>Extend tooltips for Qt 4.7 (or later) docs</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
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