summaryrefslogtreecommitdiff
path: root/src/location/places
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-12-20 13:25:16 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-20 06:07:50 +0100
commit651acf953b374ae7feadaf4db6be85e8c411c1cb (patch)
tree667070abc5c156ff9de087a66fcf756428211ebc /src/location/places
parentb695a8b97a3dd77921d57c30a90f122a85d72278 (diff)
downloadqtlocation-651acf953b374ae7feadaf4db6be85e8c411c1cb.tar.gz
Replace use of QLatin1Constant with QStringLiteral.
Change-Id: I8f9fa805d7edfefd783788ea78ad824715041982 Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'src/location/places')
-rw-r--r--src/location/places/qplaceattribute.cpp4
-rw-r--r--src/location/places/qplaceattribute.h11
-rw-r--r--src/location/places/qplacecontactdetail.cpp8
-rw-r--r--src/location/places/qplacecontactdetail.h16
4 files changed, 12 insertions, 27 deletions
diff --git a/src/location/places/qplaceattribute.cpp b/src/location/places/qplaceattribute.cpp
index 542edf2f..934fbd0e 100644
--- a/src/location/places/qplaceattribute.cpp
+++ b/src/location/places/qplaceattribute.cpp
@@ -103,13 +103,13 @@ bool QPlaceAttributePrivate::operator== (const QPlaceAttributePrivate &other) co
\variable QPlaceAttribute::OpeningHours
The constant to specify an opening hours attribute.
*/
-Q_DEFINE_LATIN1_CONSTANT(QPlaceAttribute::OpeningHours, "openingHours");
+const QString QPlaceAttribute::OpeningHours(QStringLiteral("openingHours"));
/*!
\variable QPlaceAttribute::Payment
The constant to specify an attribute that defines the methods of payment.
*/
-Q_DEFINE_LATIN1_CONSTANT(QPlaceAttribute::Payment, "payment");
+const QString QPlaceAttribute::Payment(QStringLiteral("payment"));
/*!
Constructs an attribute.
diff --git a/src/location/places/qplaceattribute.h b/src/location/places/qplaceattribute.h
index 906137b9..be89138f 100644
--- a/src/location/places/qplaceattribute.h
+++ b/src/location/places/qplaceattribute.h
@@ -46,8 +46,6 @@
#include <QVariant>
#include <QSharedDataPointer>
-#include <qlatin1constant.h>
-
#include <QtLocation/qlocationglobal.h>
QT_BEGIN_HEADER
@@ -60,13 +58,8 @@ class QPlaceAttributePrivate;
class Q_LOCATION_EXPORT QPlaceAttribute
{
public:
-#ifdef Q_QDOC
- static const QLatin1Constant OpeningHours;
- static const QLatin1Constant Payment;
-#else
- Q_DECLARE_LATIN1_CONSTANT(OpeningHours, "openingHours");
- Q_DECLARE_LATIN1_CONSTANT(Payment, "payment");
-#endif
+ static const QString OpeningHours;
+ static const QString Payment;
QPlaceAttribute();
QPlaceAttribute(const QPlaceAttribute &other);
diff --git a/src/location/places/qplacecontactdetail.cpp b/src/location/places/qplacecontactdetail.cpp
index 11813c90..7d3b7aa9 100644
--- a/src/location/places/qplacecontactdetail.cpp
+++ b/src/location/places/qplacecontactdetail.cpp
@@ -94,25 +94,25 @@ types if necessary.
\variable QPlaceContactDetail::Phone
The constant to specify phone contact details
*/
-Q_DEFINE_LATIN1_CONSTANT(QPlaceContactDetail::Phone, "phone");
+const QString QPlaceContactDetail::Phone(QStringLiteral("phone"));
/*!
\variable QPlaceContactDetail::Email
The constant to specify email contact details.
*/
-Q_DEFINE_LATIN1_CONSTANT(QPlaceContactDetail::Email, "email");
+const QString QPlaceContactDetail::Email(QStringLiteral("email"));
/*!
\variable QPlaceContactDetail::Website
The constant used to specify website contact details.
*/
-Q_DEFINE_LATIN1_CONSTANT(QPlaceContactDetail::Website, "website");
+const QString QPlaceContactDetail::Website(QStringLiteral("website"));
/*!
\variable QPlaceContactDetail::Fax
The constant used to specify fax contact details.
*/
-Q_DEFINE_LATIN1_CONSTANT(QPlaceContactDetail::Fax, "fax");
+const QString QPlaceContactDetail::Fax(QStringLiteral("fax"));
/*!
Constructs a contact detail.
diff --git a/src/location/places/qplacecontactdetail.h b/src/location/places/qplacecontactdetail.h
index 1b9d567f..444f58d6 100644
--- a/src/location/places/qplacecontactdetail.h
+++ b/src/location/places/qplacecontactdetail.h
@@ -45,7 +45,6 @@
#include <QString>
#include <QVariant>
#include <QSharedDataPointer>
-#include <QLatin1Constant>
#include <QtLocation/qlocationglobal.h>
@@ -57,17 +56,10 @@ class QPlaceContactDetailPrivate;
class Q_LOCATION_EXPORT QPlaceContactDetail
{
public:
-#ifdef Q_QDOC
- static const QLatin1Constant Phone;
- static const QLatin1Constant Email;
- static const QLatin1Constant Website;
- static const QLatin1Constant Fax;
-#else
- Q_DECLARE_LATIN1_CONSTANT(Phone, "phone");
- Q_DECLARE_LATIN1_CONSTANT(Email, "email");
- Q_DECLARE_LATIN1_CONSTANT(Website, "website");
- Q_DECLARE_LATIN1_CONSTANT(Fax, "fax");
-#endif
+ static const QString Phone;
+ static const QString Email;
+ static const QString Website;
+ static const QString Fax;
QPlaceContactDetail();
QPlaceContactDetail(const QPlaceContactDetail &other);