diff options
author | Iru Cai <mytbk920423@gmail.com> | 2014-05-03 20:55:35 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2014-05-03 20:55:35 +0800 |
commit | ad5f034e13797f1846d3f967e6db0f6137e1f1f3 (patch) | |
tree | db46c0bbf875f1b916572f251be42c8400e9e53e | |
parent | 4180e32a27f38cc7c0480fb0d6aeffe9705b2870 (diff) | |
download | fqterm-ad5f034e13797f1846d3f967e6db0f6137e1f1f3.tar.xz |
change code style
-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(); } |