From 22175df8d30d278c8bd7ec3cf51176c4ba16d84a Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Fri, 8 Jul 2011 00:56:05 +0300 Subject: [PATCH 1/2] Changed: Fixed crash ovqt, when clicked on the apply button in settings dialog. --- .../object_viewer_qt/src/plugins/log/log_plugin.cpp | 2 +- .../src/plugins/log/log_settings_page.cpp | 11 +++-------- .../src/plugins/log/log_settings_page.h | 5 ++++- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp index 2f88200ec..f31a63924 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp @@ -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; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp index f75d6ab37..3aba359a5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp @@ -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(plugin); - if (lp) - { - lp->setDisplayers(); - } + m_logPlugin->setDisplayers(); } void CLogSettingsPage::readSettings() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.h index 2c0c5ed98..b8a5fd604 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.h @@ -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; From 15d72ea9e728667b4091d3e4d85aac135923b0e4 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Sun, 10 Jul 2011 01:10:41 +0300 Subject: [PATCH 2/2] Changed: Improved performance landscape plugin under Linux. --- code/nel/tools/3d/object_viewer_qt/src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/tools/3d/object_viewer_qt/src/main.cpp b/code/nel/tools/3d/object_viewer_qt/src/main.cpp index 15173fa5c..050b7716c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/main.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/main.cpp @@ -124,6 +124,7 @@ sint main(int argc, char **argv) nlinfo("Welcome to NeL Object Viewer Qt!"); } + QApplication::setGraphicsSystem("raster"); QApplication app(argc, argv); QSplashScreen *splash = new QSplashScreen(); splash->setPixmap(QPixmap(":/images/nel_ide_load.png"));