From bb867a2213913aa0481085c408a4c261410efadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 29 Apr 2007 20:47:53 +0000 Subject: [PATCH] Merging from old trunk: r564550 | mkretz | 2006-07-20 15:11:46 +0200 (Thu, 20 Jul 2006) | 3 lines toAscii() only returns a temporary QByteArray, the QPixmap ctor would crash for me: keep the QByteArray until all three pixmaps are created svn path=/trunk/KDE/kdebase/workspace/; revision=659258 --- kcmkwin/kwinoptions/mouse.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp index afc8946a60..0a97974e88 100644 --- a/kcmkwin/kwinoptions/mouse.cpp +++ b/kcmkwin/kwinoptions/mouse.cpp @@ -44,6 +44,7 @@ #include #include +#include #include "mouse.h" #include "mouse.moc" @@ -112,13 +113,13 @@ void createMaxButtonPixmaps() "..............."}, }; - QString baseColor(". c " + KGlobalSettings::baseColor().name()); - QString textColor("# c " + KGlobalSettings::textColor().name()); + QByteArray baseColor(". c " + KGlobalSettings::baseColor().name().toAscii()); + QByteArray textColor("# c " + KGlobalSettings::textColor().name().toAscii()); for (int t = 0; t < 3; ++t) { maxButtonXpms[t][0] = "15 13 2 1"; - maxButtonXpms[t][1] = baseColor.toAscii(); - maxButtonXpms[t][2] = textColor.toAscii(); + maxButtonXpms[t][1] = baseColor.constData(); + maxButtonXpms[t][2] = textColor.constData(); maxButtonPixmaps[t] = QPixmap(maxButtonXpms[t]); maxButtonPixmaps[t].setMask(maxButtonPixmaps[t].createHeuristicMask()); }