diff --git a/language/duchain/navigation/problemnavigationcontext.cpp b/language/duchain/navigation/problemnavigationcontext.cpp index a705ded131..cfa8bc30df 100644 --- a/language/duchain/navigation/problemnavigationcontext.cpp +++ b/language/duchain/navigation/problemnavigationcontext.cpp @@ -1,98 +1,98 @@ /* Copyright 2009 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "problemnavigationcontext.h" #include #include #include #include #include #include #include #include #include using namespace KDevelop; ProblemNavigationContext::ProblemNavigationContext(ProblemPointer problem): m_problem(problem) { m_widget = 0; KSharedPtr< IAssistant > solution = problem->solutionAssistant(); if(solution && !solution->actions().isEmpty()) { m_widget = new QWidget; QHBoxLayout* layout = new QHBoxLayout(m_widget); RichTextPushButton* button = new RichTextPushButton; // button->setPopupMode(QToolButton::InstantPopup); if(!solution->title().isEmpty()) button->setHtml(i18n("Solve: %1", solution->title())); else button->setHtml(i18n("Solve")); QMenu* menu = new QMenu; menu->setFocusPolicy(Qt::NoFocus); foreach(IAssistantAction::Ptr action, solution->actions()) { menu->addAction(action->toKAction()); kDebug() << "adding action" << action->description(); } button->setMenu(menu); layout->addWidget(button); layout->setAlignment(button, Qt::AlignLeft); m_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); } } ProblemNavigationContext::~ProblemNavigationContext() { delete m_widget; } QWidget* ProblemNavigationContext::widget() const { return m_widget; } bool ProblemNavigationContext::isWidgetMaximized() const { return false; } QString ProblemNavigationContext::name() const { return i18n("Problem"); } QString ProblemNavigationContext::html(bool shorten) { clear(); m_shorten = shorten; - modifyHtml() += "

"; + modifyHtml() += "

"; modifyHtml() += i18n("Problem in %1:
", m_problem->sourceString()); modifyHtml() += Qt::escape(m_problem->description()); modifyHtml() += "
"; - modifyHtml() += "" + m_problem->explanation() + ""; - + modifyHtml() += "" + Qt::escape(m_problem->explanation()) + ""; + modifyHtml() += "

"; return currentHtml(); }