summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurfaceformat.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2013-11-07 10:44:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-07 18:00:28 +0100
commit560d33ad0489aab17799ab5166ebadf9150d680a (patch)
tree59a79c334936f350317d174c189af5ef99f23232 /src/gui/kernel/qsurfaceformat.h
parent18bb8d6b16548c669f8dfe33a865f7f1cff80e1d (diff)
Introduce proper QSurfaceFormat's setters/testers for format options
Fixes several things * setOption(options) has the wrong name (singular) * setOption(options) doesn't set the current options to the argument, but ORs the current options with the argument and sets the result * testOption(options) has the wrong name The old methods get deprecated, and new methods and overloads get introduced here. Old code behavior is thereby preserved. Change-Id: I51bba49f22810c80e6b4980892600d616503af6b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/kernel/qsurfaceformat.h')
-rw-r--r--src/gui/kernel/qsurfaceformat.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qsurfaceformat.h b/src/gui/kernel/qsurfaceformat.h
index 7c3c846df3..d182aa9f13 100644
--- a/src/gui/kernel/qsurfaceformat.h
+++ b/src/gui/kernel/qsurfaceformat.h
@@ -127,8 +127,13 @@ public:
bool stereo() const;
void setStereo(bool enable);
- void setOption(QSurfaceFormat::FormatOptions opt);
- bool testOption(QSurfaceFormat::FormatOptions opt) const;
+ QT_DEPRECATED void setOption(QSurfaceFormat::FormatOptions opt);
+ QT_DEPRECATED bool testOption(QSurfaceFormat::FormatOptions opt) const;
+
+ void setOptions(QSurfaceFormat::FormatOptions options);
+ void setOption(FormatOption option, bool on = true);
+ bool testOption(FormatOption option) const;
+ QSurfaceFormat::FormatOptions options() const;
private:
QSurfaceFormatPrivate *d;