View Issue Details

IDProjectCategoryView StatusLast Update
0002394ScribusInternalpublic2005-08-11 21:45
Reporterjghali Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOSWindowsOS Version2000 SP4
Product Version1.3.1cvs 
Fixed in Version1.3.1cvs 
Summary0002394: Fix msvc compatibility problem in scribusdoc.cpp
DescriptionThe attached patch Fix two problems :
- functions not returning values
- msvc compiler needs full type definition before destructor call( see 2197 )
TagsNo tags attached.
Patch

Relationships

related to 0002197 closedringerc Msvc compiler needs full type definition before destructor call 
child of 0000015 closedjghali Windows Port 

Activities

2005-08-05 13:36

 

scribusdoc_msvc_compat.diff (773 bytes)   
Index: scribusdoc.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/scribusdoc.cpp,v
retrieving revision 1.25.2.72
diff -u -r1.25.2.72 scribusdoc.cpp
--- scribusdoc.cpp	5 Aug 2005 00:15:08 -0000	1.25.2.72
+++ scribusdoc.cpp	5 Aug 2005 13:00:43 -0000
@@ -20,6 +20,7 @@
 #include "scribus.h"
 
 #include <qfile.h>
+#include <qcheckbox.h>
 
 #include "page.h"
 #include "pageitem.h"
@@ -1106,6 +1107,7 @@
 		undoManager->action(this, ss, DocName, Um::ILayer);
 		undoManager->commit();
 	}
+	return true;
 }
 
 //TODO: Move raise and lower here
@@ -1370,6 +1372,7 @@
 			Layers[i].Name = newName;
 		}
 	}
+	return true;
 }
 
 const bool ScribusDoc::layerContainsItems(const int layerNumber)
scribusdoc_msvc_compat.diff (773 bytes)   

cbradney

2005-08-05 19:43

administrator   ~0005905

What line means we need qcheckbox.h in scribusdoc.cpp?

cbradney

2005-08-05 20:07

administrator   ~0005907

All should be ok apart from that qcheckbox include now in CVS.. Theres no reference to qcheckbox in the code AFAICT so I dont see where it would be needed. Damn POS MSVC is.

jghali

2005-08-05 20:09

administrator   ~0005908

The issue happens on template code generation. So the precise line in located in qptrlist.h in function :

template<class type>
inline void QPtrList<type>::deleteItem( QPtrCollection::Item d )
{
    if ( del_item ) delete (type *)d;
}

In Scribus I've found 4 object using QPtrList<QCheckBox> :
extimageprops.h(40): QPtrList<QCheckBox> FlagsSicht;
layers.h(79): QPtrList<QCheckBox> flagsPrintable;
layers.h(80): QPtrList<QCheckBox> flagsVisible;
picstatus.h(32): QPtrList<QCheckBox> FlagsPic;

layers.h is included line 30 in scribusdoc.cpp and line 223 you see a nice Layers.clear()

jghali

2005-08-05 20:34

administrator   ~0005909

Hmmm, mistake on my side, the template code generation is in fact required by mscv 'cause of line 712:
ScApp->layerPalette->rebuildList();
The LayerPalette class use some QPtrList<QCheckBox>

cbradney

2005-08-05 20:44

administrator   ~0005910

Yes, I saw a missing include in layers.h for qcheckbox. The requirement for layers.h in scribusdoc.cpp will probably disappear soon anyway. Please grab CVS and check.

Issue History

Date Modified Username Field Change
2005-08-05 13:36 jghali New Issue
2005-08-05 13:36 jghali File Added: scribusdoc_msvc_compat.diff
2005-08-05 17:36 ringerc Relationship added related to 0002197
2005-08-05 17:36 ringerc Relationship added child of 0000015
2005-08-05 19:37 cbradney Status new => assigned
2005-08-05 19:37 cbradney Assigned To => cbradney
2005-08-05 19:43 cbradney Note Added: 0005905
2005-08-05 20:07 cbradney Note Added: 0005907
2005-08-05 20:09 jghali Note Added: 0005908
2005-08-05 20:34 jghali Note Added: 0005909
2005-08-05 20:44 cbradney Note Added: 0005910
2005-08-05 20:49 cbradney Status assigned => resolved
2005-08-05 20:49 cbradney Fixed in Version => 1.3.1cvs
2005-08-05 20:49 cbradney Resolution open => fixed
2005-08-11 21:45 jghali Status resolved => closed