Hello community, here is the log from the commit of package yast2-qt for openSUSE:Factory checked in at 2012-02-08 17:21:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-qt (Old) and /work/SRC/openSUSE:Factory/.yast2-qt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-qt", Maintainer is "tgoettlic...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-qt/yast2-qt.changes 2011-12-22 13:19:35.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-qt.new/yast2-qt.changes 2012-02-08 17:21:58.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Feb 8 14:54:15 CET 2012 - tgoettlic...@suse.de + +- Fixed bnc#731540: fixed auto-scroll in LogView +- Version: 2.22.2 + +------------------------------------------------------------------- Old: ---- yast2-qt-2.22.1.tar.bz2 New: ---- yast2-qt-2.22.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-qt.spec ++++++ --- /var/tmp/diff_new_pack.T1regw/_old 2012-02-08 17:21:59.000000000 +0100 +++ /var/tmp/diff_new_pack.T1regw/_new 2012-02-08 17:21:59.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package yast2-qt # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,11 +18,11 @@ Name: yast2-qt -Version: 2.22.1 +Version: 2.22.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-qt-2.22.1.tar.bz2 +Source0: yast2-qt-2.22.2.tar.bz2 Group: System/YaST License: GPL-2.0 BuildRequires: docbook-xsl-stylesheets ++++++ yast2-qt-2.22.1.tar.bz2 -> yast2-qt-2.22.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.22.1/VERSION.cmake new/yast2-qt-2.22.2/VERSION.cmake --- old/yast2-qt-2.22.1/VERSION.cmake 2011-12-20 16:32:18.000000000 +0100 +++ new/yast2-qt-2.22.2/VERSION.cmake 2012-02-08 14:54:52.000000000 +0100 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "22") -SET(VERSION_PATCH "1") +SET(VERSION_PATCH "2") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.22.1/package/yast2-qt.changes new/yast2-qt-2.22.2/package/yast2-qt.changes --- old/yast2-qt-2.22.1/package/yast2-qt.changes 2011-12-20 16:32:18.000000000 +0100 +++ new/yast2-qt-2.22.2/package/yast2-qt.changes 2012-02-08 14:54:52.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Feb 8 14:54:15 CET 2012 - tgoettlic...@suse.de + +- Fixed bnc#731540: fixed auto-scroll in LogView +- Version: 2.22.2 + +------------------------------------------------------------------- Tue Dec 20 16:30:28 CET 2011 - tgoettlic...@suse.de - Confirmed license diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.22.1/src/YQLogView.cc new/yast2-qt-2.22.2/src/YQLogView.cc --- old/yast2-qt-2.22.1/src/YQLogView.cc 2011-12-20 16:32:18.000000000 +0100 +++ new/yast2-qt-2.22.2/src/YQLogView.cc 2012-02-08 14:54:52.000000000 +0100 @@ -73,7 +73,7 @@ YUI_CHECK_NEW( _caption ); layout->addWidget( _caption ); - _qt_text = new QTextEdit( this ); + _qt_text = new MyTextEdit( this ); YUI_CHECK_NEW( _qt_text ); layout->addWidget( _qt_text ); @@ -82,6 +82,9 @@ _qt_text->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); _caption->setBuddy( _qt_text ); + + connect (_qt_text, SIGNAL(resized()), this, SLOT(slotResize())); + } @@ -119,6 +122,7 @@ { _qt_text->moveCursor( QTextCursor::End ); _qt_text->ensureCursorVisible(); + sb->setValue( sb->maximum() ); } _lastText = newString; @@ -163,6 +167,20 @@ return max( 80, hintHeight ); } +void +YQLogView::slotResize() +{ + QScrollBar *sb = _qt_text->verticalScrollBar(); + + bool atEnd = sb->value() == sb->maximum(); + + if (atEnd) + { + _qt_text->moveCursor( QTextCursor::End ); + _qt_text->ensureCursorVisible(); + sb->setValue( sb->maximum() ); + } +} void YQLogView::setSize( int newWidth, int newHeight ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.22.1/src/YQLogView.h new/yast2-qt-2.22.2/src/YQLogView.h --- old/yast2-qt-2.22.1/src/YQLogView.h 2011-12-20 16:32:18.000000000 +0100 +++ new/yast2-qt-2.22.2/src/YQLogView.h 2012-02-08 14:54:52.000000000 +0100 @@ -49,6 +49,8 @@ #include "YLogView.h" class YQWidgetCaption; +class MyTextEdit; + class YQLogView : public QFrame, public YLogView @@ -127,8 +129,32 @@ protected: YQWidgetCaption * _caption; - QTextEdit * _qt_text; + MyTextEdit * _qt_text; QString _lastText; + +private slots: + void slotResize(); + +}; + + +// We need a resize event in order to set the cursor to the last line +// for the auto-scroll feature +class MyTextEdit : public QTextEdit +{ + Q_OBJECT + public: + MyTextEdit( QWidget* parent ) : QTextEdit (parent) {} + + protected: + void resizeEvent ( QResizeEvent * event ) + { emit resized(); + QTextEdit::resizeEvent(event); + } + + signals: + void resized(); + }; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org