mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
changed: use new getter/setter for the KBookmark description property
svn path=/trunk/KDE/kdebase/apps/; revision=1066996
This commit is contained in:
parent
1175cd72a0
commit
72ced8535d
|
@ -87,7 +87,7 @@ void BookmarkInfoWidget::showBookmark(const KBookmark &bk) {
|
|||
}
|
||||
|
||||
m_comment_le->setReadOnly((bk.isSeparator()|| !bk.hasParent()) ? true : false );
|
||||
QString commentText = EditCommand::getNodeText(bk, QStringList() << "desc");
|
||||
QString commentText = bk.description();
|
||||
if (m_comment_le->text() != commentText) {
|
||||
const int cursorPosition = m_comment_le->cursorPosition();
|
||||
m_comment_le->setText(commentText);
|
||||
|
|
|
@ -94,12 +94,8 @@ QVariant KBookmarkModel::data(const QModelIndex &index, int role) const
|
|||
return QVariant( bk.fullText() );
|
||||
case 1:
|
||||
return QVariant( bk.url().pathOrUrl() );
|
||||
case 2: {
|
||||
QDomNode subnode = bk.internalElement().namedItem("desc");
|
||||
return (subnode.firstChild().isNull())
|
||||
? QString()
|
||||
: subnode.firstChild().toText().data();
|
||||
}
|
||||
case 2:
|
||||
return QVariant( bk.description() );
|
||||
case 3: { //Status column
|
||||
QString text1; //FIXME favicon state
|
||||
QString text2; //FIXME link state
|
||||
|
|
|
@ -267,8 +267,8 @@ void EditCommand::redo()
|
|||
}
|
||||
else if(mCol==2)
|
||||
{
|
||||
mOldValue = getNodeText(bk, QStringList()<<"desc");
|
||||
setNodeText(bk, QStringList()<<"desc", mNewValue);
|
||||
mOldValue = bk.description();
|
||||
bk.setDescription(mNewValue);
|
||||
}
|
||||
CurrentMgr::self()->model()->emitDataChanged(bk);
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ void EditCommand::undo()
|
|||
}
|
||||
else if(mCol==2)
|
||||
{
|
||||
setNodeText(bk, QStringList()<<"desc", mOldValue);
|
||||
bk.setDescription(mOldValue);
|
||||
}
|
||||
CurrentMgr::self()->model()->emitDataChanged(bk);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue