From d5d1ab2dd86a8874552bf866960f4990c9f2ba3b Mon Sep 17 00:00:00 2001 From: ephy Date: Fri, 19 Mar 2010 19:51:17 +0000 Subject: [PATCH] GCS/coreplugin: Fix to uavgadgetmode git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@347 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/coreplugin/uavgadgetmode.cpp | 4 +++- ground/src/plugins/coreplugin/uavgadgetmode.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ground/src/plugins/coreplugin/uavgadgetmode.cpp b/ground/src/plugins/coreplugin/uavgadgetmode.cpp index 6737ec8d1..3b82054cd 100644 --- a/ground/src/plugins/coreplugin/uavgadgetmode.cpp +++ b/ground/src/plugins/coreplugin/uavgadgetmode.cpp @@ -66,6 +66,8 @@ UAVGadgetMode::UAVGadgetMode(UAVGadgetManager *uavGadgetManager, QString name, Q // this shouldn't happen m_uniqueName = uniqueName + QString::number(quint64(this)); } + QByteArray ba = m_uniqueName.toLatin1(); + m_uniqueNameC = ba.data(); connect(modeManager, SIGNAL(currentModeChanged(Core::IMode*)), this, SLOT(grabUAVGadgetManager(Core::IMode*))); m_widget->setFocusProxy(m_uavGadgetManager); @@ -101,7 +103,7 @@ QWidget* UAVGadgetMode::widget() const char* UAVGadgetMode::uniqueModeName() const { - return m_uniqueName.toAscii().data(); + return m_uniqueNameC; } QList UAVGadgetMode::context() const diff --git a/ground/src/plugins/coreplugin/uavgadgetmode.h b/ground/src/plugins/coreplugin/uavgadgetmode.h index 5e71829de..b5d44fd9b 100644 --- a/ground/src/plugins/coreplugin/uavgadgetmode.h +++ b/ground/src/plugins/coreplugin/uavgadgetmode.h @@ -75,6 +75,7 @@ private: int m_priority; QVBoxLayout *m_layout; QString m_uniqueName; + const char *m_uniqueNameC; }; } // namespace Internal