[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/network/ktorrent
From: Joris Guisson <joris.guisson () gmail ! com>
Date: 2010-08-25 18:56:44
Message-ID: 20100825185644.503C5AC857 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1167948 by guisson:
Add option to configure the number of log lines shown in the logviewer
BUG: 223887
M +1 -0 ChangeLog
M +5 -0 plugins/logviewer/ktlogviewerplugin.kcfg
M +47 -12 plugins/logviewer/logprefwidget.ui
M +6 -0 plugins/logviewer/logviewer.cpp
M +1 -0 plugins/logviewer/logviewer.h
M +1 -0 plugins/logviewer/logviewerplugin.cpp
--- trunk/extragear/network/ktorrent/ChangeLog #1167947:1167948
@@ -17,6 +17,7 @@
- Make file view of FileSelectDlg sortable (248090)
- Clicking item in day list of AddItemDlg of bwscheduler plugin now toggles it \
(225953)
- Add support for emule blocklists (194915)
+- Add option to configure the number of log lines shown in the logviewer (223887)
Changes in 4.0.3:
- Fix bug causing wrong encoding to be used when the default save location of a \
group is read (244873)
--- trunk/extragear/network/ktorrent/plugins/logviewer/ktlogviewerplugin.kcfg \
#1167947:1167948 @@ -17,5 +17,10 @@
<min>0</min>
<max>2</max>
</entry>
+ <entry name="maxBlockCount" type="Int">
+ <default>200</default>
+ <min>50</min>
+ <max>500000</max>
+ </entry>
</group>
</kcfg>
--- trunk/extragear/network/ktorrent/plugins/logviewer/logprefwidget.ui \
#1167947:1167948 @@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0" >
<class>LogPrefWidget</class>
<widget class="QWidget" name="LogPrefWidget" >
@@ -6,24 +7,24 @@
<x>0</x>
<y>0</y>
<width>456</width>
- <height>394</height>
+ <height>421</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<widget class="QTreeView" name="m_logging_flags" >
<property name="toolTip" >
- <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> \
+<html><head><meta name="qrichtext" content="1" \
/><style type="text/css"> p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Bitstream Vera Sans'; \
font-size:8pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;">Double click on the log level to alter it. The \
possible levels are :</p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">All: \
</span>All messages are shown</p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Important: \
</span>Only important messages are shown</p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Notice: \
</span>Only notice and important messages are shown</p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Debug: \
</span>Debug, notice and important messages are shown</p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;"><span style=" \
font-weight:600;">None:</span> No messages are \
shown</p></body></html></string> +</style></head><body \
style=" font-family:'Bitstream Vera Sans'; font-size:8pt; font-weight:400; \
font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;">Double click on the log level to alter it. The possible \
levels are :</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"></p> +<p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"><span style=" font-weight:600;">All: \
</span>All messages are shown</p> +<p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"><span style=" font-weight:600;">Important: \
</span>Only important messages are shown</p> +<p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;"><span style=" \
font-weight:600;">Notice: </span>Only notice and important messages are \
shown</p> +<p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"><span style=" font-weight:600;">Debug: \
</span>Debug, notice and important messages are shown</p> +<p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;"><span style=" \
font-weight:600;">None:</span> No messages are \
shown</p></body></html></string> </property>
<property name="alternatingRowColors" >
<bool>true</bool>
@@ -61,7 +62,7 @@
<item>
<widget class="QComboBox" name="kcfg_logWidgetPosition" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -98,11 +99,45 @@
</item>
</layout>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Maximum nuber of visible lines:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntSpinBox" name="kcfg_maxBlockCount"/>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
+ </item>
+ </layout>
</widget>
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>KIntSpinBox</class>
+ <extends>QSpinBox</extends>
+ <header>knuminput.h</header>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections/>
</ui>
--- trunk/extragear/network/ktorrent/plugins/logviewer/logviewer.cpp #1167947:1167948
@@ -111,6 +111,12 @@
use_rich_text = val;
}
+ void LogViewer::setMaxBlockCount(int max)
+ {
+ output->document()->setMaximumBlockCount(max);
+ }
+
+
void LogViewer::showMenu(const QPoint& pos)
{
if (!menu)
--- trunk/extragear/network/ktorrent/plugins/logviewer/logviewer.h #1167947:1167948
@@ -41,6 +41,7 @@
virtual void customEvent(QEvent* ev);
void setRichText(bool val);
+ void setMaxBlockCount(int max);
public slots:
void showMenu(const QPoint & pos);
--- trunk/extragear/network/ktorrent/plugins/logviewer/logviewerplugin.cpp \
#1167947:1167948 @@ -89,6 +89,7 @@
void LogViewerPlugin::applySettings()
{
lv->setRichText(LogViewerPluginSettings::useRichText());
+ lv->setMaxBlockCount(LogViewerPluginSettings::maxBlockCount());
LogViewerPosition p = \
(LogViewerPosition)LogViewerPluginSettings::logWidgetPosition(); if (pos != p)
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic