construct QObjects with parent
This commit is contained in:
parent
b267627376
commit
c1cc0ef6ed
|
@ -1,16 +1,16 @@
|
|||
#include <QDebug>
|
||||
#include "sacnexplorer.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
SacnExplorer::SacnExplorer(int argc, char *argv[])
|
||||
: QApplication(argc, argv)
|
||||
, settings_(new QSettings(this))
|
||||
{
|
||||
setOrganizationName("Company235");
|
||||
setOrganizationDomain("company235.com");
|
||||
setApplicationName(tr("sACN Explorer"));
|
||||
|
||||
// Persistant configuration
|
||||
settings_ = new QSettings();
|
||||
qDebug() << "Loaded application settings from" << settings_->fileName();
|
||||
settings_->beginGroup("ACN");
|
||||
auto cid = settings_->value("CID", QUuid::createUuid()).toUuid();
|
||||
|
@ -32,7 +32,7 @@ SacnExplorer::SacnExplorer(int argc, char *argv[])
|
|||
node_->discoveryStart();
|
||||
|
||||
// Multiverse Explorer
|
||||
window_ = new MultiverseView(nullptr, node_);
|
||||
window_ = new MultiverseWindow(nullptr, node_);
|
||||
window_->show();
|
||||
}
|
||||
|
||||
|
@ -40,15 +40,12 @@ SacnExplorer::SacnExplorer(int argc, char *argv[])
|
|||
SacnExplorer::~SacnExplorer()
|
||||
{
|
||||
saveSettings();
|
||||
|
||||
delete settings_;
|
||||
delete window_;
|
||||
delete node_;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief MultiverseView::saveSettings
|
||||
* @brief SacnExplorer::saveSettings
|
||||
*/
|
||||
void SacnExplorer::saveSettings()
|
||||
{
|
||||
|
@ -65,4 +62,3 @@ void SacnExplorer::saveSettings()
|
|||
settings_->endGroup();
|
||||
settings_->endGroup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue