OSDN Git Service

Some initialization and removed redundant member variables
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Wed, 2 Jun 2010 12:51:03 +0000 (14:51 +0200)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Wed, 2 Jun 2010 12:53:44 +0000 (14:53 +0200)
Reviewed-by: kh1
src/plugins/help/generalsettingspage.cpp
src/plugins/help/generalsettingspage.h
src/plugins/help/searchwidget.cpp

index 79707b9..edc20b5 100644 (file)
@@ -108,18 +108,18 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent)
     }
     m_ui.homePageLineEdit->setText(m_homePage);
 
-    m_startOption = engine.customValue(QLatin1String("StartOption"), 2).toInt();
-    m_ui.helpStartComboBox->setCurrentIndex(m_startOption);
+    int startOption = engine.customValue(QLatin1String("StartOption"), 2).toInt();
+    m_ui.helpStartComboBox->setCurrentIndex(startOption);
 
-    m_helpOption = engine.customValue(QLatin1String("ContextHelpOption"), 0).toInt();
-    m_ui.contextHelpComboBox->setCurrentIndex(m_helpOption);
+    int helpOption = engine.customValue(QLatin1String("ContextHelpOption"), 0).toInt();
+    m_ui.contextHelpComboBox->setCurrentIndex(helpOption);
 
     connect(m_ui.currentPageButton, SIGNAL(clicked()), this, SLOT(setCurrentPage()));
     connect(m_ui.blankPageButton, SIGNAL(clicked()), this, SLOT(setBlankPage()));
     connect(m_ui.defaultPageButton, SIGNAL(clicked()), this, SLOT(setDefaultPage()));
 
     HelpViewer *viewer = CentralWidget::instance()->currentHelpViewer();
-    if (viewer == 0)
+    if (!viewer)
         m_ui.currentPageButton->setEnabled(false);
 
     m_ui.errorLabel->setVisible(false);
index dbfc97e..9d8370b 100644 (file)
@@ -76,8 +76,6 @@ private:
     QFont m_font;
     QFontDatabase m_fontDatabase;
 
-    int m_helpOption;
-    int m_startOption;
     QString m_homePage;
 
     QString m_searchKeywords;
index 1e2536c..933abd3 100644 (file)
@@ -56,6 +56,7 @@ SearchWidget::SearchWidget()
     : zoomCount(0)
     , m_progress(0)
     , searchEngine(0)
+    , resultWidget(0)
 {
 }