SVN commit 1275742 by poboiko: Krazy2 issues (avoid copy constructors) M +1 -2 dbus/dbuscontrolwrapper.cpp M +2 -2 dbus/dbuscontrolwrapper.h M +1 -1 dbus/dbusmixerwrapper.cpp M +1 -1 dbus/dbusmixerwrapper.h M +1 -1 dbus/dbusmixsetwrapper.cpp M +1 -1 dbus/dbusmixsetwrapper.h M +7 -7 plasma/engine/mixerengine.cpp M +2 -2 plasma/engine/mixerengine.h --- trunk/KDE/kdemultimedia/kmix/dbus/dbuscontrolwrapper.cpp #1275741:1275742 @@ -24,9 +24,8 @@ #include "core/mixer.h" #include "core/volume.h" -DBusControlWrapper::DBusControlWrapper(MixDevice* parent, QString path) +DBusControlWrapper::DBusControlWrapper(MixDevice* parent, const QString& path) : QObject(parent) - , m_dbusPath(path) { m_md = parent; new ControlAdaptor( this ); --- trunk/KDE/kdemultimedia/kmix/dbus/dbuscontrolwrapper.h #1275741:1275742 @@ -41,7 +41,7 @@ Q_PROPERTY(bool hasCaptureSwitch READ hasCaptureSwitch) public: - DBusControlWrapper(MixDevice* parent, QString path); + DBusControlWrapper(MixDevice* parent, const QString& path); ~DBusControlWrapper(); void increaseVolume(); @@ -49,7 +49,7 @@ void toggleMute(); private: MixDevice *m_md; - QString m_dbusPath; + QString id(); QString readableName(); QString iconName(); --- trunk/KDE/kdemultimedia/kmix/dbus/dbusmixerwrapper.cpp #1275741:1275742 @@ -27,7 +27,7 @@ #include "core/volume.h" #include "mixeradaptor.h" -DBusMixerWrapper::DBusMixerWrapper(Mixer* parent, QString path) +DBusMixerWrapper::DBusMixerWrapper(Mixer* parent, const QString& path) : QObject(parent) , m_dbusPath(path) { --- trunk/KDE/kdemultimedia/kmix/dbus/dbusmixerwrapper.h #1275741:1275742 @@ -40,7 +40,7 @@ Q_PROPERTY(QStringList controls READ controls) public: - DBusMixerWrapper(Mixer* parent, QString path); + DBusMixerWrapper(Mixer* parent, const QString& path); ~DBusMixerWrapper(); QString driverName(); --- trunk/KDE/kdemultimedia/kmix/dbus/dbusmixsetwrapper.cpp #1275741:1275742 @@ -23,7 +23,7 @@ #include "core/mixdevice.h" #include "mixsetadaptor.h" -DBusMixSetWrapper::DBusMixSetWrapper(QObject* parent, QString path) +DBusMixSetWrapper::DBusMixSetWrapper(QObject* parent, const QString& path) : QObject(parent) , m_dbusPath( path ) { --- trunk/KDE/kdemultimedia/kmix/dbus/dbusmixsetwrapper.h #1275741:1275742 @@ -33,7 +33,7 @@ Q_PROPERTY(QString preferredMasterMixer READ preferredMasterMixer) Q_PROPERTY(QString preferredMasterControl READ preferredMasterControl) public: - DBusMixSetWrapper(QObject* parent, QString path); + DBusMixSetWrapper(QObject* parent, const QString& path); ~DBusMixSetWrapper(); public slots: QStringList mixers() const; --- trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerengine.cpp #1275741:1275742 @@ -68,7 +68,7 @@ getInternalData(); } -MixerInfo* MixerEngine::createMixerInfo( QString dbusPath ) +MixerInfo* MixerEngine::createMixerInfo( const QString& dbusPath ) { MixerInfo* curmi = new MixerInfo; curmi->iface = new OrgKdeKMixMixerInterface( KMIX_DBUS_SERVICE, dbusPath, @@ -85,7 +85,7 @@ return curmi; } -ControlInfo* MixerEngine::createControlInfo( QString mixerId, QString dbusPath ) +ControlInfo* MixerEngine::createControlInfo( const QString& mixerId, const QString& dbusPath ) { ControlInfo* curci = new ControlInfo; curci->iface = new OrgKdeKMixControlInterface( KMIX_DBUS_SERVICE, dbusPath, @@ -112,10 +112,10 @@ "org.kde.KMix.MixSet", "changed", this, SLOT(slotMixersChanged()) ); } - Q_FOREACH( QString path, m_kmix->mixers() ) + Q_FOREACH( const QString& path, m_kmix->mixers() ) { MixerInfo* curmi = createMixerInfo( path ); - Q_FOREACH( QString controlPath, curmi->iface->controls() ) + Q_FOREACH( const QString& controlPath, curmi->iface->controls() ) createControlInfo( curmi->id, controlPath ); } // Update "Mixers" source @@ -291,7 +291,7 @@ QStringList controlReadableNames; Q_FOREACH( ControlInfo* ci, controlsForMixer ) ci->unused = true; - Q_FOREACH( QString controlPath, curmi->iface->controls() ) + Q_FOREACH( const QString& controlPath, curmi->iface->controls() ) { ControlInfo* curci = 0; Q_FOREACH( ControlInfo* ci, controlsForMixer ) @@ -327,7 +327,7 @@ // Some mixer added or removed Q_FOREACH( MixerInfo* mi, m_mixers ) mi->unused = true; - Q_FOREACH( QString mixerPath, m_kmix->mixers() ) + Q_FOREACH( const QString& mixerPath, m_kmix->mixers() ) { MixerInfo* curmi = m_mixers.value( mixerPath, 0 ); // if mixer was added, we need to add one to m_mixers @@ -335,7 +335,7 @@ if ( !curmi ) { curmi = createMixerInfo( mixerPath ); - Q_FOREACH( QString controlPath, curmi->iface->controls() ) + Q_FOREACH( const QString& controlPath, curmi->iface->controls() ) createControlInfo( curmi->id, controlPath ); } curmi->unused = false; --- trunk/KDE/kdemultimedia/kmix/plasma/engine/mixerengine.h #1275741:1275742 @@ -80,8 +80,8 @@ // Keys are mixerIds for control QMultiHash m_controls; - MixerInfo* createMixerInfo( QString dbusPath ); - ControlInfo* createControlInfo( QString mixerId, QString dbusPath ); + MixerInfo* createMixerInfo( const QString& dbusPath ); + ControlInfo* createControlInfo( const QString& mixerId, const QString& dbusPath ); void clearInternalData(bool removeSources); bool getMixersData();