summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QMacInstallDialog.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2012-07-06 19:26:39 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2012-07-06 19:26:39 (GMT)
commitecfc53da7e93a3c9081d31b25cc7950aa5b780f7 (patch)
treee421bbb76d5f4a5b05e7c0ef97087f338fda0f18 /Source/QtDialog/QMacInstallDialog.cxx
parent370c422def60c84dc54da9c92cacf9b6ff7522ac (diff)
downloadCMake-ecfc53da7e93a3c9081d31b25cc7950aa5b780f7.zip
CMake-ecfc53da7e93a3c9081d31b25cc7950aa5b780f7.tar.gz
CMake-ecfc53da7e93a3c9081d31b25cc7950aa5b780f7.tar.bz2
cmake-gui: Fix code to respect current locale.
This means non-ascii characters now work correctly on systems that have a non-ascii 8 bit encoding as the current locale.
Diffstat (limited to 'Source/QtDialog/QMacInstallDialog.cxx')
-rw-r--r--Source/QtDialog/QMacInstallDialog.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx
index 3aa509d..6eb053b 100644
--- a/Source/QtDialog/QMacInstallDialog.cxx
+++ b/Source/QtDialog/QMacInstallDialog.cxx
@@ -34,12 +34,11 @@ void QMacInstallDialog::DoInstall()
{
QDir installDir(this->Internals->InstallPrefix->text());
QString installTo = installDir.path();
- if(!cmSystemTools::FileExists(installTo.toAscii().data()))
+ if(!cmSystemTools::FileExists(installTo.toLocal8Bit().data()))
{
QString message = tr("Build install does not exist, "
- "should I create it?")
- + "\n\n"
- + tr("Directory: ");
+ "should I create it?\n\n"
+ "Directory: ");
message += installDir.path();
QString title = tr("Create Directory");
QMessageBox::StandardButton btn;
@@ -47,7 +46,7 @@ void QMacInstallDialog::DoInstall()
QMessageBox::Yes | QMessageBox::No);
if(btn == QMessageBox::Yes)
{
- cmSystemTools::MakeDirectory(installTo.toAscii().data());
+ cmSystemTools::MakeDirectory(installTo.toLocal8Bit().data());
}
}
QDir cmExecDir(QApplication::applicationDirPath());
@@ -66,14 +65,14 @@ void QMacInstallDialog::DoInstall()
newName += "/";
newName += filename;
// Remove the old files
- if(cmSystemTools::FileExists(newName.toAscii().data()))
+ if(cmSystemTools::FileExists(newName.toLocal8Bit().data()))
{
- std::cout << "rm [" << newName.toAscii().data() << "]\n";
- if(!cmSystemTools::RemoveFile(newName.toAscii().data()))
+ std::cout << "rm [" << newName.toLocal8Bit().data() << "]\n";
+ if(!cmSystemTools::RemoveFile(newName.toLocal8Bit().data()))
{
QString message = tr("Failed to remove file "
"installation may be incomplete: ");
- message += newName.toAscii().data();
+ message += newName;
QString title = tr("Error Removing file");
QMessageBox::StandardButton btn =
QMessageBox::critical(this, title, message,
@@ -84,14 +83,14 @@ void QMacInstallDialog::DoInstall()
}
}
}
- std::cout << "ln -s [" << file.toAscii().data() << "] [";
- std::cout << newName.toAscii().data() << "]\n";
- if(!cmSystemTools::CreateSymlink(file.toAscii().data(),
- newName.toAscii().data()))
+ std::cout << "ln -s [" << file.toLocal8Bit().data() << "] [";
+ std::cout << newName.toLocal8Bit().data() << "]\n";
+ if(!cmSystemTools::CreateSymlink(file.toLocal8Bit().data(),
+ newName.toLocal8Bit().data()))
{
QString message = tr("Failed create symlink "
"installation may be incomplete: ");
- message += newName.toAscii().data();
+ message += newName;
QString title = tr("Error Creating Symlink");
QMessageBox::StandardButton btn =
QMessageBox::critical(this, title, message,