[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kdeprint/cups
From: Dirk Mueller <mueller () kde ! org>
Date: 2002-12-30 15:19:33
[Download RAW message or body]
CVS commit by mueller:
make it compile
M +21 -1 kcupsprinterimpl.cpp 1.16
--- kdelibs/kdeprint/cups/kcupsprinterimpl.cpp #1.15:1.16
@@ -34,4 +34,24 @@
static void mapToCupsOptions(const QMap<QString,QString>& opts, QString& cmd);
+static QSize rangeToSize(const QString& s)
+{
+ QString range = s;
+ int p(-1);
+ int from, to;
+
+ if ((p=range.find(',')) != -1)
+ range.truncate(p);
+ if ((p=range.find('-')) != -1)
+ {
+ from = range.left(p).toInt();
+ to = range.right(range.length()-p-1).toInt();
+ }
+ else if (!range.isEmpty())
+ from = to = range.toInt();
+ else
+ from = to = 0;
+
+ return QSize(from,to);
+}
//******************************************************************************************************
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic