Fix potential crash when TDE integration is disabled

r14.0.x
Timothy Pearson 12 years ago
parent 2fcd8b3d7b
commit 7d8cc6ed5b

@ -134,7 +134,7 @@ static QString TDEFileDialogSelectDirectory(QWidget *parent, const QString &capt
#define NO_QT3_EQUIVALENT can_override = false;
#define DO_NOT_DRAW can_override = true; do_not_draw = true;
Qt4TDEStyle::Qt4TDEStyle() : m_aboutData(NULL), m_tdeApplication(NULL)
Qt4TDEStyle::Qt4TDEStyle() : m_aboutData(NULL), m_tqApplication(NULL), m_tdeApplication(NULL)
{
enable_debug_warnings = (getenv("DEBUG_TDEQT4_THEME_ENGINE") != NULL);
@ -191,7 +191,7 @@ Qt4TDEStyle::Qt4TDEStyle() : m_aboutData(NULL), m_tdeApplication(NULL)
if (!tqApp) {
// Qt4 can be SO STUPID sometimes...why can't I get the X11 display directly from qApp?!?!??
QWidget myhackedwidget;
new TQApplication(myhackedwidget.x11Info().display());
m_tqApplication = new TQApplication(myhackedwidget.x11Info().display());
}
// Set up Qt4 size hints to match the hardcoded TQt3 sizes
@ -266,6 +266,9 @@ Qt4TDEStyle::~Qt4TDEStyle()
if (m_tdeApplication) {
delete m_tdeApplication;
}
if (m_tqApplication) {
delete m_tqApplication;
}
// FIXME
// Do I need to delete this?

@ -107,6 +107,7 @@ private:
mutable TQWidget* m_previousTQt3InterfaceWidget;
KAboutData* m_aboutData;
TQApplication* m_tqApplication;
KApplication* m_tdeApplication;
TQString m_qt4ApplicationName;

Loading…
Cancel
Save