[SCM] ktexteditor packaging branch, master, updated. debian/5.28.0-2-13-ga1fecf4
Maximiliano Curia
maxy at moszumanska.debian.org
Sat Jul 8 07:22:31 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/ktexteditor.git;a=commitdiff;h=e9bddf3
The following commit has been merged in the master branch:
commit e9bddf3caea3e3cf2fc725b4d46795bd36761305
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date: Sat Jul 1 17:41:49 2017 +0200
Drop upstream patches
---
...-dragging-text-results-in-wrong-selection.patch | 138 ---------------------
.../fix-minimap-rendering-for-HiDPI-envs.patch | 64 ----------
debian/patches/katesyntaxtest_check_basename | 21 ----
debian/patches/series | 3 -
4 files changed, 226 deletions(-)
diff --git a/debian/patches/Fix-Forward-dragging-text-results-in-wrong-selection.patch b/debian/patches/Fix-Forward-dragging-text-results-in-wrong-selection.patch
deleted file mode 100644
index 0c2f5ae..0000000
--- a/debian/patches/Fix-Forward-dragging-text-results-in-wrong-selection.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From: Dominik Haumann <dhaumann at kde.org>
-Date: Sat, 7 Jan 2017 12:15:39 +0100
-Subject: Fix: Forward dragging text results in wrong selection
-
-Thanks to Serge Roussak for the patch!
-
-REVIEW: 129758
-BUG: 374163
----
- autotests/src/kateview_test.cpp | 67 +++++++++++++++++++++++++++++++++++++++++
- autotests/src/kateview_test.h | 2 ++
- src/view/kateviewinternal.cpp | 12 +++++---
- 3 files changed, 77 insertions(+), 4 deletions(-)
-
-diff --git a/autotests/src/kateview_test.cpp b/autotests/src/kateview_test.cpp
-index 950184f4..7372d235 100644
---- a/autotests/src/kateview_test.cpp
-+++ b/autotests/src/kateview_test.cpp
-@@ -317,4 +317,71 @@ void KateViewTest::testFoldFirstLine()
- QVERIFY(view->textFolding().isLineVisible(1));
- }
-
-+// test for bug https://bugs.kde.org/374163
-+void KateViewTest::testDragAndDrop()
-+{
-+ KTextEditor::DocumentPrivate doc(false, false);
-+ doc.setText("line0
"
-+ "line1
"
-+ "line2
"
-+ "
"
-+ "line4");
-+
-+ KTextEditor::View* view = static_cast<KTextEditor::View*>(doc.createView(Q_NULLPTR));
-+ view->show();
-+ view->resize(400, 300);
-+
-+ QWidget *internalView = nullptr;
-+ foreach (QObject* child, view->children()) {
-+ if (child->metaObject()->className() == QByteArrayLiteral("KateViewInternal")) {
-+ internalView = qobject_cast<QWidget *>(child);
-+ break;
-+ }
-+ }
-+ QVERIFY(internalView);
-+
-+ // select "line1
"
-+ view->setSelection(Range(1, 0, 2, 0));
-+ QCOMPARE(view->selectionRange(), Range(1, 0, 2, 0));
-+
-+ QTest::qWaitForWindowExposed(view);
-+ const QPoint startDragPos = internalView->mapFrom(view, view->cursorToCoordinate(KTextEditor::Cursor(1, 2)));
-+ const QPoint endDragPos = internalView->mapFrom(view, view->cursorToCoordinate(KTextEditor::Cursor(3, 0)));
-+ const QPoint gStartDragPos = internalView->mapToGlobal(startDragPos);
-+ const QPoint gEndDragPos = internalView->mapToGlobal(endDragPos);
-+
-+ // now drag and drop selected text to Cursor(3, 0)
-+ QMouseEvent pressEvent(QEvent::MouseButtonPress, startDragPos, gStartDragPos,
-+ Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
-+ QCoreApplication::sendEvent(internalView, &pressEvent);
-+
-+ // ugly workaround: Drag & Drop has own blocking event queue. Therefore, we need a single-shot timer to
-+ // break out of the blocking event queue, see (*)
-+ QTimer::singleShot(50, [&](){
-+ QMouseEvent moveEvent(QEvent::MouseMove, endDragPos + QPoint(5, 0), gEndDragPos + QPoint(5, 0),
-+ Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
-+ QMouseEvent releaseEvent(QEvent::MouseButtonRelease, endDragPos, gEndDragPos,
-+ Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
-+ QCoreApplication::sendEvent(internalView, &moveEvent);
-+ QCoreApplication::sendEvent(internalView, &releaseEvent);
-+ });
-+
-+ // (*) this somehow blocks...
-+ QMouseEvent moveEvent1(QEvent::MouseMove, endDragPos + QPoint(10, 0), gEndDragPos + QPoint(10, 0),
-+ Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
-+ QCoreApplication::sendEvent(internalView, &moveEvent1);
-+
-+ QTest::qWait(100);
-+
-+ // final tests of dragged text
-+ QCOMPARE(doc.text(), QString("line0
"
-+ "line2
"
-+ "line1
"
-+ "
"
-+ "line4"));
-+
-+ QCOMPARE(view->cursorPosition(), KTextEditor::Cursor(3, 0));
-+ QCOMPARE(view->selectionRange(), Range(2, 0, 3, 0));
-+}
-+
- // kate: indent-mode cstyle; indent-width 4; replace-tabs on;
-diff --git a/autotests/src/kateview_test.h b/autotests/src/kateview_test.h
-index 672e74e6..a48720d9 100644
---- a/autotests/src/kateview_test.h
-+++ b/autotests/src/kateview_test.h
-@@ -43,6 +43,8 @@ private Q_SLOTS:
- void testKillline();
-
- void testFoldFirstLine();
-+
-+ void testDragAndDrop();
- };
-
- #endif // KATE_VIEW_TEST_H
-diff --git a/src/view/kateviewinternal.cpp b/src/view/kateviewinternal.cpp
-index 35545cc1..23a1e21e 100644
---- a/src/view/kateviewinternal.cpp
-+++ b/src/view/kateviewinternal.cpp
-@@ -3241,22 +3241,26 @@ void KateViewInternal::dropEvent(QDropEvent *event)
- doc()->insertText(targetCursor, text, m_view->blockSelection());
-
- KTextEditor::DocumentCursor startCursor(doc(), targetCursor);
-+ KTextEditor::DocumentCursor endCursor1(doc(), targetCursor);
-+ const int textLength = text.length();
-
- if (event->dropAction() != Qt::CopyAction) {
- m_view->removeSelectedText();
-+ if (m_cursor.toCursor() < startCursor.toCursor()) {
-+ startCursor.move(-textLength);
-+ endCursor1.move(-textLength);
-+ }
- }
-
-- KTextEditor::DocumentCursor endCursor1(doc(), startCursor);
--
- if (!m_view->blockSelection()) {
-- endCursor1.move(text.length());
-+ endCursor1.move(textLength);
- } else {
- endCursor1.setColumn(startCursor.column() + selectionWidth);
- endCursor1.setLine(startCursor.line() + selectionHeight);
- }
-
- KTextEditor::Cursor endCursor(endCursor1);
-- qCDebug(LOG_KTE) << startCursor << "---(" << text.length() << ")---" << endCursor;
-+ qCDebug(LOG_KTE) << startCursor << "---(" << textLength << ")---" << endCursor;
- setSelection(KTextEditor::Range(startCursor, endCursor));
- editSetCursor(endCursor);
-
diff --git a/debian/patches/fix-minimap-rendering-for-HiDPI-envs.patch b/debian/patches/fix-minimap-rendering-for-HiDPI-envs.patch
deleted file mode 100644
index e2092c3..0000000
--- a/debian/patches/fix-minimap-rendering-for-HiDPI-envs.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From: Christoph Cullmann <cullmann at kde.org>
-Date: Mon, 9 Jan 2017 06:17:42 +0100
-Subject: fix minimap rendering for HiDPI envs
-
-Differential Revision: https://phabricator.kde.org/D4018
----
- src/view/kateviewhelpers.cpp | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/src/view/kateviewhelpers.cpp b/src/view/kateviewhelpers.cpp
-index e74a237e..3b45d8d4 100644
---- a/src/view/kateviewhelpers.cpp
-+++ b/src/view/kateviewhelpers.cpp
-@@ -476,7 +476,8 @@ void KateScrollBar::updatePixmap()
- modifiedLineColor.setHsv(modifiedLineColor.hue(), 255, 255 - backgroundColor.value() / 3);
- savedLineColor.setHsv(savedLineColor.hue(), 100, 255 - backgroundColor.value() / 3);
-
-- m_pixmap = QPixmap(pixmapLineWidth, pixmapLineCount);
-+ // increase dimensions by ratio
-+ m_pixmap = QPixmap(pixmapLineWidth * m_view->devicePixelRatio(), pixmapLineCount * m_view->devicePixelRatio());
- m_pixmap.fill(QColor("transparent"));
-
- // The text currently selected in the document, to be drawn later.
-@@ -583,6 +584,10 @@ void KateScrollBar::updatePixmap()
- }
- }
- }
-+
-+ // set right ratio
-+ m_pixmap.setDevicePixelRatio(m_view->devicePixelRatio());
-+
- //qCDebug(LOG_KTE) << time.elapsed();
- // Redraw the scrollbar widget with the updated pixmap.
- update();
-@@ -627,7 +632,7 @@ void KateScrollBar::miniMapPaintEvent(QPaintEvent *e)
- //style()->drawControl(QStyle::CE_ScrollBarSubLine, &opt, &painter, this);
-
- // calculate the document size and position
-- const int docHeight = qMin(grooveRect.height(), m_pixmap.height() * 2) - 2 * docXMargin;
-+ const int docHeight = qMin(grooveRect.height(), int(m_pixmap.height() / m_pixmap.devicePixelRatio() * 2)) - 2 * docXMargin;
- const int yoffset = 1; // top-aligned in stead of center-aligned (grooveRect.height() - docHeight) / 2;
- const QRect docRect(QPoint(grooveRect.left() + docXMargin, yoffset + grooveRect.top()), QSize(grooveRect.width() - docXMargin, docHeight));
- m_mapGroveRect = docRect;
-@@ -683,17 +688,17 @@ void KateScrollBar::miniMapPaintEvent(QPaintEvent *e)
- }
-
- // Smooth transform only when squeezing
-- if (grooveRect.height() < m_pixmap.height()) {
-+ if (grooveRect.height() < m_pixmap.height() / m_pixmap.devicePixelRatio()) {
- painter.setRenderHint(QPainter::SmoothPixmapTransform);
- }
-
- // draw the modified lines margin
-- QRect pixmapMarginRect(QPoint(0, 0), QSize(s_pixelMargin, m_pixmap.height()));
-+ QRect pixmapMarginRect(QPoint(0, 0), QSize(s_pixelMargin, m_pixmap.height() / m_pixmap.devicePixelRatio()));
- QRect docPixmapMarginRect(QPoint(0, docRect.top()), QSize(s_pixelMargin, docRect.height()));
- painter.drawPixmap(docPixmapMarginRect, m_pixmap, pixmapMarginRect);
-
- // calculate the stretch and draw the stretched lines (scrollbar marks)
-- QRect pixmapRect(QPoint(s_pixelMargin, 0), QSize(m_pixmap.width() - s_pixelMargin, m_pixmap.height()));
-+ QRect pixmapRect(QPoint(s_pixelMargin, 0), QSize(m_pixmap.width() / m_pixmap.devicePixelRatio() - s_pixelMargin, m_pixmap.height() / m_pixmap.devicePixelRatio()));
- QRect docPixmapRect(QPoint(s_pixelMargin, docRect.top()), QSize(docRect.width() - s_pixelMargin, docRect.height()));
- painter.drawPixmap(docPixmapRect, m_pixmap, pixmapRect);
-
diff --git a/debian/patches/katesyntaxtest_check_basename b/debian/patches/katesyntaxtest_check_basename
deleted file mode 100644
index eee1479..0000000
--- a/debian/patches/katesyntaxtest_check_basename
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>
-Date: Sun, 15 May 2016 13:19:30 +0200
-Subject: katesyntaxtest_check_basename
-
----
- autotests/src/katesyntaxtest.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/autotests/src/katesyntaxtest.cpp b/autotests/src/katesyntaxtest.cpp
-index 04d74bf2..4f0b4f86 100644
---- a/autotests/src/katesyntaxtest.cpp
-+++ b/autotests/src/katesyntaxtest.cpp
-@@ -55,7 +55,7 @@ void KateSyntaxTest::testSyntaxHighlighting_data()
- while (contents.hasNext()) {
- const QString hlDir = contents.next();
- const QFileInfo info(hlDir);
-- if (!info.isDir() || hlDir.contains(QLatin1Char('.'))) {
-+ if (!info.isDir() || info.fileName().contains(QLatin1Char('.'))) {
- continue;
- }
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 24cc37f..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-katesyntaxtest_check_basename
-Fix-Forward-dragging-text-results-in-wrong-selection.patch
-fix-minimap-rendering-for-HiDPI-envs.patch
--
ktexteditor packaging
More information about the pkg-kde-commits
mailing list