author | zecke <zecke> | 2005-03-12 23:35:32 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-03-12 23:35:32 (UTC) |
commit | 0dde10390f3b9c85030741e861d893a6a78fbbb1 (patch) (unidiff) | |
tree | 7683792d362561329887000b8ff0fa16978360f7 /library | |
parent | 69962e7b69ebf91c01a1354d7870f4ca7a81aa06 (diff) | |
download | opie-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)
-rw-r--r-- | library/widget_showing.cpp | 1 |
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 @@ | |||
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <qtopia/qpeapplication.h> | 32 | #include <qtopia/qpeapplication.h> |
33 | 33 | ||
34 | #ifdef Q_WS_QWS | 34 | #ifdef Q_WS_QWS |
35 | extern Q_EXPORT QRect qt_maxWindowRect; | 35 | extern Q_EXPORT QRect qt_maxWindowRect; |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | void QPEApplication::showDialog( QDialog* d, bool nomax ) | 38 | void QPEApplication::showDialog( QDialog* d, bool nomax ) |
39 | { | 39 | { |
40 | showWidget( d, nomax ); | 40 | showWidget( d, nomax ); |
41 | } | 41 | } |
42 | 42 | ||
43 | int QPEApplication::execDialog( QDialog* d, bool nomax ) | 43 | int QPEApplication::execDialog( QDialog* d, bool nomax ) |
44 | { | 44 | { |
45 | showDialog( d, nomax ); | 45 | showDialog( d, nomax ); |
46 | return d->exec(); | 46 | return d->exec(); |
47 | } | 47 | } |
48 | 48 | ||
49 | void QPEApplication::showWidget( QWidget* wg, bool nomax ) { | 49 | void QPEApplication::showWidget( QWidget* wg, bool nomax ) { |
50 | if ( wg->isVisible() ) { | 50 | if ( wg->isVisible() ) { |
51 | wg->show(); | 51 | wg->show(); |
52 | return; | 52 | return; |
53 | } | 53 | } |
54 | 54 | ||
55 | #ifndef OPIE_NO_WINDOWED | 55 | #ifndef OPIE_NO_WINDOWED |
56 | Q_UNUSED( nomax ) | ||
56 | if ( TRUE ) { | 57 | if ( TRUE ) { |
57 | #else | 58 | #else |
58 | if ( !nomax | 59 | if ( !nomax |
59 | && ( qApp->desktop()->width() <= 320 ) ){ | 60 | && ( qApp->desktop()->width() <= 320 ) ){ |
60 | #endif | 61 | #endif |
61 | wg->showMaximized(); | 62 | wg->showMaximized(); |
62 | } else { | 63 | } else { |
63 | #ifdef Q_WS_QWS | 64 | #ifdef Q_WS_QWS |
64 | QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); | 65 | QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() ); |
65 | #else | 66 | #else |
66 | QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); | 67 | QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() ); |
67 | #endif | 68 | #endif |
68 | 69 | ||
69 | QSize sh = wg->sizeHint(); | 70 | QSize sh = wg->sizeHint(); |
70 | int w = QMAX( sh.width(), wg->width() ); | 71 | int w = QMAX( sh.width(), wg->width() ); |
71 | int h = QMAX( sh.height(), wg->height() ); | 72 | int h = QMAX( sh.height(), wg->height() ); |
72 | // desktop widget-frame taskbar | 73 | // desktop widget-frame taskbar |
73 | w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) ); | 74 | w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) ); |
74 | h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) ); | 75 | h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) ); |
75 | wg->resize( w, h ); | 76 | wg->resize( w, h ); |
76 | wg->show(); | 77 | wg->show(); |
77 | } | 78 | } |
78 | } | 79 | } |