summaryrefslogtreecommitdiff
path: root/src/env.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2021-12-06 03:51:08 -0600
committerMikaƫl Capelle <capelle.mikael@gmail.com>2022-04-19 15:17:23 +0200
commitc4b2be45d29a247422e60bb8fdf1664c10384eee (patch)
tree729640dc3e5105fe6eea04a5a03451176fc91a7e /src/env.cpp
parentec01532ecbd2d7c99d1b3bdd8cf261795df59327 (diff)
First pass for Qt6 compatibility
Diffstat (limited to 'src/env.cpp')
-rw-r--r--src/env.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/env.cpp b/src/env.cpp
index 4f4bc555..818ce8fb 100644
--- a/src/env.cpp
+++ b/src/env.cpp
@@ -801,7 +801,7 @@ std::pair<QString, QString> splitExeAndArguments(const QString& cmd)
}
} else {
// no double-quotes, find the first whitespace
- exeEnd = cmd.indexOf(QRegExp("\\s"));
+ exeEnd = cmd.indexOf(QRegularExpression("\\s"));
if (exeEnd == -1) {
exeEnd = cmd.size();
}
@@ -844,7 +844,7 @@ Association getAssociation(const QFileInfo& targetInfo)
log::debug("split into exe='{}' and cmd='{}'", p.first, p.second);
- return {p.first, *cmd, p.second};
+ return {QFileInfo(p.first), *cmd, p.second};
}
@@ -1108,7 +1108,7 @@ DWORD findOtherPid()
// going through processes, trying to find one with the same name and a
// different pid than this process has
for (const auto& p : processes) {
- if (p.name() == filename) {
+ if (p.name().toStdWString() == filename) {
if (p.pid() != thisPid) {
return p.pid();
}