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:
Robin Burchell 2013-07-04 17:30:03 +02:00 committed by The Qt Project
parent 51980595e1
commit 7971cf8352

View File

@ -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);