#3384 Add RiaApplication::enableDebugFeatures method that checks environment for RESINSIGHT_DEBUG

* Disable System tab of preferences if this is not enabled.
This commit is contained in:
Gaute Lindkvist
2018-09-19 14:43:06 +02:00
parent 38d3b666e6
commit e4a5eb2769
4 changed files with 77 additions and 25 deletions

View File

@@ -99,6 +99,7 @@
#include <QFileDialog>
#include <QMdiSubWindow>
#include <QMessageBox>
#include <QProcessEnvironment>
#include <QTreeView>
@@ -1596,6 +1597,15 @@ void RiaApplication::saveWinGeoAndDockToolBarLayout()
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaApplication::enableDevelopmentFeatures()
{
QString environmentVar = QProcessEnvironment::systemEnvironment().value("RESINSIGHT_DEVEL", QString("0"));
return environmentVar.toInt() == 1;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------