summaryrefslogtreecommitdiff
path: root/noncore/todayplugins/stockticker
authorerik <erik>2007-01-22 22:56:12 (UTC)
committer erik <erik>2007-01-22 22:56:12 (UTC)
commit9b4871054d01a47b4c546952a0948553413840d6 (patch) (unidiff)
tree4e0248489c2790cf4225a116cfb903b637d4cdf0 /noncore/todayplugins/stockticker
parentf60301bab1f8aa3693089036a3791a01ae6f9db8 (diff)
downloadopie-9b4871054d01a47b4c546952a0948553413840d6.zip
opie-9b4871054d01a47b4c546952a0948553413840d6.tar.gz
opie-9b4871054d01a47b4c546952a0948553413840d6.tar.bz2
Every file in this commit makes a call to a function which returns a value.
Each file also didn't check the return value. This commit changes it so that every single non-checked call in these files is checked.
Diffstat (limited to 'noncore/todayplugins/stockticker') (more/less context) (show whitespace changes)
-rw-r--r--noncore/todayplugins/stockticker/stockticker/helpwindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp b/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp
index 410d642..2498bf9 100644
--- a/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp
+++ b/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp
@@ -182,10 +182,11 @@ HelpWindow::~HelpWindow()
182 history.append( *it ); 182 history.append( *it );
183 183
184 QFile f( QDir::currentDirPath() + "/.history" ); 184 QFile f( QDir::currentDirPath() + "/.history" );
185 f.open( IO_WriteOnly ); 185 if ( f.open( IO_WriteOnly ) ) {
186 QDataStream s( &f ); 186 QDataStream s( &f );
187 s << history; 187 s << history;
188 f.close(); 188 f.close();
189 }
189 190
190 bookmarks.clear(); 191 bookmarks.clear();
191 QMap<int, QString>::Iterator it2 = mBookmarks.begin(); 192 QMap<int, QString>::Iterator it2 = mBookmarks.begin();
@@ -193,7 +194,8 @@ HelpWindow::~HelpWindow()
193 bookmarks.append( *it2 ); 194 bookmarks.append( *it2 );
194 195
195 QFile f2( QDir::currentDirPath() + "/.bookmarks" ); 196 QFile f2( QDir::currentDirPath() + "/.bookmarks" );
196 f2.open( IO_WriteOnly ); 197 if ( !f2.open( IO_WriteOnly ) )
198 return;
197 QDataStream s2( &f2 ); 199 QDataStream s2( &f2 );
198 s2 << bookmarks; 200 s2 << bookmarks;
199 f2.close(); 201 f2.close();
@@ -232,7 +234,8 @@ void HelpWindow::readHistory()
232{ 234{
233 if ( QFile::exists( QDir::currentDirPath() + "/.history" ) ) { 235 if ( QFile::exists( QDir::currentDirPath() + "/.history" ) ) {
234 QFile f( QDir::currentDirPath() + "/.history" ); 236 QFile f( QDir::currentDirPath() + "/.history" );
235 f.open( IO_ReadOnly ); 237 if ( !f.open( IO_ReadOnly ) )
238 return;
236 QDataStream s( &f ); 239 QDataStream s( &f );
237 s >> history; 240 s >> history;
238 f.close(); 241 f.close();
@@ -245,7 +248,8 @@ void HelpWindow::readBookmarks()
245{ 248{
246 if ( QFile::exists( QDir::currentDirPath() + "/.bookmarks" ) ) { 249 if ( QFile::exists( QDir::currentDirPath() + "/.bookmarks" ) ) {
247 QFile f( QDir::currentDirPath() + "/.bookmarks" ); 250 QFile f( QDir::currentDirPath() + "/.bookmarks" );
248 f.open( IO_ReadOnly ); 251 if ( !f.open( IO_ReadOnly ) )
252 return;
249 QDataStream s( &f ); 253 QDataStream s( &f );
250 s >> bookmarks; 254 s >> bookmarks;
251 f.close(); 255 f.close();