summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-01-26 11:50:33 +0100
committerLiang Qi <liang.qi@qt.io>2019-02-06 22:11:38 +0000
commitedc455c69b7a938f7a7ce98b5b0ffd1398f239c6 (patch)
treefc2add16f2e2f6df2c0881307bd080398b04416e /src/widgets/dialogs
parentd6d33f0b80dd85043c71f71a3ed5485d6014e6c4 (diff)
QtWidgets: mark QDialog/QFileDialog functions as deprecated
Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QDialog::setOrientation()/orientation() - QDialog::setExtension()/extension()/showExtension() - QFileDialog::setNameFilterDetailsVisible()/isNameFilterDetailsVisible() - QFileDialog::setResolveSymlinks()/resolveSymlinks() Change-Id: Ibbd5b4192ea8ab483d6b2a8dbf9879f29f9ee86d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qdialog.cpp3
-rw-r--r--src/widgets/dialogs/qdialog.h15
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp4
-rw-r--r--src/widgets/dialogs/qfiledialog.h12
4 files changed, 26 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index cc04110a30..efd2c2ffea 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -946,6 +946,7 @@ void QDialog::adjustPosition(QWidget* w)
move(p);
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -1090,7 +1091,7 @@ void QDialog::showExtension(bool showIt)
#endif
}
}
-
+#endif
/*! \reimp */
QSize QDialog::sizeHint() const
diff --git a/src/widgets/dialogs/qdialog.h b/src/widgets/dialogs/qdialog.h
index 7f267dd939..ce57ce5de7 100644
--- a/src/widgets/dialogs/qdialog.h
+++ b/src/widgets/dialogs/qdialog.h
@@ -69,11 +69,12 @@ public:
void setVisible(bool visible) override;
- void setOrientation(Qt::Orientation orientation);
- Qt::Orientation orientation() const;
-
- void setExtension(QWidget* extension);
- QWidget* extension() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED void setOrientation(Qt::Orientation orientation);
+ QT_DEPRECATED Qt::Orientation orientation() const;
+ QT_DEPRECATED void setExtension(QWidget* extension);
+ QT_DEPRECATED QWidget* extension() const;
+#endif
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
@@ -96,7 +97,9 @@ public Q_SLOTS:
virtual void accept();
virtual void reject();
- void showExtension(bool);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED void showExtension(bool);
+#endif
protected:
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = Qt::WindowFlags());
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index edaa7854ba..f42cf89708 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -1359,6 +1359,7 @@ void QFileDialog::setNameFilter(const QString &filter)
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\property QFileDialog::nameFilterDetailsVisible
\obsolete
@@ -1380,6 +1381,7 @@ bool QFileDialog::isNameFilterDetailsVisible() const
{
return !testOption(HideNameFilterDetails);
}
+#endif
/*
@@ -1879,6 +1881,7 @@ bool QFileDialog::isReadOnly() const
return testOption(ReadOnly);
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\property QFileDialog::resolveSymlinks
\obsolete
@@ -1899,6 +1902,7 @@ bool QFileDialog::resolveSymlinks() const
{
return !testOption(DontResolveSymlinks);
}
+#endif
/*!
\property QFileDialog::confirmOverwrite
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index a4d289a77a..8a99112081 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -65,11 +65,13 @@ class Q_WIDGETS_EXPORT QFileDialog : public QDialog
Q_PROPERTY(FileMode fileMode READ fileMode WRITE setFileMode)
Q_PROPERTY(AcceptMode acceptMode READ acceptMode WRITE setAcceptMode)
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE false)
- Q_PROPERTY(bool resolveSymlinks READ resolveSymlinks WRITE setResolveSymlinks DESIGNABLE false)
Q_PROPERTY(bool confirmOverwrite READ confirmOverwrite WRITE setConfirmOverwrite DESIGNABLE false)
Q_PROPERTY(QString defaultSuffix READ defaultSuffix WRITE setDefaultSuffix)
+#if QT_DEPRECATED_SINCE(5, 13)
+ Q_PROPERTY(bool resolveSymlinks READ resolveSymlinks WRITE setResolveSymlinks DESIGNABLE false)
Q_PROPERTY(bool nameFilterDetailsVisible READ isNameFilterDetailsVisible
WRITE setNameFilterDetailsVisible DESIGNABLE false)
+#endif
Q_PROPERTY(Options options READ options WRITE setOptions)
Q_PROPERTY(QStringList supportedSchemes READ supportedSchemes WRITE setSupportedSchemes)
@@ -117,8 +119,12 @@ public:
void selectUrl(const QUrl &url);
QList<QUrl> selectedUrls() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use setOption(HideNameFilterDetails, !enabled) instead")
void setNameFilterDetailsVisible(bool enabled);
+ QT_DEPRECATED_X("Use !testOption(HideNameFilterDetails) instead")
bool isNameFilterDetailsVisible() const;
+#endif
void setNameFilter(const QString &filter);
void setNameFilters(const QStringList &filters);
@@ -148,8 +154,12 @@ public:
void setReadOnly(bool enabled);
bool isReadOnly() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use setOption(DontResolveSymlinks, !enabled) instead")
void setResolveSymlinks(bool enabled);
+ QT_DEPRECATED_X("Use !testOption(DontResolveSymlinks) instead")
bool resolveSymlinks() const;
+#endif
void setSidebarUrls(const QList<QUrl> &urls);
QList<QUrl> sidebarUrls() const;