doc: Build fix to QSettings documentation snippets.
The constructor taking a global color was removed in Qt 5.0.0. We need to explicitly convert to QColor before we get a QVariant. Change-Id: I821f164b8601647b062eeef57372755fa187c50c Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
51980595e1
commit
7971cf8352
@ -186,7 +186,7 @@ settings.endArray();
|
||||
|
||||
//! [17]
|
||||
QSettings settings;
|
||||
settings.setValue("fridge/color", Qt::white);
|
||||
settings.setValue("fridge/color", QColor(Qt::white));
|
||||
settings.setValue("fridge/size", QSize(32, 96));
|
||||
settings.setValue("sofa", true);
|
||||
settings.setValue("tv", false);
|
||||
@ -205,7 +205,7 @@ keys = settings.allKeys();
|
||||
|
||||
//! [19]
|
||||
QSettings settings;
|
||||
settings.setValue("fridge/color", Qt::white);
|
||||
settings.setValue("fridge/color", QColor(Qt::white));
|
||||
settings.setValue("fridge/size", QSize(32, 96));
|
||||
settings.setValue("sofa", true);
|
||||
settings.setValue("tv", false);
|
||||
@ -224,7 +224,7 @@ keys = settings.childKeys();
|
||||
|
||||
//! [21]
|
||||
QSettings settings;
|
||||
settings.setValue("fridge/color", Qt::white);
|
||||
settings.setValue("fridge/color", QColor(Qt::white));
|
||||
settings.setValue("fridge/size", QSize(32, 96));
|
||||
settings.setValue("sofa", true);
|
||||
settings.setValue("tv", false);
|
||||
|
Loading…
Reference in New Issue
Block a user