Author: kmachalkova
Date: Fri Jun 12 13:10:16 2009
New Revision: 57544
URL: http://svn.opensuse.org/viewcvs/yast?rev=57544&view=rev
Log:
Filtering out groups that contain no modules
Modified:
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulegroupsmodel.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.h
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp?rev=57544&r1=57543&r2=57544&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp Fri Jun 12 13:10:16 2009
@@ -187,6 +187,17 @@
return d->desktop_files.size();
}
+bool YQDesktopFilesModel::removeRow(int row )
+{
+
+ QString key = d->desktop_files.value( row );
+ qDebug() << "removing empty " << key;
+ d->desktop_files.removeAt( row );
+
+ d->cache.remove( key );
+
+}
+
QModelIndex YQDesktopFilesModel::index( int row, int column, const QModelIndex & parent ) const
{
return createIndex(row, column);
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h?rev=57544&r1=57543&r2=57544&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h Fri Jun 12 13:10:16 2009
@@ -67,6 +67,7 @@
virtual int columnCount( const QModelIndex & parent ) const;
virtual int rowCount( const QModelIndex & parent ) const;
+ virtual bool removeRow ( int row );
virtual QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulegroupsmodel.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulegroupsmodel.cpp?rev=57544&r1=57543&r2=57544&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulegroupsmodel.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulegroupsmodel.cpp Fri Jun 12 13:10:16 2009
@@ -36,7 +36,7 @@
addIconPath("/usr/share/YaST2/theme/current/icons/32x32/apps");
addIconPath("/usr/share/icons/hicolor/32x32/apps");
reindex();
- addPersonalStuff();
+ //addPersonalStuff();
}
YQModuleGroupsModel::~YQModuleGroupsModel()
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp?rev=57544&r1=57543&r2=57544&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp (original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp Fri Jun 12 13:10:16 2009
@@ -36,11 +36,11 @@
}
YQModuleGroupsModel *groupsModel;
- QMap