From 7cfc3f74f00d13cfb1a43f01a7dbc0be486c0d47 Mon Sep 17 00:00:00 2001 From: Pino Toscano 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