Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
80b7a1e9
Commit
80b7a1e9
authored
8 years ago
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't try to use QCoreApplication::arguments before an app is created
parent
91c050b9
master
dev1
merge_branch_alt
original
phil
rc1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
main.cc
src/main.cc
+12
-4
No files found.
src/main.cc
View file @
80b7a1e9
...
...
@@ -145,11 +145,19 @@ int main(int argc, char *argv[])
// Set our own OpenGL buglist
qputenv
(
"QT_OPENGL_BUGLIST"
,
":/opengl/resources/opengl/buglist.json"
);
if
(
QCoreApplication
::
arguments
().
contains
(
QStringLiteral
(
"-angle"
)))
{
QCoreApplication
::
setAttribute
(
Qt
::
AA_UseOpenGLES
);
}
else
if
(
QCoreApplication
::
arguments
().
contains
(
QStringLiteral
(
"-swrast"
)))
{
QCoreApplication
::
setAttribute
(
Qt
::
AA_UseSoftwareOpenGL
);
// Allow for command line override of renderer
for
(
int
i
=
0
;
i
<
argc
;
i
++
)
{
const
QString
arg
(
argv
[
i
]);
if
(
arg
==
QStringLiteral
(
"-angle"
))
{
QCoreApplication
::
setAttribute
(
Qt
::
AA_UseOpenGLES
);
break
;
}
else
if
(
arg
==
QStringLiteral
(
"-swrast"
))
{
QCoreApplication
::
setAttribute
(
Qt
::
AA_UseSoftwareOpenGL
);
break
;
}
}
#endif
// The following calls to qRegisterMetaType are done to silence debug output which warns
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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