summaryrefslogtreecommitdiffstats
path: root/tdeprint
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-06-01 18:44:56 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-07-07 23:44:40 +0900
commitaaaf378033f889408155a902349c676429b85254 (patch)
tree2adaae48af3e2f3a5f7be528880efcf06c9f1202 /tdeprint
parentbf683427937ea0cfd90749b833456377de6ffa10 (diff)
downloadtdelibs-aaaf378033f889408155a902349c676429b85254.tar.gz
tdelibs-aaaf378033f889408155a902349c676429b85254.zip
Adjusted to use new TQStringVariantMap type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdeprint')
-rw-r--r--tdeprint/foomatic2loader.cpp10
-rw-r--r--tdeprint/foomatic2loader.h10
-rw-r--r--tdeprint/fooparser.cpp2
-rw-r--r--tdeprint/fooparser.y2
-rw-r--r--tdeprint/lpr/matichandler.cpp2
-rw-r--r--tdeprint/ppdloader.cpp4
6 files changed, 15 insertions, 15 deletions
diff --git a/tdeprint/foomatic2loader.cpp b/tdeprint/foomatic2loader.cpp
index 0d0637c90..c498477fd 100644
--- a/tdeprint/foomatic2loader.cpp
+++ b/tdeprint/foomatic2loader.cpp
@@ -67,7 +67,7 @@ bool Foomatic2Loader::readFromBuffer( const TQString& buffer )
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;
choice->setName( name );
@@ -75,7 +75,7 @@ DrBase* Foomatic2Loader::createValue( const TQString& name, const TQMap<TQString
return choice;
}
-DrBase* Foomatic2Loader::createOption( const TQMap<TQString,TQVariant>& m ) const
+DrBase* Foomatic2Loader::createOption( const TQStringVariantMap& m ) const
{
TQString type = m.operator[]( "type" ).toString();
DrBase *opt = NULL;
@@ -83,7 +83,7 @@ DrBase* Foomatic2Loader::createOption( const TQMap<TQString,TQVariant>& m ) cons
{
DrListOption *lopt = new DrListOption;
TQVariant a = m.operator[]( "vals_byname" );
- TQMap<TQString,TQVariant>::ConstIterator it = a.mapBegin();
+ TQStringVariantMap::ConstIterator it = a.mapBegin();
for ( ; it!=a.mapEnd(); ++it )
{
if ( it.data().type() != TQVariant::Map )
@@ -183,7 +183,7 @@ DrMain* Foomatic2Loader::buildDriver() const
TQRegExp re( "(\\d+) +(\\d+)" );
if ( choices.type() == TQVariant::Map )
{
- TQMap<TQString,TQVariant>::ConstIterator it = choices.mapBegin();
+ TQStringVariantMap::ConstIterator it = choices.mapBegin();
for ( ; it!=choices.mapEnd(); ++it )
{
TQString driverval = ( *it ).mapFind( "driverval" ).data().toString();
@@ -234,7 +234,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
v = V.mapFind( "args_byname" ).data();
if ( !v.isNull() && v.type() == TQVariant::Map )
{
- TQMap<TQString,TQVariant>::ConstIterator it = v.mapBegin();
+ TQStringVariantMap::ConstIterator it = v.mapBegin();
for ( ; it!=v.mapEnd(); ++it )
{
if ( ( *it ).type() != TQVariant::Map )
diff --git a/tdeprint/foomatic2loader.h b/tdeprint/foomatic2loader.h
index 86bedb412..e61cdfded 100644
--- a/tdeprint/foomatic2loader.h
+++ b/tdeprint/foomatic2loader.h
@@ -37,21 +37,21 @@ public:
bool read( TQIODevice *d );
bool readFromBuffer( const TQString& buffer );
bool readFromFile( const TQString& filename );
- TQMap<TQString,TQVariant> data() const;
+ TQStringVariantMap data() const;
DrMain* buildDriver() const;
DrMain* modifyDriver( DrMain* ) const;
static DrMain* loadDriver( const TQString& filename );
private:
- TQMap<TQString,TQVariant> m_foodata;
+ TQStringVariantMap m_foodata;
friend int tdeprint_foomatic2parse( void* );
- DrBase* createValue( const TQString&, const TQMap<TQString,TQVariant>& ) const;
- DrBase* createOption( const TQMap<TQString,TQVariant>& ) const;
+ DrBase* createValue( const TQString&, const TQStringVariantMap& ) const;
+ DrBase* createOption( const TQStringVariantMap& ) const;
};
-inline TQMap<TQString,TQVariant> Foomatic2Loader::data() const
+inline TQStringVariantMap Foomatic2Loader::data() const
{ return m_foodata; }
#endif /* FOOMATIC2LOADER_H */
diff --git a/tdeprint/fooparser.cpp b/tdeprint/fooparser.cpp
index e919616ab..2a6b38663 100644
--- a/tdeprint/fooparser.cpp
+++ b/tdeprint/fooparser.cpp
@@ -737,7 +737,7 @@ case 5:
break;}
case 6:
#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;}
case 7:
#line 54 "./fooparser.y"
diff --git a/tdeprint/fooparser.y b/tdeprint/fooparser.y
index 20626ce59..a9bb56e89 100644
--- a/tdeprint/fooparser.y
+++ b/tdeprint/fooparser.y
@@ -48,7 +48,7 @@ foodata: VAR '=' '{' fieldlist '}' ';' { static_cast<Foomatic2Loader*>(fooloa
;
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); }
diff --git a/tdeprint/lpr/matichandler.cpp b/tdeprint/lpr/matichandler.cpp
index 826867cd2..07fee1260 100644
--- a/tdeprint/lpr/matichandler.cpp
+++ b/tdeprint/lpr/matichandler.cpp
@@ -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() )
{
prt->setManufacturer(m["make"].toString());
diff --git a/tdeprint/ppdloader.cpp b/tdeprint/ppdloader.cpp
index fd243b0f9..93c63a61c 100644
--- a/tdeprint/ppdloader.cpp
+++ b/tdeprint/ppdloader.cpp
@@ -438,13 +438,13 @@ bool PPDLoader::putFooData( const TQString& data )
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() )
{
TQVariant opts = it.data();
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();
if ( type == "float" || type == "int" )
{