[yast-commit] r67234 - in /trunk/qt-pkg/src: YQPackageSelector.cc YQPkgList.cc YQPkgObjList.cc YQPkgObjList.h YQPkgPatchList.cc
Author: tgoettlicher Date: Thu Jan 19 16:10:43 2012 New Revision: 67234 URL: http://svn.opensuse.org/viewcvs/yast?rev=67234&view=rev Log: fixed bnc#723151: Install all matching debuginfo packages" never finds anything-debuginfo-32bit fixed bnc#730007: When updating packages, + keyshortcut doesn't always work Modified: trunk/qt-pkg/src/YQPackageSelector.cc trunk/qt-pkg/src/YQPkgList.cc trunk/qt-pkg/src/YQPkgObjList.cc trunk/qt-pkg/src/YQPkgObjList.h trunk/qt-pkg/src/YQPkgPatchList.cc Modified: trunk/qt-pkg/src/YQPackageSelector.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPackageSelector.cc?rev=67234&r1=67233&r2=67234&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPackageSelector.cc (original) +++ trunk/qt-pkg/src/YQPackageSelector.cc Thu Jan 19 16:10:43 2012 @@ -696,6 +696,7 @@ _pkgMenu->addAction(_pkgList->actionSetCurrentKeepInstalled); _pkgMenu->addAction(_pkgList->actionSetCurrentDelete); _pkgMenu->addAction(_pkgList->actionSetCurrentUpdate); + _pkgMenu->addAction(_pkgList->actionSetCurrentUpdateForce); _pkgMenu->addAction(_pkgList->actionSetCurrentTaboo); _pkgMenu->addAction(_pkgList->actionShowCurrentSolverInfo); @@ -757,6 +758,7 @@ _patchMenu->addAction(_patchList->actionSetCurrentDelete); #endif _patchMenu->addAction(_patchList->actionSetCurrentUpdate); + _patchMenu->addAction(_patchList->actionSetCurrentUpdateForce); _patchMenu->addAction(_patchList->actionSetCurrentTaboo); _patchMenu->addSeparator(); @@ -809,7 +811,7 @@ this, SLOT( pkgExcludeDevelChanged( bool ) ), Qt::Key_F7 ); _showDevelAction->setCheckable(true); - _excludeDevelPkgs = new YQPkgObjList::ExcludeRule( _pkgList, QRegExp( ".*-devel(-\\d+bit)?$" ), _pkgList->nameCol() ); + _excludeDevelPkgs = new YQPkgObjList::ExcludeRule( _pkgList, QRegExp( ".*(\\d+bit)?-devel(-\\d+bit)?$" ), _pkgList->nameCol() ); YUI_CHECK_NEW( _excludeDevelPkgs ); _excludeDevelPkgs->enable( false ); @@ -817,7 +819,7 @@ _showDebugAction = _optionsMenu->addAction( _( "Show -&debuginfo/-debugsource Packages" ), this, SLOT( pkgExcludeDebugChanged( bool ) ), Qt::Key_F8 ); _showDebugAction->setCheckable(true); - _excludeDebugInfoPkgs = new YQPkgObjList::ExcludeRule( _pkgList, QRegExp( ".*-(debuginfo|debugsource)(-32bit)?$" ), _pkgList->nameCol() ); + _excludeDebugInfoPkgs = new YQPkgObjList::ExcludeRule( _pkgList, QRegExp( ".*(-\\d+bit)?-(debuginfo|debugsource)(-32bit)?$" ), _pkgList->nameCol() ); YUI_CHECK_NEW( _excludeDebugInfoPkgs ); _excludeDebugInfoPkgs->enable( false ); @@ -1610,7 +1612,7 @@ { QString name = (*it)->name().c_str(); - if ( name.endsWith( suffix ) ) + if ( name.endsWith( suffix ) || name.endsWith( suffix + "-32bit" ) ) { subPkgs[ name ] = *it; Modified: trunk/qt-pkg/src/YQPkgList.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgList.cc?rev=67234&r1=67233&r2=67234&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPkgList.cc (original) +++ trunk/qt-pkg/src/YQPkgList.cc Thu Jan 19 16:10:43 2012 @@ -482,6 +482,7 @@ _installedContextMenu->addAction(actionSetCurrentKeepInstalled); _installedContextMenu->addAction(actionSetCurrentDelete); _installedContextMenu->addAction(actionSetCurrentUpdate); + _installedContextMenu->addAction(actionSetCurrentUpdateForce); _installedContextMenu->addAction(actionSetCurrentProtected); _installedContextMenu->addAction(actionShowCurrentSolverInfo); Modified: trunk/qt-pkg/src/YQPkgObjList.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgObjList.cc?rev=67234&r1=67233&r2=67234&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPkgObjList.cc (original) +++ trunk/qt-pkg/src/YQPkgObjList.cc Thu Jan 19 16:10:43 2012 @@ -77,6 +77,7 @@ , actionSetCurrentKeepInstalled(0) , actionSetCurrentDelete(0) , actionSetCurrentUpdate(0) + , actionSetCurrentUpdateForce(0) , actionSetCurrentTaboo(0) , actionSetCurrentProtected(0) , actionShowCurrentSolverInfo(0) @@ -286,7 +287,7 @@ void -YQPkgObjList::setCurrentStatus( ZyppStatus newStatus, bool doSelectNextItem ) +YQPkgObjList::setCurrentStatus( ZyppStatus newStatus, bool doSelectNextItem, bool ifNewerOnly ) { QTreeWidgetItem * listViewItem = currentItem(); @@ -295,7 +296,7 @@ YQPkgObjListItem * item = dynamic_cast<YQPkgObjListItem *> (listViewItem); - if ( item && item->editable() && _editable ) + if ( item && item->editable() && _editable && ( item->candidateIsNewer() || !ifNewerOnly ) ) { if ( newStatus != item->status() ) { @@ -401,6 +402,10 @@ actionSetCurrentKeepInstalled = createAction( S_KeepInstalled, "[<], [-]" ); actionSetCurrentDelete = createAction( S_Del, "[-]" ); actionSetCurrentUpdate = createAction( S_Update, "[>], [+]" ); + actionSetCurrentUpdateForce = createAction( _( "Update unconditionally" ), statusIcon( S_Update, true ) ,statusIcon( S_Update, false ) , "", true ) ; + + + actionSetCurrentTaboo = createAction( S_Taboo, "[!]" ); actionSetCurrentProtected = createAction( S_Protected, "[*]" ); @@ -431,6 +436,7 @@ connect( actionSetCurrentKeepInstalled, SIGNAL( activated() ), this, SLOT( setCurrentKeepInstalled() ) ); connect( actionSetCurrentDelete, SIGNAL( activated() ), this, SLOT( setCurrentDelete() ) ); connect( actionSetCurrentUpdate, SIGNAL( activated() ), this, SLOT( setCurrentUpdate() ) ); + connect( actionSetCurrentUpdateForce, SIGNAL( activated() ), this, SLOT( setCurrentUpdateForce() ) ); connect( actionSetCurrentTaboo, SIGNAL( activated() ), this, SLOT( setCurrentTaboo() ) ); connect( actionSetCurrentProtected, SIGNAL( activated() ), this, SLOT( setCurrentProtected() ) ); connect( actionShowCurrentSolverInfo, SIGNAL( activated() ), this, SLOT( showCurrentSolverInfo() ) ); @@ -538,6 +544,7 @@ _installedContextMenu->addAction( actionSetCurrentKeepInstalled ); _installedContextMenu->addAction( actionSetCurrentDelete ); _installedContextMenu->addAction( actionSetCurrentUpdate ); + _installedContextMenu->addAction( actionSetCurrentUpdateForce ); _installedContextMenu->addAction( actionShowCurrentSolverInfo ); addAllInListSubMenu( _installedContextMenu ); @@ -605,6 +612,7 @@ actionSetCurrentKeepInstalled->setEnabled( true ); actionSetCurrentDelete->setEnabled( true ); actionSetCurrentUpdate->setEnabled( selectable->hasCandidateObj() ); + actionSetCurrentUpdateForce->setEnabled( selectable->hasCandidateObj() ); } else { @@ -616,6 +624,7 @@ actionSetCurrentKeepInstalled->setEnabled( false ); actionSetCurrentDelete->setEnabled( false ); actionSetCurrentUpdate->setEnabled( false ); + actionSetCurrentUpdateForce->setEnabled( false ); } actionShowCurrentSolverInfo->setEnabled( true ); } @@ -628,6 +637,7 @@ actionSetCurrentKeepInstalled->setEnabled( false ); actionSetCurrentDelete->setEnabled( false ); actionSetCurrentUpdate->setEnabled( false ); + actionSetCurrentUpdateForce->setEnabled( false ); actionSetCurrentProtected->setEnabled( false ); actionShowCurrentSolverInfo->setEnabled( false ); @@ -1104,6 +1114,7 @@ } + void YQPkgObjListItem::setStatus( ZyppStatus newStatus, bool sendSignals ) { Modified: trunk/qt-pkg/src/YQPkgObjList.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgObjList.h?rev=67234&r1=67233&r2=67234&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPkgObjList.h (original) +++ trunk/qt-pkg/src/YQPkgObjList.h Thu Jan 19 16:10:43 2012 @@ -119,7 +119,9 @@ * Automatically selects the next item if 'selectNextItem' is 'true'. **/ void setCurrentStatus( ZyppStatus newStatus, - bool selectNextItem = false ); + bool selectNextItem = false, + bool ifNewerOnly = false ); + /** * Show solver information about the current selected item @@ -262,7 +264,8 @@ void setCurrentDontInstall() { setCurrentStatus( S_NoInst ); } void setCurrentKeepInstalled() { setCurrentStatus( S_KeepInstalled ); } void setCurrentDelete() { setCurrentStatus( S_Del ); } - void setCurrentUpdate() { setCurrentStatus( S_Update ); } + void setCurrentUpdate() { setCurrentStatus( S_Update, false, true ); } + void setCurrentUpdateForce() { setCurrentStatus( S_Update ); } void setCurrentTaboo() { setCurrentStatus( S_Taboo ); } void setCurrentProtected() { setCurrentStatus( S_Protected ); } @@ -401,6 +404,7 @@ QAction * actionSetCurrentKeepInstalled; QAction * actionSetCurrentDelete; QAction * actionSetCurrentUpdate; + QAction * actionSetCurrentUpdateForce; QAction * actionSetCurrentTaboo; QAction * actionSetCurrentProtected; QAction * actionShowCurrentSolverInfo; @@ -498,6 +502,7 @@ **/ virtual void setStatus( ZyppStatus newStatus, bool sendSignals = true ); + /** * Set a status icon according to the package's status. **/ Modified: trunk/qt-pkg/src/YQPkgPatchList.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgPatchList.cc?rev=67234&r1=67233&r2=67234&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPkgPatchList.cc (original) +++ trunk/qt-pkg/src/YQPkgPatchList.cc Thu Jan 19 16:10:43 2012 @@ -407,6 +407,7 @@ #endif _installedContextMenu->addAction(actionSetCurrentUpdate); + _installedContextMenu->addAction(actionSetCurrentUpdateForce); _installedContextMenu->addAction(actionSetCurrentProtected); addAllInListSubMenu( _installedContextMenu ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
tgoettlicher@svn2.opensuse.org