You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-editors/kile/files/kile-2.9.92-no-empty-filena...

27 lines
964 B

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: 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 7d1d5f5..f9e3d3c 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();
--
cgit v1.1