Hello community,
here is the log from the commit of package yast2-qt-pkg
checked in at Mon Nov 3 14:38:24 CET 2008.
--------
--- yast2-qt-pkg/yast2-qt-pkg.changes 2008-10-24 18:27:27.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-qt-pkg/yast2-qt-pkg.changes 2008-10-31 17:58:23.776222000 +0100
@@ -1,0 +2,7 @@
+Fri Oct 31 17:56:00 CET 2008 - sh@suse.de
+
+- Fixed bnc #381981: Bad initial size for secondary filters in
+ "Repositories" filter view
+- V 2.17.5
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-qt-pkg-2.17.14.tar.bz2
New:
----
yast2-qt-pkg-2.17.15.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-qt-pkg.spec ++++++
--- /var/tmp/diff_new_pack.xU5186/_old 2008-11-03 14:38:15.000000000 +0100
+++ /var/tmp/diff_new_pack.xU5186/_new 2008-11-03 14:38:15.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-qt-pkg (Version 2.17.14)
+# spec file for package yast2-qt-pkg (Version 2.17.15)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -18,12 +18,12 @@
Name: yast2-qt-pkg
-Version: 2.17.14
+Version: 2.17.15
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-qt-pkg-2.17.14.tar.bz2
+Source0: yast2-qt-pkg-2.17.15.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,8 +82,12 @@
%_prefix/share/YaST2/images/*
%changelog
+* Fri Oct 31 2008 sh@suse.de
+- Fixed bnc #381981: Bad initial size for secondary filters in
+ "Repositories" filter view
+- V 2.17.5
* Fri Oct 24 2008 sh@suse.de
-- Fixed bnc # 403367: Crash when searching for invalid regex
+- 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
@@ -247,7 +251,7 @@
- allow disabling view of debuginfo and devel pkgs
(bnc #359155)
- 2.16.37
-* Fri Apr 18 2008 dmacvicar@suse.de
+* Thu Apr 17 2008 dmacvicar@suse.de
- don't reorder patterns when clicking
- enable tooltip for repositories and patterns
* Thu Apr 17 2008 dmacvicar@suse.de
++++++ yast2-qt-pkg-2.17.14.tar.bz2 -> yast2-qt-pkg-2.17.15.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.14/package/yast2-qt-pkg.changes new/yast2-qt-pkg-2.17.15/package/yast2-qt-pkg.changes
--- old/yast2-qt-pkg-2.17.14/package/yast2-qt-pkg.changes 2008-10-24 18:26:52.000000000 +0200
+++ new/yast2-qt-pkg-2.17.15/package/yast2-qt-pkg.changes 2008-10-31 17:57:58.000000000 +0100
@@ -1,7 +1,14 @@
-------------------------------------------------------------------
+Fri Oct 31 17:56:00 CET 2008 - sh@suse.de
+
+- Fixed bnc #381981: Bad initial size for secondary filters in
+ "Repositories" filter view
+- V 2.17.5
+
+-------------------------------------------------------------------
Fri Oct 24 18:25:17 CEST 2008 - sh@suse.de
-- Fixed bnc # 403367: Crash when searching for invalid regex
+- Fixed bnc #403367: Crash when searching for invalid regex
- V 2.17.4
-------------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.14/src/YQPkgRepoFilterView.cc new/yast2-qt-pkg-2.17.15/src/YQPkgRepoFilterView.cc
--- old/yast2-qt-pkg-2.17.14/src/YQPkgRepoFilterView.cc 2008-10-24 18:26:52.000000000 +0200
+++ new/yast2-qt-pkg-2.17.15/src/YQPkgRepoFilterView.cc 2008-10-31 17:57:58.000000000 +0100
@@ -20,15 +20,15 @@
#define YUILogComponent "qt-pkg"
-#include "YUILog.h"
+#include
+#include
-#include
+#include <QVBoxLayout>
+#include <QSplitter>
+#include <QFrame>
#include "QY2ComboTabWidget.h"
#include "QY2LayoutUtils.h"
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QFrame>
#include "YQPkgRepoFilterView.h"
#include "YQPkgRepoList.h"
#include "YQPkgRpmGroupTagsFilterView.h"
@@ -36,6 +36,7 @@
#include "YQPkgStatusFilterView.h"
#include "YQi18n.h"
+
YQPkgRepoFilterView::YQPkgRepoFilterView( QWidget * parent )
: QWidget( parent )
{
@@ -43,14 +44,14 @@
layout->setContentsMargins(0,0,0,0);
QSplitter * splitter = new QSplitter( Qt::Vertical, this );
- Q_CHECK_PTR( splitter );
+ YUI_CHECK_NEW( splitter );
layout->addWidget( splitter );
_repoList = new YQPkgRepoList( this );
splitter->addWidget(_repoList);
- Q_CHECK_PTR( _repoList );
+ YUI_CHECK_NEW( _repoList );
_repoList->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Expanding ) );// hor/vert
// Directly propagate signals filterStart() and filterFinished()
@@ -90,12 +91,14 @@
QWidget *
YQPkgRepoFilterView::layoutSecondaryFilters( QWidget * parent )
{
- QWidget *vbox = new QWidget(parent);
- Q_CHECK_PTR( vbox );
+ QWidget *vbox = new QWidget( parent );
+ YUI_CHECK_NEW( vbox );
QVBoxLayout *layout = new QVBoxLayout();
- vbox->setLayout(layout);
- layout->setContentsMargins(0,0,0,0);
+ YUI_CHECK_NEW( layout );
+
+ 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
@@ -105,25 +108,23 @@
// few cases where a combo box label is left to the combo box rather than
// above it.
_secondaryFilters = new QY2ComboTabWidget( _( "&Secondary Filter:" ));
+ YUI_CHECK_NEW( _secondaryFilters );
layout->addWidget(_secondaryFilters);
- Q_CHECK_PTR( _secondaryFilters );
-
//
// All Packages
//
_allPackages = new QWidget( this );
- layout->addWidget(_allPackages);
- Q_CHECK_PTR( _allPackages );
+ YUI_CHECK_NEW( _allPackages );
_secondaryFilters->addPage( _( "All Packages" ), _allPackages );
- // unmaintaned packages (packages that are not provided in any of
- // the configured repositories)
+
+ // Unmaintaned packages: Packages that are not provided in any of
+ // the configured repositories
_unmaintainedPackages = new QWidget( this );
- layout->addWidget(_unmaintainedPackages);
- Q_CHECK_PTR( _unmaintainedPackages );
+ YUI_CHECK_NEW( _unmaintainedPackages );
_secondaryFilters->addPage( _( "Unmaintained Packages" ), _unmaintainedPackages );
//
@@ -131,22 +132,22 @@
//
_rpmGroupTagsFilterView = new YQPkgRpmGroupTagsFilterView( this );
- layout->addWidget(_rpmGroupTagsFilterView);
-
- Q_CHECK_PTR( _rpmGroupTagsFilterView );
+ YUI_CHECK_NEW( _rpmGroupTagsFilterView );
_secondaryFilters->addPage( _( "Package Groups" ), _rpmGroupTagsFilterView );
connect( _rpmGroupTagsFilterView, SIGNAL( filterStart() ),
- _repoList, SLOT ( filter() ) );
+ _repoList, SLOT ( filter() ) );
//
// Package search view
//
- _searchFilterView = new YQPkgSearchFilterView(this);
- layout->addWidget(_searchFilterView);
- Q_CHECK_PTR( _searchFilterView );
+ _searchFilterView = new YQPkgSearchFilterView( this );
+ YUI_CHECK_NEW( _searchFilterView );
+
+ _searchFilterView->setSizePolicy( QSizePolicy::Minimum, // horizontal
+ QSizePolicy::Minimum ); // vertical
_secondaryFilters->addPage( _( "Search" ), _searchFilterView );
connect( _searchFilterView, SIGNAL( filterStart() ),
@@ -161,7 +162,11 @@
//
_statusFilterView = new YQPkgStatusFilterView( parent );
- Q_CHECK_PTR( _statusFilterView );
+ YUI_CHECK_NEW( _statusFilterView );
+
+ _searchFilterView->setSizePolicy( QSizePolicy::Minimum, // horizontal
+ QSizePolicy::Minimum ); // vertical
+
_secondaryFilters->addPage( _( "Installation Summary" ), _statusFilterView );
connect( _statusFilterView, SIGNAL( filterStart() ),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.14/src/YQPkgRepoFilterView.cc.bak new/yast2-qt-pkg-2.17.15/src/YQPkgRepoFilterView.cc.bak
--- old/yast2-qt-pkg-2.17.14/src/YQPkgRepoFilterView.cc.bak 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-qt-pkg-2.17.15/src/YQPkgRepoFilterView.cc.bak 2008-10-31 17:57:58.000000000 +0100
@@ -0,0 +1,238 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: YQPkgRepoFilterView.cc
+
+ Author: Stefan Hundhammer
+
+ Textdomain "qt-pkg"
+
+/-*/
+
+
+#define YUILogComponent "qt-pkg"
+#include "YUILog.h"
+
+#include
+
+#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.14/src/YQPkgSearchFilterView.cc new/yast2-qt-pkg-2.17.15/src/YQPkgSearchFilterView.cc
--- old/yast2-qt-pkg-2.17.14/src/YQPkgSearchFilterView.cc 2008-10-24 18:26:52.000000000 +0200
+++ new/yast2-qt-pkg-2.17.15/src/YQPkgSearchFilterView.cc 2008-10-31 17:57:58.000000000 +0100
@@ -49,20 +49,21 @@
YQPkgSearchFilterView::YQPkgSearchFilterView( QWidget * parent )
: QWidget( parent )
{
- QVBoxLayout *layout = new QVBoxLayout;
- setLayout(layout);
+ QVBoxLayout * layout = new QVBoxLayout;
+ YUI_CHECK_NEW( layout );
+ setLayout( layout );
_matchCount = 0;
layout->addStretch();
// Headline
QLabel * label = new QLabel( _( "Searc&h:" ), this );
- Q_CHECK_PTR( label );
+ YUI_CHECK_NEW( label );
layout->addWidget(label);
label->setFont( YQUI::yqApp()->headingFont() );
// Input field ( combo box ) for search text
_searchText = new QComboBox( this );
- Q_CHECK_PTR( _searchText );
+ YUI_CHECK_NEW( _searchText );
layout->addWidget(_searchText);
_searchText->setEditable( true );
label->setBuddy( _searchText );
@@ -70,13 +71,13 @@
// Box for search button
QHBoxLayout * hbox = new QHBoxLayout();
- Q_CHECK_PTR( hbox );
+ YUI_CHECK_NEW( hbox );
layout->addLayout(hbox);
hbox->addStretch();
// Search button
_searchButton = new QPushButton( _( "&Search" ), this );
- Q_CHECK_PTR( _searchButton );
+ YUI_CHECK_NEW( _searchButton );
hbox->addWidget(_searchButton);
connect( _searchButton, SIGNAL( clicked() ),
@@ -89,27 +90,27 @@
//
QGroupBox * gbox = new QGroupBox( _( "Search in" ), this );
- Q_CHECK_PTR( gbox );
+ YUI_CHECK_NEW( gbox );
layout->addWidget( gbox );
QVBoxLayout *vLayout = new QVBoxLayout;
gbox->setLayout( vLayout );
- _searchInName = new QCheckBox( _( "&Name" ), gbox ); Q_CHECK_PTR( _searchInName );
+ _searchInName = new QCheckBox( _( "&Name" ), gbox ); YUI_CHECK_NEW( _searchInName );
vLayout->addWidget(_searchInName);
- _searchInSummary = new QCheckBox( _( "Su&mmary" ), gbox ); Q_CHECK_PTR( _searchInSummary );
+ _searchInSummary = new QCheckBox( _( "Su&mmary" ), gbox ); YUI_CHECK_NEW( _searchInSummary );
vLayout->addWidget(_searchInSummary);
- _searchInDescription = new QCheckBox( _( "Descr&iption" ), gbox ); Q_CHECK_PTR( _searchInDescription );
+ _searchInDescription = new QCheckBox( _( "Descr&iption" ), gbox ); YUI_CHECK_NEW( _searchInDescription );
vLayout->addWidget(_searchInDescription);
vLayout->addStretch();
// Intentionally NOT marking RPM tags for translation
- _searchInProvides = new QCheckBox( "RPM \"&Provides\"" , gbox ); Q_CHECK_PTR( _searchInProvides );
+ _searchInProvides = new QCheckBox( "RPM \"&Provides\"" , gbox ); YUI_CHECK_NEW( _searchInProvides );
vLayout->addWidget(_searchInProvides);
- _searchInRequires = new QCheckBox( "RPM \"Re&quires\"" , gbox ); Q_CHECK_PTR( _searchInRequires );
+ _searchInRequires = new QCheckBox( "RPM \"Re&quires\"" , gbox ); YUI_CHECK_NEW( _searchInRequires );
vLayout->addWidget(_searchInRequires);
- _searchInFileList = new QCheckBox( _( "File list" ), gbox ); Q_CHECK_PTR( _searchInFileList );
+ _searchInFileList = new QCheckBox( _( "File list" ), gbox ); YUI_CHECK_NEW( _searchInFileList );
vLayout->addWidget(_searchInFileList);
@@ -124,11 +125,11 @@
//
label = new QLabel( _( "Search &Mode:" ), this );
- Q_CHECK_PTR( label );
+ YUI_CHECK_NEW( label );
layout->addWidget( label );
_searchMode = new QComboBox( this );
- Q_CHECK_PTR( _searchMode );
+ YUI_CHECK_NEW( _searchMode );
layout->addWidget( _searchMode );
_searchMode->setEditable( false );
@@ -148,7 +149,7 @@
layout->addStretch();
_caseSensitive = new QCheckBox( _( "Case Sensiti&ve" ), this );
- Q_CHECK_PTR( _caseSensitive );
+ YUI_CHECK_NEW( _caseSensitive );
layout->addWidget(_caseSensitive);
for ( int i=0; i < 6; i++ )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-pkg-2.17.14/src/YQPkgSearchFilterView.cc.bak new/yast2-qt-pkg-2.17.15/src/YQPkgSearchFilterView.cc.bak
--- old/yast2-qt-pkg-2.17.14/src/YQPkgSearchFilterView.cc.bak 2008-10-24 18:26:52.000000000 +0200
+++ new/yast2-qt-pkg-2.17.15/src/YQPkgSearchFilterView.cc.bak 2008-10-31 17:57:58.000000000 +0100
@@ -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.14/VERSION.cmake new/yast2-qt-pkg-2.17.15/VERSION.cmake
--- old/yast2-qt-pkg-2.17.14/VERSION.cmake 2008-10-24 18:26:52.000000000 +0200
+++ new/yast2-qt-pkg-2.17.15/VERSION.cmake 2008-10-31 17:57:58.000000000 +0100
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "17")
-SET(VERSION_PATCH "14")
+SET(VERSION_PATCH "15")
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org