raw -> smart pointer for musredit where it makes sence.

This commit is contained in:
2023-10-21 22:33:19 +02:00
parent be29e55834
commit 89146f3cee
12 changed files with 70 additions and 92 deletions

View File

@@ -28,6 +28,7 @@
***************************************************************************/
#include <iostream>
#include <memory>
#include <QApplication>
@@ -66,12 +67,12 @@ int main( int argc, char ** argv )
QApplication a( argc, argv );
PTextEdit *mw = new PTextEdit();
std::unique_ptr<PTextEdit> mw = std::make_unique<PTextEdit>();
mw->setWindowTitle( "MusrFit Editor" );
mw->resize( mw->getEditW(), mw->getEditH() );
mw->show();
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
a.connect( &a, SIGNAL( aboutToQuit() ), mw, SLOT( aboutToQuit() ) );
a.connect( &a, SIGNAL( aboutToQuit() ), mw.get(), SLOT( aboutToQuit() ) );
return a.exec();
}