as QChar is actually an ushort and there is no point in taking its
address.
Merge-request: 69
Change-Id: Idcc9d621e5627514ade006aa12a789a88929d48b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
19 files changed:
};
inline bool getChar(QChar *ch);
};
inline bool getChar(QChar *ch);
- inline void ungetChar(const QChar &ch);
+ inline void ungetChar(QChar ch);
NumberParsingStatus getNumber(qulonglong *l);
bool getReal(double *f);
NumberParsingStatus getNumber(qulonglong *l);
bool getReal(double *f);
-inline void QTextStreamPrivate::ungetChar(const QChar &ch)
+inline void QTextStreamPrivate::ungetChar(QChar ch)
{
if (string) {
if (stringOffset == 0)
{
if (string) {
if (stringOffset == 0)
- \fn QVariant::QVariant(const QChar &c)
+ \fn QVariant::QVariant(QChar c)
Constructs a new variant with a char value, \a c.
*/
Constructs a new variant with a char value, \a c.
*/
{ d.is_null = false; d.type = BitArray; v_construct<QBitArray>(&d, val); }
QVariant::QVariant(const QString &val)
{ d.is_null = false; d.type = String; v_construct<QString>(&d, val); }
{ d.is_null = false; d.type = BitArray; v_construct<QBitArray>(&d, val); }
QVariant::QVariant(const QString &val)
{ d.is_null = false; d.type = String; v_construct<QString>(&d, val); }
-QVariant::QVariant(const QChar &val)
+QVariant::QVariant(QChar val)
{ d.is_null = false; d.type = Char; v_construct<QChar>(&d, val); }
QVariant::QVariant(const QLatin1String &val)
{ QString str(val); d.is_null = false; d.type = String; v_construct<QString>(&d, str); }
{ d.is_null = false; d.type = Char; v_construct<QChar>(&d, val); }
QVariant::QVariant(const QLatin1String &val)
{ QString str(val); d.is_null = false; d.type = String; v_construct<QString>(&d, str); }
QVariant(const QString &string);
QVariant(const QLatin1String &string);
QVariant(const QStringList &stringlist);
QVariant(const QString &string);
QVariant(const QLatin1String &string);
QVariant(const QStringList &stringlist);
- QVariant(const QChar &qchar);
QVariant(const QDate &date);
QVariant(const QTime &time);
QVariant(const QDateTime &datetime);
QVariant(const QDate &date);
QVariant(const QTime &time);
QVariant(const QDateTime &datetime);
return false;
while (idx < l) {
return false;
while (idx < l) {
- const QChar &in = uc[idx];
+ const QChar in = uc[idx];
char out = digitToCLocale(in);
if (out == 0) {
char out = digitToCLocale(in);
if (out == 0) {
bool numberToCLocale(const QString &num,
GroupSeparatorMode group_sep_mode,
CharBuff *result) const;
bool numberToCLocale(const QString &num,
GroupSeparatorMode group_sep_mode,
CharBuff *result) const;
- inline char digitToCLocale(const QChar &c) const;
+ inline char digitToCLocale(QChar c) const;
static void updateSystemPrivate();
static void updateSystemPrivate();
-inline char QLocalePrivate::digitToCLocale(const QChar &in) const
+inline char QLocalePrivate::digitToCLocale(QChar in) const
{
const QChar _zero = zero();
const QChar _group = group();
{
const QChar _zero = zero();
const QChar _group = group();
const int len = ncName.size();
for(int i = 0; i < len; ++i)
{
const int len = ncName.size();
for(int i = 0; i < len; ++i)
{
- const QChar &at = ncName.at(i);
+ const QChar at = ncName.at(i);
if(!QXmlUtils::isNameChar(at) || at == QLatin1Char(':'))
return false;
}
if(!QXmlUtils::isNameChar(at) || at == QLatin1Char(':'))
return false;
}
-static inline bool isValidCharacterNoDash(const QChar &c)
+static inline bool isValidCharacterNoDash(QChar c)
{
register ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
{
register ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
-static inline bool isValidCharacter(const QChar &c)
+static inline bool isValidCharacter(QChar c)
{
register ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
{
register ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
|| (u == '_') || (u == '-');
}
|| (u == '_') || (u == '-');
}
-static inline bool isValidNumber(const QChar &c)
+static inline bool isValidNumber(QChar c)
{
register ushort u = c.unicode();
return (u >= '0' && u <= '9');
{
register ushort u = c.unicode();
return (u >= '0' && u <= '9');
\sa supportedWritingSystems()
*/
\sa supportedWritingSystems()
*/
-bool QRawFont::supportsCharacter(const QChar &character) const
+bool QRawFont::supportsCharacter(QChar character) const
{
return d->isValid() && d->fontEngine->canRender(&character, 1);
}
{
return d->isValid() && d->fontEngine->canRender(&character, 1);
}
QFont::HintingPreference hintingPreference);
bool supportsCharacter(quint32 ucs4) const;
QFont::HintingPreference hintingPreference);
bool supportsCharacter(quint32 ucs4) const;
- bool supportsCharacter(const QChar &character) const;
+ bool supportsCharacter(QChar character) const;
QList<QFontDatabase::WritingSystem> supportedWritingSystems() const;
QByteArray fontTable(const char *tagName) const;
QList<QFontDatabase::WritingSystem> supportedWritingSystems() const;
QByteArray fontTable(const char *tagName) const;
layout->engine()->invalidate();
}
layout->engine()->invalidate();
}
-static bool isValidBlockSeparator(const QChar &ch)
+static bool isValidBlockSeparator(QChar ch)
{
return ch == QChar::ParagraphSeparator
|| ch == QTextBeginningOfFrame
{
return ch == QChar::ParagraphSeparator
|| ch == QTextBeginningOfFrame
-int QTextDocumentPrivate::insertBlock(const QChar &blockSeparator,
+int QTextDocumentPrivate::insertBlock(QChar blockSeparator,
int pos, int blockFormat, int charFormat, QTextUndoCommand::Operation op)
{
Q_ASSERT(formats.format(blockFormat).isBlockFormat());
int pos, int blockFormat, int charFormat, QTextUndoCommand::Operation op)
{
Q_ASSERT(formats.format(blockFormat).isBlockFormat());
void insert(int pos, const QString &text, int format);
void insert(int pos, int strPos, int strLength, int format);
int insertBlock(int pos, int blockFormat, int charFormat, QTextUndoCommand::Operation = QTextUndoCommand::MoveCursor);
void insert(int pos, const QString &text, int format);
void insert(int pos, int strPos, int strLength, int format);
int insertBlock(int pos, int blockFormat, int charFormat, QTextUndoCommand::Operation = QTextUndoCommand::MoveCursor);
- int insertBlock(const QChar &blockSeparator, int pos, int blockFormat, int charFormat,
+ int insertBlock(QChar blockSeparator, int pos, int blockFormat, int charFormat,
QTextUndoCommand::Operation op = QTextUndoCommand::MoveCursor);
void move(int from, int to, int length, QTextUndoCommand::Operation = QTextUndoCommand::MoveCursor);
QTextUndoCommand::Operation op = QTextUndoCommand::MoveCursor);
void move(int from, int to, int length, QTextUndoCommand::Operation = QTextUndoCommand::MoveCursor);
-void QTextFramePrivate::fragmentAdded(const QChar &type, uint fragment)
+void QTextFramePrivate::fragmentAdded(QChar type, uint fragment)
{
if (type == QTextBeginningOfFrame) {
Q_ASSERT(!fragment_start);
{
if (type == QTextBeginningOfFrame) {
Q_ASSERT(!fragment_start);
-void QTextFramePrivate::fragmentRemoved(const QChar &type, uint fragment)
+void QTextFramePrivate::fragmentRemoved(QChar type, uint fragment)
{
Q_UNUSED(fragment); // --release warning
if (type == QTextBeginningOfFrame) {
{
Q_UNUSED(fragment); // --release warning
if (type == QTextBeginningOfFrame) {
: QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), parentFrame(0), layoutData(0)
{
}
: QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), parentFrame(0), layoutData(0)
{
}
- virtual void fragmentAdded(const QChar &type, uint fragment);
- virtual void fragmentRemoved(const QChar &type, uint fragment);
+ virtual void fragmentAdded(QChar type, uint fragment);
+ virtual void fragmentRemoved(QChar type, uint fragment);
void remove_me();
uint fragment_start;
void remove_me();
uint fragment_start;
return it - cells.begin();
}
return it - cells.begin();
}
-void QTextTablePrivate::fragmentAdded(const QChar &type, uint fragment)
+void QTextTablePrivate::fragmentAdded(QChar type, uint fragment)
{
dirty = true;
if (blockFragmentUpdates)
{
dirty = true;
if (blockFragmentUpdates)
QTextFramePrivate::fragmentAdded(type, fragment);
}
QTextFramePrivate::fragmentAdded(type, fragment);
}
-void QTextTablePrivate::fragmentRemoved(const QChar &type, uint fragment)
+void QTextTablePrivate::fragmentRemoved(QChar type, uint fragment)
{
dirty = true;
if (blockFragmentUpdates)
{
dirty = true;
if (blockFragmentUpdates)
~QTextTablePrivate();
static QTextTable *createTable(QTextDocumentPrivate *, int pos, int rows, int cols, const QTextTableFormat &tableFormat);
~QTextTablePrivate();
static QTextTable *createTable(QTextDocumentPrivate *, int pos, int rows, int cols, const QTextTableFormat &tableFormat);
- void fragmentAdded(const QChar &type, uint fragment);
- void fragmentRemoved(const QChar &type, uint fragment);
+ void fragmentAdded(QChar type, uint fragment);
+ void fragmentRemoved(QChar type, uint fragment);
- \fn char *QTest::toString(const QChar &character)
+ \fn char *QTest::toString(QChar character)
\overload
Returns a textual representation of the given \a character.
\overload
Returns a textual representation of the given \a character.
-static bool isAnsiCCharacter(const QChar& c)
+static bool isAnsiCCharacter(QChar c)
{
return (c.toUpper() >= QLatin1Char('A') && c.toUpper() <= QLatin1Char('Z'))
|| c.isDigit() || c == QLatin1Char('_');
{
return (c.toUpper() >= QLatin1Char('A') && c.toUpper() <= QLatin1Char('Z'))
|| c.isDigit() || c == QLatin1Char('_');
- const QChar &last = copy.at(len - 1);
- const QChar &secondLast = copy.at(len - 2);
+ const QChar last = copy.at(len - 1);
+ const QChar secondLast = copy.at(len - 2);
if ((last == locale.groupSeparator() || last.isSpace())
&& (secondLast == locale.groupSeparator() || secondLast.isSpace())) {
state = QValidator::Invalid;
if ((last == locale.groupSeparator() || last.isSpace())
&& (secondLast == locale.groupSeparator() || secondLast.isSpace())) {
state = QValidator::Invalid;
}
QChar passwordCharacter() const { return m_passwordCharacter; }
}
QChar passwordCharacter() const { return m_passwordCharacter; }
- void setPasswordCharacter(const QChar &character) { m_passwordCharacter = character; updateDisplayText(); }
+ void setPasswordCharacter(QChar character) { m_passwordCharacter = character; updateDisplayText(); }
Qt::LayoutDirection layoutDirection() const {
if (m_layoutDirection == Qt::LayoutDirectionAuto) {
Qt::LayoutDirection layoutDirection() const {
if (m_layoutDirection == Qt::LayoutDirectionAuto) {