Accepting request 616881 from KDE:Applications
OBS-URL: https://build.opensuse.org/request/show/616881 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kate?expand=0&rev=97
This commit is contained in:
commit
fdd7ebfcd6
76
0002-Fix-QuickOpen-with-Qt-5.11.patch
Normal file
76
0002-Fix-QuickOpen-with-Qt-5.11.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
From 291b68994d7c6176dbc1983c956e2bb7135559e0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sven Brauch <mail@svenbrauch.de>
|
||||||
|
Date: Wed, 13 Jun 2018 17:25:20 +0200
|
||||||
|
Subject: Fix QuickOpen with Qt 5.11
|
||||||
|
|
||||||
|
It remains to be investigated whether this is a regression in Qt
|
||||||
|
itself, or misuse of the API on our side. There is at least one
|
||||||
|
misuse (the call to mapFromSource) which is wrong in the old version,
|
||||||
|
so this patch improves the situation in either case.
|
||||||
|
|
||||||
|
Differential Revision: https://phabricator.kde.org/D13517
|
||||||
|
BUG:395039
|
||||||
|
---
|
||||||
|
kate/katequickopen.cpp | 21 +++++++--------------
|
||||||
|
1 file changed, 7 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/kate/katequickopen.cpp b/kate/katequickopen.cpp
|
||||||
|
index 9e2536a..48452d1 100644
|
||||||
|
--- a/kate/katequickopen.cpp
|
||||||
|
+++ b/kate/katequickopen.cpp
|
||||||
|
@@ -147,7 +147,7 @@ void KateQuickOpen::update()
|
||||||
|
/**
|
||||||
|
* new base mode creation
|
||||||
|
*/
|
||||||
|
- QStandardItemModel *base_model = new QStandardItemModel(0, 2, this);
|
||||||
|
+ m_base_model->clear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remember local file names to avoid dupes with project files
|
||||||
|
@@ -186,8 +186,8 @@ void KateQuickOpen::update()
|
||||||
|
|
||||||
|
QStandardItem *itemUrl = new QStandardItem(doc->url().toString());
|
||||||
|
itemUrl->setEditable(false);
|
||||||
|
- base_model->setItem(linecount, 0, itemName);
|
||||||
|
- base_model->setItem(linecount, 1, itemUrl);
|
||||||
|
+ m_base_model->setItem(linecount, 0, itemName);
|
||||||
|
+ m_base_model->setItem(linecount, 1, itemUrl);
|
||||||
|
linecount++;
|
||||||
|
|
||||||
|
if (!doc->url().isEmpty() && doc->url().isLocalFile()) {
|
||||||
|
@@ -224,8 +224,8 @@ void KateQuickOpen::update()
|
||||||
|
|
||||||
|
QStandardItem *itemUrl = new QStandardItem(doc->url().toString());
|
||||||
|
itemUrl->setEditable(false);
|
||||||
|
- base_model->setItem(linecount, 0, itemName);
|
||||||
|
- base_model->setItem(linecount, 1, itemUrl);
|
||||||
|
+ m_base_model->setItem(linecount, 0, itemName);
|
||||||
|
+ m_base_model->setItem(linecount, 1, itemUrl);
|
||||||
|
linecount++;
|
||||||
|
|
||||||
|
if (!doc->url().isEmpty() && doc->url().isLocalFile()) {
|
||||||
|
@@ -255,19 +255,12 @@ void KateQuickOpen::update()
|
||||||
|
|
||||||
|
QStandardItem *itemUrl = new QStandardItem(file);
|
||||||
|
itemUrl->setEditable(false);
|
||||||
|
- base_model->setItem(linecount, 0, itemName);
|
||||||
|
- base_model->setItem(linecount, 1, itemUrl);
|
||||||
|
+ m_base_model->setItem(linecount, 0, itemName);
|
||||||
|
+ m_base_model->setItem(linecount, 1, itemUrl);
|
||||||
|
linecount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- /**
|
||||||
|
- * swap models and kill old one
|
||||||
|
- */
|
||||||
|
- m_model->setSourceModel(base_model);
|
||||||
|
- delete m_base_model;
|
||||||
|
- m_base_model = base_model;
|
||||||
|
-
|
||||||
|
if (idxToSelect.isValid()) {
|
||||||
|
m_listView->setCurrentIndex(m_model->mapFromSource(idxToSelect));
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
cgit v0.11.2
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 14 09:51:26 UTC 2018 - marius.kittler@suse.com
|
||||||
|
|
||||||
|
- Add 0002-Fix-QuickOpen-with-Qt-5.11.patch for kde#395039
|
||||||
|
to make quick-open work again after Qt 5.11.0 update.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jun 08 05:06:39 UTC 2018 - lbeltrame@kde.org
|
Fri Jun 08 05:06:39 UTC 2018 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ Url: http://www.kde.org
|
|||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
# PATCH-FIX-OPENSUSE
|
# PATCH-FIX-OPENSUSE
|
||||||
Patch0: 0001-Defuse-root-block.patch
|
Patch0: 0001-Defuse-root-block.patch
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch1: 0002-Fix-QuickOpen-with-Qt-5.11.patch
|
||||||
BuildRequires: kactivities5-devel
|
BuildRequires: kactivities5-devel
|
||||||
BuildRequires: kconfig-devel
|
BuildRequires: kconfig-devel
|
||||||
BuildRequires: kcrash-devel
|
BuildRequires: kcrash-devel
|
||||||
@ -109,6 +111,7 @@ Provides translations for the "%{name}" package.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build
|
%cmake_kf5 -d build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user