]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Do not lose translation of Places items if a Dolphin window is closed
authorFrank Reininghaus <frank78ac@googlemail.com>
Tue, 20 May 2014 06:31:31 +0000 (08:31 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Tue, 20 May 2014 06:31:31 +0000 (08:31 +0200)
If the "Places" are updated outside the current Dolphin process,
PlacesItemModel::updateBookmarks() is called, which invokes
PlacesItem::setBookmark(const KBookmark& bookmark) for each item. This
commit ensures that the correct translation is used for system
bookmarks like "Root", "Network", etc.

Without this patch, all Places entries in the remaining Dolphin windows
would switch to US English if one of multiple windows is closed.

See http://lists.kde.org/?t=139660468400004&r=1&w=2 for details.

BUG: 334999
REVIEW: 118207
FIXED-IN: 4.13.2

src/panels/places/placesitem.cpp

index 41f22cce43d30aee00c3108d75a8170d4e6d7e4a..539b9263daa660d1aeebb4991bcbf040d4623020 100644 (file)
@@ -135,7 +135,7 @@ void PlacesItem::setBookmark(const KBookmark& bookmark)
     const QString udi = bookmark.metaDataItem("UDI");
     if (udi.isEmpty()) {
         setIcon(bookmark.icon());
-        setText(bookmark.text());
+        setText(i18nc("KFile System Bookmarks", bookmark.text().toUtf8().data()));
         setUrl(bookmark.url());
     } else {
         initializeDevice(udi);