1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

GCS/coreplugin: Fix to uavgadgetmode

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@347 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
ephy 2010-03-19 19:51:17 +00:00 committed by ephy
parent 8817439993
commit d5d1ab2dd8
2 changed files with 4 additions and 1 deletions

View File

@ -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<int> UAVGadgetMode::context() const

View File

@ -75,6 +75,7 @@ private:
int m_priority;
QVBoxLayout *m_layout;
QString m_uniqueName;
const char *m_uniqueNameC;
};
} // namespace Internal