I get the following warning in gcc.
trucov/gui/mainwindow.cpp|296| warning: taking address of temporary
The code looks like this
{{{
cursor = &(editor3->textCursor());
cursor->movePosition(QTextCursor::Down, QTextCursor::MoveAnchor, line_no + 1);
cursor->movePosition(QTextCursor::Up, QTextCursor::KeepAnchor, 1);
}}}
it should look like this:
{{{
QTextCursor cursor = editor3->textCursor();
cursor->movePosition(QTextCursor::Down, QTextCursor::MoveAnchor, line_no + 1);
cursor->movePosition(QTextCursor::Up, QTextCursor::KeepAnchor, 1);
editor3->setTextCursor(cursor);
}}}
I'm afraid to make the update as the old code besides being dangerous didn't
actually update the cursor.
Should the code be removed, or updated to work?
Original issue reported on code.google.com by j.nick.terry@gmail.com on 16 Jun 2010 at 4:35
Original issue reported on code.google.com by
j.nick.terry@gmail.com
on 16 Jun 2010 at 4:35