[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeprint/cups
From: Laurent Montel <montel () kde ! org>
Date: 2006-02-17 7:57:47
Message-ID: 1140163067.743628.3935.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 510400 by mlaurent:
Port to qt4
M +5 -5 cupsinfos.cpp
M +2 -2 kmcupsjobmanager.cpp
M +7 -7 kmcupsmanager.cpp
M +1 -1 kmpropbanners.cpp
M +2 -2 kmwbanners.cpp
M +1 -1 kmwipp.cpp
--- trunk/KDE/kdelibs/kdeprint/cups/cupsinfos.cpp #510399:510400
@@ -72,7 +72,7 @@
void CupsInfos::setHost(const QString& s)
{
host_ = s;
- cupsSetServer(s.latin1());
+ cupsSetServer(qPrintable(s));
}
void CupsInfos::setPort(int p)
@@ -84,7 +84,7 @@
void CupsInfos::setLogin(const QString& s)
{
login_ = s;
- cupsSetUser(s.latin1());
+ cupsSetUser(qPrintable(s));
}
void CupsInfos::setPassword(const QString& s)
@@ -105,7 +105,7 @@
return NULL;
setLogin( pwd.first );
setPassword( pwd.second );
- return pwd.second.latin1();
+ return qPrintable(pwd.second);
}
void CupsInfos::load()
@@ -127,8 +127,8 @@
reallogin_ = cupsUser();
// synchronize with CUPS
- cupsSetServer(host_.latin1());
- cupsSetUser(login_.latin1());
+ cupsSetServer(qPrintable(host_));
+ cupsSetUser(qPrintable(login_));
ippSetPort(port_);
}
--- trunk/KDE/kdelibs/kdeprint/cups/kmcupsjobmanager.cpp #510399:510400
@@ -349,12 +349,12 @@
static QString processRange(const QString& range)
{
- QStringList l = QStringList::split(',', range, false);
+ QStringList l = range.split(',', QString::SkipEmptyParts);
QString s;
for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
s.append(*it);
- if ((*it).find('-') == -1)
+ if ((*it).indexOf('-') == -1)
s.append("-").append(*it);
s.append(",");
}
--- trunk/KDE/kdelibs/kdeprint/cups/kmcupsmanager.cpp #510399:510400
@@ -156,7 +156,7 @@
}
if (!p->option("kde-banners").isEmpty())
{
- QStringList bans = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList bans = p->option("kde-banners").split(',',QString::SkipEmptyParts);
while (bans.count() < 2)
bans.append("none");
req.addName(IPP_TAG_PRINTER,"job-sheets-default",bans);
@@ -614,10 +614,10 @@
if (line.startsWith("*% COMDATA #"))
{
int p(-1), q(-1);
- if ((p=line.find("'name'")) != -1)
+ if ((p=line.indexOf("'name'")) != -1)
{
- p = line.find('\'',p+6)+1;
- q = line.find('\'',p);
+ p = line.indexOf('\'',p+6)+1;
+ q = line.indexOf('\'',p);
keyword = line.mid(p,q-p);
opt = driver->findOption(keyword);
if (opt && (opt->type() == DrBase::Integer || opt->type() == DrBase::Float))
@@ -633,11 +633,11 @@
else
isnumeric = false;
}*/
- else if ((p=line.find("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
+ else if ((p=line.indexOf("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
{
QString prefix = line.left(p+9);
tout << prefix << " => '" << opt->valueText() << '\'';
- if (line.find(',',p) != -1)
+ if (line.indexOf(',',p) != -1)
tout << ',';
tout << endl;
continue;
@@ -646,7 +646,7 @@
}
else if (line.startsWith("*Default"))
{
- int p = line.find(':',8);
+ int p = line.indexOf(':',8);
keyword = line.mid(8,p-8);
DrBase *bopt = 0;
if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" )
--- trunk/KDE/kdelibs/kdeprint/cups/kmpropbanners.cpp #510399:510400
@@ -59,7 +59,7 @@
{
if (p && p->isPrinter())
{
- QStringList l = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList l = p->option("kde-banners").split(',',QString::SkipEmptyParts);
while ( l.count() < 2 )
l.append( "none" );
m_startbanner->setText(i18n(mapBanner(l[0]).toUtf8()));
--- trunk/KDE/kdelibs/kdeprint/cups/kmwbanners.cpp #510399:510400
@@ -131,8 +131,8 @@
QStringList l = QStringList::split(',',p->option("kde-banners"),false);
while (l.count() < 2)
l.append("none");
- m_start->setCurrentItem(m_bans.findIndex(l[0]));
- m_end->setCurrentItem(m_bans.findIndex(l[1]));
+ m_start->setCurrentIndex(m_bans.indexOf(l[0]));
+ m_end->setCurrentIndex(m_bans.indexOf(l[1]));
}
}
--- trunk/KDE/kdelibs/kdeprint/cups/kmwipp.cpp #510399:510400
@@ -61,7 +61,7 @@
}
// check server
- http_t *HTTP = httpConnect(text(0).latin1(),p);
+ http_t *HTTP = httpConnect(qPrintable(text(0)),p);
if (HTTP)
{
httpClose(HTTP);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic