summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutomoc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r--Source/cmQtAutomoc.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index ca27530..65ecdf7 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -18,6 +18,7 @@
#include "cmSystemTools.h"
#include <cmsys/Terminal.h>
+#include <cmsys/ios/sstream>
#include <string.h>
#if defined(__APPLE__)
@@ -244,6 +245,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
bool cmQtAutomoc::Run(const char* targetDirectory)
{
+ bool success = true;
cmake cm;
cmGlobalGenerator* gg = this->CreateGlobalGenerator(&cm, targetDirectory);
cmMakefile* makefile = gg->GetCurrentLocalGenerator()->GetMakefile();
@@ -255,7 +257,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory)
if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5")
{
- this->RunAutomoc();
+ success = this->RunAutomoc();
}
this->WriteOldMocDefinitionsFile(targetDirectory);
@@ -263,7 +265,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory)
delete gg;
gg = NULL;
makefile = NULL;
- return true;
+ return success;
}
@@ -549,7 +551,7 @@ bool cmQtAutomoc::RunAutomoc()
this->GenerateMoc(it->first, it->second);
}
- std::stringstream outStream(std::stringstream::out);
+ cmsys_ios::stringstream outStream;
outStream << "/* This file is autogenerated, do not edit*/\n";
bool automocCppChanged = false;
@@ -577,7 +579,7 @@ bool cmQtAutomoc::RunAutomoc()
if (this->RunMocFailed)
{
- std::cerr << "returning failed.."<< std::endl;
+ std::cerr << "moc failed..."<< std::endl;
return false;
}
outStream.flush();
@@ -1077,7 +1079,7 @@ bool cmQtAutomoc::EndsWith(const std::string& str, const std::string& with)
std::string cmQtAutomoc::ReadAll(const std::string& filename)
{
std::ifstream file(filename.c_str());
- std::stringstream stream;
+ cmsys_ios::stringstream stream;
stream << file.rdbuf();
file.close();
return stream.str();