[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/nepomuk/services/backupsync/gui
From: Vishesh Handa <handa.vish () gmail ! com>
Date: 2010-11-24 13:11:33
Message-ID: 20101124131133.4C1ADAC8A2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1200254 by vhanda:
More fixes on the IdentifierModel - Fixed row count
M +7 -0 guitest/testwidget.cpp
M +4 -8 identifiermodel.cpp
--- trunk/KDE/kdebase/runtime/nepomuk/services/backupsync/gui/guitest/testwidget.cpp \
#1200253:1200254 @@ -56,5 +56,12 @@
m_model->debug_notIdentified( "nepomuk:/res/4", "/home/vishesh/file2" );
m_model->debug_notIdentified( "nepomuk:/res/5", "/home/vishesh/folder/fol-file1" \
);
m_model->debug_notIdentified( "nepomuk:/res/6", "/home/vishesh/folder/fol-file2" \
); +
+ m_model->debug_notIdentified( "nepomuk:/res/1", "/home/user/" );
+ m_model->debug_notIdentified( "nepomuk:/res/2", "/home/user/file1" );
+ m_model->debug_notIdentified( "nepomuk:/res/3", "/home/user/folder/" );
+ m_model->debug_notIdentified( "nepomuk:/res/4", "/home/user/file2" );
+ m_model->debug_notIdentified( "nepomuk:/res/5", "/home/user/folder/fol-file1" );
+ m_model->debug_notIdentified( "nepomuk:/res/6", "/home/user/folder/fol-file2" );
}
--- trunk/KDE/kdebase/runtime/nepomuk/services/backupsync/gui/identifiermodel.cpp \
#1200253:1200254 @@ -101,7 +101,7 @@
if( !parent.isValid() ) {
//kDebug() << "NOT VALID - Probably root";
- int r = m_tree->isEmpty() ? 0 : 1;
+ int r = m_tree->isEmpty() ? 0 : m_tree->rootNodes().size();
//kDebug() << r;
return r;
}
@@ -157,7 +157,8 @@
if( m_tree->isEmpty() || row >= m_tree->rootNodes().size() )
return QModelIndex();
-// kDebug() << "------------- Returning index for row column : " << row << " \
" << column; + kDebug() << "------------- Returning index for row column : " \
<< row << " " << column; + kDebug() << "-------- " << m_tree->rootNodes().at( \
row ); return createIndex( row, column, m_tree->rootNodes().at( row ) );
}
else {
@@ -221,8 +222,6 @@
void Nepomuk::IdentifierModel::debug_notIdentified( const QString& resUri, const \
QString& nieUrl ) {
- emit layoutAboutToBeChanged();
-
Soprano::Statement st( Soprano::Node( QUrl(resUri) ),
Soprano::Node( Nepomuk::Vocabulary::NIE::url() ),
Soprano::Node( QUrl(nieUrl) ) );
@@ -232,10 +231,7 @@
stList << Soprano::Statement( QUrl(resUri), \
Soprano::Vocabulary::RDF::type(), Nepomuk::Vocabulary::NFO::Folder() ); }
- //kDebug() << m_tree->toList();
- m_tree->add( IdentifierModelTreeItem::fromStatementList( stList ) );
- kDebug() << m_tree->toList();
- emit layoutChanged();
+ notIdentified( 0, stList );
}
Qt::ItemFlags Nepomuk::IdentifierModel::flags(const QModelIndex& index) const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic