Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
885581d4
Commit
885581d4
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
initialize gApp in main, through same mechanism as gDoc
parent
0048c1e7
No related branches found
No related tags found
1 merge request
!2446
merge Dirs into AppConfig; split off WidgetSettings
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
App/main.cpp
+2
-2
2 additions, 2 deletions
App/main.cpp
GUI/View/Layout/ApplicationSettings.cpp
+1
-3
1 addition, 3 deletions
GUI/View/Layout/ApplicationSettings.cpp
GUI/View/Layout/ApplicationSettings.h
+1
-1
1 addition, 1 deletion
GUI/View/Layout/ApplicationSettings.h
with
4 additions
and
6 deletions
App/main.cpp
+
2
−
2
View file @
885581d4
...
...
@@ -70,13 +70,13 @@ int main(int argc, char* argv[])
app
.
setWindowIcon
(
QIcon
(
":/images/BornAgain.ico"
));
#endif
ApplicationSettings
applicationSettings
;
gDirs
=
std
::
make_unique
<
Dirs
>
();
gApp
=
std
::
make_unique
<
ApplicationSettings
>
();
QString
dir
=
GUI
::
Path
::
appDataFolder
();
if
(
!
QDir
().
exists
(
dir
))
QDir
().
mkpath
(
dir
);
gDirs
=
std
::
make_unique
<
Dirs
>
();
gDoc
=
std
::
make_unique
<
ProjectDocument
>
();
MainWindow
win
;
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Layout/ApplicationSettings.cpp
+
1
−
3
View file @
885581d4
...
...
@@ -28,12 +28,10 @@ const QString S_SINGLE_SAMPLE_MODE = "SingleSampleMode";
}
// namespace
BA_GUI_API_
ApplicationSettings
*
gApp
;
//!< global pointer to _the_ instance
BA_GUI_API_
std
::
unique_ptr
<
ApplicationSettings
>
gApp
;
//!< global pointer to _the_ instance
ApplicationSettings
::
ApplicationSettings
()
{
gApp
=
this
;
QFile
base
(
":/styles/Base.stylesheet"
);
base
.
open
(
QFile
::
ReadOnly
);
QString
stylesheet
=
base
.
readAll
();
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Layout/ApplicationSettings.h
+
1
−
1
View file @
885581d4
...
...
@@ -33,6 +33,6 @@ public:
QString
xml_dir
;
};
BA_GUI_API_
extern
ApplicationSettings
*
gApp
;
//!< global pointer to the
single
instance
BA_GUI_API_
extern
std
::
unique_ptr
<
ApplicationSettings
>
gApp
;
//!< global pointer to
_
the
_
instance
#endif // BORNAGAIN_GUI_VIEW_LAYOUT_APPLICATIONSETTINGS_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment