From 85889505bf6b8285c3af4ebc36b3a9290aa22424 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Mon, 25 Feb 2013 12:09:18 +0100
Subject: [PATCH] COMP: remove call of QString::fromStdString since it causes
 runtime issues on windows, when Qt and Mvd are not built with same VC version

---
 Code/Common/mvdAbstractImageModel.cxx | 4 ++--
 Code/Common/mvdAlgorithm.h            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Code/Common/mvdAbstractImageModel.cxx b/Code/Common/mvdAbstractImageModel.cxx
index ddd1971a90..19838e76b3 100644
--- a/Code/Common/mvdAbstractImageModel.cxx
+++ b/Code/Common/mvdAbstractImageModel.cxx
@@ -104,7 +104,7 @@ AbstractImageModel
   /*
   qDebug() << "stdBandNames1.size(): " <<  stdBandNames1.size();
   for( unsigned int i=0; i<stdBandNames1.size(); ++i )
-    qDebug() << i << ": " << QString::fromStdString( stdBandNames1[ i ] );
+    qDebug() << i << ": " << QString( stdBandNames1[ i ].c_str() );
   */
 
   assert( stdBandNames1.empty() ||
@@ -125,7 +125,7 @@ AbstractImageModel
   /*
   qDebug() << "stdBandNames2.size(): " <<  stdBandNames2.size();
   for( unsigned int i=0; i<stdBandNames2.size(); ++i )
-    qDebug() << i << ": " << QString::fromStdString( stdBandNames2[ i ] );
+    qDebug() << i << ": " << QString( stdBandNames2[ i ].c_str() );
   */
 
   assert( stdBandNames2.empty() ||
diff --git a/Code/Common/mvdAlgorithm.h b/Code/Common/mvdAlgorithm.h
index 5fca44d6f4..87a6ac5a4f 100644
--- a/Code/Common/mvdAlgorithm.h
+++ b/Code/Common/mvdAlgorithm.h
@@ -263,7 +263,7 @@ AppendToQStringList( QStringList& qsl, const StringVector& sv )
        it!=sv.end();
        ++ it )
     {
-    qsl.append( QString::fromStdString( *it  ) );
+    qsl.append( QString(it->c_str()) );
     }
 
   return qsl;
-- 
GitLab