┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/kcommentwidget.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-11-21 22:50:22 +0000
committerPeter Penz <[email protected]>2009-11-21 22:50:22 +0000
commit2a02ac7d02790c69a63ee79e2fac4e94b9165531 (patch)
tree6badbbf536213aee204955e0c352a914cdc6853f /src/panels/information/kcommentwidget.cpp
parent3be4adae11b9f9466bc926a83372213a34fb92e2 (diff)
Let KMetaDataWidget and all the child widgets respect the foreground role that might be set by the client. This allows KMetaDataWidget to get embedded inside a tooltip having correct tooltip colors.
svn path=/trunk/KDE/kdebase/apps/; revision=1052509
Diffstat (limited to 'src/panels/information/kcommentwidget.cpp')
-rw-r--r--src/panels/information/kcommentwidget.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/panels/information/kcommentwidget.cpp b/src/panels/information/kcommentwidget.cpp
index c1f7ab757..408e6a873 100644
--- a/src/panels/information/kcommentwidget.cpp
+++ b/src/panels/information/kcommentwidget.cpp
@@ -23,6 +23,7 @@
#include <kglobalsettings.h>
#include <klocale.h>
+#include <QEvent>
#include <QLabel>
#include <QTextEdit>
#include <QVBoxLayout>
@@ -87,6 +88,14 @@ bool KCommentWidget::isReadOnly() const
return m_readOnly;
}
+bool KCommentWidget::event(QEvent* event)
+{
+ if (event->type() == QEvent::Polish) {
+ m_label->setForegroundRole(foregroundRole());
+ }
+ return QWidget::event(event);
+}
+
void KCommentWidget::slotLinkActivated(const QString& link)
{
KDialog dialog(this, Qt::Dialog);