Mercurial > hg > orthanc-stone
comparison Applications/IBasicApplication.cpp @ 81:8677d95753f8 wasm
switching to Oracle in SDL samples
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 24 May 2017 22:54:09 +0200 |
parents | 1553b67b24e5 |
children | cee8f308a4bc |
comparison
equal
deleted
inserted
replaced
80:f40a78cc7070 | 81:8677d95753f8 |
---|---|
195 { | 195 { |
196 webService.SetPassword(parameters["password"].as<std::string>()); | 196 webService.SetPassword(parameters["password"].as<std::string>()); |
197 } | 197 } |
198 | 198 |
199 LOG(WARNING) << "URL to the Orthanc REST API: " << webService.GetUrl(); | 199 LOG(WARNING) << "URL to the Orthanc REST API: " << webService.GetUrl(); |
200 OrthancSynchronousWebService orthanc(webService); | 200 |
201 | 201 { |
202 if (!MessagingToolbox::CheckOrthancVersion(orthanc.GetConnection())) | 202 OrthancSynchronousWebService orthanc(webService); |
203 { | 203 |
204 LOG(ERROR) << "Your version of Orthanc is incompatible with Orthanc Stone, please upgrade"; | 204 if (!MessagingToolbox::CheckOrthancVersion(orthanc.GetConnection())) |
205 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol); | 205 { |
206 LOG(ERROR) << "Your version of Orthanc is incompatible with Orthanc Stone, please upgrade"; | |
207 throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol); | |
208 } | |
206 } | 209 } |
207 | 210 |
208 | 211 |
209 /**************************************************************** | 212 /**************************************************************** |
210 * Initialize the application | 213 * Initialize the application |
211 ****************************************************************/ | 214 ****************************************************************/ |
212 | 215 |
213 LOG(WARNING) << "Creating the widgets of the application"; | 216 LOG(WARNING) << "Creating the widgets of the application"; |
214 | 217 |
215 LogStatusBar statusBar; | 218 LogStatusBar statusBar; |
216 BasicApplicationContext context(orthanc); | 219 BasicApplicationContext context(webService); |
217 | 220 |
218 application.Initialize(context, statusBar, parameters); | 221 application.Initialize(context, statusBar, parameters); |
219 | 222 |
220 { | 223 { |
221 BasicApplicationContext::ViewportLocker locker(context); | 224 BasicApplicationContext::ViewportLocker locker(context); |