From b9fc8bc10f20a0d106db5dd579669cd88b250472 Mon Sep 17 00:00:00 2001 From: John Layt Date: Sun, 20 May 2012 20:38:21 +0100 Subject: SIC: QPrintSupport - Remove options api from QPageSetupDialog QPageSetupDialog has an enum PageSetupDialogOption, however one option had support removed in Qt 4.5 and the remaining 2 are actually for an internal implementation detail that could lead to memory leaks if changed by an app. This change removes the enum and the api as they is now useless. Change-Id: I9a3ab689dcab57151de894db5ebf22f6ad90d71e Reviewed-by: Lars Knoll Reviewed-by: John Layt --- src/printsupport/dialogs/qpagesetupdialog.cpp | 112 -------------------------- 1 file changed, 112 deletions(-) (limited to 'src/printsupport/dialogs/qpagesetupdialog.cpp') diff --git a/src/printsupport/dialogs/qpagesetupdialog.cpp b/src/printsupport/dialogs/qpagesetupdialog.cpp index 53b304df9e..3c3362c550 100644 --- a/src/printsupport/dialogs/qpagesetupdialog.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog.cpp @@ -97,118 +97,6 @@ class QPageSetupDialogPrivate : public QAbstractPageSetupDialogPrivate { }; -/*! - \enum QPageSetupDialog::PageSetupDialogOption - \since 4.4 - - Used to specify options to the page setup dialog - - This value is obsolete and does nothing since Qt 4.5: - - \value DontUseSheet In previous versions of QDialog::exec() the - page setup dialog would create a sheet by default if the dialog - was given a parent. This is no longer supported from Qt 4.5. If - you want to use sheets, use QPageSetupDialog::open() instead. - - \omitvalue None - \omitvalue OwnsPrinter -*/ - -/*! - Sets the given \a option to be enabled if \a on is true; - otherwise, clears the given \a option. - - \sa options, testOption() -*/ -void QPageSetupDialog::setOption(PageSetupDialogOption option, bool on) -{ - Q_D(QPageSetupDialog); - if (!(d->opts & option) != !on) - setOptions(d->opts ^ option); -} - -/*! - Returns true if the given \a option is enabled; otherwise, returns - false. - - \sa options, setOption() -*/ -bool QPageSetupDialog::testOption(PageSetupDialogOption option) const -{ - Q_D(const QPageSetupDialog); - return (d->opts & option) != 0; -} - -/*! - \property QPageSetupDialog::options - \brief the various options that affect the look and feel of the dialog - \since 4.5 - - By default, all options are disabled. - - Options should be set before showing the dialog. Setting them while the - dialog is visible is not guaranteed to have an immediate effect on the - dialog (depending on the option and on the platform). - - \sa setOption(), testOption() -*/ -void QPageSetupDialog::setOptions(PageSetupDialogOptions options) -{ - Q_D(QPageSetupDialog); - - PageSetupDialogOptions changed = (options ^ d->opts); - if (!changed) - return; - - d->opts = options; -} - -QPageSetupDialog::PageSetupDialogOptions QPageSetupDialog::options() const -{ - Q_D(const QPageSetupDialog); - return d->opts; -} - -/*! - \obsolete - - Use setOption(\a option, true) instead. -*/ -void QPageSetupDialog::addEnabledOption(PageSetupDialogOption option) -{ - setOption(option, true); -} - -/*! - \obsolete - - Use setOptions(\a options) instead. -*/ -void QPageSetupDialog::setEnabledOptions(PageSetupDialogOptions options) -{ - setOptions(options); -} - -/*! - \obsolete - - Use options() instead. -*/ -QPageSetupDialog::PageSetupDialogOptions QPageSetupDialog::enabledOptions() const -{ - return options(); -} - -/*! - \obsolete - - Use testOption(\a option) instead. -*/ -bool QPageSetupDialog::isOptionEnabled(PageSetupDialogOption option) const -{ - return testOption(option); -} - /*! \overload \since 4.5 -- cgit v1.2.3