Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/phonon/phonon/globalconfig.cpp

    r2 r561  
    77    version 2.1 of the License, or (at your option) version 3, or any
    88    later version accepted by the membership of KDE e.V. (or its
    9     successor approved by the membership of KDE e.V.), Trolltech ASA
     9    successor approved by the membership of KDE e.V.), Nokia Corporation
    1010    (or its successors, if any) and the KDE Free Qt Foundation, which shall
    1111    act as a proxy defined in Section 6 of version 3 of the license.
     
    3939{
    4040
    41 GlobalConfig::GlobalConfig() : m_config(QLatin1String("kde.org"), QLatin1String("libphonon"))
     41GlobalConfig::GlobalConfig()
     42#ifndef QT_NO_SETTINGS
     43    : m_config(QLatin1String("kde.org"), QLatin1String("libphonon"))
     44#endif //QT_NO_SETTINGS
    4245{
    4346}
     
    8386}
    8487
     88#ifndef QT_NO_PHONON_SETTINGSGROUP
    8589static QList<int> listSortedByConfig(const QSettingsGroup &backendConfig, Phonon::Category category, QList<int> &defaultList)
    8690{
     
    127131    return deviceList;
    128132}
    129 
     133#endif //QT_NO_PHONON_SETTINGSGROUP
     134
     135#ifndef QT_NO_PHONON_SETTINGSGROUP
    130136QList<int> GlobalConfig::audioOutputDeviceListFor(Phonon::Category category, int override) const
    131137{
     
    173179    return listSortedByConfig(backendConfig, category, defaultList);
    174180}
    175 
     181#endif //QT_NO_PHONON_SETTINGSGROUP
    176182int GlobalConfig::audioOutputDeviceFor(Phonon::Category category, int override) const
    177183{
     184#ifndef QT_NO_PHONON_SETTINGSGROUP
    178185    QList<int> ret = audioOutputDeviceListFor(category, override);
    179     if (ret.isEmpty())
    180         return -1;
    181     return ret.first();
     186    if (!ret.isEmpty())
     187        return ret.first();
     188#endif //QT_NO_PHONON_SETTINGSGROUP
     189    return -1;
    182190}
    183191
     
    185193QList<int> GlobalConfig::audioCaptureDeviceListFor(Phonon::Category category, int override) const
    186194{
     195#ifndef QT_NO_PHONON_SETTINGSGROUP
    187196    //The devices need to be stored independently for every backend
    188197    const QSettingsGroup backendConfig(&m_config, QLatin1String("AudioCaptureDevice")); // + Factory::identifier());
     
    227236
    228237    return listSortedByConfig(backendConfig, category, defaultList);
     238#else //QT_NO_SETTINGSGROUP
     239    return QList<int>();
     240#endif //QT_NO_SETTINGSGROUP
    229241}
    230242
Note: See TracChangeset for help on using the changeset viewer.