mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #19 from sehraf/pr-fix_crash_on_shutdown
Thx sehraf. Indeed, the object was created twice, before your patch. Not good.
This commit is contained in:
commit
13e77fb7e5
@ -391,17 +391,17 @@ void MainWindow::initStackedPage()
|
||||
std::cerr << "Looking for interfaces in existing plugins:" << std::endl;
|
||||
for(int i = 0;i<rsPlugins->nbPlugins();++i)
|
||||
{
|
||||
QIcon icon ;
|
||||
MainPage *pluginPage = NULL;
|
||||
QIcon icon, *pIcon = NULL;
|
||||
|
||||
if(rsPlugins->plugin(i) != NULL && rsPlugins->plugin(i)->qt_page() != NULL)
|
||||
if(rsPlugins->plugin(i) != NULL && (pluginPage = rsPlugins->plugin(i)->qt_page()) != NULL)
|
||||
{
|
||||
if(rsPlugins->plugin(i)->qt_icon() != NULL)
|
||||
icon = *rsPlugins->plugin(i)->qt_icon() ;
|
||||
if((pIcon = rsPlugins->plugin(i)->qt_icon()) != NULL)
|
||||
icon = *pIcon ;
|
||||
else
|
||||
icon = QIcon(":images/extension_48.png") ;
|
||||
|
||||
std::cerr << " Addign widget page for plugin " << rsPlugins->plugin(i)->getPluginName() << std::endl;
|
||||
MainPage *pluginPage = rsPlugins->plugin(i)->qt_page();
|
||||
pluginPage->setIconPixmap(icon);
|
||||
pluginPage->setPageName(QString::fromUtf8(rsPlugins->plugin(i)->getPluginName().c_str()));
|
||||
addPage(pluginPage, grp, ¬ify);
|
||||
|
@ -90,8 +90,9 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WindowFlags flags)
|
||||
|
||||
if(plugin!=NULL)
|
||||
{
|
||||
if(plugin->qt_icon() != NULL)
|
||||
plugin_icon = *plugin->qt_icon() ;
|
||||
QIcon *icon = plugin->qt_icon();
|
||||
if(icon != NULL)
|
||||
plugin_icon = *icon ;
|
||||
|
||||
pluginTitle = QString::fromUtf8(plugin->getPluginName().c_str()) ;
|
||||
pluginDescription = QString::fromUtf8(plugin->getShortPluginDescription().c_str()) ;
|
||||
@ -169,8 +170,9 @@ void PluginsPage::aboutPlugin(int i)
|
||||
{
|
||||
std::cerr << "Launching about window for plugin " << i << std::endl;
|
||||
|
||||
if(rsPlugins->plugin(i) != NULL && rsPlugins->plugin(i)->qt_about_page() != NULL)
|
||||
rsPlugins->plugin(i)->qt_about_page()->exec() ;
|
||||
QDialog *dialog = NULL;
|
||||
if(rsPlugins->plugin(i) != NULL && (dialog = rsPlugins->plugin(i)->qt_about_page()) != NULL)
|
||||
dialog->exec() ;
|
||||
}
|
||||
void PluginsPage::configurePlugin(int i)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user