Commit fa468ff5 authored by Jan Möbius's avatar Jan Möbius

Collect plugin load warnings ad errors and list them in the about dialog

parent bc4c5aef
......@@ -1225,6 +1225,10 @@ private slots:
/// Load all plugins from default plugin directory and from INI-File
void loadPlugins();
/// Print all info collected about plugin during loading
void printPluginLoadLog(const QString& errors,const QString& warnings);
private slots:
/// Show Plugins Dialog
void slotShowPlugins();
......
......@@ -85,6 +85,8 @@ class PluginInfo{
version(""),
path(""),
rpcName(""),
errors(""),
warnings(""),
optionsWidget(0),
buildIn(true),
status(FAILED)
......@@ -108,6 +110,8 @@ class PluginInfo{
version(_i.version),
path(_i.path),
rpcName(_i.rpcName),
errors(_i.errors),
warnings(_i.warnings),
rpcFunctions(_i.rpcFunctions),
slotInfos(_i.slotInfos),
keys(_i.keys),
......@@ -141,6 +145,12 @@ class PluginInfo{
/// Clean rpc name of the plugin
QString rpcName;
/// Store errors encountered during plugin loading
QString errors;
/// Store warnings encountered during plugin loading
QString warnings;
/// List of exported rpc slots
QStringList rpcFunctions;
......
This diff is collapsed.
......@@ -760,6 +760,19 @@ void CoreWidget::showAboutWidget( ) {
aboutWidget_->OpenFlipperAbout->append( "\t\t Version: \t\t" + plugins_[i].version );
aboutWidget_->OpenFlipperAbout->append( "\t\t Description: \t" + plugins_[i].description );
aboutWidget_->OpenFlipperAbout->append( "\t\t Path \t\t" + plugins_[i].path );
if ( !plugins_[i].warnings.isEmpty() ) {
aboutWidget_->OpenFlipperAbout->setTextColor(Qt::darkYellow);
aboutWidget_->OpenFlipperAbout->append( "\t\t Warnings: \t\t" + plugins_[i].warnings );
aboutWidget_->OpenFlipperAbout->setTextColor(Qt::black);
}
if ( !plugins_[i].errors.isEmpty() ) {
aboutWidget_->OpenFlipperAbout->setTextColor(Qt::darkRed);
aboutWidget_->OpenFlipperAbout->append( "\t\t Errors: \t\t" + plugins_[i].errors );
aboutWidget_->OpenFlipperAbout->setTextColor(Qt::black);
}
}
// =====================================================================================
......
......@@ -1280,6 +1280,7 @@ public:
private :
/// reference to Core plugin list
std::vector<PluginInfo>& plugins_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment