[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 9 09:05:20 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=ef134b7
The following commit has been merged in the master branch:
commit ef134b73f46bd7ea4a464756d07ae6d8b213c4d6
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Wed Jul 11 12:25:53 2012 +0100
Make colour scheme less horendous.
---
tools/debugger/debug-messages-model.cpp | 48 ++++++++++++++++++++++++---------
tools/debugger/main-window.ui | 32 +++++++++++++++++++---
2 files changed, 63 insertions(+), 17 deletions(-)
diff --git a/tools/debugger/debug-messages-model.cpp b/tools/debugger/debug-messages-model.cpp
index 07f9323..f174c78 100644
--- a/tools/debugger/debug-messages-model.cpp
+++ b/tools/debugger/debug-messages-model.cpp
@@ -19,7 +19,11 @@
#include <TelepathyQt/PendingReady>
#include <TelepathyQt/Constants>
+
#include <KDebug>
+#include <KIcon>
+#include <KColorScheme>
+
#include <ctime>
DebugMessagesModel::DebugMessagesModel(const QString & service, QObject *parent)
@@ -60,7 +64,7 @@ void DebugMessagesModel::onServiceRegistered(const QString & service)
}
void DebugMessagesModel::onDebugReceiverInvalidated(Tp::DBusProxy *proxy,
- const QString &errorName, const QString &errorMessage)
+ const QString &errorName, const QString &errorMessage)
{
Q_UNUSED(proxy);
kDebug() << "DebugReceiver invalidated" << errorName << errorMessage;
@@ -93,7 +97,7 @@ void DebugMessagesModel::onDebugReceiverMonitoringEnabled(Tp::PendingOperation*
m_debugReceiver.reset();
} else {
connect(m_debugReceiver->fetchMessages(), SIGNAL(finished(Tp::PendingOperation*)),
- SLOT(onFetchMessagesFinished(Tp::PendingOperation*)));
+ SLOT(onFetchMessagesFinished(Tp::PendingOperation*)));
}
}
@@ -164,30 +168,48 @@ QVariant DebugMessagesModel::data(const QModelIndex & index, int role) const
return QVariant();
}
+ KColorScheme scheme(QPalette::Active, KColorScheme::Window);
+
+
switch(role) {
case Qt::DisplayRole:
return QString(formatTimestamp(m_messages[index.row()].timestamp) %
- QLatin1Literal(" - [") % m_messages[index.row()].domain % QLatin1Literal("] ") %
- m_messages[index.row()].message);
- case Qt::BackgroundColorRole:
- {
+ QLatin1Literal(" - [") % m_messages[index.row()].domain % QLatin1Literal("] ") %
+ m_messages[index.row()].message);
+ case Qt::DecorationRole:
switch(m_messages[index.row()].level) {
case Tp::DebugLevelError:
- return Qt::darkRed;
+ return KIcon(QLatin1String("dialog-error"));
case Tp::DebugLevelCritical:
- return Qt::red;
+ return KIcon(QLatin1String("dialog-error"));
case Tp::DebugLevelWarning:
- return Qt::yellow;
+ return KIcon(QLatin1String("dialog-warning"));
case Tp::DebugLevelMessage:
- return Qt::white;
+ return KIcon(QLatin1String("dialog-info"));
case Tp::DebugLevelInfo:
- return Qt::green;
+ return KIcon(QLatin1String("dialog-info"));
case Tp::DebugLevelDebug:
- return Qt::cyan;
+ return KIcon(QLatin1String("tools-report-bug"));
+ default:
+ return QVariant();
+ }
+ case Qt::ForegroundRole:
+ switch(m_messages[index.row()].level) {
+ case Tp::DebugLevelError:
+ /** Fall Through*/
+ case Tp::DebugLevelCritical:
+ /** Fall Through*/
+ case Tp::DebugLevelWarning:
+ return scheme.foreground(KColorScheme::NegativeText);
+ case Tp::DebugLevelMessage:
+ /** Fall Through*/
+ case Tp::DebugLevelInfo:
+ /** Fall Through*/
+ case Tp::DebugLevelDebug:
+ /** Fall Through*/
default:
return QVariant();
}
- }
case MessageRole:
return m_messages[index.row()].message;
case TimestampRole:
diff --git a/tools/debugger/main-window.ui b/tools/debugger/main-window.ui
index 267d3fd..1e3bfff 100644
--- a/tools/debugger/main-window.ui
+++ b/tools/debugger/main-window.ui
@@ -14,7 +14,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="mcTab">
<attribute name="title">
@@ -22,7 +22,17 @@
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <widget class="QListView" name="mcLogsView"/>
+ <widget class="QListView" name="mcLogsView">
+ <property name="alternatingRowColors">
+ <bool>true</bool>
+ </property>
+ <property name="isWrapping" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
</item>
</layout>
</widget>
@@ -32,7 +42,14 @@
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <widget class="QListView" name="gabbleLogsView"/>
+ <widget class="QListView" name="gabbleLogsView">
+ <property name="alternatingRowColors">
+ <bool>true</bool>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
</item>
</layout>
</widget>
@@ -42,7 +59,14 @@
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
- <widget class="QListView" name="hazeLogsView"/>
+ <widget class="QListView" name="hazeLogsView">
+ <property name="alternatingRowColors">
+ <bool>true</bool>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
</item>
</layout>
</widget>
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list