summaryrefslogtreecommitdiffstats
path: root/kdeprint/cups/kmcupsmanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kdeprint/cups/kmcupsmanager.cpp
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/cups/kmcupsmanager.cpp')
-rw-r--r--kdeprint/cups/kmcupsmanager.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp
index 2d923a371..2b1f14ddd 100644
--- a/kdeprint/cups/kmcupsmanager.cpp
+++ b/kdeprint/cups/kmcupsmanager.cpp
@@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager()
TQString KMCupsManager::driverDbCreationProgram()
{
- return TQString::fromLatin1("/opt/kde3/bin/make_driver_db_cups");
+ return TQString::tqfromLatin1("/opt/kde3/bin/make_driver_db_cups");
}
TQString KMCupsManager::driverDirectory()
@@ -148,7 +148,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
req.setOperation(CUPS_ADD_PRINTER);
// only set the device-uri if needed, otherwise you may loose authentification
// data (login/password in URI's like smb or ipp).
- KMPrinter *otherP = findPrinter(p->printerName());
+ KMPrinter *otherP = tqfindPrinter(p->printerName());
if (!otherP || otherP->device() != p->device())
{
/**
@@ -173,7 +173,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
else if (!p->option("requesting-user-name-allowed").isEmpty())
req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQStringList::split(",",p->option("requesting-user-name-allowed"),false));
else
- req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::fromLatin1("all"));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::tqfromLatin1("all"));
}
req.addText(IPP_TAG_PRINTER,"printer-info",p->description());
req.addText(IPP_TAG_PRINTER,"printer-location",p->location());
@@ -287,9 +287,9 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
delete kes;
m_hostSuccess = false;
} else {
- TQDateTime tm = TQDateTime::currentDateTime().addSecs(2);
- while (!m_lookupDone && (TQDateTime::currentDateTime() < tm))
- qApp->processEvents();
+ TQDateTime tm = TQDateTime::tqcurrentDateTime().addSecs(2);
+ while (!m_lookupDone && (TQDateTime::tqcurrentDateTime() < tm))
+ tqApp->processEvents();
kes->cancelAsyncConnect();
@@ -347,7 +347,7 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
QStringList members;
for (TQStringList::ConstIterator it=values.begin(); it!=values.end(); ++it)
{
- int p = (*it).findRev('/');
+ int p = (*it).tqfindRev('/');
if (p != -1)
members.append((*it).right((*it).length()-p-1));
}
@@ -358,8 +358,8 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
// banners
req.name("job-sheets-default",values);
while (values.count() < 2) values.append("none");
- p->setOption("kde-banners",values.join(TQString::fromLatin1(",")));
- if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(",")));
+ p->setOption("kde-banners",values.join(TQString::tqfromLatin1(",")));
+ if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::tqfromLatin1(",")));
// quotas
int ival;
@@ -405,7 +405,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p)
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
req.addMime(IPP_TAG_OPERATION,"document-format","application/postscript");
if (!CupsInfos::self()->login().isEmpty()) req.addName(IPP_TAG_OPERATION,"requesting-user-name",CupsInfos::self()->login());
- req.addName(IPP_TAG_OPERATION,"job-name",TQString::fromLatin1("KDE Print Test"));
+ req.addName(IPP_TAG_OPERATION,"job-name",TQString::tqfromLatin1("KDE Print Test"));
if (req.doFileRequest("/printers/",testpage))
return true;
reportIppError(&req);
@@ -453,12 +453,12 @@ void KMCupsManager::loadServerPrinters()
// load default
req.init();
req.setOperation(CUPS_GET_DEFAULT);
- req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name"));
+ req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name"));
if (req.doRequest("/printers/"))
{
QString s = TQString::null;
req.name("printer-name",s);
- setHardDefault(findPrinter(s));
+ setHardDefault(tqfindPrinter(s));
}
// This request may fails for example if no printer is defined. Just
// discard the error message. Indeed as we successfully got printers
@@ -536,12 +536,12 @@ DrMain* KMCupsManager::loadPrinterDriver(KMPrinter *p, bool)
if (p->isClass(true))
{
KMPrinter *first_class_member = NULL;
- /* find the first printer in the class */
- first_class_member = findPrinter(p->members().first());
+ /* tqfind the first printer in the class */
+ first_class_member = tqfindPrinter(p->members().first());
if (first_class_member == NULL)
{
- /* we didn't find a printer in the class */
+ /* we didn't tqfind a printer in the class */
return NULL;
}
else
@@ -576,11 +576,11 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname)
{
QStringList comps = TQStringList::split('/', drname, false);
QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
- QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
- setErrorMsg(i18n("Unable to find the executable foomatic-datafile "
+ setErrorMsg(i18n("Unable to tqfind the executable foomatic-datafile "
"in your PATH. Check that Foomatic is correctly installed."));
return NULL;
}
@@ -655,30 +655,30 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename)
if (line.startsWith("*% COMDATA #"))
{
int p(-1), q(-1);
- if ((p=line.find("'name'")) != -1)
+ if ((p=line.tqfind("'name'")) != -1)
{
- p = line.find('\'',p+6)+1;
- q = line.find('\'',p);
+ p = line.tqfind('\'',p+6)+1;
+ q = line.tqfind('\'',p);
keyword = line.mid(p,q-p);
- opt = driver->findOption(keyword);
+ opt = driver->tqfindOption(keyword);
if (opt && (opt->type() == DrBase::Integer || opt->type() == DrBase::Float))
isnumeric = true;
else
isnumeric = false;
}
- /*else if ((p=line.find("'type'")) != -1)
+ /*else if ((p=line.tqfind("'type'")) != -1)
{
- p = line.find('\'',p+6)+1;
- if (line.find("float",p) != -1 || line.find("int",p) != -1)
+ p = line.tqfind('\'',p+6)+1;
+ if (line.tqfind("float",p) != -1 || line.tqfind("int",p) != -1)
isnumeric = true;
else
isnumeric = false;
}*/
- else if ((p=line.find("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
+ else if ((p=line.tqfind("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
{
QString prefix = line.left(p+9);
tout << prefix << " => '" << opt->valueText() << '\'';
- if (line.find(',',p) != -1)
+ if (line.tqfind(',',p) != -1)
tout << ',';
tout << endl;
continue;
@@ -687,13 +687,13 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename)
}
else if (line.startsWith("*Default"))
{
- int p = line.find(':',8);
+ int p = line.tqfind(':',8);
keyword = line.mid(8,p-8);
DrBase *bopt = 0;
if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" )
- bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) );
+ bopt = driver->tqfindOption( TQString::tqfromLatin1( "PageSize" ) );
else
- bopt = driver->findOption( keyword );
+ bopt = driver->tqfindOption( keyword );
if (bopt)
switch (bopt->type())
{
@@ -938,7 +938,7 @@ void KMCupsManager::slotConnectionSuccess()
IppRequest req;
req.setOperation( CUPS_GET_PRINTERS );
- req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::fromLatin1( "printer-name" ) );
+ req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::tqfromLatin1( "printer-name" ) );
if ( req.doRequest( "/printers/" ) )
setUpdatePossible( true );
else
@@ -1056,7 +1056,7 @@ static TQString downloadDriver(KMPrinter *p)
cupsSetServer(p->uri().host().local8Bit());
ippSetPort(p->uri().port());
// strip any "@..." from the printer name
- prname = prname.replace(TQRegExp("@.*"), "");
+ prname = prname.tqreplace(TQRegExp("@.*"), "");
changed = true;
}
*/