File 0014-User-menu-do-not-attempt-to-load-an-empty-file-name.patch of Package kile5

From 7cfc3f74f00d13cfb1a43f01a7dbc0be486c0d47 Mon Sep 17 00:00:00 2001
From: Pino Toscano <pino@kde.org>
Date: Mon, 8 Oct 2018 07:42:41 +0200
Subject: [PATCH 14/35] User menu: do not attempt to load an empty file name

Do not try to install m_currentXmlFile in case it is empty, otherwise
QFile will (rightfully) warn that an empty file was passed.
---
 src/usermenu/usermenu.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/usermenu/usermenu.cpp b/src/usermenu/usermenu.cpp
index 7d1d5f53..f9e3d3c0 100644
--- a/src/usermenu/usermenu.cpp
+++ b/src/usermenu/usermenu.cpp
@@ -190,7 +190,7 @@ void UserMenu::updateGUI()
     clear();
 
     // then install
-    if(installXml(m_currentXmlFile)) {
+    if(!m_currentXmlFile.isEmpty() && installXml(m_currentXmlFile)) {
         // add changed context menu to all existing views
         KileView::Manager* viewManager = m_ki->viewManager();
         int views = viewManager->textViewCount();
-- 
2.20.1

openSUSE Build Service is sponsored by