[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/kexi-frameworks7-staniek] kexi/widget: Kexi: Fix context menu for project navigator
From:       Jaroslaw Staniek <staniek () kde ! org>
Date:       2015-06-30 20:24:29
Message-ID: E1ZA24z-0006Ps-W5 () scm ! kde ! org
[Download RAW message or body]

Git commit 5ba3367910d34d56f02cad8b2cbf8016c4cc4763 by Jaroslaw Staniek.
Committed on 30/06/2015 at 20:16.
Pushed by staniek into branch 'kexi-frameworks7-staniek'.

Kexi: Fix context menu for project navigator

M  +2    -1    kexi/widget/navigator/KexiProjectNavigator.cpp
M  +1    -1    kexi/widget/utils/kexicontextmenuutils.cpp

http://commits.kde.org/calligra/5ba3367910d34d56f02cad8b2cbf8016c4cc4763

diff --git a/kexi/widget/navigator/KexiProjectNavigator.cpp \
b/kexi/widget/navigator/KexiProjectNavigator.cpp index fe8d916..5bf9e6a 100644
--- a/kexi/widget/navigator/KexiProjectNavigator.cpp
+++ b/kexi/widget/navigator/KexiProjectNavigator.cpp
@@ -692,7 +692,8 @@ KexiItemMenu::~KexiItemMenu()
 
 void KexiItemMenu::update(KexiPart::Info* partInfo, KexiPart::Item* partItem)
 {
-    addSection(partInfo->name());
+    clear();
+    addSection(QString());
     KexiContextMenuUtils::updateTitle(this, partItem->name(), partInfo->name(),
                                       partInfo->iconName());
 
diff --git a/kexi/widget/utils/kexicontextmenuutils.cpp \
b/kexi/widget/utils/kexicontextmenuutils.cpp index 8a8e5d8..6169b59 100644
--- a/kexi/widget/utils/kexicontextmenuutils.cpp
+++ b/kexi/widget/utils/kexicontextmenuutils.cpp
@@ -234,7 +234,7 @@ bool KexiContextMenuUtils::updateTitle(QMenu *menu, const \
QString& objectName,  return false;
     QAction *titleAction = actions.first();
     //! @todo KEXI3 test this
-    if (titleAction && titleAction->isSeparator()) {
+    if (titleAction->isSeparator()) {
         titleAction->setIcon(QIcon::fromTheme(iconName));
         /*! @todo look at makeFirstCharacterUpperCaseInCaptions setting [bool]
          (see doc/dev/settings.txt) */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic