Mailinglist Archive: yast-commit (233 mails)

< Previous Next >
[yast-commit] r63168 - in /trunk/qt: VERSION.cmake package/yast2-qt.changes src/YQLogView.cc src/YQLogView.h
Author: tgoettlicher
Date: Wed Jan 12 15:02:38 2011
New Revision: 63168

URL: http://svn.opensuse.org/viewcvs/yast?rev=63168&view=rev
Log:
- Fixed LogView's scroller
- V 2.19.6


Modified:
trunk/qt/VERSION.cmake
trunk/qt/package/yast2-qt.changes
trunk/qt/src/YQLogView.cc
trunk/qt/src/YQLogView.h

Modified: trunk/qt/VERSION.cmake
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/VERSION.cmake?rev=63168&r1=63167&r2=63168&view=diff
==============================================================================
--- trunk/qt/VERSION.cmake (original)
+++ trunk/qt/VERSION.cmake Wed Jan 12 15:02:38 2011
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "19")
-SET(VERSION_PATCH "5")
+SET(VERSION_PATCH "6")

Modified: trunk/qt/package/yast2-qt.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/package/yast2-qt.changes?rev=63168&r1=63167&r2=63168&view=diff
==============================================================================
--- trunk/qt/package/yast2-qt.changes (original)
+++ trunk/qt/package/yast2-qt.changes Wed Jan 12 15:02:38 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Jan 12 15:01:20 CET 2011 - tgoettlicher@xxxxxxx
+
+- Fixed LogView's scroller
+- V 2.19.6
+
+-------------------------------------------------------------------
Mon Dec 20 16:52:53 CET 2010 - tgoettlicher@xxxxxxx

- Added support for check boxes in tree widgets

Modified: trunk/qt/src/YQLogView.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQLogView.cc?rev=63168&r1=63167&r2=63168&view=diff
==============================================================================
--- trunk/qt/src/YQLogView.cc (original)
+++ trunk/qt/src/YQLogView.cc Wed Jan 12 15:02:38 2011
@@ -94,14 +94,21 @@
{
QScrollBar *sb = _qt_text->verticalScrollBar();

- int sbVal = sb->value();
- int sbMaxVal = sb->maximum();
- _qt_text->setPlainText( fromUTF8( text ) );
-
- if ( sbVal != sbMaxVal )
- sb->setValue( sbVal );
- else
- sb->setValue( sb->maximum() );
+ QString newString = fromUTF8( text );
+
+ bool atEnd = sb->value() == sb->maximum();
+
+ if (newString.startsWith(_lastText)) {
+ _qt_text->append(newString.mid(_lastText.length() + 1 ));
+ } else {
+ _qt_text->setPlainText( newString );
+ }
+
+ if (atEnd) {
+ _qt_text->moveCursor( QTextCursor::End );
+ _qt_text->ensureCursorVisible();
+ }
+ _lastText = newString;
}



Modified: trunk/qt/src/YQLogView.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQLogView.h?rev=63168&r1=63167&r2=63168&view=diff
==============================================================================
--- trunk/qt/src/YQLogView.h (original)
+++ trunk/qt/src/YQLogView.h Wed Jan 12 15:02:38 2011
@@ -126,6 +126,7 @@

YQWidgetCaption * _caption;
QTextEdit * _qt_text;
+ QString _lastText;
};



--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages