summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarkstreemodel.cpp
diff options
context:
space:
mode:
authorDavid E. Narváez <david.narvaez@computer.org>2012-03-19 00:23:23 -0500
committerDavid E. Narváez <david.narvaez@computer.org>2012-03-19 00:23:23 -0500
commitd787c252f073fab19e97cf10884591053fe05aec (patch)
treecb68896e75170cb176def71c7455526d4c463f7d /src/bookmarks/bookmarkstreemodel.cpp
parentrekonq 0.9.53 (diff)
downloadrekonq-d787c252f073fab19e97cf10884591053fe05aec.tar.xz
Change Bookmark MIME Type and Centralize
As discussed in the mailing list, this changes the MIME type to x-rekonq-bookmark and centralizes all references to that MIME type in one static method. REVIEW: 104197
Diffstat (limited to 'src/bookmarks/bookmarkstreemodel.cpp')
-rw-r--r--src/bookmarks/bookmarkstreemodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp
index 534e9698..4df7b981 100644
--- a/src/bookmarks/bookmarkstreemodel.cpp
+++ b/src/bookmarks/bookmarkstreemodel.cpp
@@ -276,16 +276,16 @@ QVariant BookmarksTreeModel::data(const QModelIndex &index, int role) const
QStringList BookmarksTreeModel::mimeTypes() const
{
- return QStringList("application/rekonq-bookmark");
+ return QStringList(BookmarkManager::bookmark_mime_type());
}
bool BookmarksTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
{
- if (action != Qt::MoveAction || !data->hasFormat("application/rekonq-bookmark"))
+ if (action != Qt::MoveAction || !data->hasFormat(BookmarkManager::bookmark_mime_type()))
return false;
- QByteArray addresses = data->data("application/rekonq-bookmark");
+ QByteArray addresses = data->data(BookmarkManager::bookmark_mime_type());
KBookmark bookmark = rApp->bookmarkManager()->findByAddress(QString::fromLatin1(addresses.data()));
KBookmarkGroup root;
@@ -323,7 +323,7 @@ QMimeData* BookmarksTreeModel::mimeData(const QModelIndexList &indexes) const
QMimeData *mimeData = new QMimeData;
QByteArray address = bookmarkForIndex(indexes.first()).address().toLatin1();
- mimeData->setData("application/rekonq-bookmark", address);
+ mimeData->setData(BookmarkManager::bookmark_mime_type(), address);
bookmarkForIndex(indexes.first()).populateMimeData(mimeData);
return mimeData;