comparison Framework/StoneInitialization.cpp @ 1397:1c2d065ba372

cleanup
author Alain Mazy <alain@mazy.be>
date Wed, 29 Apr 2020 20:41:36 +0200
parents c38c89684d83
children 30deba7bc8e2
comparison
equal deleted inserted replaced
1396:dd2b75ee644b 1397:1c2d065ba372
23 23
24 #if !defined(ORTHANC_ENABLE_SDL) 24 #if !defined(ORTHANC_ENABLE_SDL)
25 # error Macro ORTHANC_ENABLE_SDL must be defined 25 # error Macro ORTHANC_ENABLE_SDL must be defined
26 #endif 26 #endif
27 27
28 #if !defined(ORTHANC_ENABLE_QT)
29 # error Macro ORTHANC_ENABLE_QT must be defined
30 #endif
31
32 #if !defined(ORTHANC_ENABLE_SSL) 28 #if !defined(ORTHANC_ENABLE_SSL)
33 # error Macro ORTHANC_ENABLE_SSL must be defined 29 # error Macro ORTHANC_ENABLE_SSL must be defined
34 #endif 30 #endif
35 31
36 #if !defined(ORTHANC_ENABLE_CURL) 32 #if !defined(ORTHANC_ENABLE_CURL)
44 # endif 40 # endif
45 #endif 41 #endif
46 42
47 #if ORTHANC_ENABLE_SDL == 1 43 #if ORTHANC_ENABLE_SDL == 1
48 # include "Viewport/SdlWindow.h" 44 # include "Viewport/SdlWindow.h"
49 #endif
50
51 #if ORTHANC_ENABLE_QT == 1
52 # include <QCoreApplication>
53 #endif 45 #endif
54 46
55 #if ORTHANC_ENABLE_CURL == 1 47 #if ORTHANC_ENABLE_CURL == 1
56 # include <Core/HttpClient.h> 48 # include <Core/HttpClient.h>
57 #endif 49 #endif
120 112
121 { 113 {
122 // Run-time checks of locale settings, to be run after Qt has 114 // Run-time checks of locale settings, to be run after Qt has
123 // been initialized, as Qt changes locale settings 115 // been initialized, as Qt changes locale settings
124 116
125 #if ORTHANC_ENABLE_QT == 1
126 if (QCoreApplication::instance() == NULL)
127 {
128 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls,
129 "Qt must be initialized before Stone");
130 }
131 #endif
132
133 { 117 {
134 OrthancStone::Vector v; 118 OrthancStone::Vector v;
135 if (!OrthancStone::LinearAlgebra::ParseVector(v, "1.3671875\\-1.3671875") || 119 if (!OrthancStone::LinearAlgebra::ParseVector(v, "1.3671875\\-1.3671875") ||
136 v.size() != 2 || 120 v.size() != 2 ||
137 !OrthancStone::LinearAlgebra::IsNear(1.3671875f, v[0]) || 121 !OrthancStone::LinearAlgebra::IsNear(1.3671875f, v[0]) ||