Browse Source

Fix potential crash when TDE integration is disabled

r14.0.x
Timothy Pearson 9 years ago
parent
commit
7d8cc6ed5b
  1. 7
      plugin/simplestyle.cpp
  2. 1
      plugin/simplestyle.h

7
plugin/simplestyle.cpp

@ -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?

1
plugin/simplestyle.h

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

Loading…
Cancel
Save