Commit 1beb6152 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'fixStereo' into 'master'

Disable stereo mode for Faulty Qt versions

Starting with Qt version 5.7.0 the stereo mode is broken, which causes OpenFlipper to crash on startup using qt version 5.7.0 on linux systems.(see #68 )
This branch checks the qt version at runtime during command line parsing.
If qt version 5.7.2 or grater is used a warning is output to command line since these qt versions have not been tested yet, but should not have the fault.
for qt versions starting with 5.7.0 to and excluding 5.7.2 the stereo mode is disabled and a warning to inform the user about the fault in the used qt version  is displayed.

fixes #68

See merge request !198
parents 8864611b 009d928d
Pipeline #3723 passed with stage
in 65 minutes and 24 seconds
......@@ -305,7 +305,27 @@ bool remoteControl = false;
bool parseCommandLineOptions(CSimpleOpt& args){
QString port;
QString port;
#ifndef WIN32
#ifndef __APPLE__
//workaround for bug with stereo mode on Qt5.7.0 and Qt5.7.1 on Linux
int QtVersionMajor, QtVersionMinor, QtVersionPatch;
if(sscanf(qVersion(),"%1d.%1d.%1d",&QtVersionMajor, &QtVersionMinor, &QtVersionPatch) == 3)
{
if(QtVersionMajor == 5 && QtVersionMinor >= 7)
{
if(QtVersionPatch < 2)
{
std::cerr << "The used Qt Version does not support stereo mode. Disabling stereo mode." << std::endl;
OpenFlipper::Options::stereo(false);
}
else
std::cerr << "Stereo Mode has not been tested for the used Qt Version." << std::endl;
}
}
#endif
#endif
// while there are arguments left to process
while (args.Next()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment