1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0028934: Coding - Eliminate compiler warnings in OCCT samples

- covering Qt warnings for compilation under MSVC 2013 and greater
- avoid warning about 'M_PI'(and others) redefinition warning of math.h: includes of QtWidgets should follow after other includes.
This commit is contained in:
nds
2018-04-04 06:25:02 +03:00
committed by bugmaster
parent 41bf7e0b3c
commit 55a40de890
36 changed files with 103 additions and 32 deletions

View File

@@ -2,12 +2,15 @@
#include "Translate.h"
#include <Standard_WarningsDisable.hxx>
#include <QMessageBox>
#include <stdlib.h>
#include <QMdiSubWindow>
#include <Standard_WarningsRestore.hxx>
#include <OSD_Environment.hxx>
#include <stdlib.h>
ApplicationWindow::ApplicationWindow()
: ApplicationCommonWindow( ),
myImportPopup( 0 ),
@@ -200,13 +203,13 @@ void ApplicationWindow::onSelectionChanged()
QMdiArea* ws = getWorkspace();
DocumentCommon* doc = qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() )->getDocument();
Handle(AIS_InteractiveContext) context = doc->getContext();
int numSel = context->NbSelected();
bool anEnabled = (context->NbSelected() > 0);
myCasCadeTranslateActions.at( FileExportBREPId )->setEnabled( numSel );
myCasCadeTranslateActions.at( FileExportIGESId )->setEnabled( numSel );
myCasCadeTranslateActions.at( FileExportSTEPId )->setEnabled( numSel );
myCasCadeTranslateActions.at( FileExportSTLId )->setEnabled( numSel );
myCasCadeTranslateActions.at( FileExportVRMLId )->setEnabled( numSel );
myCasCadeTranslateActions.at( FileExportBREPId )->setEnabled( anEnabled );
myCasCadeTranslateActions.at( FileExportIGESId )->setEnabled( anEnabled );
myCasCadeTranslateActions.at( FileExportSTEPId )->setEnabled( anEnabled );
myCasCadeTranslateActions.at( FileExportSTLId )->setEnabled( anEnabled );
myCasCadeTranslateActions.at( FileExportVRMLId )->setEnabled( anEnabled );
}
QString ApplicationWindow::getIEResourceDir()