0023460: Update QT products samples
authorapn <apn@opencascade.com>
Tue, 18 Nov 2014 10:41:56 +0000 (13:41 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 28 Nov 2014 08:58:39 +0000 (11:58 +0300)
Rename all generation-vc-projects.bat (in OCCT) to genproj.bat.
Fixed warnings in VoxelDemo.

samples/qt/IESample/generation-vc-projects.bat [deleted file]
samples/qt/IESample/genproj.bat [new file with mode: 0644]
samples/qt/Tutorial/generation-vc-projects.bat [deleted file]
samples/qt/Tutorial/genproj.bat [new file with mode: 0644]
samples/qt/VoxelDemo/VoxelDemo.vcproj
samples/qt/VoxelDemo/src/Timer.cpp
samples/qt/VoxelDemo/src/VoxelClient_VisDrawer.cxx

diff --git a/samples/qt/IESample/generation-vc-projects.bat b/samples/qt/IESample/generation-vc-projects.bat
deleted file mode 100644 (file)
index 1c5a7fd..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-REM Generation of vcproj files with qmake utilite
-REM Variable QTDIR and PATH to qmake executable must be defined without fail
-
-REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
-REM second argument specifies architecture) (win32 or win64)
-REM third argument specifies Debug or Release mode
-
-call "%~dp0env.bat" %1 %2 %3
-
-set EXT=vcproj
-
-if not "%1" == "" (
-    if /I "%1" == "vc8" (
-        set VCVER=vc8
-        set "VCVARS=%VS80COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else if /I "%1" == "vc9" (
-        set VCVER=vc9
-        set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else if /I "%1" == "vc10" (
-        set VCVER=vc10
-        set EXT=vcxproj
-        set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else if /I "%1" == "vc11" (
-        set VCVER=vc11
-        set EXT=vcxproj
-        set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else (
-        echo Error: first argument ^(%1^) should specify supported version of Visual C++,
-        echo one of: vc8 ^(VS 2005 SP1^), vc9 ^(VS 2008 SP1^), vc10 ^(VS 2010^) or vc11 ^(VS 2012^)
-        exit
-    )
-)
-
-if ["%ARCH%"] == ["32"] set VCARCH=x86
-if ["%ARCH%"] == ["64"] set VCARCH=amd64
-
-call "%VCVARS%" %VCARCH%
-
-qmake -tp vc -o IESample.%EXT% IESample.pro
diff --git a/samples/qt/IESample/genproj.bat b/samples/qt/IESample/genproj.bat
new file mode 100644 (file)
index 0000000..1c5a7fd
--- /dev/null
@@ -0,0 +1,39 @@
+REM Generation of vcproj files with qmake utilite
+REM Variable QTDIR and PATH to qmake executable must be defined without fail
+
+REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
+REM second argument specifies architecture) (win32 or win64)
+REM third argument specifies Debug or Release mode
+
+call "%~dp0env.bat" %1 %2 %3
+
+set EXT=vcproj
+
+if not "%1" == "" (
+    if /I "%1" == "vc8" (
+        set VCVER=vc8
+        set "VCVARS=%VS80COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else if /I "%1" == "vc9" (
+        set VCVER=vc9
+        set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else if /I "%1" == "vc10" (
+        set VCVER=vc10
+        set EXT=vcxproj
+        set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else if /I "%1" == "vc11" (
+        set VCVER=vc11
+        set EXT=vcxproj
+        set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else (
+        echo Error: first argument ^(%1^) should specify supported version of Visual C++,
+        echo one of: vc8 ^(VS 2005 SP1^), vc9 ^(VS 2008 SP1^), vc10 ^(VS 2010^) or vc11 ^(VS 2012^)
+        exit
+    )
+)
+
+if ["%ARCH%"] == ["32"] set VCARCH=x86
+if ["%ARCH%"] == ["64"] set VCARCH=amd64
+
+call "%VCVARS%" %VCARCH%
+
+qmake -tp vc -o IESample.%EXT% IESample.pro
diff --git a/samples/qt/Tutorial/generation-vc-projects.bat b/samples/qt/Tutorial/generation-vc-projects.bat
deleted file mode 100644 (file)
index b93f8ff..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-REM Generation of vcproj files with qmake utilite
-REM Variable QTDIR and PATH to qmake executable must be defined without fail
-
-REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
-REM second argument specifies architecture) (win32 or win64)
-REM third argument specifies Debug or Release mode
-
-call "%~dp0env.bat" %1 %2 %3
-
-set EXT=vcproj
-
-if not "%1" == "" (
-    if /I "%1" == "vc8" (
-        set VCVER=vc8
-        set "VCVARS=%VS80COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else if /I "%1" == "vc9" (
-        set VCVER=vc9
-        set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else if /I "%1" == "vc10" (
-        set VCVER=vc10
-        set EXT=vcxproj
-        set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else if /I "%1" == "vc11" (
-        set VCVER=vc11
-        set EXT=vcxproj
-        set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
-    ) else (
-        echo Error: first argument ^(%1^) should specify supported version of Visual C++,
-        echo one of: vc8 ^(VS 2005 SP1^), vc9 ^(VS 2008 SP1^), vc10 ^(VS 2010^) or vc11 ^(VS 2012^)
-        exit
-    )
-)
-
-if ["%ARCH%"] == ["32"] set VCARCH=x86
-if ["%ARCH%"] == ["64"] set VCARCH=amd64
-
-call "%VCVARS%" %VCARCH%
-
-qmake -tp vc -o Tutorial.%EXT% Tutorial.pro
diff --git a/samples/qt/Tutorial/genproj.bat b/samples/qt/Tutorial/genproj.bat
new file mode 100644 (file)
index 0000000..b93f8ff
--- /dev/null
@@ -0,0 +1,39 @@
+REM Generation of vcproj files with qmake utilite
+REM Variable QTDIR and PATH to qmake executable must be defined without fail
+
+REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
+REM second argument specifies architecture) (win32 or win64)
+REM third argument specifies Debug or Release mode
+
+call "%~dp0env.bat" %1 %2 %3
+
+set EXT=vcproj
+
+if not "%1" == "" (
+    if /I "%1" == "vc8" (
+        set VCVER=vc8
+        set "VCVARS=%VS80COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else if /I "%1" == "vc9" (
+        set VCVER=vc9
+        set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else if /I "%1" == "vc10" (
+        set VCVER=vc10
+        set EXT=vcxproj
+        set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else if /I "%1" == "vc11" (
+        set VCVER=vc11
+        set EXT=vcxproj
+        set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
+    ) else (
+        echo Error: first argument ^(%1^) should specify supported version of Visual C++,
+        echo one of: vc8 ^(VS 2005 SP1^), vc9 ^(VS 2008 SP1^), vc10 ^(VS 2010^) or vc11 ^(VS 2012^)
+        exit
+    )
+)
+
+if ["%ARCH%"] == ["32"] set VCARCH=x86
+if ["%ARCH%"] == ["64"] set VCARCH=amd64
+
+call "%VCVARS%" %VCARCH%
+
+qmake -tp vc -o Tutorial.%EXT% Tutorial.pro
index 1745563..68d7d2e 100644 (file)
@@ -48,7 +48,7 @@
                                RuntimeLibrary="3"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
+                               Detect64BitPortabilityProblems="false"
                                DebugInformationFormat="4"
                        />
                        <Tool
                                RuntimeLibrary="2"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
+                               Detect64BitPortabilityProblems="false"
                                DebugInformationFormat="3"
                        />
                        <Tool
index d8a3f3e..783b004 100644 (file)
@@ -12,7 +12,7 @@ Timer::Timer():myWriter(0) {}
 
 Timer::Timer(const char* filename)
 {
-       myWriter = fopen(filename, "a");
+       fopen_s(&myWriter,filename, "a");
 }
 
 Timer::~Timer()
index 15cfa91..79d2bb4 100644 (file)
@@ -323,7 +323,7 @@ static void setColor(const Quantity_Color& color, const Standard_Boolean highlig
 {
     static Quantity_Color highlight_color(Quantity_NOC_BLUE1);
                if(highlight)
-        glColor3f(highlight_color.Red(), highlight_color.Green(), highlight_color.Blue());
+        glColor3f((GLfloat)highlight_color.Red(), (GLfloat)highlight_color.Green(), (GLfloat)highlight_color.Blue());
     else
         glColor3d(color.Red(), color.Green(), color.Blue());
 }