author | erik <erik> | 2007-01-24 19:54:07 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-24 19:54:07 (UTC) |
commit | 89e81059e832ff77c2f0ac8b9db12f80eafa03fc (patch) (side-by-side diff) | |
tree | 99a130fc643d2aeefdecab452f644e7b61a5f50e /library/qpeapplication.cpp | |
parent | 035bbc5bf689839c8d8e7be37f347b0dd900fccf (diff) | |
download | opie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.zip opie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.tar.gz opie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.tar.bz2 |
Each file in this commit has an instance where a pointer is checked at
one point in the code and then not checked in another point in the code.
If it needed to be checked once, it needs to be checked the other time. If not
the application could segfault.
-rw-r--r-- | library/qpeapplication.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 34f5e6a..d959c7a 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -1760,31 +1760,31 @@ void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) Sets widget \a mw as the mainWidget() and shows it. For small windows, consider passing TRUE for \a nomaximize rather than the default FALSE. This calls designates the application as a \link docwidget.html document-oriented\endlink application. The \a mw widget \e must have this slot: setDocument(const QString&). \sa showMainWidget() */ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) { - if ( mw && argc() == 2 ) + if ( mw ) { + if ( argc() == 2 ) Global::setDocument( mw, QString::fromUtf8(argv()[1]) ); - -// setMainWidget(mw); see above d->show(mw, nomaximize ); } +} /*! If an application is started via a \link qcop.html QCop\endlink message, the application will process the \link qcop.html QCop\endlink message and then quit. If the application calls this function while processing a \link qcop.html QCop\endlink message, after processing its outstanding \link qcop.html QCop\endlink messages the application will start 'properly' and show itself. \sa keepRunning() */ |