summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtUtilities.cpp3
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