[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Sat Jun 5 19:34:34 CEST 2004


On Saturday 05 June 2004 13:01, Andrew Walker wrote:
> --- kdeextragear-2/kst/kst/curveplacementwidget.ui.h  #1.4:1.5
> @@ -88,9 +88,12 @@ void CurvePlacementWidget::updatePlotLis
>          Kst2DPlotList plots =
> static_cast<KstViewWindow*>(c)->view()->findChildrenType<Kst2DPlot>();
>
> -        for (Kst2DPlotList::Iterator i = plots.begin(); i != plots.end();
> ++i) { +    Kst2DPlotList::Iterator i = plots.begin();
> +    if (i != plots.end()) {
> +      for ( ; i != plots.end(); ++i) {
>              _plotList->insertItem((*i)->tagName());
>          }
> +    }
>
> -        if (!old.isNull() && _plotList->count()) {
> +    if (!old.isNull() && _plotList->count() > 0) {
>              _plotList->setCurrentText(old);
>          }

  What's the purpose of these changes?  In particular, I don't see any reason 
for the added if() in the for() loop.

> --- kdeextragear-2/kst/kst/kstviewwindow.cpp  #1.8:1.9
> @@ -60,4 +60,5 @@ KstViewWindow::KstViewWindow(QWidget *pa
>    commonConstructor();
>    _view = new KstTopLevelView(this);
> +  _view->_KShared_ref();
>  }

  And this is an abuse of notation.  I have fixed it.  _KShared_ref should 
basically never be called manually.

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list