[qet] [3382] Fix warning at compilation

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3382
Author:   blacksun
Date:     2014-10-19 13:25:03 +0200 (Sun, 19 Oct 2014)
Log Message:
-----------
Fix warning at compilation

Modified Paths:
--------------
    trunk/sources/bordertitleblock.cpp
    trunk/sources/conductorproperties.cpp
    trunk/sources/createdxf.cpp
    trunk/sources/editor/elementscene.cpp
    trunk/sources/editor/partline.cpp
    trunk/sources/exportdialog.cpp
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetgraphicsitem/diagramimageitem.cpp
    trunk/sources/qetgraphicsitem/element.cpp
    trunk/sources/qetproject.h
    trunk/sources/ui/diagramselection.cpp
    trunk/sources/ui/dialogautonum.cpp

Modified: trunk/sources/bordertitleblock.cpp
===================================================================
--- trunk/sources/bordertitleblock.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/bordertitleblock.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -411,6 +411,7 @@
 }
 
 void BorderTitleBlock::drawDxf(int width, int height, bool keep_aspect_ratio, QString &file_path, int color) {
+	Q_UNUSED (width); Q_UNUSED (height); Q_UNUSED (keep_aspect_ratio);
 
 	// Transform to DXF scale.
 	columns_header_height_ *= Createdxf::yScale;

Modified: trunk/sources/conductorproperties.cpp
===================================================================
--- trunk/sources/conductorproperties.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/conductorproperties.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -223,11 +223,10 @@
 	text_size(9),
 	verti_rotate_text(270),
 	horiz_rotate_text(0),
-	style(Qt::SolidLine),
 	m_show_text(true),
-	m_one_text_per_folio(false)
-{
-}
+	m_one_text_per_folio(false),
+	style(Qt::SolidLine)
+{}
 
 /**
 	Destructeur

Modified: trunk/sources/createdxf.cpp
===================================================================
--- trunk/sources/createdxf.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/createdxf.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -662,6 +662,8 @@
 void Createdxf::drawTextAligned(QString fileName, QString text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign,int colour,
 							bool leftAlign, float scale)
 {
+	Q_UNUSED(scale);
+
     if (!fileName.isEmpty()) {
         QFile file(fileName);
         if (!file.open(QFile::Append)) {

Modified: trunk/sources/editor/elementscene.cpp
===================================================================
--- trunk/sources/editor/elementscene.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/editor/elementscene.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -39,10 +39,10 @@
 */
 ElementScene::ElementScene(QETElementEditor *editor, QObject *parent) :
 	QGraphicsScene(parent),
+	m_elmt_type("simple"),
 	qgi_manager(this),
 	element_editor(editor),
-	decorator_(0),
-	m_elmt_type("simple")
+	decorator_(0)
 {
 	setItemIndexMethod(NoIndex);
 	current_polygon = NULL;

Modified: trunk/sources/editor/partline.cpp
===================================================================
--- trunk/sources/editor/partline.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/editor/partline.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -25,8 +25,8 @@
 	@param scene La scene sur laquelle figure cette ligne
 */
 PartLine::PartLine(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) :
+	CustomElementGraphicPart(editor),
 	QGraphicsLineItem(parent, scene),
-	CustomElementGraphicPart(editor),
 	first_end(Qet::None),
 	first_length(1.5),
 	second_end(Qet::None),

Modified: trunk/sources/exportdialog.cpp
===================================================================
--- trunk/sources/exportdialog.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/exportdialog.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -425,7 +425,7 @@
 	QList <QetShapeItem *> list_shapes;
 
 	DiagramFolioList *ptr;
-	if (ptr = dynamic_cast<DiagramFolioList *>(diagram)) {
+	if ((ptr = dynamic_cast<DiagramFolioList *>(diagram))) {
 		list_lines = ptr -> lines();
 		list_rectangles = ptr -> rectangles();
 

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/qetdiagrameditor.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -50,14 +50,14 @@
  */
 QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
 	QETMainWindow(parent),
-	open_dialog_dir(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)),
-	can_update_actions(true),
-	m_add_item_actions_group(this),
-	m_zoom_actions_group(this),
-	m_select_actions_group(this),
-	m_selection_actions_group(this),
-	m_row_column_actions_group(this),
-	m_file_actions_group(this)
+	m_add_item_actions_group   (this),
+	m_zoom_actions_group       (this),
+	m_select_actions_group     (this),
+	m_selection_actions_group  (this),
+	m_row_column_actions_group (this),
+	m_file_actions_group       (this),
+	open_dialog_dir            (QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)),
+	can_update_actions         (true)
 {
 	// mise en place de l'interface MDI au centre de l'application
 	setCentralWidget(&workspace);
@@ -1820,7 +1820,7 @@
 			bool isFolioList = false;
 
 			// if diagram to remove is a "folio list sheet", then set a flag.
-			if (DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(current_diagram -> diagram()))
+			if (dynamic_cast<DiagramFolioList *>(current_diagram -> diagram()))
 				isFolioList = true;
 
 			current_project -> removeDiagram(current_diagram);
@@ -1828,7 +1828,7 @@
 			// if the removed diagram was a folio sheet, then delete all the remaining folio sheets also.
 			if (isFolioList) {
 				foreach (DiagramView *diag, current_project -> diagrams()) {
-					if (DiagramFolioList *ptr = dynamic_cast<DiagramFolioList *>(diag -> diagram())) {
+					if (dynamic_cast<DiagramFolioList *>(diag -> diagram())) {
 						current_project -> removeDiagram(diag);
 					}
 				}

Modified: trunk/sources/qetgraphicsitem/diagramimageitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/diagramimageitem.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/qetgraphicsitem/diagramimageitem.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -67,6 +67,8 @@
 void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
 	painter -> drawPixmap(pixmap_.rect(),pixmap_);
 
+	Q_UNUSED(option); Q_UNUSED(widget);
+
 	if (isSelected()) {
 		painter -> save();
 		// Annulation des renderhints

Modified: trunk/sources/qetgraphicsitem/element.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/element.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/qetgraphicsitem/element.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -35,6 +35,8 @@
 	internal_connections_(false),
 	must_highlight_(false)
 {
+	Q_UNUSED(scene);
+
 	link_type_ = Simple;
 	uuid_ = QUuid::createUuid();
 	setZValue(10);

Modified: trunk/sources/qetproject.h
===================================================================
--- trunk/sources/qetproject.h	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/qetproject.h	2014-10-19 11:25:03 UTC (rev 3382)
@@ -196,8 +196,6 @@
 	QDomDocument document_root_;
 	/// Diagrams carried by the project
 	QList<Diagram *> diagrams_;
-	/// Folio List Sheets quantity for this project.
-	int folioSheetsQuantity;
 	/// Embedded elements collection
 	XmlElementsCollection *collection_;
 	/// Project title
@@ -230,6 +228,8 @@
 	QUndoStack *undo_stack_;
 	/// Conductor auto numerotation
 	QHash <QString, NumerotationContext> m_conductor_autonum;
+	/// Folio List Sheets quantity for this project.
+	int folioSheetsQuantity;
 };
 Q_DECLARE_METATYPE(QETProject *)
 #endif

Modified: trunk/sources/ui/diagramselection.cpp
===================================================================
--- trunk/sources/ui/diagramselection.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/ui/diagramselection.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -100,7 +100,7 @@
 void diagramselection::on_tableDiagram_customContextMenuRequested(const QPoint &pos){
 	QMenu menu(this);
 	QAction *desl = menu.addAction( tr("D\351s\351lectionner tout") );
-	QAction *sel  = menu.addAction(QIcon(":/ico/16x16/dialog-ok.png"), tr("S\351lectionner tout") );
+	menu.addAction(QIcon(":/ico/16x16/dialog-ok.png"), tr("S\351lectionner tout") );
 	
 	// Exec Menu
 	QAction *ret = menu.exec(ui -> tableDiagram -> viewport() -> mapToGlobal(pos));	

Modified: trunk/sources/ui/dialogautonum.cpp
===================================================================
--- trunk/sources/ui/dialogautonum.cpp	2014-10-19 10:08:55 UTC (rev 3381)
+++ trunk/sources/ui/dialogautonum.cpp	2014-10-19 11:25:03 UTC (rev 3382)
@@ -94,7 +94,7 @@
 		if(i+1 < listDiag.count()) diagramsTitle += ", ";
 	}
 	// Ask if user is sure to numerate the conductor
-	QMessageBox::StandardButton answer = QET::MessageBox::warning(
+	QET::MessageBox::warning(
 		this,
 		tr("Annotation des conducteurs", "Attention"),
 		QString(
@@ -103,14 +103,6 @@
 		QMessageBox::Yes | QMessageBox::No,
 		QMessageBox::No
 	);
-	
-	// if yes numerate all
-	if( answer ==  QMessageBox::Yes) {
-		foreach (Diagram *d, listDiag) {
-			/*ConductorAutoNumerotation can(d);
-			can.numerateDiagram();*/
-		}
-	}
 }
 
 /**


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/