[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kdeprint
From:       Kurt Pfeifle <kpfeifle () danka ! de>
Date:       2005-02-28 9:23:00
Message-ID: 20050228092300.C909718221 () office ! kde ! org
[Download RAW message or body]

CVS commit by pfeifle: 

- Do no re-order specified pages or remove duplicated ones. Print what the user \
                specified instead.
- Suppress the use of deprecated functions

CC-MAIL: 99769-close@bugs.kde.org
CC-MAIL: 99774@bugs.kde.org


  M +3 -10     kprinter.cpp   1.83


--- kdelibs/kdeprint/kprinter.cpp  #1.82:1.83
@@ -485,6 +485,4 @@ QValueList<int> KPrinter::pageList() con
                         {
                                 QStringList     ranges = \
                QStringList::split(',',option("kde-range"),false);
-                                // use a temporary map to insure uniqueness of \
                pages.
-                                QMap<int,int>   pages;
                                 for (QStringList::ConstIterator \
it=ranges.begin();it!=ranges.end();++it)  {
@@ -495,5 +493,5 @@ QValueList<int> KPrinter::pageList() con
                                                 int     pp = (*it).toInt(&ok);
                                                 if (ok && pp >= mp && pp <= MP)
-                                                        pages[pp] = 1;
+                                                        list.append(pp);
                                         }
                                         else
@@ -508,13 +506,8 @@ QValueList<int> KPrinter::pageList() con
                                                         p2 = QMIN(MP,p2);
                                                         for (int i=p1;i<=p2;i++)
-                                                                pages[i] = 1;
+                                                                list.append(i);
                                                 }
                                         }
                                 }
-                                // translate the map into the list
-                                for (QMap<int,int>::ConstIterator \
                it=pages.begin();it!=pages.end();++it)
-                                        list.append(it.key());
-                                // sort the list
-                                qHeapSort(list);
                         }
                         else
@@ -695,5 +688,5 @@ bool KPrinter::autoConfigure(const QStri
 void reportError(KPrinter *p)
 {
-        if (!KNotifyClient::event("printerror",i18n("<p><nobr>A print error \
occurred. Error message received from \
system:</nobr></p><br>%1").arg(p->errorMessage()))) +        if \
(!KNotifyClient::event(0,"printerror",i18n("<p><nobr>A print error occurred. Error \
message received from system:</nobr></p><br>%1").arg(p->errorMessage())))  \
kdDebug(500) << "could not send notify event" << endl;  }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic