Commit fa66a540 authored by hjk's avatar hjk Committed by hjk
Browse files

fix C++11 string literal incompatibility



Change-Id: Ie5d484ba7078f29eae6636d01e1d99e3e45d1a45
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 09f56a5c
......@@ -1336,8 +1336,8 @@ static void qDumpQDateTime(QDumper &d)
# if 0
d.beginHash();
d.putItem("name", "toUTC");
d.putItem("exp", "(("NSX"QDateTime"NSY"*)").put(d.data).put(")"
"->toTimeSpec('"NS"Qt::UTC')");
d.putItem("exp", "((" NSX "QDateTime" NSY "*)").put(d.data).put(")"
"->toTimeSpec('" NS "Qt::UTC')");
d.putItem("type", NS"QDateTime");
d.putItem("numchild", "1");
d.endHash();
......@@ -1346,8 +1346,8 @@ static void qDumpQDateTime(QDumper &d)
# if 0
d.beginHash();
d.putItem("name", "toLocalTime");
d.putItem("exp", "(("NSX"QDateTime"NSY"*)").put(d.data).put(")"
"->toTimeSpec('"NS"Qt::LocalTime')");
d.putItem("exp", "((" NSX "QDateTime" NSY "*)").put(d.data).put(")"
"->toTimeSpec('" NS "Qt::LocalTime')");
d.putItem("type", NS"QDateTime");
d.putItem("numchild", "1");
d.endHash();
......@@ -1461,7 +1461,7 @@ static void qDumpQFileInfo(QDumper &d)
d.putItem("value", info.created().toString());
d.putItem("valueencoded", "2");
d.beginItem("exp");
d.put("(("NSX"QFileInfo"NSY"*)").put(d.data).put(")->created()");
d.put("((" NSX "QFileInfo" NSY "*)").put(d.data).put(")->created()");
d.endItem();
d.putItem("type", NS"QDateTime");
d.putItem("numchild", "1");
......@@ -1472,7 +1472,7 @@ static void qDumpQFileInfo(QDumper &d)
d.putItem("value", info.lastModified().toString());
d.putItem("valueencoded", "2");
d.beginItem("exp");
d.put("(("NSX"QFileInfo"NSY"*)").put(d.data).put(")->lastModified()");
d.put("((" NSX "QFileInfo" NSY "*)").put(d.data).put(")->lastModified()");
d.endItem();
d.putItem("type", NS"QDateTime");
d.putItem("numchild", "1");
......@@ -1483,7 +1483,7 @@ static void qDumpQFileInfo(QDumper &d)
d.putItem("value", info.lastRead().toString());
d.putItem("valueencoded", "2");
d.beginItem("exp");
d.put("(("NSX"QFileInfo"NSY"*)").put(d.data).put(")->lastRead()");
d.put("((" NSX "QFileInfo" NSY "*)").put(d.data).put(")->lastRead()");
d.endItem();
d.putItem("type", NS"QDateTime");
d.putItem("numchild", "1");
......@@ -1826,28 +1826,28 @@ static void qDumpQLocale(QDumper &d)
d.beginHash();
d.putItem("name", "country");
d.beginItem("exp");
d.put("(("NSX"QLocale"NSY"*)").put(d.data).put(")->country()");
d.put("((" NSX "QLocale" NSY "*)").put(d.data).put(")->country()");
d.endItem();
d.endHash();
d.beginHash();
d.putItem("name", "language");
d.beginItem("exp");
d.put("(("NSX"QLocale"NSY"*)").put(d.data).put(")->language()");
d.put("((" NSX "QLocale" NSY "*)").put(d.data).put(")->language()");
d.endItem();
d.endHash();
d.beginHash();
d.putItem("name", "measurementSystem");
d.beginItem("exp");
d.put("(("NSX"QLocale"NSY"*)").put(d.data).put(")->measurementSystem()");
d.put("((" NSX "QLocale" NSY "*)").put(d.data).put(")->measurementSystem()");
d.endItem();
d.endHash();
d.beginHash();
d.putItem("name", "numberOptions");
d.beginItem("exp");
d.put("(("NSX"QLocale"NSY"*)").put(d.data).put(")->numberOptions()");
d.put("((" NSX "QLocale" NSY "*)").put(d.data).put(")->numberOptions()");
d.endItem();
d.endHash();
......@@ -1963,7 +1963,7 @@ static void qDumpQMap(QDumper &d)
d.put(valueType).put(" >");
d.endItem();
d.beginItem("exp");
d.put("*('"NS"QMapData::Node<").put(keyType).put(",");
d.put("*('" NS "QMapData::Node<").put(keyType).put(",");
d.put(valueType).put(" >'*)").put(node);
d.endItem();
#endif
......@@ -2010,7 +2010,7 @@ static void qDumpQModelIndex(QDumper &d)
d.put("<invalid>");
d.endItem();
d.beginItem("exp");
d.put("(("NSX"QModelIndex"NSY"*)").put(d.data).put(")->parent()");
d.put("((" NSX "QModelIndex" NSY "*)").put(d.data).put(")->parent()");
d.endItem();
d.putItem("type", NS"QModelIndex");
d.putItem("numchild", "1");
......@@ -2154,7 +2154,7 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
break;
# if QT_VERSION >= 0x040500
case QVariant::StringList:
*exp = QString(QLatin1String("(*('"NS"QStringList'*)%1)"))
*exp = QString(QLatin1String("(*('" NS "QStringList'*)%1)"))
.arg((quintptr)v);
*numchild = v->toStringList().size();
break;
......@@ -2232,11 +2232,11 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
# endif
default: {
static const char *qTypeFormat = sizeof(void *) == sizeof(long)
? "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%lx)"
: "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%llx)";
? "'" NS "%s " NS "qVariantValue<" NS "%s >'(*('" NS "QVariant'*)0x%lx)"
: "'" NS "%s " NS "qVariantValue<" NS "%s >'(*('" NS "QVariant'*)0x%llx)";
static const char *nonQTypeFormat = sizeof(void *) == sizeof(long)
? "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%lx)"
: "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%llx)";
? "'%s " NS "qVariantValue<%s >'(*('" NS "QVariant'*)0x%lx)"
: "'%s " NS "qVariantValue<%s >'(*('" NS "QVariant'*)0x%llx)";
char buf[1000];
const char *format = (v->typeName()[0] == 'Q') ? qTypeFormat : nonQTypeFormat;
qsnprintf(buf, sizeof(buf) - 1, format, v->typeName(), v->typeName(), v);
......@@ -2852,8 +2852,8 @@ static void qDumpQSet(QDumper &d)
d.beginHash();
d.putItem("type", d.innerType);
d.beginItem("exp");
d.put("(('"NS"QHashNode<").put(d.innerType
).put(","NS"QHashDummyValue>'*)"
d.put("(('" NS "QHashNode<").put(d.innerType
).put("," NS "QHashDummyValue>'*)"
).put(static_cast<const void*>(node)).put(")->key");
d.endItem();
d.endHash();
......@@ -3646,58 +3646,58 @@ void *qDumpObjectData440(
// They are mentioned here nevertheless. For types that are not listed
// here, dumpers won't be used.
d.put("dumpers=["
"\""NS"QAbstractItem\","
"\""NS"QAbstractItemModel\","
"\""NS"QByteArray\","
"\""NS"QChar\","
"\""NS"QDate\","
"\""NS"QDateTime\","
"\""NS"QDir\","
"\""NS"QFile\","
"\""NS"QFileInfo\","
"\""NS"QHash\","
"\""NS"QHashNode\","
"\""NS"QImage\","
//"\""NS"QImageData\","
"\""NS"QLinkedList\","
"\""NS"QList\","
"\""NS"QLocale\","
"\""NS"QMap\","
"\""NS"QMapNode\","
"\""NS"QModelIndex\","
"\""NS"QObject\","
"\""NS"QObjectMethodList\"," // hack to get nested properties display
"\""NS"QObjectProperty\","
"\""NS"QObjectPropertyList\","
"\""NS"QObjectSignal\","
"\""NS"QObjectSignalList\","
"\""NS"QObjectSlot\","
"\""NS"QObjectSlotList\","
"\""NS"QObjectChildList\","
"\""NS"QPoint\","
"\""NS"QPointF\","
"\""NS"QRect\","
"\""NS"QRectF\","
//"\""NS"QRegion\","
"\""NS"QSet\","
"\""NS"QSize\","
"\""NS"QSizeF\","
"\""NS"QStack\","
"\""NS"QString\","
"\""NS"QStringList\","
"\""NS"QTextCodec\","
"\""NS"QTime\","
"\""NS"QVariant\","
"\""NS"QVariantList\","
"\""NS"QVector\","
"\"" NS "QAbstractItem\","
"\"" NS "QAbstractItemModel\","
"\"" NS "QByteArray\","
"\"" NS "QChar\","
"\"" NS "QDate\","
"\"" NS "QDateTime\","
"\"" NS "QDir\","
"\"" NS "QFile\","
"\"" NS "QFileInfo\","
"\"" NS "QHash\","
"\"" NS "QHashNode\","
"\"" NS "QImage\","
//"\"" NS "QImageData\","
"\"" NS "QLinkedList\","
"\"" NS "QList\","
"\"" NS "QLocale\","
"\"" NS "QMap\","
"\"" NS "QMapNode\","
"\"" NS "QModelIndex\","
"\"" NS "QObject\","
"\"" NS "QObjectMethodList\"," // hack to get nested properties display
"\"" NS "QObjectProperty\","
"\"" NS "QObjectPropertyList\","
"\"" NS "QObjectSignal\","
"\"" NS "QObjectSignalList\","
"\"" NS "QObjectSlot\","
"\"" NS "QObjectSlotList\","
"\"" NS "QObjectChildList\","
"\"" NS "QPoint\","
"\"" NS "QPointF\","
"\"" NS "QRect\","
"\"" NS "QRectF\","
//"\"" NS "QRegion\","
"\"" NS "QSet\","
"\"" NS "QSize\","
"\"" NS "QSizeF\","
"\"" NS "QStack\","
"\"" NS "QString\","
"\"" NS "QStringList\","
"\"" NS "QTextCodec\","
"\"" NS "QTime\","
"\"" NS "QVariant\","
"\"" NS "QVariantList\","
"\"" NS "QVector\","
#if QT_VERSION >= 0x040500
"\""NS"QMultiMap\","
"\""NS"QSharedPointer\","
"\""NS"QWeakPointer\","
"\"" NS "QMultiMap\","
"\"" NS "QSharedPointer\","
"\"" NS "QWeakPointer\","
#endif
#if USE_QT_GUI
"\""NS"QPixmap\","
"\""NS"QWidget\","
"\"" NS "QPixmap\","
"\"" NS "QWidget\","
#endif
#ifdef Q_OS_WIN
"\"basic_string\","
......@@ -3720,7 +3720,7 @@ void *qDumpObjectData440(
"\"").put(((QT_VERSION >> 16) & 255)).put("\","
"\"").put(((QT_VERSION >> 8) & 255)).put("\","
"\"").put(((QT_VERSION) & 255)).put("\"]");
d.put(",namespace=\""NS"\",");
d.put(",namespace=\"" NS "\",");
d.put("dumperversion=\"1.3\",");
d.disarm();
}
......
......@@ -69,11 +69,11 @@ QSet<QString> BazaarEditor::annotationChanges() const
if (txt.isEmpty())
return changes;
QRegExp changeNumRx(QLatin1String("^("BZR_CHANGE_PATTERN") "));
QRegExp changeNumRx(QLatin1String("^(" BZR_CHANGE_PATTERN ") "));
QTC_ASSERT(changeNumRx.isValid(), return changes);
if (changeNumRx.indexIn(txt) != -1) {
changes.insert(changeNumRx.cap(1));
changeNumRx.setPattern(QLatin1String("\n("BZR_CHANGE_PATTERN") "));
changeNumRx.setPattern(QLatin1String("\n(" BZR_CHANGE_PATTERN ") "));
QTC_ASSERT(changeNumRx.isValid(), return changes);
int pos = 0;
while ((pos = changeNumRx.indexIn(txt, pos)) != -1) {
......
......@@ -48,13 +48,13 @@ namespace Internal {
// Match a CVS revision ("1.1.1.1")
#define CVS_REVISION_PATTERN "[\\d\\.]+"
#define CVS_REVISION_AT_START_PATTERN "^("CVS_REVISION_PATTERN") "
#define CVS_REVISION_AT_START_PATTERN "^(" CVS_REVISION_PATTERN ") "
CVSEditor::CVSEditor(const VCSBase::VCSBaseEditorParameters *type,
QWidget *parent) :
VCSBase::VCSBaseEditorWidget(type, parent),
m_revisionAnnotationPattern(QLatin1String(CVS_REVISION_AT_START_PATTERN".*$")),
m_revisionLogPattern(QLatin1String("^revision *("CVS_REVISION_PATTERN")$"))
m_revisionLogPattern(QLatin1String("^revision *(" CVS_REVISION_PATTERN ")$"))
{
QTC_ASSERT(m_revisionAnnotationPattern.isValid(), return);
QTC_ASSERT(m_revisionLogPattern.isValid(), return);
......@@ -72,7 +72,7 @@ QSet<QString> CVSEditor::annotationChanges() const
QTC_ASSERT(r.isValid(), return changes);
if (r.indexIn(txt) != -1) {
changes.insert(r.cap(1));
r.setPattern(QLatin1String("\n("CVS_REVISION_PATTERN") "));
r.setPattern(QLatin1String("\n(" CVS_REVISION_PATTERN ") "));
QTC_ASSERT(r.isValid(), return changes);
int pos = 0;
while ((pos = r.indexIn(txt, pos)) != -1) {
......
......@@ -442,7 +442,7 @@ CdbEngine::CdbEngine(const DebuggerStartParameters &sp,
m_specialStopMode(NoSpecialStop),
m_nextCommandToken(0),
m_currentBuiltinCommandIndex(-1),
m_extensionCommandPrefixBA("!"QT_CREATOR_CDB_EXT"."),
m_extensionCommandPrefixBA("!" QT_CREATOR_CDB_EXT "."),
m_operateByInstructionPending(true),
m_operateByInstruction(true), // Default CDB setting
m_notifyEngineShutdownOnTermination(false),
......@@ -573,7 +573,7 @@ QString CdbEngine::extensionLibraryName(bool is64Bit)
// Determine extension lib name and path to use
QString rc;
QTextStream(&rc) << QFileInfo(QCoreApplication::applicationDirPath()).path()
<< "/lib/" << (is64Bit ? QT_CREATOR_CDB_EXT"64" : QT_CREATOR_CDB_EXT"32")
<< "/lib/" << (is64Bit ? QT_CREATOR_CDB_EXT "64" : QT_CREATOR_CDB_EXT "32")
<< '/' << QT_CREATOR_CDB_EXT << ".dll";
return rc;
}
......
......@@ -80,11 +80,11 @@ QSet<QString> GitEditor::annotationChanges() const
if (txt.isEmpty())
return changes;
// Hunt for first change number in annotation: "<change>:"
QRegExp r(QLatin1String("^("CHANGE_PATTERN_8C") "));
QRegExp r(QLatin1String("^(" CHANGE_PATTERN_8C ") "));
QTC_ASSERT(r.isValid(), return changes);
if (r.indexIn(txt) != -1) {
changes.insert(r.cap(1));
r.setPattern(QLatin1String("\n("CHANGE_PATTERN_8C") "));
r.setPattern(QLatin1String("\n(" CHANGE_PATTERN_8C ") "));
QTC_ASSERT(r.isValid(), return changes);
int pos = 0;
while ((pos = r.indexIn(txt, pos)) != -1) {
......
......@@ -43,18 +43,18 @@
#define LIBRARY_MACRO_VARIABLE "<LIBRARY_MACRO>"
static const char *globalHeaderContentsC =
"#ifndef "GUARD_VARIABLE"\n"
"#define "GUARD_VARIABLE"\n"
"#ifndef " GUARD_VARIABLE "\n"
"#define " GUARD_VARIABLE "\n"
"\n"
"#include <QtCore/qglobal.h>\n"
"\n"
"#if defined("LIBRARY_MACRO_VARIABLE")\n"
"# define "EXPORT_MACRO_VARIABLE" Q_DECL_EXPORT\n"
"#if defined(" LIBRARY_MACRO_VARIABLE ")\n"
"# define " EXPORT_MACRO_VARIABLE " Q_DECL_EXPORT\n"
"#else\n"
"# define "EXPORT_MACRO_VARIABLE" Q_DECL_IMPORT\n"
"# define " EXPORT_MACRO_VARIABLE " Q_DECL_IMPORT\n"
"#endif\n"
"\n"
"#endif // "GUARD_VARIABLE"\n";
"#endif // " GUARD_VARIABLE "\n";
namespace Qt4ProjectManager {
namespace Internal {
......
This diff is collapsed.
This diff is collapsed.
......@@ -42,7 +42,7 @@
#include <cstdio>
static const char usageC[] =
"\n%1 v0.1 built "__DATE__"\n\n"
"\n%1 v0.1 built " __DATE__ "\n\n"
"Test client for Symbian CODA\n\n"
"Usage:\n"
"%1 ping connection Note: For serial connections ONLY.\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment