[kde-baseapps/f20: 11/12] Revert "4.11.4"
Rex Dieter
rdieter at fedoraproject.org
Mon Feb 3 00:55:52 UTC 2014
commit a3db080390f647e29ec0cda728a33345f1010c52
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Sun Feb 2 18:56:07 2014 -0600
Revert "4.11.4"
This reverts commit a3ff42006fa279e253f908b40e7b503e8e38e186.
.gitignore | 2 +-
...983-Dolphin-truncates-tooltip-information.patch | 92 ++++++++++++++++++++
...s-passed-as-arguments-Ignore-unsupported-.patch | 67 ++++++++++++++
kde-baseapps.spec | 14 ++-
sources | 2 +-
5 files changed, 170 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bf23cad..226d26d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/kde-baseapps-4.11.4.tar.xz
+/kde-baseapps-4.11.3.tar.xz
diff --git a/0001-Fix-Bug-287983-Dolphin-truncates-tooltip-information.patch b/0001-Fix-Bug-287983-Dolphin-truncates-tooltip-information.patch
new file mode 100644
index 0000000..8c52b99
--- /dev/null
+++ b/0001-Fix-Bug-287983-Dolphin-truncates-tooltip-information.patch
@@ -0,0 +1,92 @@
+From 1af756f101d099592df25ddaaf1c34d63633f3a3 Mon Sep 17 00:00:00 2001
+From: Emmanuel Pescosta <emmanuelpescosta099 at gmail.com>
+Date: Sat, 2 Nov 2013 00:12:33 +0100
+Subject: [PATCH 1/2] Fix Bug 287983 - Dolphin truncates tooltip information
+ for long file names
+
+Use KStringHandler and QTextLayout to wrap the text (file name)
+into the maximum width of the label "name".
+
+Make use of QFontMetrics to calculate a font size aware tooltip size.
+
+BUG: 287983
+FIXED-IN: 4.11.3
+REVIEW: 113101
+---
+ dolphin/src/views/tooltips/filemetadatatooltip.cpp | 37 +++++++++++++++++++++-
+ 1 file changed, 36 insertions(+), 1 deletion(-)
+
+diff --git a/dolphin/src/views/tooltips/filemetadatatooltip.cpp b/dolphin/src/views/tooltips/filemetadatatooltip.cpp
+index c22f6be..67911ee 100644
+--- a/dolphin/src/views/tooltips/filemetadatatooltip.cpp
++++ b/dolphin/src/views/tooltips/filemetadatatooltip.cpp
+@@ -24,11 +24,15 @@
+ #include <KColorScheme>
+ #include <KSeparator>
+ #include <KWindowSystem>
++#include <KStringHandler>
+
+ #include <QLabel>
+ #include <QStyleOptionFrame>
+ #include <QStylePainter>
+ #include <QVBoxLayout>
++#include <QTextDocument>
++#include <QTextLayout>
++#include <QTextLine>
+
+ #ifndef HAVE_NEPOMUK
+ #include <KFileMetaDataWidget>
+@@ -56,10 +60,15 @@ FileMetaDataToolTip::FileMetaDataToolTip(QWidget* parent) :
+ m_name = new QLabel(this);
+ m_name->setForegroundRole(QPalette::ToolTipText);
+ m_name->setTextFormat(Qt::PlainText);
++ m_name->setAlignment(Qt::AlignHCenter);
++
+ QFont font = m_name->font();
+ font.setBold(true);
+ m_name->setFont(font);
+
++ QFontMetrics fontMetrics(font);
++ m_name->setMaximumWidth(fontMetrics.averageCharWidth() * 40);
++
+ // Create widget for the meta data
+ #ifndef HAVE_NEPOMUK
+ m_fileMetaDataWidget = new KFileMetaDataWidget(this);
+@@ -108,7 +117,33 @@ QPixmap FileMetaDataToolTip::preview() const
+
+ void FileMetaDataToolTip::setName(const QString& name)
+ {
+- m_name->setText(name);
++ QTextOption textOption;
++ textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
++
++ const QString processedName = Qt::mightBeRichText(name) ? name : KStringHandler::preProcessWrap(name);
++
++ QTextLayout textLayout(processedName);
++ textLayout.setFont(m_name->font());
++ textLayout.setTextOption(textOption);
++
++ QString wrappedText;
++ wrappedText.reserve(processedName.length());
++
++ // wrap the text to fit into the maximum width of m_name
++ textLayout.beginLayout();
++ QTextLine line = textLayout.createLine();
++ while (line.isValid()) {
++ line.setLineWidth(m_name->maximumWidth());
++ wrappedText += processedName.mid(line.textStart(), line.textLength());
++
++ line = textLayout.createLine();
++ if (line.isValid()) {
++ wrappedText += QChar::LineSeparator;
++ }
++ }
++ textLayout.endLayout();
++
++ m_name->setText(wrappedText);
+ }
+
+ QString FileMetaDataToolTip::name() const
+--
+1.8.4.2
+
diff --git a/0002-Revert-Files-passed-as-arguments-Ignore-unsupported-.patch b/0002-Revert-Files-passed-as-arguments-Ignore-unsupported-.patch
new file mode 100644
index 0000000..9620cb8
--- /dev/null
+++ b/0002-Revert-Files-passed-as-arguments-Ignore-unsupported-.patch
@@ -0,0 +1,67 @@
+From 1c856e44774a7ce8eb6dce6828ef689647f83ca4 Mon Sep 17 00:00:00 2001
+From: Wolfgang Bauer <wbauer at tmo.at>
+Date: Wed, 6 Nov 2013 16:46:09 +0100
+Subject: [PATCH 2/2] Revert "Files passed as arguments: Ignore unsupported
+ files"
+
+This reverts commit cd9e50ae4f3ded5a78d0cfb09a67684a9c15d726.
+
+See bug#327224 for details.
+---
+ dolphin/src/dolphinmainwindow.cpp | 23 +++++------------------
+ 1 file changed, 5 insertions(+), 18 deletions(-)
+
+diff --git a/dolphin/src/dolphinmainwindow.cpp b/dolphin/src/dolphinmainwindow.cpp
+index 9da73f9..b477600 100644
+--- a/dolphin/src/dolphinmainwindow.cpp
++++ b/dolphin/src/dolphinmainwindow.cpp
+@@ -31,7 +31,6 @@
+ #include "panels/information/informationpanel.h"
+ #include "settings/dolphinsettingsdialog.h"
+ #include "statusbar/dolphinstatusbar.h"
+-#include "views/dolphinview.h"
+ #include "views/dolphinviewactionhandler.h"
+ #include "views/dolphinremoteencoding.h"
+ #include "views/draganddrophelper.h"
+@@ -244,20 +243,8 @@ void DolphinMainWindow::openDirectories(const QList<KUrl>& dirs)
+ return;
+ }
+
+- // dirs could contain URLs that actually point to archives or other files.
+- // Replace them by URLs we can open where possible and filter the rest out.
+- QList<KUrl> urlsToOpen;
+- foreach (const KUrl& rawUrl, dirs) {
+- const KFileItem& item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, rawUrl);
+- item.determineMimeType();
+- const KUrl& url = DolphinView::openItemAsFolderUrl(item);
+- if (!url.isEmpty()) {
+- urlsToOpen.append(url);
+- }
+- }
+-
+- if (urlsToOpen.count() == 1) {
+- m_activeViewContainer->setUrl(urlsToOpen.first());
++ if (dirs.count() == 1) {
++ m_activeViewContainer->setUrl(dirs.first());
+ return;
+ }
+
+@@ -267,12 +254,12 @@ void DolphinMainWindow::openDirectories(const QList<KUrl>& dirs)
+
+ // Open each directory inside a new tab. If the "split view" option has been enabled,
+ // always show two directories within one tab.
+- QList<KUrl>::const_iterator it = urlsToOpen.begin();
+- while (it != urlsToOpen.end()) {
++ QList<KUrl>::const_iterator it = dirs.begin();
++ while (it != dirs.end()) {
+ openNewTab(*it);
+ ++it;
+
+- if (hasSplitView && (it != urlsToOpen.end())) {
++ if (hasSplitView && (it != dirs.end())) {
+ const int tabIndex = m_viewTab.count() - 1;
+ m_viewTab[tabIndex].secondaryView->setUrl(*it);
+ ++it;
+--
+1.8.4.2
+
diff --git a/kde-baseapps.spec b/kde-baseapps.spec
index e662d09..a0fd775 100644
--- a/kde-baseapps.spec
+++ b/kde-baseapps.spec
@@ -1,7 +1,7 @@
Name: kde-baseapps
Summary: KDE Core Applications
-Version: 4.11.4
-Release: 1%{?dist}
+Version: 4.11.3
+Release: 2%{?dist}
License: GPLv2
URL: https://projects.kde.org/projects/kde/kde-baseapps
@@ -33,6 +33,9 @@ Requires: accountsservice
%endif
## upstream patches
+# some post v4.11.3 commits, one for regression
+Patch101: 0001-Fix-Bug-287983-Dolphin-truncates-tooltip-information.patch
+Patch102: 0002-Revert-Files-passed-as-arguments-Ignore-unsupported-.patch
%ifnarch s390 s390x
Requires: eject
@@ -125,6 +128,9 @@ Requires: kdelibs4-devel
%patch3 -p2 -b .kde#228593
%patch5 -p1 -b .mimetyp.patch
+%patch101 -p1 -b .0001
+%patch102 -p1 -b .0002
+
%build
mkdir -p %{_target_platform}
@@ -136,6 +142,7 @@ make %{?_smp_mflags} -C %{_target_platform}
%install
+rm -rf %{buildroot}
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
# konquerorsu only show in KDE
@@ -281,9 +288,6 @@ fi
%changelog
-* Fri Dec 13 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.11.4-1
-- 4.11.4
-
* Sat Nov 09 2013 Rex Dieter <rdieter at fedoraproject.org> 4.11.3-2
- include some post v4.11.3 commits, including fix for dolphin kde bug #318683
diff --git a/sources b/sources
index 9679707..17615fd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f1d6f4fccf6e3a1ecb4a0425b1d308ad kde-baseapps-4.11.4.tar.xz
+7ef16f46e8e3dff0d6c9ca1f36dfa976 kde-baseapps-4.11.3.tar.xz
More information about the scm-commits
mailing list