[PATCH 3/9] Make the errPrefix a static variable

Thiago Macieira thiago at macieira.org
Wed Dec 11 17:56:29 UTC 2013


No need to allocate memory for something that will show in debugging
only. Besides, qDebug() of a QString adds quotes around it, which we
can do without.

Signed-off-by: Thiago Macieira <thiago at macieira.org>
---
 qt-ui/subsurfacewebservices.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 619714d..cdf1f49 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -100,7 +100,7 @@ static void clear_table(struct dive_table *table)
 
 static char *prepare_dives_for_divelogs(const bool selected)
 {
-	const QString errPrefix("divelog.de-upload:");
+	static const char errPrefix[] = "divelog.de-upload:";
 	if (!amount_selected) {
 		qDebug() << errPrefix << "no dives selected";
 		return NULL;
-- 
1.7.11.7



More information about the subsurface mailing list