backport fonts/printing fix, .spec cosmetics (sort BR's)

epel9
Rex Dieter 9 years ago
parent 54e5d80cf9
commit ff4b830dac

@ -0,0 +1,92 @@
From 7d824fd0b64a316e360243ab4641e1a8a47ee88e Mon Sep 17 00:00:00 2001
From: Christoph Cullmann <cullmann@kde.org>
Date: Sat, 10 Oct 2015 10:13:17 +0200
Subject: [PATCH 38/44] CHANGELOG: Printing again honors the selected font &
color schema BUG: 344976
---
src/printing/printpainter.cpp | 6 +-----
src/printing/printpainter.h | 8 +++++---
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/printing/printpainter.cpp b/src/printing/printpainter.cpp
index 7bdfeee..0b5023a 100644
--- a/src/printing/printpainter.cpp
+++ b/src/printing/printpainter.cpp
@@ -25,9 +25,7 @@
#include "katetextfolding.h"
#include "katedocument.h"
#include "katebuffer.h"
-#include "katerenderer.h"
#include "kateview.h"
-#include "kateconfig.h"
#include "katehighlight.h"
#include "katepartdebug.h"
#include "katetextlayout.h"
@@ -86,7 +84,6 @@ public:
PrintPainter::PrintPainter(KTextEditor::DocumentPrivate *doc, KTextEditor::ViewPrivate *view)
: m_view(view)
, m_doc(doc)
- , m_colorScheme()
, m_printGuide(false)
, m_printLineNumbers(false)
, m_useHeader(false)
@@ -109,7 +106,6 @@ PrintPainter::PrintPainter(KTextEditor::DocumentPrivate *doc, KTextEditor::ViewP
m_folding = new Kate::TextFolding(m_doc->buffer());
m_renderer = new KateRenderer(m_doc, *m_folding, m_view);
- m_renderer->config()->setSchema(m_colorScheme);
m_renderer->setPrinterFriendly(true);
m_fontHeight = m_renderer->fontHeight();
@@ -499,7 +495,7 @@ void PrintPainter::paintGuide(QPainter &painter, uint &y, const PageLayout &pl)
QString _hlName = m_doc->highlight()->name();
QList<KTextEditor::Attribute::Ptr> _attributes; // list of highlight attributes for the legend
- m_doc->highlight()->getKateExtendedAttributeList(m_colorScheme, _attributes);
+ m_doc->highlight()->getKateExtendedAttributeList(m_renderer->config()->schema(), _attributes);
KateAttributeList _defaultAttributes;
KateHlManager::self()->getDefaults(m_renderer->config()->schema(), _defaultAttributes);
diff --git a/src/printing/printpainter.h b/src/printing/printpainter.h
index 44f4146..01877ce 100644
--- a/src/printing/printpainter.h
+++ b/src/printing/printpainter.h
@@ -27,13 +27,15 @@
#include <QColor>
#include <QFont>
+#include "kateconfig.h"
+#include "katerenderer.h"
+
namespace KTextEditor
{
class DocumentPrivate;
class ViewPrivate;
}
-class KateRenderer;
class QPrinter;
class QPainter;
@@ -62,7 +64,8 @@ public:
// Attributes
void setColorScheme(const QString &scheme)
{
- m_colorScheme = scheme;
+ // directly set that for the renderer
+ m_renderer->config()->setSchema(scheme);
}
void setPrintGuide(const bool on)
{
@@ -136,7 +139,6 @@ private:
KTextEditor::ViewPrivate *m_view;
KTextEditor::DocumentPrivate *m_doc;
- QString m_colorScheme;
bool m_printGuide;
bool m_printLineNumbers;
bool m_useHeader;
--
2.5.0

@ -2,7 +2,7 @@
Name: kf5-%{framework}
Version: 5.15.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: KDE Frameworks 5 Tier 3 with advanced embeddable text editor
License: LGPLv2+
@ -17,20 +17,23 @@ URL: https://projects.kde.org/projects/frameworks/ktexteditor
%endif
Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz
BuildRequires: kf5-rpm-macros >= %{version}
BuildRequires: extra-cmake-modules >= %{version}
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtscript-devel
BuildRequires: qt5-qtxmlpatterns-devel
BuildRequires: kf5-kiconthemes-devel >= %{version}
## upstream patches
Patch38: 0038-CHANGELOG-Printing-again-honors-the-selected-font-co.patch
BuildRequires: cmake
BuildRequires: extra-cmake-modules >= %{version}
BuildRequires: kf5-karchive-devel >= %{version}
BuildRequires: kf5-kconfig-devel >= %{version}
BuildRequires: kf5-kguiaddons-devel >= %{version}
BuildRequires: kf5-ki18n-devel >= %{version}
BuildRequires: kf5-kiconthemes-devel >= %{version}
BuildRequires: kf5-kio-devel >= %{version}
BuildRequires: kf5-kparts-devel >= %{version}
BuildRequires: kf5-rpm-macros >= %{version}
BuildRequires: kf5-sonnet-devel >= %{version}
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtscript-devel
BuildRequires: qt5-qtxmlpatterns-devel
%if 0%{?fedora} >= 22
BuildRequires: libgit2-devel >= 0.22.0
@ -61,6 +64,8 @@ developing applications that use %{name}.
%prep
%setup -q -n %{framework}-%{version}
%patch38 -p1 -b .0038
%build
mkdir %{_target_platform}
@ -99,6 +104,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%changelog
* Sat Oct 10 2015 Rex Dieter <rdieter@fedoraproject.org> 5.15.0-2
- backport fonts/printing fix, .spec cosmetics (sort BR's)
* Thu Oct 08 2015 Daniel Vrátil <dvratil@redhat.com> - 5.15.0-1
- KDE Frameworks 5.15.0

Loading…
Cancel
Save