package: scribus
version: 1.4.2.dfsg+r18267-1
severity: serious
Looks like you got yet another qreal vs double issue.
[ 67%] Building CXX object scribus/CMakeFiles/scribus.dir/scribus.cpp.o
/build/buildd-scribus_1.4.2.dfsg+r18267-1-armel-jtGbQP/scribus-1.4.2.dfsg+r18267/scribus/scribus.cpp:
In member function 'void ScribusMainWindow::rebuildLayersList()':
/build/buildd-scribus_1.4.2.dfsg+r18267-1-armel-jtGbQP/scribus-1.4.2.dfsg+r18267/scribus/scribus.cpp:3677:8:
warning: variable 'found' set but not used [-Wunused-but-set-variable]
/build/buildd-scribus_1.4.2.dfsg+r18267-1-armel-jtGbQP/scribus-1.4.2.dfsg+r18267/scribus/scribus.cpp:
In member function 'void ScribusMainWindow::duplicateToMasterPage()':
/build/buildd-scribus_1.4.2.dfsg+r18267-1-armel-jtGbQP/scribus-1.4.2.dfsg+r18267/scribus/scribus.cpp:5892:8:
warning: unused variable 'ok' [-Wunused-variable]
/build/buildd-scribus_1.4.2.dfsg+r18267-1-armel-jtGbQP/scribus-1.4.2.dfsg+r18267/scribus/scribus.cpp:
In member function 'void ScribusMainWindow::setAppMode(int)':
/build/buildd-scribus_1.4.2.dfsg+r18267-1-armel-jtGbQP/scribus-1.4.2.dfsg+r18267/scribus/scribus.cpp:6691:36:
error: cannot convert 'qreal* {aka float*}' to 'double*' in assignment
make[3]: *** [scribus/CMakeFiles/scribus.dir/scribus.cpp.o] Error 1
As i've said before assingments between qreal and double are ok but
assignments between pointers to double and pointers to qreal are not ok.
Unfortunately this was not a simple case like the ones i've seen before,
the assignment was between two member variables and there seemed to be
quite a chain of code in both directions. I've fixed it so it builds but
I don't really know if the fix is correct so you should probablly get
someone who understands the code to look it over before applying.
Description: Fix yet another qreal vs double issue.
On most architectures qreal is defined as double but on arm architecture
it's defined as float. Assignments between qreal and double are ok but
assignments between pointers to qreal and pointers to double are not ok.
.
This patch changes the types of some declarations to avoid attempting to
make assignments between pointers to qreal and pointers to double.
.
Author: Peter Michael Green <plugw...@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
--- scribus-1.4.2.dfsg+r18267.orig/scribus/ui/modetoolbar.cpp
+++ scribus-1.4.2.dfsg+r18267/scribus/ui/modetoolbar.cpp
@@ -40,7 +40,7 @@ ModeToolBar::ModeToolBar(ScribusMainWind
{
SubMode = 0;
ValCount = 32;
- static qreal AutoShapes0[] = {0.0, 0.0, 0.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0,
+ static double AutoShapes0[] = {0.0, 0.0, 0.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0,
100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 0.0, 100.0, 0.0, 100.0,
0.0, 100.0, 0.0, 100.0, 0.0, 0.0, 0.0, 0.0};
ShapeVals = AutoShapes0;
@@ -84,7 +84,7 @@ ModeToolBar::ModeToolBar(ScribusMainWind
this->addAction(m_ScMW->scrActions["toolsEyeDropper"]);
languageChange();
- connect(Rechteck, SIGNAL(FormSel(int, int, qreal *)), this, SLOT(SelShape(int, int, qreal *)));
+ connect(Rechteck, SIGNAL(FormSel(int, int, double *)), this, SLOT(SelShape(int, int, double *)));
}
void ModeToolBar::GetPolyProps()
@@ -98,7 +98,7 @@ void ModeToolBar::GetPolyProps()
delete dia;
}
-void ModeToolBar::SelShape(int s, int c, qreal *vals)
+void ModeToolBar::SelShape(int s, int c, double *vals)
{
m_ScMW->scrActions["toolsInsertShape"]->setIcon(QIcon(Rechteck->getIconPixmap(s,16)));
// insertShapeButtonMenu->hide();
--- scribus-1.4.2.dfsg+r18267.orig/scribus/ui/modetoolbar.h
+++ scribus-1.4.2.dfsg+r18267/scribus/ui/modetoolbar.h
@@ -51,13 +51,13 @@ public:
int SubMode;
int ValCount;
- qreal *ShapeVals;
+ double *ShapeVals;
virtual void changeEvent(QEvent *e);
public slots:
void GetPolyProps();
- void SelShape(int s, int c, qreal *vals);
+ void SelShape(int s, int c, double *vals);
void languageChange();
protected: