From b3023d2587d648b695c0ab8252491251cb1c79c6 Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Mon, 23 Nov 2009 17:30:00 -0500 Subject: [PATCH] Remove dependence on Qt/STL support. --- Source/QtDialog/QMacInstallDialog.cxx | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx index fbeb10efb..3aa509d94 100644 --- a/Source/QtDialog/QMacInstallDialog.cxx +++ b/Source/QtDialog/QMacInstallDialog.cxx @@ -33,8 +33,8 @@ QMacInstallDialog::~QMacInstallDialog() void QMacInstallDialog::DoInstall() { QDir installDir(this->Internals->InstallPrefix->text()); - std::string installTo = installDir.path().toStdString(); - if(!cmSystemTools::FileExists(installTo.c_str())) + QString installTo = installDir.path(); + if(!cmSystemTools::FileExists(installTo.toAscii().data())) { QString message = tr("Build install does not exist, " "should I create it?") @@ -47,7 +47,7 @@ void QMacInstallDialog::DoInstall() QMessageBox::Yes | QMessageBox::No); if(btn == QMessageBox::Yes) { - cmSystemTools::MakeDirectory(installTo.c_str()); + cmSystemTools::MakeDirectory(installTo.toAscii().data()); } } QDir cmExecDir(QApplication::applicationDirPath()); @@ -56,24 +56,24 @@ void QMacInstallDialog::DoInstall() for (int i = 0; i < list.size(); ++i) { QFileInfo fileInfo = list.at(i); - std::string filename = fileInfo.fileName().toStdString(); + QString filename = fileInfo.fileName(); if(filename.size() && filename[0] == '.') { continue; } - std::string file = fileInfo.absoluteFilePath().toStdString(); - std::string newName = installTo; + QString file = fileInfo.absoluteFilePath(); + QString newName = installTo; newName += "/"; newName += filename; // Remove the old files - if(cmSystemTools::FileExists(newName.c_str())) + if(cmSystemTools::FileExists(newName.toAscii().data())) { - std::cout << "rm [" << newName << "]\n"; - if(!cmSystemTools::RemoveFile(newName.c_str())) + std::cout << "rm [" << newName.toAscii().data() << "]\n"; + if(!cmSystemTools::RemoveFile(newName.toAscii().data())) { QString message = tr("Failed to remove file " "installation may be incomplete: "); - message += newName.c_str(); + message += newName.toAscii().data(); QString title = tr("Error Removing file"); QMessageBox::StandardButton btn = QMessageBox::critical(this, title, message, @@ -84,14 +84,14 @@ void QMacInstallDialog::DoInstall() } } } - std::cout << "ln -s [" << file << "] ["; - std::cout << newName << "]\n"; - if(!cmSystemTools::CreateSymlink(file.c_str(), - newName.c_str())) + std::cout << "ln -s [" << file.toAscii().data() << "] ["; + std::cout << newName.toAscii().data() << "]\n"; + if(!cmSystemTools::CreateSymlink(file.toAscii().data(), + newName.toAscii().data())) { QString message = tr("Failed create symlink " "installation may be incomplete: "); - message += newName.c_str(); + message += newName.toAscii().data(); QString title = tr("Error Creating Symlink"); QMessageBox::StandardButton btn = QMessageBox::critical(this, title, message,