From 18a976c435e85fa2556b1a1abb6de41392003d7d Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Mon, 4 Aug 2014 19:43:07 +0200 Subject: [PATCH 1/4] Fix wrong text eliding in some corner cases. BUG: 337104 FIXED-IN: 4.14.0 REVIEW: 119546 --- src/kitemviews/kstandarditemlistwidget.cpp | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index 998acc0665..6407efc225 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -1136,14 +1136,24 @@ void KStandardItemListWidget::updateIconsLayoutTextCache() const int textLength = line.textStart() + line.textLength(); if (textLength < nameText.length()) { // Elide the last line of the text - QString lastTextLine = nameText.mid(line.textStart()); - lastTextLine = m_customizedFontMetrics.elidedText(lastTextLine, - Qt::ElideRight, - maxWidth); - const QString elidedText = nameText.left(line.textStart()) + lastTextLine; - nameTextInfo->staticText.setText(elidedText); + qreal elidingWidth = maxWidth; + qreal lastLineWidth; + do { + QString lastTextLine = nameText.mid(line.textStart()); + lastTextLine = m_customizedFontMetrics.elidedText(lastTextLine, + Qt::ElideRight, + elidingWidth); + const QString elidedText = nameText.left(line.textStart()) + lastTextLine; + nameTextInfo->staticText.setText(elidedText); + + lastLineWidth = m_customizedFontMetrics.boundingRect(lastTextLine).width(); + + // We do the text eliding in a loop with decreasing width (1 px / iteration) + // to avoid problems related to different width calculation code paths + // within Qt. (see bug 337104) + elidingWidth -= 1.0; + } while (lastLineWidth > maxWidth); - const qreal lastLineWidth = m_customizedFontMetrics.boundingRect(lastTextLine).width(); nameWidth = qMax(nameWidth, lastLineWidth); } break; From 013b2346f56e846009dd1eebfc88c737d94dad0f Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Sun, 10 Aug 2014 05:48:43 +0000 Subject: [PATCH 2/4] SVN_SILENT made messages (after extraction) --- src/dolphin.appdata.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/dolphin.appdata.xml b/src/dolphin.appdata.xml index 958464976c..de59e6a2fc 100644 --- a/src/dolphin.appdata.xml +++ b/src/dolphin.appdata.xml @@ -17,6 +17,7 @@ Dolphin Dolphin Dolphin + Dolphin Dolphin Dolphin Dolphin @@ -46,6 +47,7 @@ Gerente de File Gestore file Failų tvarkyklė + Filbehandler Dateipleger Bestandsbeheerder Zarządzanie plikami @@ -73,6 +75,7 @@

Dolphin est un gestionnaire de fichier léger. Il a été conçu en gardant à l'esprit la simplicité et l'aisance à l'usage, tout en permettant flexibilité et personnalisation. Cela signifie que vous pouvez gérer vos fichiers de la manière exacte que vous voulez.

Dolphin es un gerente de file legier. Il ha essite designate con facilitate de uso e simplicitate in le mente, mentre il permitte ancora flexibilitate e personalisation. Isto significa que tu pote facer le gerente de file exactemente como tu lo vole.

Dolphin è un gestore file leggero. È stato progettato per essere facile da utilizzare e pensando alla semplicità, garantendo al contempo flessibilità e personalizzazione. Ciò significa che puoi gestire i tuoi file come meglio desideri.

+

Dolphin er en lettvekts filbehandler. Den er laget for å være enkel og lett å bruke, samtidig som den er fleksibel og kan tilpasses. Det betyr at du kan utføre dine filbehandlingsoppgaver akkurat slik du vil gjøre det.

Dolphin is en slank Dateipleger. Dat wöör buut mit de Idee vun't eenfache Bedenen vör Ogen, bides dat liekers flexibel un topassbor wesen schull. Du kannst Dien Dateien also jüst so plegen, as Du dat wullt.

Dolphin is een lichtgewicht bestandsbeheerder. Het is ontworpen met gebruiksgemak en eenvoud in gedachte en staat toch flexibiliteit en aan te passen toe. Dit betekent dat u uw bestandsbeheer kunt doen precies op de manier zoals u dat wilt.

Dolphin jest lekkim programem do zarządzania plikami. Został on opracowany mając na uwadze łatwość i prostotę obsługi, zapewniając jednocześnie elastyczność i możliwość dostosowania. Oznacza to, że można urządzić zarządzanie plikami w dokładnie taki sposób w jaki jest to pożądane.

@@ -101,6 +104,7 @@

Characteristicas:

Funzionalità:

Galimybės

+

Egenskaper:

Markmalen:

Mogelijkheden:

Możliwości:

@@ -127,6 +131,7 @@
  • Barre de navigation (ou fil d'Ariane) permettant de naviguer rapidement dans la hiérarchie de fichiers et de dossiers.
  • Barra de navigation (o "breadcrumb") pro URLs, que il permitte te navigar rapidemente a transverso del hierarchia de files e dossieres.
  • La barra di navigazione per gli URL, che ti consente di navigare rapidamente attraverso la struttura di file e cartelle.
  • +
  • Navigasjonslinje (brødsmulelinje) for URL-er slik at du raskt kan navigere gjennom hierarkiet av filer og mapper.
  • Steed- (oder Krömelspoor-)Balken för URLs, mit de Du Di fix dör de Hierarchie ut Dateien un Ornern bewegen kannst
  • Navigatie- (of broodkruimel)balk voor URL's, waarmee u snel kunt navigeren door de hiërarchie van bestanden en mappen.
  • Pasek nawigacji (lub okruchy chleba) dla adresów URL, umożliwiające szybkie przechodzenie w hierarchii plików i katalogów.
  • @@ -152,6 +157,7 @@
  • Prend en charge plusieurs types de styles d'affichage et de propriété et vous permet de configurer l'affichage de la manière exacte que vous voulez.
  • Il supporta multe differente typos de stilos de vista e proprietates e il permitte te configurar le vista exactemente como tu vole.
  • Supporta diversi stili di visualizzazione e proprietà e ti consente di configurare la vista come desideri.
  • +
  • Støtter flere forskjellige visningsstiler og kan sette opp visningen akkurat slik du vil ha den.
  • Ünnerstütt en Reeg verscheden Ansichtstilen un -egenschappen un lett Di de Ansicht jüst so topassen, as Du dat bruukst.
  • Ondersteunt een aantal verschillende soorten stijlen van weergave en eigenschappen en biedt u de mogelijkheid de weergave in te stellen precies zoals u dat wilt.
  • Obsługa wielu różnych rodzajów stylów widoków i właściwości oraz możliwość ustawienia widoku dopasowanego do potrzeb.
  • @@ -177,6 +183,7 @@
  • Affichage divisé, permettant de facilement copier ou déplacer des fichiers dans les différents emplacements.
  • Scinde vista, il permitte te copiar o mover facilemente files inter locationes.
  • La vista divisa, che ti consente di copiare o spostare i file tra le diverse posizioni in maniera semplice.
  • +
  • Delt visning, så du lett kan kopiere eller flytte filer mellom steder.
  • Deelt Ansicht, mit De Du Dateien eenfach twischen Steden koperen oder bewegen kannst.
  • Gesplitst beeld, waarmee u gemakkelijk bestanden kunt kopiëren of verplaatsen tussen locaties.
  • Widok podzielony, umożliwiający łatwe kopiowane lub przenoszenie plików pomiędzy położeniami.
  • @@ -202,6 +209,7 @@
  • Des informations supplémentaires et des raccourcis sont disponible comme panneaux ancrable librement déplaçable et affichant exactement ce que vous voulez.
  • Information additional e vias breve es disponibile como pannellos de basin (dock-panels), il permitte mover los liberemente e monstrar los exactemente como tu vole.
  • Informazioni aggiuntive e scorciatoie sono disponibili come pannelli agganciabili, che possono essere spostati liberamente e visualizzare esattamente ciò che desideri.
  • +
  • Mer informasjon og snarveier er tilgjengelige som dokkbare ruter, som du kan flytte fritt rundt og bruke til å vise akkurat hva du vil.
  • Bito-Infos un Leestekens laat sik as Paneels andocken, Du kannst ehr verschuven un se jüst dat wiesen laten, wat Du weten wullt.
  • Extra informatie en sneltoetsen zijn beschikbaar als vast te zetten panelen, die u vrij kunt verplaatsen en precies kunt tonen wat u wilt.
  • Dodatkowe szczegóły i skróty dostępne jako dokowalne panele, umożliwiające ich dowolne przenoszenie i wyświetlanie dopasowane do potrzeb.
  • @@ -229,6 +237,7 @@
  • Supporto de scheda multiple
  • Supporto di schede multiple
  • Daugelio kortelių palaikymas
  • +
  • Støtte for flere faner
  • Ünnerstütten för Paneels
  • Ondersteuning voor meerdere tabbladen
  • Obsługa wielu kart
  • @@ -255,6 +264,7 @@
  • Les dialogues d'information sont affiché de manière discrète.
  • Dialogos de information es monstrate de modo non importun.
  • Le finestre informative sono visualizzate in modo molto discreto.
  • +
  • Informasjonsdialoger vises på en lite påtrengende måte.
  • Informatschoondialogen kaamt Di nich in'n Weg.
  • Informatiedialogen worden op een prettige manier getoond.
  • Pokazywanie informacyjnych okien dialogowych w nienatrętny sposób.
  • @@ -280,6 +290,7 @@
  • Prise en charge d'annulation et recommencement
  • Supporto de annulla/reface
  • Supporto di annulla/rifai
  • +
  • Støtte for angring/omgjøring
  • Ünnerstütten för Torüchnehmen un Wedderherstellen
  • Ondersteuning ongedaan maken/opnieuw
  • Obsługa cofnij/ponów
  • @@ -307,6 +318,7 @@
  • Accès au réseau transparent grâce au système des KIO.
  • Accesso de rete transparente a transverso del systema KIO.
  • Accesso trasparente alla rete tramite il sistema KIO.
  • +
  • Gjennomsiktig nettverkstilgang via KIO-systemet.
  • Direkt Nettwarktogriep över dat KDE-In-/Utgaav-(KIO-)Moduulsysteem
  • Transparante toegang tot het netwerk via het KIO systeem.
  • Przezroczysty dostęp do sieci przez system KIO.
  • From 4ed068fffff2343cc0dcd236c38832b7662f8d78 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Tue, 12 Aug 2014 09:08:30 +0200 Subject: [PATCH 3/4] Fix crash when restoring a session stored with Dolphin 4.13 or earlier Since DolphinTabPage::saveState() and DolphinTabPage::restoreState(const QByteArray& state) save and restore the state of each tab in a different format than DolphinMainWindow did before the refactoring, we can run into problems: the first time a user logs into a session that has Dolphin 4.14, Dolphin might read session data that does not contain the QByteArray that DolphinTabPage wants to read the data from. In restoreState, isSplitViewEnabled will thus have the value false, and no secondary view will be created. Later on, m_primaryViewActive will also be set to false, but the else branch of the following "if (m_primaryViewActive)" then tries to activate the secondary view, which does not exist -> we get a crash. The easiest solution is to not restore the tab state if no session data in the new format is found. BUG: 338187 REVIEW: 119718 FIXED-IN: 4.14.0 --- src/dolphintabpage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 82be6d59c1..4c49869f77 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -187,6 +187,10 @@ QByteArray DolphinTabPage::saveState() const void DolphinTabPage::restoreState(const QByteArray& state) { + if (state.isEmpty()) { + return; + } + QByteArray sd = state; QDataStream stream(&sd, QIODevice::ReadOnly); From bf1ac8ee9b2edcf9e90f74bae7f392c1b3c318b2 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Tue, 12 Aug 2014 09:17:41 +0200 Subject: [PATCH 4/4] Always clear DolphinView's m_currentItemUrl member in updateViewState() Before this patch, we still kept the URL in m_currentItemUrl if the URL was not found in the model. This could cause problems the next time updateViewState() was called, because the current index would then be set to 0, which could cause other issues. For example, all items between the first item in the view and a folder which was expanded in Details View could be selected. In principle, it is possible that updateViewState() is called multiple times if many large files are being pasted in the view, but since the item which should be made the current item (and which the view should be scrolled to) should always be the first pasted item, this change will most likely not cause any other problems. BUG: 329377 REVIEW: 119703 FIXED-IN: 4.14.0 --- src/views/dolphinview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index c1f585da94..02b8815e07 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1289,11 +1289,11 @@ void DolphinView::updateViewState() m_view->scrollToItem(currentIndex); m_scrollToCurrentItem = false; } - - m_currentItemUrl = KUrl(); } else { selectionManager->setCurrentItem(0); } + + m_currentItemUrl = KUrl(); } if (!m_restoredContentsPosition.isNull()) {