summaryrefslogtreecommitdiff
authorzecke <zecke>2005-03-12 23:35:32 (UTC)
committer zecke <zecke>2005-03-12 23:35:32 (UTC)
commit0dde10390f3b9c85030741e861d893a6a78fbbb1 (patch) (side-by-side diff)
tree7683792d362561329887000b8ff0fa16978360f7
parent69962e7b69ebf91c01a1354d7870f4ca7a81aa06 (diff)
downloadopie-0dde10390f3b9c85030741e861d893a6a78fbbb1.zip
opie-0dde10390f3b9c85030741e861d893a6a78fbbb1.tar.gz
opie-0dde10390f3b9c85030741e861d893a6a78fbbb1.tar.bz2
-Fix compiler warning about a unused variable (nomax)
-The code seems to be twisted, and needs to be done the other way around (I will probably reconsider that statement with enough sleep tomorrow)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/widget_showing.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/widget_showing.cpp b/library/widget_showing.cpp
index 43d19b0..ee63759 100644
--- a/library/widget_showing.cpp
+++ b/library/widget_showing.cpp
@@ -24,55 +24,56 @@
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <qtopia/qpeapplication.h>
#ifdef Q_WS_QWS
extern Q_EXPORT QRect qt_maxWindowRect;
#endif
void QPEApplication::showDialog( QDialog* d, bool nomax )
{
showWidget( d, nomax );
}
int QPEApplication::execDialog( QDialog* d, bool nomax )
{
showDialog( d, nomax );
return d->exec();
}
void QPEApplication::showWidget( QWidget* wg, bool nomax ) {
if ( wg->isVisible() ) {
wg->show();
return;
}
#ifndef OPIE_NO_WINDOWED
+ Q_UNUSED( nomax )
if ( TRUE ) {
#else
if ( !nomax
&& ( qApp->desktop()->width() <= 320 ) ){
#endif
wg->showMaximized();
} else {
#ifdef Q_WS_QWS
QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() );
#else
QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() );
#endif
QSize sh = wg->sizeHint();
int w = QMAX( sh.width(), wg->width() );
int h = QMAX( sh.height(), wg->height() );
// desktop widget-frame taskbar
w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) );
h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) );
wg->resize( w, h );
wg->show();
}
}