diff options
-rw-r--r-- | src/fqterm/main.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/fqterm/main.cpp b/src/fqterm/main.cpp index 40969fd..ae9eebb 100644 --- a/src/fqterm/main.cpp +++ b/src/fqterm/main.cpp @@ -123,13 +123,12 @@ int main(int argc, char **argv) { return -1; } - FQTermFrame *mw = new FQTermFrame(); - mw->setWindowTitle("FQTerm " + QString(FQTERM_VERSION_STRING)); - mw->setWindowIcon(QPixmap(getPath(RESOURCE) + "pic/fqterm.png")); - mw->show(); + FQTermFrame mw; + mw.setWindowTitle("FQTerm " + QString(FQTERM_VERSION_STRING)); + mw.setWindowIcon(QPixmap(getPath(RESOURCE) + "pic/fqterm.png")); + mw.show(); a.setQuitOnLastWindowClosed(false); - FQ_VERIFY(a.connect(mw, SIGNAL(destroyed(QObject*)), &a, SLOT(mainWindowDestroyed(QObject*)), Qt::QueuedConnection)); - FQ_VERIFY(a.connect(&a, SIGNAL(saveData()), mw, SLOT(saveSetting()))); - int res = a.exec(); - return res; + FQ_VERIFY(a.connect(&mw, SIGNAL(destroyed(QObject*)), &a, SLOT(mainWindowDestroyed(QObject*)), Qt::QueuedConnection)); + FQ_VERIFY(a.connect(&a, SIGNAL(saveData()), &mw, SLOT(saveSetting()))); + return a.exec(); } |