summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-05-27 10:15:54 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2010-05-27 10:15:54 (GMT)
commitbc5e4da28c1ffbc0da1cbfcaa1e6236ff4c2d4e3 (patch)
tree1282ad9eba2023e95a100b775671add1d9be6e4b /src/gui/styles
parentfe824f6175ebbeb1940872275b31f9894d056ad0 (diff)
downloadQt-bc5e4da28c1ffbc0da1cbfcaa1e6236ff4c2d4e3.zip
Qt-bc5e4da28c1ffbc0da1cbfcaa1e6236ff4c2d4e3.tar.gz
Qt-bc5e4da28c1ffbc0da1cbfcaa1e6236ff4c2d4e3.tar.bz2
Fixed a crash when creating QGtkStyle before QApplication
Task-number: QTBUG-10758 Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qgtkstyle.cpp2
-rw-r--r--src/gui/styles/qgtkstyle_p.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 6c8d561..9d6dc9a 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -325,6 +325,7 @@ void QGtkStyle::polish(QApplication *app)
qt_filedialog_save_filename_hook = &QGtkStylePrivate::saveFilename;
qt_filedialog_open_filenames_hook = &QGtkStylePrivate::openFilenames;
qt_filedialog_existing_directory_hook = &QGtkStylePrivate::openDirectory;
+ qApp->installEventFilter(&d->filter);
}
}
}
@@ -345,6 +346,7 @@ void QGtkStyle::unpolish(QApplication *app)
qt_filedialog_save_filename_hook = 0;
qt_filedialog_open_filenames_hook = 0;
qt_filedialog_existing_directory_hook = 0;
+ qApp->removeEventFilter(&d->filter);
}
}
diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp
index 3c6a1ef..4ed0fab 100644
--- a/src/gui/styles/qgtkstyle_p.cpp
+++ b/src/gui/styles/qgtkstyle_p.cpp
@@ -285,8 +285,6 @@ void QGtkStylePrivate::init()
{
resolveGtk();
initGtkWidgets();
- if (isThemeAvailable())
- qApp->installEventFilter(&filter);
}
GtkWidget* QGtkStylePrivate::gtkWidget(const QHashableLatin1Literal &path)