Hello community,
here is the log from the commit of package yast2-qt-pkg
checked in at Sat Oct 25 11:20:27 CEST 2008.
--------
--- yast2-qt-pkg/yast2-qt-pkg.changes 2008-10-21 16:04:20.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-qt-pkg/yast2-qt-pkg.changes 2008-10-24 18:27:27.779111000 +0200
@@ -1,0 +2,6 @@
+Fri Oct 24 18:25:17 CEST 2008 - sh@suse.de
+
+- Fixed bnc # 403367: Crash when searching for invalid regex
+- V 2.17.4
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-qt-pkg-2.17.13.tar.bz2
New:
----
yast2-qt-pkg-2.17.14.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-qt-pkg.spec ++++++
--- /var/tmp/diff_new_pack.X17405/_old 2008-10-25 11:20:11.000000000 +0200
+++ /var/tmp/diff_new_pack.X17405/_new 2008-10-25 11:20:11.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-qt-pkg (Version 2.17.13)
+# spec file for package yast2-qt-pkg (Version 2.17.14)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -18,12 +18,12 @@
Name: yast2-qt-pkg
-Version: 2.17.13
+Version: 2.17.14
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-qt-pkg-2.17.13.tar.bz2
+Source0: yast2-qt-pkg-2.17.14.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,9 @@
%_prefix/share/YaST2/images/*
%changelog
+* Fri Oct 24 2008 sh@suse.de
+- Fixed bnc # 403367: Crash when searching for invalid regex
+- V 2.17.4
* Tue Oct 21 2008 sh@suse.de
- Fixed bnc #436783: Map Amusements/Teaching/* to Education
- De-obfuscated RPM groups <--> PackageKit mapping
++++++ yast2-qt-pkg-2.17.13.tar.bz2 -> yast2-qt-pkg-2.17.14.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.13/package/yast2-qt-pkg.changes new/yast2-qt-pkg-2.17.14/package/yast2-qt-pkg.changes
--- old/yast2-qt-pkg-2.17.13/package/yast2-qt-pkg.changes 2008-10-21 16:04:19.000000000 +0200
+++ new/yast2-qt-pkg-2.17.14/package/yast2-qt-pkg.changes 2008-10-24 18:26:52.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Oct 24 18:25:17 CEST 2008 - sh@suse.de
+
+- Fixed bnc # 403367: Crash when searching for invalid regex
+- V 2.17.4
+
+-------------------------------------------------------------------
Tue Oct 21 15:59:49 CEST 2008 - sh@suse.de
- Fixed bnc #436783: Map Amusements/Teaching/* to Education
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.13/src/YQPkgRpmGroupTagsFilterView.cc new/yast2-qt-pkg-2.17.14/src/YQPkgRpmGroupTagsFilterView.cc
--- old/yast2-qt-pkg-2.17.13/src/YQPkgRpmGroupTagsFilterView.cc 2008-10-21 16:04:19.000000000 +0200
+++ new/yast2-qt-pkg-2.17.14/src/YQPkgRpmGroupTagsFilterView.cc 2008-10-24 18:26:52.000000000 +0200
@@ -37,39 +37,39 @@
{
switch ( group )
{
- case PK_GROUP_ENUM_ACCESSIBILITY: return _( "Accessibility" );
- case PK_GROUP_ENUM_ACCESSORIES: return _( "Accessories" );
- case PK_GROUP_ENUM_EDUCATION: return _( "Education" );
- case PK_GROUP_ENUM_GAMES: return _( "Games" );
- case PK_GROUP_ENUM_GRAPHICS: return _( "Graphics" );
- case PK_GROUP_ENUM_INTERNET: return _( "Internet" );
- case PK_GROUP_ENUM_OFFICE: return _( "Office" );
- case PK_GROUP_ENUM_OTHER: return _( "Other" );
- case PK_GROUP_ENUM_PROGRAMMING: return _( "Programming" );
- case PK_GROUP_ENUM_MULTIMEDIA: return _( "Multimedia" );
- case PK_GROUP_ENUM_SYSTEM: return _( "System" );
- case PK_GROUP_ENUM_DESKTOP_GNOME: return _( "GNOME Desktop" );
- case PK_GROUP_ENUM_DESKTOP_KDE: return _( "KDE Desktop" );
- case PK_GROUP_ENUM_DESKTOP_XFCE: return _( "XFCE Desktop" );
- case PK_GROUP_ENUM_DESKTOP_OTHER: return _( "Other Desktops" );
- case PK_GROUP_ENUM_PUBLISHING: return _( "Publishing" );
- case PK_GROUP_ENUM_SERVERS: return _( "Servers" );
- case PK_GROUP_ENUM_FONTS: return _( "Fonts" );
- case PK_GROUP_ENUM_ADMIN_TOOLS: return _( "Admin Tools" );
- case PK_GROUP_ENUM_LEGACY: return _( "Legacy" );
- case PK_GROUP_ENUM_LOCALIZATION: return _( "Localization" );
- case PK_GROUP_ENUM_VIRTUALIZATION: return _( "Virtualization" );
- case PK_GROUP_ENUM_SECURITY: return _( "Security" );
- case PK_GROUP_ENUM_POWER_MANAGEMENT: return _( "Power Management" );
- case PK_GROUP_ENUM_COMMUNICATION: return _( "Communication" );
- case PK_GROUP_ENUM_NETWORK: return _( "Network" );
- case PK_GROUP_ENUM_MAPS: return _( "Maps" );
- case PK_GROUP_ENUM_REPOS: return _( "Software Sources" );
- case PK_GROUP_ENUM_UNKNOWN: return _( "Unknown Group" );
-
- case YPKG_GROUP_ALL: return _( "All Packages" );
- case YPKG_GROUP_SUGGESTED: return _( "Suggested Packages" );
- case YPKG_GROUP_RECOMMENDED: return _( "Recommended Packages");
+ case PK_GROUP_ENUM_ACCESSIBILITY: return _( "Accessibility" );
+ case PK_GROUP_ENUM_ACCESSORIES: return _( "Accessories" );
+ case PK_GROUP_ENUM_EDUCATION: return _( "Education" );
+ case PK_GROUP_ENUM_GAMES: return _( "Games" );
+ case PK_GROUP_ENUM_GRAPHICS: return _( "Graphics" );
+ case PK_GROUP_ENUM_INTERNET: return _( "Internet" );
+ case PK_GROUP_ENUM_OFFICE: return _( "Office" );
+ case PK_GROUP_ENUM_OTHER: return _( "Other" );
+ case PK_GROUP_ENUM_PROGRAMMING: return _( "Programming" );
+ case PK_GROUP_ENUM_MULTIMEDIA: return _( "Multimedia" );
+ case PK_GROUP_ENUM_SYSTEM: return _( "System" );
+ case PK_GROUP_ENUM_DESKTOP_GNOME: return _( "GNOME Desktop" );
+ case PK_GROUP_ENUM_DESKTOP_KDE: return _( "KDE Desktop" );
+ case PK_GROUP_ENUM_DESKTOP_XFCE: return _( "XFCE Desktop" );
+ case PK_GROUP_ENUM_DESKTOP_OTHER: return _( "Other Desktops" );
+ case PK_GROUP_ENUM_PUBLISHING: return _( "Publishing" );
+ case PK_GROUP_ENUM_SERVERS: return _( "Servers" );
+ case PK_GROUP_ENUM_FONTS: return _( "Fonts" );
+ case PK_GROUP_ENUM_ADMIN_TOOLS: return _( "Admin Tools" );
+ case PK_GROUP_ENUM_LEGACY: return _( "Legacy" );
+ case PK_GROUP_ENUM_LOCALIZATION: return _( "Localization" );
+ case PK_GROUP_ENUM_VIRTUALIZATION: return _( "Virtualization" );
+ case PK_GROUP_ENUM_SECURITY: return _( "Security" );
+ case PK_GROUP_ENUM_POWER_MANAGEMENT: return _( "Power Management" );
+ case PK_GROUP_ENUM_COMMUNICATION: return _( "Communication" );
+ case PK_GROUP_ENUM_NETWORK: return _( "Network" );
+ case PK_GROUP_ENUM_MAPS: return _( "Maps" );
+ case PK_GROUP_ENUM_REPOS: return _( "Software Sources" );
+ case PK_GROUP_ENUM_UNKNOWN: return _( "Unknown Group" );
+
+ case YPKG_GROUP_ALL: return _( "All Packages" );
+ case YPKG_GROUP_SUGGESTED: return _( "Suggested Packages" );
+ case YPKG_GROUP_RECOMMENDED: return _( "Recommended Packages");
// Intentionally omitting 'default' case so gcc can catch unhandled enums
}
@@ -112,9 +112,9 @@
case PK_GROUP_ENUM_MAPS: return( "package_main" );
case PK_GROUP_ENUM_REPOS: return( "package_main" );
case PK_GROUP_ENUM_UNKNOWN: return( "package_main" );
-
- case YPKG_GROUP_SUGGESTED: return( "package_edutainment_languages" );
- case YPKG_GROUP_RECOMMENDED: return( "package_edutainment_languages" );
+
+ case YPKG_GROUP_SUGGESTED: return( "package_edutainment_languages" );
+ case YPKG_GROUP_RECOMMENDED: return( "package_edutainment_languages" );
case YPKG_GROUP_ALL: return( "package_main" );
// Intentionally omitting 'default' case so gcc can catch unhandled enums
@@ -127,9 +127,9 @@
YPkgGroupEnum
rpmGroupToPackageKitGroup( const string & rpmGroup )
{
- string group = zypp::str::toLower( rpmGroup );
+ string group = zypp::str::toLower( rpmGroup );
- if ( group.find( "amusements/teaching" ) != string::npos ) return PK_GROUP_ENUM_EDUCATION;
+ if ( group.find( "amusements/teaching" ) != string::npos ) return PK_GROUP_ENUM_EDUCATION;
if ( group.find( "amusements" ) != string::npos ) return PK_GROUP_ENUM_GAMES;
if ( group.find( "development" ) != string::npos ) return PK_GROUP_ENUM_PROGRAMMING;
if ( group.find( "hardware" ) != string::npos ) return PK_GROUP_ENUM_SYSTEM;
@@ -164,15 +164,15 @@
YQPkgRpmGroupTagsFilterView::YQPkgRpmGroupTagsFilterView( QWidget * parent )
: QTreeWidget( parent )
, _selectedGroup(YPKG_GROUP_ALL)
-{
+{
setIconSize(QSize(32,32));
setHeaderLabels( QStringList(_( "Package Groups" )) );
setRootIsDecorated( false );
setSortingEnabled( true );
- connect( this, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
- this, SLOT ( slotSelectionChanged ( QTreeWidgetItem * ) ) );
+ connect( this, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
+ this, SLOT ( slotSelectionChanged ( QTreeWidgetItem * ) ) );
fillGroups();
-
+
selectSomething();
}
@@ -187,34 +187,34 @@
{
if ( _groupsMap.empty() )
{
- zypp::sat::LookupAttr rpmgroups( zypp::sat::SolvAttr::group );
- for ( zypp::sat::LookupAttr::iterator it = rpmgroups.begin();
- it != rpmgroups.end();
- ++it )
- {
- YPkgGroupEnum group;
- std::map::const_iterator itg = _groupsCache.find(it.asString());
- if ( itg == _groupsCache.end() )
- {
- group = rpmGroupToPackageKitGroup( it.asString() );
- _groupsCache[it.asString()] = group;
- }
- else
- {
- group = itg->second;
- }
-
- //std::cout << it.asString() << std::endl;
-
- if ( _groupsMap.find(group) == _groupsMap.end() )
- {
- _groupsMap[group] = new YQPkgRpmGroupTag( this, group );
- }
- }
-
- _groupsMap[ YPKG_GROUP_ALL ] = new YQPkgRpmGroupTag( this, YPKG_GROUP_ALL );
- _groupsMap[ YPKG_GROUP_RECOMMENDED ] = new YQPkgRpmGroupTag( this, YPKG_GROUP_RECOMMENDED );
- _groupsMap[ YPKG_GROUP_SUGGESTED ] = new YQPkgRpmGroupTag( this, YPKG_GROUP_SUGGESTED );
+ zypp::sat::LookupAttr rpmgroups( zypp::sat::SolvAttr::group );
+ for ( zypp::sat::LookupAttr::iterator it = rpmgroups.begin();
+ it != rpmgroups.end();
+ ++it )
+ {
+ YPkgGroupEnum group;
+ std::map::const_iterator itg = _groupsCache.find(it.asString());
+ if ( itg == _groupsCache.end() )
+ {
+ group = rpmGroupToPackageKitGroup( it.asString() );
+ _groupsCache[it.asString()] = group;
+ }
+ else
+ {
+ group = itg->second;
+ }
+
+ //std::cout << it.asString() << std::endl;
+
+ if ( _groupsMap.find(group) == _groupsMap.end() )
+ {
+ _groupsMap[group] = new YQPkgRpmGroupTag( this, group );
+ }
+ }
+
+ _groupsMap[ YPKG_GROUP_ALL ] = new YQPkgRpmGroupTag( this, YPKG_GROUP_ALL );
+ _groupsMap[ YPKG_GROUP_RECOMMENDED ] = new YQPkgRpmGroupTag( this, YPKG_GROUP_RECOMMENDED );
+ _groupsMap[ YPKG_GROUP_SUGGESTED ] = new YQPkgRpmGroupTag( this, YPKG_GROUP_SUGGESTED );
}
}
@@ -225,9 +225,9 @@
{
// FIXME
// QTreeWidgetItem * item = children().first();
-//
+//
// if ( item )
-// setCurrentItem(item);
+// setCurrentItem(item);
}
@@ -244,35 +244,35 @@
{
emit filterStart();
// yuiDebug() << "Filtering packages for RPM group \"" << selectedRpmGroup() << "\"" << endl;
-
+
if ( selection() )
{
- for ( ZyppPoolIterator it = zyppPkgBegin();
- it != zyppPkgEnd();
- ++it )
- {
- ZyppSel selectable = *it;
-
- // Multiple instances of this package may or may not be in the same
- // RPM group, so let's check both the installed version (if there
- // is any) and the candidate version.
- //
- // Make sure we emit only one filterMatch() signal if both exist
- // and both are in the same RPM group. We don't want multiple list
- // entries for the same package!
-
- bool match =
- check( selectable, tryCastToZyppPkg( selectable->candidateObj() ) ) ||
- check( selectable, tryCastToZyppPkg( selectable->installedObj() ) );
-
- // If there is neither an installed nor a candidate package, check
- // any other instance.
-
- if ( ! match &&
- ! selectable->candidateObj() &&
- ! selectable->installedObj() )
- check( selectable, tryCastToZyppPkg( selectable->theObj() ) );
- }
+ for ( ZyppPoolIterator it = zyppPkgBegin();
+ it != zyppPkgEnd();
+ ++it )
+ {
+ ZyppSel selectable = *it;
+
+ // Multiple instances of this package may or may not be in the same
+ // RPM group, so let's check both the installed version (if there
+ // is any) and the candidate version.
+ //
+ // Make sure we emit only one filterMatch() signal if both exist
+ // and both are in the same RPM group. We don't want multiple list
+ // entries for the same package!
+
+ bool match =
+ check( selectable, tryCastToZyppPkg( selectable->candidateObj() ) ) ||
+ check( selectable, tryCastToZyppPkg( selectable->installedObj() ) );
+
+ // If there is neither an installed nor a candidate package, check
+ // any other instance.
+
+ if ( ! match &&
+ ! selectable->candidateObj() &&
+ ! selectable->installedObj() )
+ check( selectable, tryCastToZyppPkg( selectable->theObj() ) );
+ }
}
emit filterFinished();
@@ -286,22 +286,22 @@
if ( sel )
{
- _selectedGroup = sel->group();
- // for the list of reccommended packages, we need
- // to solve first
- if ( _selectedGroup == YPKG_GROUP_SUGGESTED ||
- _selectedGroup == YPKG_GROUP_RECOMMENDED )
- {
- // set the busy cursor for the solving
- QApplication::setOverrideCursor(Qt::WaitCursor);
- zypp::getZYpp()->resolver()->resolvePool();
- QApplication::restoreOverrideCursor();
- }
-
+ _selectedGroup = sel->group();
+ // for the list of reccommended packages, we need
+ // to solve first
+ if ( _selectedGroup == YPKG_GROUP_SUGGESTED ||
+ _selectedGroup == YPKG_GROUP_RECOMMENDED )
+ {
+ // set the busy cursor for the solving
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ zypp::getZYpp()->resolver()->resolvePool();
+ QApplication::restoreOverrideCursor();
+ }
+
}
else
{
- _selectedGroup = YPKG_GROUP_ALL;
+ _selectedGroup = YPKG_GROUP_ALL;
}
filter();
@@ -317,32 +317,32 @@
if ( selection()->group() == YPKG_GROUP_ALL ) // Special case: All packages
{
- emit filterMatch( selectable, pkg );
- return true;
+ emit filterMatch( selectable, pkg );
+ return true;
}
YPkgGroupEnum groupn = rpmGroupToPackageKitGroup( pkg->group() );
-
+
if ( groupn == selectedGroup() )
{
- emit filterMatch( selectable, pkg );
- return true;
+ emit filterMatch( selectable, pkg );
+ return true;
}
if ( selectable->candidateObj() )
- {
- if ( selectedGroup() == YPKG_GROUP_RECOMMENDED &&
- zypp::PoolItem(pkg).status().isRecommended() )
- {
- emit filterMatch( selectable, pkg );
- return true;
- }
- if ( selectedGroup() == YPKG_GROUP_SUGGESTED &&
- zypp::PoolItem(pkg).status().isSuggested() )
- {
- emit filterMatch( selectable, pkg );
- return true;
- }
+ {
+ if ( selectedGroup() == YPKG_GROUP_RECOMMENDED &&
+ zypp::PoolItem(pkg).status().isRecommended() )
+ {
+ emit filterMatch( selectable, pkg );
+ return true;
+ }
+ if ( selectedGroup() == YPKG_GROUP_SUGGESTED &&
+ zypp::PoolItem(pkg).status().isSuggested() )
+ {
+ emit filterMatch( selectable, pkg );
+ return true;
+ }
}
return false;
@@ -355,7 +355,7 @@
QTreeWidgetItem * item = currentItem();
if ( ! item )
- return 0;
+ return 0;
return dynamic_cast ( item );
}
@@ -364,7 +364,7 @@
YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView * parentFilterView,
- YPkgGroupEnum group )
+ YPkgGroupEnum group )
: QTreeWidgetItem( parentFilterView )
, _filterView( parentFilterView )
, _group( group )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.13/src/YQPkgRpmGroupTagsFilterView.h new/yast2-qt-pkg-2.17.14/src/YQPkgRpmGroupTagsFilterView.h
--- old/yast2-qt-pkg-2.17.13/src/YQPkgRpmGroupTagsFilterView.h 2008-10-21 16:04:19.000000000 +0200
+++ new/yast2-qt-pkg-2.17.14/src/YQPkgRpmGroupTagsFilterView.h 2008-10-24 18:26:52.000000000 +0200
@@ -27,41 +27,49 @@
using std::string;
-typedef enum {
- /* PackageKit values */
- PK_GROUP_ENUM_ACCESSIBILITY,
- PK_GROUP_ENUM_ACCESSORIES,
- PK_GROUP_ENUM_EDUCATION,
- PK_GROUP_ENUM_GAMES,
- PK_GROUP_ENUM_GRAPHICS,
- PK_GROUP_ENUM_INTERNET,
- PK_GROUP_ENUM_OFFICE,
- PK_GROUP_ENUM_OTHER,
- PK_GROUP_ENUM_PROGRAMMING,
- PK_GROUP_ENUM_MULTIMEDIA,
- PK_GROUP_ENUM_SYSTEM,
- PK_GROUP_ENUM_DESKTOP_GNOME,
- PK_GROUP_ENUM_DESKTOP_KDE,
- PK_GROUP_ENUM_DESKTOP_XFCE,
- PK_GROUP_ENUM_DESKTOP_OTHER,
- PK_GROUP_ENUM_PUBLISHING,
- PK_GROUP_ENUM_SERVERS,
- PK_GROUP_ENUM_FONTS,
- PK_GROUP_ENUM_ADMIN_TOOLS,
- PK_GROUP_ENUM_LEGACY,
- PK_GROUP_ENUM_LOCALIZATION,
- PK_GROUP_ENUM_VIRTUALIZATION,
- PK_GROUP_ENUM_SECURITY,
- PK_GROUP_ENUM_POWER_MANAGEMENT,
- PK_GROUP_ENUM_COMMUNICATION,
- PK_GROUP_ENUM_NETWORK,
- PK_GROUP_ENUM_MAPS,
- PK_GROUP_ENUM_REPOS,
- PK_GROUP_ENUM_UNKNOWN,
- /* Other values */
- YPKG_GROUP_SUGGESTED,
- YPKG_GROUP_RECOMMENDED,
- YPKG_GROUP_ALL,
+typedef enum
+{
+ //
+ // PackageKit values
+ //
+
+ PK_GROUP_ENUM_ACCESSIBILITY,
+ PK_GROUP_ENUM_ACCESSORIES,
+ PK_GROUP_ENUM_EDUCATION,
+ PK_GROUP_ENUM_GAMES,
+ PK_GROUP_ENUM_GRAPHICS,
+ PK_GROUP_ENUM_INTERNET,
+ PK_GROUP_ENUM_OFFICE,
+ PK_GROUP_ENUM_OTHER,
+ PK_GROUP_ENUM_PROGRAMMING,
+ PK_GROUP_ENUM_MULTIMEDIA,
+ PK_GROUP_ENUM_SYSTEM,
+ PK_GROUP_ENUM_DESKTOP_GNOME,
+ PK_GROUP_ENUM_DESKTOP_KDE,
+ PK_GROUP_ENUM_DESKTOP_XFCE,
+ PK_GROUP_ENUM_DESKTOP_OTHER,
+ PK_GROUP_ENUM_PUBLISHING,
+ PK_GROUP_ENUM_SERVERS,
+ PK_GROUP_ENUM_FONTS,
+ PK_GROUP_ENUM_ADMIN_TOOLS,
+ PK_GROUP_ENUM_LEGACY,
+ PK_GROUP_ENUM_LOCALIZATION,
+ PK_GROUP_ENUM_VIRTUALIZATION,
+ PK_GROUP_ENUM_SECURITY,
+ PK_GROUP_ENUM_POWER_MANAGEMENT,
+ PK_GROUP_ENUM_COMMUNICATION,
+ PK_GROUP_ENUM_NETWORK,
+ PK_GROUP_ENUM_MAPS,
+ PK_GROUP_ENUM_REPOS,
+ PK_GROUP_ENUM_UNKNOWN,
+
+ //
+ // Other values
+ //
+
+ YPKG_GROUP_SUGGESTED,
+ YPKG_GROUP_RECOMMENDED,
+ YPKG_GROUP_ALL,
} YPkgGroupEnum;
class YQPkgRpmGroupTag;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.13/src/YQPkgSearchFilterView.cc new/yast2-qt-pkg-2.17.14/src/YQPkgSearchFilterView.cc
--- old/yast2-qt-pkg-2.17.13/src/YQPkgSearchFilterView.cc 2008-10-21 16:04:19.000000000 +0200
+++ new/yast2-qt-pkg-2.17.14/src/YQPkgSearchFilterView.cc 2008-10-24 18:26:52.000000000 +0200
@@ -28,11 +28,12 @@
#include <QProgressDialog>
#include <QDateTime>
#include <QKeyEvent>
+#include <QMessageBox>
-#include "zypp/PoolQuery.h"
+#include
#define YUILogComponent "qt-pkg"
-#include "YUILog.h"
+#include
#include "YQPackageSelector.h"
#include "YQPkgSearchFilterView.h"
@@ -89,27 +90,27 @@
QGroupBox * gbox = new QGroupBox( _( "Search in" ), this );
Q_CHECK_PTR( gbox );
- layout->addWidget(gbox);
- QVBoxLayout *vlayout = new QVBoxLayout;
- gbox->setLayout(vlayout);
+ layout->addWidget( gbox );
+ QVBoxLayout *vLayout = new QVBoxLayout;
+ gbox->setLayout( vLayout );
_searchInName = new QCheckBox( _( "&Name" ), gbox ); Q_CHECK_PTR( _searchInName );
- vlayout->addWidget(_searchInName);
+ vLayout->addWidget(_searchInName);
_searchInSummary = new QCheckBox( _( "Su&mmary" ), gbox ); Q_CHECK_PTR( _searchInSummary );
- vlayout->addWidget(_searchInSummary);
+ vLayout->addWidget(_searchInSummary);
_searchInDescription = new QCheckBox( _( "Descr&iption" ), gbox ); Q_CHECK_PTR( _searchInDescription );
- vlayout->addWidget(_searchInDescription);
+ vLayout->addWidget(_searchInDescription);
- vlayout->addStretch();
+ vLayout->addStretch();
// Intentionally NOT marking RPM tags for translation
_searchInProvides = new QCheckBox( "RPM \"&Provides\"" , gbox ); Q_CHECK_PTR( _searchInProvides );
- vlayout->addWidget(_searchInProvides);
+ vLayout->addWidget(_searchInProvides);
_searchInRequires = new QCheckBox( "RPM \"Re&quires\"" , gbox ); Q_CHECK_PTR( _searchInRequires );
- vlayout->addWidget(_searchInRequires);
+ vLayout->addWidget(_searchInRequires);
- _searchInFileList = new QCheckBox( "File list" , gbox ); Q_CHECK_PTR( _searchInFileList );
- vlayout->addWidget(_searchInFileList);
+ _searchInFileList = new QCheckBox( _( "File list" ), gbox ); Q_CHECK_PTR( _searchInFileList );
+ vLayout->addWidget(_searchInFileList);
_searchInName->setChecked( true );
@@ -124,22 +125,22 @@
label = new QLabel( _( "Search &Mode:" ), this );
Q_CHECK_PTR( label );
- layout->addWidget(label);
+ layout->addWidget( label );
_searchMode = new QComboBox( this );
Q_CHECK_PTR( _searchMode );
- layout->addWidget(_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->addItem( _( "Contains" ) );
+ _searchMode->addItem( _( "Begins with" ) );
+ _searchMode->addItem( _( "Exact Match" ) );
+ _searchMode->addItem( _( "Use Wild Cards" ) );
+ _searchMode->addItem( _( "Use Regular Expression" ) );
_searchMode->setCurrentIndex( Contains );
@@ -151,7 +152,7 @@
layout->addWidget(_caseSensitive);
for ( int i=0; i < 6; i++ )
- layout->addStretch();
+ layout->addStretch();
}
@@ -210,113 +211,139 @@
emit filterStart();
_matchCount = 0;
- if ( ! _searchText->currentText().isEmpty() )
+ try
{
- // Create a progress dialog that is only displayed if the search takes
- // longer than a couple of seconds ( default: 4 ).
+ 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() );
+ 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);
- if ( zyppPkg )
- {
- _matchCount++;
- emit filterMatch( selectable, zyppPkg );
- }
-
- if ( progress.wasCanceled() )
- break;
-
- progress.setValue( count++ );
+ QTime timer;
+ query.setCaseSensitive( _caseSensitive->isChecked() );
- if ( timer.elapsed() > 300 ) // milisec
+ switch ( _searchMode->currentIndex() )
{
- // 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.
+ 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;
- qApp->processEvents();
- timer.restart();
+ // 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.
- if ( _matchCount == 0 )
- emit message( _( "No Results." ) );
+ 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);
@@ -326,6 +353,7 @@
emit filterFinished();
}
+
bool
YQPkgSearchFilterView::check( ZyppSel selectable,
ZyppObj zyppObj )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.13/src/YQPkgSearchFilterView.cc.bak new/yast2-qt-pkg-2.17.14/src/YQPkgSearchFilterView.cc.bak
--- old/yast2-qt-pkg-2.17.13/src/YQPkgSearchFilterView.cc.bak 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-qt-pkg-2.17.14/src/YQPkgSearchFilterView.cc.bak 2008-10-24 18:26:52.000000000 +0200
@@ -0,0 +1,424 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPkgSearchFilterView.cc
+
+ Author: Stefan Hundhammer
+
+ Textdomain "qt-pkg"
+
+/-*/
+
+#include <QCheckBox>
+#include <QComboBox>
+#include <QLabel>
+#include <QLayout>
+#include <QPushButton>
+#include <QRadioButton>
+#include <QGroupBox>
+#include <QProgressDialog>
+#include <QDateTime>
+#include <QKeyEvent>
+
+#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;
+
+ 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." ) );
+ }
+
+ _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.13/VERSION.cmake new/yast2-qt-pkg-2.17.14/VERSION.cmake
--- old/yast2-qt-pkg-2.17.13/VERSION.cmake 2008-10-21 16:04:19.000000000 +0200
+++ new/yast2-qt-pkg-2.17.14/VERSION.cmake 2008-10-24 18:26:52.000000000 +0200
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "17")
-SET(VERSION_PATCH "13")
+SET(VERSION_PATCH "14")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.13/yast2-qt-pkg.spec.in.bak new/yast2-qt-pkg-2.17.14/yast2-qt-pkg.spec.in.bak
--- old/yast2-qt-pkg-2.17.13/yast2-qt-pkg.spec.in.bak 2008-10-21 16:04:19.000000000 +0200
+++ new/yast2-qt-pkg-2.17.14/yast2-qt-pkg.spec.in.bak 1970-01-01 01:00:00.000000000 +0100
@@ -1,60 +0,0 @@
-@HEADERCOMMENT@
-
-
-@HEADER@
-BuildRequires: docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libxcrypt-devel
-BuildRequires: libxslt perl-XML-Writer libqt4-devel sgml-skel update-desktop-files
-
-Summary: -
-BuildRequires: yast2-devtools >= 2.16.3
-Requires: yast2-qt >= 2.17.13
-BuildRequires: yast2-qt-devel >= 2.17.13
-BuildRequires: libzypp-devel >= 4.7.0
-BuildRequires: yast2-libyui-devel >= 2.16.47
-Requires: libzypp >= 4.7.0
-Requires: yast2-libyui >= 2.16.47
-Requires: yast2_theme >= 2.16.1
-Provides: yast2-qt:/usr/lib/YaST2/plugin/libpy2qt_pkg.so.2
-Provides: yast2_ui_pkg
-Recommends: libqdialogsolver1
-
-%description
--
-
-%prep
-%setup
-
-%build
-mkdir build
-cd build
-export CFLAGS="$RPM_OPT_FLAGS"
-export CXXFLAGS="$CFLAGS"
-cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DLIB=%{_lib} \
-%if 0%{?sles_version}
- -DYPKG_QT_CONFIRM_UNSUPPORTED_PACKAGES=1 \
-%endif
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_SKIP_RPATH=1 \
- ..
-make %{?jobs:-j %jobs} VERBOSE=1
-
-%install
-cd build
-make install DESTDIR=$RPM_BUILD_ROOT
-cd ..
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-
-%files
-%defattr (-, root, root)
-%doc COPYING
-%_libdir/YaST2/plugin/libpy2qt_pkg.so.*
-%_libdir/YaST2/plugin/libpy2qt_pkg.so
-
-%dir %_prefix/share/YaST2/images
-%_prefix/share/YaST2/images/*
-
-%changelog
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org