summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-10-13 00:37:49 (GMT)
committerPeter Wu <peter@lekensteyn.nl>2016-10-20 20:42:05 (GMT)
commit47e1301926266c05976109528671192468e35b9b (patch)
treeb027587be682ba59308389c43f07bddb4224830d
parenta6911eb80af1f67c9130d7749b3161cc40467041 (diff)
Show message if kipi-plugins are not installed
If the kipi-plugins package is not installed as dependency of kipi (Arch Linux) or if it failed to load due to an ABI mismatch, the Share menu would be empty. While at it, move setting of mKipiMenuLoaded to avoid a race condition when the menu is opened too fast. REVIEW: 129168 BUG: 358557 FIXED-IN: 16.12
-rw-r--r--src/Gui/ExportMenu.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Gui/ExportMenu.cpp b/src/Gui/ExportMenu.cpp
index 69cb56a..4b894c7 100644
--- a/src/Gui/ExportMenu.cpp
+++ b/src/Gui/ExportMenu.cpp
@@ -119,6 +119,7 @@ void ExportMenu::loadKipiItems()
{
if (!mKipiMenuLoaded) {
QTimer::singleShot(500, this, &ExportMenu::getKipiItems);
+ mKipiMenuLoaded = true;
}
}
@@ -164,7 +165,10 @@ void ExportMenu::getKipiItems()
}
}
- mKipiMenuLoaded = true;
+ // If there are no export actions, then perhaps the kipi-plugins package is not installed.
+ if (mKipiMenu->isEmpty()) {
+ mKipiMenu->addAction(i18n("No KIPI plugins available"))->setEnabled(false);
+ }
}
#endif