Convert features.filedialog to QT_[REQUIRE_]CONFIG
Change-Id: I9bc229b0d1430b81eeb2cfca2b24474736d5d561 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
150ee7f4f1
commit
1ebe68b01f
@ -21,7 +21,6 @@ OBJECTIVE_SOURCES += main.mm \
|
||||
qcocoaaccessibilityelement.mm \
|
||||
qcocoaaccessibility.mm \
|
||||
qcocoacolordialoghelper.mm \
|
||||
qcocoafiledialoghelper.mm \
|
||||
qcocoafontdialoghelper.mm \
|
||||
qcocoacursor.mm \
|
||||
qcocoaclipboard.mm \
|
||||
@ -56,7 +55,6 @@ HEADERS += qcocoaintegration.h \
|
||||
qcocoaaccessibilityelement.h \
|
||||
qcocoaaccessibility.h \
|
||||
qcocoacolordialoghelper.h \
|
||||
qcocoafiledialoghelper.h \
|
||||
qcocoafontdialoghelper.h \
|
||||
qcocoacursor.h \
|
||||
qcocoaclipboard.h \
|
||||
@ -89,6 +87,8 @@ QT += \
|
||||
CONFIG += no_app_extension_api_only
|
||||
|
||||
qtHaveModule(widgets) {
|
||||
QT_FOR_CONFIG += widgets
|
||||
|
||||
OBJECTIVE_SOURCES += \
|
||||
qpaintengine_mac.mm \
|
||||
qprintengine_mac.mm \
|
||||
@ -101,6 +101,11 @@ qtHaveModule(widgets) {
|
||||
qcocoaprintersupport.h \
|
||||
qcocoaprintdevice.h \
|
||||
|
||||
qtConfig(filedialog) {
|
||||
SOURCES += qcocoafiledialoghelper.mm
|
||||
HEADERS += qcocoafiledialoghelper.h
|
||||
}
|
||||
|
||||
QT += widgets-private printsupport-private
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,11 @@
|
||||
#define QCOCOAFILEDIALOGHELPER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <qpa/qplatformdialoghelper.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(filedialog);
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate));
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -41,8 +41,6 @@
|
||||
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
|
||||
/*****************************************************************************
|
||||
QFileDialog debug facilities
|
||||
*****************************************************************************/
|
||||
@ -775,5 +773,3 @@ bool QCocoaFileDialogHelper::defaultNameFilterDisables() const
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FILEDIALOG
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include "qcocoahelpers.h"
|
||||
#include "qcocoaapplication.h"
|
||||
#include "qcocoaapplicationdelegate.h"
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#include "qcocoatheme.h"
|
||||
#include "qcocoainputcontext.h"
|
||||
#include "qcocoamimetypes.h"
|
||||
@ -60,6 +59,13 @@
|
||||
|
||||
#include <QtGui/private/qcoregraphics_p.h>
|
||||
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <IOKit/graphics/IOGraphicsLib.h>
|
||||
|
||||
static void initResources()
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
#include "qcocoacolordialoghelper.h"
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#include "qcocoafontdialoghelper.h"
|
||||
#include "qcocoasystemsettings.h"
|
||||
#include "qcocoasystemtrayicon.h"
|
||||
@ -63,6 +62,13 @@
|
||||
#include <qpa/qplatformintegration.h>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qcocoafiledialoghelper.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
@interface QT_MANGLE_NAMESPACE(QCocoaThemeNotificationReceiver) : NSObject {
|
||||
@ -138,7 +144,7 @@ bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const
|
||||
QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const
|
||||
{
|
||||
switch (dialogType) {
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
#if defined(QT_WIDGETS_LIB) && QT_CONFIG(filedialog)
|
||||
case QPlatformTheme::FileDialog:
|
||||
return new QCocoaFileDialogHelper();
|
||||
#endif
|
||||
|
@ -43,7 +43,9 @@
|
||||
#include "private/qabstractprintdialog_p.h"
|
||||
#include <QtWidgets/qmessagebox.h>
|
||||
#include "qprintdialog.h"
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qfiledialog.h"
|
||||
#endif
|
||||
#include <QtCore/qdir.h>
|
||||
#include <QtGui/qevent.h>
|
||||
#include <QtWidgets/qfilesystemmodel.h>
|
||||
@ -780,7 +782,7 @@ void QUnixPrintWidgetPrivate::setOptionsPane(QPrintDialogPrivate *pane)
|
||||
void QUnixPrintWidgetPrivate::_q_btnBrowseClicked()
|
||||
{
|
||||
QString filename = widget.filename->text();
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
#if QT_CONFIG(filedialog)
|
||||
filename = QFileDialog::getSaveFileName(parent, QPrintDialog::tr("Print To File ..."), filename,
|
||||
QString(), 0, QFileDialog::DontConfirmOverwrite);
|
||||
#else
|
||||
|
@ -51,7 +51,9 @@
|
||||
#include <QtWidgets/qstyle.h>
|
||||
#include <QtWidgets/qtoolbutton.h>
|
||||
#include <QtGui/qvalidator.h>
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include <QtWidgets/qfiledialog.h>
|
||||
#endif
|
||||
#include <QtWidgets/qmainwindow.h>
|
||||
#include <QtWidgets/qtoolbar.h>
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
@ -4,14 +4,11 @@ HEADERS += \
|
||||
dialogs/qcolordialog.h \
|
||||
dialogs/qfscompleter_p.h \
|
||||
dialogs/qerrormessage.h \
|
||||
dialogs/qfiledialog.h \
|
||||
dialogs/qfiledialog_p.h \
|
||||
dialogs/qfontdialog.h \
|
||||
dialogs/qfontdialog_p.h \
|
||||
dialogs/qinputdialog.h \
|
||||
dialogs/qmessagebox.h \
|
||||
dialogs/qprogressdialog.h \
|
||||
dialogs/qsidebar_p.h \
|
||||
dialogs/qfilesystemmodel.h \
|
||||
dialogs/qfilesystemmodel_p.h \
|
||||
dialogs/qfileinfogatherer_p.h \
|
||||
@ -22,18 +19,14 @@ win32 {
|
||||
SOURCES += dialogs/qwizard_win.cpp
|
||||
}
|
||||
|
||||
FORMS += dialogs/qfiledialog.ui
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
SOURCES += \
|
||||
dialogs/qcolordialog.cpp \
|
||||
dialogs/qerrormessage.cpp \
|
||||
dialogs/qfiledialog.cpp \
|
||||
dialogs/qfontdialog.cpp \
|
||||
dialogs/qinputdialog.cpp \
|
||||
dialogs/qmessagebox.cpp \
|
||||
dialogs/qprogressdialog.cpp \
|
||||
dialogs/qsidebar.cpp \
|
||||
dialogs/qfilesystemmodel.cpp \
|
||||
dialogs/qfileinfogatherer.cpp \
|
||||
dialogs/qwizard.cpp \
|
||||
@ -47,4 +40,17 @@ qtConfig(dialog) {
|
||||
dialogs/qdialog.cpp
|
||||
}
|
||||
|
||||
qtConfig(filedialog) {
|
||||
HEADERS += \
|
||||
dialogs/qfiledialog.h \
|
||||
dialogs/qfiledialog_p.h \
|
||||
dialogs/qsidebar_p.h
|
||||
|
||||
SOURCES += \
|
||||
dialogs/qfiledialog.cpp \
|
||||
dialogs/qsidebar.cpp
|
||||
|
||||
FORMS += dialogs/qfiledialog.ui
|
||||
}
|
||||
|
||||
RESOURCES += dialogs/qmessagebox.qrc
|
||||
|
@ -39,7 +39,9 @@
|
||||
|
||||
#include "qcolordialog.h"
|
||||
#include "qfontdialog.h"
|
||||
#if QT_CONFIG(filedialog)
|
||||
#include "qfiledialog.h"
|
||||
#endif
|
||||
|
||||
#include "qevent.h"
|
||||
#include "qdesktopwidget.h"
|
||||
@ -64,7 +66,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
static inline int themeDialogType(const QDialog *dialog)
|
||||
{
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
#if QT_CONFIG(filedialog)
|
||||
if (qobject_cast<const QFileDialog *>(dialog))
|
||||
return QPlatformTheme::FileDialog;
|
||||
#endif
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include <private/qwidgetitemdata_p.h>
|
||||
#include "qfiledialog.h"
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
#include "qfiledialog_p.h"
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <qfontmetrics.h>
|
||||
@ -4134,5 +4133,3 @@ QStringList QFSCompleter::splitPath(const QString &path) const
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qfiledialog.cpp"
|
||||
|
||||
#endif // QT_NO_FILEDIALOG
|
||||
|
@ -44,13 +44,11 @@
|
||||
#include <QtCore/qdir.h>
|
||||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qurl.h>
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
|
||||
#include <QtWidgets/qdialog.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(filedialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QModelIndex;
|
||||
class QItemSelection;
|
||||
@ -316,6 +314,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QFileDialog::Options)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FILEDIALOG
|
||||
|
||||
#endif // QFILEDIALOG_H
|
||||
|
@ -53,8 +53,6 @@
|
||||
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
|
||||
#include "qfiledialog.h"
|
||||
#include "private/qdialog_p.h"
|
||||
#include "qplatformdefs.h"
|
||||
@ -81,6 +79,8 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
QT_REQUIRE_CONFIG(filedialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFileDialogListView;
|
||||
@ -432,6 +432,4 @@ QString QFileDialogPrivate::selectedNameFilter_sys() const
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FILEDIALOG
|
||||
|
||||
#endif // QFILEDIALOG_P_H
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include "qsidebar_p.h"
|
||||
#include "qfilesystemmodel.h"
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
|
||||
#include <qaction.h>
|
||||
#include <qurl.h>
|
||||
#include <qmenu.h>
|
||||
@ -518,5 +516,3 @@ bool QSidebar::event(QEvent * event)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qsidebar_p.cpp"
|
||||
|
||||
#endif
|
||||
|
@ -58,7 +58,7 @@
|
||||
#include <qurl.h>
|
||||
#include <qvector.h>
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
QT_REQUIRE_CONFIG(filedialog);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -159,7 +159,5 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_FILEDIALOG
|
||||
|
||||
#endif // QSIDEBAR_H
|
||||
|
||||
|
@ -94,7 +94,7 @@ private slots:
|
||||
void customPaperSizeAndMargins();
|
||||
void customPaperNameSettingBySize();
|
||||
void customPaperNameSettingByName();
|
||||
#if !defined(QT_NO_COMPLETER) && !defined(QT_NO_FILEDIALOG)
|
||||
#if !defined(QT_NO_COMPLETER) && QT_CONFIG(filedialog)
|
||||
void printDialogCompleter();
|
||||
#endif
|
||||
void testCurrentPage();
|
||||
@ -601,7 +601,7 @@ void tst_QPrinter::customPaperSizeAndMargins()
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(QT_NO_COMPLETER) && !defined(QT_NO_FILEDIALOG)
|
||||
#if !defined(QT_NO_COMPLETER) && QT_CONFIG(filedialog)
|
||||
void tst_QPrinter::printDialogCompleter()
|
||||
{
|
||||
QPrintDialog dialog;
|
||||
|
Loading…
x
Reference in New Issue
Block a user