Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-windows
Commits
2db01ed4
Commit
2db01ed4
authored
Mar 17, 2020
by
Ming Rui Zhang
Browse files
runguard: fix the issue that the app cannot be shown when the second instance runs
Change-Id: I764085eaf2cd1613fda738f28a510dcbef71ab0b
parent
0b055b16
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
2db01ed4
...
...
@@ -33,21 +33,22 @@ main(int argc, char* argv[])
MainApplication
::
applicationInitialization
();
char
ARG_DISABLE_WEB_SECURITY
[]
=
"--disable-web-security"
;
auto
newArgv
=
MainApplication
::
parseInputArgument
(
argc
,
argv
,
ARG_DISABLE_WEB_SECURITY
);
MainApplication
a
(
argc
,
newArgv
);
// runguard to make sure that only one instance runs at a time
// Note: needs to be after the creation of the application
QCryptographicHash
appData
(
QCryptographicHash
::
Sha256
);
appData
.
addData
(
QApplication
::
applicationName
().
toUtf8
());
appData
.
addData
(
QApplication
::
organizationDomain
().
toUtf8
());
RunGuard
guard
(
appData
.
result
());
if
(
!
guard
.
tryToRun
())
{
// no need to exitApp since app is not set up
guard
.
release
();
return
0
;
}
char
ARG_DISABLE_WEB_SECURITY
[]
=
"--disable-web-security"
;
auto
newArgv
=
MainApplication
::
parseInputArgument
(
argc
,
argv
,
ARG_DISABLE_WEB_SECURITY
);
MainApplication
a
(
argc
,
newArgv
);
if
(
!
a
.
applicationSetup
())
{
guard
.
release
();
a
.
exitApp
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment