Changeset View
Changeset View
Standalone View
Standalone View
phonon/pulsesupport.cpp
Show First 20 Lines • Show All 1169 Lines • ▼ Show 20 Line(s) | 1162 | { | |||
---|---|---|---|---|---|
1170 | if (!Platform::applicationName().isEmpty()) | 1170 | if (!Platform::applicationName().isEmpty()) | ||
1171 | qputenv(QString("PULSE_PROP_OVERRIDE_%1").arg(PA_PROP_APPLICATION_NAME).toUtf8(), | 1171 | qputenv(QString("PULSE_PROP_OVERRIDE_%1").arg(PA_PROP_APPLICATION_NAME).toUtf8(), | ||
1172 | Platform::applicationName().toUtf8()); | 1172 | Platform::applicationName().toUtf8()); | ||
1173 | if (!qApp->applicationVersion().isEmpty()) | 1173 | if (!qApp->applicationVersion().isEmpty()) | ||
1174 | qputenv(QString("PULSE_PROP_OVERRIDE_%1").arg(PA_PROP_APPLICATION_VERSION).toUtf8(), | 1174 | qputenv(QString("PULSE_PROP_OVERRIDE_%1").arg(PA_PROP_APPLICATION_VERSION).toUtf8(), | ||
1175 | qApp->applicationVersion().toUtf8()); | 1175 | qApp->applicationVersion().toUtf8()); | ||
1176 | if (!qApp->applicationName().isEmpty()) { | 1176 | if (!qApp->applicationName().isEmpty()) { | ||
1177 | QString icon; | 1177 | QString icon; | ||
1178 | #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) | | |||
1179 | if (!qApp->windowIcon().isNull()){ | 1178 | if (!qApp->windowIcon().isNull()){ | ||
1180 | // Try to get the fromTheme() name of the QIcon. | 1179 | // Try to get the fromTheme() name of the QIcon. | ||
1181 | icon = qApp->windowIcon().name(); | 1180 | icon = qApp->windowIcon().name(); | ||
1182 | } | 1181 | } | ||
1183 | #endif | | |||
1184 | if (icon.isEmpty()) { | 1182 | if (icon.isEmpty()) { | ||
1185 | // If we failed to get a proper icon name, use the appname instead. | 1183 | // If we failed to get a proper icon name, use the appname instead. | ||
1186 | icon = qApp->applicationName().toLower(); | 1184 | icon = qApp->applicationName().toLower(); | ||
1187 | } | 1185 | } | ||
1188 | qputenv(QString("PULSE_PROP_OVERRIDE_%1").arg(PA_PROP_APPLICATION_ICON_NAME).toUtf8(), | 1186 | qputenv(QString("PULSE_PROP_OVERRIDE_%1").arg(PA_PROP_APPLICATION_ICON_NAME).toUtf8(), | ||
1189 | icon.toUtf8()); | 1187 | icon.toUtf8()); | ||
1190 | } | 1188 | } | ||
1191 | 1189 | | |||
▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines |