summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMake.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2009-10-26 17:18:15 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2009-10-26 17:18:15 (GMT)
commit0b8837814afb82547d4c78d153db1fd7b1b34cfe (patch)
tree4fd1b9700dfa3034f837251f10e64a848feb7613 /Source/QtDialog/QCMake.cxx
parent6e3dd78b8ba5ebceade06744806e98038aa2569e (diff)
downloadCMake-0b8837814afb82547d4c78d153db1fd7b1b34cfe.zip
CMake-0b8837814afb82547d4c78d153db1fd7b1b34cfe.tar.gz
CMake-0b8837814afb82547d4c78d153db1fd7b1b34cfe.tar.bz2
ENH: Move SetErrorMode around calls to generate and configure instead of setting it for the whole application.
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r--Source/QtDialog/QCMake.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 3bd64f0..dc31fad 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -20,6 +20,10 @@
#include "cmSystemTools.h"
#include "cmExternalMakefileProjectGenerator.h"
+#ifdef Q_OS_WIN
+#include "qt_windows.h" // For SetErrorMode
+#endif
+
QCMake::QCMake(QObject* p)
: QObject(p)
{
@@ -148,6 +152,10 @@ void QCMake::setGenerator(const QString& gen)
void QCMake::configure()
{
+#ifdef Q_OS_WIN
+ UINT lastErrorMode = SetErrorMode(0);
+#endif
+
this->CMakeInstance->SetHomeDirectory(this->SourceDirectory.toAscii().data());
this->CMakeInstance->SetStartDirectory(this->SourceDirectory.toAscii().data());
this->CMakeInstance->SetHomeOutputDirectory(this->BinaryDirectory.toAscii().data());
@@ -162,14 +170,27 @@ void QCMake::configure()
int err = this->CMakeInstance->Configure();
+#ifdef Q_OS_WIN
+ SetErrorMode(lastErrorMode);
+#endif
+
emit this->propertiesChanged(this->properties());
emit this->configureDone(err);
}
void QCMake::generate()
{
+#ifdef Q_OS_WIN
+ UINT lastErrorMode = SetErrorMode(0);
+#endif
+
cmSystemTools::ResetErrorOccuredFlag();
int err = this->CMakeInstance->Generate();
+
+#ifdef Q_OS_WIN
+ SetErrorMode(lastErrorMode);
+#endif
+
emit this->generateDone(err);
}