build: reanimate the dead
Fix build with ndn-cxx 0.7.1 and ChronoSync 0.5.3
* Adapt to new API
* Upgrade to Qt5
* Several other bugs
Refs: #4563, #4087
Change-Id: Ic55d687caade08f557f9b9ec3e9569bc96798710
diff --git a/src/profile-editor.cpp b/src/profile-editor.cpp
index a55a12c..f0b067d 100644
--- a/src/profile-editor.cpp
+++ b/src/profile-editor.cpp
@@ -40,26 +40,31 @@
ProfileEditor::~ProfileEditor()
{
delete ui;
- delete m_tableModel;
+
+ if (m_tableModel)
+ delete m_tableModel;
}
void
ProfileEditor::onCloseDBModule()
{
- // _LOG_DEBUG("close db module");
if (m_tableModel) {
delete m_tableModel;
- // _LOG_DEBUG("tableModel closed");
+ m_tableModel = 0;
}
}
void
ProfileEditor::onIdentityUpdated(const QString& identity)
{
- m_tableModel = new QSqlTableModel();
-
m_identity = identity;
ui->identityInput->setText(identity);
+}
+
+void
+ProfileEditor::resetPanel()
+{
+ m_tableModel = new QSqlTableModel();
m_tableModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
m_tableModel->setTable("SelfProfile");