diff options
author | Tobias Markmann <tm@ayena.de> | 2014-08-01 13:16:10 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-08-01 17:15:43 (GMT) |
commit | bf506a6670fc21f6f84a8303c540e49f5edb65fb (patch) | |
tree | 2337b393128b412b8100de62c78a1d72282ecc6b /Swift/QtUI | |
parent | 4af098dacb3cedfb269c2443c5e1eeb76f1de82f (diff) | |
download | swift-bf506a6670fc21f6f84a8303c540e49f5edb65fb.zip swift-bf506a6670fc21f6f84a8303c540e49f5edb65fb.tar.bz2 |
Fix issue in QtUtilities reported by ASAN.
Change-Id: I3e7d65efb4b66897abf735eb9f759122fdf50b89
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtUtilities.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/QtUI/QtUtilities.cpp b/Swift/QtUI/QtUtilities.cpp index 5ae1b13..0fe2bf2 100644 --- a/Swift/QtUI/QtUtilities.cpp +++ b/Swift/QtUI/QtUtilities.cpp @@ -23,7 +23,8 @@ void setX11Resource(QWidget* widget, const QString& c) { #if defined (Q_OS_UNIX) && !defined(Q_OS_MAC) char res_class[] = SWIFT_APPLICATION_NAME; XClassHint hint; - hint.res_name = (QString(SWIFT_APPLICATION_NAME) + "-" + c).toUtf8().data(); + QByteArray resName = (QString(SWIFT_APPLICATION_NAME) + "-" + c).toUtf8(); + hint.res_name = resName.data(); hint.res_class = res_class; XSetClassHint(widget->x11Info().display(), widget->winId(), &hint); #else |