[Kst] branches/work/kst/1.5/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Wed Aug 15 01:01:46 CEST 2007


SVN commit 700152 by arwalker:

minor code cleanup

 M  +7 -8      kstviewobject.cpp  
 M  +1 -5      kstviewwidget.cpp  
 M  +4 -6      kstviewwindow.cpp  


--- branches/work/kst/1.5/kst/src/libkstapp/kstviewobject.cpp #700151:700152
@@ -508,7 +508,7 @@
 
 bool KstViewObject::removeChild(KstViewObjectPtr obj, bool recursive) {
   bool rc = _children.remove(obj) > 0;
-  
+
   if (recursive) {
     for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
       rc = (*i)->removeChild(obj, true) && rc;
@@ -516,7 +516,7 @@
   }
 
   obj->_parent = 0L;
-  
+
   return rc;
 }
 
@@ -1168,7 +1168,7 @@
   bool rc = false;
   int id;
   int index;
-  
+
   _moveToMap.clear();
 
   if (!tagName().isEmpty()) {
@@ -1179,7 +1179,7 @@
     menu->insertItem(i18n("&Edit..."), this, SLOT(edit()));
     rc = true;
   }
-  
+
   if (_layoutActions & Delete) {
     menu->insertItem(i18n("&Delete"), this, SLOT(deleteObject()));
     rc = true;
@@ -1400,7 +1400,6 @@
 }
 
 
-// FIXME: delete
 void KstViewObject::moveTo(int id) {
   QString windowName = _moveToMap[id];
 
@@ -1422,7 +1421,6 @@
 }
 
 
-// FIXME: delete
 void KstViewObject::copyTo(int id) {
   QString windowName = _copyToMap[id];
 
@@ -1767,7 +1765,7 @@
       for (size_t i=0; i<plotList.size(); i++) {
         KstViewObjectPtr copy = w->view()->findChild(plotList[i]);
         KstViewObject *created;
-        
+
         if (copy) {
           QString plotName;
           bool duplicate = true;
@@ -1984,6 +1982,7 @@
 void KstViewObject::drawShadow(KstPainter& p, const QPoint& pos) {
   // default is a rectangle
   QRect rect(geometry());
+
   rect.moveTopLeft(pos);
   p.drawRect(rect);
 }
@@ -2090,4 +2089,4 @@
 }
 
 #include "kstviewobject.moc"
-// vim: ts=2 sw=2 et
+
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewwidget.cpp #700151:700152
@@ -46,7 +46,6 @@
 
 QDragObject *KstViewWidget::dragObject() {
   KMultipleDrag *drag = new KMultipleDrag(this);
-#if 1
   QStringList plots;
   KstViewObjectList vol;
   QString window = static_cast<KstViewWindow*>(parent())->caption();
@@ -72,9 +71,6 @@
   KstViewObjectImageDrag *imd = new KstViewObjectImageDrag(this);
   imd->setObjects(vol);
   drag->addDragObject(imd);
-#else
-  drag->addDragObject(new KstPlotDrag(...));
-#endif
 
   return drag;
 }
@@ -543,4 +539,4 @@
 
 
 #include "kstviewwidget.moc"
-// vim: ts=2 sw=2 et
+
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewwindow.cpp #700151:700152
@@ -230,20 +230,18 @@
 }
 
 
-// FIXME: don't write to disk like this.  write to a pipe or at least use
-// KTempFile
 void KstViewWindow::immediatePrintToEps(const QString &filename, const QSize& size) {
   if (!view()->children().isEmpty()) {
     QString filenameNew;
     QString filenameNewEps;
     int right;
     int bottom;
-    
+
     {
       QPrinter printer(QPrinter::HighResolution);
       QString dotFormat = QString(".eps");
       const int pos = filename.findRev(dotFormat, -1, false);
-      
+
       if (pos != -1 && pos == int(filename.length() - dotFormat.length())) {
         filenameNewEps = filename;
       } else {
@@ -335,7 +333,7 @@
         }
       }
     }
-  
+
     if (datetimeFooter) {
       QDateTime dateTime = QDateTime::currentDateTime();
       QString title = i18n("Page: %1  Name: %2  Date: %3").arg(pages).arg(caption()).arg(dateTime.toString(Qt::ISODate));
@@ -444,4 +442,4 @@
 
 
 #include "kstviewwindow.moc"
-// vim: ts=2 sw=2 et
+


More information about the Kst mailing list