summaryrefslogtreecommitdiffstats
path: root/kdeprint/cups/kmcupsmanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /kdeprint/cups/kmcupsmanager.cpp
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 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 2b1f14ddd..2d923a371 100644
--- a/kdeprint/cups/kmcupsmanager.cpp
+++ b/kdeprint/cups/kmcupsmanager.cpp
@@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager()
TQString KMCupsManager::driverDbCreationProgram()
{
- return TQString::tqfromLatin1("/opt/kde3/bin/make_driver_db_cups");
+ return TQString::fromLatin1("/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 = tqfindPrinter(p->printerName());
+ KMPrinter *otherP = findPrinter(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::tqfromLatin1("all"));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::fromLatin1("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::tqcurrentDateTime().addSecs(2);
- while (!m_lookupDone && (TQDateTime::tqcurrentDateTime() < tm))
- tqApp->processEvents();
+ TQDateTime tm = TQDateTime::currentDateTime().addSecs(2);
+ while (!m_lookupDone && (TQDateTime::currentDateTime() < tm))
+ qApp->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).tqfindRev('/');
+ int p = (*it).findRev('/');
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::tqfromLatin1(",")));
- if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::tqfromLatin1(",")));
+ p->setOption("kde-banners",values.join(TQString::fromLatin1(",")));
+ if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(",")));
// 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::tqfromLatin1("KDE Print Test"));
+ req.addName(IPP_TAG_OPERATION,"job-name",TQString::fromLatin1("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::tqfromLatin1("printer-name"));
+ req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name"));
if (req.doRequest("/printers/"))
{
QString s = TQString::null;
req.name("printer-name",s);
- setHardDefault(tqfindPrinter(s));
+ setHardDefault(findPrinter(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;
- /* tqfind the first printer in the class */
- first_class_member = tqfindPrinter(p->members().first());
+ /* find the first printer in the class */
+ first_class_member = findPrinter(p->members().first());
if (first_class_member == NULL)
{
- /* we didn't tqfind a printer in the class */
+ /* we didn't find 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::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
- setErrorMsg(i18n("Unable to tqfind the executable foomatic-datafile "
+ setErrorMsg(i18n("Unable to find 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.tqfind("'name'")) != -1)
+ if ((p=line.find("'name'")) != -1)
{
- p = line.tqfind('\'',p+6)+1;
- q = line.tqfind('\'',p);
+ p = line.find('\'',p+6)+1;
+ q = line.find('\'',p);
keyword = line.mid(p,q-p);
- opt = driver->tqfindOption(keyword);
+ opt = driver->findOption(keyword);
if (opt && (opt->type() == DrBase::Integer || opt->type() == DrBase::Float))
isnumeric = true;
else
isnumeric = false;
}
- /*else if ((p=line.tqfind("'type'")) != -1)
+ /*else if ((p=line.find("'type'")) != -1)
{
- p = line.tqfind('\'',p+6)+1;
- if (line.tqfind("float",p) != -1 || line.tqfind("int",p) != -1)
+ p = line.find('\'',p+6)+1;
+ if (line.find("float",p) != -1 || line.find("int",p) != -1)
isnumeric = true;
else
isnumeric = false;
}*/
- else if ((p=line.tqfind("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
+ else if ((p=line.find("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
{
QString prefix = line.left(p+9);
tout << prefix << " => '" << opt->valueText() << '\'';
- if (line.tqfind(',',p) != -1)
+ if (line.find(',',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.tqfind(':',8);
+ int p = line.find(':',8);
keyword = line.mid(8,p-8);
DrBase *bopt = 0;
if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" )
- bopt = driver->tqfindOption( TQString::tqfromLatin1( "PageSize" ) );
+ bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) );
else
- bopt = driver->tqfindOption( keyword );
+ bopt = driver->findOption( 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::tqfromLatin1( "printer-name" ) );
+ req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::fromLatin1( "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.tqreplace(TQRegExp("@.*"), "");
+ prname = prname.replace(TQRegExp("@.*"), "");
changed = true;
}
*/