mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-29 17:02:56 +02:00
lyx: fix build
This commit is contained in:
parent
b10f7ea129
commit
dfd1febe08
1 changed files with 33 additions and 0 deletions
33
srcpkgs/lyx/patches/0001-Fix-compilation-with-Qt5.8dev.patch
Normal file
33
srcpkgs/lyx/patches/0001-Fix-compilation-with-Qt5.8dev.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
From 6d375ddeac49ac8c6340398c9797354edca3f5d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Guillaume Munch <gm@lyx.org>
|
||||||
|
Date: Tue, 20 Dec 2016 00:15:58 +0100
|
||||||
|
Subject: [PATCH] Fix compilation with Qt5.8dev
|
||||||
|
|
||||||
|
---
|
||||||
|
src/frontends/qt4/GuiViewSource.cpp | 9 ++-------
|
||||||
|
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp
|
||||||
|
index 9c0ea1d707..fe593875e6 100644
|
||||||
|
--- src/frontends/qt4/GuiViewSource.cpp
|
||||||
|
+++ src/frontends/qt4/GuiViewSource.cpp
|
||||||
|
@@ -218,14 +218,9 @@ void ViewSourceWidget::updateView(BufferView const * bv)
|
||||||
|
if (changed && !texrow_) {
|
||||||
|
// 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.12.2
|
||||||
|
|
Loading…
Add table
Reference in a new issue