summaryrefslogtreecommitdiff
path: root/src/shared/proparser/proitems.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/proparser/proitems.h')
-rw-r--r--src/shared/proparser/proitems.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/shared/proparser/proitems.h b/src/shared/proparser/proitems.h
index 797b92b164..7680844b7d 100644
--- a/src/shared/proparser/proitems.h
+++ b/src/shared/proparser/proitems.h
@@ -32,9 +32,9 @@
#include "qmake_global.h"
-#include <QString>
-#include <QVector>
-#include <QHash>
+#include <qstring.h>
+#include <qvector.h>
+#include <qhash.h>
QT_BEGIN_NAMESPACE
@@ -77,9 +77,18 @@ public:
ProString &setSource(const ProFile *pro) { m_file = pro; return *this; }
const ProFile *sourceFile() const { return m_file; }
- ProString &operator+=(const ProString &other);
+ ProString &prepend(const ProString &other);
ProString &append(const ProString &other, bool *pending = 0);
+ ProString &append(const QString &other) { return append(ProString(other)); }
+ ProString &append(const QLatin1String other);
+ ProString &append(const char *other) { return append(QLatin1String(other)); }
+ ProString &append(QChar other);
ProString &append(const ProStringList &other, bool *pending = 0, bool skipEmpty1st = false);
+ ProString &operator+=(const ProString &other) { return append(other); }
+ ProString &operator+=(const QString &other) { return append(other); }
+ ProString &operator+=(const QLatin1String other) { return append(other); }
+ ProString &operator+=(const char *other) { return append(other); }
+ ProString &operator+=(QChar other) { return append(other); }
void chop(int n) { Q_ASSERT(n <= m_length); m_length -= n; }
void chopFront(int n) { Q_ASSERT(n <= m_length); m_offset += n; m_length -= n; }
@@ -154,7 +163,7 @@ private:
int m_offset, m_length;
const ProFile *m_file;
mutable uint m_hash;
- QChar *prepareAppend(int extraLen);
+ QChar *prepareExtend(int extraLen, int thisTarget, int extraTarget);
uint updatedHash() const;
friend uint qHash(const ProString &str);
friend QString operator+(const ProString &one, const ProString &two);
@@ -235,6 +244,7 @@ public:
{ return contains(ProString(str), cs); }
bool contains(const char *str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
};
+Q_DECLARE_TYPEINFO(ProStringList, Q_MOVABLE_TYPE);
inline ProStringList operator+(const ProStringList &one, const ProStringList &two)
{ ProStringList ret = one; ret += two; return ret; }