Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
MitkCoreApp.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include <mitkBaseApplication.h>
18 
19 #include <QStringList>
20 #include <QVariant>
21 
22 int main(int argc, char **argv)
23 {
24  mitk::BaseApplication app(argc, argv);
25 
26  app.setApplicationName("MitkCoreApp");
27  app.setOrganizationName("DKFZ");
28 
29  // Preload the org.mitk.gui.qt.common plug-in (and hence also Qmitk) to speed
30  // up a clean-cache start. This also works around bugs in older gcc and glibc implementations,
31  // which have difficulties with multiple dynamic opening and closing of shared libraries with
32  // many global static initializers. It also helps if dependent libraries have weird static
33  // initialization methods and/or missing de-initialization code.
34  QStringList preloadLibs;
35  preloadLibs << "liborg_mitk_gui_qt_common";
36  app.setPreloadLibraries(preloadLibs);
37 
38  app.setProperty(mitk::BaseApplication::PROP_APPLICATION, "org.mitk.qt.coreapplication");
39 
40  // Run the workbench
41  return app.run();
42 }
void setPreloadLibraries(const QStringList &libraryBaseNames)
int main(int argc, char **argv)
Definition: MitkCoreApp.cpp:22
void setProperty(const QString &property, const QVariant &value)
void setOrganizationName(const QString &name)
void setApplicationName(const QString &name)
static QString PROP_APPLICATION