1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQPkgUpdateProblemFilterView.cc
15 Author: Stefan Hundhammer <sh@suse.de>
17 Textdomain "packages-qt"
22 #define y2log_component "qt-pkg"
23 #include <ycp/y2log.h>
25 #include "YQPkgUpdateProblemFilterView.h"
29 #include <zypp/ZYppFactory.h>
30 #include <zypp/Resolver.h>
35 YQPkgUpdateProblemFilterView::YQPkgUpdateProblemFilterView( QWidget * parent )
36 : QTextBrowser( parent )
40 <h2>Update Problem</h2>\n\
42 <font color='blue'>\n\
43 The packages in this list cannot be updated automatically.\n\
46 <p>Possible reasons:</p>\n\
48 <li>They are obsoleted by other packages\n\
49 <li>There is no newer version to update to on any installation media\n\
50 <li>They are third-party packages\n\
54 Please choose manually what to do with them.\n\
55 The safest course of action is to delete them.\n\
63 YQPkgUpdateProblemFilterView::~YQPkgUpdateProblemFilterView()
69 YQPkgUpdateProblemFilterView::filterIfVisible()
77 YQPkgUpdateProblemFilterView::filter()
81 list<zypp::PoolItem_Ref> problemList = zypp::getZYpp()->resolver()->problematicUpdateItems();
83 for ( list<zypp::PoolItem_Ref>::const_iterator it = problemList.begin();
84 it != problemList.end();
87 ZyppPkg pkg = tryCastToZyppPkg( (*it).resolvable() );
91 ZyppSel sel = _selMapper.findZyppSel( pkg );
95 y2milestone( "Problematic package: %s-%s",
96 pkg->name().c_str(), pkg->edition().asString().c_str() );
98 emit filterMatch( sel, pkg );
104 emit filterFinished();
109 YQPkgUpdateProblemFilterView::haveProblematicPackages()
111 return ! zypp::getZYpp()->resolver()->problematicUpdateItems().empty();
115 #include "YQPkgUpdateProblemFilterView.moc"