Make QGtkStyle build with QT_NO_FILEDIALOG
Fix compilation failure with qconfig large Change-Id: I8ae14f01879b94430dcbb5c85c61d14e922f6eb9 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
c42a0a7729
commit
a685e9ae1b
@ -336,10 +336,12 @@ void QGtkStyle::polish(QApplication *app)
|
||||
QApplicationPrivate::setSystemFont(d->getThemeFont());
|
||||
d->applyCustomPaletteHash();
|
||||
if (!d->isKDE4Session()) {
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
qt_filedialog_open_filename_hook = &QGtkStylePrivate::openFilename;
|
||||
qt_filedialog_save_filename_hook = &QGtkStylePrivate::saveFilename;
|
||||
qt_filedialog_open_filenames_hook = &QGtkStylePrivate::openFilenames;
|
||||
qt_filedialog_existing_directory_hook = &QGtkStylePrivate::openDirectory;
|
||||
#endif
|
||||
qApp->installEventFilter(&d->filter);
|
||||
}
|
||||
}
|
||||
@ -357,10 +359,12 @@ void QGtkStyle::unpolish(QApplication *app)
|
||||
|
||||
if (app->desktopSettingsAware() && d->isThemeAvailable()
|
||||
&& !d->isKDE4Session()) {
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
qt_filedialog_open_filename_hook = 0;
|
||||
qt_filedialog_save_filename_hook = 0;
|
||||
qt_filedialog_open_filenames_hook = 0;
|
||||
qt_filedialog_existing_directory_hook = 0;
|
||||
#endif
|
||||
qApp->removeEventFilter(&d->filter);
|
||||
}
|
||||
}
|
||||
@ -386,8 +390,10 @@ void QGtkStyle::polish(QWidget *widget)
|
||||
|| qobject_cast<QSpinBox*>(widget)
|
||||
|| qobject_cast<QHeaderView*>(widget))
|
||||
widget->setAttribute(Qt::WA_Hover);
|
||||
#ifndef QT_NO_TREEVIEW
|
||||
else if (QTreeView *tree = qobject_cast<QTreeView *> (widget))
|
||||
tree->viewport()->setAttribute(Qt::WA_Hover);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -908,6 +908,7 @@ QStringList QGtkStylePrivate::extract_filter(const QString &rawFilter)
|
||||
|
||||
extern QStringList qt_make_filter_list(const QString &filter);
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
void QGtkStylePrivate::setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *parent,
|
||||
const QString &dir, const QString &filter, QString *selectedFilter,
|
||||
QFileDialog::Options options, bool isSaveDialog,
|
||||
@ -1115,6 +1116,7 @@ QString QGtkStylePrivate::saveFilename(QWidget *parent, const QString &caption,
|
||||
gtk_widget_destroy (gtkFileChooser);
|
||||
return filename;
|
||||
}
|
||||
#endif
|
||||
|
||||
QIcon QGtkStylePrivate::getFilesystemIcon(const QFileInfo &info)
|
||||
{
|
||||
|
@ -263,6 +263,7 @@ typedef Display* (*Ptr_gdk_x11_drawable_get_xdisplay) ( GdkDrawable *);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
typedef QStringList (*_qt_filedialog_open_filenames_hook)(QWidget * parent, const QString &caption, const QString &dir,
|
||||
const QString &filter, QString *selectedFilter, QFileDialog::Options options);
|
||||
typedef QString (*_qt_filedialog_open_filename_hook) (QWidget * parent, const QString &caption, const QString &dir,
|
||||
@ -276,6 +277,7 @@ extern Q_WIDGETS_EXPORT _qt_filedialog_open_filename_hook qt_filedialog_open_fil
|
||||
extern Q_WIDGETS_EXPORT _qt_filedialog_open_filenames_hook qt_filedialog_open_filenames_hook;
|
||||
extern Q_WIDGETS_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_hook;
|
||||
extern Q_WIDGETS_EXPORT _qt_filedialog_existing_directory_hook qt_filedialog_existing_directory_hook;
|
||||
#endif //!QT_NO_FILEDIALOG
|
||||
|
||||
class QGtkStylePrivate;
|
||||
|
||||
@ -342,6 +344,7 @@ public:
|
||||
static QString getThemeName();
|
||||
virtual int getSpinboxArrowSize() const;
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
static void setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *parent,
|
||||
const QString &dir, const QString &filter, QString *selectedFilter,
|
||||
QFileDialog::Options options, bool isSaveDialog = false,
|
||||
@ -354,6 +357,7 @@ public:
|
||||
static QString openDirectory(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options);
|
||||
static QStringList openFilenames(QWidget *parent, const QString &caption, const QString &dir, const QString &filter,
|
||||
QString *selectedFilter, QFileDialog::Options options);
|
||||
#endif
|
||||
static QIcon getFilesystemIcon(const QFileInfo &);
|
||||
|
||||
static Ptr_gtk_container_forall gtk_container_forall;
|
||||
|
Loading…
Reference in New Issue
Block a user