summaryrefslogtreecommitdiff
path: root/Source/QtDialog/QCMake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r--Source/QtDialog/QCMake.cxx28
1 files changed, 16 insertions, 12 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 8554ff8..0d01181 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -32,9 +32,9 @@ QCMake::QCMake(QObject* p)
this->WarnUnusedMode = false;
qRegisterMetaType<QCMakeProperty>();
qRegisterMetaType<QCMakePropertyList>();
-
+
QDir execDir(QCoreApplication::applicationDirPath());
-
+
#if defined(Q_OS_MAC)
if(execDir.exists("../bin/cmake"))
{
@@ -45,7 +45,7 @@ QCMake::QCMake(QObject* p)
execDir.cd("../../../"); // path to cmake in build directory (need to fix for deployment)
}
#endif
-
+
QString cmakeCommand = QString("cmake")+QString::fromLocal8Bit(cmSystemTools::GetExecutableExtension());
cmakeCommand = execDir.filePath(cmakeCommand);
@@ -58,7 +58,7 @@ QCMake::QCMake(QObject* p)
this->CMakeInstance->SetCMakeCommand(cmakeCommand.toLocal8Bit().data());
#if defined(Q_OS_MAC)
this->CMakeInstance->SetCMakeEditCommand("cmake-gui.app/Contents/MacOS/cmake-gui");
-#else
+#else
this->CMakeInstance->SetCMakeEditCommand("cmake-gui");
#endif
this->CMakeInstance->SetProgressCallback(QCMake::progressCallback, this);
@@ -96,7 +96,7 @@ void QCMake::loadCache(const QString& dir)
void QCMake::setSourceDirectory(const QString& _dir)
{
- QString dir =
+ QString dir =
QString::fromLocal8Bit(cmSystemTools::GetActualCaseForPath(_dir.toLocal8Bit().data()).c_str());
if(this->SourceDirectory != dir)
{
@@ -107,7 +107,7 @@ void QCMake::setSourceDirectory(const QString& _dir)
void QCMake::setBinaryDirectory(const QString& _dir)
{
- QString dir =
+ QString dir =
QString::fromLocal8Bit(cmSystemTools::GetActualCaseForPath(_dir.toLocal8Bit().data()).c_str());
if(this->BinaryDirectory != dir)
{
@@ -126,7 +126,7 @@ void QCMake::setBinaryDirectory(const QString& _dir)
"Please check the permissions of the directory you are trying to run CMake on.");
}
}
-
+
QCMakePropertyList props = this->properties();
emit this->propertiesChanged(props);
cmCacheManager::CacheIterator itm = cachem->NewIterator();
@@ -202,7 +202,7 @@ void QCMake::generate()
emit this->generateDone(err);
}
-
+
void QCMake::setProperties(const QCMakePropertyList& newProps)
{
QCMakePropertyList props = newProps;
@@ -251,7 +251,7 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
cachem->RemoveCacheEntry(s.toLocal8Bit().data());
}
-
+
// add some new properites
foreach(QCMakeProperty s, props)
{
@@ -286,7 +286,7 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
cmCacheManager::FILEPATH);
}
}
-
+
cachem->SaveCache(this->BinaryDirectory.toLocal8Bit().data());
}
@@ -339,7 +339,7 @@ QCMakePropertyList QCMake::properties() const
return ret;
}
-
+
void QCMake::interrupt()
{
this->InterruptFlag.ref();
@@ -348,7 +348,11 @@ void QCMake::interrupt()
bool QCMake::interruptCallback(void* cd)
{
QCMake* self = reinterpret_cast<QCMake*>(cd);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
return self->InterruptFlag;
+#else
+ return self->InterruptFlag.load();
+#endif
}
void QCMake::progressCallback(const char* msg, float percent, void* cd)
@@ -416,7 +420,7 @@ void QCMake::reloadCache()
props = this->properties();
emit this->propertiesChanged(props);
}
-
+
void QCMake::setDebugOutput(bool flag)
{
if(flag != this->CMakeInstance->GetDebugOutput())