mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
feat: send a notify when plugin is not compatible
https://github.com/linuxdeepin/internal-discussion/issues/840 Change-Id: I9c46ebcb984e3a2660e7607774a54c931d2cf123
This commit is contained in:
parent
fc06a6a078
commit
f30e28cf81
Notes:
gerrit
2019-02-28 19:28:22 +08:00
Verified+1: <jenkins@deepin.com> Code-Review+2: listenerri <listenerri@gmail.com> Submitted-by: listenerri <listenerri@gmail.com> Submitted-at: Thu, 28 Feb 2019 19:28:22 +0800 Reviewed-on: https://cr.deepin.io/41784 Project: dde/dde-dock Branch: refs/heads/master
@ -154,6 +154,10 @@ void DockPluginsController::loadPlugin(const QString &pluginFile)
|
||||
const auto meta = pluginLoader->metaData().value("MetaData").toObject();
|
||||
if (!meta.contains("api") || meta["api"].toString() != DOCK_PLUGIN_API_VERSION)
|
||||
{
|
||||
QString notifyMessage(tr("The plugin %1 is not compatible with the system."));
|
||||
QProcess::startDetached("notify-send", QStringList()
|
||||
<< "-i" << "dialog-warning"
|
||||
<< notifyMessage.arg(QFileInfo(pluginFile).fileName()));
|
||||
qWarning() << "plugin api version not matched! expect version:" << DOCK_PLUGIN_API_VERSION << pluginFile;
|
||||
return;
|
||||
}
|
||||
|
@ -104,6 +104,14 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DockPluginsController</name>
|
||||
<message>
|
||||
<location filename="../frame/controller/dockpluginscontroller.cpp" line="157"/>
|
||||
<source>The plugin %1 is not compatible with the system.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DockSettings</name>
|
||||
<message>
|
||||
|
Loading…
x
Reference in New Issue
Block a user