summaryrefslogtreecommitdiff
path: root/src/fqterm
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2014-05-03 20:55:35 +0800
committerIru Cai <mytbk920423@gmail.com>2014-05-03 20:55:35 +0800
commitad5f034e13797f1846d3f967e6db0f6137e1f1f3 (patch)
treedb46c0bbf875f1b916572f251be42c8400e9e53e /src/fqterm
parent4180e32a27f38cc7c0480fb0d6aeffe9705b2870 (diff)
downloadfqterm-ad5f034e13797f1846d3f967e6db0f6137e1f1f3.tar.xz
change code style
Diffstat (limited to 'src/fqterm')
-rw-r--r--src/fqterm/main.cpp15
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();
}