EditorProxy
Milo Hoffman
Milo at NG-Projekt.ORG
Fri Jan 24 22:10:09 UTC 2003
Hi all,
EditorProxy::setLineNumber is currently defined as:
void setLineNumber(KParts::Part* part, int lineNum);
and calls to
KTextEditor::ViewCursorInterface::setCursorPosition(lineNum, 0);
KTextEditor::ViewCursorInterface::setCursorPosition defines both of it's
parameters as unsinged int.
As i saw from a recent crash in qEditor, EditorProxy::setLineNumber is
sometimes called with -1 as lineNum. What should be the correct behaviour of
the editor in this case? Goto last line? Goto first line? Or has -1 even any
special meaning in this case? (Actual behaviour seems to be going to the
first line)
The -1 comes from
PartController::editDocument(const KURL& inputUrl, int lineNum=-1)
which is the only function calling setLineNumber.
Shouldn't this parameters all be changed to unsigned for consistency?
Sascha "Milo" Cunz
More information about the KDevelop-devel
mailing list