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"
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();
}