diff options
Diffstat (limited to 'src/qt3support')
-rw-r--r-- | src/qt3support/dialogs/q3filedialog.cpp | 6 | ||||
-rw-r--r-- | src/qt3support/dialogs/q3tabdialog.cpp | 11 | ||||
-rw-r--r-- | src/qt3support/dialogs/q3tabdialog.h | 1 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index 1ec0cfc..b9f8196 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -4611,11 +4611,11 @@ void Q3FileDialog::setPreviewMode(PreviewMode m) } Q3FileDialog::PreviewMode Q3FileDialog::previewMode() const { - if (d->infoPreview && d->infoPreviewWidget->isVisible()) + if (d->infoPreview && d->infoPreviewWidget->isVisibleTo(const_cast<Q3FileDialog *>(this))) return Info; - else if (d->contentsPreview && d->contentsPreviewWidget->isVisible()) + else if (d->contentsPreview + && d->contentsPreviewWidget->isVisibleTo(const_cast<Q3FileDialog *>(this))) return Contents; - return NoPreview; } diff --git a/src/qt3support/dialogs/q3tabdialog.cpp b/src/qt3support/dialogs/q3tabdialog.cpp index 6242dce..52086a2 100644 --- a/src/qt3support/dialogs/q3tabdialog.cpp +++ b/src/qt3support/dialogs/q3tabdialog.cpp @@ -49,6 +49,7 @@ #include "qapplication.h" #include "q3widgetstack.h" #include "qlayout.h" +#include "qevent.h" QT_BEGIN_NAMESPACE @@ -961,6 +962,16 @@ void Q3TabDialog::paintEvent(QPaintEvent *) } +/*!\reimp +*/ +void Q3TabDialog::showEvent(QShowEvent *e) +{ + if (!e->spontaneous()) + show(); + QDialog::showEvent(e); +} + + /*! Adds an OK button to the dialog and sets the button's text to \a text. diff --git a/src/qt3support/dialogs/q3tabdialog.h b/src/qt3support/dialogs/q3tabdialog.h index 3645df1..30acc7d 100644 --- a/src/qt3support/dialogs/q3tabdialog.h +++ b/src/qt3support/dialogs/q3tabdialog.h @@ -111,6 +111,7 @@ public: protected: void paintEvent(QPaintEvent *); void resizeEvent(QResizeEvent *); + void showEvent(QShowEvent *); void styleChange(QStyle&); void setTabBar(QTabBar*); QTabBar* tabBar() const; |