mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
be less clever and waste more bandwidth
This commit is contained in:
@@ -54,14 +54,14 @@ Tomahawk::ExternalResolver::addChildProperties( QObject* widget, QVariantMap& m
|
|||||||
// qDebug() << "Adding properties for this:" << widget->metaObject()->className();
|
// qDebug() << "Adding properties for this:" << widget->metaObject()->className();
|
||||||
// add this widget's properties
|
// add this widget's properties
|
||||||
QVariantMap props;
|
QVariantMap props;
|
||||||
for( int i = widget->metaObject()->propertyOffset(); i < widget->metaObject()->propertyCount(); i++ )
|
for( int i = 0; i < widget->metaObject()->propertyCount(); i++ )
|
||||||
{
|
{
|
||||||
QString prop = widget->metaObject()->property( i ).name();
|
QString prop = widget->metaObject()->property( i ).name();
|
||||||
QVariant val = widget->property( prop.toLatin1() );
|
QVariant val = widget->property( prop.toLatin1() );
|
||||||
// clean up for QJson....
|
// clean up for QJson....
|
||||||
if( val.canConvert< QPixmap >() || val.canConvert< QImage >() || val.canConvert< QIcon >() )
|
if( val.canConvert< QPixmap >() || val.canConvert< QImage >() || val.canConvert< QIcon >() )
|
||||||
continue;
|
continue;
|
||||||
props[ prop ] = val;
|
props[ prop ] = val.toString();
|
||||||
// qDebug() << QString( "%1: %2" ).arg( prop ).arg( props[ prop ].toString() );
|
// qDebug() << QString( "%1: %2" ).arg( prop ).arg( props[ prop ].toString() );
|
||||||
}
|
}
|
||||||
m[ widget->objectName() ] = props;
|
m[ widget->objectName() ] = props;
|
||||||
|
@@ -281,6 +281,7 @@ ScriptResolver::saveConfig()
|
|||||||
QVariant widgets = configMsgFromWidget( m_configWidget.data() );
|
QVariant widgets = configMsgFromWidget( m_configWidget.data() );
|
||||||
m.insert( "widgets", widgets );
|
m.insert( "widgets", widgets );
|
||||||
QByteArray data = m_serializer.serialize( m );
|
QByteArray data = m_serializer.serialize( m );
|
||||||
|
// qDebug() << "Got widgets and data;" << widgets << data;
|
||||||
sendMsg( data );
|
sendMsg( data );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user