Adjusted to use new TQStringVariantMap type.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/36/head
Michele Calgaro 6 years ago
parent bf68342793
commit aaaf378033
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -194,7 +194,7 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB
break; break;
typedef TQValueList<TQVariant> ListType; typedef TQValueList<TQVariant> ListType;
typedef TQMap<TQString,TQVariant> MapType; typedef TQStringVariantMap MapType;
switch ( type ) switch ( type )
{ {

@ -20,7 +20,6 @@
#include "disksHelper.h" #include "disksHelper.h"
#include "tdelocale.h" #include "tdelocale.h"
#include "tdestoragedevice.h" #include "tdestoragedevice.h"
#include <tqvariant.h>
#include <tqdbusdata.h> #include <tqdbusdata.h>
#include <tqdbusmessage.h> #include <tqdbusmessage.h>
#include <tqdbusproxy.h> #include <tqdbusproxy.h>
@ -34,8 +33,8 @@
//------------------------------- //-------------------------------
// UDisks // UDisks
//------------------------------- //-------------------------------
TDEStorageOpResult UDisksEjectDrive(TDEStorageDevice *sdevice) { TQStringVariantMap UDisksEjectDrive(TDEStorageDevice *sdevice) {
TDEStorageOpResult result; TQStringVariantMap result;
result["result"] = false; result["result"] = false;
TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus);
@ -67,8 +66,8 @@ TDEStorageOpResult UDisksEjectDrive(TDEStorageDevice *sdevice) {
return result; return result;
} }
TDEStorageOpResult UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions) { TQStringVariantMap UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions) {
TDEStorageOpResult result; TQStringVariantMap result;
result["result"] = false; result["result"] = false;
result["retcode"] = -2; result["retcode"] = -2;
@ -109,8 +108,8 @@ TDEStorageOpResult UDisksMountDrive(TQString deviceNode, TQString fileSystemType
return result; return result;
} }
TDEStorageOpResult UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions) { TQStringVariantMap UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions) {
TDEStorageOpResult result; TQStringVariantMap result;
result["result"] = false; result["result"] = false;
result["retcode"] = -2; result["retcode"] = -2;
@ -153,8 +152,8 @@ TDEStorageOpResult UDisksUnmountDrive(TQString deviceNode, TQStringList unmountO
//------------------------------- //-------------------------------
// UDisks2 // UDisks2
//------------------------------- //-------------------------------
TDEStorageOpResult UDisks2EjectDrive(TDEStorageDevice *sdevice) { TQStringVariantMap UDisks2EjectDrive(TDEStorageDevice *sdevice) {
TDEStorageOpResult result; TQStringVariantMap result;
result["result"] = false; result["result"] = false;
TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus);
@ -223,8 +222,8 @@ TDEStorageOpResult UDisks2EjectDrive(TDEStorageDevice *sdevice) {
return result; return result;
} }
TDEStorageOpResult UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions) { TQStringVariantMap UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions) {
TDEStorageOpResult result; TQStringVariantMap result;
result["result"] = false; result["result"] = false;
result["retcode"] = -2; result["retcode"] = -2;
@ -269,8 +268,8 @@ TDEStorageOpResult UDisks2MountDrive(TQString deviceNode, TQString fileSystemTyp
return result; return result;
} }
TDEStorageOpResult UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions) { TQStringVariantMap UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions) {
TDEStorageOpResult result; TQStringVariantMap result;
result["result"] = false; result["result"] = false;
result["retcode"] = -2; result["retcode"] = -2;

@ -27,15 +27,15 @@
//------------------------------- //-------------------------------
// UDisks // UDisks
//------------------------------- //-------------------------------
TDEStorageOpResult UDisksEjectDrive(TDEStorageDevice *sdevice); TQStringVariantMap UDisksEjectDrive(TDEStorageDevice *sdevice);
TDEStorageOpResult UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions); TQStringVariantMap UDisksMountDrive(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions);
TDEStorageOpResult UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions); TQStringVariantMap UDisksUnmountDrive(TQString deviceNode, TQStringList unmountOptions);
//------------------------------- //-------------------------------
// UDisks2 // UDisks2
//------------------------------- //-------------------------------
TDEStorageOpResult UDisks2EjectDrive(TDEStorageDevice *sdevice); TQStringVariantMap UDisks2EjectDrive(TDEStorageDevice *sdevice);
TDEStorageOpResult UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions); TQStringVariantMap UDisks2MountDrive(TQString deviceNode, TQString fileSystemType, TQString mountOptions);
TDEStorageOpResult UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions); TQStringVariantMap UDisks2UnmountDrive(TQString deviceNode, TQString unmountOptions);
#endif #endif

