Help: Use nullptr and fix a few warnings

Change-Id: I7f7307a765d8755bf96b0cad1210e61df0a0199f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2018-04-19 10:47:13 +02:00
parent 0e81d01b2a
commit da18fc1f50
29 changed files with 70 additions and 77 deletions

View File

@@ -50,7 +50,6 @@ using namespace Core;
using namespace Help::Internal;
GeneralSettingsPage::GeneralSettingsPage()
: m_ui(0)
{
setId("A.General settings");
setDisplayName(tr("General"));
@@ -145,13 +144,13 @@ void GeneralSettingsPage::apply()
const int startOption = m_ui->helpStartComboBox->currentIndex();
if (m_startOption != startOption) {
m_startOption = startOption;
LocalHelpManager::setStartOption((LocalHelpManager::StartOption)m_startOption);
LocalHelpManager::setStartOption(LocalHelpManager::StartOption(m_startOption));
}
const int helpOption = m_ui->contextHelpComboBox->currentIndex();
if (m_contextOption != helpOption) {
m_contextOption = helpOption;
LocalHelpManager::setContextHelpOption((HelpManager::HelpViewerLocation)m_contextOption);
LocalHelpManager::setContextHelpOption(HelpManager::HelpViewerLocation(m_contextOption));
}
const bool close = m_ui->m_returnOnClose->isChecked();
@@ -327,5 +326,5 @@ void GeneralSettingsPage::finish()
if (!m_ui) // page was never shown
return;
delete m_ui;
m_ui = 0;
m_ui = nullptr;
}