Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2020-08-28 10:32:59 +0300
committerRobert Adam <dev@robert-adam.de>2020-08-31 10:59:05 +0300
commitced1fdd37cb4a6d127afe1341f1d43f76623023b (patch)
treea2932fdc10d11239309a7def40bb586ef209e6ec /src/murmur/UnixMurmur.cpp
parent407cdc95d7693b8a2d211c50fe4750637c325028 (diff)
FIX(cmake): Set QT_RESTRICTED_CAST_FROM_ASCII
With the old qmake buildsystem we used to set QT_NO_CAST_FROM_ASCII (for the Mumble client) in order to avoid problems with character encodings in our Strings. This was not done in the new cmake system yet. Instead of the aforementioned macro, this commit sets (for all targets) QT_RESTRICTED_CAST_FROM_ASCII instead in order to be able to automatically convert direct String literals to QString as these usually don't contain any problematic characters (non-ASCII) in the first place. And this allows to e.g. compare a QString against a String literal or do something like QString myString = "This is a test"; which we know to be unproblematic. Note however that (quote from Qt's docs) "Using this macro together with source strings outside the 7-bit range, non-literals, or literals with embedded NUL characters is undefined."
Diffstat (limited to 'src/murmur/UnixMurmur.cpp')
-rw-r--r--src/murmur/UnixMurmur.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/murmur/UnixMurmur.cpp b/src/murmur/UnixMurmur.cpp
index 954e4f2a5..2b2abd0ec 100644
--- a/src/murmur/UnixMurmur.cpp
+++ b/src/murmur/UnixMurmur.cpp
@@ -292,7 +292,7 @@ void UnixMurmur::setuid() {
// QDir::homePath is broken. It only looks at $HOME
// instead of getpwuid() so we have to set our home
// ourselves
- EnvUtils::setenv(QLatin1String("HOME"), qPrintable(Meta::mp.qsHome));
+ EnvUtils::setenv(QLatin1String("HOME"), Meta::mp.qsHome);
}
#endif
} else if (bRoot) {