Use QStringBuilder more
Change-Id: If5283e364e921d99ffa7a8fa1abb07356a4a2682 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>bb10
parent
cc4f610c21
commit
f901afaf49
|
|
@ -425,8 +425,7 @@ QMacSettingsPrivate::QMacSettingsPrivate(QSettings::Scope scope, const QString &
|
|||
suiteId = javaPackageName;
|
||||
|
||||
if (!application.isEmpty()) {
|
||||
javaPackageName += QLatin1Char('.');
|
||||
javaPackageName += application;
|
||||
javaPackageName += QLatin1Char('.') + application;
|
||||
applicationId = javaPackageName;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -986,8 +986,8 @@ QString QSqlTableModel::orderByClause() const
|
|||
|
||||
//we can safely escape the field because it would have been obtained from the database
|
||||
//and have the correct case
|
||||
QString field = d->db.driver()->escapeIdentifier(f.name(), QSqlDriver::FieldName);
|
||||
field.prepend(QLatin1Char('.')).prepend(d->tableName);
|
||||
QString field = d->tableName + QLatin1Char('.')
|
||||
+ d->db.driver()->escapeIdentifier(f.name(), QSqlDriver::FieldName);
|
||||
field = d->sortOrder == Qt::AscendingOrder ? Sql::asc(field) : Sql::desc(field);
|
||||
return Sql::orderBy(field);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,10 +48,11 @@ namespace {
|
|||
// Fixup an enumeration name from class Qt.
|
||||
// They are currently stored as "BottomToolBarArea" instead of "Qt::BottomToolBarArea".
|
||||
// due to MO issues. This might be fixed in the future.
|
||||
void fixQtEnumerationName(QString& name) {
|
||||
QLatin1String qtEnumerationPrefix(const QString &name) {
|
||||
static const QLatin1String prefix("Qt::");
|
||||
if (name.indexOf(prefix) != 0)
|
||||
name.prepend(prefix);
|
||||
return prefix;
|
||||
return QLatin1String();
|
||||
}
|
||||
// figure out the toolbar area of a DOM attrib list.
|
||||
// By legacy, it is stored as an integer. As of 4.3.0, it is the enumeration value.
|
||||
|
|
@ -62,16 +63,12 @@ namespace {
|
|||
|
||||
switch (pstyle->kind()) {
|
||||
case DomProperty::Number: {
|
||||
QString area = QLatin1String("static_cast<Qt::ToolBarArea>(");
|
||||
area += QString::number(pstyle->elementNumber());
|
||||
area += QLatin1String("), ");
|
||||
return area;
|
||||
return QLatin1String("static_cast<Qt::ToolBarArea>(")
|
||||
+ QString::number(pstyle->elementNumber()) + QLatin1String("), ");
|
||||
}
|
||||
case DomProperty::Enum: {
|
||||
QString area = pstyle->elementEnum();
|
||||
fixQtEnumerationName(area);
|
||||
area += QLatin1String(", ");
|
||||
return area;
|
||||
const QString area = pstyle->elementEnum();
|
||||
return qtEnumerationPrefix(area) + area + QLatin1String(", ");
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue