[qet] [3877] added detection of binary file

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


Revision: 3877
Author:   rdsivd
Date:     2015-03-30 20:35:36 +0200 (Mon, 30 Mar 2015)
Log Message:
-----------
added detection of binary file

Modified Paths:
--------------
    branches/dxftoelmt/src/ui/dxftoelmt.cpp

Modified: branches/dxftoelmt/src/ui/dxftoelmt.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxftoelmt.cpp	2015-03-30 18:06:08 UTC (rev 3876)
+++ branches/dxftoelmt/src/ui/dxftoelmt.cpp	2015-03-30 18:35:36 UTC (rev 3877)
@@ -1,4 +1,5 @@
 #include "dxftoelmt.h"
+#include <QMessageBox>
 
 dxfTOelmt::dxfTOelmt()
 {
@@ -52,6 +53,19 @@
 
 	Wstatus.showMessage(QString::number(dxfLineCounter));
 
+
+	if (Line1.contains(" 0", Qt::CaseSensitive))
+	{
+
+	}
+	else
+	{
+		Flag = 0;
+
+		//QMessageBox::warning(("this is not a dxf ascii file, programe while close"));
+
+		return Flag;
+	}
 	while (!ReadLine.isNull())
 	{
 		Aantal_Tekens = Line2.length();


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