diff demos/browser/webview.d @ 80:85c59c4e5f19

remove QLatin1String and other fixes
author mandel
date Sun, 24 May 2009 15:25:41 +0000
parents 0654fc9bac95
children 5c8c9c5d9ee1
line wrap: on
line diff
--- a/demos/browser/webview.d	Sun May 24 14:05:40 2009 +0000
+++ b/demos/browser/webview.d	Sun May 24 15:25:41 2009 +0000
@@ -153,11 +153,11 @@
 			return;
 		}
 
-		auto file = new QFile(QLatin1String(":/notfound.html"));
+		auto file = new QFile(":/notfound.html");
 		bool isOpened = file.open(QIODevice.ReadOnly);
 		assert(isOpened);
 		string title = Format(tr("Error loading page: {}"), reply.url().toString());
-		string html = Format(QLatin1String(file.readAll()),
+		string html = Format(file.readAll(),
 			title,
 			reply.errorString(),
 			reply.url().toString());
@@ -167,8 +167,8 @@
 		QIcon icon = view().style().standardIcon(QStyle.SP_MessageBoxWarning, 0, view());
 		QPixmap pixmap = icon.pixmap(QSize(32,32));
 		if (pixmap.save(&imageBuffer, "PNG")) {
-			html.replace(QLatin1String("IMAGE_BINARY_DATA_HERE"),
-			QLatin1String(imageBuffer.buffer().toBase64()));
+			html.replace("IMAGE_BINARY_DATA_HERE",
+				imageBuffer.buffer().toBase64());
 		}
 
 		QWebFrame[] frames;