The old code used manual memory mangement (raw new/delete) to
(de)allocate the Ui struct. This is so 80s.
Use an owning smart pointer to manage the memory. Ordinarily, this
would have been QScopedPointer, but seeing as that doesn't have a
create() method to hide the raw new, use std::unique_ptr and
std::make_unique() instead.
Amends
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| browser.cpp | ||
| browser.h | ||
| browserwidget.ui | ||
| connectionwidget.cpp | ||
| connectionwidget.h | ||
| main.cpp | ||
| qsqlconnectiondialog.cpp | ||
| qsqlconnectiondialog.h | ||
| qsqlconnectiondialog.ui | ||
| sqlbrowser.pro | ||