[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/runtime/phonon
From: Jonathan Michael Thomas <echidnaman () kubuntu ! org>
Date: 2009-12-17 4:48:33
Message-ID: 1261025313.000126.16251.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1063138 by jmthomas:
Krazy2 fixes:
- Encapsulate single chars such as \n in single quotes rather than double quotes for efficiency
- Pass QLatin1Strings to QString::startsWith for efficiency
- Use a KComboBox rather than a QComboBox in xineoptions.ui
M +1 -1 kcm/xine/xineoptions.ui
M +17 -17 kded-module/phononserver.cpp
M +11 -11 libkaudiodevicelist/audiodevice.cpp
M +6 -6 libkaudiodevicelist/audiodeviceenumerator.cpp
M +3 -3 platform_kde/kdeplatformplugin.h
--- trunk/KDE/kdebase/runtime/phonon/kcm/xine/xineoptions.ui #1063137:1063138
@@ -72,7 +72,7 @@
</widget>
</item>
<item row="1" column="1" >
- <widget class="QComboBox" name="deinterlaceMethodBox" />
+ <widget class="KComboBox" name="deinterlaceMethodBox" />
</item>
<item row="2" column="0" >
<spacer>
--- trunk/KDE/kdebase/runtime/phonon/kded-module/phononserver.cpp #1063137:1063138
@@ -171,15 +171,15 @@
nextHint.name = QString::fromUtf8(x);
free(x);
- if (nextHint.name.startsWith("front:") ||
+ if (nextHint.name.startsWith(QLatin1String("front:")) ||
/*nextHint.name.startsWith("rear:") ||
nextHint.name.startsWith("center_lfe:") ||*/
- nextHint.name.startsWith("surround40:") ||
- nextHint.name.startsWith("surround41:") ||
- nextHint.name.startsWith("surround50:") ||
- nextHint.name.startsWith("surround51:") ||
- nextHint.name.startsWith("surround71:") ||
- nextHint.name.startsWith("default:") ||
+ nextHint.name.startsWith(QLatin1String("surround40:")) ||
+ nextHint.name.startsWith(QLatin1String("surround41:")) ||
+ nextHint.name.startsWith(QLatin1String("surround50:")) ||
+ nextHint.name.startsWith(QLatin1String("surround51:")) ||
+ nextHint.name.startsWith(QLatin1String("surround71:")) ||
+ nextHint.name.startsWith(QLatin1String("default:")) ||
nextHint.name == "null"
) {
continue;
@@ -202,21 +202,21 @@
const QString &description = deviceHint.description;
const QString &uniqueId = description;
//const QString &udi = alsaDeviceName;
- const QStringList &lines = description.split("\n");
+ const QStringList &lines = description.split('\n');
bool isAdvanced = false;
QString cardName = lines.first();
if (lines.size() > 1) {
cardName = i18nc("%1 is the sound card name, %2 is the description in case it exists", "%1 \
(%2)", cardName, lines[1]); }
- if (alsaDeviceName.startsWith("front:") ||
- alsaDeviceName.startsWith("rear:") ||
- alsaDeviceName.startsWith("center_lfe:") ||
- alsaDeviceName.startsWith("surround40:") ||
- alsaDeviceName.startsWith("surround41:") ||
- alsaDeviceName.startsWith("surround50:") ||
- alsaDeviceName.startsWith("surround51:") ||
- alsaDeviceName.startsWith("surround71:") ||
- alsaDeviceName.startsWith("iec958:")) {
+ if (alsaDeviceName.startsWith(QLatin1String("front:")) ||
+ alsaDeviceName.startsWith(QLatin1String("rear:")) ||
+ alsaDeviceName.startsWith(QLatin1String("center_lfe:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround40:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround41:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround50:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround51:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround71:")) ||
+ alsaDeviceName.startsWith(QLatin1String("iec958:"))) {
isAdvanced = true;
}
--- trunk/KDE/kdebase/runtime/phonon/libkaudiodevicelist/audiodevice.cpp #1063137:1063138
@@ -324,7 +324,7 @@
d->uniqueId = groupName.mid(groupName.indexOf(QLatin1Char('_')) + 1);
d->udi = deviceGroup.readEntry("udi", d->udi);
kDebug(603) << groupName << d->uniqueId;
- if (d->uniqueId.startsWith("/org/freedesktop/Hal/devices/")) {
+ if (d->uniqueId.startsWith(QLatin1String("/org/freedesktop/Hal/devices/"))) {
// old invalid group
d->valid = false;
return;
@@ -351,20 +351,20 @@
d->udi = alsaDeviceName;
d->driver = Solid::AudioInterface::Alsa;
d->deviceIds << alsaDeviceName;
- QStringList lines = description.split("\n");
+ QStringList lines = description.split('\n');
d->cardName = lines.first();
if (lines.size() > 1) {
d->cardName = i18n("%1 (%2)", d->cardName, lines[1]);
}
- if (alsaDeviceName.startsWith("front:") ||
- alsaDeviceName.startsWith("rear:") ||
- alsaDeviceName.startsWith("center_lfe:") ||
- alsaDeviceName.startsWith("surround40:") ||
- alsaDeviceName.startsWith("surround41:") ||
- alsaDeviceName.startsWith("surround50:") ||
- alsaDeviceName.startsWith("surround51:") ||
- alsaDeviceName.startsWith("surround71:") ||
- alsaDeviceName.startsWith("iec958:")) {
+ if (alsaDeviceName.startsWith(QLatin1String("front:")) ||
+ alsaDeviceName.startsWith(QLatin1String("rear:")) ||
+ alsaDeviceName.startsWith(QLatin1String("center_lfe:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround40:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround41:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround50:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround51:")) ||
+ alsaDeviceName.startsWith(QLatin1String("surround71:")) ||
+ alsaDeviceName.startsWith(QLatin1String("iec958:"))) {
d->isAdvanced = true;
}
--- trunk/KDE/kdebase/runtime/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp #1063137:1063138
@@ -176,12 +176,12 @@
if (/*nextHint.name.startsWith("front:") ||
nextHint.name.startsWith("rear:") ||
nextHint.name.startsWith("center_lfe:") ||*/
- nextHint.name.startsWith("surround40:") ||
- nextHint.name.startsWith("surround41:") ||
- nextHint.name.startsWith("surround50:") ||
- nextHint.name.startsWith("surround51:") ||
- nextHint.name.startsWith("surround71:") ||
- nextHint.name.startsWith("default:") ||
+ nextHint.name.startsWith(QLatin1String("surround40:")) ||
+ nextHint.name.startsWith(QLatin1String("surround41:")) ||
+ nextHint.name.startsWith(QLatin1String("surround50:")) ||
+ nextHint.name.startsWith(QLatin1String("surround51:")) ||
+ nextHint.name.startsWith(QLatin1String("surround71:")) ||
+ nextHint.name.startsWith(QLatin1String("default:")) ||
nextHint.name == "null"
) {
continue;
--- trunk/KDE/kdebase/runtime/phonon/platform_kde/kdeplatformplugin.h #1063137:1063138
@@ -17,8 +17,8 @@
*/
-#ifndef PHONON_KDEPLUGINFACTORY_H
-#define PHONON_KDEPLUGINFACTORY_H
+#ifndef PHONON_KDEPLATFORMPLUGIN_H
+#define PHONON_KDEPLATFORMPLUGIN_H
#include <phonon/platformplugin.h>
#include <phonon/objectdescription.h>
@@ -67,4 +67,4 @@
} // namespace Phonon
-#endif // PHONON_KDEPLUGINFACTORY_H
+#endif // PHONON_KDEPLATFORMPLUGIN_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic