diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-10 10:47:34 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-10 10:47:34 +0100 |
commit | 28d72550d3550df1484b580c27f6ac3e776d1062 (patch) | |
tree | 3e99f80761d93c79eb8aa0ea50e783b93a9934df /src/plugins/qt4projectmanager/qt4target.cpp | |
parent | a403c436450bce2c1cc556c98c84be7693410c3e (diff) | |
download | qt-creator-28d72550d3550df1484b580c27f6ac3e776d1062.tar.gz |
Removed static QIcon instances.
thus fixing the exit warning:
"~QX11PixmapData(): QPixmap objects must be destroyed..."
Acked-by: con
Diffstat (limited to 'src/plugins/qt4projectmanager/qt4target.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt4target.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index a83d01eadb..03aac13528 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -178,6 +178,8 @@ Qt4Target *Qt4TargetFactory::restore(ProjectExplorer::Project *parent, const QVa Qt4Target::Qt4Target(Qt4Project *parent, const QString &id) : ProjectExplorer::Target(parent, id), + m_connectedPixmap(QLatin1String(":/qt4projectmanager/images/connected.png")), + m_disconnectedPixmap(QLatin1String(":/qt4projectmanager/images/notconnected.png")), m_buildConfigurationFactory(new Qt4BuildConfigurationFactory(this)) { connect(project(), SIGNAL(supportedTargetIdsChanged()), @@ -413,8 +415,6 @@ void Qt4Target::slotUpdateDeviceInformation() void Qt4Target::updateToolTipAndIcon() { - static const QPixmap connected(":/qt4projectmanager/images/connected.png"); - static const QPixmap notconnected(":/qt4projectmanager/images/notconnected.png"); S60DeviceRunConfiguration *deviceRc(qobject_cast<S60DeviceRunConfiguration *>(activeRunConfiguration())); if (!deviceRc) { setToolTip(QString()); @@ -434,12 +434,12 @@ void Qt4Target::updateToolTipAndIcon() if (!friendlyPortName.isEmpty()) { // device connected setToolTip(tr("<b>Device:</b> %1").arg(friendlyPortName)); - painter.drawPixmap(Core::Constants::TARGET_ICON_SIZE - connected.width(), - connected.height(), connected); + painter.drawPixmap(Core::Constants::TARGET_ICON_SIZE - m_connectedPixmap.width(), + m_connectedPixmap.height(), m_connectedPixmap); } else { setToolTip(tr("<b>Device:</b> Not connected")); - painter.drawPixmap(Core::Constants::TARGET_ICON_SIZE - notconnected.width(), - notconnected.height(), notconnected); + painter.drawPixmap(Core::Constants::TARGET_ICON_SIZE - m_disconnectedPixmap.width(), + m_disconnectedPixmap.height(), m_disconnectedPixmap); } setIcon(QIcon(pixmap)); } |