diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kdeprint/lpr/lpchelper.cpp | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/lpr/lpchelper.cpp')
-rw-r--r-- | kdeprint/lpr/lpchelper.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kdeprint/lpr/lpchelper.cpp b/kdeprint/lpr/lpchelper.cpp index 516e85af3..fb39a37f9 100644 --- a/kdeprint/lpr/lpchelper.cpp +++ b/kdeprint/lpr/lpchelper.cpp @@ -82,26 +82,26 @@ void LpcHelper::parseStatusLPR(TQTextStream &t) line = t.readLine(); if (line.isEmpty()) continue; - else if (!line[0].isSpace() && (p = line.find(':')) != -1) + else if (!line[0].isSpace() && (p = line.tqfind(':')) != -1) { printer = line.left(p); m_state[printer] = KMPrinter::Idle; } - else if (line.find("printing is disabled") != -1) + else if (line.tqfind("printing is disabled") != -1) { if (!printer.isEmpty()) m_state[printer] = KMPrinter::PrinterState((KMPrinter::Stopped) | (m_state[printer] & ~KMPrinter::StateMask)); } - else if (line.find("queuing is disabled") != -1) + else if (line.tqfind("queuing is disabled") != -1) { if (!printer.isEmpty()) m_state[printer] = KMPrinter::PrinterState((KMPrinter::Rejecting) | (m_state[printer] & KMPrinter::StateMask)); } - else if (line.find("entries") != -1) + else if (line.tqfind("entries") != -1) { if (!printer.isEmpty() && (m_state[printer] & KMPrinter::StateMask) != KMPrinter::Stopped && - line.find("no entries") == -1) + line.tqfind("no entries") == -1) m_state[printer] = KMPrinter::PrinterState((m_state[printer] & ~KMPrinter::StateMask) | KMPrinter::Processing); } } @@ -121,7 +121,7 @@ void LpcHelper::parseStatusLPRng(TQTextStream& t) l = TQStringList::split(TQRegExp("\\s"), t.readLine(), false); if (l.count() < 4) continue; - p = l[0].find('@'); + p = l[0].tqfind('@'); if (p == 0) printer = l[0]; else @@ -206,11 +206,11 @@ static TQString lprngAnswer(const TQString& result, const TQString& printer) { int p, q; - p = result.find("\n" + printer); + p = result.tqfind("\n" + printer); if (p != -1) { - q = result.find(':', p)+2; - p = result.find('\n', q); + q = result.tqfind(':', p)+2; + p = result.tqfind('\n', q); QString answer = result.mid(q, p-q).stripWhiteSpace(); return answer; } @@ -274,9 +274,9 @@ bool LpcHelper::removeJob(KMJob *job, TQString& msg) return false; } QString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id())); - if (result.find("dequeued") != -1) + if (result.tqfind("dequeued") != -1) return true; - else if (result.find("Permission denied") != -1 || result.find("no permissions") != -1) + else if (result.tqfind("Permission denied") != -1 || result.tqfind("no permissions") != -1) msg = i18n("Permission denied."); else msg = i18n("Execution of lprm failed: %1").arg(result); |