-rw-r--r-- | libopie2/opieui/big-screen/osplitter.cpp | 2 | ||||
-rw-r--r-- | library/qpeapplication.cpp | 6 | ||||
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/checkbook/mainwindow.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/procctl.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/tinykate/libkate/document/katedocument.cpp | 63 | ||||
-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.cpp | 2 | ||||
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/http.c | 2 |
8 files changed, 48 insertions, 39 deletions
diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp index 78e919a..5d1e2cf 100644 --- a/libopie2/opieui/big-screen/osplitter.cpp +++ b/libopie2/opieui/big-screen/osplitter.cpp @@ -229,3 +229,3 @@ void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& lab addToBox( cont ); - else + else if (m_tabWidget) addToTab( cont ); diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 34f5e6a..d959c7a 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -1771,9 +1771,9 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) { - if ( mw && argc() == 2 ) + if ( mw ) { + if ( argc() == 2 ) Global::setDocument( mw, QString::fromUtf8(argv()[1]) ); - -// setMainWidget(mw); see above d->show(mw, nomaximize ); } +} diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index 187adc6..c639002 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp @@ -238,2 +238,8 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) } + + if ( !theCard ) { + owarn << "pcmcia: Finished working through cards in PCMCIA system but I do not have a valid card handle" << oendl; + return; + } + if ( newCard ) diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp index d9e2047..8e2e2e3 100644 --- a/noncore/apps/checkbook/mainwindow.cpp +++ b/noncore/apps/checkbook/mainwindow.cpp @@ -245,2 +245,3 @@ void MainWindow::openBook(QListViewItem *curritem) { + if ( !curritem ) return; // find book in List @@ -279,6 +280,4 @@ void MainWindow::openBook(QListViewItem *curritem) // Update name if changed - if( curritem ) { curritem->setText( posName, newname ); cbList->sort(); - } _cfg.setLastBook( newname ); diff --git a/noncore/apps/opie-console/procctl.cpp b/noncore/apps/opie-console/procctl.cpp index a44529b..5239e26 100644 --- a/noncore/apps/opie-console/procctl.cpp +++ b/noncore/apps/opie-console/procctl.cpp @@ -51,3 +51,6 @@ void ProcCtl::remove( pid_t pi ) { if ( pi == con->pid ) { + if (forw) forw->prev = con->prev; + else + forw = con->prev; delete con; diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp index b82a86a..692fd46 100644 --- a/noncore/apps/tinykate/libkate/document/katedocument.cpp +++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp @@ -2017,3 +2017,3 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i QChar ch; - Attribute *a = 0L; + Attribute *attrptr = 0L; int attr, nextAttr; @@ -2042,9 +2042,9 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i } else { - a = &m_attribs[textLine->getAttr(z)]; + attrptr = &m_attribs[textLine->getAttr(z)]; - if (a->bold && a->italic) + if (attrptr->bold && attrptr->italic) x += myFontMetricsBI.width(ch); - else if (a->bold) + else if (attrptr->bold) x += myFontMetricsBold.width(ch); - else if (a->italic) + else if (attrptr->italic) x += myFontMetricsItalic.width(ch); @@ -2081,9 +2081,9 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i { - a = &m_attribs[textLine->getAttr(z)]; + attrptr = &m_attribs[textLine->getAttr(z)]; - if (a->bold && a->italic) + if (attrptr->bold && attrptr->italic) x += myFontMetricsBI.width(ch); - else if (a->bold) + else if (attrptr->bold) x += myFontMetricsBold.width(ch); - else if (a->italic) + else if (attrptr->italic) x += myFontMetricsItalic.width(ch); @@ -2116,7 +2116,7 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i - if (a->bold && a->italic) + if (attrptr && attrptr->bold && attrptr->italic) x += myFontMetricsBI.width(s); - else if (a->bold) + else if (attrptr && attrptr->bold) x += myFontMetricsBold.width(s); - else if (a->italic) + else if (attrptr && attrptr->italic) x += myFontMetricsItalic.width(s); @@ -2131,12 +2131,12 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i attr = nextAttr; - a = &m_attribs[attr & taAttrMask]; + attrptr = &m_attribs[attr & taAttrMask]; - if (attr & taSelected) paint.setPen(a->selCol); - else paint.setPen(a->col); + if (attr & taSelected) paint.setPen(attrptr->selCol); + else paint.setPen(attrptr->col); - if (a->bold && a->italic) + if (attrptr->bold && attrptr->italic) paint.setFont(myFontBI); - else if (a->bold) + else if (attrptr->bold) paint.setFont(myFontBold); - else if (a->italic) + else if (attrptr->italic) paint.setFont(myFontItalic); @@ -2146,4 +2146,2 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i -// paint.drawLine(x - xStart, y -2, x - xStart, y); -// paint.drawLine(x - xStart, y, x - xStart + 2, y); paint.drawPoint(x - xStart, y); @@ -2161,7 +2159,7 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i - if (a->bold && a->italic) + if (attrptr->bold && attrptr->italic) x += myFontMetricsBI.width(s); - else if (a->bold) + else if (attrptr->bold) x += myFontMetricsBold.width(s); - else if (a->italic) + else if (attrptr->italic) x += myFontMetricsItalic.width(s); @@ -2172,12 +2170,12 @@ void KateDocument::paintTextLine(QPainter &paint, int line, int y, int xStart, i attr = nextAttr; - a = &m_attribs[attr & taAttrMask]; + attrptr = &m_attribs[attr & taAttrMask]; - if (attr & taSelected) paint.setPen(a->selCol); - else paint.setPen(a->col); + if (attr & taSelected) paint.setPen(attrptr->selCol); + else paint.setPen(attrptr->col); - if (a->bold && a->italic) + if (attrptr->bold && attrptr->italic) paint.setFont(myFontBI); - else if (a->bold) + else if (attrptr->bold) paint.setFont(myFontBold); - else if (a->italic) + else if (attrptr->italic) paint.setFont(myFontItalic); @@ -2229,3 +2227,5 @@ bool KateDocument::doSearch(SConfig &sc, const QString &searchFor) { t = new QChar[bufLen]; - } + } else if (!t) + t = new QChar[bufLen]; + memcpy(t, textLine->getText(), tlen*sizeof(QChar)); @@ -2290,3 +2290,4 @@ bool KateDocument::doSearch(SConfig &sc, const QString &searchFor) { t = new QChar[bufLen]; - } + } else if (!t) + t = new QChar[bufLen]; memcpy(t, textLine->getText(), tlen*sizeof(QChar)); diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp index 164d608..428cfd4 100644 --- a/noncore/settings/sysinfo/devicesinfo.cpp +++ b/noncore/settings/sysinfo/devicesinfo.cpp @@ -267,3 +267,3 @@ void UsbCategory::populate() } - else if ( line.startsWith( "S: Product" ) ) + else if ( dev && line.startsWith( "S: Product" ) ) { diff --git a/noncore/todayplugins/stockticker/libstocks/http.c b/noncore/todayplugins/stockticker/libstocks/http.c index 2f38f8a..cc78ab7 100644 --- a/noncore/todayplugins/stockticker/libstocks/http.c +++ b/noncore/todayplugins/stockticker/libstocks/http.c @@ -212,3 +212,3 @@ libstocks_return_code http_get(char *http_file, char *http_server, char **pdata) { - if (*temp==0) return ERRRHEA; + if (!temp || *temp==0) return ERRRHEA; |