From kde-commits Tue Nov 08 16:22:00 2005 From: Wilco Greven Date: Tue, 08 Nov 2005 16:22:00 +0000 To: kde-commits Subject: KDE/kdelibs/kdeui Message-Id: <1131466920.970019.12496.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=113146693506728 SVN commit 478972 by wgreven: Get rid of Q3CString. Use XInternAtoms instead of two calls to XInternAtom to save a roundtrip. M +11 -5 ksharedpixmap.cpp --- trunk/KDE/kdelibs/kdeui/ksharedpixmap.cpp #478971:478972 @@ -19,7 +19,6 @@ #include #include #include -#include #ifdef Q_WS_X11 #include @@ -28,6 +27,7 @@ #include #include #include // for abs +#include #include @@ -81,10 +81,16 @@ void KSharedPixmap::init() { - d->pixmap = XInternAtom(QX11Info::display(), "PIXMAP", false); - Q3CString atom; - atom.sprintf("target prop for window %lx", static_cast(winId())); - d->target = XInternAtom(QX11Info::display(), atom.data(), false); + char pixmapName[] = "PIXMAP"; + char targetName[50]; + snprintf(targetName, 49, "target prop for window %lx", + static_cast(winId())); + char *names[2] = { pixmapName, targetName }; + + Atom atoms[2]; + XInternAtoms(QX11Info::display(), names, 2, False, atoms); + d->pixmap = atoms[0]; + d->target = atoms[1]; d->selection = None; }