Commented out Windows specific code.

This commit is contained in:
leozide 2017-09-22 14:04:50 -07:00
parent d7ce050561
commit 8fed7534ff
2 changed files with 7 additions and 2 deletions

View file

@ -8,7 +8,7 @@ greaterThan(QT_MAJOR_VERSION, 4) {
INCLUDEPATH += qt common
CONFIG += precompile_header incremental c++11
win32 { o
win32 {
PRECOMPILED_HEADER = common/lc_global.h
QMAKE_CXXFLAGS_WARN_ON += -wd4100
DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_DEPRECATE=1 _CRT_NONSTDC_NO_WARNINGS=1

View file

@ -9,8 +9,10 @@ lcRenderDialog::lcRenderDialog(QWidget* Parent)
ui(new Ui::lcRenderDialog)
{
mProcess = nullptr;
#ifdef Q_OS_WIN
mMapFile = NULL;
mBuffer = nullptr;
#endif
ui->setupUi(this);
connect(&mUpdateTimer, SIGNAL(timeout()), this, SLOT(Update()));
@ -80,7 +82,7 @@ void lcRenderDialog::Update()
mProcess = nullptr;
}
}
#ifdef Q_OS_WIN
if (mMapFile == NULL)
{
mMapFile = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, "leocad-povray");
@ -140,10 +142,12 @@ void lcRenderDialog::Update()
Header->PixelsRead = PixelsRead;
ui->label->setPixmap(QPixmap::fromImage(Image));
#endif
}
void lcRenderDialog::CloseSharedMemory()
{
#ifdef Q_OS_WIN
if (mBuffer)
{
UnmapViewOfFile(mBuffer);
@ -155,4 +159,5 @@ void lcRenderDialog::CloseSharedMemory()
CloseHandle(mMapFile);
mMapFile = NULL;
}
#endif
}