SatellitesDialog.cpp   SatellitesDialog.cpp 
skipping to change at line 53 skipping to change at line 53
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelMainView.hpp" #include "StelMainView.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
SatellitesDialog::SatellitesDialog() SatellitesDialog::SatellitesDialog()
: StelDialog("Satellites") : StelDialog("Satellites")
, satelliteModified(false) , satelliteModified(false)
, updateTimer(0) , updateTimer(Q_NULLPTR)
, importWindow(0) , importWindow(Q_NULLPTR)
, filterModel(0) , filterModel(Q_NULLPTR)
, checkStateRole(Qt::UserRole) , checkStateRole(Qt::UserRole)
{ {
ui = new Ui_satellitesDialog; ui = new Ui_satellitesDialog;
} }
SatellitesDialog::~SatellitesDialog() SatellitesDialog::~SatellitesDialog()
{ {
if (updateTimer) if (updateTimer)
{ {
updateTimer->stop(); updateTimer->stop();
delete updateTimer; delete updateTimer;
updateTimer = NULL; updateTimer = Q_NULLPTR;
} }
if (importWindow) if (importWindow)
{ {
delete importWindow; delete importWindow;
importWindow = 0; importWindow = Q_NULLPTR;
} }
delete ui; delete ui;
} }
void SatellitesDialog::retranslate() void SatellitesDialog::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
skipping to change at line 540 skipping to change at line 540
} }
if (!QUrl(u).isValid() || !u.contains("://")) if (!QUrl(u).isValid() || !u.contains("://"))
{ {
qDebug() << "SatellitesDialog::sourceEditingDone invalid URL - not saving : " << u; qDebug() << "SatellitesDialog::sourceEditingDone invalid URL - not saving : " << u;
return; return;
} }
// Changes to item data (text or check state) are connected to // Changes to item data (text or check state) are connected to
// saveSourceList(), so there's no need to call it explicitly. // saveSourceList(), so there's no need to call it explicitly.
if (ui->sourceList->currentItem()!=NULL) if (ui->sourceList->currentItem()!=Q_NULLPTR)
ui->sourceList->currentItem()->setText(u); ui->sourceList->currentItem()->setText(u);
else if (ui->sourceList->findItems(u, Qt::MatchExactly).count() <= 0 ) else if (ui->sourceList->findItems(u, Qt::MatchExactly).count() <= 0 )
{ {
QListWidgetItem* i = new QListWidgetItem(u, ui->sourceList); ; QListWidgetItem* i = new QListWidgetItem(u, ui->sourceList); ;
i->setData(checkStateRole, Qt::Unchecked); i->setData(checkStateRole, Qt::Unchecked);
i->setSelected(true); i->setSelected(true);
} }
} }
void SatellitesDialog::saveSourceList(void) void SatellitesDialog::saveSourceList(void)
skipping to change at line 574 skipping to change at line 574
{ {
ui->sourceEdit->clear(); ui->sourceEdit->clear();
if (ui->sourceList->currentItem()) if (ui->sourceList->currentItem())
delete ui->sourceList->currentItem(); delete ui->sourceList->currentItem();
saveSourceList(); saveSourceList();
} }
void SatellitesDialog::addSourceRow(void) void SatellitesDialog::addSourceRow(void)
{ {
ui->sourceList->setCurrentItem(NULL); ui->sourceList->setCurrentItem(Q_NULLPTR);
ui->sourceEdit->setText(q_("[new source]")); ui->sourceEdit->setText(q_("[new source]"));
ui->sourceEdit->selectAll(); ui->sourceEdit->selectAll();
ui->sourceEdit->setFocus(); ui->sourceEdit->setFocus();
} }
void SatellitesDialog::toggleCheckableSources() void SatellitesDialog::toggleCheckableSources()
{ {
QListWidget* list = ui->sourceList; QListWidget* list = ui->sourceList;
if (list->count() < 1) if (list->count() < 1)
return; // Saves effort checking it on every step return; // Saves effort checking it on every step
 End of changes. 5 change blocks. 
7 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/