summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2009-07-01 09:49:54 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-07-01 09:51:14 (GMT)
commit55137901012db28857fe7638e63c78743e277c56 (patch)
tree2361eb3eea67287bb22b9e3fb0690733ab76625f /src/gui/accessible
parentcfadf08a6c06ce319f6144e724f45e4923e72778 (diff)
downloadQt-55137901012db28857fe7638e63c78743e277c56.zip
Qt-55137901012db28857fe7638e63c78743e277c56.tar.gz
Qt-55137901012db28857fe7638e63c78743e277c56.tar.bz2
src/gui: Remove QT_WA and non-Unicode code paths, dropping Win9x and NT support
Also - Make winPeekMessage() & winPostMessage() obsolete - FlashWindowEx, IsValidLanguageGroup functions no longer resolved dynamically (available on >= Windows 2000) - LoadIcon/LoadCursor -> LoadImage w/LR_SHARED for system icons/cursors - qsystemtrayicon_win: use Shell_NotifyIconGetRect if available (Windows 7) Merge-request: 604 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/qaccessible_win.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/gui/accessible/qaccessible_win.cpp b/src/gui/accessible/qaccessible_win.cpp
index ccb2673..bfacb94 100644
--- a/src/gui/accessible/qaccessible_win.cpp
+++ b/src/gui/accessible/qaccessible_win.cpp
@@ -177,14 +177,14 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
return;
}
- QByteArray soundName;
+ QString soundName;
switch (reason) {
case PopupMenuStart:
- soundName = "MenuPopup";
+ soundName = QLatin1String("MenuPopup");
break;
case MenuCommand:
- soundName = "MenuCommand";
+ soundName = QLatin1String("MenuCommand");
break;
case Alert:
@@ -194,13 +194,13 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
if (mb) {
switch (mb->icon()) {
case QMessageBox::Warning:
- soundName = "SystemExclamation";
+ soundName = QLatin1String("SystemExclamation");
break;
case QMessageBox::Critical:
- soundName = "SystemHand";
+ soundName = QLatin1String("SystemHand");
break;
case QMessageBox::Information:
- soundName = "SystemAsterisk";
+ soundName = QLatin1String("SystemAsterisk");
break;
default:
break;
@@ -208,7 +208,7 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
} else
#endif // QT_NO_MESSAGEBOX
{
- soundName = "SystemAsterisk";
+ soundName = QLatin1String("SystemAsterisk");
}
}
@@ -219,20 +219,16 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason)
if (soundName.size()) {
#ifndef QT_NO_SETTINGS
- QSettings settings(QLatin1String("HKEY_CURRENT_USER\\AppEvents\\Schemes\\Apps\\.Default\\") +
- QString::fromLatin1(soundName.constData()), QSettings::NativeFormat);
+ QSettings settings(QLatin1String("HKEY_CURRENT_USER\\AppEvents\\Schemes\\Apps\\.Default\\") + soundName,
+ QSettings::NativeFormat);
QString file = settings.value(QLatin1String(".Current/.")).toString();
#else
- QString file;
+ QString file;
#endif
- if (!file.isEmpty()) {
- QT_WA({
- PlaySoundW(reinterpret_cast<const wchar_t *> (QString::fromLatin1(soundName).utf16()), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT );
- } , {
- PlaySoundA(soundName.constData(), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT );
- });
- }
- }
+ if (!file.isEmpty()) {
+ PlaySound(reinterpret_cast<const wchar_t *>(soundName.utf16()), 0, SND_ALIAS | SND_ASYNC | SND_NODEFAULT | SND_NOWAIT);
+ }
+ }
if (!isActive())
return;