-rw-r--r-- | core/apps/embeddedkonsole/TEScreen.cpp | 32 | ||||
-rw-r--r-- | inputmethods/dasher/PPMLanguageModel.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-reader/Bkmks.cpp | 18 | ||||
-rw-r--r-- | noncore/apps/opie-reader/Bkmks.h | 7 | ||||
-rw-r--r-- | noncore/apps/opie-reader/StyleConsts.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/opie-reader/StyleConsts.h | 8 | ||||
-rw-r--r-- | noncore/apps/opie-write/qrichtext.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katehighlight.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katehighlight.h | 2 |
9 files changed, 57 insertions, 32 deletions
diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp index 1db34d2..30ff49d 100644 --- a/core/apps/embeddedkonsole/TEScreen.cpp +++ b/core/apps/embeddedkonsole/TEScreen.cpp | |||
@@ -67,13 +67,13 @@ | |||
67 | 67 | ||
68 | TEScreen::TEScreen(int lines, int columns) | 68 | TEScreen::TEScreen(int _lines, int _columns) : |
69 | lines(_lines), | ||
70 | columns(_columns), | ||
71 | tabstops(0), | ||
72 | histCursor(0), | ||
73 | horzCursor(0) | ||
69 | { | 74 | { |
70 | this->lines = lines; | ||
71 | this->columns = columns; | ||
72 | // odebug << "Columns " << columns << "" << oendl; | 75 | // odebug << "Columns " << columns << "" << oendl; |
73 | 76 | ||
74 | image = (ca*) malloc(lines*columns*sizeof(ca)); | 77 | image = new ca[lines*columns]; |
75 | tabstops = NULL; initTabStops(); | 78 | initTabStops(); |
76 | |||
77 | histCursor = 0; | ||
78 | horzCursor = 0; | ||
79 | 79 | ||
@@ -88,4 +88,4 @@ TEScreen::~TEScreen() | |||
88 | { | 88 | { |
89 | free(image); | 89 | delete [] image; |
90 | if (tabstops) free(tabstops); | 90 | delete [] tabstops; |
91 | } | 91 | } |
@@ -398,3 +398,3 @@ void TEScreen::resizeImage(int new_lines, int new_columns) | |||
398 | // make new image | 398 | // make new image |
399 | ca* newimg = (ca*)malloc( new_lines * new_columns * sizeof( ca)); | 399 | ca* newimg = new ca[new_lines * new_columns]; |
400 | 400 | ||
@@ -420,3 +420,3 @@ void TEScreen::resizeImage(int new_lines, int new_columns) | |||
420 | } | 420 | } |
421 | free(image); | 421 | delete [] image; |
422 | image = newimg; | 422 | image = newimg; |
@@ -509,3 +509,3 @@ ca* TEScreen::getCookedImage() | |||
509 | int x,y; | 509 | int x,y; |
510 | ca* merged = (ca*)malloc(lines*columns*sizeof(ca)); | 510 | ca* merged = new ca[lines*columns]; |
511 | ca dft(' ',DEFAULT_FORE_COLOR,DEFAULT_BACK_COLOR,DEFAULT_RENDITION); | 511 | ca dft(' ',DEFAULT_FORE_COLOR,DEFAULT_BACK_COLOR,DEFAULT_RENDITION); |
@@ -625,4 +625,6 @@ void TEScreen::initTabStops() | |||
625 | { | 625 | { |
626 | if (tabstops) free(tabstops); | 626 | if (tabstops) |
627 | tabstops = (bool*)malloc(columns*sizeof(bool)); | 627 | delete [] tabstops; |
628 | |||
629 | tabstops = new bool[columns]; | ||
628 | // Arrg! The 1st tabstop has to be one longer than the other. | 630 | // Arrg! The 1st tabstop has to be one longer than the other. |
diff --git a/inputmethods/dasher/PPMLanguageModel.cpp b/inputmethods/dasher/PPMLanguageModel.cpp index 137b07f..d767d16 100644 --- a/inputmethods/dasher/PPMLanguageModel.cpp +++ b/inputmethods/dasher/PPMLanguageModel.cpp | |||
@@ -61,3 +61,3 @@ CPPMLanguageModel::CPPMnode * CPPMLanguageModel::CPPMnode::add_symbol_to_node(in | |||
61 | CPPMLanguageModel::CPPMLanguageModel(CAlphabet *_alphabet,int _normalization) | 61 | CPPMLanguageModel::CPPMLanguageModel(CAlphabet *_alphabet,int _normalization) |
62 | : CLanguageModel(_alphabet,_normalization) | 62 | : CLanguageModel(_alphabet,_normalization), root(0), m_rootcontext(0) |
63 | { | 63 | { |
@@ -70,2 +70,3 @@ CPPMLanguageModel::~CPPMLanguageModel() | |||
70 | { | 70 | { |
71 | delete m_rootcontext; | ||
71 | delete root; | 72 | delete root; |
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp index 440d8be..28f6318 100644 --- a/noncore/apps/opie-reader/Bkmks.cpp +++ b/noncore/apps/opie-reader/Bkmks.cpp | |||
@@ -12,3 +12,8 @@ const unsigned long BkmkFile::magic = ((unsigned long)'q' << 24) | ((unsigned lo | |||
12 | 12 | ||
13 | Bkmk::Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p) | 13 | Bkmk::Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p) : |
14 | m_name(0), | ||
15 | m_namelen(0), | ||
16 | m_anno(0), | ||
17 | m_annolen(0), | ||
18 | m_position(0) | ||
14 | { | 19 | { |
@@ -22,2 +27,13 @@ Bkmk::Bkmk(const tchar* _nm, const unsigned char* _anno, unsigned short annolen, | |||
22 | 27 | ||
28 | Bkmk::Bkmk(const Bkmk& rhs) : | ||
29 | m_name(0), | ||
30 | m_namelen(0), | ||
31 | m_anno(0), | ||
32 | m_annolen(0), | ||
33 | m_position(0) | ||
34 | { | ||
35 | init(rhs.name(), sizeof(tchar)*(ustrlen(rhs.name())+1), rhs.anno(), | ||
36 | sizeof(tchar)*(ustrlen(rhs.anno())+1), rhs.value()); | ||
37 | } | ||
38 | |||
23 | Bkmk::Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p) : m_position(_p) | 39 | Bkmk::Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p) : m_position(_p) |
diff --git a/noncore/apps/opie-reader/Bkmks.h b/noncore/apps/opie-reader/Bkmks.h index c2275e2..985e158 100644 --- a/noncore/apps/opie-reader/Bkmks.h +++ b/noncore/apps/opie-reader/Bkmks.h | |||
@@ -22,3 +22,3 @@ class Bkmk | |||
22 | public: | 22 | public: |
23 | Bkmk() : m_name(NULL), m_namelen(0), m_anno(NULL), m_annolen(0), m_position(0) {}; | 23 | Bkmk() : m_name(0), m_namelen(0), m_anno(0), m_annolen(0), m_position(0) {}; |
24 | Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p); | 24 | Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p); |
@@ -27,6 +27,3 @@ class Bkmk | |||
27 | Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p, unsigned int _p2); | 27 | Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p, unsigned int _p2); |
28 | Bkmk(const Bkmk& rhs) : m_name(NULL), m_anno(NULL) | 28 | Bkmk(const Bkmk& rhs); |
29 | { | ||
30 | *this = rhs; | ||
31 | } | ||
32 | ~Bkmk(); | 29 | ~Bkmk(); |
diff --git a/noncore/apps/opie-reader/StyleConsts.cpp b/noncore/apps/opie-reader/StyleConsts.cpp index 77c9d3b..c19fa3d 100644 --- a/noncore/apps/opie-reader/StyleConsts.cpp +++ b/noncore/apps/opie-reader/StyleConsts.cpp | |||
@@ -6,2 +6,9 @@ GraphicLink::~GraphicLink() { delete graphic; } | |||
6 | 6 | ||
7 | pmstore::pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : | ||
8 | count(1), | ||
9 | m_isScaleable(_canScale) | ||
10 | { | ||
11 | graphic = new GraphicLink(p, isLnk, tgt); | ||
12 | } | ||
13 | |||
7 | pmstore::~pmstore() | 14 | pmstore::~pmstore() |
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h index 4b7ff4b..5fd9669 100644 --- a/noncore/apps/opie-reader/StyleConsts.h +++ b/noncore/apps/opie-reader/StyleConsts.h | |||
@@ -23,4 +23,5 @@ struct GraphicLink | |||
23 | 23 | ||
24 | struct pmstore | 24 | class pmstore |
25 | { | 25 | { |
26 | public: | ||
26 | unsigned int count; | 27 | unsigned int count; |
@@ -28,6 +29,3 @@ struct pmstore | |||
28 | GraphicLink* graphic; | 29 | GraphicLink* graphic; |
29 | pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : count(1), m_isScaleable(_canScale) | 30 | pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt); |
30 | { | ||
31 | graphic = new GraphicLink(p, isLnk, tgt); | ||
32 | } | ||
33 | ~pmstore(); | 31 | ~pmstore(); |
diff --git a/noncore/apps/opie-write/qrichtext.cpp b/noncore/apps/opie-write/qrichtext.cpp index c27eb1e..f040f1e 100644 --- a/noncore/apps/opie-write/qrichtext.cpp +++ b/noncore/apps/opie-write/qrichtext.cpp | |||
@@ -6062,3 +6062,3 @@ QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, co | |||
6062 | QMimeSourceFactory &factory ) | 6062 | QMimeSourceFactory &factory ) |
6063 | : QTextCustomItem( p ) | 6063 | : QTextCustomItem( p ), reg( 0 ) |
6064 | { | 6064 | { |
@@ -6070,3 +6070,2 @@ QTextImage::QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, co | |||
6070 | 6070 | ||
6071 | reg = 0; | ||
6072 | QString imageName = attr["src"]; | 6071 | QString imageName = attr["src"]; |
@@ -6151,2 +6150,3 @@ QTextImage::~QTextImage() | |||
6151 | { | 6150 | { |
6151 | delete reg; | ||
6152 | if ( pixmap_map && pixmap_map->contains( imgId ) ) { | 6152 | if ( pixmap_map && pixmap_map->contains( imgId ) ) { |
@@ -6162,3 +6162,2 @@ QTextImage::~QTextImage() | |||
6162 | } | 6162 | } |
6163 | delete reg; | ||
6164 | } | 6163 | } |
diff --git a/noncore/apps/tinykate/libkate/document/katehighlight.cpp b/noncore/apps/tinykate/libkate/document/katehighlight.cpp index 539d356..89024f7 100644 --- a/noncore/apps/tinykate/libkate/document/katehighlight.cpp +++ b/noncore/apps/tinykate/libkate/document/katehighlight.cpp | |||
@@ -391,3 +391,3 @@ const QChar *HlAnyChar::checkHgl(const QChar *s, int len, bool) | |||
391 | HlRegExpr::HlRegExpr(int attribute, int context,QString regexp) | 391 | HlRegExpr::HlRegExpr(int attribute, int context,QString regexp) |
392 | : HlItem(attribute, context) { | 392 | : HlItem(attribute, context), Expr(0) { |
393 | 393 | ||
@@ -398,2 +398,7 @@ HlRegExpr::HlRegExpr(int attribute, int context,QString regexp) | |||
398 | 398 | ||
399 | HlRegExpr::~HlRegExpr() | ||
400 | { | ||
401 | delete Expr; | ||
402 | } | ||
403 | |||
399 | const QChar *HlRegExpr::checkHgl(const QChar *s, int len, bool lineStart) | 404 | const QChar *HlRegExpr::checkHgl(const QChar *s, int len, bool lineStart) |
diff --git a/noncore/apps/tinykate/libkate/document/katehighlight.h b/noncore/apps/tinykate/libkate/document/katehighlight.h index fddf585..f0be27b 100644 --- a/noncore/apps/tinykate/libkate/document/katehighlight.h +++ b/noncore/apps/tinykate/libkate/document/katehighlight.h | |||
@@ -186,3 +186,3 @@ class HlRegExpr : public HlItem { | |||
186 | HlRegExpr(int attribute, int context,QString expr); | 186 | HlRegExpr(int attribute, int context,QString expr); |
187 | ~HlRegExpr(){delete Expr;}; | 187 | ~HlRegExpr(); |
188 | virtual const QChar *checkHgl(const QChar *, int len, bool); | 188 | virtual const QChar *checkHgl(const QChar *, int len, bool); |