summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-02-28 17:32:26 (UTC)
committer llornkcor <llornkcor>2003-02-28 17:32:26 (UTC)
commit592904b2664c6fa3dbb4590b80a8552475995366 (patch) (side-by-side diff)
tree9e28cdbc9072774cdfcb7a5e52f8d8c5938cc394
parenta5a5a25bee2596608906ae44cdad45bf89276385 (diff)
downloadopie-592904b2664c6fa3dbb4590b80a8552475995366.zip
opie-592904b2664c6fa3dbb4590b80a8552475995366.tar.gz
opie-592904b2664c6fa3dbb4590b80a8552475995366.tar.bz2
fix bad manners
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index b81f3b4..ce868d6 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -1161,34 +1161,38 @@ void TextEdit::setTimer()
{
if(featureAutoSave)
{
// qDebug("setting autosave");
QTimer *timer = new QTimer(this );
connect( timer, SIGNAL(timeout()), this, SLOT(timerCrank()) );
timer->start( 300000, true); //5 minutes
}
}
void TextEdit::gotoLine() {
QWidget *d = QApplication::desktop();
gotoEdit = new QLineEdit( 0, "Goto line");
gotoEdit->move( (d->width()/2) - ( gotoEdit->width()/2) , (d->height()/2) - (gotoEdit->height()/2));
gotoEdit->setFrame(true);
gotoEdit->show();
connect (gotoEdit,SIGNAL(returnPressed()), this, SLOT(doGoto()));
}
void TextEdit::doGoto() {
QString number = gotoEdit->text();
gotoEdit->hide();
- if(gotoEdit) delete gotoEdit;
+ if(gotoEdit) {
+ delete gotoEdit;
+ gotoEdit = 0;
+ }
+
bool ok;
int lineNumber = number.toInt(&ok, 10);
if(editor->numLines() < lineNumber)
QMessageBox::message(tr("Text Edit"),tr("Not enough lines"));
else
{
editor->setCursorPosition(lineNumber, 0, false);
}
}