diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-25 13:22:42 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-25 13:22:42 (GMT) |
commit | c9d08ae246029ea06568c3cd02c7c1716deb40a4 (patch) | |
tree | 27f1b30cde76da4c5b8d53183ffa932c355c1607 /src | |
parent | 9293b591c720d2021be15b3bed56633d2ac17a8d (diff) |
Ported QString replace to boost::regex
Diffstat (limited to 'src')
-rw-r--r-- | src/handle_dep.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handle_dep.cc b/src/handle_dep.cc index 99a0df7..da95a67 100644 --- a/src/handle_dep.cc +++ b/src/handle_dep.cc @@ -1,10 +1,10 @@ #include "handle_dep.h" #include <string> #include <sstream> -#include <QString> #include <stdlib.h> // for system() #include <boost/unordered_set.hpp> #include <boost/foreach.hpp> +#include <boost/regex.hpp> #include <boost/filesystem.hpp> using namespace boost::filesystem; @@ -22,7 +22,7 @@ void handle_dep(const std::string &filename) } if (!exists(filepath) && make_command) { std::stringstream buf; - buf << make_command << " '" << QString::fromStdString(filename).replace("'", "'\\''").toUtf8().data() << "'"; + buf << make_command << " '" << boost::regex_replace(filename, boost::regex("'"), "'\\''") << "'"; system(buf.str().c_str()); // FIXME: Handle error } } |