raw -> smart pointer for musredit where it makes sence.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user