Fix compile error under Qt 5.0
QStringRef::toInt() and QStringRef::toDouble() are introduced in Qt 5.1
This commit is contained in:
@@ -394,7 +394,7 @@ bool Workbook::loadFromXmlFile(QIODevice *device)
|
||||
XlsxSheetItemInfo info;
|
||||
QXmlStreamAttributes attributes = reader.attributes();
|
||||
info.name = attributes.value(QLatin1String("name")).toString();
|
||||
info.sheetId = attributes.value(QLatin1String("sheetId")).toInt();
|
||||
info.sheetId = attributes.value(QLatin1String("sheetId")).toString().toInt();
|
||||
info.rId = attributes.value(QLatin1String("r:id")).toString();
|
||||
if (attributes.hasAttribute(QLatin1String("state")))
|
||||
info.state = attributes.value(QLatin1String("state")).toString();
|
||||
@@ -410,17 +410,17 @@ bool Workbook::loadFromXmlFile(QIODevice *device)
|
||||
if (reader.name() == QLatin1String("workbookView")) {
|
||||
QXmlStreamAttributes attrs = reader.attributes();
|
||||
if (attrs.hasAttribute(QLatin1String("xWindow")))
|
||||
d->x_window = attrs.value(QLatin1String("xWindow")).toInt();
|
||||
d->x_window = attrs.value(QLatin1String("xWindow")).toString().toInt();
|
||||
if (attrs.hasAttribute(QLatin1String("yWindow")))
|
||||
d->y_window = attrs.value(QLatin1String("yWindow")).toInt();
|
||||
d->y_window = attrs.value(QLatin1String("yWindow")).toString().toInt();
|
||||
if (attrs.hasAttribute(QLatin1String("windowWidth")))
|
||||
d->window_width = attrs.value(QLatin1String("windowWidth")).toInt();
|
||||
d->window_width = attrs.value(QLatin1String("windowWidth")).toString().toInt();
|
||||
if (attrs.hasAttribute(QLatin1String("windowHeight")))
|
||||
d->window_height = attrs.value(QLatin1String("windowHeight")).toInt();
|
||||
d->window_height = attrs.value(QLatin1String("windowHeight")).toString().toInt();
|
||||
if (attrs.hasAttribute(QLatin1String("firstSheet")))
|
||||
d->firstsheet = attrs.value(QLatin1String("firstSheet")).toInt();
|
||||
d->firstsheet = attrs.value(QLatin1String("firstSheet")).toString().toInt();
|
||||
if (attrs.hasAttribute(QLatin1String("activeTab")))
|
||||
d->activesheet = attrs.value(QLatin1String("activeTab")).toInt();
|
||||
d->activesheet = attrs.value(QLatin1String("activeTab")).toString().toInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -432,7 +432,7 @@ bool Workbook::loadFromXmlFile(QIODevice *device)
|
||||
if (attrs.hasAttribute(QLatin1String("comment")))
|
||||
data.comment = attrs.value(QLatin1String("comment")).toString();
|
||||
if (attrs.hasAttribute(QLatin1String("localSheetId"))) {
|
||||
int localId = attrs.value(QLatin1String("localSheetId")).toInt();
|
||||
int localId = attrs.value(QLatin1String("localSheetId")).toString().toInt();
|
||||
int sheetId = d->sheetItemInfoList[localId].sheetId;
|
||||
data.sheetId = sheetId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user