Changeset 561 for trunk/src/gui/accessible/qaccessible_win.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/accessible/qaccessible_win.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 ** … … 51 51 #include <winuser.h> 52 52 #if !defined(WINABLEAPI) 53 # if defined(Q_ OS_WINCE)53 # if defined(Q_WS_WINCE) 54 54 # include <bldver.h> 55 55 # endif … … 62 62 #endif 63 63 64 #ifdef Q_ OS_WINCE64 #ifdef Q_WS_WINCE 65 65 #include "qguifunctions_wince.h" 66 66 #endif … … 178 178 } 179 179 180 Q ByteArraysoundName;180 QString soundName; 181 181 switch (reason) { 182 182 case PopupMenuStart: 183 soundName = "MenuPopup";183 soundName = QLatin1String("MenuPopup"); 184 184 break; 185 185 186 186 case MenuCommand: 187 soundName = "MenuCommand";187 soundName = QLatin1String("MenuCommand"); 188 188 break; 189 189 … … 195 195 switch (mb->icon()) { 196 196 case QMessageBox::Warning: 197 soundName = "SystemExclamation";197 soundName = QLatin1String("SystemExclamation"); 198 198 break; 199 199 case QMessageBox::Critical: 200 soundName = "SystemHand";200 soundName = QLatin1String("SystemHand"); 201 201 break; 202 202 case QMessageBox::Information: 203 soundName = "SystemAsterisk";203 soundName = QLatin1String("SystemAsterisk"); 204 204 break; 205 205 default: … … 209 209 #endif // QT_NO_MESSAGEBOX 210 210 { 211 soundName = "SystemAsterisk";211 soundName = QLatin1String("SystemAsterisk"); 212 212 } 213 213 … … 220 220 if (soundName.size()) { 221 221 #ifndef QT_NO_SETTINGS 222 QSettings settings(QLatin1String("HKEY_CURRENT_USER\\AppEvents\\Schemes\\Apps\\.Default\\") + 223 QString::fromLatin1(soundName.constData()),QSettings::NativeFormat);222 QSettings settings(QLatin1String("HKEY_CURRENT_USER\\AppEvents\\Schemes\\Apps\\.Default\\") + soundName, 223 QSettings::NativeFormat); 224 224 QString file = settings.value(QLatin1String(".Current/.")).toString(); 225 225 #else 226 226 QString file; 227 227 #endif 228 if (!file.isEmpty()) { 229 QT_WA({ 230 PlaySoundW(reinterpret_cast<const wchar_t *> (QString::fromLatin1(soundName).utf16()), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT ); 231 } , { 232 PlaySoundA(soundName.constData(), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT ); 233 }); 234 } 235 } 228 if (!file.isEmpty()) { 229 PlaySound(reinterpret_cast<const wchar_t *>(soundName.utf16()), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT); 230 } 231 } 236 232 237 233 if (!isActive()) … … 240 236 typedef void (WINAPI *PtrNotifyWinEvent)(DWORD, HWND, LONG, LONG); 241 237 242 #if defined(Q_ OS_WINCE) // ### TODO: check for NotifyWinEvent in CE 6.0238 #if defined(Q_WS_WINCE) // ### TODO: check for NotifyWinEvent in CE 6.0 243 239 // There is no user32.lib nor NotifyWinEvent for CE 244 240 return; … … 271 267 if (reason != QAccessible::ContextHelpStart && 272 268 reason != QAccessible::ContextHelpEnd) 273 w = qApp->focusWidget();269 w = QApplication::focusWidget(); 274 270 if (!w) { 275 w = qApp->activeWindow();271 w = QApplication::activeWindow(); 276 272 277 273 if (!w) … … 290 286 ptrNotifyWinEvent(reason, w->winId(), OBJID_CLIENT, who); 291 287 } 292 #endif // Q_ OS_WINCE288 #endif // Q_WS_WINCE 293 289 } 294 290 … … 1056 1052 Role role = accessible->role(varID.lVal); 1057 1053 if (role != NoRole) { 1054 if (role == LayeredPane) 1055 role = QAccessible::Pane; 1058 1056 (*pvarRole).vt = VT_I4; 1059 1057 (*pvarRole).lVal = role;
Note:
See TracChangeset
for help on using the changeset viewer.