From 0e22dd640f12adb6e1f7b831ed2cf3ec0cd5467b Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 8 Apr 2017 13:00:48 +0200 Subject: [PATCH] lyx: fix for Qt 5.8. --- app-office/lyx/lyx-2.2.2.recipe | 3 ++- app-office/lyx/patches/lyx-2.2.2.patchset | 30 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 app-office/lyx/patches/lyx-2.2.2.patchset diff --git a/app-office/lyx/lyx-2.2.2.recipe b/app-office/lyx/lyx-2.2.2.recipe index 6a8a6757c..1c732e857 100644 --- a/app-office/lyx/lyx-2.2.2.recipe +++ b/app-office/lyx/lyx-2.2.2.recipe @@ -15,10 +15,11 @@ cross-referenced PDF, just as readily produced - looks like nothing else." HOMEPAGE="http://www.lyx.org" LICENSE="GNU GPL v2" COPYRIGHT="the lyx community" -REVISION="2" +REVISION="3" SOURCE_URI="ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/lyx-$portVersion.tar.gz" CHECKSUM_SHA256="7f6a0aeeeb7e9b1405e27394d1b7192e4abebba2491e5d0ffc6a4cb993803a45" ADDITIONAL_FILES="lyx.rdef.in" +PATCHES="lyx-$portVersion.patchset" ARCHITECTURES="?x86_gcc2 ?x86 x86_64" SECONDARY_ARCHITECTURES="?x86" diff --git a/app-office/lyx/patches/lyx-2.2.2.patchset b/app-office/lyx/patches/lyx-2.2.2.patchset new file mode 100644 index 000000000..dcafcbe39 --- /dev/null +++ b/app-office/lyx/patches/lyx-2.2.2.patchset @@ -0,0 +1,30 @@ +From 40dd98fb1c46e0b9773ff4448d863425c80cdcce Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 7 Apr 2017 19:20:49 +0200 +Subject: upstream fix for qt 5.8 + + +diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp +index d583897..60792dc 100644 +--- a/src/frontends/qt4/GuiViewSource.cpp ++++ b/src/frontends/qt4/GuiViewSource.cpp +@@ -219,14 +219,9 @@ void ViewSourceWidget::realUpdateView() + if (changed && !texrow_.get()) { + // position-to-row is unavailable + // we jump to the first modification +- const QChar * oc = old.constData(); +- const QChar * nc = qcontent.constData(); ++ int length = min(old.length(), qcontent.length()); + int pos = 0; +- while (*oc != '\0' && *nc != '\0' && *oc == *nc) { +- ++oc; +- ++nc; +- ++pos; +- } ++ for (; pos < length && old.at(pos) == qcontent.at(pos); ++pos) {} + QTextCursor c = QTextCursor(viewSourceTV->document()); + //get some space below the cursor + c.setPosition(pos); +-- +2.11.0 +