Changed: Fixed crash ovqt, when clicked on the apply button in settings dialog.
This commit is contained in:
parent
0fcd267f7e
commit
fb7912e5d2
3 changed files with 8 additions and 10 deletions
|
@ -68,7 +68,7 @@ namespace Plugin
|
|||
{
|
||||
Q_UNUSED(errorString);
|
||||
m_plugMan = pluginManager;
|
||||
m_logSettingsPage = new CLogSettingsPage(this);
|
||||
m_logSettingsPage = new CLogSettingsPage(this, this);
|
||||
addAutoReleasedObject(m_logSettingsPage);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -38,8 +38,9 @@ namespace Plugin
|
|||
|
||||
class CLogPlugin;
|
||||
|
||||
CLogSettingsPage::CLogSettingsPage(QObject *parent)
|
||||
CLogSettingsPage::CLogSettingsPage(CLogPlugin *logPlugin, QObject *parent)
|
||||
: IOptionsPage(parent),
|
||||
m_logPlugin(logPlugin),
|
||||
m_currentPage(NULL),
|
||||
m_error(true),
|
||||
m_warning(true),
|
||||
|
@ -98,13 +99,7 @@ namespace Plugin
|
|||
m_info = m_ui.infoCheck->isChecked();
|
||||
|
||||
writeSettings();
|
||||
ExtensionSystem::IPluginManager *p = Core::ICore::instance()->pluginManager();
|
||||
ExtensionSystem::IPlugin *plugin = p->pluginByName("LogPlugin")->plugin();
|
||||
CLogPlugin* lp = dynamic_cast<CLogPlugin*>(plugin);
|
||||
if (lp)
|
||||
{
|
||||
lp->setDisplayers();
|
||||
}
|
||||
m_logPlugin->setDisplayers();
|
||||
}
|
||||
|
||||
void CLogSettingsPage::readSettings()
|
||||
|
|
|
@ -29,6 +29,8 @@ class QWidget;
|
|||
|
||||
namespace Plugin
|
||||
{
|
||||
class CLogPlugin;
|
||||
|
||||
/**
|
||||
@class CLogSettingsPage
|
||||
*/
|
||||
|
@ -36,7 +38,7 @@ namespace Plugin
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CLogSettingsPage(QObject *parent = 0);
|
||||
CLogSettingsPage(CLogPlugin *logPlugin, QObject *parent = 0);
|
||||
virtual ~CLogSettingsPage() {}
|
||||
|
||||
virtual QString id() const;
|
||||
|
@ -53,6 +55,7 @@ namespace Plugin
|
|||
void readSettings();
|
||||
void writeSettings();
|
||||
|
||||
CLogPlugin *m_logPlugin;
|
||||
QWidget *m_currentPage;
|
||||
Ui::CLogSettingsPage m_ui;
|
||||
|
||||
|
|
Loading…
Reference in a new issue