@ -28,7 +28,6 @@
#include <tqregexp.h> #include <tqregexp.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqvariant.h>
#include "kdebug.h" #include "kdebug.h"
#include "tdelocale.h" #include "tdelocale.h"
@ -310,7 +309,7 @@ bool TDEStorageDevice::lockDriveMedia(bool lock) {
bool TDEStorageDevice::ejectDrive() { bool TDEStorageDevice::ejectDrive() {
if (!(TDEGlobal::dirs()->findExe("udisksctl").isEmpty())) { if (!(TDEGlobal::dirs()->findExe("udisksctl").isEmpty())) {
TDEStorageOpResult ejectResult = UDisks2EjectDrive(this); TQStringVariantMap ejectResult = UDisks2EjectDrive(this);
if (ejectResult["result"].toBool()) { if (ejectResult["result"].toBool()) {
return true; return true;
} }
@ -320,7 +319,7 @@ bool TDEStorageDevice::ejectDrive() {
} }
} }
if (!(TDEGlobal::dirs()->findExe("udisks").isEmpty())) { if (!(TDEGlobal::dirs()->findExe("udisks").isEmpty())) {
TDEStorageOpResult ejectResult = UDisksEjectDrive(this); TQStringVariantMap ejectResult = UDisksEjectDrive(this);
if (ejectResult["result"].toBool()) { if (ejectResult["result"].toBool()) {
return true; return true;
} }
@ -702,8 +701,8 @@ TQString TDEStorageDevice::mountPath() {
return TQString::null; return TQString::null;
} }
TDEStorageOpResult TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageMountOptions mountOptions) { TQStringVariantMap TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageMountOptions mountOptions) {
TDEStorageOpResult result; TQStringVariantMap result;
// Check if device is already mounted // Check if device is already mounted
TQString mountpath = mountPath(); TQString mountpath = mountPath();
@ -774,7 +773,7 @@ TDEStorageOpResult TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageM
fileSystemType = mountOptions["filesystem"]; fileSystemType = mountOptions["filesystem"];
} }
TDEStorageOpResult mountResult = UDisks2MountDrive(devNode, fileSystemType, optionString); TQStringVariantMap mountResult = UDisks2MountDrive(devNode, fileSystemType, optionString);
if (mountResult["result"].toBool()) { if (mountResult["result"].toBool()) {
// Update internal mount data // Update internal mount data
TDEGlobal::hardwareDevices()->processModifiedMounts(); TDEGlobal::hardwareDevices()->processModifiedMounts();
@ -901,9 +900,9 @@ TDEStorageOpResult TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageM
return result; return result;
} }
TDEStorageOpResult TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString mediaName, TQStringVariantMap TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString mediaName,
TDEStorageMountOptions mountOptions) { TDEStorageMountOptions mountOptions) {
TDEStorageOpResult result; TQStringVariantMap result;
// Check if device is already mounted // Check if device is already mounted
TQString mountpath = mountPath(); TQString mountpath = mountPath();
@ -976,8 +975,8 @@ TDEStorageOpResult TDEStorageDevice::mountEncryptedDevice(TQString passphrase, T
return result; return result;
} }
TDEStorageOpResult TDEStorageDevice::unmountDevice() { TQStringVariantMap TDEStorageDevice::unmountDevice() {
TDEStorageOpResult result; TQStringVariantMap result;
// Check if device is already unmounted // Check if device is already unmounted
TQString mountpoint = mountPath(); TQString mountpoint = mountPath();
@ -990,7 +989,7 @@ TDEStorageOpResult TDEStorageDevice::unmountDevice() {
TQString devNode = deviceNode(); TQString devNode = deviceNode();
// Try to use UDISKS v2 via DBUS, if available // Try to use UDISKS v2 via DBUS, if available
TDEStorageOpResult unmountResult = UDisks2UnmountDrive(devNode, TQString::null); TQStringVariantMap unmountResult = UDisks2UnmountDrive(devNode, TQString::null);
if (unmountResult["result"].toBool()) { if (unmountResult["result"].toBool()) {
// Update internal mount data // Update internal mount data
TDEGlobal::hardwareDevices()->processModifiedMounts(); TDEGlobal::hardwareDevices()->processModifiedMounts();

@ -21,6 +21,7 @@
#define _TDESTORAGEDEVICE_H #define _TDESTORAGEDEVICE_H
#include "tdegenericdevice.h" #include "tdegenericdevice.h"
#include "tqvariant.h"
struct crypt_device; struct crypt_device;
@ -166,9 +167,7 @@ enum TDELUKSResult {
}; };
}; };
class TQVariant;
typedef TQMap<TQString, TQString> TDEStorageMountOptions; typedef TQMap<TQString, TQString> TDEStorageMountOptions;
typedef TQMap<TQString, TQVariant> TDEStorageOpResult;
class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
{ {
@ -235,9 +234,9 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
* @param a TQString containing a requested mount name under /media, if desired * @param a TQString containing a requested mount name under /media, if desired
* @param a TDEStorageMountOptions containing any mount options for pmount, if desired * @param a TDEStorageMountOptions containing any mount options for pmount, if desired
* *
* @return a TDEStorageOpResult object containing information about the operation outcome * @return a TQStringVariantMap object containing information about the operation outcome
*/ */
TDEStorageOpResult mountDevice(TQString mediaName = TQString::null, TQStringVariantMap mountDevice(TQString mediaName = TQString::null,
TDEStorageMountOptions mountOptions = TDEStorageMountOptions()); TDEStorageMountOptions mountOptions = TDEStorageMountOptions());
/** /**
@ -247,17 +246,17 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
* @param a TQString containing a requested mount name under /media, if desired * @param a TQString containing a requested mount name under /media, if desired
* @param a TDEStorageMountOptions containing any mount options for pmount, if desired * @param a TDEStorageMountOptions containing any mount options for pmount, if desired
* *
* @return a TDEStorageOpResult object containing information about the operation outcome * @return a TQStringVariantMap object containing information about the operation outcome
*/ */
TDEStorageOpResult mountEncryptedDevice(TQString passphrase, TQString mediaName = TQString::null, TQStringVariantMap mountEncryptedDevice(TQString passphrase, TQString mediaName = TQString::null,
TDEStorageMountOptions mountOptions = TDEStorageMountOptions()); TDEStorageMountOptions mountOptions = TDEStorageMountOptions());
/** /**
* Unmounts the device * Unmounts the device
* *
* @return a TDEStorageOpResult object containing information about the operation outcome * @return a TQStringVariantMap object containing information about the operation outcome
*/ */
TDEStorageOpResult unmountDevice(); TQStringVariantMap unmountDevice();
/** /**
* @return a TQString with the mount path, if mounted * @return a TQString with the mount path, if mounted

@ -593,7 +593,7 @@ TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const
// Then we use a homebuild class based on TDEConfigBase to convert the TQString. // Then we use a homebuild class based on TDEConfigBase to convert the TQString.
// For some often used property types we do the conversion ourselves. // For some often used property types we do the conversion ourselves.
TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name ); TQStringVariantMap::ConstIterator it = m_mapProps.find( _name );
if ( (it == m_mapProps.end()) || (!it.data().isValid())) if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{ {
//kdDebug(7012) << "Property not found " << _name << endl; //kdDebug(7012) << "Property not found " << _name << endl;
@ -635,7 +635,7 @@ TQStringList KService::propertyNames() const
{ {
TQStringList res; TQStringList res;
TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.begin(); TQStringVariantMap::ConstIterator it = m_mapProps.begin();
for( ; it != m_mapProps.end(); ++it ) for( ; it != m_mapProps.end(); ++it )
res.append( it.key() ); res.append( it.key() );
@ -750,7 +750,7 @@ TQString KService::username() const {
} }
bool KService::noDisplay() const { bool KService::noDisplay() const {
TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "NoDisplay" ); TQStringVariantMap::ConstIterator it = m_mapProps.find( "NoDisplay" );
if ( (it != m_mapProps.end()) && (it.data().isValid())) if ( (it != m_mapProps.end()) && (it.data().isValid()))
{ {
TQString aValue = it.data().toString().lower(); TQString aValue = it.data().toString().lower();
@ -798,7 +798,7 @@ TQString KService::untranslatedGenericName() const {
} }
bool KService::SuSEunimportant() const { bool KService::SuSEunimportant() const {
TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-SuSE-Unimportant" ); TQStringVariantMap::ConstIterator it = m_mapProps.find( "X-SuSE-Unimportant" );
if ( (it == m_mapProps.end()) || (!it.data().isValid())) if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{ {
return false; return false;
@ -812,7 +812,7 @@ bool KService::SuSEunimportant() const {
} }
TQString KService::parentApp() const { TQString KService::parentApp() const {
TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-TDE-ParentApp" ); TQStringVariantMap::ConstIterator it = m_mapProps.find( "X-TDE-ParentApp" );
if ( (it == m_mapProps.end()) || (!it.data().isValid())) if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{ {
return TQString::null; return TQString::null;

@ -548,7 +548,7 @@ private:
//TQString m_docPath; //TQString m_docPath;
//bool m_bHideFromPanel; //bool m_bHideFromPanel;
DCOPServiceType_t m_DCOPServiceType; DCOPServiceType_t m_DCOPServiceType;
TQMap<TQString,TQVariant> m_mapProps; TQStringVariantMap m_mapProps;
bool m_bValid; bool m_bValid;
TQStringList m_lstKeywords; TQStringList m_lstKeywords;
TQString m_strInit; TQString m_strInit;

@ -27,9 +27,6 @@
#include <kdebug.h> #include <kdebug.h>
#include <kdesktopfile.h> #include <kdesktopfile.h>
template TQDataStream& operator>> <TQString, TQVariant>(TQDataStream&, TQMap<TQString, TQVariant>&);
template TQDataStream& operator<< <TQString, TQVariant>(TQDataStream&, const TQMap<TQString, TQVariant>&);
class KServiceType::KServiceTypePrivate class KServiceType::KServiceTypePrivate
{ {
public: public:
@ -182,7 +179,7 @@ KServiceType::property( const TQString& _name ) const
else if ( _name == "Comment" ) else if ( _name == "Comment" )
v = TQVariant( m_strComment ); v = TQVariant( m_strComment );
else { else {
TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name ); TQStringVariantMap::ConstIterator it = m_mapProps.find( _name );
if ( it != m_mapProps.end() ) if ( it != m_mapProps.end() )
v = it.data(); v = it.data();
} }
@ -195,7 +192,7 @@ KServiceType::propertyNames() const
{ {
TQStringList res; TQStringList res;
TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.begin(); TQStringVariantMap::ConstIterator it = m_mapProps.begin();
for( ; it != m_mapProps.end(); ++it ) for( ; it != m_mapProps.end(); ++it )
res.append( it.key() ); res.append( it.key() );

@ -233,7 +233,7 @@ protected:
TQString m_strName; TQString m_strName;
TQString m_strIcon; TQString m_strIcon;
TQString m_strComment; TQString m_strComment;
TQMap<TQString,TQVariant> m_mapProps; TQStringVariantMap m_mapProps;
TQMap<TQString,TQVariant::Type> m_mapPropDefs; TQMap<TQString,TQVariant::Type> m_mapPropDefs;
bool m_bValid:1; bool m_bValid:1;

@ -67,7 +67,7 @@ bool Foomatic2Loader::readFromBuffer( const TQString& buffer )
return false; return false;
} }
DrBase* Foomatic2Loader::createValue( const TQString& name, const TQMap<TQString,TQVariant>& m ) const DrBase* Foomatic2Loader::createValue( const TQString& name, const TQStringVariantMap& m ) const
{ {
DrBase *choice = new DrBase; DrBase *choice = new DrBase;
choice->setName( name ); choice->setName( name );
@ -75,7 +75,7 @@ DrBase* Foomatic2Loader::createValue( const TQString& name, const TQMap<TQString
return choice; return choice;
} }
DrBase* Foomatic2Loader::createOption( const TQMap<TQString,TQVariant>& m ) const DrBase* Foomatic2Loader::createOption( const TQStringVariantMap& m ) const
{ {
TQString type = m.operator[]( "type" ).toString(); TQString type = m.operator[]( "type" ).toString();
DrBase *opt = NULL; DrBase *opt = NULL;
@ -83,7 +83,7 @@ DrBase* Foomatic2Loader::createOption( const TQMap<TQString,TQVariant>& m ) cons
{ {
DrListOption *lopt = new DrListOption; DrListOption *lopt = new DrListOption;
TQVariant a = m.operator[]( "vals_byname" ); TQVariant a = m.operator[]( "vals_byname" );
TQMap<TQString,TQVariant>::ConstIterator it = a.mapBegin(); TQStringVariantMap::ConstIterator it = a.mapBegin();
for ( ; it!=a.mapEnd(); ++it ) for ( ; it!=a.mapEnd(); ++it )
{ {
if ( it.data().type() != TQVariant::Map ) if ( it.data().type() != TQVariant::Map )
@ -183,7 +183,7 @@ DrMain* Foomatic2Loader::buildDriver() const
TQRegExp re( "(\\d+) +(\\d+)" ); TQRegExp re( "(\\d+) +(\\d+)" );
if ( choices.type() == TQVariant::Map ) if ( choices.type() == TQVariant::Map )
{ {
TQMap<TQString,TQVariant>::ConstIterator it = choices.mapBegin(); TQStringVariantMap::ConstIterator it = choices.mapBegin();
for ( ; it!=choices.mapEnd(); ++it ) for ( ; it!=choices.mapEnd(); ++it )
{ {
TQString driverval = ( *it ).mapFind( "driverval" ).data().toString(); TQString driverval = ( *it ).mapFind( "driverval" ).data().toString();
@ -234,7 +234,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
v = V.mapFind( "args_byname" ).data(); v = V.mapFind( "args_byname" ).data();
if ( !v.isNull() && v.type() == TQVariant::Map ) if ( !v.isNull() && v.type() == TQVariant::Map )
{ {
TQMap<TQString,TQVariant>::ConstIterator it = v.mapBegin(); TQStringVariantMap::ConstIterator it = v.mapBegin();
for ( ; it!=v.mapEnd(); ++it ) for ( ; it!=v.mapEnd(); ++it )
{ {
if ( ( *it ).type() != TQVariant::Map ) if ( ( *it ).type() != TQVariant::Map )

@ -37,21 +37,21 @@ public:
bool read( TQIODevice *d ); bool read( TQIODevice *d );
bool readFromBuffer( const TQString& buffer ); bool readFromBuffer( const TQString& buffer );
bool readFromFile( const TQString& filename ); bool readFromFile( const TQString& filename );
TQMap<TQString,TQVariant> data() const; TQStringVariantMap data() const;
DrMain* buildDriver() const; DrMain* buildDriver() const;
DrMain* modifyDriver( DrMain* ) const; DrMain* modifyDriver( DrMain* ) const;
static DrMain* loadDriver( const TQString& filename ); static DrMain* loadDriver( const TQString& filename );
private: private:
TQMap<TQString,TQVariant> m_foodata; TQStringVariantMap m_foodata;
friend int tdeprint_foomatic2parse( void* ); friend int tdeprint_foomatic2parse( void* );
DrBase* createValue( const TQString&, const TQMap<TQString,TQVariant>& ) const; DrBase* createValue( const TQString&, const TQStringVariantMap& ) const;
DrBase* createOption( const TQMap<TQString,TQVariant>& ) const; DrBase* createOption( const TQStringVariantMap& ) const;
}; };
inline TQMap<TQString,TQVariant> Foomatic2Loader::data() const inline TQStringVariantMap Foomatic2Loader::data() const
{ return m_foodata; } { return m_foodata; }
#endif /* FOOMATIC2LOADER_H */ #endif /* FOOMATIC2LOADER_H */

@ -737,7 +737,7 @@ case 5:
break;} break;}
case 6: case 6:
#line 51 "./fooparser.y" #line 51 "./fooparser.y"
{ TQMap<TQString,TQVariant>::ConstIterator it = yyvsp[0].mapBegin(); yyvsp[-2].asMap().insert(it.key(), it.data()); yyval = yyvsp[-2]; ; { TQStringVariantMap::ConstIterator it = yyvsp[0].mapBegin(); yyvsp[-2].asMap().insert(it.key(), it.data()); yyval = yyvsp[-2]; ;
break;} break;}
case 7: case 7:
#line 54 "./fooparser.y" #line 54 "./fooparser.y"

@ -48,7 +48,7 @@ foodata: VAR '=' '{' fieldlist '}' ';' { static_cast<Foomatic2Loader*>(fooloa
; ;
fieldlist: assignment { $$ = $1; } fieldlist: assignment { $$ = $1; }
| fieldlist ',' assignment { TQMap<TQString,TQVariant>::ConstIterator it = $3.mapBegin(); $1.asMap().insert(it.key(), it.data()); $$ = $1; } | fieldlist ',' assignment { TQStringVariantMap::ConstIterator it = $3.mapBegin(); $1.asMap().insert(it.key(), it.data()); $$ = $1; }
; ;
assignment: STRING '=' '>' value { $$.asMap().insert($1.toString(), $4); } assignment: STRING '=' '>' value { $$.asMap().insert($1.toString(), $4); }

@ -110,7 +110,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh
} }
} }
TQMap<TQString,TQVariant> m = loader.data()[ "VAR" ].toMap(); TQStringVariantMap m = loader.data()[ "VAR" ].toMap();
if ( !m.isEmpty() ) if ( !m.isEmpty() )
{ {
prt->setManufacturer(m["make"].toString()); prt->setManufacturer(m["make"].toString());

@ -438,13 +438,13 @@ bool PPDLoader::putFooData( const TQString& data )
bool PPDLoader::putFooProcessedData( const TQVariant& var ) bool PPDLoader::putFooProcessedData( const TQVariant& var )
{ {
TQMap<TQString,TQVariant>::ConstIterator it = var.mapFind( "args_byname" ); TQStringVariantMap::ConstIterator it = var.mapFind( "args_byname" );
if ( it != var.mapEnd() ) if ( it != var.mapEnd() )
{ {
TQVariant opts = it.data(); TQVariant opts = it.data();
for ( it = opts.mapBegin(); it != opts.mapEnd(); ++it ) for ( it = opts.mapBegin(); it != opts.mapEnd(); ++it )
{ {
TQMap<TQString,TQVariant> opt = it.data().toMap(); TQStringVariantMap opt = it.data().toMap();
TQString type = opt[ "type" ].toString(); TQString type = opt[ "type" ].toString();
if ( type == "float" || type == "int" ) if ( type == "float" || type == "int" )
{ {

Loading…
Cancel
Save