summaryrefslogtreecommitdiff
path: root/core
authorerik <erik>2007-01-10 17:31:08 (UTC)
committer erik <erik>2007-01-10 17:31:08 (UTC)
commit6825f30b665952864dbe35fe8329a0e4c264d4b8 (patch) (side-by-side diff)
tree7c8d178f835d4a7d294b6ef65e0040c40579e84e /core
parentd8e580a239ab84fbe063b2f3779d417598d5ca0a (diff)
downloadopie-6825f30b665952864dbe35fe8329a0e4c264d4b8.zip
opie-6825f30b665952864dbe35fe8329a0e4c264d4b8.tar.gz
opie-6825f30b665952864dbe35fe8329a0e4c264d4b8.tar.bz2
All of the files included have instances where an array is new'ed but
the corresponding delete does not have the corresponding [] argument.
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEScreen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp
index 8e69a88..1db34d2 100644
--- a/core/apps/embeddedkonsole/TEScreen.cpp
+++ b/core/apps/embeddedkonsole/TEScreen.cpp
@@ -1117,50 +1117,50 @@ QString TEScreen::getSelText(const BOOL preserve_line_breaks)
m[d++] = ' ';
}
}
else
{
m[d++] = ((preserve_line_breaks ||
((eol % columns) == 0)) ?
'\n' : ' ');
}
}
s = (eol / columns + 1) * columns;
}
}
QChar* qc = new QChar[d];
for (int i = 0; i < d; i++)
{
qc[i] = m[i];
}
QString res(qc, d);
- delete m;
- delete qc;
+ delete [] m;
+ delete [] qc;
return res;
}
/* above ... end of line processing for selection -- psilva
cases:
1) (eol+1)%columns == 0 --> the whole line is filled.
If the last char is a space, insert (preserve) space. otherwise
leave the text alone, so that words that are broken by linewrap
are preserved.
FIXME:
* this suppresses \n for command output that is
sized to the exact column width of the screen.
2) eol%columns == 0 --> blank line.
insert a \n unconditionally.
Do it either you would because you are in preserve_line_break mode,
or because it's an ASCII paragraph delimiter, so even when
not preserving line_breaks, you want to preserve paragraph breaks.
3) else --> partially filled line
insert a \n in preserve line break mode, else a space
The space prevents concatenation of the last word of one