From cbdadfb3bf312c8d761661a25fd638afb1fedd76 Mon Sep 17 00:00:00 2001 From: electron128 Date: Mon, 25 May 2015 15:12:20 +0000 Subject: [PATCH] show error string form plugin loading as tooltip in gui (patch from Phenom) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8291 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/settings/PluginItem.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/retroshare-gui/src/gui/settings/PluginItem.cpp b/retroshare-gui/src/gui/settings/PluginItem.cpp index a1d27c995..71534b0f0 100644 --- a/retroshare-gui/src/gui/settings/PluginItem.cpp +++ b/retroshare-gui/src/gui/settings/PluginItem.cpp @@ -21,20 +21,21 @@ #include "PluginItem.h" -PluginItem::PluginItem(const QString& pluginVersion, int id, const QString& pluginTitle,const QString& pluginDescription,const QString& status, const QString& file_name, const QString& file_hash, const QString& /*error_string*/, const QIcon& icon) +PluginItem::PluginItem(const QString& pluginVersion, int id, const QString& pluginTitle,const QString& pluginDescription,const QString& status, const QString& file_name, const QString& file_hash, const QString& error_string, const QIcon& icon) :QWidget(NULL) { setupUi(this) ; _id = id ; _statusLabel->setText(status) ; + _statusLabel->setToolTip(error_string); _hashLabel->setText(file_hash) ; _name_LE->setText(file_name) ; _pluginIcon->setIcon(icon) ; _pluginIcon->setText(QString()) ; msgLabel->setText(pluginDescription) ; - subjectLabel->setText(pluginTitle + " "+ pluginVersion) ; - infoLabel->setText(pluginTitle + " " + tr("will be enabled after your restart RetroShare.")) ; + subjectLabel->setText(pluginTitle + " "+ pluginVersion) ; + infoLabel->setText(pluginTitle + " " + tr("will be enabled after your restart RetroShare.")) ; infoLabel->hide(); QObject::connect(_configure_PB,SIGNAL(clicked()),this,SLOT(configurePlugin())) ; @@ -48,17 +49,17 @@ PluginItem::PluginItem(const QString& pluginVersion, int id, const QString& plug void PluginItem::enablePlugin() { - emit( pluginEnabled(_hashLabel->text()) ) ; - infoLabel->show(); - disableButton->show(); + emit( pluginEnabled(_hashLabel->text()) ) ; + infoLabel->show(); + disableButton->show(); enableButton->hide(); } void PluginItem::disablePlugin() { - emit( pluginDisabled(_hashLabel->text()) ) ; - infoLabel->hide(); - enableButton->show(); + emit( pluginDisabled(_hashLabel->text()) ) ; + infoLabel->hide(); + enableButton->show(); disableButton->hide(); }