Commit 673feabe authored by Michael Reeves's avatar Michael Reeves

apply two cppcheck suggestions

*fixed null pointer de-referance in fallback non-kde code.
*removed unneeded compare
parent 7ad6a2b8
......@@ -411,7 +411,7 @@ static QTextCodec* getEncodingFromTag( const QByteArray& s, const QByteArray& en
int apostrophPos = s.indexOf( '"', encodingPos + encodingTag.length() );
int apostroph2Pos = s.indexOf( '\'', encodingPos + encodingTag.length() );
char apostroph = '"';
if ( apostroph2Pos>=0 && ( apostrophPos<0 || (apostrophPos>=0 && apostroph2Pos < apostrophPos) ) )
if ( apostroph2Pos>=0 && ( apostrophPos<0 || apostroph2Pos < apostrophPos) )
{
apostroph = '\'';
apostrophPos = apostroph2Pos;
......
......@@ -592,7 +592,7 @@ namespace KParts
ReadOnlyPart(QObject*,const QString&){}
QString localFilePath() {return QString(); }
void setComponentData(const KComponentData&){} // actually member of PartBase
KComponentData& componentData() { return *(KComponentData*)0;}
KComponentData& componentData() { return NULL;}
QString m_file;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment