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
This commit is contained in:
electron128 2015-05-25 15:12:20 +00:00
parent f835823de3
commit cbdadfb3bf

View File

@ -21,20 +21,21 @@
#include "PluginItem.h" #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) :QWidget(NULL)
{ {
setupUi(this) ; setupUi(this) ;
_id = id ; _id = id ;
_statusLabel->setText(status) ; _statusLabel->setText(status) ;
_statusLabel->setToolTip(error_string);
_hashLabel->setText(file_hash) ; _hashLabel->setText(file_hash) ;
_name_LE->setText(file_name) ; _name_LE->setText(file_name) ;
_pluginIcon->setIcon(icon) ; _pluginIcon->setIcon(icon) ;
_pluginIcon->setText(QString()) ; _pluginIcon->setText(QString()) ;
msgLabel->setText(pluginDescription) ; msgLabel->setText(pluginDescription) ;
subjectLabel->setText(pluginTitle + " "+ pluginVersion) ; subjectLabel->setText(pluginTitle + " "+ pluginVersion) ;
infoLabel->setText(pluginTitle + " " + tr("will be enabled after your restart RetroShare.")) ; infoLabel->setText(pluginTitle + " " + tr("will be enabled after your restart RetroShare.")) ;
infoLabel->hide(); infoLabel->hide();
QObject::connect(_configure_PB,SIGNAL(clicked()),this,SLOT(configurePlugin())) ; 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() void PluginItem::enablePlugin()
{ {
emit( pluginEnabled(_hashLabel->text()) ) ; emit( pluginEnabled(_hashLabel->text()) ) ;
infoLabel->show(); infoLabel->show();
disableButton->show(); disableButton->show();
enableButton->hide(); enableButton->hide();
} }
void PluginItem::disablePlugin() void PluginItem::disablePlugin()
{ {
emit( pluginDisabled(_hashLabel->text()) ) ; emit( pluginDisabled(_hashLabel->text()) ) ;
infoLabel->hide(); infoLabel->hide();
enableButton->show(); enableButton->show();
disableButton->hide(); disableButton->hide();
} }