Bug 82184 - poor quality source code
poor quality source code
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: koffice (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-19 05:04 EST by d.binderman
Modified: 2007-04-18 12:50 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-08 10:34:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-01-19 05:04:32 EST
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 10:34:13 EDT
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.