Changeset 561 for trunk/src/gui/dialogs/qerrormessage.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/dialogs/qerrormessage.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 62 62 #include <stdlib.h> 63 63 64 #ifdef Q_ OS_WINCE64 #ifdef Q_WS_WINCE 65 65 extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp 66 66 extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp 67 67 68 68 #include "qguifunctions_wince.h" 69 #endif 70 71 #if defined(QT_SOFTKEYS_ENABLED) 72 #include <qaction.h> 73 #ifdef Q_WS_S60 74 #include "private/qt_s60_p.h" 75 #endif 69 76 #endif 70 77 … … 79 86 QTextEdit * errors; 80 87 QLabel * icon; 88 #ifdef QT_SOFTKEYS_ENABLED 89 QAction *okAction; 90 #endif 81 91 QQueue<QPair<QString, QString> > pending; 82 92 QSet<QString> doNotShow; … … 101 111 QSize QErrorMessageTextView::minimumSizeHint() const 102 112 { 103 #ifdef Q_ OS_WINCE113 #ifdef Q_WS_WINCE 104 114 if (qt_wince_is_mobile()) 105 115 if (qt_wince_is_high_dpi()) … … 116 126 QSize QErrorMessageTextView::sizeHint() const 117 127 { 118 #ifdef Q_ OS_WINCE128 #ifdef Q_WS_WINCE 119 129 if (qt_wince_is_mobile()) 120 130 if (qt_wince_is_high_dpi()) … … 125 135 return QSize(300, 100); 126 136 #else 137 138 #ifdef Q_WS_S60 139 const int smallerDimension = qMin(S60->screenHeightInPixels, S60->screenWidthInPixels); 140 // In S60 layout data, error messages seem to be one third of the screen height (in portrait) minus two. 141 return QSize(smallerDimension, smallerDimension/3-2); 142 #else 127 143 return QSize(250, 75); 128 #endif 144 #endif //Q_WS_S60 145 #endif //Q_WS_WINCE 129 146 } 130 147 … … 134 151 \brief The QErrorMessage class provides an error message display dialog. 135 152 136 \ingroup dialogs 137 \ingroup misc 153 \ingroup standard-dialog 138 154 139 155 An error message widget consists of a text label and a checkbox. The … … 241 257 grid->addWidget(d->again, 1, 1, Qt::AlignTop); 242 258 d->ok = new QPushButton(this); 243 #ifdef Q_OS_WINCE 259 #ifdef QT_SOFTKEYS_ENABLED 260 d->okAction = new QAction(d->ok); 261 d->okAction->setSoftKeyRole(QAction::PositiveSoftKey); 262 connect(d->okAction, SIGNAL(triggered()), this, SLOT(accept())); 263 addAction(d->okAction); 264 #endif 265 266 267 #if defined(Q_WS_WINCE) || defined(Q_WS_S60) 244 268 d->ok->setFixedSize(0,0); 245 269 #endif … … 301 325 qtMessageHandler = new QErrorMessage(0); 302 326 qAddPostRoutine(deleteStaticcQErrorMessage); // clean up 303 qtMessageHandler->setWindowTitle( qApp->applicationName());327 qtMessageHandler->setWindowTitle(QApplication::applicationName()); 304 328 qInstallMsgHandler(jump); 305 329 } … … 374 398 } 375 399 376 377 400 /*! 378 401 \reimp … … 391 414 again->setText(QErrorMessage::tr("&Show this message again")); 392 415 ok->setText(QErrorMessage::tr("&OK")); 416 #ifdef QT_SOFTKEYS_ENABLED 417 okAction->setText(ok->text()); 418 #endif 393 419 } 394 420
Note:
See TracChangeset
for help on using the changeset viewer.