Convert features.inputdialog to QT_[REQUIRE_]CONFIG

Change-Id: Ie480efcfc1fdc00e2b2697cf4c5abb231b42cc0e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Stephan Binner 2017-05-30 20:52:39 +02:00
parent fd4f9c5e0c
commit 003dc8e29a
5 changed files with 13 additions and 18 deletions

View File

@ -6,7 +6,6 @@ HEADERS += \
dialogs/qerrormessage.h \ dialogs/qerrormessage.h \
dialogs/qfontdialog.h \ dialogs/qfontdialog.h \
dialogs/qfontdialog_p.h \ dialogs/qfontdialog_p.h \
dialogs/qinputdialog.h \
dialogs/qmessagebox.h \ dialogs/qmessagebox.h \
dialogs/qfilesystemmodel.h \ dialogs/qfilesystemmodel.h \
dialogs/qfilesystemmodel_p.h \ dialogs/qfilesystemmodel_p.h \
@ -23,7 +22,6 @@ SOURCES += \
dialogs/qcolordialog.cpp \ dialogs/qcolordialog.cpp \
dialogs/qerrormessage.cpp \ dialogs/qerrormessage.cpp \
dialogs/qfontdialog.cpp \ dialogs/qfontdialog.cpp \
dialogs/qinputdialog.cpp \
dialogs/qmessagebox.cpp \ dialogs/qmessagebox.cpp \
dialogs/qfilesystemmodel.cpp \ dialogs/qfilesystemmodel.cpp \
dialogs/qfileinfogatherer.cpp \ dialogs/qfileinfogatherer.cpp \
@ -51,6 +49,11 @@ qtConfig(filedialog) {
FORMS += dialogs/qfiledialog.ui FORMS += dialogs/qfiledialog.ui
} }
qtConfig(inputdialog) {
HEADERS += dialogs/qinputdialog.h
SOURCES += dialogs/qinputdialog.cpp
}
qtConfig(progressdialog) { qtConfig(progressdialog) {
HEADERS += dialogs/qprogressdialog.h HEADERS += dialogs/qprogressdialog.h
SOURCES += dialogs/qprogressdialog.cpp SOURCES += dialogs/qprogressdialog.cpp

View File

@ -52,7 +52,6 @@
#include <qgridlayout.h> #include <qgridlayout.h>
#include <qmenu.h> #include <qmenu.h>
#include <qmessagebox.h> #include <qmessagebox.h>
#include <qinputdialog.h>
#include <stdlib.h> #include <stdlib.h>
#include <qsettings.h> #include <qsettings.h>
#include <qdebug.h> #include <qdebug.h>

View File

@ -39,8 +39,6 @@
#include "qinputdialog.h" #include "qinputdialog.h"
#ifndef QT_NO_INPUTDIALOG
#include "qapplication.h" #include "qapplication.h"
#include "qcombobox.h" #include "qcombobox.h"
#include "qdialogbuttonbox.h" #include "qdialogbuttonbox.h"
@ -1507,5 +1505,3 @@ QT_END_NAMESPACE
#include "qinputdialog.moc" #include "qinputdialog.moc"
#include "moc_qinputdialog.cpp" #include "moc_qinputdialog.cpp"
#endif // QT_NO_INPUTDIALOG

View File

@ -44,12 +44,11 @@
#include <QtCore/qstring.h> #include <QtCore/qstring.h>
#include <QtWidgets/qlineedit.h> #include <QtWidgets/qlineedit.h>
#ifndef QT_NO_INPUTDIALOG
#include <QtWidgets/qdialog.h> #include <QtWidgets/qdialog.h>
QT_BEGIN_NAMESPACE QT_REQUIRE_CONFIG(inputdialog);
QT_BEGIN_NAMESPACE
class QInputDialogPrivate; class QInputDialogPrivate;
@ -212,6 +211,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QInputDialog::InputDialogOptions)
QT_END_NAMESPACE QT_END_NAMESPACE
#endif // QT_NO_INPUTDIALOG
#endif // QINPUTDIALOG_H #endif // QINPUTDIALOG_H

View File

@ -780,10 +780,10 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
if (qobject_cast<const QMessageBox *> (widget)) if (qobject_cast<const QMessageBox *> (widget))
buttonBox = widget->findChild<const QDialogButtonBox *>(QLatin1String("qt_msgbox_buttonbox")); buttonBox = widget->findChild<const QDialogButtonBox *>(QLatin1String("qt_msgbox_buttonbox"));
#ifndef QT_NO_INPUTDIALOG #if QT_CONFIG(inputdialog)
else if (qobject_cast<const QInputDialog *> (widget)) else if (qobject_cast<const QInputDialog *> (widget))
buttonBox = widget->findChild<const QDialogButtonBox *>(QLatin1String("qt_inputdlg_buttonbox")); buttonBox = widget->findChild<const QDialogButtonBox *>(QLatin1String("qt_inputdlg_buttonbox"));
#endif // QT_NO_INPUTDIALOG #endif // QT_CONFIG(inputdialog)
if (buttonBox) { if (buttonBox) {
//draw white panel part //draw white panel part
@ -2324,7 +2324,7 @@ void QWindowsVistaStyle::polish(QWidget *widget)
buttonBox->setContentsMargins(0, 9, 0, 0); buttonBox->setContentsMargins(0, 9, 0, 0);
#endif #endif
} }
#ifndef QT_NO_INPUTDIALOG #if QT_CONFIG(inputdialog)
else if (qobject_cast<QInputDialog *> (widget)) { else if (qobject_cast<QInputDialog *> (widget)) {
widget->setAttribute(Qt::WA_StyledBackground); widget->setAttribute(Qt::WA_StyledBackground);
#if QT_CONFIG(dialogbuttonbox) #if QT_CONFIG(dialogbuttonbox)
@ -2333,7 +2333,7 @@ void QWindowsVistaStyle::polish(QWidget *widget)
buttonBox->setContentsMargins(0, 9, 0, 0); buttonBox->setContentsMargins(0, 9, 0, 0);
#endif #endif
} }
#endif // QT_NO_INPUTDIALOG #endif // QT_CONFIG(inputdialog)
else if (QTreeView *tree = qobject_cast<QTreeView *> (widget)) { else if (QTreeView *tree = qobject_cast<QTreeView *> (widget)) {
tree->viewport()->setAttribute(Qt::WA_Hover); tree->viewport()->setAttribute(Qt::WA_Hover);
} }
@ -2368,7 +2368,7 @@ void QWindowsVistaStyle::unpolish(QWidget *widget)
buttonBox->setContentsMargins(0, 0, 0, 0); buttonBox->setContentsMargins(0, 0, 0, 0);
#endif #endif
} }
#ifndef QT_NO_INPUTDIALOG #if QT_CONFIG(inputdialog)
else if (qobject_cast<QInputDialog *> (widget)) { else if (qobject_cast<QInputDialog *> (widget)) {
widget->setAttribute(Qt::WA_StyledBackground, false); widget->setAttribute(Qt::WA_StyledBackground, false);
#if QT_CONFIG(dialogbuttonbox) #if QT_CONFIG(dialogbuttonbox)
@ -2377,7 +2377,7 @@ void QWindowsVistaStyle::unpolish(QWidget *widget)
buttonBox->setContentsMargins(0, 0, 0, 0); buttonBox->setContentsMargins(0, 0, 0, 0);
#endif #endif
} }
#endif // QT_NO_INPUTDIALOG #endif // QT_CONFIG(inputdialog)
else if (QTreeView *tree = qobject_cast<QTreeView *> (widget)) { else if (QTreeView *tree = qobject_cast<QTreeView *> (widget)) {
tree->viewport()->setAttribute(Qt::WA_Hover, false); tree->viewport()->setAttribute(Qt::WA_Hover, false);
} else if (qobject_cast<QCommandLinkButton*>(widget)) { } else if (qobject_cast<QCommandLinkButton*>(widget)) {