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

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

parent bc4c5aef
...@@ -1225,6 +1225,10 @@ private slots: ...@@ -1225,6 +1225,10 @@ private slots:
/// Load all plugins from default plugin directory and from INI-File /// Load all plugins from default plugin directory and from INI-File
void loadPlugins(); void loadPlugins();
/// Print all info collected about plugin during loading
void printPluginLoadLog(const QString& errors,const QString& warnings);
private slots: private slots:
/// Show Plugins Dialog /// Show Plugins Dialog
void slotShowPlugins(); void slotShowPlugins();
......
...@@ -85,6 +85,8 @@ class PluginInfo{ ...@@ -85,6 +85,8 @@ class PluginInfo{
version(""), version(""),
path(""), path(""),
rpcName(""), rpcName(""),
errors(""),
warnings(""),
optionsWidget(0), optionsWidget(0),
buildIn(true), buildIn(true),
status(FAILED) status(FAILED)
...@@ -108,6 +110,8 @@ class PluginInfo{ ...@@ -108,6 +110,8 @@ class PluginInfo{
version(_i.version), version(_i.version),
path(_i.path), path(_i.path),
rpcName(_i.rpcName), rpcName(_i.rpcName),
errors(_i.errors),
warnings(_i.warnings),
rpcFunctions(_i.rpcFunctions), rpcFunctions(_i.rpcFunctions),
slotInfos(_i.slotInfos), slotInfos(_i.slotInfos),
keys(_i.keys), keys(_i.keys),
...@@ -141,6 +145,12 @@ class PluginInfo{ ...@@ -141,6 +145,12 @@ class PluginInfo{
/// Clean rpc name of the plugin /// Clean rpc name of the plugin
QString rpcName; QString rpcName;
/// Store errors encountered during plugin loading
QString errors;
/// Store warnings encountered during plugin loading
QString warnings;
/// List of exported rpc slots /// List of exported rpc slots
QStringList rpcFunctions; QStringList rpcFunctions;
......
This diff is collapsed.
...@@ -760,6 +760,19 @@ void CoreWidget::showAboutWidget( ) { ...@@ -760,6 +760,19 @@ void CoreWidget::showAboutWidget( ) {
aboutWidget_->OpenFlipperAbout->append( "\t\t Version: \t\t" + plugins_[i].version ); 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 Description: \t" + plugins_[i].description );
aboutWidget_->OpenFlipperAbout->append( "\t\t Path \t\t" + plugins_[i].path ); 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: ...@@ -1280,6 +1280,7 @@ public:
private : private :
/// reference to Core plugin list
std::vector<PluginInfo>& plugins_; 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