summaryrefslogtreecommitdiff
authorerik <erik>2007-01-31 22:23:27 (UTC)
committer erik <erik>2007-01-31 22:23:27 (UTC)
commit73edac572d9ac9cfd18cc1254fc2019563d55f16 (patch) (unidiff)
treea420b341ce2bcb4a049c76935544b8bce2a0a853
parented5fba8cdb27174427b2e7780508bafa05536ca1 (diff)
downloadopie-73edac572d9ac9cfd18cc1254fc2019563d55f16.zip
opie-73edac572d9ac9cfd18cc1254fc2019563d55f16.tar.gz
opie-73edac572d9ac9cfd18cc1254fc2019563d55f16.tar.bz2
A few files that dereference pointers w/out checking that the pointer is
valid.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistselection.cpp35
-rw-r--r--noncore/settings/networksettings2/editconnection.cpp5
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.cpp2
3 files changed, 14 insertions, 28 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistselection.cpp b/noncore/multimedia/opieplayer2/playlistselection.cpp
index 678ebdf..780d705 100644
--- a/noncore/multimedia/opieplayer2/playlistselection.cpp
+++ b/noncore/multimedia/opieplayer2/playlistselection.cpp
@@ -52,10 +52,2 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
52// odebug << "starting playlistselector" << oendl; 52// odebug << "starting playlistselector" << oendl;
53// #ifdef USE_PLAYLIST_BACKGROUND
54// setStaticBackground( TRUE );
55// setBackgroundPixmap( Resource::loadPixmap( "opieplayer/background" ) );
56
57// setBackgroundPixmap( Resource::loadPixmap( "launcher/opielogo" ) );
58// #endif
59// addColumn("Title",236);
60// setAllColumnsShowFocus( TRUE );
61 addColumn( tr( "Playlist Selection" ) ); 53 addColumn( tr( "Playlist Selection" ) );
@@ -70,3 +62,2 @@ PlayListSelection::~PlayListSelection() {
70 62
71// #ifdef USE_PLAYLIST_BACKGROUND
72void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { 63void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
@@ -74,7 +65,3 @@ void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
74 p->fillRect( r, QBrush( white ) ); 65 p->fillRect( r, QBrush( white ) );
75// QImage logo = Resource::loadImage( "launcher/opielogo" );
76// if ( !logo.isNull() )
77// p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo );
78} 66}
79// #endif
80 67
@@ -96,3 +83,3 @@ const DocLnk *PlayListSelection::current() {
96 if ( item ) 83 if ( item )
97 return item->file(); 84 return item->file();
98 return NULL; 85 return NULL;
@@ -122,3 +109,3 @@ void PlayListSelection::moveSelectedUp() {
122 if ( item && item->itemAbove() ) 109 if ( item && item->itemAbove() )
123 item->itemAbove()->moveItem( item ); 110 item->itemAbove()->moveItem( item );
124 ensureItemVisible( selectedItem() ); 111 ensureItemVisible( selectedItem() );
@@ -140,3 +127,3 @@ bool PlayListSelection::prev() {
140 else 127 else
141 return FALSE; 128 return FALSE;
142 ensureItemVisible( selectedItem() ); 129 ensureItemVisible( selectedItem() );
@@ -150,3 +137,3 @@ bool PlayListSelection::next() {
150 else 137 else
151 return FALSE; 138 return FALSE;
152 ensureItemVisible( selectedItem() ); 139 ensureItemVisible( selectedItem() );
@@ -161,3 +148,3 @@ bool PlayListSelection::first() {
161 else 148 else
162 return FALSE; 149 return FALSE;
163 ensureItemVisible( selectedItem() ); 150 ensureItemVisible( selectedItem() );
@@ -171,3 +158,3 @@ bool PlayListSelection::last() {
171 while ( ( item = item->nextSibling() ) ) 158 while ( ( item = item->nextSibling() ) )
172 prevItem = item; 159 prevItem = item;
173 if ( prevItem ) 160 if ( prevItem )
@@ -175,3 +162,3 @@ bool PlayListSelection::last() {
175 else 162 else
176 return FALSE; 163 return FALSE;
177 ensureItemVisible( selectedItem() ); 164 ensureItemVisible( selectedItem() );
@@ -182,3 +169,2 @@ void PlayListSelection::unSelect()
182{ 169{
183 //QListViewItem *item = selectedItem();
184 setSelected( currentItem(), FALSE); 170 setSelected( currentItem(), FALSE);
@@ -189,5 +175,6 @@ void PlayListSelection::writeCurrent( Config& cfg ) {
189 QListViewItem *item = selectedItem(); 175 QListViewItem *item = selectedItem();
190 if ( item ) 176 if ( item ) {
191 cfg.writeEntry("current", item->text(0) ); 177 cfg.writeEntry("current", item->text(0) );
192 odebug << item->text(0) << oendl; 178 odebug << item->text(0) << oendl;
179 }
193 180
@@ -208,4 +195,2 @@ void PlayListSelection::setSelectedItem(const QString &strk ) {
208 } 195 }
209// setSelected( item, TRUE );
210// ensureItemVisible( selectedItem() );
211} 196}
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp
index a9bef65..d948fb9 100644
--- a/noncore/settings/networksettings2/editconnection.cpp
+++ b/noncore/settings/networksettings2/editconnection.cpp
@@ -247,3 +247,4 @@ void EditNetworkSetup::setNetworkSetup( NetworkSetup * NC ) {
247 // this means that this level is NOT present in collection 247 // this means that this level is NOT present in collection
248 // probably INCOMPATIBEL collection OR Missing plugin 248 // probably INCOMPATIBLE collection OR Missing plugin
249 QString pluginName = NNI ? NNI->nodeClass()->name() : "";
249 QMessageBox::warning( 250 QMessageBox::warning(
@@ -252,3 +253,3 @@ void EditNetworkSetup::setNetworkSetup( NetworkSetup * NC ) {
252 tr( "<p>Old NetworkSetup or missing plugin \"<i>%1</i>\"</p>" ). 253 tr( "<p>Old NetworkSetup or missing plugin \"<i>%1</i>\"</p>" ).
253 arg(NNI->nodeClass()->name()) ); 254 arg(pluginName) );
254 return; 255 return;
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
index fc30bf8..e23fc9c 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
@@ -446,3 +446,3 @@ int OTScan::getDevice( OTPeer *& Peer,
446 446
447 if( ! OT->isEnabled() ) { 447 if( ! OT || ! OT->isEnabled() ) {
448 QMessageBox::warning( 0, 448 QMessageBox::warning( 0,