[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdevplatform] /: Treat assistant description as plain text
From: Olivier JG <olivier.jg () gmail ! com>
Date: 2015-10-09 9:19:36
Message-ID: E1ZkTpw-00006u-HX () scm ! kde ! org
[Download RAW message or body]
Git commit 34ccfb07314d7daa5b55d0dd258793ea0f365a8b by Olivier JG.
Committed on 09/10/2015 at 09:21.
Pushed by olivierjg into branch 'master'.
Treat assistant description as plain text
M +1 -13 interfaces/iassistant.cpp
M +1 -0 shell/AssistantButton.qml
http://commits.kde.org/kdevplatform/34ccfb07314d7daa5b55d0dd258793ea0f365a8b
diff --git a/interfaces/iassistant.cpp b/interfaces/iassistant.cpp
index d7b9849..b606022 100644
--- a/interfaces/iassistant.cpp
+++ b/interfaces/iassistant.cpp
@@ -28,18 +28,6 @@ using namespace KDevelop;
Q_DECLARE_METATYPE(QExplicitlySharedDataPointer<IAssistantAction>)
-static QString removeHtmlFromString(QString string)
-{
- QXmlStreamReader xml("<root>" + string + "</root>");
- QString textString;
- while ( !xml.atEnd() ) {
- if ( xml.readNext() == QXmlStreamReader::Characters ) {
- textString += xml.text();
- }
- }
- return textString;
-}
-
//BEGIN IAssistant
void IAssistant::createActions()
@@ -51,7 +39,7 @@ QAction* IAssistantAction::toKAction() const
Q_ASSERT(QThread::currentThread() == ICore::self()->thread() && "Actions must be \
created in the application main thread"
"(implement createActions() to \
create your actions)");
- QAction* ret = new QAction(icon(), removeHtmlFromString(description()), 0);
+ QAction* ret = new QAction(icon(), description(), 0);
ret->setToolTip(toolTip());
//Add the data as a QExplicitlySharedDataPointer to the action, so this \
assistant stays alive at least as long as the QAction
diff --git a/shell/AssistantButton.qml b/shell/AssistantButton.qml
index 9500a9e..2d07c57 100644
--- a/shell/AssistantButton.qml
+++ b/shell/AssistantButton.qml
@@ -79,6 +79,7 @@ Rectangle {
anchors.verticalCenterOffset: 1
color: root.foreground
text: root.text
+ textFormat: Text.PlainText
}
Rectangle { width: 2; height: 1; color: Qt.rgba(0, 0, 0, 0) } // padding
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic