![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package yast2-qt-pkg checked in at Fri Nov 7 16:05:09 CET 2008. -------- --- yast2-qt-pkg/yast2-qt-pkg.changes 2008-10-31 17:58:23.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-qt-pkg/yast2-qt-pkg.changes 2008-11-07 14:52:06.000000000 +0100 @@ -1,0 +2,16 @@ +Fri Nov 7 14:50:57 CET 2008 - tgoettlicher@suse.de + +- V 2.17.6 + +------------------------------------------------------------------- +Wed Nov 5 13:00:08 CET 2008 - tgoettlicher@suse.de + +- Fixed encoding in description view + +------------------------------------------------------------------- +Mon Nov 3 16:44:47 CET 2008 - tgoettlicher@suse.de + +- Fixed bnc #438680: software installation description not + refreshed after search + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-qt-pkg-2.17.15.tar.bz2 New: ---- yast2-qt-pkg-2.17.16.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-qt-pkg.spec ++++++ --- /var/tmp/diff_new_pack.JH5616/_old 2008-11-07 16:05:02.000000000 +0100 +++ /var/tmp/diff_new_pack.JH5616/_new 2008-11-07 16:05:02.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-qt-pkg (Version 2.17.15) +# spec file for package yast2-qt-pkg (Version 2.17.16) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,12 +18,12 @@ Name: yast2-qt-pkg -Version: 2.17.15 +Version: 2.17.16 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-qt-pkg-2.17.15.tar.bz2 +Source0: yast2-qt-pkg-2.17.16.tar.bz2 BuildRequires: docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libxcrypt-devel BuildRequires: libqt4-devel libxslt perl-XML-Writer sgml-skel update-desktop-files Summary: YaST2 - Graphical User Interface @@ -82,6 +82,13 @@ %_prefix/share/YaST2/images/* %changelog +* Fri Nov 07 2008 tgoettlicher@suse.de +- V 2.17.6 +* Wed Nov 05 2008 tgoettlicher@suse.de +- Fixed encoding in description view +* Mon Nov 03 2008 tgoettlicher@suse.de +- Fixed bnc #438680: software installation description not + refreshed after search * Fri Oct 31 2008 sh@suse.de - Fixed bnc #381981: Bad initial size for secondary filters in "Repositories" filter view @@ -141,7 +148,7 @@ can also be enabled by defining YPKG_QT_CONFIRM_UNSUPPORTED_PACKAGES at compile time. - (fate#120366) search in file list option -* Fri Aug 15 2008 dmacvicar@suse.de +* Thu Aug 14 2008 dmacvicar@suse.de - 2.17.4 - make the versions view scrollable (bnc#409096) * Tue Aug 12 2008 dmacvicar@suse.de @@ -157,7 +164,7 @@ - V 2.17.3 * Thu Jul 17 2008 ma@suse.de - Remove obsolete references to Script/Message/Atom -* Tue Jul 15 2008 dmacvicar@suse.de +* Mon Jul 14 2008 dmacvicar@suse.de - feature #302003, show transactions in a better way. basically we not only show automatic changes, but all changes or only user requested ones. ++++++ yast2-qt-pkg-2.17.15.tar.bz2 -> yast2-qt-pkg-2.17.16.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.15/package/yast2-qt-pkg.changes new/yast2-qt-pkg-2.17.16/package/yast2-qt-pkg.changes --- old/yast2-qt-pkg-2.17.15/package/yast2-qt-pkg.changes 2008-10-31 17:57:58.000000000 +0100 +++ new/yast2-qt-pkg-2.17.16/package/yast2-qt-pkg.changes 2008-11-07 14:52:05.000000000 +0100 @@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Fri Nov 7 14:50:57 CET 2008 - tgoettlicher@suse.de + +- V 2.17.6 + +------------------------------------------------------------------- +Wed Nov 5 13:00:08 CET 2008 - tgoettlicher@suse.de + +- Fixed encoding in description view + +------------------------------------------------------------------- +Mon Nov 3 16:44:47 CET 2008 - tgoettlicher@suse.de + +- Fixed bnc #438680: software installation description not + refreshed after search + +------------------------------------------------------------------- Fri Oct 31 17:56:00 CET 2008 - sh@suse.de - Fixed bnc #381981: Bad initial size for secondary filters in diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.15/src/YQPackageSelector.cc new/yast2-qt-pkg-2.17.16/src/YQPackageSelector.cc --- old/yast2-qt-pkg-2.17.15/src/YQPackageSelector.cc 2008-10-31 17:57:57.000000000 +0100 +++ new/yast2-qt-pkg-2.17.16/src/YQPackageSelector.cc 2008-11-07 14:52:05.000000000 +0100 @@ -843,6 +843,10 @@ connect( filter, SIGNAL( filterFinished() ), pkgList, SLOT ( logExcludeStatistics() ) ); + connect( filter, SIGNAL( filterFinished() ), + pkgList, SLOT ( setFocus() ) ); + + if ( hasUpdateSignal ) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.15/src/YQPkgDescriptionView.cc new/yast2-qt-pkg-2.17.16/src/YQPkgDescriptionView.cc --- old/yast2-qt-pkg-2.17.15/src/YQPkgDescriptionView.cc 2008-10-31 17:57:58.000000000 +0100 +++ new/yast2-qt-pkg-2.17.16/src/YQPkgDescriptionView.cc 2008-11-07 14:52:05.000000000 +0100 @@ -91,7 +91,7 @@ { html_text += "<p>"; - html_text += asUserStringDescription(package->vendorSupport()).c_str(); + html_text += fromUTF8(asUserStringDescription(package->vendorSupport()).c_str()); html_text += "</p>"; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.15/src/YQPkgRepoFilterView.cc.bak new/yast2-qt-pkg-2.17.16/src/YQPkgRepoFilterView.cc.bak --- old/yast2-qt-pkg-2.17.15/src/YQPkgRepoFilterView.cc.bak 2008-10-31 17:57:58.000000000 +0100 +++ new/yast2-qt-pkg-2.17.16/src/YQPkgRepoFilterView.cc.bak 1970-01-01 01:00:00.000000000 +0100 @@ -1,238 +0,0 @@ -/*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ - - File: YQPkgRepoFilterView.cc - - Author: Stefan Hundhammer <sh@suse.de> - - Textdomain "qt-pkg" - -/-*/ - - -#define YUILogComponent "qt-pkg" -#include "YUILog.h" - -#include <qsplitter.h> - -#include "QY2ComboTabWidget.h" -#include "QY2LayoutUtils.h" -#include <QHBoxLayout> -#include <QVBoxLayout> -#include <QFrame> -#include "YQPkgRepoFilterView.h" -#include "YQPkgRepoList.h" -#include "YQPkgRpmGroupTagsFilterView.h" -#include "YQPkgSearchFilterView.h" -#include "YQPkgStatusFilterView.h" -#include "YQi18n.h" - -YQPkgRepoFilterView::YQPkgRepoFilterView( QWidget * parent ) - : QWidget( parent ) -{ - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setContentsMargins(0,0,0,0); - - QSplitter * splitter = new QSplitter( Qt::Vertical, this ); - Q_CHECK_PTR( splitter ); - - layout->addWidget( splitter ); - - _repoList = new YQPkgRepoList( this ); - splitter->addWidget(_repoList); - - Q_CHECK_PTR( _repoList ); - _repoList->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Expanding ) );// hor/vert - - // Directly propagate signals filterStart() and filterFinished() - // from primary filter to the outside - - connect( _repoList, SIGNAL( filterStart() ), - this, SIGNAL( filterStart() ) ); - - connect( _repoList, SIGNAL( filterFinished() ), - this, SIGNAL( filterFinished() ) ); - - - // Redirect filterMatch() and filterNearMatch() signals to secondary filter - - connect( _repoList, SIGNAL( filterMatch ( ZyppSel, ZyppPkg ) ), - this, SLOT ( primaryFilterMatch ( ZyppSel, ZyppPkg ) ) ); - - connect( _repoList, SIGNAL( filterNearMatch ( ZyppSel, ZyppPkg ) ), - this, SLOT ( primaryFilterNearMatch ( ZyppSel, ZyppPkg ) ) ); - - layoutSecondaryFilters( splitter ); - - splitter->setStretchFactor(0, 5); - splitter->setStretchFactor(1, 1); - splitter->setStretchFactor(2, 3); - - -} - - -YQPkgRepoFilterView::~YQPkgRepoFilterView() -{ - // NOP -} - - -QWidget * -YQPkgRepoFilterView::layoutSecondaryFilters( QWidget * parent ) -{ - QWidget *vbox = new QWidget(parent); - Q_CHECK_PTR( vbox ); - - QVBoxLayout *layout = new QVBoxLayout(); - vbox->setLayout(layout); - layout->setContentsMargins(0,0,0,0); - - // Translators: This is a combo box where the user can apply a secondary filter - // in addition to the primary filter by repository - one of - // "All packages", "RPM groups", "search", "summary" - // - // And yes, the colon really belongs there since this is one of the very - // few cases where a combo box label is left to the combo box rather than - // above it. - _secondaryFilters = new QY2ComboTabWidget( _( "&Secondary Filter:" )); - layout->addWidget(_secondaryFilters); - - Q_CHECK_PTR( _secondaryFilters ); - - // - // All Packages - // - - _allPackages = new QWidget( this ); - layout->addWidget(_allPackages); - Q_CHECK_PTR( _allPackages ); - _secondaryFilters->addPage( _( "All Packages" ), _allPackages ); - - // unmaintaned packages (packages that are not provided in any of - // the configured repositories) - - _unmaintainedPackages = new QWidget( this ); - layout->addWidget(_unmaintainedPackages); - Q_CHECK_PTR( _unmaintainedPackages ); - _secondaryFilters->addPage( _( "Unmaintained Packages" ), _unmaintainedPackages ); - - // - // RPM Groups - // - - _rpmGroupTagsFilterView = new YQPkgRpmGroupTagsFilterView( this ); - layout->addWidget(_rpmGroupTagsFilterView); - - Q_CHECK_PTR( _rpmGroupTagsFilterView ); - _secondaryFilters->addPage( _( "Package Groups" ), _rpmGroupTagsFilterView ); - - connect( _rpmGroupTagsFilterView, SIGNAL( filterStart() ), - _repoList, SLOT ( filter() ) ); - - - // - // Package search view - // - - _searchFilterView = new YQPkgSearchFilterView(this); - layout->addWidget(_searchFilterView); - Q_CHECK_PTR( _searchFilterView ); - _secondaryFilters->addPage( _( "Search" ), _searchFilterView ); - - connect( _searchFilterView, SIGNAL( filterStart() ), - _repoList, SLOT ( filter() ) ); - - connect( _secondaryFilters, SIGNAL( currentChanged( QWidget * ) ), - this, SLOT ( filter() ) ); - - - // - // Status change view - // - - _statusFilterView = new YQPkgStatusFilterView( parent ); - Q_CHECK_PTR( _statusFilterView ); - _secondaryFilters->addPage( _( "Installation Summary" ), _statusFilterView ); - - connect( _statusFilterView, SIGNAL( filterStart() ), - _repoList, SLOT ( filter() ) ); - - - return _secondaryFilters; -} - - -void YQPkgRepoFilterView::filter() -{ - _repoList->filter(); -} - - -void YQPkgRepoFilterView::filterIfVisible() -{ - _repoList->filterIfVisible(); -} - - -void YQPkgRepoFilterView::primaryFilterMatch( ZyppSel selectable, - ZyppPkg pkg ) -{ - if ( secondaryFilterMatch( selectable, pkg ) ) - emit filterMatch( selectable, pkg ); -} - - -void YQPkgRepoFilterView::primaryFilterNearMatch( ZyppSel selectable, - ZyppPkg pkg ) -{ - if ( secondaryFilterMatch( selectable, pkg ) ) - emit filterNearMatch( selectable, pkg ); -} - - -bool -YQPkgRepoFilterView::secondaryFilterMatch( ZyppSel selectable, - ZyppPkg pkg ) -{ - if ( _allPackages->isVisible() ) - { - return true; - } - else if ( _unmaintainedPackages->isVisible() ) - { - return ( selectable->availableSize() == 0 ); - } - else if ( _rpmGroupTagsFilterView->isVisible() ) - { - return _rpmGroupTagsFilterView->check( selectable, pkg ); - } - else if ( _searchFilterView->isVisible() ) - { - return _searchFilterView->check( selectable, pkg ); - } - else if ( _statusFilterView->isVisible() ) - { - return _statusFilterView->check( selectable, pkg ); - } - else - { - return true; - } -} - - - - - - -#include "YQPkgRepoFilterView.moc" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.15/src/YQPkgSearchFilterView.cc.bak new/yast2-qt-pkg-2.17.16/src/YQPkgSearchFilterView.cc.bak --- old/yast2-qt-pkg-2.17.15/src/YQPkgSearchFilterView.cc.bak 2008-10-31 17:57:58.000000000 +0100 +++ new/yast2-qt-pkg-2.17.16/src/YQPkgSearchFilterView.cc.bak 1970-01-01 01:00:00.000000000 +0100 @@ -1,452 +0,0 @@ -/*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ - - File: YQPkgSearchFilterView.cc - - Author: Stefan Hundhammer <sh@suse.de> - - Textdomain "qt-pkg" - -/-*/ - -#include <QCheckBox> -#include <QComboBox> -#include <QLabel> -#include <QLayout> -#include <QPushButton> -#include <QRadioButton> -#include <QGroupBox> -#include <QProgressDialog> -#include <QDateTime> -#include <QKeyEvent> -#include <QMessageBox> - -#include <zypp/PoolQuery.h> - -#define YUILogComponent "qt-pkg" -#include <YUILog.h> - -#include "YQPackageSelector.h" -#include "YQPkgSearchFilterView.h" -#include "QY2LayoutUtils.h" -#include "YQi18n.h" -#include "utf8.h" -#include "YQApplication.h" -#include "YQUI.h" - -using std::list; -using std::string; - -YQPkgSearchFilterView::YQPkgSearchFilterView( QWidget * parent ) - : QWidget( parent ) -{ - QVBoxLayout *layout = new QVBoxLayout; - setLayout(layout); - _matchCount = 0; - layout->addStretch(); - - // Headline - QLabel * label = new QLabel( _( "Searc&h:" ), this ); - Q_CHECK_PTR( label ); - layout->addWidget(label); - label->setFont( YQUI::yqApp()->headingFont() ); - - // Input field ( combo box ) for search text - _searchText = new QComboBox( this ); - Q_CHECK_PTR( _searchText ); - layout->addWidget(_searchText); - _searchText->setEditable( true ); - label->setBuddy( _searchText ); - - - // Box for search button - QHBoxLayout * hbox = new QHBoxLayout(); - Q_CHECK_PTR( hbox ); - layout->addLayout(hbox); - hbox->addStretch(); - - // Search button - _searchButton = new QPushButton( _( "&Search" ), this ); - Q_CHECK_PTR( _searchButton ); - hbox->addWidget(_searchButton); - - connect( _searchButton, SIGNAL( clicked() ), - this, SLOT ( filter() ) ); - - layout->addStretch(); - - // - // Where to search - // - - QGroupBox * gbox = new QGroupBox( _( "Search in" ), this ); - Q_CHECK_PTR( gbox ); - layout->addWidget( gbox ); - QVBoxLayout *vLayout = new QVBoxLayout; - gbox->setLayout( vLayout ); - - _searchInName = new QCheckBox( _( "&Name" ), gbox ); Q_CHECK_PTR( _searchInName ); - vLayout->addWidget(_searchInName); - _searchInSummary = new QCheckBox( _( "Su&mmary" ), gbox ); Q_CHECK_PTR( _searchInSummary ); - vLayout->addWidget(_searchInSummary); - _searchInDescription = new QCheckBox( _( "Descr&iption" ), gbox ); Q_CHECK_PTR( _searchInDescription ); - vLayout->addWidget(_searchInDescription); - - vLayout->addStretch(); - - // Intentionally NOT marking RPM tags for translation - _searchInProvides = new QCheckBox( "RPM \"&Provides\"" , gbox ); Q_CHECK_PTR( _searchInProvides ); - vLayout->addWidget(_searchInProvides); - _searchInRequires = new QCheckBox( "RPM \"Re&quires\"" , gbox ); Q_CHECK_PTR( _searchInRequires ); - vLayout->addWidget(_searchInRequires); - - _searchInFileList = new QCheckBox( _( "File list" ), gbox ); Q_CHECK_PTR( _searchInFileList ); - vLayout->addWidget(_searchInFileList); - - - _searchInName->setChecked( true ); - _searchInSummary->setChecked( true ); - - layout->addStretch(); - - - // - // Search mode - // - - label = new QLabel( _( "Search &Mode:" ), this ); - Q_CHECK_PTR( label ); - layout->addWidget( label ); - - _searchMode = new QComboBox( this ); - Q_CHECK_PTR( _searchMode ); - layout->addWidget( _searchMode ); - - _searchMode->setEditable( false ); - - label->setBuddy( _searchMode ); - - // Caution: combo box items must be inserted in the same order as enum SearchMode! - _searchMode->addItem( _( "Contains" ) ); - _searchMode->addItem( _( "Begins with" ) ); - _searchMode->addItem( _( "Exact Match" ) ); - _searchMode->addItem( _( "Use Wild Cards" ) ); - _searchMode->addItem( _( "Use Regular Expression" ) ); - - _searchMode->setCurrentIndex( Contains ); - - - layout->addStretch(); - - _caseSensitive = new QCheckBox( _( "Case Sensiti&ve" ), this ); - Q_CHECK_PTR( _caseSensitive ); - layout->addWidget(_caseSensitive); - - for ( int i=0; i < 6; i++ ) - layout->addStretch(); -} - - -YQPkgSearchFilterView::~YQPkgSearchFilterView() -{ - // NOP -} - - -void -YQPkgSearchFilterView::keyPressEvent( QKeyEvent * event ) -{ - if ( event ) - { - if ( event->modifiers() == Qt::NoModifier ) // No Ctrl / Alt / Shift etc. pressed - { - if ( event->key() == Qt::Key_Return || - event->key() == Qt::Key_Enter ) - { - _searchButton->animateClick(); - return; - } - } - - } - - QWidget::keyPressEvent( event ); -} - - -void -YQPkgSearchFilterView::setFocus() -{ - _searchText->setFocus(); -} - - -QSize -YQPkgSearchFilterView::minimumSizeHint() const -{ - return QSize( 0, 0 ); -} - - -void -YQPkgSearchFilterView::filterIfVisible() -{ - if ( isVisible() ) - filter(); -} - - -void -YQPkgSearchFilterView::filter() -{ - emit filterStart(); - _matchCount = 0; - - try - { - if ( ! _searchText->currentText().isEmpty() ) - { - // Create a progress dialog that is only displayed if the search takes - // longer than a couple of seconds ( default: 4 ). - - - zypp::PoolQuery query; - query.addKind(zypp::ResKind::package); - - string searchtext = _searchText->currentText().toUtf8().data(); - - QProgressDialog progress( _( "Searching..." ), // text - _( "&Cancel" ), // cancelButtonLabel - 0, - 1000, - this // parent - ); - progress.setWindowTitle( "" ); - progress.setMinimumDuration( 1500 ); // millisec - - // HACK, this should go to YQPackageSelector - parentWidget()->parentWidget()->setCursor(Qt::WaitCursor); - progress.setCursor(Qt::ArrowCursor); - - QTime timer; - query.setCaseSensitive( _caseSensitive->isChecked() ); - - switch ( _searchMode->currentIndex() ) - { - case Contains: - query.setMatchSubstring(); - break; - case BeginsWith: - query.setMatchRegex(); - searchtext = "^" + searchtext; - break; - case ExactMatch: - break; - case UseWildcards: - query.setMatchGlob(); - break; - case UseRegExp: - query.setMatchRegex(); - break; - - // Intentionally omitting "default" branch - let gcc watch for unhandled enums - } - - query.addString( searchtext ); - - if ( _searchInName->isChecked() ) query.addAttribute( zypp::sat::SolvAttr::name ); - if ( _searchInDescription->isChecked() ) query.addAttribute( zypp::sat::SolvAttr::description ); - if ( _searchInSummary->isChecked() ) query.addAttribute( zypp::sat::SolvAttr::summary ); - if ( _searchInRequires->isChecked() ) query.addAttribute( zypp::sat::SolvAttr("solvable:requires") ); - if ( _searchInProvides->isChecked() ) query.addAttribute( zypp::sat::SolvAttr("solvable:provides") ); - if ( _searchInFileList->isChecked() ) - { - query.addAttribute( zypp::sat::SolvAttr::filelist ); - query.matchFiles(); - } - - // always look in keywords so FATE #120368 is implemented - // but make this configurable later - query.addAttribute( zypp::sat::SolvAttr::keywords ); - - _searchText->setEnabled(false); - _searchButton->setEnabled(false); - - timer.start(); - - int count = 0; - - for ( zypp::PoolQuery::Selectable_iterator it = query.selectableBegin(); - it != query.selectableEnd() && ! progress.wasCanceled(); - ++it ) - { - ZyppSel selectable = *it; - ZyppPkg zyppPkg = tryCastToZyppPkg( selectable->theObj() ); - - if ( zyppPkg ) - { - _matchCount++; - emit filterMatch( selectable, zyppPkg ); - } - - if ( progress.wasCanceled() ) - break; - - progress.setValue( count++ ); - - if ( timer.elapsed() > 300 ) // milisec - { - // Process events only every 300 milliseconds - this is very - // expensive since both the progress dialog and the package - // list change all the time, thus display updates are necessary - // each time. - - qApp->processEvents(); - timer.restart(); - } - } - - if ( _matchCount == 0 ) - emit message( _( "No Results." ) ); - } - } - catch ( const std::exception & exception ) - { - yuiWarning() << "CAUGHT zypp exception: " << exception.what() << endl; - - QMessageBox msgBox; - - // Translators: This is a (short) text indicating that something went - // wrong while searching for packages. At this point, it is not clear - // if it's a user error (e.g., syntax error in regular expression) or - // an internal error. But there is a "Details" button that will return - // the original (translated) error message. - - QString heading = _( "Query Error" ); - - if ( heading.length() < 25 ) // Avoid very narrow message boxes - { - QString blanks; - blanks.fill( ' ', 50 - heading.length() ); - heading += blanks; - } - - msgBox.setText( heading ); - msgBox.setIcon( QMessageBox::Warning ); - msgBox.setInformativeText( fromUTF8( exception.what() ) ); - msgBox.exec(); - } - - _searchText->setEnabled(true); - _searchButton->setEnabled(true); - parentWidget()->parentWidget()->setCursor(Qt::ArrowCursor); - - emit filterFinished(); -} - - -bool -YQPkgSearchFilterView::check( ZyppSel selectable, - ZyppObj zyppObj ) -{ - QRegExp regexp( _searchText->currentText() ); - regexp.setCaseSensitivity( _caseSensitive->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive ); - regexp.setPatternSyntax( (_searchMode->currentIndex() == UseWildcards) ? QRegExp::Wildcard : QRegExp::RegExp); - return check( selectable, zyppObj, regexp ); -} - - -bool -YQPkgSearchFilterView::check( ZyppSel selectable, - ZyppObj zyppObj, - const QRegExp & regexp ) -{ - if ( ! zyppObj ) - return false; - - bool match = - ( _searchInName->isChecked() && check( zyppObj->name(), regexp ) ) || - ( _searchInSummary->isChecked() && check( zyppObj->summary(), regexp ) ) || - ( _searchInDescription->isChecked() && check( zyppObj->description(), regexp ) ) || - ( _searchInProvides->isChecked() && check( zyppObj->dep( zypp::Dep::PROVIDES ), regexp ) ) || - ( _searchInRequires->isChecked() && check( zyppObj->dep( zypp::Dep::REQUIRES ), regexp ) ); - - if ( match ) - { - ZyppPkg zyppPkg = tryCastToZyppPkg( zyppObj ); - - if ( zyppPkg ) - { - _matchCount++; - emit filterMatch( selectable, zyppPkg ); - } - } - - return match; -} - - -bool -YQPkgSearchFilterView::check( const string & attribute, - const QRegExp & regexp ) -{ - QString att = fromUTF8( attribute ); - QString searchText = _searchText->currentText(); - bool match = false; - - switch ( _searchMode->currentIndex() ) - { - case Contains: - match = att.contains( searchText, _caseSensitive->isChecked() ? Qt::CaseSensitive : Qt::CaseInsensitive); - break; - - case BeginsWith: - match = att.startsWith( searchText ); // only case sensitive - break; - - case ExactMatch: - match = ( att == searchText ); - break; - - case UseWildcards: - case UseRegExp: - // Both cases differ in how the regexp is set up during initialization - match = att.contains( regexp ); - break; - - // Intentionally omitting "default" branch - let gcc watch for unhandled enums - } - - return match; -} - - -bool -YQPkgSearchFilterView::check( const zypp::Capabilities& capSet, const QRegExp & regexp ) -{ - for ( zypp::Capabilities::const_iterator it = capSet.begin(); - it != capSet.end(); - ++it ) - { - zypp::CapDetail cap( *it ); - - if ( cap.isSimple() && check( cap.name().asString(), regexp ) ) - { - // yuiDebug() << "Match for " << (*it).asString() << endl; - return true; - } - } - - return false; -} - -#include "YQPkgSearchFilterView.moc" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.15/VERSION.cmake new/yast2-qt-pkg-2.17.16/VERSION.cmake --- old/yast2-qt-pkg-2.17.15/VERSION.cmake 2008-10-31 17:57:58.000000000 +0100 +++ new/yast2-qt-pkg-2.17.16/VERSION.cmake 2008-11-07 14:52:05.000000000 +0100 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "17") -SET(VERSION_PATCH "15") +SET(VERSION_PATCH "16") ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de