Bug 82184 - poor quality source code
Summary: poor quality source code
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: koffice
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-19 10:04 UTC by d.binderman
Modified: 2007-04-18 16:50 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2003-07-08 14:34:13 UTC


Attachments (Terms of Use)

Description d.binderman 2003-01-19 10:04:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I just tried to compile package koffice-1.2-0.rc1.4 from Redhat 8.0

The compiler said

vcanvas.cc:160: warning: taking address of temporary
karbon_part.cc:231: warning: taking address of temporary
karbon_view.cc:269: warning: taking address of temporary

Here is an untested patch to shut up the compiler

*** ./karbon/core/vcanvas.cc.old	2003-01-12 10:15:47.000000000 +0000
--- ./karbon/core/vcanvas.cc	2003-01-12 10:18:10.000000000 +0000
***************
*** 157,163 ****
  		p->setWorldMatrix( mat ); */
  		setYMirroring( false );
  
! 		m_part->document().draw( p, &KoRect::fromQRect( rect ) );
  
  		p->end();
  	}
--- 157,165 ----
  		p->setWorldMatrix( mat ); */
  		setYMirroring( false );
  
! 		KoRect tmp = KoRect::fromQRect( rect );
! 
! 		m_part->document().draw( p, &tmp);
  
  		p->end();
  	}
*** ./karbon/karbon_part.cc.old	2003-01-12 10:18:44.000000000 +0000
--- ./karbon/karbon_part.cc	2003-01-12 10:19:42.000000000 +0000
***************
*** 227,234 ****
  	m_doc.selection()->clear();
  	QPtrListIterator<VLayer> itr( m_doc.layers() );
  	for( ; itr.current(); ++itr )
! 		//if( itr.current()->visible() )
! 			itr.current()->draw( p, &KoRect::fromQRect( rect ) );
  
  	p->end();
  	delete painterFactory;
--- 227,237 ----
  	m_doc.selection()->clear();
  	QPtrListIterator<VLayer> itr( m_doc.layers() );
  	for( ; itr.current(); ++itr )
! 	{
! 		KoRect tmp = KoRect::fromQRect( rect );
! 
! 		itr.current()->draw( p, & tmp);
! 	}
  
  	p->end();
  	delete painterFactory;
*** ./karbon/karbon_view.cc.old	2003-01-12 10:20:14.000000000 +0000
--- ./karbon/karbon_view.cc	2003-01-12 10:21:38.000000000 +0000
***************
*** 265,272 ****
  	// TODO : use real page layout stuff
  	QPtrListIterator<VLayer> i = m_part->document().layers();
  	for ( ; i.current(); ++i )
! 		//if ( i.current()->visible() )
! 			i.current()->draw( &p, &KoRect::fromQRect( QRect( 0, 0, width(), height() ) ) );
  
  	p.end();
  }
--- 265,274 ----
  	// TODO : use real page layout stuff
  	QPtrListIterator<VLayer> i = m_part->document().layers();
  	for ( ; i.current(); ++i )
! 	{
! 		KoRect tmp = KoRect::fromQRect( QRect( 0, 0, width(), height() ) );
! 		i.current()->draw( &p, & tmp);
! 	}
  
  	p.end();
  }

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. compile the program
2.
3.
    

Additional info

Comment 1 Ngo Than 2003-07-08 14:34:13 UTC
it's fixed in koffice-1.2.1. which is included in RHL 9


Note You need to log in before you can comment on or make changes to this bug.