[Cmake-commits] [cmake-commits] clinton committed CMakeSetupDialog.cxx 1.48 1.49 CMakeSetupDialog.h 1.24 1.25 QCMake.cxx 1.22 1.23 QCMake.h 1.10 1.11
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Apr 7 19:19:52 EDT 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv4355
Modified Files:
CMakeSetupDialog.cxx CMakeSetupDialog.h QCMake.cxx QCMake.h
Log Message:
BUG: Fix #6733. Always convert "\" to "/" in source & binary directory fields on Windows.
Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C 2 -d -r1.24 -r1.25
*** CMakeSetupDialog.h 3 Apr 2008 20:18:37 -0000 1.24
--- CMakeSetupDialog.h 7 Apr 2008 23:19:50 -0000 1.25
***************
*** 60,63 ****
--- 60,64 ----
void doDeleteCache();
void updateSourceDirectory(const QString& dir);
+ void updateBinaryDirectory(const QString& dir);
void showProgress(const QString& msg, float percent);
void setEnabledState(bool);
Index: QCMake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C 2 -d -r1.10 -r1.11
*** QCMake.h 2 Apr 2008 21:41:24 -0000 1.10
--- QCMake.h 7 Apr 2008 23:19:50 -0000 1.11
***************
*** 113,116 ****
--- 113,118 ----
/// containing a CMakeCache.txt file)
void sourceDirChanged(const QString& dir);
+ /// signal when the binary directory changes
+ void binaryDirChanged(const QString& dir);
/// signal for progress events
void progressChanged(const QString& msg, float percent);
Index: QCMake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -C 2 -d -r1.22 -r1.23
*** QCMake.cxx 2 Apr 2008 21:41:24 -0000 1.22
--- QCMake.cxx 7 Apr 2008 23:19:50 -0000 1.23
***************
*** 87,92 ****
if(this->SourceDirectory != dir)
{
! this->SourceDirectory = dir;
! emit this->sourceDirChanged(dir);
}
}
--- 87,92 ----
if(this->SourceDirectory != dir)
{
! this->SourceDirectory = QDir::fromNativeSeparators(dir);
! emit this->sourceDirChanged(this->SourceDirectory);
}
}
***************
*** 96,105 ****
if(this->BinaryDirectory != dir)
{
cmCacheManager *cachem = this->CMakeInstance->GetCacheManager();
- this->BinaryDirectory = dir;
this->setGenerator(QString());
! if(!this->CMakeInstance->GetCacheManager()->LoadCache(dir.toLocal8Bit().data()))
{
! QDir testDir(dir);
if(testDir.exists("CMakeCache.txt"))
{
--- 96,107 ----
if(this->BinaryDirectory != dir)
{
+ this->BinaryDirectory = QDir::fromNativeSeparators(dir);
+ emit this->binaryDirChanged(this->BinaryDirectory);
cmCacheManager *cachem = this->CMakeInstance->GetCacheManager();
this->setGenerator(QString());
! if(!this->CMakeInstance->GetCacheManager()->LoadCache(
! this->BinaryDirectory.toLocal8Bit().data()))
{
! QDir testDir(this->BinaryDirectory);
if(testDir.exists("CMakeCache.txt"))
{
Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.48
retrieving revision 1.49
diff -C 2 -d -r1.48 -r1.49
*** CMakeSetupDialog.cxx 3 Apr 2008 22:35:01 -0000 1.48
--- CMakeSetupDialog.cxx 7 Apr 2008 23:19:49 -0000 1.49
***************
*** 182,186 ****
SIGNAL(sourceDirChanged(QString)),
this, SLOT(updateSourceDirectory(QString)));
!
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(progressChanged(QString, float)),
--- 182,189 ----
SIGNAL(sourceDirChanged(QString)),
this, SLOT(updateSourceDirectory(QString)));
! QObject::connect(this->CMakeThread->cmakeInstance(),
! SIGNAL(binaryDirChanged(QString)),
! this, SLOT(updateBinaryDirectory(QString)));
!
QObject::connect(this->CMakeThread->cmakeInstance(),
SIGNAL(progressChanged(QString, float)),
***************
*** 446,450 ****
if(!dir.isEmpty())
{
! this->setSourceDirectory(QDir::fromNativeSeparators(dir));
}
}
--- 449,453 ----
if(!dir.isEmpty())
{
! this->setSourceDirectory(dir);
}
}
***************
*** 460,463 ****
--- 463,476 ----
}
+ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir)
+ {
+ if(this->BinaryDirectory->currentText() != dir)
+ {
+ this->BinaryDirectory->blockSignals(true);
+ this->BinaryDirectory->setEditText(dir);
+ this->BinaryDirectory->blockSignals(false);
+ }
+ }
+
void CMakeSetupDialog::doBinaryBrowse()
{
***************
*** 466,470 ****
if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
{
! this->setBinaryDirectory(QDir::fromNativeSeparators(dir));
}
}
--- 479,483 ----
if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
{
! this->setBinaryDirectory(dir);
}
}
More information about the Cmake-commits
mailing list