From 4a1c9687cff7ac7bb0521e526183d9b801070f4e Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Mon, 3 Aug 2015 10:05:55 +0200 Subject: [PATCH] Port QCursor. Use QStringLiteral --- ui/presentationwidget.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp index f9dec4a38..257dcb0b6 100644 --- a/ui/presentationwidget.cpp +++ b/ui/presentationwidget.cpp @@ -1478,18 +1478,17 @@ void PresentationWidget::togglePencilMode( bool on ) { QString colorstring = Okular::Settings::slidesPencilColor().name(); // FIXME this should not be recreated every time - QDomDocument doc( "engine" ); - QDomElement root = doc.createElement( "engine" ); - root.setAttribute( "color", colorstring ); + QDomDocument doc( QStringLiteral("engine") ); + QDomElement root = doc.createElement( QStringLiteral("engine") ); + root.setAttribute( QStringLiteral("color"), colorstring ); doc.appendChild( root ); - QDomElement annElem = doc.createElement( "annotation" ); + QDomElement annElem = doc.createElement( QStringLiteral("annotation") ); root.appendChild( annElem ); - annElem.setAttribute( "type", "Ink" ); - annElem.setAttribute( "color", colorstring ); - annElem.setAttribute( "width", "2" ); + annElem.setAttribute( QStringLiteral("type"), QStringLiteral("Ink") ); + annElem.setAttribute( QStringLiteral("color"), colorstring ); + annElem.setAttribute( QStringLiteral("width"), QStringLiteral("2") ); m_drawingEngine = new SmoothPathEngine( root ); -#pragma message("KF5 fix cursor") - // setCursor( QCursor( "pencil", Qt::ArrowCursor ) ); + setCursor( QCursor( QPixmap(QStringLiteral("pencil")), Qt::ArrowCursor ) ); } else {